Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EMJetVal.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EMJetVal.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef EMJETVAL_H
4 #define EMJETVAL_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 using namespace fastjet;
20 
21 class PHCompositeNode;
22 class TTree;
23 
24 class EMJetVal : public SubsysReco
25 {
26  public:
27 
28  EMJetVal(const std::string &recojetname = "AntiKt_Tower_r04",
29  const std::string &truthjetname = "AntiKt_Truth_r04",
30  const std::string &outputfilename = "myjetanalysis.root");
31 
32  std::vector<fastjet::PseudoJet> eventVector;
33 
34  int retrieveEvent(const fastjet::PseudoJet& jet);
35 
36  // int retrieveEvent(vector<PseudoJet>& event);
37 
38  ~EMJetVal() override;
39 
40  void
41  setEtaRange(double low, double high)
42  {
43  m_etaRange.first = low;
44  m_etaRange.second = high;
45  }
46  void
47  setPtRange(double low, double high)
48  {
49  m_ptRange.first = low;
50  m_ptRange.second = high;
51  }
52  void
53  doTruth(int flag)
54  {
55  m_doTruthJets = flag;
56  }
57  void
58  doSeeds(int flag)
59  {
60  m_doSeeds = flag;
61  }
62  void
63  doUnsub(int flag)
64  {
65  m_doUnsubJet = flag;
66  }
72  int Init(PHCompositeNode *topNode) override;
73 
79  int InitRun(PHCompositeNode *topNode) override;
80 
84  int process_event(PHCompositeNode *topNode) override;
85 
87  int ResetEvent(PHCompositeNode *topNode) override;
88 
90  int EndRun(const int runnumber) override;
91 
93  int End(PHCompositeNode *topNode) override;
94 
96  int Reset(PHCompositeNode * /*topNode*/) override;
97 
98  void Print(const std::string &what = "ALL") const override;
99 
100  private:
104  std::pair<double, double> m_etaRange;
105  std::pair<double, double> m_ptRange;
109 
111  TTree *m_T;
112  TFile* outFile;
117  TH1F *_hmult_R04;
118  //softDrop multiplicity hists
120  TH1F *_hjetpT_R04;
122  //correlation figures
125 
126 
128  int m_event;
130  int m_nJet;
131  float m_totalCalo;
134 
136  std::vector<int> m_id;
137  std::vector<int> m_nComponent;
138  std::vector<float> m_eta;
139  std::vector<float> m_phi;
140  std::vector<float> m_e;
141  std::vector<float> m_pt;
142 
144  std::vector<float> m_unsub_pt;
145  std::vector<float> m_sub_et;
146 
148  std::vector<int> m_truthID;
149  std::vector<int> m_truthNComponent;
150  std::vector<float> m_truthEta;
151  std::vector<float> m_truthPhi;
152  std::vector<float> m_truthE;
153  std::vector<float> m_truthPt;
154  std::vector<float> m_truthdR;
155 
157  std::vector<float> m_eta_rawseed;
158  std::vector<float> m_phi_rawseed;
159  std::vector<float> m_pt_rawseed;
160  std::vector<float> m_e_rawseed;
161  std::vector<int> m_rawseed_cut;
162  std::vector<float> m_eta_subseed;
163  std::vector<float> m_phi_subseed;
164  std::vector<float> m_pt_subseed;
165  std::vector<float> m_e_subseed;
166  std::vector<int> m_subseed_cut;
167 };
168 
169 #endif // EMJETVAL_H