Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pi0EtaByEta.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pi0EtaByEta.h
1 #ifndef CALOANA_H__
2 #define CALOANA_H__
3 
4 #include <fun4all/SubsysReco.h>
5 
6 #include <array>
7 #include <string> // for string
8 #include <utility> // for pair
9 #include <vector>
10 
11 // Forward declarations
13 class PHCompositeNode;
14 class TFile;
15 class TNtuple;
16 class TTree;
17 class TH2;
18 class TH1;
19 class TF1;
20 class TProfile2D;
21 
22 class pi0EtaByEta : public SubsysReco
23 {
24  public:
26  pi0EtaByEta(const std::string& name = "pi0EtaByEta", const std::string& fname = "MyNtuple.root");
27 
29  virtual ~pi0EtaByEta();
30 
32  int Init(PHCompositeNode*);
33 
36 
38  int End(PHCompositeNode*);
39 
44 
45  void Detector(const std::string& name) { detector = name; }
46  void set_timing_cut_width(const int t) { _range = t; }
47  void set_vertex_cut(const float v) { _vz = v; }
48  void apply_vertex_cut(bool Vtx_cut) { m_vtxCut = Vtx_cut; }
49 
50  TF1* fitHistogram(TH1* h);
51  void fitEtaSlices(const std::string& infile, const std::string& outfile, const std::string& cdbFile);
52 
53  protected:
54  int Getpeaktime(TH1* h);
57 
58  std::vector<float> m_energy;
59  std::vector<int> m_etabin;
60  std::vector<int> m_phibin;
61  std::vector<int> m_time;
62 
63  std::vector<float> m_hcalin_energy;
64  std::vector<int> m_hcalin_etabin;
65  std::vector<int> m_hcalin_phibin;
66  std::vector<int> m_hcalin_time;
67 
68  std::vector<float> m_hcalout_energy;
69  std::vector<int> m_hcalout_etabin;
70  std::vector<int> m_hcalout_phibin;
71  std::vector<int> m_hcalout_time;
72 
73  std::vector<float> m_zdc_energy;
74  std::vector<int> m_zdc_index;
75  std::vector<int> m_zdc_side;
76 
77  std::vector<float> m_bbc_energy;
78  std::vector<int> m_bbc_type;
79  std::vector<int> m_bbc_side;
80 
81  std::array<TH1*, 96> h_mass_eta_lt{};
82 
83  int _eventcounter{0};
84  int _range{1};
85 
86  float _vz{0.};
87  float target_pi0_mass{0.152};
88 
89  bool m_vtxCut{false};
90  bool dynMaskClus{false};
91 
93  TFile* outfile{nullptr};
94  TH2* h_emcal_mbd_correlation{nullptr};
95  TH2* h_ohcal_mbd_correlation{nullptr};
96  TH2* h_ihcal_mbd_correlation{nullptr};
97  TH2* h_emcal_hcal_correlation{nullptr};
98  TH2* h_emcal_zdc_correlation{nullptr};
99 
100  TH1* h_InvMass{nullptr};
101  TH1* h_InvMassMix{nullptr};
102 
103  TH2* h_cemc_etaphi{nullptr};
104  TH2* h_hcalin_etaphi{nullptr};
105  TH2* h_hcalout_etaphi{nullptr};
106  TH2* h_cemc_etaphi_wQA{nullptr};
107  TH2* h_hcalin_etaphi_wQA{nullptr};
108  TH2* h_hcalout_etaphi_wQA{nullptr};
109  TH1* h_totalzdc_e{nullptr};
110 
111  TProfile2D* h_cemc_etaphi_time{nullptr};
112  TProfile2D* h_hcalin_etaphi_time{nullptr};
113  TProfile2D* h_hcalout_etaphi_time{nullptr};
114 
115  TProfile2D* h_cemc_etaphi_badChi2{nullptr};
116  TProfile2D* h_hcalin_etaphi_badChi2{nullptr};
117  TProfile2D* h_hcalout_etaphi_badChi2{nullptr};
118 
119  TH1* hzdctime{nullptr};
120  TH1* hmbdtime{nullptr};
121  TH1* hemcaltime{nullptr};
122  TH1* hihcaltime{nullptr};
123  TH1* hohcaltime{nullptr};
124 
125  TH1* hzdctime_cut{nullptr};
126  TH1* hmbdtime_cut{nullptr};
127  TH1* hemcaltime_cut{nullptr};
128  TH1* hihcaltime_cut{nullptr};
129  TH1* hohcaltime_cut{nullptr};
130 
131  TH1* hvtx_z_raw{nullptr};
132  TH1* hvtx_z_cut{nullptr};
133 
134  TH1* hzdcSouthraw{nullptr};
135  TH1* hzdcNorthraw{nullptr};
136  TH1* hzdcSouthcalib{nullptr};
137  TH1* hzdcNorthcalib{nullptr};
138 
139  TH1* h_clusE{nullptr};
140  TH2* h_etaphi_clus{nullptr};
141 
142  TNtuple* g4hitntuple{nullptr};
143  TNtuple* g4cellntuple{nullptr};
144  TTree* towerntuple{nullptr};
145  TNtuple* clusterntuple{nullptr};
146 
147  TH1* h_pt1{nullptr};
148  TH1* h_pt2{nullptr};
149  TH1* h_nclusters{nullptr};
150  TH1* h_emcal_e_eta{nullptr};
151 };
152 
153 #endif