3 TH1F * fhE ; //! E distribution, Reco
4 TH1F * fhPt ; //! pT distribution, Reco
5 TH1F * fhPhi; //! phi distribution, Reco
6 TH1F * fhEta; //! eta distribution, Reco
7 TH2F * fhEtaPhi ; //! eta vs phi, Reco
8 TH3F * fhEtaPhiE ; //! eta vs phi vs E, Reco
9 TH1F * fhECharged ; //! E distribution, Reco, matched with track
10 TH1F * fhPtCharged ; //! pT distribution, Reco, matched with track
11 TH1F * fhPhiCharged; //! phi distribution, Reco, matched with track
12 TH1F * fhEtaCharged; //! eta distribution, Reco, matched with track
13 TH2F * fhEtaPhiCharged ; //! eta vs phi, Reco, matched with track
14 TH1F * fhEChargedNoOut ; //! E distribution, Reco, matched with track, no outer param
15 TH1F * fhPtChargedNoOut ; //! pT distribution, Reco, matched with track, no outer param
16 TH1F * fhPhiChargedNoOut; //! phi distribution, Reco, matched with track, no outer param
17 TH1F * fhEtaChargedNoOut; //! eta distribution, Reco, matched with track, no outer param
18 TH2F * fhEtaPhiChargedNoOut ; //! eta vs phi, Reco, matched with track, no outer param
19 TH1F * fhDeltaE ; //! MC-Reco E distribution
20 TH1F * fhDeltaPt ; //! MC-Reco pT distribution
21 TH1F * fhDeltaPhi; //! MC-Reco phi distribution
22 TH1F * fhDeltaEta; //! MC-Reco eta distribution
23 TH1F * fhRatioE ; //! Reco/MC E distribution
24 TH1F * fhRatioPt ; //! Reco/MC pT distribution
25 TH1F * fhRatioPhi; //! Reco/MC phi distribution
26 TH1F * fhRatioEta; //! Reco/MC eta distribution
27 TH2F * fh2E ; //! E distribution, Reco vs MC
28 TH2F * fh2Pt ; //! pT distribution, Reco vs MC
29 TH2F * fh2Phi; //! phi distribution, Reco vs MC
30 TH2F * fh2Eta; //! eta distribution, Reco vs MC
31 TH2F * fhIM; //! cluster pairs invariant mass
32 TH2F * fhIMCellCut; //! cluster pairs invariant mass, n cells > 1 per cluster
33 TH2F * fhAsym; //! cluster pairs invariant mass
34 TH2F * fhNCellsPerCluster; //! N cells per cluster
35 TH1F * fhNClusters; //! Number of clusters
38 TH1F * fhNCells; //! Number of towers/crystals with signal
39 TH1F * fhAmplitude; //! Amplitude measured in towers/crystals
40 TH1F * fhTime; //! Time measured in towers/crystals
41 TH2F * fhTimeId; //! Time vs Absolute cell Id
42 TH2F * fhTimeAmp; //! Time vs Amplitude
44 //Calorimeters Correlation
45 TH2F * fhCaloCorrNClusters; // EMCAL vs PHOS, number of clusters
46 TH2F * fhCaloCorrEClusters; // EMCAL vs PHOS, total measured cluster energy
47 TH2F * fhCaloCorrNCells; // EMCAL vs PHOS, number of cells
48 TH2F * fhCaloCorrECells; // EMCAL vs PHOS, total measured cell energy
51 TH1F ** fhEMod ; //! E distribution for different module, Reco
52 TH1F ** fhNClustersMod ; //! Number of clusters for different module, Reco
53 TH2F ** fhNCellsPerClusterMod ; //! N cells per clusters different module, Reco
54 TH1F ** fhNCellsMod ; //! Number of towers/crystals with signal different module, Reco
55 TH2F ** fhGridCellsMod ; //! Cells ordered in column/row for different module, Reco
56 TH2F ** fhGridCellsEMod ; //! Cells ordered in column/row for different module, weighted with energy, Reco
57 TH1F ** fhAmplitudeMod ; //! Amplitude measured in towers/crystals different module, Reco
58 TH2F ** fhIMMod; //! cluster pairs invariant mass, different module,
59 TH2F ** fhIMCellCutMod; //! cluster pairs invariant mass, n cells > 1 per cluster, different module
63 TH1F *fhGenGamPt ; // pt of primary gamma
64 TH1F *fhGenGamEta ; // eta of primart gamma
65 TH1F *fhGenGamPhi ; // phi of primary gamma
66 TH1F *fhGenPi0Pt ; // pt of primary pi0
67 TH1F *fhGenPi0Eta ; // eta of primart pi0
68 TH1F *fhGenPi0Phi ; // phi of primary pi0
69 TH1F *fhGenEtaPt ; // pt of primary eta
70 TH1F *fhGenEtaEta ; // eta of primart eta
71 TH1F *fhGenEtaPhi ; // phi of primary eta
72 TH1F *fhGenOmegaPt ; // pt of primary omega
73 TH1F *fhGenOmegaEta ; // eta of primart omega
74 TH1F *fhGenOmegaPhi ; // phi of primary omega
75 TH1F *fhGenElePt ; // pt of primary electron
76 TH1F *fhGenEleEta ; // eta of primart electron
77 TH1F *fhGenElePhi ; // phi of primary electron
79 //TH3F * fhEMVxyz ; // Electromagnetic particle production vertex
80 TH2F * fhEMVxyz ; // Electromagnetic particle production vertex
81 TH2F * fhEMR ; // Electromagnetic distance to vertex vs rec energy
82 //TH3F * fhHaVxyz ; // Hadron production vertex
83 TH2F * fhHaVxyz ; // Hadron production vertex
84 TH2F * fhHaR ; // Hadron distance to vertex vs rec energy
86 TH2F * fhGamE ; //! E distribution of generated photons, Reco
87 TH2F * fhGamPt ; //! pT distribution of generated photons, Reco
88 TH2F * fhGamPhi; //! phi distribution of generated photon, Reco
89 TH2F * fhGamEta; //! eta distribution of generated photons, Reco
90 TH1F * fhGamDeltaE ; //! MC-Reco E distribution of generated photons
91 TH1F * fhGamDeltaPt ; //! MC-Reco pT distribution of generated photons
92 TH1F * fhGamDeltaPhi; //! MC-Reco phi distribution of generated photons
93 TH1F * fhGamDeltaEta; //! MC-Reco eta distribution of generated photons
94 TH1F * fhGamRatioE ; //! Reco/MC E distribution of generated photons
95 TH1F * fhGamRatioPt ; //! Reco/MC pT distribution of generated photons
96 TH1F * fhGamRatioPhi; //! Reco/MC phi distribution of generated photons
97 TH1F * fhGamRatioEta; //! Reco/MC eta distribution of generated photons
98 TH2F * fhEleE ; //! E distribution of generated electrons, Reco
99 TH2F * fhElePt ; //! pT distribution of generated electrons, Reco
100 TH2F * fhElePhi; //! phi distribution of generated electron, Reco
101 TH2F * fhEleEta; //! eta distribution of generated electrons, Reco
102 TH2F * fhPi0E ; //! E distribution of generated pi0, Reco, gamma decay overlapped
103 TH2F * fhPi0Pt ; //! pT distribution of generated pi0, Reco, gamma decay overlapped
104 TH2F * fhPi0Phi; //! phi distribution of generated pi0, Reco, gamma decay overlapped
105 TH2F * fhPi0Eta; //! eta distribution of generated pi0, Reco, gamma decay overlapped
106 TH2F * fhNeHadE ; //! E distribution of generated neutral hadron, Reco
107 TH2F * fhNeHadPt ; //! pT distribution of generated neutral hadron, Reco
108 TH2F * fhNeHadPhi; //! phi distribution of generated neutral hadron, Reco
109 TH2F * fhNeHadEta; //! eta distribution of generated neutral hadron, Reco
110 TH2F * fhChHadE ; //! E distribution of generated charged hadron, Reco
111 TH2F * fhChHadPt ; //! pT distribution of generated charged hadron, Reco
112 TH2F * fhChHadPhi; //! phi distribution of generated charged hadron, Reco
113 TH2F * fhChHadEta; //! eta distribution of generated charged hadron, Reco
115 TH2F * fhGamECharged ; //! E distribution of generated photons, Reco, track matched cluster
116 TH2F * fhGamPtCharged ; //! pT distribution of generated photons, Reco, track matched cluster
117 TH2F * fhGamPhiCharged; //! phi distribution of generated photon, Reco, track matched cluster
118 TH2F * fhGamEtaCharged; //! eta distribution of generated photons, Reco, track matched cluster
119 TH2F * fhEleECharged ; //! E distribution of generated electrons, Reco, track matched cluster
120 TH2F * fhElePtCharged ; //! pT distribution of generated electrons, Reco, track matched cluster
121 TH2F * fhElePhiCharged; //! phi distribution of generated electron, Reco, track matched cluster
122 TH2F * fhEleEtaCharged; //! eta distribution of generated electrons, Reco, track matched cluster
123 TH2F * fhPi0ECharged ; //! E distribution of generated pi0, Reco, gamma decay overlapped, track matched cluster
124 TH2F * fhPi0PtCharged ; //! pT distribution of generated pi0, Reco, gamma decay overlapped, track matched cluster
125 TH2F * fhPi0PhiCharged; //! phi distribution of generated pi0, Reco, gamma decay overlapped, track matched cluster
126 TH2F * fhPi0EtaCharged; //! eta distribution of generated pi0, Reco, gamma decay overlapped, track matched cluster
127 TH2F * fhNeHadECharged ; //! E distribution of generated neutral hadron, Reco, track matched cluster
128 TH2F * fhNeHadPtCharged ; //! pT distribution of generated neutral hadron, Reco, track matched cluster
129 TH2F * fhNeHadPhiCharged; //! phi distribution of generated neutral hadron, Reco , track matched cluster
130 TH2F * fhNeHadEtaCharged; //! eta distribution of generated neutral hadron, Reco, track matched cluster
131 TH2F * fhChHadECharged ; //! E distribution of generated charged hadron, Reco, track matched cluster
132 TH2F * fhChHadPtCharged ; //! pT distribution of generated charged hadron, Reco, track matched cluster
133 TH2F * fhChHadPhiCharged; //! phi distribution of generated charged hadron, Reco, track matched cluster
134 TH2F * fhChHadEtaCharged; //! eta distribution of generated charged hadron, Reco, track matched cluster
136 TH1F *fhGenGamAccE ; // E of primary gamma
137 TH1F *fhGenGamAccPt ; // pt of primary gamma
138 TH1F *fhGenGamAccEta ; // eta of primart gamma
139 TH1F *fhGenGamAccPhi ; // phi of primary gamma
140 TH1F *fhGenPi0AccE ; // E of primary pi0
141 TH1F *fhGenPi0AccPt ; // pt of primary pi0
142 TH1F *fhGenPi0AccEta ; // eta of primart pi0
143 TH1F *fhGenPi0AccPhi ; // phi of primary pi0
145 //Histograms for track-matching
146 TH2F *fh1pOverE; //! p/E for track-cluster matches
147 TH1F *fh1dR; //! distance between projected track and cluster
148 TH2F *fh2EledEdx; //! dE/dx vs. momentum for electron candidates
149 TH2F *fh2MatchdEdx; //! dE/dx vs. momentum for all matches
150 TH2F *fhMCEle1pOverE; //! p/E for track-cluster matches, MC electrons
151 TH1F *fhMCEle1dR; //! distance between projected track and cluster, MC electrons
152 TH2F *fhMCEle2MatchdEdx; //! dE/dx vs. momentum for all matches, MC electrons
154 TH2F *fhMCChHad1pOverE; //! p/E for track-cluster matches, MC charged hadrons
155 TH1F *fhMCChHad1dR; //! distance between projected track and cluster, MC charged hadrons
156 TH2F *fhMCChHad2MatchdEdx; //! dE/dx vs. momentum for all matches, MC charged
158 TH2F *fhMCNeutral1pOverE; //! p/E for track-cluster matches, MC neutral
159 TH1F *fhMCNeutral1dR; //! distance between projected track and cluster, MC neutral
160 TH2F *fhMCNeutral2MatchdEdx; //! dE/dx vs. momentum for all matches, MC neutral
162 TH2F *fh1pOverER02; //! p/E for track-cluster matches, dR > 0.2
163 TH2F *fhMCEle1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC electrons
164 TH2F *fhMCChHad1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC charged hadrons
165 TH2F *fhMCNeutral1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC neutral
167 //________________________________________________________________________
168 void ReadHistograms(TString name, TString dataType, Bool_t isDataMC, Bool_t fCorrelateCalos, Int_t fNModules)
170 TFile *f = new TFile("Calo.Performance.root","read");
171 TList* outputList = f->Get("Calo.Performance");
174 fhEMod = new TH1F*[fNModules];
175 fhNClustersMod = new TH1F*[fNModules];
176 fhNCellsPerClusterMod = new TH2F*[fNModules];
177 fhNCellsMod = new TH1F*[fNModules];
178 fhGridCellsMod = new TH2F*[fNModules];
179 fhGridCellsEMod = new TH2F*[fNModules];
180 fhAmplitudeMod = new TH1F*[fNModules];
181 fhIMMod = new TH2F*[fNModules];
182 fhIMCellCutMod = new TH2F*[fNModules];
185 // Histograms of this analsys are kept in the same list as other analysis, recover the position of
186 // the first one and then add the next
187 Int_t index = outputList->IndexOf(outputList->FindObject(name+"hE"));
188 //printf("Calo: %s, index: %d\n",fCalorimeter.Data(),index);
189 //Read histograms, must be in the same order as in GetCreateOutputObject.
190 fhE = (TH1F *) outputList->At(index++);
191 fhPt = (TH1F *) outputList->At(index++);
192 fhPhi = (TH1F *) outputList->At(index++);
193 fhEta = (TH1F *) outputList->At(index++);
194 fhEtaPhi = (TH2F *) outputList->At(index++);
195 fhEtaPhiE = (TH3F *) outputList->At(index++);
197 fhECharged = (TH1F *) outputList->At(index++);
198 fhPtCharged = (TH1F *) outputList->At(index++);
199 fhPhiCharged = (TH1F *) outputList->At(index++);
200 fhEtaCharged = (TH1F *) outputList->At(index++);
201 fhEtaPhiCharged = (TH2F *) outputList->At(index++);
203 fhEChargedNoOut = (TH1F *) outputList->At(index++);
204 fhPtChargedNoOut = (TH1F *) outputList->At(index++);
205 fhPhiChargedNoOut = (TH1F *) outputList->At(index++);
206 fhEtaChargedNoOut = (TH1F *) outputList->At(index++);
207 fhEtaPhiChargedNoOut = (TH2F *) outputList->At(index++);
209 fh1pOverE = (TH2F *) outputList->At(index++);
210 fh1dR = (TH1F *) outputList->At(index++);
211 fh2MatchdEdx = (TH2F *) outputList->At(index++);
212 fh2EledEdx = (TH2F *) outputList->At(index++);
213 fh1pOverER02 = (TH2F *) outputList->At(index++);
215 fhIM = (TH2F *) outputList->At(index++);
216 fhIMCellCut = (TH2F *) outputList->At(index++);
217 fhAsym = (TH2F *) outputList->At(index++);
219 fhNCellsPerCluster = (TH2F *) outputList->At(index++);
220 fhNClusters = (TH1F *) outputList->At(index++);
221 fhNCells = (TH1F *) outputList->At(index++);
222 fhAmplitude = (TH1F *) outputList->At(index++);
223 if(dataType=="ESD") {
224 fhTime = (TH1F *) outputList->At(index++);
225 fhTimeId = (TH2F *) outputList->At(index++);
226 fhTimeAmp = (TH2F *) outputList->At(index++);
230 fhCaloCorrNClusters = (TH2F *) outputList->At(index++);
231 fhCaloCorrEClusters = (TH2F *) outputList->At(index++);
232 fhCaloCorrNCells = (TH2F *) outputList->At(index++);
233 fhCaloCorrECells = (TH2F *) outputList->At(index++);
236 for(Int_t imod = 0 ; imod < fNModules; imod++){
237 fhEMod[imod] = (TH1F *) outputList->At(index++);
238 fhNClustersMod[imod] = (TH1F *) outputList->At(index++);
239 fhNCellsPerClusterMod[imod] = (TH2F *) outputList->At(index++);
240 fhNCellsMod[imod] = (TH1F *) outputList->At(index++);
241 fhGridCellsMod[imod] = (TH2F *) outputList->At(index++);
242 fhGridCellsEMod[imod] = (TH2F *) outputList->At(index++);
243 fhAmplitudeMod[imod] = (TH1F *) outputList->At(index++);
244 fhIMMod[imod] = (TH2F *) outputList->At(index++);
245 fhIMCellCutMod[imod] = (TH2F *) outputList->At(index++);
250 fhDeltaE = (TH1F *) outputList->At(index++);
251 fhDeltaPt = (TH1F *) outputList->At(index++);
252 fhDeltaPhi = (TH1F *) outputList->At(index++);
253 fhDeltaEta = (TH1F *) outputList->At(index++);
255 fhRatioE = (TH1F *) outputList->At(index++);
256 fhRatioPt = (TH1F *) outputList->At(index++);
257 fhRatioPhi = (TH1F *) outputList->At(index++);
258 fhRatioEta = (TH1F *) outputList->At(index++);
260 fh2E = (TH2F *) outputList->At(index++);
261 fh2Pt = (TH2F *) outputList->At(index++);
262 fh2Phi = (TH2F *) outputList->At(index++);
263 fh2Eta = (TH2F *) outputList->At(index++);
265 fhGamE = (TH2F *) outputList->At(index++);
266 fhGamPt = (TH2F *) outputList->At(index++);
267 fhGamPhi = (TH2F *) outputList->At(index++);
268 fhGamEta = (TH2F *) outputList->At(index++);
270 fhGamDeltaE = (TH1F *) outputList->At(index++);
271 fhGamDeltaPt = (TH1F *) outputList->At(index++);
272 fhGamDeltaPhi = (TH1F *) outputList->At(index++);
273 fhGamDeltaEta = (TH1F *) outputList->At(index++);
275 fhGamRatioE = (TH1F *) outputList->At(index++);
276 fhGamRatioPt = (TH1F *) outputList->At(index++);
277 fhGamRatioPhi = (TH1F *) outputList->At(index++);
278 fhGamRatioEta = (TH1F *) outputList->At(index++);
280 fhPi0E = (TH2F *) outputList->At(index++);
281 fhPi0Pt = (TH2F *) outputList->At(index++);
282 fhPi0Phi = (TH2F *) outputList->At(index++);
283 fhPi0Eta = (TH2F *) outputList->At(index++);
285 fhEleE = (TH2F *) outputList->At(index++);
286 fhElePt = (TH2F *) outputList->At(index++);
287 fhElePhi = (TH2F *) outputList->At(index++);
288 fhEleEta = (TH2F *) outputList->At(index++);
290 fhNeHadE = (TH2F *) outputList->At(index++);
291 fhNeHadPt = (TH2F *) outputList->At(index++);
292 fhNeHadPhi = (TH2F *) outputList->At(index++);
293 fhNeHadEta = (TH2F *) outputList->At(index++);
295 fhChHadE = (TH2F *) outputList->At(index++);
296 fhChHadPt = (TH2F *) outputList->At(index++);
297 fhChHadPhi = (TH2F *) outputList->At(index++);
298 fhChHadEta = (TH2F *) outputList->At(index++);
299 fhGamECharged = (TH2F *) outputList->At(index++);
300 fhGamPtCharged = (TH2F *) outputList->At(index++);
301 fhGamPhiCharged = (TH2F *) outputList->At(index++);
302 fhGamEtaCharged = (TH2F *) outputList->At(index++);
304 fhPi0ECharged = (TH2F *) outputList->At(index++);
305 fhPi0PtCharged = (TH2F *) outputList->At(index++);
306 fhPi0PhiCharged = (TH2F *) outputList->At(index++);
307 fhPi0EtaCharged = (TH2F *) outputList->At(index++);
309 fhEleECharged = (TH2F *) outputList->At(index++);
310 fhElePtCharged = (TH2F *) outputList->At(index++);
311 fhElePhiCharged = (TH2F *) outputList->At(index++);
312 fhEleEtaCharged = (TH2F *) outputList->At(index++);
314 fhNeHadECharged = (TH2F *) outputList->At(index++);
315 fhNeHadPtCharged = (TH2F *) outputList->At(index++);
316 fhNeHadPhiCharged = (TH2F *) outputList->At(index++);
317 fhNeHadEtaCharged = (TH2F *) outputList->At(index++);
319 fhChHadECharged = (TH2F *) outputList->At(index++);
320 fhChHadPtCharged = (TH2F *) outputList->At(index++);
321 fhChHadPhiCharged = (TH2F *) outputList->At(index++);
322 fhChHadEtaCharged = (TH2F *) outputList->At(index++);
324 // fhEMVxyz = (TH3F *) outputList->At(index++);
325 // fhHaVxyz = (TH3F *) outputList->At(index++);
327 fhEMVxyz = (TH2F *) outputList->At(index++);
328 fhHaVxyz = (TH2F *) outputList->At(index++);
329 fhEMR = (TH2F *) outputList->At(index++);
330 fhHaR = (TH2F *) outputList->At(index++);
332 fhGenGamPt = (TH1F *) outputList->At(index++);
333 fhGenGamEta = (TH1F *) outputList->At(index++);
334 fhGenGamPhi = (TH1F *) outputList->At(index++);
336 fhGenPi0Pt = (TH1F *) outputList->At(index++);
337 fhGenPi0Eta = (TH1F *) outputList->At(index++);
338 fhGenPi0Phi = (TH1F *) outputList->At(index++);
340 fhGenEtaPt = (TH1F *) outputList->At(index++);
341 fhGenEtaEta = (TH1F *) outputList->At(index++);
342 fhGenEtaPhi = (TH1F *) outputList->At(index++);
344 fhGenOmegaPt = (TH1F *) outputList->At(index++);
345 fhGenOmegaEta = (TH1F *) outputList->At(index++);
346 fhGenOmegaPhi = (TH1F *) outputList->At(index++);
348 fhGenElePt = (TH1F *) outputList->At(index++);
349 fhGenEleEta = (TH1F *) outputList->At(index++);
350 fhGenElePhi = (TH1F *) outputList->At(index++);
352 fhGenGamAccE = (TH1F *) outputList->At(index++);
353 fhGenGamAccPt = (TH1F *) outputList->At(index++);
354 fhGenGamAccEta = (TH1F *) outputList->At(index++);
355 fhGenGamAccPhi = (TH1F *) outputList->At(index++);
357 fhGenPi0AccE = (TH1F *) outputList->At(index++);
358 fhGenPi0AccPt = (TH1F *) outputList->At(index++);
359 fhGenPi0AccEta = (TH1F *) outputList->At(index++);
360 fhGenPi0AccPhi = (TH1F *) outputList->At(index++);
363 fhMCEle1pOverE = (TH2F *) outputList->At(index++);
364 fhMCEle1dR = (TH1F *) outputList->At(index++);
365 fhMCEle2MatchdEdx = (TH2F *) outputList->At(index++);
367 fhMCChHad1pOverE = (TH2F *) outputList->At(index++);
368 fhMCChHad1dR = (TH1F *) outputList->At(index++);
369 fhMCChHad2MatchdEdx = (TH2F *) outputList->At(index++);
371 fhMCNeutral1pOverE = (TH2F *) outputList->At(index++);
372 fhMCNeutral1dR = (TH1F *) outputList->At(index++);
373 fhMCNeutral2MatchdEdx = (TH2F *) outputList->At(index++);
375 fhMCEle1pOverER02 = (TH2F *) outputList->At(index++);
376 fhMCChHad1pOverER02 = (TH2F *) outputList->At(index++);
377 fhMCNeutral1pOverER02 = (TH2F *) outputList->At(index++);
382 //__________________________________________________________________
383 void DrawCaloQA(TString fCalorimeter = "EMCAL", TString dataType = "ESD", Bool_t isDataMC = kFALSE)
385 //Macro for replotting Calorimeter QA histograms
386 Bool_t fCorrelateCalos = kFALSE;
387 Int_t fNModules = 12;
388 //By default when PHOS QA is called correlation not done
389 if(fCalorimeter == "PHOS") {
390 fCorrelateCalos = kFALSE;
394 fCorrelateCalos = kTRUE;
397 cout<<"Calo? "<<fCalorimeter<<" Correlate plots? "<<fCorrelateCalos<<" MC plots?"<<isDataMC<<endl;
398 //Do some plots to end
399 gROOT->Macro("./style.C");//Set different root style parameters
400 //Recover histograms from output histograms list, needed for distributed analysis.
401 ReadHistograms(fCalorimeter+"_", dataType, isDataMC, fCorrelateCalos,fNModules);
408 //Reconstructed distributions
410 sprintf(cname,"QA_%s_rec",fCalorimeter.Data());
411 TCanvas * c = new TCanvas(cname, "Reconstructed distributions", 400, 400) ;
414 fhE->SetAxisRange(minx,maxx,"X");
415 fhPt->SetAxisRange(minx,maxx,"X");
418 if(fhE->GetEntries() > 0) gPad->SetLogy();
419 TLegend pLegendE(0.7,0.6,0.9,0.8);
420 pLegendE.SetTextSize(0.03);
421 pLegendE.AddEntry(fhE,"all modules","L");
422 pLegendE.SetFillColor(10);
423 pLegendE.SetBorderSize(1);
425 fhE->SetLineColor(1);
427 for(Int_t imod = 0; imod < fNModules; imod++){
428 fhEMod[imod]->SetLineColor(imod+1);
429 fhEMod[imod]->Draw("same");
430 pLegendE.AddEntry(fhEMod[imod],Form("module %d",imod),"L");
436 fhPt->SetLineColor(4);
440 fhPhi->SetLineColor(4);
444 fhEta->SetLineColor(4);
447 sprintf(name,"QA_%s_ReconstructedDistributions.eps",fCalorimeter.Data());
450 //Reconstructed distributions, matched with tracks
452 sprintf(cname,"QA_%s_rectrackmatch",fCalorimeter.Data());
453 TCanvas * c2 = new TCanvas(cname, "Reconstructed distributions, matched with tracks", 400, 400) ;
456 fhECharged->SetAxisRange(minx,maxx,"X");
457 fhPtCharged->SetAxisRange(minx,maxx,"X");
461 fhECharged->SetLineColor(4);
466 fhPtCharged->SetLineColor(4);
470 fhPhiCharged->SetLineColor(4);
471 fhPhiCharged->Draw();
474 fhEtaCharged->SetLineColor(4);
475 fhEtaCharged->Draw();
477 sprintf(name,"QA_%s_ReconstructedDistributions_TrackMatched.eps",fCalorimeter.Data());
480 TH1F * hEChargedClone = (TH1F*) fhECharged->Clone("EChargedClone");
481 TH1F * hPtChargedClone = (TH1F*) fhPtCharged->Clone("PtChargedClone");
482 TH1F * hEtaChargedClone = (TH1F*) fhEtaCharged->Clone("EtaChargedClone");
483 TH1F * hPhiChargedClone = (TH1F*) fhPhiCharged->Clone("PhiChargedClone");
485 TH1F * hEChargedClone2 = (TH1F*) fhECharged->Clone("EChargedClone2");
486 TH1F * hPtChargedClone2 = (TH1F*) fhPtCharged->Clone("PtChargedClone2");
487 TH1F * hEtaChargedClone2 = (TH1F*) fhEtaCharged->Clone("EtaChargedClone2");
488 TH1F * hPhiChargedClone2 = (TH1F*) fhPhiCharged->Clone("PhiChargedClone2");
490 //Ratio: reconstructed track matched/ all reconstructed
492 sprintf(cname,"QA_%s_rectrackmatchrat",fCalorimeter.Data());
493 TCanvas * c3 = new TCanvas(cname, "Ratio: reconstructed track matched/ all reconstructed", 400, 400) ;
498 hEChargedClone->SetTitleOffset(1.6,"Y");
499 hEChargedClone->SetYTitle("track matched / all ");
500 hEChargedClone->SetXTitle("E (GeV)");
501 hEChargedClone->Divide(fhE);
502 hEChargedClone->Draw();
506 hPtChargedClone->SetTitleOffset(1.6,"Y");
507 hPtChargedClone->SetYTitle("track matched / all ");
508 hPtChargedClone->SetXTitle("p_{T} (GeV/c)");
509 hPtChargedClone->Divide(fhPt);
510 hPtChargedClone->Draw();
514 hPhiChargedClone->SetTitleOffset(1.6,"Y");
515 hPhiChargedClone->SetYTitle("track matched / all ");
516 hPhiChargedClone->SetXTitle("#phi (rad)");
517 hPhiChargedClone->Divide(fhPhi);
518 hPhiChargedClone->Draw();
522 hEtaChargedClone->SetTitleOffset(1.6,"Y");
523 hEtaChargedClone->SetYTitle("track matched / all ");
524 hEtaChargedClone->SetXTitle("#eta");
525 hEtaChargedClone->Divide(fhEta);
526 hEtaChargedClone->Draw();
528 sprintf(name,"QA_%s_RatioReconstructedMatchedDistributions.eps",fCalorimeter.Data());
531 //Ratio: reconstructed track matched (minus no track param) / all
533 sprintf(cname,"QA_%s_rectrackmatchratout",fCalorimeter.Data());
534 TCanvas * c333 = new TCanvas(cname, "Ratio: reconstructed track matched (with outer track param)/ all", 400, 400) ;
538 hEChargedClone2->Add(fhEChargedNoOut,-1);
539 hEChargedClone2->SetYTitle("track matched / all");
540 hEChargedClone2->SetXTitle("E (GeV)");
541 hEChargedClone2->Divide(fhE);
542 hEChargedClone2->Draw();
545 hPtChargedClone2->Add(fhPtChargedNoOut,-1);
546 hPtChargedClone2->SetYTitle("track matched / all");
547 hPtChargedClone2->SetXTitle("p_{T} (GeV/c)");
548 hPtChargedClone2->Divide(fhPt);
549 hPtChargedClone2->Draw();
552 hPhiChargedClone2->Add(fhPhiChargedNoOut,-1);
553 hPhiChargedClone2->SetYTitle("track matched / all");
554 hPhiChargedClone2->SetXTitle("#phi (rad)");
555 hPhiChargedClone2->Divide(fhPhi);
556 hPhiChargedClone2->Draw();
559 hEtaChargedClone2->Add(fhEtaChargedNoOut,-1);
560 hEtaChargedClone2->SetYTitle("track matched / all");
561 hEtaChargedClone2->SetXTitle("#eta");
562 hEtaChargedClone2->Divide(fhEta);
563 hEtaChargedClone2->Draw();
565 sprintf(name,"QA_%s_RatioReconstructedMatchedDistributionsOuter.eps",fCalorimeter.Data());
568 // //Reconstructed distributions, matched with tracks but no outer param
570 // sprintf(cname,"QA_%s_rectrackmatch_noout",fCalorimeter.Data());
571 // TCanvas * c22 = new TCanvas(cname, "Reconstructed distributions, matched with tracks, no outer track param", 400, 400) ;
572 // c22->Divide(2, 2);
576 // fhEChargedNoOut->SetLineColor(4);
577 // fhEChargedNoOut->Draw();
581 // fhPtChargedNoOut->SetLineColor(4);
582 // fhPtChargedNoOut->Draw();
585 // fhPhiChargedNoOut->SetLineColor(4);
586 // fhPhiChargedNoOut->Draw();
589 // fhEtaChargedNoOut->SetLineColor(4);
590 // fhEtaChargedNoOut->Draw();
592 // sprintf(name,"QA_%s_ReconstructedDistributions_TrackMatched_NoOutParam.eps",fCalorimeter.Data());
595 //Ratio: reconstructed track matched/ all reconstructed
598 // TH1F * hEChargedNoOutClone = (TH1F*) fhEChargedNoOut->Clone("EChargedNoOutClone");
599 // TH1F * hPtChargedNoOutClone = (TH1F*) fhPtChargedNoOut->Clone("PtChargedNoOutClone");
600 // TH1F * hEtaChargedNoOutClone = (TH1F*) fhEtaChargedNoOut->Clone("EtaChargedNoOutClone");
601 // TH1F * hPhiChargedNoOutClone = (TH1F*) fhPhiChargedNoOut->Clone("PhiChargedNoOutClone");
603 // sprintf(cname,"QA_%s_rectrackmatchratnoout",fCalorimeter.Data());
604 // TCanvas * c33 = new TCanvas(cname, "Ratio: reconstructed track matched/ all reconstructed", 400, 400) ;
605 // c33->Divide(2, 2);
608 // hEChargedNoOutClone->SetYTitle("track matched no out/ all matched");
609 // hEChargedNoOutClone->SetXTitle("E (GeV)");
610 // hEChargedNoOutClone->Divide(fhECharged);
611 // hEChargedNoOutClone->Draw();
614 // hPtChargedNoOutClone->SetYTitle("track matched no out / all matched");
615 // hPtChargedNoOutClone->SetXTitle("p_{T} (GeV/c)");
616 // hPtChargedNoOutClone->Divide(fhPtCharged);
617 // hPtChargedNoOutClone->Draw();
620 // hPhiChargedNoOutClone->SetYTitle("track matched no out/ all matched");
621 // hPhiChargedNoOutClone->SetXTitle("#phi (rad)");
622 // hPhiChargedNoOutClone->Divide(fhPhiCharged);
623 // hPhiChargedNoOutClone->Draw();
626 // hEtaChargedNoOutClone->SetYTitle("track matched no out/ all matched");
627 // hEtaChargedNoOutClone->SetXTitle("#eta");
628 // hEtaChargedNoOutClone->Divide(fhEtaCharged);
629 // hEtaChargedNoOutClone->Draw();
631 // sprintf(name,"QA_%s_RatioMatchedDistributionsAllToNoOut.eps",fCalorimeter.Data());
636 //TRACK MATCHING P/E distributions
637 //printf("cPoverE\n");
638 sprintf(cname,"QA_%s_trkmatch",fCalorimeter.Data());
639 TCanvas *cme = new TCanvas(cname,"Track-matching distributions", 400, 400);
642 TLegend pLegendpE0(0.6,0.55,0.9,0.8);
643 pLegendpE0.SetTextSize(0.04);
644 pLegendpE0.AddEntry(fh1pOverE,"all","L");
645 pLegendpE0.AddEntry(fh1pOverER02,"dR < 0.02","L");
646 pLegendpE0.SetFillColor(10);
647 pLegendpE0.SetBorderSize(1);
652 fh1pOverE->SetTitle("Track matches p/E");
654 fh1pOverER02->SetLineColor(4);
655 fh1pOverER02->Draw("same");
663 fh2MatchdEdx->Draw();
668 sprintf(name,"QA_%s_TrackMatchingEleDist.eps",fCalorimeter.Data());
673 sprintf(cname,"QA_%s_etavsphi",fCalorimeter.Data());
674 // TCanvas * c4 = new TCanvas(cname, "reconstructed #eta vs #phi", 600, 200) ;
677 TCanvas * c4 = new TCanvas(cname, "reconstructed #eta vs #phi", 400, 200) ;
681 fhEtaPhi->Draw("cont");
684 fhEtaPhiCharged->Draw("cont");
687 // fhEtaPhiChargedNoOut->Draw("cont");
689 sprintf(name,"QA_%s_ReconstructedEtaVsPhi.eps",fCalorimeter.Data());
692 sprintf(name,"QA_%s_ReconstructedEtaVsPhiVsE.eps",fCalorimeter.Data());
693 c4->Print(name); printf("Plot: %s\n",name);
699 if(fhIM->GetEntries() > 1){
700 Int_t nebins = fhIM->GetNbinsX();
701 Int_t emax = (Int_t) fhIM->GetXaxis()->GetXmax();
702 Int_t emin = (Int_t) fhIM->GetXaxis()->GetXmin();
703 if (emin != 0 ) printf("emin != 0 \n");
704 //printf("IM: nBinsX %d, emin %2.2f, emax %2.2f\n",nebins,emin,emax);
706 sprintf(cname,"QA_%s_IM",fCalorimeter.Data());
708 TCanvas * c5 = new TCanvas(cname, "Invariant mass", 600, 400) ;
712 //fhIM->SetLineColor(4);
715 binmax = (Int_t) (1-emin)*nebins/emax;
716 TH1D *pyim1 = fhIM->ProjectionY("pyim1",binmin,binmax);
717 pyim1->SetTitle("E_{pair} < 1 GeV");
718 pyim1->SetLineColor(1);
720 TLegend pLegendIM(0.7,0.6,0.9,0.8);
721 pLegendIM.SetTextSize(0.03);
722 pLegendIM.AddEntry(pyim1,"all modules","L");
723 pLegendIM.SetFillColor(10);
724 pLegendIM.SetBorderSize(1);
725 for(Int_t imod = 0; imod < fNModules; imod++){
726 pyim1 = fhIMMod[imod]->ProjectionY(Form("pyim1_%d",imod),binmin,binmax);
727 pLegendIM.AddEntry(pyim1,Form("module %d",imod),"L");
728 pyim1->SetLineColor(imod+1);
734 binmin = (Int_t) (1-emin)*nebins/emax;
735 binmax = (Int_t) (2-emin)*nebins/emax;
736 TH1D *pyim2 = fhIM->ProjectionY("pyim2",binmin,binmax);
737 pyim2->SetTitle("1 < E_{pair} < 2 GeV");
738 pyim2->SetLineColor(1);
740 for(Int_t imod = 0; imod < fNModules; imod++){
741 pyim2 = fhIMMod[imod]->ProjectionY(Form("pyim2_%d",imod),binmin,binmax);
742 pyim2->SetLineColor(imod+1);
747 binmin = (Int_t) (2-emin)*nebins/emax;
748 binmax = (Int_t) (3-emin)*nebins/emax;
749 TH1D *pyim3 = fhIM->ProjectionY("pyim3",binmin,binmax);
750 pyim3->SetTitle("2 < E_{pair} < 3 GeV");
751 pyim3->SetLineColor(1);
753 for(Int_t imod = 0; imod < fNModules; imod++){
754 pyim3 = fhIMMod[imod]->ProjectionY(Form("pyim3_%d",imod),binmin,binmax);
755 pyim3->SetLineColor(imod+1);
760 binmin = (Int_t) (3-emin)*nebins/emax;
761 binmax = (Int_t) (4-emin)*nebins/emax;
762 TH1D *pyim4 = fhIM->ProjectionY("pyim4",binmin,binmax);
763 pyim4->SetTitle("3 < E_{pair} < 4 GeV");
764 pyim4->SetLineColor(1);
766 for(Int_t imod = 0; imod < fNModules; imod++){
767 pyim4 = fhIMMod[imod]->ProjectionY(Form("pyim4_%d",imod),binmin,binmax);
768 pyim4->SetLineColor(imod+1);
773 binmin = (Int_t) (4-emin)*nebins/emax;
774 binmax = (Int_t) (5-emin)*nebins/emax;
775 TH1D *pyim5 = fhIM->ProjectionY("pyim5",binmin,binmax);
776 pyim5->SetTitle("4< E_{pair} < 5 GeV");
777 pyim5->SetLineColor(1);
779 for(Int_t imod = 0; imod < fNModules; imod++){
780 pyim5 = fhIMMod[imod]->ProjectionY(Form("pyim5_%d",imod),binmin,binmax);
781 pyim5->SetLineColor(imod+1);
786 binmin = (Int_t) (5-emin)*nebins/emax;
788 TH1D *pyim10 = fhIM->ProjectionY("pyim10",binmin,binmax);
789 pyim10->SetTitle("E_{pair} > 5 GeV");
790 pyim10->SetLineColor(1);
792 for(Int_t imod = 0; imod < fNModules; imod++){
793 pyim10 = fhIMMod[imod]->ProjectionY(Form("pyim10_%d",imod),binmin,binmax);
794 pyim10->SetLineColor(imod+1);
795 pyim10->Draw("same");
798 sprintf(name,"QA_%s_InvariantMass.eps",fCalorimeter.Data());
799 c5->Print(name); printf("Plot: %s\n",name);
803 if(fhIMCellCut->GetEntries() > 1){
804 Int_t nebins = fhIMCellCut->GetNbinsX();
805 Int_t emax = (Int_t) fhIMCellCut->GetXaxis()->GetXmax();
806 Int_t emin = (Int_t) fhIMCellCut->GetXaxis()->GetXmin();
807 if (emin != 0 ) printf("emin != 0 \n");
808 //printf("IMCellCut: nBinsX %d, emin %2.2f, emax %2.2f\n",nebins,emin,emax);
810 sprintf(cname,"QA_%s_IMCellCut",fCalorimeter.Data());
812 TCanvas * c5cc = new TCanvas(cname, "Invariant mass, Cell Cut", 600, 400) ;
816 //fhIMCellCut->SetLineColor(4);
817 //fhIMCellCut->Draw();
819 binmax = (Int_t) (1-emin)*nebins/emax;
820 TH1D *pyimcc1 = fhIMCellCut->ProjectionY("pyimcc1",binmin,binmax);
821 pyimcc1->SetTitle("E_{pair} < 1 GeV");
822 pyimcc1->SetLineColor(1);
824 TLegend pLegendIMCellCut(0.7,0.6,0.9,0.8);
825 pLegendIMCellCut.SetTextSize(0.03);
826 pLegendIMCellCut.AddEntry(pyimcc1,"all modules","L");
827 pLegendIMCellCut.SetFillColor(10);
828 pLegendIMCellCut.SetBorderSize(1);
829 for(Int_t imod = 0; imod < fNModules; imod++){
830 pyimcc1 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc1_%d",imod),binmin,binmax);
831 pLegendIMCellCut.AddEntry(pyimcc1,Form("module %d",imod),"L");
832 pyimcc1->SetLineColor(imod+1);
833 pyimcc1->Draw("same");
835 pLegendIMCellCut.Draw();
838 binmin = (Int_t) (1-emin)*nebins/emax;
839 binmax = (Int_t) (2-emin)*nebins/emax;
840 TH1D *pyimcc2 = fhIMCellCut->ProjectionY("pyimcc2",binmin,binmax);
841 pyimcc2->SetTitle("1 < E_{pair} < 2 GeV");
842 pyimcc2->SetLineColor(1);
844 for(Int_t imod = 0; imod < fNModules; imod++){
845 pyimcc2 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc2_%d",imod),binmin,binmax);
846 pyimcc2->SetLineColor(imod+1);
847 pyimcc2->Draw("same");
851 binmin = (Int_t) (2-emin)*nebins/emax;
852 binmax = (Int_t) (3-emin)*nebins/emax;
853 TH1D *pyimcc3 = fhIMCellCut->ProjectionY("pyimcc3",binmin,binmax);
854 pyimcc3->SetTitle("2 < E_{pair} < 3 GeV");
855 pyimcc3->SetLineColor(1);
857 for(Int_t imod = 0; imod < fNModules; imod++){
858 pyimcc3 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc3_%d",imod),binmin,binmax);
859 pyimcc3->SetLineColor(imod+1);
860 pyimcc3->Draw("same");
864 binmin = (Int_t) (3-emin)*nebins/emax;
865 binmax = (Int_t) (4-emin)*nebins/emax;
866 TH1D *pyimcc4 = fhIMCellCut->ProjectionY("pyimcc4",binmin,binmax);
867 pyimcc4->SetTitle("3 < E_{pair} < 4 GeV");
868 pyimcc4->SetLineColor(1);
870 for(Int_t imod = 0; imod < fNModules; imod++){
871 pyimcc4 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc4_%d",imod),binmin,binmax);
872 pyimcc4->SetLineColor(imod+1);
873 pyimcc4->Draw("same");
877 binmin = (Int_t) (4-emin)*nebins/emax;
878 binmax = (Int_t) (5-emin)*nebins/emax;
879 TH1D *pyimcc5cc = fhIMCellCut->ProjectionY("pyimcc5cc",binmin,binmax);
880 pyimcc5cc->SetTitle("4< E_{pair} < 5 GeV");
881 pyimcc5cc->SetLineColor(1);
883 for(Int_t imod = 0; imod < fNModules; imod++){
884 pyimcc5cc = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc5cc_%d",imod),binmin,binmax);
885 pyimcc5cc->SetLineColor(imod+1);
886 pyimcc5cc->Draw("same");
890 binmin = (Int_t) (5-emin)*nebins/emax;
892 TH1D *pyimcc10 = fhIMCellCut->ProjectionY("pyimcc10",binmin,binmax);
893 pyimcc10->SetTitle("E_{pair} > 5 GeV");
894 pyimcc10->SetLineColor(1);
896 for(Int_t imod = 0; imod < fNModules; imod++){
897 pyimcc10 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc10_%d",imod),binmin,binmax);
898 pyimcc10->SetLineColor(imod+1);
899 pyimcc10->Draw("same");
902 sprintf(name,"QA_%s_InvariantMass_CellCut.eps",fCalorimeter.Data());
903 c5cc->Print(name); printf("Plot: %s\n",name);
907 if(fhAsym->GetEntries() > 1){
908 Int_t nebins = fhAsym->GetNbinsX();
909 Int_t emax = (Int_t) fhAsym->GetXaxis()->GetXmax();
910 Int_t emin = (Int_t) fhAsym->GetXaxis()->GetXmin();
911 if (emin != 0 ) printf("emin != 0 \n");
912 //printf("Asym: nBinsX %d, emin %2.2f, emax %2.2f\n",nebins,emin,emax);
914 sprintf(cname,"QA_%s_Asym",fCalorimeter.Data());
916 TCanvas * c5b = new TCanvas(cname, "Asymmetry", 400, 400) ;
920 fhAsym->SetTitleOffset(1.6,"Y");
921 fhAsym->SetLineColor(4);
926 binmax = (Int_t) (5-emin)*nebins/emax;
927 TH1D *pyAsym5 = fhAsym->ProjectionY("pyAsym5",binmin,binmax);
928 pyAsym5->SetTitle("E_{pair} < 5 GeV");
929 pyAsym5->SetLineColor(4);
933 binmin = (Int_t) (5-emin)*nebins/emax;
934 binmax = (Int_t) (10-emin)*nebins/emax;
935 TH1D *pyAsym510 = fhAsym->ProjectionY("pyAsym5_10",binmin,binmax);
936 pyAsym510->SetTitle("5 < E_{pair} < 10 GeV");
937 pyAsym510->SetLineColor(4);
941 binmin = (Int_t) (10-emin)*nebins/emax;
943 TH1D *pyAsym10 = fhAsym->ProjectionY("pyAsym10",binmin,binmax);
944 pyAsym10->SetTitle("E_{pair} > 10 GeV");
945 pyAsym10->SetLineColor(4);
948 sprintf(name,"QA_%s_Asymmetry.eps",fCalorimeter.Data());
955 sprintf(cname,"QA_%s_nclustercellsamp",fCalorimeter.Data());
956 TCanvas * c9 = new TCanvas(cname, " CaloClusters and CaloCells", 400, 400) ;
961 TLegend pLegendN(0.7,0.6,0.9,0.8);
962 pLegendN.SetTextSize(0.03);
963 pLegendN.AddEntry(fhNClusters,"all modules","L");
964 pLegendN.SetFillColor(10);
965 pLegendN.SetBorderSize(1);
967 if(fhNClusters->GetEntries() > 0) gPad->SetLogy();
969 fhNClusters->SetLineColor(1);
971 for(Int_t imod = 0; imod < fNModules; imod++){
972 fhNClustersMod[imod]->SetLineColor(imod+1);
973 fhNClustersMod[imod]->Draw("same");
974 pLegendN.AddEntry(fhNClustersMod[imod],Form("module %d",imod),"L");
979 if(fhNCells->GetEntries() > 0) gPad->SetLogy();
981 fhNCells->SetLineColor(1);
983 for(Int_t imod = 0; imod < fNModules; imod++){
984 fhNCellsMod[imod]->SetLineColor(imod+1);
985 fhNCellsMod[imod]->Draw("same");
988 if(fhNCellsPerCluster->GetEntries() > 0) gPad->SetLogy();
990 TH1D *cpc = fhNCellsPerCluster->ProjectionY("cpc",-1,-1);
991 cpc->SetLineColor(1);
993 for(Int_t imod = 0; imod < fNModules; imod++){
994 cpc = fhNCellsPerClusterMod[imod]->ProjectionY(Form("cpc_%d",imod),-1,-1);
995 cpc->SetLineColor(imod+1);
1000 if(fhAmplitude->GetEntries() > 0) gPad->SetLogy();
1002 fhAmplitude->SetLineColor(1);
1003 fhAmplitude->Draw();
1004 for(Int_t imod = 0; imod < fNModules; imod++){
1005 fhAmplitudeMod[imod]->SetLineColor(imod+1);
1006 fhAmplitudeMod[imod]->Draw("same");
1009 sprintf(name,"QA_%s_CaloClustersAndCaloCells.eps",fCalorimeter.Data());
1010 c9->Print(name); printf("Plot: %s\n",name);
1012 //Cell Time histograms, time only available in ESDs
1013 if(dataType=="ESD") {
1015 sprintf(cname,"QA_%s_cellstime",fCalorimeter.Data());
1016 TCanvas * ctime = new TCanvas(cname, " Cells time", 1200, 400) ;
1017 ctime->Divide(3, 1);
1020 if(fhTime->GetEntries() > 0) gPad->SetLogy();
1024 //if(fhTimeId->GetEntries() > 0) gPad->SetLogy();
1025 fhTimeId->Draw("colz");
1028 //if(fhTimeAmp->GetEntries() > 0) gPad->SetLogy();
1029 fhTimeAmp->Draw("colz");
1031 sprintf(name,"QA_%s_CellsTime.eps",fCalorimeter.Data());
1032 ctime->Print(name); printf("Plot: %s\n",name);
1036 if(fCorrelateCalos){
1037 //Calorimeter Correlation, PHOS vs EMCAL
1038 sprintf(cname,"QA_%s_CaloCorr_EMCALvsPHOS",fCalorimeter.Data());
1039 TCanvas * ccorr = new TCanvas(cname, " EMCAL vs PHOS", 400, 400) ;
1040 ccorr->Divide(2, 2);
1045 fhCaloCorrNClusters ->Draw();
1050 fhCaloCorrNCells->Draw();
1055 fhCaloCorrEClusters->Draw();
1060 fhCaloCorrECells->Draw();
1062 sprintf(name,"QA_%s_CaloCorr_EMCALvsPHOS.eps",fCalorimeter.Data());
1063 ccorr->Print(name); printf("Plot: %s\n",name);
1066 //Grid of cell per module plots
1068 gStyle->SetOptStat(0);
1069 sprintf(cname,"QA_%s_GridCellEntries",fCalorimeter.Data());
1071 TCanvas *cgrid = new TCanvas("cgrid","Number of entries per cell", 12,12,800,400);
1072 if(fNModules%2 == 0)
1073 cgrid->Divide(fNModules/2,2);
1075 cgrid->Divide(fNModules/2+1,2);
1077 for(Int_t imod = 0; imod < fNModules ; imod++){
1082 fhGridCellsMod[imod]->SetLabelSize(0.025,"z");
1083 fhGridCellsMod[imod]->Draw("colz");
1085 sprintf(name,"QA_%s_GridCellsEntries.eps",fCalorimeter.Data());
1086 cgrid->Print(name); printf("Plot: %s\n",name);
1088 sprintf(cname,"QA_%s_GridCellAccumEnergy",fCalorimeter.Data());
1090 TCanvas *cgridE = new TCanvas("cgridE","Summed energy per cell", 12,12,800,400);
1091 cgridE->Divide(fNModules/2,2);
1092 for(Int_t imod = 0; imod < fNModules ; imod++){
1097 fhGridCellsEMod[imod]->SetLabelSize(0.025,"z");
1098 fhGridCellsEMod[imod]->Draw("colz");
1100 sprintf(name,"QA_%s_GridCellsAccumEnergy.eps",fCalorimeter.Data());
1101 cgridE->Print(name); printf("Plot: %s\n",name);
1103 sprintf(cname,"QA_%s_GridCellAverageEnergy",fCalorimeter.Data());
1105 TCanvas *cgridEA = new TCanvas("cgridEA","Average energy per cell", 12,12,800,400);
1106 cgridEA->Divide(fNModules/2,2);
1107 for(Int_t imod = 0; imod < fNModules ; imod++){
1108 cgridEA->cd(imod+1);
1112 fhGridCellsEMod[imod]->SetLabelSize(0.025,"z");
1113 fhGridCellsEMod[imod]->Divide(fhGridCellsMod[imod]);
1114 fhGridCellsEMod[imod]->Draw("colz");
1116 sprintf(name,"QA_%s_GridCellsAverageEnergy.eps",fCalorimeter.Data());
1117 cgridEA->Print(name); printf("Plot: %s\n",name);
1122 //Reconstructed vs MC distributions
1124 sprintf(cname,"QA_%s_recvsmc",fCalorimeter.Data());
1125 TCanvas * c6 = new TCanvas(cname, "Reconstructed vs MC distributions", 400, 400) ;
1128 fh2E->SetAxisRange(minx,maxx,"X");
1129 fh2Pt->SetAxisRange(minx,maxx,"X");
1130 fh2E->SetAxisRange(minx,maxx,"Y");
1131 fh2Pt->SetAxisRange(minx,maxx,"Y");
1134 fh2E->SetTitleOffset(1.6,"Y");
1135 fh2E->SetLineColor(4);
1139 fh2Pt->SetTitleOffset(1.6,"Y");
1140 fh2Pt->SetLineColor(4);
1144 fh2Phi->SetTitleOffset(1.6,"Y");
1145 fh2Phi->SetLineColor(4);
1149 fh2Eta->SetTitleOffset(1.6,"Y");
1150 fh2Eta->SetLineColor(4);
1153 sprintf(name,"QA_%s_ReconstructedVSMCDistributions.eps",fCalorimeter.Data());
1156 //Reconstructed vs MC distributions
1158 sprintf(cname,"QA_%s_gamrecvsmc",fCalorimeter.Data());
1159 TCanvas * c6Gam = new TCanvas(cname, "Reconstructed vs MC distributions", 400, 400) ;
1160 c6Gam->Divide(2, 2);
1162 fhGamE->SetAxisRange(minx,maxx,"X");
1163 fhGamPt->SetAxisRange(minx,maxx,"X");
1177 sprintf(name,"QA_%s_GammaReconstructedVSMCDistributions.eps",fCalorimeter.Data());
1180 //Generated - reconstructed
1182 sprintf(cname,"QA_%s_diffgenrec",fCalorimeter.Data());
1183 TCanvas * c7 = new TCanvas(cname, "generated - reconstructed", 400, 400) ;
1188 fhGamDeltaE->SetLineColor(4);
1190 fhGamDeltaE->Draw("same");
1192 TLegend pLegendd(0.65,0.55,0.9,0.8);
1193 pLegendd.SetTextSize(0.06);
1194 pLegendd.AddEntry(fhDeltaE,"all","L");
1195 pLegendd.AddEntry(fhGamDeltaE,"from #gamma","L");
1196 pLegendd.SetFillColor(10);
1197 pLegendd.SetBorderSize(1);
1202 fhGamDeltaPt->SetLineColor(4);
1204 fhGamDeltaPt->Draw("same");
1208 fhGamDeltaPhi->SetLineColor(4);
1210 fhGamDeltaPhi->Draw("same");
1214 fhGamDeltaEta->SetLineColor(4);
1216 fhGamDeltaEta->Draw("same");
1218 sprintf(name,"QA_%s_DiffGeneratedReconstructed.eps",fCalorimeter.Data());
1221 // Reconstructed / Generated
1223 sprintf(cname,"QA_%s_ratiorecgen",fCalorimeter.Data());
1224 TCanvas * c8 = new TCanvas(cname, " reconstructed / generated", 400, 400) ;
1229 fhGamRatioE->SetLineColor(4);
1231 fhGamRatioE->Draw("same");
1233 TLegend pLegendr(0.65,0.55,0.9,0.8);
1234 pLegendr.SetTextSize(0.06);
1235 pLegendr.AddEntry(fhRatioE,"all","L");
1236 pLegendr.AddEntry(fhGamRatioE,"from #gamma","L");
1237 pLegendr.SetFillColor(10);
1238 pLegendr.SetBorderSize(1);
1243 fhGamRatioPt->SetLineColor(4);
1245 fhGamRatioPt->Draw("same");
1248 fhGamRatioPhi->SetLineColor(4);
1250 fhGamRatioPhi->Draw("same");
1253 fhGamRatioEta->SetLineColor(4);
1255 fhGamRatioEta->Draw("same");
1257 sprintf(name,"QA_%s_ReconstructedDivGenerated.eps",fCalorimeter.Data());
1261 //Generated distributions
1263 sprintf(cname,"QA_%s_gen",fCalorimeter.Data());
1264 TCanvas * c10 = new TCanvas(cname, "Generated distributions", 600, 200) ;
1269 TH1F * haxispt = (TH1F*) fhGenPi0Pt->Clone("axispt");
1270 haxispt->SetTitle("Generated Particles p_{T}, |#eta| < 1");
1271 fhGenPi0Pt->SetLineColor(1);
1272 fhGenGamPt->SetLineColor(4);
1273 fhGenEtaPt->SetLineColor(2);
1274 fhGenOmegaPt->SetLineColor(7);
1275 fhGenElePt->SetLineColor(6);
1277 //Select the maximum of the histogram to show all lines.
1278 if(fhGenPi0Pt->GetMaximum() >= fhGenGamPt->GetMaximum() && fhGenPi0Pt->GetMaximum() >= fhGenEtaPt->GetMaximum() &&
1279 fhGenPi0Pt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenPi0Pt->GetMaximum() >= fhGenElePt->GetMaximum())
1280 haxispt->SetMaximum(fhGenPi0Pt->GetMaximum());
1281 else if(fhGenGamPt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenGamPt->GetMaximum() >= fhGenEtaPt->GetMaximum() &&
1282 fhGenGamPt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenGamPt->GetMaximum() >= fhGenElePt->GetMaximum())
1283 haxispt->SetMaximum(fhGenGamPt->GetMaximum());
1284 else if(fhGenEtaPt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenEtaPt->GetMaximum() >= fhGenGamPt->GetMaximum() &&
1285 fhGenEtaPt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenEtaPt->GetMaximum() >= fhGenElePt->GetMaximum())
1286 haxispt->SetMaximum(fhGenEtaPt->GetMaximum());
1287 else if(fhGenOmegaPt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenOmegaPt->GetMaximum() >= fhGenEtaPt->GetMaximum() &&
1288 fhGenOmegaPt->GetMaximum() >= fhGenGamPt->GetMaximum() && fhGenOmegaPt->GetMaximum() >= fhGenElePt->GetMaximum())
1289 haxispt->SetMaximum(fhGenOmegaPt->GetMaximum());
1290 else if(fhGenElePt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenElePt->GetMaximum() >= fhGenEtaPt->GetMaximum() &&
1291 fhGenElePt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenElePt->GetMaximum() >= fhGenGamPt->GetMaximum())
1292 haxispt->SetMaximum(fhGenElePt->GetMaximum());
1293 haxispt->SetMinimum(1);
1294 haxispt->SetAxisRange(minx,maxx,"X");
1295 haxispt->Draw("axis");
1296 fhGenPi0Pt->Draw("same");
1297 fhGenGamPt->Draw("same");
1298 fhGenEtaPt->Draw("same");
1299 fhGenOmegaPt->Draw("same");
1300 fhGenElePt->Draw("same");
1302 TLegend pLegend(0.85,0.65,0.95,0.93);
1303 pLegend.SetTextSize(0.06);
1304 pLegend.AddEntry(fhGenPi0Pt," #pi^{0}","L");
1305 pLegend.AddEntry(fhGenGamPt," #gamma","L");
1306 pLegend.AddEntry(fhGenEtaPt," #eta","L");
1307 pLegend.AddEntry(fhGenOmegaPt," #omega","L");
1308 pLegend.AddEntry(fhGenElePt," e^{#pm}","L");
1309 pLegend.SetFillColor(10);
1310 pLegend.SetBorderSize(1);
1315 TH1F * haxiseta = (TH1F*) fhGenPi0Eta->Clone("axiseta");
1316 haxiseta->SetTitle("Generated Particles #eta, |#eta| < 1");
1317 fhGenPi0Eta->SetLineColor(1);
1318 fhGenGamEta->SetLineColor(4);
1319 fhGenEtaEta->SetLineColor(2);
1320 fhGenOmegaEta->SetLineColor(7);
1321 fhGenEleEta->SetLineColor(6);
1322 //Select the maximum of the histogram to show all lines.
1323 if(fhGenPi0Eta->GetMaximum() >= fhGenGamEta->GetMaximum() && fhGenPi0Eta->GetMaximum() >= fhGenEtaEta->GetMaximum() &&
1324 fhGenPi0Eta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenPi0Eta->GetMaximum() >= fhGenEleEta->GetMaximum())
1325 haxiseta->SetMaximum(fhGenPi0Eta->GetMaximum());
1326 else if(fhGenGamEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenGamEta->GetMaximum() >= fhGenEtaEta->GetMaximum() &&
1327 fhGenGamEta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenGamEta->GetMaximum() >= fhGenEleEta->GetMaximum())
1328 haxiseta->SetMaximum(fhGenGamEta->GetMaximum());
1329 else if(fhGenEtaEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenEtaEta->GetMaximum() >= fhGenGamEta->GetMaximum() &&
1330 fhGenEtaEta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenEtaEta->GetMaximum() >= fhGenEleEta->GetMaximum())
1331 haxiseta->SetMaximum(fhGenEtaEta->GetMaximum());
1332 else if(fhGenOmegaEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenOmegaEta->GetMaximum() >= fhGenEtaEta->GetMaximum() &&
1333 fhGenOmegaEta->GetMaximum() >= fhGenGamEta->GetMaximum() && fhGenOmegaEta->GetMaximum() >= fhGenEleEta->GetMaximum())
1334 haxiseta->SetMaximum(fhGenOmegaEta->GetMaximum());
1335 else if(fhGenEleEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenEleEta->GetMaximum() >= fhGenEtaEta->GetMaximum() &&
1336 fhGenEleEta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenEleEta->GetMaximum() >= fhGenGamEta->GetMaximum())
1337 haxiseta->SetMaximum(fhGenEleEta->GetMaximum());
1338 haxiseta->SetMinimum(100);
1339 haxiseta->Draw("axis");
1340 fhGenPi0Eta->Draw("same");
1341 fhGenGamEta->Draw("same");
1342 fhGenEtaEta->Draw("same");
1343 fhGenOmegaEta->Draw("same");
1344 fhGenEleEta->Draw("same");
1349 TH1F * haxisphi = (TH1F*) fhGenPi0Phi->Clone("axisphi");
1350 haxisphi->SetTitle("Generated Particles #phi, |#eta| < 1");
1351 fhGenPi0Phi->SetLineColor(1);
1352 fhGenGamPhi->SetLineColor(4);
1353 fhGenEtaPhi->SetLineColor(2);
1354 fhGenOmegaPhi->SetLineColor(7);
1355 fhGenElePhi->SetLineColor(6);
1356 //Select the maximum of the histogram to show all lines.
1357 if(fhGenPi0Phi->GetMaximum() >= fhGenGamPhi->GetMaximum() && fhGenPi0Phi->GetMaximum() >= fhGenEtaPhi->GetMaximum() &&
1358 fhGenPi0Phi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenPi0Phi->GetMaximum() >= fhGenElePhi->GetMaximum())
1359 haxisphi->SetMaximum(fhGenPi0Phi->GetMaximum());
1360 else if(fhGenGamPhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenGamPhi->GetMaximum() >= fhGenEtaPhi->GetMaximum() &&
1361 fhGenGamPhi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenGamPhi->GetMaximum() >= fhGenElePhi->GetMaximum())
1362 haxisphi->SetMaximum(fhGenGamPhi->GetMaximum());
1363 else if(fhGenEtaPhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenEtaPhi->GetMaximum() >= fhGenGamPhi->GetMaximum() &&
1364 fhGenEtaPhi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenEtaPhi->GetMaximum() >= fhGenElePhi->GetMaximum())
1365 haxisphi->SetMaximum(fhGenEtaPhi->GetMaximum());
1366 else if(fhGenOmegaPhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenOmegaPhi->GetMaximum() >= fhGenEtaPhi->GetMaximum() &&
1367 fhGenOmegaPhi->GetMaximum() >= fhGenGamPhi->GetMaximum() && fhGenOmegaPhi->GetMaximum() >= fhGenElePhi->GetMaximum())
1368 haxisphi->SetMaximum(fhGenOmegaPhi->GetMaximum());
1369 else if(fhGenElePhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenElePhi->GetMaximum() >= fhGenEtaPhi->GetMaximum() &&
1370 fhGenElePhi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenElePhi->GetMaximum() >= fhGenGamPhi->GetMaximum())
1371 haxisphi->SetMaximum(fhGenElePhi->GetMaximum());
1372 haxisphi->SetMinimum(100);
1373 haxisphi->Draw("axis");
1374 fhGenPi0Phi->Draw("same");
1375 fhGenGamPhi->Draw("same");
1376 fhGenEtaPhi->Draw("same");
1377 fhGenOmegaPhi->Draw("same");
1378 fhGenElePhi->Draw("same");
1380 sprintf(name,"QA_%s_GeneratedDistributions.eps",fCalorimeter.Data());
1384 //Reconstructed clusters depending on its original particle.
1386 sprintf(cname,"QA_%s_recgenid",fCalorimeter.Data());
1387 TCanvas * c11 = new TCanvas(cname, "Reconstructed particles, function of their original particle ID", 400, 400) ;
1393 TH1F * hGamE = (TH1F*) fhGamE->ProjectionX("hGamE",-1,-1);
1394 TH1F * hPi0E = (TH1F*) fhPi0E->ProjectionX("hPi0E",-1,-1);
1395 TH1F * hEleE = (TH1F*) fhEleE->ProjectionX("hEleE",-1,-1);
1396 TH1F * hNeHadE = (TH1F*) fhNeHadE->ProjectionX("hNeHadE",-1,-1);
1397 TH1F * hChHadE = (TH1F*) fhChHadE->ProjectionX("hChHadE",-1,-1);
1398 TH1F * haxisE = (TH1F*) hPi0E->Clone("axisE");
1399 haxisE->SetTitle("Reconstructed particles E, function of their original particle ID");
1400 haxisE->SetAxisRange(minx,maxx,"X");
1402 hPi0E->SetLineColor(1);
1403 hGamE->SetLineColor(4);
1404 hNeHadE->SetLineColor(2);
1405 hChHadE->SetLineColor(7);
1406 hEleE->SetLineColor(6);
1408 //Select the maximum of the histogram to show all lines.
1409 if(hPi0E->GetMaximum() >= hGamE->GetMaximum() && hPi0E->GetMaximum() >= hNeHadE->GetMaximum() &&
1410 hPi0E->GetMaximum() >= hChHadE->GetMaximum() && hPi0E->GetMaximum() >= hEleE->GetMaximum())
1411 haxisE->SetMaximum(hPi0E->GetMaximum());
1412 else if(hGamE->GetMaximum() >= hPi0E->GetMaximum() && hGamE->GetMaximum() >= hNeHadE->GetMaximum() &&
1413 hGamE->GetMaximum() >= hChHadE->GetMaximum() && hGamE->GetMaximum() >= hEleE->GetMaximum())
1414 haxisE->SetMaximum(hGamE->GetMaximum());
1415 else if(hNeHadE->GetMaximum() >= hPi0E->GetMaximum() && hNeHadE->GetMaximum() >= hGamE->GetMaximum() &&
1416 hNeHadE->GetMaximum() >= hChHadE->GetMaximum() && hNeHadE->GetMaximum() >= hEleE->GetMaximum())
1417 haxisE->SetMaximum(hNeHadE->GetMaximum());
1418 else if(hChHadE->GetMaximum() >= hPi0E->GetMaximum() && hChHadE->GetMaximum() >= hNeHadE->GetMaximum() &&
1419 hChHadE->GetMaximum() >= hGamE->GetMaximum() && hChHadE->GetMaximum() >= hEleE->GetMaximum())
1420 haxisE->SetMaximum(hChHadE->GetMaximum());
1421 else if(hEleE->GetMaximum() >= hPi0E->GetMaximum() && hEleE->GetMaximum() >= hNeHadE->GetMaximum() &&
1422 hEleE->GetMaximum() >= hChHadE->GetMaximum() && hEleE->GetMaximum() >= hGamE->GetMaximum())
1423 haxisE->SetMaximum(hEleE->GetMaximum());
1424 haxisE->SetXTitle("E (GeV)");
1425 haxisE->SetMinimum(1);
1426 haxisE->Draw("axis");
1427 hPi0E->Draw("same");
1428 hGamE->Draw("same");
1429 hNeHadE->Draw("same");
1430 hChHadE->Draw("same");
1431 hEleE->Draw("same");
1433 TLegend pLegend2(0.8,0.65,0.95,0.93);
1434 pLegend2.SetTextSize(0.06);
1435 pLegend2.AddEntry(hPi0E," #pi^{0}","L");
1436 pLegend2.AddEntry(hGamE," #gamma","L");
1437 pLegend2.AddEntry(hEleE," e^{#pm}","L");
1438 pLegend2.AddEntry(hChHadE," h^{#pm}","L");
1439 pLegend2.AddEntry(hNeHadE," h^{0}","L");
1440 pLegend2.SetFillColor(10);
1441 pLegend2.SetBorderSize(1);
1447 //printf("%s, %s, %s, %s, %s\n",fhGamPt->GetName(),fhPi0Pt->GetName(),fhElePt->GetName(),fhNeHadPt->GetName(), fhChHadPt->GetName());
1448 TH1F * hGamPt = (TH1F*) fhGamPt->ProjectionX("hGamPt",-1,-1);
1449 TH1F * hPi0Pt = (TH1F*) fhPi0Pt->ProjectionX("hPi0Pt",-1,-1);
1450 TH1F * hElePt = (TH1F*) fhElePt->ProjectionX("hElePt",-1,-1);
1451 TH1F * hNeHadPt = (TH1F*) fhNeHadPt->ProjectionX("hNeHadPt",-1,-1);
1452 TH1F * hChHadPt = (TH1F*) fhChHadPt->ProjectionX("hChHadPt",-1,-1);
1453 haxispt = (TH1F*) hPi0Pt->Clone("axispt");
1454 haxispt->SetTitle("Reconstructed particles p_{T}, function of their original particle ID");
1455 hPi0Pt->SetLineColor(1);
1456 hGamPt->SetLineColor(4);
1457 hNeHadPt->SetLineColor(2);
1458 hChHadPt->SetLineColor(7);
1459 hElePt->SetLineColor(6);
1461 //Select the maximum of the histogram to show all lines.
1462 if(hPi0Pt->GetMaximum() >= hGamPt->GetMaximum() && hPi0Pt->GetMaximum() >= hNeHadPt->GetMaximum() &&
1463 hPi0Pt->GetMaximum() >= hChHadPt->GetMaximum() && hPi0Pt->GetMaximum() >= hElePt->GetMaximum())
1464 haxispt->SetMaximum(hPi0Pt->GetMaximum());
1465 else if(hGamPt->GetMaximum() >= hPi0Pt->GetMaximum() && hGamPt->GetMaximum() >= hNeHadPt->GetMaximum() &&
1466 hGamPt->GetMaximum() >= hChHadPt->GetMaximum() && hGamPt->GetMaximum() >= hElePt->GetMaximum())
1467 haxispt->SetMaximum(hGamPt->GetMaximum());
1468 else if(hNeHadPt->GetMaximum() >= hPi0Pt->GetMaximum() && hNeHadPt->GetMaximum() >= hGamPt->GetMaximum() &&
1469 hNeHadPt->GetMaximum() >= hChHadPt->GetMaximum() && hNeHadPt->GetMaximum() >= hElePt->GetMaximum())
1470 haxispt->SetMaximum(hNeHadPt->GetMaximum());
1471 else if(hChHadPt->GetMaximum() >= hPi0Pt->GetMaximum() && hChHadPt->GetMaximum() >= hNeHadPt->GetMaximum() &&
1472 hChHadPt->GetMaximum() >= hGamPt->GetMaximum() && hChHadPt->GetMaximum() >= hElePt->GetMaximum())
1473 haxispt->SetMaximum(hChHadPt->GetMaximum());
1474 else if(hElePt->GetMaximum() >= hPi0Pt->GetMaximum() && hElePt->GetMaximum() >= hNeHadPt->GetMaximum() &&
1475 hElePt->GetMaximum() >= hChHadPt->GetMaximum() && hElePt->GetMaximum() >= hGamPt->GetMaximum())
1476 haxispt->SetMaximum(hElePt->GetMaximum());
1477 haxispt->SetXTitle("p_{T} (GeV/c)");
1478 haxispt->SetMinimum(1);
1479 haxispt->SetAxisRange(minx,maxx,"X");
1480 haxispt->Draw("axis");
1481 hPi0Pt->Draw("same");
1482 hGamPt->Draw("same");
1483 hNeHadPt->Draw("same");
1484 hChHadPt->Draw("same");
1485 hElePt->Draw("same");
1491 TH1F * hGamEta = (TH1F*) fhGamEta->ProjectionX("hGamEta",-1,-1);
1492 TH1F * hPi0Eta = (TH1F*) fhPi0Eta->ProjectionX("hPi0Eta",-1,-1);
1493 TH1F * hEleEta = (TH1F*) fhEleEta->ProjectionX("hEleEta",-1,-1);
1494 TH1F * hNeHadEta = (TH1F*) fhNeHadEta->ProjectionX("hNeHadEta",-1,-1);
1495 TH1F * hChHadEta = (TH1F*) fhChHadEta->ProjectionX("hChHadEta",-1,-1);
1496 haxiseta = (TH1F*) hPi0Eta->Clone("axiseta");
1497 haxiseta->SetTitle("Reconstructed particles #eta, function of their original particle ID");
1498 hPi0Eta->SetLineColor(1);
1499 hGamEta->SetLineColor(4);
1500 hNeHadEta->SetLineColor(2);
1501 hChHadEta->SetLineColor(7);
1502 hEleEta->SetLineColor(6);
1503 //Select the maximum of the histogram to show all lines.
1504 if(hPi0Eta->GetMaximum() >= hGamEta->GetMaximum() && hPi0Eta->GetMaximum() >= hNeHadEta->GetMaximum() &&
1505 hPi0Eta->GetMaximum() >= hChHadEta->GetMaximum() && hPi0Eta->GetMaximum() >= hEleEta->GetMaximum())
1506 haxiseta->SetMaximum(hPi0Eta->GetMaximum());
1507 else if(hGamEta->GetMaximum() >= hPi0Eta->GetMaximum() && hGamEta->GetMaximum() >= hNeHadEta->GetMaximum() &&
1508 hGamEta->GetMaximum() >= hChHadEta->GetMaximum() && hGamEta->GetMaximum() >= hEleEta->GetMaximum())
1509 haxiseta->SetMaximum(hGamEta->GetMaximum());
1510 else if(hNeHadEta->GetMaximum() >= hPi0Eta->GetMaximum() && hNeHadEta->GetMaximum() >= hGamEta->GetMaximum() &&
1511 hNeHadEta->GetMaximum() >= hChHadEta->GetMaximum() && hNeHadEta->GetMaximum() >= hEleEta->GetMaximum())
1512 haxiseta->SetMaximum(hNeHadEta->GetMaximum());
1513 else if(hChHadEta->GetMaximum() >= hPi0Eta->GetMaximum() && hChHadEta->GetMaximum() >= hNeHadEta->GetMaximum() &&
1514 hChHadEta->GetMaximum() >= hGamEta->GetMaximum() && hChHadEta->GetMaximum() >= hEleEta->GetMaximum())
1515 haxiseta->SetMaximum(hChHadEta->GetMaximum());
1516 else if(hEleEta->GetMaximum() >= hPi0Eta->GetMaximum() && hEleEta->GetMaximum() >= hNeHadEta->GetMaximum() &&
1517 hEleEta->GetMaximum() >= hChHadEta->GetMaximum() && hEleEta->GetMaximum() >= hGamEta->GetMaximum())
1518 haxiseta->SetMaximum(hEleEta->GetMaximum());
1520 haxiseta->SetXTitle("#eta");
1521 haxiseta->Draw("axis");
1522 hPi0Eta->Draw("same");
1523 hGamEta->Draw("same");
1524 hNeHadEta->Draw("same");
1525 hChHadEta->Draw("same");
1526 hEleEta->Draw("same");
1531 TH1F * hGamPhi = (TH1F*) fhGamPhi->ProjectionX("hGamPhi",-1,-1);
1532 TH1F * hPi0Phi = (TH1F*) fhPi0Phi->ProjectionX("hPi0Phi",-1,-1);
1533 TH1F * hElePhi = (TH1F*) fhElePhi->ProjectionX("hElePhi",-1,-1);
1534 TH1F * hNeHadPhi = (TH1F*) fhNeHadPhi->ProjectionX("hNeHadPhi",-1,-1);
1535 TH1F * hChHadPhi = (TH1F*) fhChHadPhi->ProjectionX("hChHadPhi",-1,-1);
1536 haxisphi = (TH1F*) hPi0Phi->Clone("axisphi");
1537 haxisphi->SetTitle("Reconstructed particles #phi, function of their original particle ID");
1539 hPi0Phi->SetLineColor(1);
1540 hGamPhi->SetLineColor(4);
1541 hNeHadPhi->SetLineColor(2);
1542 hChHadPhi->SetLineColor(7);
1543 hElePhi->SetLineColor(6);
1544 //Select the maximum of the histogram to show all lines.
1545 if(hPi0Phi->GetMaximum() >= hGamPhi->GetMaximum() && hPi0Phi->GetMaximum() >= hNeHadPhi->GetMaximum() &&
1546 hPi0Phi->GetMaximum() >= hChHadPhi->GetMaximum() && hPi0Phi->GetMaximum() >= hElePhi->GetMaximum())
1547 haxisphi->SetMaximum(hPi0Phi->GetMaximum());
1548 else if(hGamPhi->GetMaximum() >= hPi0Phi->GetMaximum() && hGamPhi->GetMaximum() >= hNeHadPhi->GetMaximum() &&
1549 hGamPhi->GetMaximum() >= hChHadPhi->GetMaximum() && hGamPhi->GetMaximum() >= hElePhi->GetMaximum())
1550 haxisphi->SetMaximum(hGamPhi->GetMaximum());
1551 else if(hNeHadPhi->GetMaximum() >= hPi0Phi->GetMaximum() && hNeHadPhi->GetMaximum() >= hGamPhi->GetMaximum() &&
1552 hNeHadPhi->GetMaximum() >= hChHadPhi->GetMaximum() && hNeHadPhi->GetMaximum() >= hElePhi->GetMaximum())
1553 haxisphi->SetMaximum(hNeHadPhi->GetMaximum());
1554 else if(hChHadPhi->GetMaximum() >= hPi0Phi->GetMaximum() && hChHadPhi->GetMaximum() >= hNeHadPhi->GetMaximum() &&
1555 hChHadPhi->GetMaximum() >= hGamPhi->GetMaximum() && hChHadPhi->GetMaximum() >= hElePhi->GetMaximum())
1556 haxisphi->SetMaximum(hChHadPhi->GetMaximum());
1557 else if(hElePhi->GetMaximum() >= hPi0Phi->GetMaximum() && hElePhi->GetMaximum() >= hNeHadPhi->GetMaximum() &&
1558 hElePhi->GetMaximum() >= hChHadPhi->GetMaximum() && hElePhi->GetMaximum() >= hGamPhi->GetMaximum())
1559 haxisphi->SetMaximum(hElePhi->GetMaximum());
1560 haxisphi->SetXTitle("#phi (rad)");
1561 haxisphi->Draw("axis");
1562 hPi0Phi->Draw("same");
1563 hGamPhi->Draw("same");
1564 hNeHadPhi->Draw("same");
1565 hChHadPhi->Draw("same");
1566 hElePhi->Draw("same");
1568 sprintf(name,"QA_%s_RecDistributionsGenID.eps",fCalorimeter.Data());
1572 //Ratio reconstructed clusters / generated particles in acceptance, for different particle ID
1575 TH1F * hPi0EClone = (TH1F*) hPi0E ->Clone("hPi0EClone");
1576 TH1F * hGamEClone = (TH1F*) hGamE ->Clone("hGamEClone");
1577 TH1F * hPi0PtClone = (TH1F*) hPi0Pt ->Clone("hPi0PtClone");
1578 TH1F * hGamPtClone = (TH1F*) hGamPt ->Clone("hGamPtClone");
1579 TH1F * hPi0EtaClone = (TH1F*) hPi0Eta->Clone("hPi0EtaClone");
1580 TH1F * hGamEtaClone = (TH1F*) hGamEta->Clone("hGamEtaClone");
1581 TH1F * hPi0PhiClone = (TH1F*) hPi0Phi->Clone("hPi0PhiClone");
1582 TH1F * hGamPhiClone = (TH1F*) hGamPhi->Clone("hGamPhiClone");
1584 sprintf(cname,"QA_%s_recgenidratio",fCalorimeter.Data());
1585 TCanvas * c12 = new TCanvas(cname, "Ratio reconstructed clusters / generated particles in acceptance, for different particle ID", 400, 400) ;
1590 haxisE->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID");
1591 hPi0EClone->Divide(fhGenPi0AccE);
1592 hGamEClone->Divide(fhGenGamAccE);
1593 haxisE->SetMaximum(1000);
1594 haxisE->SetMinimum(1e-2);
1595 haxisE->SetXTitle("E (GeV)");
1596 haxisE->SetYTitle("ratio = rec/gen");
1597 haxisE->Draw("axis");
1598 hPi0E->Draw("same");
1599 hGamE->Draw("same");
1601 TLegend pLegend3(0.75,0.2,0.9,0.4);
1602 pLegend3.SetTextSize(0.06);
1603 pLegend3.AddEntry(hPi0EClone," #pi^{0}","L");
1604 pLegend3.AddEntry(hGamEClone," #gamma","L");
1605 pLegend3.SetFillColor(10);
1606 pLegend3.SetBorderSize(1);
1611 haxispt->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID");
1612 hPi0PtClone->Divide(fhGenPi0AccPt);
1613 hGamPtClone->Divide(fhGenGamAccPt);
1614 haxispt->SetMaximum(5);
1615 haxispt->SetMinimum(1e-2);
1616 haxispt->SetXTitle("p_{T} (GeV/c)");
1617 haxispt->SetYTitle("ratio = rec/gen");
1618 haxispt->Draw("axis");
1619 hPi0PtClone->Draw("same");
1620 hGamPtClone->Draw("same");
1625 haxiseta->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID");
1626 hPi0EtaClone->Divide(fhGenPi0AccEta);
1627 hGamEtaClone->Divide(fhGenGamAccEta);
1628 haxiseta->SetMaximum(1.2);
1629 haxiseta->SetMinimum(1e-2);
1630 haxiseta->SetYTitle("ratio = rec/gen");
1631 haxiseta->SetXTitle("#eta");
1632 haxiseta->Draw("axis");
1633 hPi0EtaClone->Draw("same");
1634 hGamEtaClone->Draw("same");
1639 haxisphi->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID");
1640 hPi0PhiClone->Divide(fhGenPi0AccPhi);
1641 hGamPhiClone->Divide(fhGenGamAccPhi);
1642 haxisphi->SetYTitle("ratio = rec/gen");
1643 haxisphi->SetXTitle("#phi (rad)");
1644 haxisphi->SetMaximum(1.2);
1645 haxisphi->SetMinimum(1e-2);
1646 haxisphi->Draw("axis");
1647 hPi0PhiClone->Draw("same");
1648 hGamPhiClone->Draw("same");
1650 sprintf(name,"QA_%s_EfficiencyGenID.eps",fCalorimeter.Data());
1654 //Reconstructed distributions
1656 sprintf(cname,"QA_%s_vertex",fCalorimeter.Data());
1657 TCanvas * c13 = new TCanvas(cname, "Particle vertex", 400, 400) ;
1662 fhEMVxyz->SetTitleOffset(1.6,"Y");
1667 fhHaVxyz->SetTitleOffset(1.6,"Y");
1672 TH1F * hEMR = (TH1F*) fhEMR->ProjectionY("hEM",-1,-1);
1673 hEMR->SetLineColor(4);
1678 TH1F * hHaR = (TH1F*) fhHaR->ProjectionY("hHa",-1,-1);
1679 hHaR->SetLineColor(4);
1683 sprintf(name,"QA_%s_ParticleVertex.eps",fCalorimeter.Data());
1687 //Track-matching distributions
1690 //Reconstructed distributions, matched with tracks, generated particle dependence
1692 sprintf(cname,"QA_%s_rectrackmatchGenID",fCalorimeter.Data());
1693 TCanvas * c22ch = new TCanvas(cname, "Reconstructed distributions, matched with tracks, for different particle ID", 400, 400) ;
1694 c22ch->Divide(2, 2);
1698 TH1F * hGamECharged = (TH1F*) fhGamECharged->ProjectionX("hGamECharged",-1,-1);
1699 TH1F * hPi0ECharged = (TH1F*) fhPi0ECharged->ProjectionX("hPi0ECharged",-1,-1);
1700 TH1F * hEleECharged = (TH1F*) fhEleECharged->ProjectionX("hEleECharged",-1,-1);
1701 TH1F * hNeHadECharged = (TH1F*) fhNeHadECharged->ProjectionX("hNeHadECharged",-1,-1);
1702 TH1F * hChHadECharged = (TH1F*) fhChHadECharged->ProjectionX("hChHadECharged",-1,-1);
1703 hPi0ECharged->SetLineColor(1);
1704 hGamECharged->SetLineColor(4);
1705 hNeHadECharged->SetLineColor(2);
1706 hChHadECharged->SetLineColor(7);
1707 hEleECharged->SetLineColor(6);
1709 fhECharged->SetLineColor(3);
1710 fhECharged->SetMinimum(0.5);
1712 hPi0ECharged->Draw("same");
1713 hGamECharged->Draw("same");
1714 hNeHadECharged->Draw("same");
1715 hChHadECharged->Draw("same");
1716 hEleECharged->Draw("same");
1717 TLegend pLegend22(0.75,0.45,0.9,0.8);
1718 pLegend22.SetTextSize(0.06);
1719 pLegend22.AddEntry(fhECharged,"all","L");
1720 pLegend22.AddEntry(hPi0ECharged,"#pi^{0}","L");
1721 pLegend22.AddEntry(hGamECharged,"#gamma","L");
1722 pLegend22.AddEntry(hEleECharged,"e^{#pm}","L");
1723 pLegend22.AddEntry(hChHadECharged,"h^{#pm}","L");
1724 pLegend22.AddEntry(hNeHadECharged,"h^{0}","L");
1725 pLegend22.SetFillColor(10);
1726 pLegend22.SetBorderSize(1);
1731 TH1F * hGamPtCharged = (TH1F*) fhGamPtCharged->ProjectionX("hGamPtCharged",-1,-1);
1732 TH1F * hPi0PtCharged = (TH1F*) fhPi0PtCharged->ProjectionX("hPi0PtCharged",-1,-1);
1733 TH1F * hElePtCharged = (TH1F*) fhElePtCharged->ProjectionX("hElePtCharged",-1,-1);
1734 TH1F * hNeHadPtCharged = (TH1F*) fhNeHadPtCharged->ProjectionX("hNeHadPtCharged",-1,-1);
1735 TH1F * hChHadPtCharged = (TH1F*) fhChHadPtCharged->ProjectionX("hChHadPtCharged",-1,-1);
1736 hPi0PtCharged->SetLineColor(1);
1737 hGamPtCharged->SetLineColor(4);
1738 hNeHadPtCharged->SetLineColor(2);
1739 hChHadPtCharged->SetLineColor(7);
1740 hElePtCharged->SetLineColor(6);
1742 fhPtCharged->SetLineColor(3);
1743 fhPtCharged->SetMinimum(0.5);
1744 fhPtCharged->Draw();
1745 hPi0PtCharged->Draw("same");
1746 hGamPtCharged->Draw("same");
1747 hNeHadPtCharged->Draw("same");
1748 hChHadPtCharged->Draw("same");
1749 hElePtCharged->Draw("same");
1753 TH1F * hGamEtaCharged = (TH1F*) fhGamEtaCharged->ProjectionX("hGamEtaCharged",-1,-1);
1754 TH1F * hPi0EtaCharged = (TH1F*) fhPi0EtaCharged->ProjectionX("hPi0EtaCharged",-1,-1);
1755 TH1F * hEleEtaCharged = (TH1F*) fhEleEtaCharged->ProjectionX("hEleEtaCharged",-1,-1);
1756 TH1F * hNeHadEtaCharged = (TH1F*) fhNeHadEtaCharged->ProjectionX("hNeHadEtaCharged",-1,-1);
1757 TH1F * hChHadEtaCharged = (TH1F*) fhChHadEtaCharged->ProjectionX("hChHadEtaCharged",-1,-1);
1758 hPi0EtaCharged->SetLineColor(1);
1759 hGamEtaCharged->SetLineColor(4);
1760 hNeHadEtaCharged->SetLineColor(2);
1761 hChHadEtaCharged->SetLineColor(7);
1762 hEleEtaCharged->SetLineColor(6);
1764 fhEtaCharged->SetLineColor(3);
1765 fhEtaCharged->SetMinimum(0.5);
1766 fhEtaCharged->Draw();
1767 hPi0EtaCharged->Draw("same");
1768 hGamEtaCharged->Draw("same");
1769 hNeHadEtaCharged->Draw("same");
1770 hChHadEtaCharged->Draw("same");
1771 hEleEtaCharged->Draw("same");
1775 TH1F * hGamPhiCharged = (TH1F*) fhGamPhiCharged->ProjectionX("hGamPhiCharged",-1,-1);
1776 TH1F * hPi0PhiCharged = (TH1F*) fhPi0PhiCharged->ProjectionX("hPi0PhiCharged",-1,-1);
1777 TH1F * hElePhiCharged = (TH1F*) fhElePhiCharged->ProjectionX("hElePhiCharged",-1,-1);
1778 TH1F * hNeHadPhiCharged = (TH1F*) fhNeHadPhiCharged->ProjectionX("hNeHadPhiCharged",-1,-1);
1779 TH1F * hChHadPhiCharged = (TH1F*) fhChHadPhiCharged->ProjectionX("hChHadPhiCharged",-1,-1);
1780 hPi0PhiCharged->SetLineColor(1);
1781 hGamPhiCharged->SetLineColor(4);
1782 hNeHadPhiCharged->SetLineColor(2);
1783 hChHadPhiCharged->SetLineColor(7);
1784 hElePhiCharged->SetLineColor(6);
1786 fhPhiCharged->SetLineColor(3);
1787 fhPhiCharged->SetMinimum(0.5);
1788 fhPhiCharged->Draw();
1789 hPi0PhiCharged->Draw("same");
1790 hGamPhiCharged->Draw("same");
1791 hNeHadPhiCharged->Draw("same");
1792 hChHadPhiCharged->Draw("same");
1793 hElePhiCharged->Draw("same");
1796 sprintf(name,"QA_%s_ReconstructedDistributions_TrackMatchedGenID.eps",fCalorimeter.Data());
1799 TH1F * hGamEChargedClone = (TH1F*) hGamECharged->Clone("GamEChargedClone");
1800 TH1F * hGamPtChargedClone = (TH1F*) hGamPtCharged->Clone("GamPtChargedClone");
1801 TH1F * hGamEtaChargedClone = (TH1F*) hGamEtaCharged->Clone("GamEtaChargedClone");
1802 TH1F * hGamPhiChargedClone = (TH1F*) hGamPhiCharged->Clone("GamPhiChargedClone");
1804 TH1F * hPi0EChargedClone = (TH1F*) hPi0ECharged->Clone("Pi0EChargedClone");
1805 TH1F * hPi0PtChargedClone = (TH1F*) hPi0PtCharged->Clone("Pi0PtChargedClone");
1806 TH1F * hPi0EtaChargedClone = (TH1F*) hPi0EtaCharged->Clone("Pi0EtaChargedClone");
1807 TH1F * hPi0PhiChargedClone = (TH1F*) hPi0PhiCharged->Clone("Pi0PhiChargedClone");
1809 TH1F * hEleEChargedClone = (TH1F*) hEleECharged->Clone("EleEChargedClone");
1810 TH1F * hElePtChargedClone = (TH1F*) hElePtCharged->Clone("ElePtChargedClone");
1811 TH1F * hEleEtaChargedClone = (TH1F*) hEleEtaCharged->Clone("EleEtaChargedClone");
1812 TH1F * hElePhiChargedClone = (TH1F*) hElePhiCharged->Clone("ElePhiChargedClone");
1814 TH1F * hNeHadEChargedClone = (TH1F*) hNeHadECharged->Clone("NeHadEChargedClone");
1815 TH1F * hNeHadPtChargedClone = (TH1F*) hNeHadPtCharged->Clone("NeHadPtChargedClone");
1816 TH1F * hNeHadEtaChargedClone = (TH1F*) hNeHadEtaCharged->Clone("NeHadEtaChargedClone");
1817 TH1F * hNeHadPhiChargedClone = (TH1F*) hNeHadPhiCharged->Clone("NeHadPhiChargedClone");
1819 TH1F * hChHadEChargedClone = (TH1F*) hChHadECharged->Clone("ChHadEChargedClone");
1820 TH1F * hChHadPtChargedClone = (TH1F*) hChHadPtCharged->Clone("ChHadPtChargedClone");
1821 TH1F * hChHadEtaChargedClone = (TH1F*) hChHadEtaCharged->Clone("ChHadEtaChargedClone");
1822 TH1F * hChHadPhiChargedClone = (TH1F*) hChHadPhiCharged->Clone("ChHadPhiChargedClone");
1824 //Ratio: reconstructed track matched/ all reconstructed
1826 sprintf(cname,"QA_%s_rectrackmatchratGenID",fCalorimeter.Data());
1827 TCanvas * c3ch = new TCanvas(cname, "Ratio: reconstructed track matched/ all reconstructed, for different particle ID", 400, 400) ;
1831 hEChargedClone->SetMaximum(1.2);
1832 hEChargedClone->SetMinimum(0.001);
1833 hEChargedClone->SetLineColor(3);
1834 hEChargedClone->SetYTitle("track matched / all");
1835 hPi0EChargedClone->Divide(hPi0E);
1836 hGamEChargedClone->Divide(hGamE);
1837 hEleEChargedClone->Divide(hEleE);
1838 hNeHadEChargedClone->Divide(hNeHadE);
1839 hChHadEChargedClone->Divide(hChHadE);
1840 hEChargedClone->Draw();
1841 hPi0EChargedClone->Draw("same");
1842 hGamEChargedClone->Draw("same");
1843 hEleEChargedClone->Draw("same");
1844 hNeHadEChargedClone->Draw("same");
1845 hChHadEChargedClone->Draw("same");
1847 TLegend pLegend3ch(0.75,0.45,0.9,0.8);
1848 pLegend3ch.SetTextSize(0.06);
1849 pLegend3ch.AddEntry(hEChargedClone,"all","L");
1850 pLegend3ch.AddEntry(hPi0EChargedClone,"#pi^{0}","L");
1851 pLegend3ch.AddEntry(hGamEChargedClone,"#gamma","L");
1852 pLegend3ch.AddEntry(hEleEChargedClone,"e^{#pm}","L");
1853 pLegend3ch.AddEntry(hChHadEChargedClone,"h^{#pm}","L");
1854 pLegend3ch.AddEntry(hNeHadEChargedClone,"h^{0}","L");
1855 pLegend3ch.SetFillColor(10);
1856 pLegend3ch.SetBorderSize(1);
1860 hPtChargedClone->SetMaximum(1.2);
1861 hPtChargedClone->SetMinimum(0.001);
1862 hPtChargedClone->SetLineColor(3);
1863 hPtChargedClone->SetYTitle("track matched / all");
1864 hPi0PtChargedClone->Divide(hPi0Pt);
1865 hGamPtChargedClone->Divide(hGamPt);
1866 hElePtChargedClone->Divide(hElePt);
1867 hNeHadPtChargedClone->Divide(hNeHadPt);
1868 hChHadPtChargedClone->Divide(hChHadPt);
1869 hPtChargedClone->Draw();
1870 hPi0PtChargedClone->Draw("same");
1871 hGamPtChargedClone->Draw("same");
1872 hElePtChargedClone->Draw("same");
1873 hNeHadPtChargedClone->Draw("same");
1874 hChHadPtChargedClone->Draw("same");
1877 hEtaChargedClone->SetMaximum(1.2);
1878 hEtaChargedClone->SetMinimum(0.001);
1879 hEtaChargedClone->SetLineColor(3);
1880 hEtaChargedClone->SetYTitle("track matched / all");
1881 hPi0EtaChargedClone->Divide(hPi0Eta);
1882 hGamEtaChargedClone->Divide(hGamEta);
1883 hEleEtaChargedClone->Divide(hEleEta);
1884 hNeHadEtaChargedClone->Divide(hNeHadEta);
1885 hChHadEtaChargedClone->Divide(hChHadEta);
1886 hEtaChargedClone->Draw();
1887 hPi0EtaChargedClone->Draw("same");
1888 hGamEtaChargedClone->Draw("same");
1889 hEleEtaChargedClone->Draw("same");
1890 hNeHadEtaChargedClone->Draw("same");
1891 hChHadEtaChargedClone->Draw("same");
1894 hPhiChargedClone->SetMaximum(1.2);
1895 hPhiChargedClone->SetMinimum(0.001);
1896 hPhiChargedClone->SetLineColor(3);
1897 hPhiChargedClone->SetYTitle("track matched / all");
1898 hPi0PhiChargedClone->Divide(hPi0Phi);
1899 hGamPhiChargedClone->Divide(hGamPhi);
1900 hElePhiChargedClone->Divide(hElePhi);
1901 hNeHadPhiChargedClone->Divide(hNeHadPhi);
1902 hChHadPhiChargedClone->Divide(hChHadPhi);
1903 hPhiChargedClone->Draw();
1904 hPi0PhiChargedClone->Draw("same");
1905 hGamPhiChargedClone->Draw("same");
1906 hElePhiChargedClone->Draw("same");
1907 hNeHadPhiChargedClone->Draw("same");
1908 hChHadPhiChargedClone->Draw("same");
1910 sprintf(name,"QA_%s_RatioReconstructedMatchedDistributionsGenID.eps",fCalorimeter.Data());
1913 sprintf(cname,"QA_%s_trkmatchMCEle",fCalorimeter.Data());
1914 TCanvas *cmemc = new TCanvas(cname,"Track-matching distributions from MC electrons", 600, 200);
1919 fhMCEle1pOverE->Draw();
1920 fhMCEle1pOverER02->SetLineColor(4);
1921 fhMCEle1pOverE->SetLineColor(1);
1922 fhMCEle1pOverER02->Draw("same");
1930 fhMCEle2MatchdEdx->Draw();
1932 sprintf(name,"QA_%s_TrackMatchingDistMCEle.eps",fCalorimeter.Data());
1935 sprintf(cname,"QA_%s_trkmatchMCChHad",fCalorimeter.Data());
1936 TCanvas *cmemchad = new TCanvas(cname,"Track-matching distributions from MC charged hadrons", 600, 200);
1937 cmemchad->Divide(3,1);
1941 fhMCChHad1pOverE->Draw();
1942 fhMCChHad1pOverE->SetLineColor(1);
1943 fhMCChHad1pOverER02->SetLineColor(4);
1944 fhMCChHad1pOverER02->Draw("same");
1949 fhMCChHad1dR->Draw();
1952 fhMCChHad2MatchdEdx->Draw();
1954 sprintf(name,"QA_%s_TrackMatchingDistMCChHad.eps",fCalorimeter.Data());
1955 cmemchad->Print(name);
1957 sprintf(cname,"QA_%s_trkmatchMCNeutral",fCalorimeter.Data());
1958 TCanvas *cmemcn = new TCanvas(cname,"Track-matching distributions from MC neutrals", 600, 200);
1959 cmemcn->Divide(3,1);
1963 fhMCNeutral1pOverE->Draw();
1964 fhMCNeutral1pOverE->SetLineColor(1);
1965 fhMCNeutral1pOverER02->SetLineColor(4);
1966 fhMCNeutral1pOverER02->Draw("same");
1971 fhMCNeutral1dR->Draw();
1974 fhMCNeutral2MatchdEdx->Draw();
1976 sprintf(name,"QA_%s_TrackMatchingDistMCNeutral.eps",fCalorimeter.Data());
1977 cmemcn->Print(name);
1979 sprintf(cname,"QA_%s_trkmatchpE",fCalorimeter.Data());
1980 TCanvas *cmpoe = new TCanvas(cname,"Track-matching distributions, p/E", 400, 200);
1985 fh1pOverE->SetLineColor(1);
1986 fhMCEle1pOverE->SetLineColor(4);
1987 fhMCChHad1pOverE->SetLineColor(2);
1988 fhMCNeutral1pOverE->SetLineColor(7);
1989 fh1pOverE->SetMinimum(0.5);
1991 fhMCEle1pOverE->Draw("same");
1992 fhMCChHad1pOverE->Draw("same");
1993 fhMCNeutral1pOverE->Draw("same");
1994 TLegend pLegendpE(0.65,0.55,0.9,0.8);
1995 pLegendpE.SetTextSize(0.06);
1996 pLegendpE.AddEntry(fh1pOverE,"all","L");
1997 pLegendpE.AddEntry(fhMCEle1pOverE,"e^{#pm}","L");
1998 pLegendpE.AddEntry(fhMCChHad1pOverE,"h^{#pm}","L");
1999 pLegendpE.AddEntry(fhMCNeutral1pOverE,"neutrals","L");
2000 pLegendpE.SetFillColor(10);
2001 pLegendpE.SetBorderSize(1);
2006 fh1pOverER02->SetTitle("Track matches p/E, dR<0.2");
2007 fh1pOverER02->SetLineColor(1);
2008 fhMCEle1pOverER02->SetLineColor(4);
2009 fhMCChHad1pOverER02->SetLineColor(2);
2010 fhMCNeutral1pOverER02->SetLineColor(7);
2011 fh1pOverER02->SetMaximum(fh1pOverE->GetMaximum());
2012 fh1pOverER02->SetMinimum(0.5);
2013 fh1pOverER02->Draw();
2014 fhMCEle1pOverER02->Draw("same");
2015 fhMCChHad1pOverER02->Draw("same");
2016 fhMCNeutral1pOverER02->Draw("same");
2018 // TLegend pLegendpE2(0.65,0.55,0.9,0.8);
2019 // pLegendpE2.SetTextSize(0.06);
2020 // pLegendpE2.SetHeader("dR < 0.02");
2021 // pLegendpE2.SetFillColor(10);
2022 // pLegendpE2.SetBorderSize(1);
2023 // pLegendpE2.Draw();
2024 //Track matching histograms
2025 sprintf(name,"QA_%s_TrackMatchingPOverE.eps",fCalorimeter.Data());
2027 }//MC related histograms
2029 // char line[1024] ;
2030 // sprintf(line, ".!tar -zcf QA_%s_%s.tar.gz *%s*.eps", fCalorimeter.Data(), GetName(),fCalorimeter.Data()) ;
2031 // gROOT->ProcessLine(line);
2032 // sprintf(line, ".!rm -fR *.eps");
2033 // gROOT->ProcessLine(line);
2035 // printf("AliAnaCalorimeterQA::Terminate() - !! All the pdf files are in QA_%s_%s.tar.gz !!!\n", fCalorimeter.Data(), GetName());