ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QAG4SimulationJet.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file QAG4SimulationJet.h
1 #ifndef QA_QAG4SIMULATIONJET_H
2 #define QA_QAG4SIMULATIONJET_H
3 
4 #include <fun4all/SubsysReco.h>
5 
6 #include <TString.h>
7 
8 #include <cstdint>
9 #include <map>
10 #include <memory>
11 #include <set>
12 #include <string>
13 #include <utility> // std::pair, std::make_pair
14 
15 class JetEvalStack;
16 class JetTruthEval;
17 class Jet;
18 class PHCompositeNode;
19 
22 {
23  public:
24  enum enu_flags
25  {
28 
31 
34 
37  };
38 
39  QAG4SimulationJet(const std::string &truth_jet, enu_flags flags =
40  kDefaultFlag);
41  virtual ~QAG4SimulationJet() {}
42 
45  int add_reco_jet(const std::string &reco_jet)
46  {
47  _reco_jets.insert(reco_jet);
48  return _reco_jets.size();
49  }
50 
51  uint32_t
52  get_flags() const
53  {
54  return _flags;
55  }
56 
57  void
59  {
60  _flags = (uint32_t) flags;
61  }
62 
63  void
65  {
66  _flags |= (uint32_t) flag;
67  }
68 
69  bool
71  {
72  return _flags & flag;
73  }
74 
75  void
77  {
78  _flags &= ~(uint32_t) flag;
79  }
80 
82  double
84  {
85  return _jet_match_dE_Ratio;
86  }
87 
89  void
90  set_jet_match_dE_Ratio(double jetMatchDERatio)
91  {
92  _jet_match_dE_Ratio = jetMatchDERatio;
93  }
94 
96  double
98  {
99  return _jet_match_dEta;
100  }
101 
103  void
104  set_jet_match_dEta(double jetMatchDEta)
105  {
106  _jet_match_dEta = jetMatchDEta;
107  }
108 
110  double
112  {
113  return _jet_match_dPhi;
114  }
115 
117  void
118  set_jet_match_dPhi(double jetMatchDPhi)
119  {
120  _jet_match_dPhi = jetMatchDPhi;
121  }
122 
124  void
125  set_eta_range(double low, double high);
126 
127  int Init(PHCompositeNode *topNode);
128  int InitRun(PHCompositeNode *topNode);
129  int process_event(PHCompositeNode *topNode);
130 
131  private:
132  int Init_Spectrum(PHCompositeNode *topNode, const std::string &jet_name);
133  int process_Spectrum(PHCompositeNode *topNode, const std::string &jet_name, const bool is_reco_jet);
134 
135  int Init_TruthMatching(PHCompositeNode *topNode, const std::string &reco_jet_name);
137  const std::string &reco_jet_name);
138 
140  std::string
141  get_histo_prefix(const std::string &src_jet_name = "",
142  const std::string &reco_jet_name = "");
143 
145  typedef std::map<std::string, std::shared_ptr<JetEvalStack>> jetevalstacks_map;
147  std::shared_ptr<JetTruthEval> _jettrutheval;
148 
150  std::string _truth_jet;
151 
153  std::set<std::string> _reco_jets;
154 
155  uint32_t _flags;
156 
158  std::pair<double, double> eta_range;
159 
162  TString
163  get_eta_range_str(const char *eta_name = "#eta_{Jet}") const;
164 
166  bool
167  jet_acceptance_cut(const Jet *jet) const;
168 
171 
174 
177 };
178 
179 #endif // QA_QAG4SIMULATIONJET_H