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 <math.h>
0010 #include <string>
0011
0012 #include "algorithms/calorimetry/CalorimeterClusterRecoCoGConfig.h"
0013 #include "extensions/jana/JOmniFactoryGeneratorT.h"
0014 #include "factories/calorimetry/CalorimeterClusterRecoCoG_factory.h"
0015 #include "factories/calorimetry/CalorimeterHitDigi_factory.h"
0016 #include "factories/calorimetry/CalorimeterHitReco_factory.h"
0017 #include "factories/calorimetry/CalorimeterIslandCluster_factory.h"
0018 #include "factories/calorimetry/CalorimeterTruthClustering_factory.h"
0019
0020 extern "C" {
0021 void InitPlugin(JApplication *app) {
0022
0023 using namespace eicrecon;
0024
0025 InitJANAPlugin(app);
0026
0027 app->Add(new JOmniFactoryGeneratorT<CalorimeterHitDigi_factory>(
0028 "B0ECalRawHits",
0029 {"B0ECalHits"},
0030 #if EDM4EIC_VERSION_MAJOR >= 7
0031 {"B0ECalRawHits", "B0ECalRawHitAssociations"},
0032 #else
0033 {"B0ECalRawHits"},
0034 #endif
0035 {
0036 .eRes = {0.0 * sqrt(dd4hep::GeV), 0.02, 0.0 * dd4hep::GeV},
0037 .tRes = 0.0 * dd4hep::ns,
0038 .threshold= 5.0 * dd4hep::MeV,
0039 .capADC = 16384,
0040 .dyRangeADC = 20 * dd4hep::GeV,
0041 .pedMeanADC = 100,
0042 .pedSigmaADC = 1,
0043 .resolutionTDC = 1e-11,
0044 .corrMeanScale = "1.0",
0045 .readout = "B0ECalHits",
0046 },
0047 app
0048 ));
0049 app->Add(new JOmniFactoryGeneratorT<CalorimeterHitReco_factory>(
0050 "B0ECalRecHits", {"B0ECalRawHits"}, {"B0ECalRecHits"},
0051 {
0052 .capADC = 16384,
0053 .dyRangeADC = 20. * dd4hep::GeV,
0054 .pedMeanADC = 100,
0055 .pedSigmaADC = 1,
0056 .resolutionTDC = 1e-11,
0057 .thresholdFactor = 0.0,
0058 .thresholdValue = 0.0,
0059 .sampFrac = "0.998",
0060 .readout = "B0ECalHits",
0061 .sectorField = "sector",
0062 },
0063 app
0064 ));
0065 app->Add(new JOmniFactoryGeneratorT<CalorimeterTruthClustering_factory>(
0066 "B0ECalTruthProtoClusters", {"B0ECalRecHits", "B0ECalHits"}, {"B0ECalTruthProtoClusters"},
0067 app
0068 ));
0069 app->Add(new JOmniFactoryGeneratorT<CalorimeterIslandCluster_factory>(
0070 "B0ECalIslandProtoClusters", {"B0ECalRecHits"}, {"B0ECalIslandProtoClusters"},
0071 {
0072 .sectorDist = 5.0 * dd4hep::cm,
0073 .dimScaledLocalDistXY = {1.8,1.8},
0074 .splitCluster = false,
0075 .minClusterHitEdep = 1.0 * dd4hep::MeV,
0076 .minClusterCenterEdep = 30.0 * dd4hep::MeV,
0077 .transverseEnergyProfileMetric = "globalDistEtaPhi",
0078 .transverseEnergyProfileScale = 1.,
0079 },
0080 app
0081 ));
0082
0083 app->Add(
0084 new JOmniFactoryGeneratorT<CalorimeterClusterRecoCoG_factory>(
0085 "B0ECalClusters",
0086 {"B0ECalIslandProtoClusters",
0087 #if EDM4EIC_VERSION_MAJOR >= 7
0088 "B0ECalRawHitAssociations"},
0089 #else
0090 "B0ECalHits"},
0091 #endif
0092 {"B0ECalClusters",
0093 "B0ECalClusterAssociations"},
0094 {
0095 .energyWeight = "log",
0096 .sampFrac = 1.0,
0097 .logWeightBase = 3.6,
0098 .enableEtaBounds = false
0099 },
0100 app
0101 )
0102 );
0103
0104 app->Add(
0105 new JOmniFactoryGeneratorT<CalorimeterClusterRecoCoG_factory>(
0106 "B0ECalTruthClusters",
0107 {"B0ECalTruthProtoClusters",
0108 #if EDM4EIC_VERSION_MAJOR >= 7
0109 "B0ECalRawHitAssociations"},
0110 #else
0111 "B0ECalHits"},
0112 #endif
0113 {"B0ECalTruthClusters",
0114 "B0ECalTruthClusterAssociations"},
0115 {
0116 .energyWeight = "log",
0117 .sampFrac = 1.0,
0118 .logWeightBase = 6.2,
0119 .enableEtaBounds = false
0120 },
0121 app
0122 )
0123 );
0124 }
0125 }