Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CaloAna.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CaloAna.h
1 #ifndef CALOANA_H__
2 #define CALOANA_H__
3 
4 #include <fun4all/SubsysReco.h>
5 #include <vector>
6 // Forward declarations
8 class PHCompositeNode;
9 class TFile;
10 class TNtuple;
11 class TTree;
12 class TH2F;
13 class TH1F;
14 class TH1;
15 class TProfile2D;
16 
17 class CaloAna : public SubsysReco
18 {
19  public:
21  CaloAna(const std::string &name = "CaloAna", const std::string &fname = "MyNtuple.root");
22 
24  virtual ~CaloAna();
25 
27  int Init(PHCompositeNode *);
28 
31 
33  int End(PHCompositeNode *);
34 
39 
40 
41  void Detector(const std::string &name) { detector = name; }
42  void set_timing_cut_width(const int &t) { _range = t;}
43  void set_vertex_cut(const float &v) { _vz = v;}
44  void apply_vertex_cut(bool Vtx_cut) { m_vtxCut = Vtx_cut; }
45 
46  protected:
49  int Getpeaktime(TH1 *h);
50  Fun4AllHistoManager *hm = nullptr;
51  TFile *outfile = nullptr;
52  TH2F* h_emcal_mbd_correlation = nullptr;
53  TH2F* h_ohcal_mbd_correlation = nullptr;
54  TH2F* h_ihcal_mbd_correlation = nullptr;
55  TH2F* h_emcal_hcal_correlation = nullptr;
56  TH2F* h_emcal_zdc_correlation = nullptr;
57 
58  TH1F* h_InvMass = nullptr;
59 
60  TH2F* h_cemc_etaphi = nullptr;
61  TH2F* h_hcalin_etaphi = nullptr;
62  TH2F* h_hcalout_etaphi = nullptr;
63  TH2F* h_cemc_etaphi_wQA = nullptr;
64  TH2F* h_hcalin_etaphi_wQA = nullptr;
65  TH2F* h_hcalout_etaphi_wQA = nullptr;
67 
68  TProfile2D* h_cemc_etaphi_time = nullptr;
69  TProfile2D* h_hcalin_etaphi_time = nullptr;
70  TProfile2D* h_hcalout_etaphi_time = nullptr;
71 
72  TH2F* h_cemc_e_chi2 = nullptr;
73  TH2F* h_ohcal_e_chi2 = nullptr;
74  TH2F* h_ihcal_e_chi2 = nullptr;
75 
76  TProfile2D* h_cemc_etaphi_badChi2 = nullptr;
77  TProfile2D* h_hcalin_etaphi_badChi2 = nullptr;
78  TProfile2D* h_hcalout_etaphi_badChi2 = nullptr;
79 
80  TH1* hzdctime;
81  TH1* hmbdtime;
82  TH1* hemcaltime;
83  TH1* hihcaltime;
84  TH1* hohcaltime;
85 
91 
92  TH1* hvtx_z_raw;
93  TH1* hvtx_z_cut;
94 
99 
100  TH1F* h_clusE;
102 
103  TNtuple *g4hitntuple = nullptr;
104  TNtuple *g4cellntuple = nullptr;
105  TTree *towerntuple = nullptr;
106  TNtuple *clusterntuple = nullptr;
107  std::vector<float> m_energy;
108  std::vector<int> m_etabin;
109  std::vector<int> m_phibin;
110  std::vector<int> m_time;
111 
112  std::vector<float> m_hcalin_energy;
113  std::vector<int> m_hcalin_etabin;
114  std::vector<int> m_hcalin_phibin;
115  std::vector<int> m_hcalin_time;
116 
117  std::vector<float> m_hcalout_energy;
118  std::vector<int> m_hcalout_etabin;
119  std::vector<int> m_hcalout_phibin;
120  std::vector<int> m_hcalout_time;
121 
122 
123  std::vector<float> m_zdc_energy;
124  std::vector<int> m_zdc_index;
125  std::vector<int> m_zdc_side;
126 
127 
128  std::vector<float> m_bbc_energy;
129  std::vector<int> m_bbc_type;
130  std::vector<int> m_bbc_side;
132  int _range = 1;
133  float _vz = 0.;
134  bool m_vtxCut = false;
135  bool dynMaskClus = true;
136 };
137 
138 #endif