-
Notifications
You must be signed in to change notification settings - Fork 0
/
CaloAna.h
182 lines (153 loc) · 4.22 KB
/
CaloAna.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
#ifndef CALOANA_H__
#define CALOANA_H__
#include <fun4all/SubsysReco.h>
#include <vector>
// Forward declarations
class Fun4AllHistoManager;
class PHCompositeNode;
class TFile;
class TNtuple;
class TTree;
class TH2F;
class TH1F;
class TH1;
class TH3;
class TF1;
class TProfile2D;
class TProfile;
class TLorentzVector;
class TRandom3;
class CaloAna : public SubsysReco
{
public:
//! constructor
CaloAna(const std::string &name = "CaloAna", const std::string &fname = "MyNtuple.root");
//! destructor
virtual ~CaloAna();
//! full initialization
int Init(PHCompositeNode *);
//! event processing method
int process_event(PHCompositeNode *);
//! end of run method
int End(PHCompositeNode *);
int process_g4hits(PHCompositeNode *);
int process_g4cells(PHCompositeNode *);
int process_towers(PHCompositeNode *);
int process_clusters(PHCompositeNode *);
void Detector(const std::string &name) { detector = name; }
void set_timing_cut_width(const int &t) { _range = t;}
void set_vertex_cut(const float &v) { _vz = v;}
void apply_vertex_cut(bool Vtx_cut) { m_vtxCut = Vtx_cut; }
float getWeight(int ieta, float pt);
TF1* fitHistogram(TH1* h);
void fitEtaSlices(const std::string& infile, const std::string& fitOutFile, const std::string& cdbFile);
protected:
std::string detector;
std::string outfilename;
int Getpeaktime(TH1 *h);
Fun4AllHistoManager *hm = nullptr;
TFile *outfile = nullptr;
TH2F* h_emcal_mbd_correlation = nullptr;
TH2F* h_ohcal_mbd_correlation = nullptr;
TH2F* h_ihcal_mbd_correlation = nullptr;
TH2F* h_emcal_hcal_correlation = nullptr;
TH2F* h_emcal_zdc_correlation = nullptr;
TH2F* h_clusE_nTow{nullptr};
TH1F* h_InvMass = nullptr;
TH1F* h_InvMass_w = nullptr;
TH1F* h_InvMassMix = nullptr;
TH2F* h_cemc_etaphi = nullptr;
TH2F* h_hcalin_etaphi = nullptr;
TH2F* h_hcalout_etaphi = nullptr;
TH2F* h_cemc_etaphi_wQA = nullptr;
TH2F* h_hcalin_etaphi_wQA = nullptr;
TH2F* h_hcalout_etaphi_wQA = nullptr;
TH1* h_totalzdc_e;
TH1* h_delR_recTrth = nullptr;
TProfile2D* h_cemc_etaphi_time = nullptr;
TProfile2D* h_hcalin_etaphi_time = nullptr;
TProfile2D* h_hcalout_etaphi_time = nullptr;
TProfile2D* h_cemc_etaphi_badChi2 = nullptr;
TProfile2D* h_hcalin_etaphi_badChi2 = nullptr;
TProfile2D* h_hcalout_etaphi_badChi2 = nullptr;
TH1* hzdctime;
TH1* hmbdtime;
TH1* hemcaltime;
TH1* hihcaltime;
TH1* hohcaltime;
TH1* hzdctime_cut;
TH1* hmbdtime_cut;
TH1* hemcaltime_cut;
TH1* hihcaltime_cut;
TH1* hohcaltime_cut;
TH1* h_tower_e;
TH1* hvtx_z_raw;
TH1* hvtx_z_cut;
TH1* hzdcSouthraw;
TH1* hzdcNorthraw;
TH1* hzdcSouthcalib;
TH1* hzdcNorthcalib;
TH1F* h_clusE;
TH2F* h_etaphi_clus;
TNtuple *g4hitntuple = nullptr;
TNtuple *g4cellntuple = nullptr;
TTree *towerntuple = nullptr;
TNtuple *clusterntuple = nullptr;
std::vector<float> m_energy;
std::vector<int> m_etabin;
std::vector<int> m_phibin;
std::vector<int> m_time;
std::vector<float> m_hcalin_energy;
std::vector<int> m_hcalin_etabin;
std::vector<int> m_hcalin_phibin;
std::vector<int> m_hcalin_time;
std::vector<float> m_hcalout_energy;
std::vector<int> m_hcalout_etabin;
std::vector<int> m_hcalout_phibin;
std::vector<int> m_hcalout_time;
std::vector<float> m_zdc_energy;
std::vector<int> m_zdc_index;
std::vector<int> m_zdc_side;
std::vector<float> m_bbc_energy;
std::vector<int> m_bbc_type;
std::vector<int> m_bbc_side;
int _eventcounter;
int _range = 1;
float _vz = 0.;
bool m_vtxCut = false;
bool dynMaskClus = false;
bool getVtx = false;
bool debug = false;
TH1F* h_pt1;
TH1F* h_pt2;
TH1F* h_nclusters;
TH1F* h_mass_eta_lt[96];
TH1F* h_mass_eta_lt_rw[96];
TH1F* h_pt_eta[96];
TH1F* h_pt_eta_rw[96];
TH1F* h_emcal_e_eta;
TH1F* h_truth_eta;
TH1F* h_truth_e;
TH1F* h_truth_pt;
TH1F* h_pt_rw[96];
TFile* frw;
TH1* h_matched_res;
TH1* h_res_e;
TH3* h_res_e_phi;
TH3* h_res_e_eta;
TH3* h_res_e_eta_pdc;
TH1* h_res;
TH3* h_m_pt_eta;
TH3* h_m_ptTr_eta;
TH3* h_m_ptTr_eta_trKin;
TH3* h_delPhi_e_eta;
TH3* h_delEta_e_eta;
TH3* h_delPhi_e_phi;
TProfile* pr_eta_shower;
TProfile* pr_phi_shower;
TH2F* h_vert_xy;
TH1* h_truthE;
float target_pi0_mass = 0.145;
TRandom3* rnd;
};
#endif