File indexing completed on 2025-06-08 08:53:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "ClusterMergedHitsProcessor.h"
0013
0014
0015 #include <edm4eic/EDM4eicVersion.h>
0016 #include <Evaluator/DD4hepUnits.h>
0017 #include <JANA/JApplication.h>
0018 #include <memory>
0019
0020
0021 #include <extensions/jana/JOmniFactoryGeneratorT.h>
0022 #include <factories/calorimetry/CalorimeterClusterRecoCoG_factory.h>
0023 #include <factories/calorimetry/CalorimeterClusterShape_factory.h>
0024 #include <factories/calorimetry/CalorimeterIslandCluster_factory.h>
0025 #include <services/rootfile/RootFile_service.h>
0026
0027
0028
0029
0030 extern "C" {
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041 void InitPlugin(JApplication* app) {
0042
0043
0044 using namespace eicrecon;
0045
0046
0047 InitJANAPlugin(app);
0048 app -> Add(new ClusterMergedHitsProcessor);
0049
0050
0051 app->Add(
0052 new JOmniFactoryGeneratorT<CalorimeterIslandCluster_factory>(
0053 "HcalBarrelMergedHitIslandProtoClusters",
0054 {"HcalBarrelMergedHits"},
0055 {"HcalBarrelMergedHitIslandProtoClusters"},
0056 {
0057 .adjacencyMatrix =
0058 "("
0059 " ( (abs(eta_1 - eta_2) == 1) && (abs(phi_1 - phi_2) == 0) ) ||"
0060 " ( (abs(eta_1 - eta_2) == 0) && (abs(phi_1 - phi_2) == 1) ) ||"
0061 " ( (abs(eta_1 - eta_2) == 0) && (abs(phi_1 - phi_2) == (320 - 1)) )"
0062 ") == 1",
0063 .readout = "HcalBarrelHits",
0064 .sectorDist = 5.0 * dd4hep::cm,
0065 .splitCluster = false,
0066 .minClusterHitEdep = 5.0 * dd4hep::MeV,
0067 .minClusterCenterEdep = 30.0 * dd4hep::MeV,
0068 .transverseEnergyProfileMetric = "globalDistEtaPhi",
0069 .transverseEnergyProfileScale = 1.,
0070 },
0071 app
0072 )
0073 );
0074
0075
0076 app->Add(
0077 new JOmniFactoryGeneratorT<CalorimeterClusterRecoCoG_factory>(
0078 "HcalBarrelMergedHitClustersWithoutShapes",
0079 {"HcalBarrelMergedHitIslandProtoClusters",
0080 "HcalBarrelRawHitAssociations"},
0081 {"HcalBarrelMergedHitClustersWithoutShapes",
0082 "HcalBarrelMergedHitClusterAssociationsWithoutShapes"},
0083 {
0084 .energyWeight = "log",
0085 .sampFrac = 1.0,
0086 .logWeightBase = 6.2,
0087 .enableEtaBounds = false
0088 },
0089 app
0090 )
0091 );
0092
0093
0094 app->Add(
0095 new JOmniFactoryGeneratorT<CalorimeterClusterShape_factory>(
0096 "HcalBarrelMergedHitClusters",
0097 {"HcalBarrelMergedHitClustersWithoutShapes",
0098 "HcalBarrelMergedHitClusterAssociationsWithoutShapes"},
0099 {"HcalBarrelMergedHitClusters",
0100 "HcalBarrelMergedHitClusterAssociations"},
0101 {
0102 .energyWeight = "log",
0103 .logWeightBase = 6.2
0104 },
0105 app
0106 )
0107 );
0108
0109 }
0110
0111 }
0112
0113