File indexing completed on 2025-08-06 08:18:42
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef CLUSTERSTATUSMAPPER_H
0012 #define CLUSTERSTATUSMAPPER_H
0013
0014
0015 #include "jetqa/JetQADefs.h"
0016
0017
0018 #include "CaloStatusMapperDefs.h"
0019
0020
0021 #include <calobase/TowerInfoContainer.h>
0022
0023
0024 #include <fun4all/SubsysReco.h>
0025
0026
0027 #include <map>
0028 #include <string>
0029 #include <vector>
0030
0031
0032 class PHCompositeNode;
0033 class Fun4AllHistoManager;
0034 class TH1;
0035 class TriggerAnalyzer;
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045 class CaloStatusMapper : public SubsysReco
0046 {
0047
0048 public:
0049
0050
0051
0052
0053 struct Config
0054 {
0055
0056
0057 bool debug {true};
0058
0059
0060 bool doNorm {false};
0061
0062
0063 bool doOptHist {false};
0064
0065
0066 std::string moduleName {"CaloStatusMapper"};
0067
0068
0069 std::string histTag {""};
0070
0071
0072 std::vector<CaloStatusMapperDefs::NodeDef> inNodeNames
0073 {
0074 {"TOWERINFO_CALIB_CEMC", CaloStatusMapperDefs::Calo::EMCal},
0075 {"TOWERINFO_CALIB_HCALIN", CaloStatusMapperDefs::Calo::HCal},
0076 {"TOWERINFO_CALIB_HCALOUT", CaloStatusMapperDefs::Calo::HCal}
0077 };
0078
0079
0080 bool doTrgSelect {false};
0081
0082
0083 uint32_t trgToSelect {JetQADefs::GL1::MBDNSJet1};
0084
0085 };
0086
0087
0088 CaloStatusMapper(const std::string& modulename = "CaloStatusMapper", const bool debug = false);
0089 CaloStatusMapper(const Config& config);
0090 ~CaloStatusMapper() override;
0091
0092
0093 void SetConfig(const Config& config) {m_config = config;}
0094
0095
0096 const Config& GetConfig() {return m_config;}
0097
0098
0099 int Init(PHCompositeNode* ) override;
0100 int process_event(PHCompositeNode* topNode) override;
0101 int End(PHCompositeNode* ) override;
0102
0103 private:
0104
0105
0106 void InitHistManager();
0107 void BuildHistograms();
0108 void GrabNodes(PHCompositeNode* topNode);
0109 std::string MakeBaseName(const std::string& base, const std::string& node, const std::string& stat = "") const;
0110
0111
0112 Config m_config;
0113
0114
0115 Fun4AllHistoManager* m_manager {nullptr};
0116
0117
0118 TriggerAnalyzer* m_analyzer {nullptr};
0119
0120
0121 std::map<std::string, TH1*> m_hists;
0122
0123
0124 std::vector<TowerInfoContainer*> m_inNodes;
0125
0126
0127 uint64_t m_nEvent {0};
0128
0129 };
0130
0131 #endif
0132
0133