File indexing completed on 2025-10-31 09:00:08
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include <DDSegmentation/BitFieldCoder.h>
0010 #include <JANA/JEventProcessor.h>
0011 #include <JANA/Utils/JTypeInfo.h>
0012 #include <TDirectory.h>
0013 #include <TH2.h>
0014 #include <TH3.h>
0015 #include <TTree.h>
0016 #include <spdlog/logger.h>
0017 #include <memory>
0018 #include <string>
0019
0020 class femc_studiesProcessor : public JEventProcessor {
0021 public:
0022 femc_studiesProcessor() { SetTypeName(NAME_OF_THIS); }
0023
0024 void Init() override;
0025
0026 void Process(const std::shared_ptr<const JEvent>& event) override;
0027
0028
0029 void Finish() override;
0030 TDirectory* m_dir_main;
0031
0032 TH2D* hMCEnergyVsEta;
0033 TH3D* hClusterEcalib_E_eta;
0034 TH3D* hClusterNCells_E_eta;
0035 TH3D* hClusterEcalib_E_phi;
0036 TH2D* hPosCaloHitsXY;
0037 TH3D* hClusterESimcalib_E_eta;
0038 TH3D* hClusterSimNCells_E_eta;
0039 TH3D* hClusterESimcalib_E_phi;
0040 TH2D* hCellESim_layerX;
0041 TH2D* hCellESim_layerY;
0042 TH2D* hCellTSim_layerX;
0043 TH2D* hPosCaloSimHitsXY;
0044 TH3D* hRecClusterEcalib_E_eta;
0045 TH3D* hRecNClusters_E_eta;
0046 TH3D* hRecClusterEcalib_Ehigh_eta;
0047 TH3D* hRecClusterNCells_Ehigh_eta;
0048 TH3D* hRecFClusterEcalib_E_eta;
0049 TH3D* hRecFNClusters_E_eta;
0050 TH3D* hRecFClusterEcalib_Ehigh_eta;
0051 TH3D* hRecFClusterNCells_Ehigh_eta;
0052 TH2D* hSamplingFractionEta;
0053
0054 bool enableTree = false;
0055 TTree* event_tree;
0056 const int maxNTowers = 65000;
0057 int t_fEMC_towers_N;
0058 short* t_fEMC_towers_cellIDx;
0059 short* t_fEMC_towers_cellIDy;
0060 short* t_fEMC_towers_clusterIDA;
0061 short* t_fEMC_towers_clusterIDB;
0062 float* t_fEMC_towers_cellE;
0063 float* t_fEMC_towers_cellT;
0064 int* t_fEMC_towers_cellTrueID;
0065
0066 bool enableTreeCluster = false;
0067 TTree* cluster_tree;
0068 const int maxNCluster = 50;
0069 const int maxNMC = 50;
0070 int t_mc_N;
0071 float* t_mc_E;
0072 float* t_mc_Phi;
0073 float* t_mc_Eta;
0074 int t_fEMC_clusters_N;
0075 float* t_fEMC_cluster_E;
0076 int* t_fEMC_cluster_NCells;
0077 float* t_fEMC_cluster_Phi;
0078 float* t_fEMC_cluster_Eta;
0079
0080 int nEventsWithCaloHits = 0;
0081 std::shared_ptr<spdlog::logger> m_log;
0082 dd4hep::DDSegmentation::BitFieldCoder* m_decoder;
0083 std::string nameSimHits = "EcalEndcapPHits";
0084 std::string nameRecHits = "EcalEndcapPRecHits";
0085 std::string nameClusters = "EcalEndcapPClusters";
0086 std::string nameProtoClusters = "EcalEndcapPIslandProtoClusters";
0087 short iLx;
0088 short iLy;
0089 };