Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JetNconstituents.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file JetNconstituents.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef JETNCONSTITUENTS_H
4 #define JETNCONSTITUENTS_H
5 
6 #include <fun4all/SubsysReco.h>
7 #include <jetbase/Jetv1.h>
8 #include <TH2D.h>
9 #include <TH1D.h>
10 
11 #include <string>
12 #include <vector>
13 
14 class TH1;
15 class TH2;
16 class PHCompositeNode;
17 
18 
20 {
21  public:
22 
23  JetNconstituents(const std::string &recojetname = "AntiKt_Tower_r04",
24  const std::string &outputfilename = "JetNconstituents.root");
25 
26  ~JetNconstituents() override;
27 
28  void setEtaRange(double low, double high)
29  {
30  m_etaRange.first = low;
31  m_etaRange.second = high;
32  }
33  void setPtRange(double low, double high)
34  {
35  m_ptRange.first = low;
36  m_ptRange.second = high;
37  }
43  int Init(PHCompositeNode *topNode) override;
44 
50  int InitRun(PHCompositeNode *topNode) override;
51 
55  int process_event(PHCompositeNode *topNode) override;
56 
58  int ResetEvent(PHCompositeNode *topNode) override;
59 
61  int EndRun(const int runnumber) override;
62 
64  int End(PHCompositeNode *topNode) override;
65 
67  int Reset(PHCompositeNode * /*topNode*/) override;
68 
69  void Print(const std::string &what = "ALL") const override;
70 
71  private:
75  std::pair<double, double> m_etaRange;
76  std::pair<double, double> m_ptRange;
78 
79  TH1 * h1d_nConsituents = nullptr;
80  TH1 * h1d_nConsituents_IHCal = nullptr;
81  TH1 * h1d_nConsituents_OHCal = nullptr;
82  TH1 * h1d_nConsituents_EMCal = nullptr;
83  TH1 * h1d_FracEnergy_EMCal = nullptr;
84  TH1 * h1d_FracEnergy_IHCal = nullptr;
85  TH1 * h1d_FracEnergy_OHCal = nullptr;
86 
87 
88  TH2 * h2d_FracEnergy_vs_CaloLayer = nullptr;
90 
91 };
92 
93 #endif // JETNCONSTITUENTS_H