File indexing completed on 2024-09-27 07:03:04
0001
0002
0003
0004
0005
0006 #include <edm4eic/EDM4eicVersion.h>
0007 #include <Evaluator/DD4hepUnits.h>
0008 #include <JANA/JApplication.h>
0009 #include <string>
0010
0011 #include "algorithms/calorimetry/CalorimeterHitDigiConfig.h"
0012 #include "extensions/jana/JOmniFactoryGeneratorT.h"
0013 #include "factories/calorimetry/CalorimeterClusterRecoCoG_factory.h"
0014 #include "factories/calorimetry/CalorimeterHitDigi_factory.h"
0015 #include "factories/calorimetry/CalorimeterHitReco_factory.h"
0016 #include "factories/calorimetry/CalorimeterHitsMerger_factory.h"
0017 #include "factories/calorimetry/CalorimeterIslandCluster_factory.h"
0018 #include "factories/calorimetry/CalorimeterTruthClustering_factory.h"
0019 #include "factories/calorimetry/TrackClusterMergeSplitter_factory.h"
0020
0021 extern "C" {
0022 void InitPlugin(JApplication *app) {
0023
0024 using namespace eicrecon;
0025
0026 InitJANAPlugin(app);
0027
0028 decltype(CalorimeterHitDigiConfig::capADC) HcalEndcapN_capADC = 32768;
0029 decltype(CalorimeterHitDigiConfig::dyRangeADC) HcalEndcapN_dyRangeADC = 200 * dd4hep::MeV;
0030 decltype(CalorimeterHitDigiConfig::pedMeanADC) HcalEndcapN_pedMeanADC = 10;
0031 decltype(CalorimeterHitDigiConfig::pedSigmaADC) HcalEndcapN_pedSigmaADC = 2;
0032 decltype(CalorimeterHitDigiConfig::resolutionTDC) HcalEndcapN_resolutionTDC = 10 * dd4hep::picosecond;
0033
0034 app->Add(new JOmniFactoryGeneratorT<CalorimeterHitDigi_factory>(
0035 "HcalEndcapNRawHits",
0036 {"HcalEndcapNHits"},
0037 #if EDM4EIC_VERSION_MAJOR >= 7
0038 {"HcalEndcapNRawHits", "HcalEndcapNRawHitAssociations"},
0039 #else
0040 {"HcalEndcapNRawHits"},
0041 #endif
0042 {
0043 .tRes = 0.0 * dd4hep::ns,
0044 .capADC = HcalEndcapN_capADC,
0045 .capTime = 100,
0046 .dyRangeADC = HcalEndcapN_dyRangeADC,
0047 .pedMeanADC = HcalEndcapN_pedMeanADC,
0048 .pedSigmaADC = HcalEndcapN_pedSigmaADC,
0049 .resolutionTDC = HcalEndcapN_resolutionTDC,
0050 .corrMeanScale = "1.0",
0051 .readout = "HcalEndcapNHits",
0052 },
0053 app
0054 ));
0055 app->Add(new JOmniFactoryGeneratorT<CalorimeterHitReco_factory>(
0056 "HcalEndcapNRecHits", {"HcalEndcapNRawHits"}, {"HcalEndcapNRecHits"},
0057 {
0058 .capADC = HcalEndcapN_capADC,
0059 .dyRangeADC = HcalEndcapN_dyRangeADC,
0060 .pedMeanADC = HcalEndcapN_pedMeanADC,
0061 .pedSigmaADC = HcalEndcapN_pedSigmaADC,
0062 .resolutionTDC = HcalEndcapN_resolutionTDC,
0063 .thresholdFactor = 0.0,
0064 .thresholdValue = 41.0,
0065 .sampFrac = "0.0095",
0066 .readout = "HcalEndcapNHits",
0067 },
0068 app
0069 ));
0070 app->Add(new JOmniFactoryGeneratorT<CalorimeterHitsMerger_factory>(
0071 "HcalEndcapNMergedHits", {"HcalEndcapNRecHits"}, {"HcalEndcapNMergedHits"},
0072 {
0073 .readout = "HcalEndcapNHits",
0074 .fields = {"layer", "slice"},
0075 .refs = {4, 0},
0076 },
0077 app
0078 ));
0079 app->Add(new JOmniFactoryGeneratorT<CalorimeterTruthClustering_factory>(
0080 "HcalEndcapNTruthProtoClusters", {"HcalEndcapNMergedHits", "HcalEndcapNHits"}, {"HcalEndcapNTruthProtoClusters"},
0081 app
0082 ));
0083 app->Add(new JOmniFactoryGeneratorT<CalorimeterIslandCluster_factory>(
0084 "HcalEndcapNIslandProtoClusters", {"HcalEndcapNMergedHits"}, {"HcalEndcapNIslandProtoClusters"},
0085 {
0086 .sectorDist = 5.0 * dd4hep::cm,
0087 .localDistXY = {15*dd4hep::cm, 15*dd4hep::cm},
0088 .splitCluster = true,
0089 .minClusterHitEdep = 0.0 * dd4hep::MeV,
0090 .minClusterCenterEdep = 30.0 * dd4hep::MeV,
0091 .transverseEnergyProfileMetric = "globalDistEtaPhi",
0092 .transverseEnergyProfileScale = 1.,
0093 },
0094 app
0095 ));
0096 app->Add(
0097 new JOmniFactoryGeneratorT<CalorimeterClusterRecoCoG_factory>(
0098 "HcalEndcapNTruthClusters",
0099 {"HcalEndcapNTruthProtoClusters",
0100 #if EDM4EIC_VERSION_MAJOR >= 7
0101 "HcalEndcapNRawHitAssociations"},
0102 #else
0103 "HcalEndcapNHits"},
0104 #endif
0105 {"HcalEndcapNTruthClusters",
0106 "HcalEndcapNTruthClusterAssociations"},
0107 {
0108 .energyWeight = "log",
0109 .sampFrac = 1.0,
0110 .logWeightBase = 6.2,
0111 .enableEtaBounds = false
0112 },
0113 app
0114 )
0115 );
0116
0117 app->Add(
0118 new JOmniFactoryGeneratorT<CalorimeterClusterRecoCoG_factory>(
0119 "HcalEndcapNClusters",
0120 {"HcalEndcapNIslandProtoClusters",
0121 #if EDM4EIC_VERSION_MAJOR >= 7
0122 "HcalEndcapNRawHitAssociations"},
0123 #else
0124 "HcalEndcapNHits"},
0125 #endif
0126 {"HcalEndcapNClusters",
0127 "HcalEndcapNClusterAssociations"},
0128 {
0129 .energyWeight = "log",
0130 .sampFrac = 1.0,
0131 .logWeightBase = 6.2,
0132 .enableEtaBounds = false,
0133 },
0134 app
0135 )
0136 );
0137
0138 app->Add(
0139 new JOmniFactoryGeneratorT<TrackClusterMergeSplitter_factory>(
0140 "HcalEndcapNSplitMergeProtoClusters",
0141 {"HcalEndcapNIslandProtoClusters",
0142 "CalorimeterTrackProjections"},
0143 {"HcalEndcapNSplitMergeProtoClusters"},
0144 {
0145 .idCalo = "HcalEndcapN_ID",
0146 .minSigCut = -2.0,
0147 .avgEP = 0.60,
0148 .sigEP = 0.40,
0149 .drAdd = 0.40,
0150 .sampFrac = 1.0,
0151 .transverseEnergyProfileScale = 1.0
0152 },
0153 app
0154 )
0155 );
0156
0157 app->Add(
0158 new JOmniFactoryGeneratorT<CalorimeterClusterRecoCoG_factory>(
0159 "HcalEndcapNSplitMergeClusters",
0160 {"HcalEndcapNSplitMergeProtoClusters",
0161 "HcalEndcapNHits"},
0162 {"HcalEndcapNSplitMergeClusters",
0163 "HcalEndcapNSplitMergeClusterAssociations"},
0164 {
0165 .energyWeight = "log",
0166 .sampFrac = 1.0,
0167 .logWeightBase = 6.2,
0168 .enableEtaBounds = false
0169 },
0170 app
0171 )
0172 );
0173 }
0174 }