Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JetValidation.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file JetValidation.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef JETVALIDATION_H
4 #define JETVALIDATION_H
5 
6 #include <fun4all/SubsysReco.h>
7 #include <jetbase/Jetv1.h>
8 #include <jetbase/Jetv2.h>
9 #include <fastjet/PseudoJet.hh>
10 
11 #include <string>
12 #include <vector>
13 
14 #include <TFile.h>
15 #include <TH1F.h>
16 #include <TH2D.h>
17 
18 
19 class PHCompositeNode;
20 class TTree;
21 
22 class JetValidation : public SubsysReco
23 {
24  public:
25 
26  JetValidation(const std::string &recojetname = "AntiKt_Tower_r04",
27  const std::string &truthjetname = "AntiKt_Truth_r04",
28  const std::string &outputfilename = "myjetanalysis.root");
29 
30  ~JetValidation() override;
31 
32  void
33  setEtaRange(double low, double high)
34  {
35  m_etaRange.first = low;
36  m_etaRange.second = high;
37  }
38  void
39  setPtRange(double low, double high)
40  {
41  m_ptRange.first = low;
42  m_ptRange.second = high;
43  }
44  void
45  doTruth(int flag)
46  {
47  m_doTruthJets = flag;
48  }
49  void
50  doSeeds(int flag)
51  {
52  m_doSeeds = flag;
53  }
54  void
55  doUnsub(int flag)
56  {
57  m_doUnsubJet = flag;
58  }
64  int Init(PHCompositeNode *topNode) override;
65 
71  int InitRun(PHCompositeNode *topNode) override;
72 
76  int process_event(PHCompositeNode *topNode) override;
77 
79  int ResetEvent(PHCompositeNode *topNode) override;
80 
82  int EndRun(const int runnumber) override;
83 
85  int End(PHCompositeNode *topNode) override;
86 
88  int Reset(PHCompositeNode * /*topNode*/) override;
89 
90  void Print(const std::string &what = "ALL") const override;
91 
92  private:
96  std::pair<double, double> m_etaRange;
97  std::pair<double, double> m_ptRange;
99  int m_doSeeds;
101 
103  TTree *m_T;
104 
106  int m_event;
108  int m_nJet;
109  float m_totalCalo;
112  float m_zvtx;
113 
115  std::vector<int> m_id;
116  std::vector<int> m_nComponent;
117  std::vector<float> m_eta;
118  std::vector<float> m_phi;
119  std::vector<float> m_e;
120  std::vector<float> m_pt;
121 
123  std::vector<float> m_unsub_pt;
124  std::vector<float> m_sub_et;
125 
127  std::vector<int> m_truthID;
128  std::vector<int> m_truthNComponent;
129  std::vector<float> m_truthEta;
130  std::vector<float> m_truthPhi;
131  std::vector<float> m_truthE;
132  std::vector<float> m_truthPt;
133  std::vector<float> m_truthdR;
134 
136  std::vector<float> m_eta_rawseed;
137  std::vector<float> m_phi_rawseed;
138  std::vector<float> m_pt_rawseed;
139  std::vector<float> m_e_rawseed;
140  std::vector<int> m_rawseed_cut;
141  std::vector<float> m_eta_subseed;
142  std::vector<float> m_phi_subseed;
143  std::vector<float> m_pt_subseed;
144  std::vector<float> m_e_subseed;
145  std::vector<int> m_subseed_cut;
146 };
147 
148 #endif // JETVALIDATION_H