File indexing completed on 2025-08-06 08:18:44
0001
0002
0003
0004 #ifndef QA_JET_STRUCTUREINJETS_H
0005 #define QA_JET_STRUCTUREINJETS_H
0006
0007 #include "JetQADefs.h"
0008
0009 #include <fun4all/SubsysReco.h>
0010
0011 #include <string>
0012 #include <utility>
0013
0014 class Fun4AllHistoManager;
0015 class PHCompositeNode;
0016 class TH1;
0017 class TH2;
0018 class TH3;
0019 class TriggerAnalyzer;
0020
0021 class StructureinJets : public SubsysReco
0022 {
0023 public:
0024 StructureinJets(const std::string& moduleName = "StructureInJets",
0025 const std::string& recojetname = "AntiKt_Tower_r04_Sub1",
0026 const std::string& trkNodeName = "SvtxTrackMap",
0027 const std::string& histTag = "AllTrig_AntiKt_Tower_r04",
0028 const std::string& outputfilename = "tracksinjets.root");
0029
0030 ~StructureinJets() override;
0031
0032
0033
0034
0035
0036
0037 int Init(PHCompositeNode *topNode) override;
0038
0039
0040
0041
0042
0043
0044 int InitRun(PHCompositeNode *topNode) override;
0045
0046
0047
0048
0049 int process_event(PHCompositeNode *topNode) override;
0050
0051
0052 int ResetEvent(PHCompositeNode *topNode) override;
0053
0054
0055 int EndRun(const int runnumber) override;
0056
0057
0058 int End(PHCompositeNode *topNode) override;
0059
0060
0061 int Reset(PHCompositeNode * ) override;
0062
0063 void Print(const std::string &what = "ALL") const override;
0064
0065 bool isAA() const { return m_isAAFlag; }
0066 void isAA(bool b) { m_isAAFlag = b; }
0067
0068 bool writeToOutputFile() const { return m_writeToOutputFileFlag; }
0069 void writeToOutputFile(bool b) { m_writeToOutputFileFlag = b; }
0070
0071
0072 void setRecoJetNodeName(const std::string &name)
0073 {
0074 m_recoJetName = name;
0075 }
0076
0077
0078 void setTrkNodeName(const std::string &name)
0079 {
0080 m_trkNodeName = name;
0081 }
0082
0083
0084 void setOutputFileName(const std::string &name)
0085 {
0086 m_outputFileName = name;
0087 }
0088
0089
0090 void setHistTag(const std::string &tag)
0091 {
0092 m_histTag = tag;
0093 }
0094
0095
0096 void setTrgToSelect(const uint32_t trig = JetQADefs::GL1::MBDNSJet1)
0097 {
0098 m_doTrgSelect = true;
0099 m_trgToSelect = trig;
0100 }
0101
0102
0103 void setTrkPtCut(const float cut)
0104 {
0105 m_trk_pt_cut = cut;
0106 }
0107
0108
0109 void setTrkQualityCut(const float cut)
0110 {
0111 m_trk_qual_cut = cut;
0112 }
0113
0114
0115 void setTrkNSilCut(const int cut)
0116 {
0117 m_trk_nsil_cut = cut;
0118 }
0119
0120
0121 void setTrkNTPCCut(const int cut)
0122 {
0123 m_trk_ntpc_cut = cut;
0124 }
0125
0126
0127 void setJetRadius(const float radius)
0128 {
0129 m_jetRadius = radius;
0130 }
0131
0132
0133 void setJetPtRange(const double low, const double high)
0134 {
0135 m_ptJetRange.first = low;
0136 m_ptJetRange.second = high;
0137 }
0138
0139
0140 void setJetEtaRange(const double low, const double high)
0141 {
0142 m_etaJetRange.first = low;
0143 m_etaJetRange.second = high;
0144 }
0145
0146 private:
0147
0148
0149 std::string m_moduleName;
0150 std::string m_recoJetName;
0151 std::string m_trkNodeName;
0152 std::string m_histTag;
0153 std::string m_outputFileName;
0154
0155
0156 float m_trk_pt_cut{0.1};
0157 float m_trk_qual_cut{6.0};
0158 int m_trk_nsil_cut{4};
0159 int m_trk_ntpc_cut{25};
0160 float m_jetRadius{0.4};
0161
0162
0163 std::pair<double, double> m_etaJetRange{-1.1, 1.1};
0164 std::pair<double, double> m_ptJetRange{1.0, 1000.0};
0165
0166
0167 bool m_isAAFlag{false};
0168 bool m_writeToOutputFileFlag{false};
0169 bool m_doTrgSelect{false};
0170
0171
0172 uint32_t m_trgToSelect{JetQADefs::GL1::MBDNSJet1};
0173
0174
0175 TH3 *m_hSumTrkVsJetPtVsCent{nullptr};
0176 TH2 *m_hSumTrkVsJetPt{nullptr};
0177 TH1 *m_hSumTrkOverJetPt{nullptr};
0178 TH1 *m_hSumTrkPt{nullptr};
0179
0180
0181 Fun4AllHistoManager *m_manager{nullptr};
0182 TriggerAnalyzer *m_analyzer{nullptr};
0183 };
0184
0185 #endif