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 TH2F * fhNCellsPerClusterMIP; //! N cells per cluster
36 TH1F * fhNClusters; //! Number of clusters
39 TH1F * fhNCells; //! Number of towers/crystals with signal
40 TH1F * fhAmplitude; //! Amplitude measured in towers/crystals
41 TH1F * fhAmpId; //! Amplitude measured vs towers/crystals id
42 TH1F * fhTime; //! Time measured in towers/crystals
43 TH2F * fhTimeId; //! Time vs Absolute cell Id
44 TH2F * fhTimeAmp; //! Time vs Amplitude
46 //Calorimeters Correlation
47 TH2F * fhCaloCorrNClusters; // EMCAL vs PHOS, number of clusters
48 TH2F * fhCaloCorrEClusters; // EMCAL vs PHOS, total measured cluster energy
49 TH2F * fhCaloCorrNCells; // EMCAL vs PHOS, number of cells
50 TH2F * fhCaloCorrECells; // EMCAL vs PHOS, total measured cell energy
53 TH1F ** fhEMod ; //! E distribution for different module, Reco
54 TH1F ** fhNClustersMod ; //! Number of clusters for different module, Reco
55 TH2F ** fhNCellsPerClusterMod ; //! N cells per clusters different module, Reco
56 TH1F ** fhNCellsMod ; //! Number of towers/crystals with signal different module, Reco
57 TH2F ** fhGridCellsMod ; //! Cells ordered in column/row for different module, Reco
58 TH2F ** fhGridCellsEMod ; //! Cells ordered in column/row for different module, weighted with energy, Reco
59 TH1F ** fhAmplitudeMod ; //! Amplitude measured in towers/crystals different module, Reco
60 TH2F ** fhIMMod; //! cluster pairs invariant mass, different module,
61 TH2F ** fhIMCellCutMod; //! cluster pairs invariant mass, n cells > 1 per cluster, different module
65 TH1F *fhGenGamPt ; // pt of primary gamma
66 TH1F *fhGenGamEta ; // eta of primart gamma
67 TH1F *fhGenGamPhi ; // phi of primary gamma
68 TH1F *fhGenPi0Pt ; // pt of primary pi0
69 TH1F *fhGenPi0Eta ; // eta of primart pi0
70 TH1F *fhGenPi0Phi ; // phi of primary pi0
71 TH1F *fhGenEtaPt ; // pt of primary eta
72 TH1F *fhGenEtaEta ; // eta of primart eta
73 TH1F *fhGenEtaPhi ; // phi of primary eta
74 TH1F *fhGenOmegaPt ; // pt of primary omega
75 TH1F *fhGenOmegaEta ; // eta of primart omega
76 TH1F *fhGenOmegaPhi ; // phi of primary omega
77 TH1F *fhGenElePt ; // pt of primary electron
78 TH1F *fhGenEleEta ; // eta of primart electron
79 TH1F *fhGenElePhi ; // phi of primary electron
81 //TH3F * fhEMVxyz ; // Electromagnetic particle production vertex
82 TH2F * fhEMVxyz ; // Electromagnetic particle production vertex
83 TH2F * fhEMR ; // Electromagnetic distance to vertex vs rec energy
84 //TH3F * fhHaVxyz ; // Hadron production vertex
85 TH2F * fhHaVxyz ; // Hadron production vertex
86 TH2F * fhHaR ; // Hadron distance to vertex vs rec energy
88 TH2F * fhGamE ; //! E distribution of generated photons, Reco
89 TH2F * fhGamPt ; //! pT distribution of generated photons, Reco
90 TH2F * fhGamPhi; //! phi distribution of generated photon, Reco
91 TH2F * fhGamEta; //! eta distribution of generated photons, Reco
92 TH1F * fhGamDeltaE ; //! MC-Reco E distribution of generated photons
93 TH1F * fhGamDeltaPt ; //! MC-Reco pT distribution of generated photons
94 TH1F * fhGamDeltaPhi; //! MC-Reco phi distribution of generated photons
95 TH1F * fhGamDeltaEta; //! MC-Reco eta distribution of generated photons
96 TH1F * fhGamRatioE ; //! Reco/MC E distribution of generated photons
97 TH1F * fhGamRatioPt ; //! Reco/MC pT distribution of generated photons
98 TH1F * fhGamRatioPhi; //! Reco/MC phi distribution of generated photons
99 TH1F * fhGamRatioEta; //! Reco/MC eta distribution of generated photons
100 TH2F * fhEleE ; //! E distribution of generated electrons, Reco
101 TH2F * fhElePt ; //! pT distribution of generated electrons, Reco
102 TH2F * fhElePhi; //! phi distribution of generated electron, Reco
103 TH2F * fhEleEta; //! eta distribution of generated electrons, Reco
104 TH2F * fhPi0E ; //! E distribution of generated pi0, Reco, gamma decay overlapped
105 TH2F * fhPi0Pt ; //! pT distribution of generated pi0, Reco, gamma decay overlapped
106 TH2F * fhPi0Phi; //! phi distribution of generated pi0, Reco, gamma decay overlapped
107 TH2F * fhPi0Eta; //! eta distribution of generated pi0, Reco, gamma decay overlapped
108 TH2F * fhNeHadE ; //! E distribution of generated neutral hadron, Reco
109 TH2F * fhNeHadPt ; //! pT distribution of generated neutral hadron, Reco
110 TH2F * fhNeHadPhi; //! phi distribution of generated neutral hadron, Reco
111 TH2F * fhNeHadEta; //! eta distribution of generated neutral hadron, Reco
112 TH2F * fhChHadE ; //! E distribution of generated charged hadron, Reco
113 TH2F * fhChHadPt ; //! pT distribution of generated charged hadron, Reco
114 TH2F * fhChHadPhi; //! phi distribution of generated charged hadron, Reco
115 TH2F * fhChHadEta; //! eta distribution of generated charged hadron, Reco
117 TH2F * fhGamECharged ; //! E distribution of generated photons, Reco, track matched cluster
118 TH2F * fhGamPtCharged ; //! pT distribution of generated photons, Reco, track matched cluster
119 TH2F * fhGamPhiCharged; //! phi distribution of generated photon, Reco, track matched cluster
120 TH2F * fhGamEtaCharged; //! eta distribution of generated photons, Reco, track matched cluster
121 TH2F * fhEleECharged ; //! E distribution of generated electrons, Reco, track matched cluster
122 TH2F * fhElePtCharged ; //! pT distribution of generated electrons, Reco, track matched cluster
123 TH2F * fhElePhiCharged; //! phi distribution of generated electron, Reco, track matched cluster
124 TH2F * fhEleEtaCharged; //! eta distribution of generated electrons, Reco, track matched cluster
125 TH2F * fhPi0ECharged ; //! E distribution of generated pi0, Reco, gamma decay overlapped, track matched cluster
126 TH2F * fhPi0PtCharged ; //! pT distribution of generated pi0, Reco, gamma decay overlapped, track matched cluster
127 TH2F * fhPi0PhiCharged; //! phi distribution of generated pi0, Reco, gamma decay overlapped, track matched cluster
128 TH2F * fhPi0EtaCharged; //! eta distribution of generated pi0, Reco, gamma decay overlapped, track matched cluster
129 TH2F * fhNeHadECharged ; //! E distribution of generated neutral hadron, Reco, track matched cluster
130 TH2F * fhNeHadPtCharged ; //! pT distribution of generated neutral hadron, Reco, track matched cluster
131 TH2F * fhNeHadPhiCharged; //! phi distribution of generated neutral hadron, Reco , track matched cluster
132 TH2F * fhNeHadEtaCharged; //! eta distribution of generated neutral hadron, Reco, track matched cluster
133 TH2F * fhChHadECharged ; //! E distribution of generated charged hadron, Reco, track matched cluster
134 TH2F * fhChHadPtCharged ; //! pT distribution of generated charged hadron, Reco, track matched cluster
135 TH2F * fhChHadPhiCharged; //! phi distribution of generated charged hadron, Reco, track matched cluster
136 TH2F * fhChHadEtaCharged; //! eta distribution of generated charged hadron, Reco, track matched cluster
138 TH1F *fhGenGamAccE ; // E of primary gamma
139 TH1F *fhGenGamAccPt ; // pt of primary gamma
140 TH1F *fhGenGamAccEta ; // eta of primart gamma
141 TH1F *fhGenGamAccPhi ; // phi of primary gamma
142 TH1F *fhGenPi0AccE ; // E of primary pi0
143 TH1F *fhGenPi0AccPt ; // pt of primary pi0
144 TH1F *fhGenPi0AccEta ; // eta of primart pi0
145 TH1F *fhGenPi0AccPhi ; // phi of primary pi0
147 //Histograms for track-matching
148 TH2F *fh1pOverE; //! p/E for track-cluster matches
149 TH1F *fh1dR; //! distance between projected track and cluster
150 TH2F *fh2EledEdx; //! dE/dx vs. momentum for electron candidates
151 TH2F *fh2MatchdEdx; //! dE/dx vs. momentum for all matches
152 TH2F *fhMCEle1pOverE; //! p/E for track-cluster matches, MC electrons
153 TH1F *fhMCEle1dR; //! distance between projected track and cluster, MC electrons
154 TH2F *fhMCEle2MatchdEdx; //! dE/dx vs. momentum for all matches, MC electrons
156 TH2F *fhMCChHad1pOverE; //! p/E for track-cluster matches, MC charged hadrons
157 TH1F *fhMCChHad1dR; //! distance between projected track and cluster, MC charged hadrons
158 TH2F *fhMCChHad2MatchdEdx; //! dE/dx vs. momentum for all matches, MC charged
160 TH2F *fhMCNeutral1pOverE; //! p/E for track-cluster matches, MC neutral
161 TH1F *fhMCNeutral1dR; //! distance between projected track and cluster, MC neutral
162 TH2F *fhMCNeutral2MatchdEdx; //! dE/dx vs. momentum for all matches, MC neutral
164 TH2F *fh1pOverER02; //! p/E for track-cluster matches, dR > 0.2
165 TH2F *fhMCEle1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC electrons
166 TH2F *fhMCChHad1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC charged hadrons
167 TH2F *fhMCNeutral1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC neutral
169 //________________________________________________________________________
170 void ReadHistograms(TString name, TString dataType, Bool_t isDataMC, Bool_t fCorrelateCalos, Int_t fNModules)
172 TFile *f = new TFile("Calo.Performance.root","read");
173 TList* outputList = f->Get("Calo.Performance");
176 fhEMod = new TH1F*[fNModules];
177 fhNClustersMod = new TH1F*[fNModules];
178 fhNCellsPerClusterMod = new TH2F*[fNModules];
179 fhNCellsMod = new TH1F*[fNModules];
180 fhGridCellsMod = new TH2F*[fNModules];
181 fhGridCellsEMod = new TH2F*[fNModules];
182 fhAmplitudeMod = new TH1F*[fNModules];
183 fhIMMod = new TH2F*[fNModules];
184 fhIMCellCutMod = new TH2F*[fNModules];
187 // Histograms of this analsys are kept in the same list as other analysis, recover the position of
188 // the first one and then add the next
189 Int_t index = outputList->IndexOf(outputList->FindObject(name+"hE"));
190 //printf("Calo: %s, index: %d\n",fCalorimeter.Data(),index);
191 //Read histograms, must be in the same order as in GetCreateOutputObject.
192 fhE = (TH1F *) outputList->At(index++);
193 fhPt = (TH1F *) outputList->At(index++);
194 fhPhi = (TH1F *) outputList->At(index++);
195 fhEta = (TH1F *) outputList->At(index++);
196 fhEtaPhi = (TH2F *) outputList->At(index++);
197 fhEtaPhiE = (TH3F *) outputList->At(index++);
199 fhECharged = (TH1F *) outputList->At(index++);
200 fhPtCharged = (TH1F *) outputList->At(index++);
201 fhPhiCharged = (TH1F *) outputList->At(index++);
202 fhEtaCharged = (TH1F *) outputList->At(index++);
203 fhEtaPhiCharged = (TH2F *) outputList->At(index++);
205 fhEChargedNoOut = (TH1F *) outputList->At(index++);
206 fhPtChargedNoOut = (TH1F *) outputList->At(index++);
207 fhPhiChargedNoOut = (TH1F *) outputList->At(index++);
208 fhEtaChargedNoOut = (TH1F *) outputList->At(index++);
209 fhEtaPhiChargedNoOut = (TH2F *) outputList->At(index++);
211 fh1pOverE = (TH2F *) outputList->At(index++);
212 fh1dR = (TH1F *) outputList->At(index++);
213 fh2MatchdEdx = (TH2F *) outputList->At(index++);
214 fh2EledEdx = (TH2F *) outputList->At(index++);
215 fh1pOverER02 = (TH2F *) outputList->At(index++);
217 fhIM = (TH2F *) outputList->At(index++);
218 fhIMCellCut = (TH2F *) outputList->At(index++);
219 fhAsym = (TH2F *) outputList->At(index++);
221 fhNCellsPerCluster = (TH2F *) outputList->At(index++);
222 fhNCellsPerClusterMIP = (TH2F *) outputList->At(index++);
224 fhNClusters = (TH1F *) outputList->At(index++);
225 fhNCells = (TH1F *) outputList->At(index++);
226 fhAmplitude = (TH1F *) outputList->At(index++);
227 fhAmpId = (TH1F *) outputList->At(index++);
228 if(dataType=="ESD") {
229 fhTime = (TH1F *) outputList->At(index++);
230 fhTimeId = (TH2F *) outputList->At(index++);
231 fhTimeAmp = (TH2F *) outputList->At(index++);
235 fhCaloCorrNClusters = (TH2F *) outputList->At(index++);
236 fhCaloCorrEClusters = (TH2F *) outputList->At(index++);
237 fhCaloCorrNCells = (TH2F *) outputList->At(index++);
238 fhCaloCorrECells = (TH2F *) outputList->At(index++);
241 for(Int_t imod = 0 ; imod < fNModules; imod++){
242 fhEMod[imod] = (TH1F *) outputList->At(index++);
243 fhNClustersMod[imod] = (TH1F *) outputList->At(index++);
244 fhNCellsPerClusterMod[imod] = (TH2F *) outputList->At(index++);
245 fhNCellsMod[imod] = (TH1F *) outputList->At(index++);
246 fhGridCellsMod[imod] = (TH2F *) outputList->At(index++);
247 fhGridCellsEMod[imod] = (TH2F *) outputList->At(index++);
248 fhAmplitudeMod[imod] = (TH1F *) outputList->At(index++);
249 fhIMMod[imod] = (TH2F *) outputList->At(index++);
250 fhIMCellCutMod[imod] = (TH2F *) outputList->At(index++);
255 fhDeltaE = (TH1F *) outputList->At(index++);
256 fhDeltaPt = (TH1F *) outputList->At(index++);
257 fhDeltaPhi = (TH1F *) outputList->At(index++);
258 fhDeltaEta = (TH1F *) outputList->At(index++);
260 fhRatioE = (TH1F *) outputList->At(index++);
261 fhRatioPt = (TH1F *) outputList->At(index++);
262 fhRatioPhi = (TH1F *) outputList->At(index++);
263 fhRatioEta = (TH1F *) outputList->At(index++);
265 fh2E = (TH2F *) outputList->At(index++);
266 fh2Pt = (TH2F *) outputList->At(index++);
267 fh2Phi = (TH2F *) outputList->At(index++);
268 fh2Eta = (TH2F *) outputList->At(index++);
270 fhGamE = (TH2F *) outputList->At(index++);
271 fhGamPt = (TH2F *) outputList->At(index++);
272 fhGamPhi = (TH2F *) outputList->At(index++);
273 fhGamEta = (TH2F *) outputList->At(index++);
275 fhGamDeltaE = (TH1F *) outputList->At(index++);
276 fhGamDeltaPt = (TH1F *) outputList->At(index++);
277 fhGamDeltaPhi = (TH1F *) outputList->At(index++);
278 fhGamDeltaEta = (TH1F *) outputList->At(index++);
280 fhGamRatioE = (TH1F *) outputList->At(index++);
281 fhGamRatioPt = (TH1F *) outputList->At(index++);
282 fhGamRatioPhi = (TH1F *) outputList->At(index++);
283 fhGamRatioEta = (TH1F *) outputList->At(index++);
285 fhPi0E = (TH2F *) outputList->At(index++);
286 fhPi0Pt = (TH2F *) outputList->At(index++);
287 fhPi0Phi = (TH2F *) outputList->At(index++);
288 fhPi0Eta = (TH2F *) outputList->At(index++);
290 fhEleE = (TH2F *) outputList->At(index++);
291 fhElePt = (TH2F *) outputList->At(index++);
292 fhElePhi = (TH2F *) outputList->At(index++);
293 fhEleEta = (TH2F *) outputList->At(index++);
295 fhNeHadE = (TH2F *) outputList->At(index++);
296 fhNeHadPt = (TH2F *) outputList->At(index++);
297 fhNeHadPhi = (TH2F *) outputList->At(index++);
298 fhNeHadEta = (TH2F *) outputList->At(index++);
300 fhChHadE = (TH2F *) outputList->At(index++);
301 fhChHadPt = (TH2F *) outputList->At(index++);
302 fhChHadPhi = (TH2F *) outputList->At(index++);
303 fhChHadEta = (TH2F *) outputList->At(index++);
304 fhGamECharged = (TH2F *) outputList->At(index++);
305 fhGamPtCharged = (TH2F *) outputList->At(index++);
306 fhGamPhiCharged = (TH2F *) outputList->At(index++);
307 fhGamEtaCharged = (TH2F *) outputList->At(index++);
309 fhPi0ECharged = (TH2F *) outputList->At(index++);
310 fhPi0PtCharged = (TH2F *) outputList->At(index++);
311 fhPi0PhiCharged = (TH2F *) outputList->At(index++);
312 fhPi0EtaCharged = (TH2F *) outputList->At(index++);
314 fhEleECharged = (TH2F *) outputList->At(index++);
315 fhElePtCharged = (TH2F *) outputList->At(index++);
316 fhElePhiCharged = (TH2F *) outputList->At(index++);
317 fhEleEtaCharged = (TH2F *) outputList->At(index++);
319 fhNeHadECharged = (TH2F *) outputList->At(index++);
320 fhNeHadPtCharged = (TH2F *) outputList->At(index++);
321 fhNeHadPhiCharged = (TH2F *) outputList->At(index++);
322 fhNeHadEtaCharged = (TH2F *) outputList->At(index++);
324 fhChHadECharged = (TH2F *) outputList->At(index++);
325 fhChHadPtCharged = (TH2F *) outputList->At(index++);
326 fhChHadPhiCharged = (TH2F *) outputList->At(index++);
327 fhChHadEtaCharged = (TH2F *) outputList->At(index++);
329 // fhEMVxyz = (TH3F *) outputList->At(index++);
330 // fhHaVxyz = (TH3F *) outputList->At(index++);
332 fhEMVxyz = (TH2F *) outputList->At(index++);
333 fhHaVxyz = (TH2F *) outputList->At(index++);
334 fhEMR = (TH2F *) outputList->At(index++);
335 fhHaR = (TH2F *) outputList->At(index++);
337 fhGenGamPt = (TH1F *) outputList->At(index++);
338 fhGenGamEta = (TH1F *) outputList->At(index++);
339 fhGenGamPhi = (TH1F *) outputList->At(index++);
341 fhGenPi0Pt = (TH1F *) outputList->At(index++);
342 fhGenPi0Eta = (TH1F *) outputList->At(index++);
343 fhGenPi0Phi = (TH1F *) outputList->At(index++);
345 fhGenEtaPt = (TH1F *) outputList->At(index++);
346 fhGenEtaEta = (TH1F *) outputList->At(index++);
347 fhGenEtaPhi = (TH1F *) outputList->At(index++);
349 fhGenOmegaPt = (TH1F *) outputList->At(index++);
350 fhGenOmegaEta = (TH1F *) outputList->At(index++);
351 fhGenOmegaPhi = (TH1F *) outputList->At(index++);
353 fhGenElePt = (TH1F *) outputList->At(index++);
354 fhGenEleEta = (TH1F *) outputList->At(index++);
355 fhGenElePhi = (TH1F *) outputList->At(index++);
357 fhGenGamAccE = (TH1F *) outputList->At(index++);
358 fhGenGamAccPt = (TH1F *) outputList->At(index++);
359 fhGenGamAccEta = (TH1F *) outputList->At(index++);
360 fhGenGamAccPhi = (TH1F *) outputList->At(index++);
362 fhGenPi0AccE = (TH1F *) outputList->At(index++);
363 fhGenPi0AccPt = (TH1F *) outputList->At(index++);
364 fhGenPi0AccEta = (TH1F *) outputList->At(index++);
365 fhGenPi0AccPhi = (TH1F *) outputList->At(index++);
368 fhMCEle1pOverE = (TH2F *) outputList->At(index++);
369 fhMCEle1dR = (TH1F *) outputList->At(index++);
370 fhMCEle2MatchdEdx = (TH2F *) outputList->At(index++);
372 fhMCChHad1pOverE = (TH2F *) outputList->At(index++);
373 fhMCChHad1dR = (TH1F *) outputList->At(index++);
374 fhMCChHad2MatchdEdx = (TH2F *) outputList->At(index++);
376 fhMCNeutral1pOverE = (TH2F *) outputList->At(index++);
377 fhMCNeutral1dR = (TH1F *) outputList->At(index++);
378 fhMCNeutral2MatchdEdx = (TH2F *) outputList->At(index++);
380 fhMCEle1pOverER02 = (TH2F *) outputList->At(index++);
381 fhMCChHad1pOverER02 = (TH2F *) outputList->At(index++);
382 fhMCNeutral1pOverER02 = (TH2F *) outputList->At(index++);
387 //__________________________________________________________________
388 void DrawCaloQA(TString fCalorimeter = "EMCAL", TString dataType = "ESD", Bool_t isDataMC = kFALSE)
390 //Macro for replotting Calorimeter QA histograms
391 Bool_t fCorrelateCalos = kFALSE;
392 Int_t fNModules = 12;
393 //By default when PHOS QA is called correlation not done
394 if(fCalorimeter == "PHOS") {
395 fCorrelateCalos = kFALSE;
399 fCorrelateCalos = kTRUE;
402 cout<<"Calo? "<<fCalorimeter<<" Correlate plots? "<<fCorrelateCalos<<" MC plots?"<<isDataMC<<endl;
403 //Do some plots to end
404 gROOT->Macro("./style.C");//Set different root style parameters
405 //Recover histograms from output histograms list, needed for distributed analysis.
406 ReadHistograms(fCalorimeter+"_", dataType, isDataMC, fCorrelateCalos,fNModules);
413 //Reconstructed distributions
415 sprintf(cname,"QA_%s_rec",fCalorimeter.Data());
416 TCanvas * c = new TCanvas(cname, "Reconstructed distributions", 400, 400) ;
419 fhE->SetAxisRange(minx,maxx,"X");
420 fhPt->SetAxisRange(minx,maxx,"X");
423 if(fhE->GetEntries() > 0) gPad->SetLogy();
424 TLegend pLegendE(0.7,0.6,0.9,0.8);
425 pLegendE.SetTextSize(0.03);
426 pLegendE.AddEntry(fhE,"all modules","L");
427 pLegendE.SetFillColor(10);
428 pLegendE.SetBorderSize(1);
430 fhE->SetLineColor(1);
432 for(Int_t imod = 0; imod < fNModules; imod++){
433 fhEMod[imod]->SetLineColor(imod+1);
434 fhEMod[imod]->Draw("same");
435 pLegendE.AddEntry(fhEMod[imod],Form("module %d",imod),"L");
441 fhPt->SetLineColor(4);
445 fhPhi->SetLineColor(4);
449 fhEta->SetLineColor(4);
452 sprintf(name,"QA_%s_ReconstructedDistributions.eps",fCalorimeter.Data());
455 //Reconstructed distributions, matched with tracks
457 sprintf(cname,"QA_%s_rectrackmatch",fCalorimeter.Data());
458 TCanvas * c2 = new TCanvas(cname, "Reconstructed distributions, matched with tracks", 400, 400) ;
461 fhECharged->SetAxisRange(minx,maxx,"X");
462 fhPtCharged->SetAxisRange(minx,maxx,"X");
466 fhECharged->SetLineColor(4);
471 fhPtCharged->SetLineColor(4);
475 fhPhiCharged->SetLineColor(4);
476 fhPhiCharged->Draw();
479 fhEtaCharged->SetLineColor(4);
480 fhEtaCharged->Draw();
482 sprintf(name,"QA_%s_ReconstructedDistributions_TrackMatched.eps",fCalorimeter.Data());
485 TH1F * hEChargedClone = (TH1F*) fhECharged->Clone("EChargedClone");
486 TH1F * hPtChargedClone = (TH1F*) fhPtCharged->Clone("PtChargedClone");
487 TH1F * hEtaChargedClone = (TH1F*) fhEtaCharged->Clone("EtaChargedClone");
488 TH1F * hPhiChargedClone = (TH1F*) fhPhiCharged->Clone("PhiChargedClone");
490 TH1F * hEChargedClone2 = (TH1F*) fhECharged->Clone("EChargedClone2");
491 TH1F * hPtChargedClone2 = (TH1F*) fhPtCharged->Clone("PtChargedClone2");
492 TH1F * hEtaChargedClone2 = (TH1F*) fhEtaCharged->Clone("EtaChargedClone2");
493 TH1F * hPhiChargedClone2 = (TH1F*) fhPhiCharged->Clone("PhiChargedClone2");
495 //Ratio: reconstructed track matched/ all reconstructed
497 sprintf(cname,"QA_%s_rectrackmatchrat",fCalorimeter.Data());
498 TCanvas * c3 = new TCanvas(cname, "Ratio: reconstructed track matched/ all reconstructed", 400, 400) ;
503 hEChargedClone->SetTitleOffset(1.6,"Y");
504 hEChargedClone->SetYTitle("track matched / all ");
505 hEChargedClone->SetXTitle("E (GeV)");
506 hEChargedClone->Divide(fhE);
507 hEChargedClone->Draw();
511 hPtChargedClone->SetTitleOffset(1.6,"Y");
512 hPtChargedClone->SetYTitle("track matched / all ");
513 hPtChargedClone->SetXTitle("p_{T} (GeV/c)");
514 hPtChargedClone->Divide(fhPt);
515 hPtChargedClone->Draw();
519 hPhiChargedClone->SetTitleOffset(1.6,"Y");
520 hPhiChargedClone->SetYTitle("track matched / all ");
521 hPhiChargedClone->SetXTitle("#phi (rad)");
522 hPhiChargedClone->Divide(fhPhi);
523 hPhiChargedClone->Draw();
527 hEtaChargedClone->SetTitleOffset(1.6,"Y");
528 hEtaChargedClone->SetYTitle("track matched / all ");
529 hEtaChargedClone->SetXTitle("#eta");
530 hEtaChargedClone->Divide(fhEta);
531 hEtaChargedClone->Draw();
533 sprintf(name,"QA_%s_RatioReconstructedMatchedDistributions.eps",fCalorimeter.Data());
536 //Ratio: reconstructed track matched (minus no track param) / all
538 sprintf(cname,"QA_%s_rectrackmatchratout",fCalorimeter.Data());
539 TCanvas * c333 = new TCanvas(cname, "Ratio: reconstructed track matched (with outer track param)/ all", 400, 400) ;
543 hEChargedClone2->Add(fhEChargedNoOut,-1);
544 hEChargedClone2->SetYTitle("track matched / all");
545 hEChargedClone2->SetXTitle("E (GeV)");
546 hEChargedClone2->Divide(fhE);
547 hEChargedClone2->Draw();
550 hPtChargedClone2->Add(fhPtChargedNoOut,-1);
551 hPtChargedClone2->SetYTitle("track matched / all");
552 hPtChargedClone2->SetXTitle("p_{T} (GeV/c)");
553 hPtChargedClone2->Divide(fhPt);
554 hPtChargedClone2->Draw();
557 hPhiChargedClone2->Add(fhPhiChargedNoOut,-1);
558 hPhiChargedClone2->SetYTitle("track matched / all");
559 hPhiChargedClone2->SetXTitle("#phi (rad)");
560 hPhiChargedClone2->Divide(fhPhi);
561 hPhiChargedClone2->Draw();
564 hEtaChargedClone2->Add(fhEtaChargedNoOut,-1);
565 hEtaChargedClone2->SetYTitle("track matched / all");
566 hEtaChargedClone2->SetXTitle("#eta");
567 hEtaChargedClone2->Divide(fhEta);
568 hEtaChargedClone2->Draw();
570 sprintf(name,"QA_%s_RatioReconstructedMatchedDistributionsOuter.eps",fCalorimeter.Data());
573 // //Reconstructed distributions, matched with tracks but no outer param
575 // sprintf(cname,"QA_%s_rectrackmatch_noout",fCalorimeter.Data());
576 // TCanvas * c22 = new TCanvas(cname, "Reconstructed distributions, matched with tracks, no outer track param", 400, 400) ;
577 // c22->Divide(2, 2);
581 // fhEChargedNoOut->SetLineColor(4);
582 // fhEChargedNoOut->Draw();
586 // fhPtChargedNoOut->SetLineColor(4);
587 // fhPtChargedNoOut->Draw();
590 // fhPhiChargedNoOut->SetLineColor(4);
591 // fhPhiChargedNoOut->Draw();
594 // fhEtaChargedNoOut->SetLineColor(4);
595 // fhEtaChargedNoOut->Draw();
597 // sprintf(name,"QA_%s_ReconstructedDistributions_TrackMatched_NoOutParam.eps",fCalorimeter.Data());
600 //Ratio: reconstructed track matched/ all reconstructed
603 // TH1F * hEChargedNoOutClone = (TH1F*) fhEChargedNoOut->Clone("EChargedNoOutClone");
604 // TH1F * hPtChargedNoOutClone = (TH1F*) fhPtChargedNoOut->Clone("PtChargedNoOutClone");
605 // TH1F * hEtaChargedNoOutClone = (TH1F*) fhEtaChargedNoOut->Clone("EtaChargedNoOutClone");
606 // TH1F * hPhiChargedNoOutClone = (TH1F*) fhPhiChargedNoOut->Clone("PhiChargedNoOutClone");
608 // sprintf(cname,"QA_%s_rectrackmatchratnoout",fCalorimeter.Data());
609 // TCanvas * c33 = new TCanvas(cname, "Ratio: reconstructed track matched/ all reconstructed", 400, 400) ;
610 // c33->Divide(2, 2);
613 // hEChargedNoOutClone->SetYTitle("track matched no out/ all matched");
614 // hEChargedNoOutClone->SetXTitle("E (GeV)");
615 // hEChargedNoOutClone->Divide(fhECharged);
616 // hEChargedNoOutClone->Draw();
619 // hPtChargedNoOutClone->SetYTitle("track matched no out / all matched");
620 // hPtChargedNoOutClone->SetXTitle("p_{T} (GeV/c)");
621 // hPtChargedNoOutClone->Divide(fhPtCharged);
622 // hPtChargedNoOutClone->Draw();
625 // hPhiChargedNoOutClone->SetYTitle("track matched no out/ all matched");
626 // hPhiChargedNoOutClone->SetXTitle("#phi (rad)");
627 // hPhiChargedNoOutClone->Divide(fhPhiCharged);
628 // hPhiChargedNoOutClone->Draw();
631 // hEtaChargedNoOutClone->SetYTitle("track matched no out/ all matched");
632 // hEtaChargedNoOutClone->SetXTitle("#eta");
633 // hEtaChargedNoOutClone->Divide(fhEtaCharged);
634 // hEtaChargedNoOutClone->Draw();
636 // sprintf(name,"QA_%s_RatioMatchedDistributionsAllToNoOut.eps",fCalorimeter.Data());
641 //TRACK MATCHING P/E distributions
642 //printf("cPoverE\n");
643 sprintf(cname,"QA_%s_trkmatch",fCalorimeter.Data());
644 TCanvas *cme = new TCanvas(cname,"Track-matching distributions", 400, 400);
647 TLegend pLegendpE0(0.6,0.55,0.9,0.8);
648 pLegendpE0.SetTextSize(0.04);
649 pLegendpE0.AddEntry(fh1pOverE,"all","L");
650 pLegendpE0.AddEntry(fh1pOverER02,"dR < 0.02","L");
651 pLegendpE0.SetFillColor(10);
652 pLegendpE0.SetBorderSize(1);
657 fh1pOverE->SetTitle("Track matches p/E");
659 fh1pOverER02->SetLineColor(4);
660 fh1pOverER02->Draw("same");
668 fh2MatchdEdx->Draw();
673 sprintf(name,"QA_%s_TrackMatchingEleDist.eps",fCalorimeter.Data());
678 sprintf(cname,"QA_%s_etavsphi",fCalorimeter.Data());
679 // TCanvas * c4 = new TCanvas(cname, "reconstructed #eta vs #phi", 600, 200) ;
682 TCanvas * c4 = new TCanvas(cname, "reconstructed #eta vs #phi", 400, 200) ;
686 fhEtaPhi->Draw("cont");
689 fhEtaPhiCharged->Draw("cont");
692 // fhEtaPhiChargedNoOut->Draw("cont");
694 sprintf(name,"QA_%s_ReconstructedEtaVsPhi.eps",fCalorimeter.Data());
697 sprintf(name,"QA_%s_ReconstructedEtaVsPhiVsE.eps",fCalorimeter.Data());
698 c4->Print(name); printf("Plot: %s\n",name);
704 if(fhIM->GetEntries() > 1){
705 Int_t nebins = fhIM->GetNbinsX();
706 Int_t emax = (Int_t) fhIM->GetXaxis()->GetXmax();
707 Int_t emin = (Int_t) fhIM->GetXaxis()->GetXmin();
708 if (emin != 0 ) printf("emin != 0 \n");
709 //printf("IM: nBinsX %d, emin %2.2f, emax %2.2f\n",nebins,emin,emax);
711 sprintf(cname,"QA_%s_IM",fCalorimeter.Data());
713 TCanvas * c5 = new TCanvas(cname, "Invariant mass", 600, 400) ;
717 //fhIM->SetLineColor(4);
720 binmax = (Int_t) (1-emin)*nebins/emax;
721 TH1D *pyim1 = fhIM->ProjectionY("pyim1",binmin,binmax);
722 pyim1->SetTitle("E_{pair} < 1 GeV");
723 pyim1->SetLineColor(1);
725 TLegend pLegendIM(0.7,0.6,0.9,0.8);
726 pLegendIM.SetTextSize(0.03);
727 pLegendIM.AddEntry(pyim1,"all modules","L");
728 pLegendIM.SetFillColor(10);
729 pLegendIM.SetBorderSize(1);
730 for(Int_t imod = 0; imod < fNModules; imod++){
731 pyim1 = fhIMMod[imod]->ProjectionY(Form("pyim1_%d",imod),binmin,binmax);
732 pLegendIM.AddEntry(pyim1,Form("module %d",imod),"L");
733 pyim1->SetLineColor(imod+1);
739 binmin = (Int_t) (1-emin)*nebins/emax;
740 binmax = (Int_t) (2-emin)*nebins/emax;
741 TH1D *pyim2 = fhIM->ProjectionY("pyim2",binmin,binmax);
742 pyim2->SetTitle("1 < E_{pair} < 2 GeV");
743 pyim2->SetLineColor(1);
745 for(Int_t imod = 0; imod < fNModules; imod++){
746 pyim2 = fhIMMod[imod]->ProjectionY(Form("pyim2_%d",imod),binmin,binmax);
747 pyim2->SetLineColor(imod+1);
752 binmin = (Int_t) (2-emin)*nebins/emax;
753 binmax = (Int_t) (3-emin)*nebins/emax;
754 TH1D *pyim3 = fhIM->ProjectionY("pyim3",binmin,binmax);
755 pyim3->SetTitle("2 < E_{pair} < 3 GeV");
756 pyim3->SetLineColor(1);
758 for(Int_t imod = 0; imod < fNModules; imod++){
759 pyim3 = fhIMMod[imod]->ProjectionY(Form("pyim3_%d",imod),binmin,binmax);
760 pyim3->SetLineColor(imod+1);
765 binmin = (Int_t) (3-emin)*nebins/emax;
766 binmax = (Int_t) (4-emin)*nebins/emax;
767 TH1D *pyim4 = fhIM->ProjectionY("pyim4",binmin,binmax);
768 pyim4->SetTitle("3 < E_{pair} < 4 GeV");
769 pyim4->SetLineColor(1);
771 for(Int_t imod = 0; imod < fNModules; imod++){
772 pyim4 = fhIMMod[imod]->ProjectionY(Form("pyim4_%d",imod),binmin,binmax);
773 pyim4->SetLineColor(imod+1);
778 binmin = (Int_t) (4-emin)*nebins/emax;
779 binmax = (Int_t) (5-emin)*nebins/emax;
780 TH1D *pyim5 = fhIM->ProjectionY("pyim5",binmin,binmax);
781 pyim5->SetTitle("4< E_{pair} < 5 GeV");
782 pyim5->SetLineColor(1);
784 for(Int_t imod = 0; imod < fNModules; imod++){
785 pyim5 = fhIMMod[imod]->ProjectionY(Form("pyim5_%d",imod),binmin,binmax);
786 pyim5->SetLineColor(imod+1);
791 binmin = (Int_t) (5-emin)*nebins/emax;
793 TH1D *pyim10 = fhIM->ProjectionY("pyim10",binmin,binmax);
794 pyim10->SetTitle("E_{pair} > 5 GeV");
795 pyim10->SetLineColor(1);
797 for(Int_t imod = 0; imod < fNModules; imod++){
798 pyim10 = fhIMMod[imod]->ProjectionY(Form("pyim10_%d",imod),binmin,binmax);
799 pyim10->SetLineColor(imod+1);
800 pyim10->Draw("same");
803 sprintf(name,"QA_%s_InvariantMass.eps",fCalorimeter.Data());
804 c5->Print(name); printf("Plot: %s\n",name);
808 if(fhIMCellCut->GetEntries() > 1){
809 Int_t nebins = fhIMCellCut->GetNbinsX();
810 Int_t emax = (Int_t) fhIMCellCut->GetXaxis()->GetXmax();
811 Int_t emin = (Int_t) fhIMCellCut->GetXaxis()->GetXmin();
812 if (emin != 0 ) printf("emin != 0 \n");
813 //printf("IMCellCut: nBinsX %d, emin %2.2f, emax %2.2f\n",nebins,emin,emax);
815 sprintf(cname,"QA_%s_IMCellCut",fCalorimeter.Data());
817 TCanvas * c5cc = new TCanvas(cname, "Invariant mass, Cell Cut", 600, 400) ;
821 //fhIMCellCut->SetLineColor(4);
822 //fhIMCellCut->Draw();
824 binmax = (Int_t) (1-emin)*nebins/emax;
825 TH1D *pyimcc1 = fhIMCellCut->ProjectionY("pyimcc1",binmin,binmax);
826 pyimcc1->SetTitle("E_{pair} < 1 GeV");
827 pyimcc1->SetLineColor(1);
829 TLegend pLegendIMCellCut(0.7,0.6,0.9,0.8);
830 pLegendIMCellCut.SetTextSize(0.03);
831 pLegendIMCellCut.AddEntry(pyimcc1,"all modules","L");
832 pLegendIMCellCut.SetFillColor(10);
833 pLegendIMCellCut.SetBorderSize(1);
834 for(Int_t imod = 0; imod < fNModules; imod++){
835 pyimcc1 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc1_%d",imod),binmin,binmax);
836 pLegendIMCellCut.AddEntry(pyimcc1,Form("module %d",imod),"L");
837 pyimcc1->SetLineColor(imod+1);
838 pyimcc1->Draw("same");
840 pLegendIMCellCut.Draw();
843 binmin = (Int_t) (1-emin)*nebins/emax;
844 binmax = (Int_t) (2-emin)*nebins/emax;
845 TH1D *pyimcc2 = fhIMCellCut->ProjectionY("pyimcc2",binmin,binmax);
846 pyimcc2->SetTitle("1 < E_{pair} < 2 GeV");
847 pyimcc2->SetLineColor(1);
849 for(Int_t imod = 0; imod < fNModules; imod++){
850 pyimcc2 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc2_%d",imod),binmin,binmax);
851 pyimcc2->SetLineColor(imod+1);
852 pyimcc2->Draw("same");
856 binmin = (Int_t) (2-emin)*nebins/emax;
857 binmax = (Int_t) (3-emin)*nebins/emax;
858 TH1D *pyimcc3 = fhIMCellCut->ProjectionY("pyimcc3",binmin,binmax);
859 pyimcc3->SetTitle("2 < E_{pair} < 3 GeV");
860 pyimcc3->SetLineColor(1);
862 for(Int_t imod = 0; imod < fNModules; imod++){
863 pyimcc3 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc3_%d",imod),binmin,binmax);
864 pyimcc3->SetLineColor(imod+1);
865 pyimcc3->Draw("same");
869 binmin = (Int_t) (3-emin)*nebins/emax;
870 binmax = (Int_t) (4-emin)*nebins/emax;
871 TH1D *pyimcc4 = fhIMCellCut->ProjectionY("pyimcc4",binmin,binmax);
872 pyimcc4->SetTitle("3 < E_{pair} < 4 GeV");
873 pyimcc4->SetLineColor(1);
875 for(Int_t imod = 0; imod < fNModules; imod++){
876 pyimcc4 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc4_%d",imod),binmin,binmax);
877 pyimcc4->SetLineColor(imod+1);
878 pyimcc4->Draw("same");
882 binmin = (Int_t) (4-emin)*nebins/emax;
883 binmax = (Int_t) (5-emin)*nebins/emax;
884 TH1D *pyimcc5cc = fhIMCellCut->ProjectionY("pyimcc5cc",binmin,binmax);
885 pyimcc5cc->SetTitle("4< E_{pair} < 5 GeV");
886 pyimcc5cc->SetLineColor(1);
888 for(Int_t imod = 0; imod < fNModules; imod++){
889 pyimcc5cc = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc5cc_%d",imod),binmin,binmax);
890 pyimcc5cc->SetLineColor(imod+1);
891 pyimcc5cc->Draw("same");
895 binmin = (Int_t) (5-emin)*nebins/emax;
897 TH1D *pyimcc10 = fhIMCellCut->ProjectionY("pyimcc10",binmin,binmax);
898 pyimcc10->SetTitle("E_{pair} > 5 GeV");
899 pyimcc10->SetLineColor(1);
901 for(Int_t imod = 0; imod < fNModules; imod++){
902 pyimcc10 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc10_%d",imod),binmin,binmax);
903 pyimcc10->SetLineColor(imod+1);
904 pyimcc10->Draw("same");
907 sprintf(name,"QA_%s_InvariantMass_CellCut.eps",fCalorimeter.Data());
908 c5cc->Print(name); printf("Plot: %s\n",name);
912 if(fhAsym->GetEntries() > 1){
913 Int_t nebins = fhAsym->GetNbinsX();
914 Int_t emax = (Int_t) fhAsym->GetXaxis()->GetXmax();
915 Int_t emin = (Int_t) fhAsym->GetXaxis()->GetXmin();
916 if (emin != 0 ) printf("emin != 0 \n");
917 //printf("Asym: nBinsX %d, emin %2.2f, emax %2.2f\n",nebins,emin,emax);
919 sprintf(cname,"QA_%s_Asym",fCalorimeter.Data());
921 TCanvas * c5b = new TCanvas(cname, "Asymmetry", 400, 400) ;
925 fhAsym->SetTitleOffset(1.6,"Y");
926 fhAsym->SetLineColor(4);
931 binmax = (Int_t) (5-emin)*nebins/emax;
932 TH1D *pyAsym5 = fhAsym->ProjectionY("pyAsym5",binmin,binmax);
933 pyAsym5->SetTitle("E_{pair} < 5 GeV");
934 pyAsym5->SetLineColor(4);
938 binmin = (Int_t) (5-emin)*nebins/emax;
939 binmax = (Int_t) (10-emin)*nebins/emax;
940 TH1D *pyAsym510 = fhAsym->ProjectionY("pyAsym5_10",binmin,binmax);
941 pyAsym510->SetTitle("5 < E_{pair} < 10 GeV");
942 pyAsym510->SetLineColor(4);
946 binmin = (Int_t) (10-emin)*nebins/emax;
948 TH1D *pyAsym10 = fhAsym->ProjectionY("pyAsym10",binmin,binmax);
949 pyAsym10->SetTitle("E_{pair} > 10 GeV");
950 pyAsym10->SetLineColor(4);
953 sprintf(name,"QA_%s_Asymmetry.eps",fCalorimeter.Data());
960 sprintf(cname,"QA_%s_nclustercellsamp",fCalorimeter.Data());
961 TCanvas * c9 = new TCanvas(cname, " CaloClusters and CaloCells", 400, 400) ;
966 TLegend pLegendN(0.7,0.6,0.9,0.8);
967 pLegendN.SetTextSize(0.03);
968 pLegendN.AddEntry(fhNClusters,"all modules","L");
969 pLegendN.SetFillColor(10);
970 pLegendN.SetBorderSize(1);
972 if(fhNClusters->GetEntries() > 0) gPad->SetLogy();
974 fhNClusters->SetLineColor(1);
976 for(Int_t imod = 0; imod < fNModules; imod++){
977 fhNClustersMod[imod]->SetLineColor(imod+1);
978 fhNClustersMod[imod]->Draw("same");
979 pLegendN.AddEntry(fhNClustersMod[imod],Form("module %d",imod),"L");
984 if(fhNCells->GetEntries() > 0) gPad->SetLogy();
986 fhNCells->SetLineColor(1);
988 for(Int_t imod = 0; imod < fNModules; imod++){
989 fhNCellsMod[imod]->SetLineColor(imod+1);
990 fhNCellsMod[imod]->Draw("same");
993 if(fhNCellsPerCluster->GetEntries() > 0) gPad->SetLogy();
995 TH1D *cpc = fhNCellsPerCluster->ProjectionY("cpc",-1,-1);
996 cpc->SetLineColor(1);
998 for(Int_t imod = 0; imod < fNModules; imod++){
999 cpc = fhNCellsPerClusterMod[imod]->ProjectionY(Form("cpc_%d",imod),-1,-1);
1000 cpc->SetLineColor(imod+1);
1005 if(fhAmplitude->GetEntries() > 0) gPad->SetLogy();
1007 fhAmplitude->SetLineColor(1);
1008 fhAmplitude->Draw();
1009 for(Int_t imod = 0; imod < fNModules; imod++){
1010 fhAmplitudeMod[imod]->SetLineColor(imod+1);
1011 fhAmplitudeMod[imod]->Draw("same");
1014 sprintf(name,"QA_%s_CaloClustersAndCaloCells.eps",fCalorimeter.Data());
1015 c9->Print(name); printf("Plot: %s\n",name);
1017 //Cell Time histograms, time only available in ESDs
1018 if(dataType=="ESD") {
1020 sprintf(cname,"QA_%s_cellstime",fCalorimeter.Data());
1021 TCanvas * ctime = new TCanvas(cname, " Cells time", 1200, 400) ;
1022 ctime->Divide(3, 1);
1025 if(fhTime->GetEntries() > 0) gPad->SetLogy();
1029 //if(fhTimeId->GetEntries() > 0) gPad->SetLogy();
1030 fhTimeId->Draw("colz");
1033 //if(fhTimeAmp->GetEntries() > 0) gPad->SetLogy();
1034 fhTimeAmp->Draw("colz");
1036 sprintf(name,"QA_%s_CellsTime.eps",fCalorimeter.Data());
1037 ctime->Print(name); printf("Plot: %s\n",name);
1041 if(fCorrelateCalos){
1042 //Calorimeter Correlation, PHOS vs EMCAL
1043 sprintf(cname,"QA_%s_CaloCorr_EMCALvsPHOS",fCalorimeter.Data());
1044 TCanvas * ccorr = new TCanvas(cname, " EMCAL vs PHOS", 400, 400) ;
1045 ccorr->Divide(2, 2);
1050 fhCaloCorrNClusters ->Draw();
1055 fhCaloCorrNCells->Draw();
1060 fhCaloCorrEClusters->Draw();
1065 fhCaloCorrECells->Draw();
1067 sprintf(name,"QA_%s_CaloCorr_EMCALvsPHOS.eps",fCalorimeter.Data());
1068 ccorr->Print(name); printf("Plot: %s\n",name);
1071 //Grid of cell per module plots
1073 gStyle->SetOptStat(0);
1074 sprintf(cname,"QA_%s_GridCellEntries",fCalorimeter.Data());
1076 TCanvas *cgrid = new TCanvas("cgrid","Number of entries per cell", 12,12,800,400);
1077 if(fNModules%2 == 0)
1078 cgrid->Divide(fNModules/2,2);
1080 cgrid->Divide(fNModules/2+1,2);
1082 for(Int_t imod = 0; imod < fNModules ; imod++){
1087 fhGridCellsMod[imod]->SetLabelSize(0.025,"z");
1088 fhGridCellsMod[imod]->Draw("colz");
1090 sprintf(name,"QA_%s_GridCellsEntries.eps",fCalorimeter.Data());
1091 cgrid->Print(name); printf("Plot: %s\n",name);
1093 sprintf(cname,"QA_%s_GridCellAccumEnergy",fCalorimeter.Data());
1095 TCanvas *cgridE = new TCanvas("cgridE","Summed energy per cell", 12,12,800,400);
1096 cgridE->Divide(fNModules/2,2);
1097 for(Int_t imod = 0; imod < fNModules ; imod++){
1102 fhGridCellsEMod[imod]->SetLabelSize(0.025,"z");
1103 fhGridCellsEMod[imod]->Draw("colz");
1105 sprintf(name,"QA_%s_GridCellsAccumEnergy.eps",fCalorimeter.Data());
1106 cgridE->Print(name); printf("Plot: %s\n",name);
1108 sprintf(cname,"QA_%s_GridCellAverageEnergy",fCalorimeter.Data());
1110 TCanvas *cgridEA = new TCanvas("cgridEA","Average energy per cell", 12,12,800,400);
1111 cgridEA->Divide(fNModules/2,2);
1112 for(Int_t imod = 0; imod < fNModules ; imod++){
1113 cgridEA->cd(imod+1);
1117 fhGridCellsEMod[imod]->SetLabelSize(0.025,"z");
1118 fhGridCellsEMod[imod]->Divide(fhGridCellsMod[imod]);
1119 fhGridCellsEMod[imod]->Draw("colz");
1121 sprintf(name,"QA_%s_GridCellsAverageEnergy.eps",fCalorimeter.Data());
1122 cgridEA->Print(name); printf("Plot: %s\n",name);
1127 //Reconstructed vs MC distributions
1129 sprintf(cname,"QA_%s_recvsmc",fCalorimeter.Data());
1130 TCanvas * c6 = new TCanvas(cname, "Reconstructed vs MC distributions", 400, 400) ;
1133 fh2E->SetAxisRange(minx,maxx,"X");
1134 fh2Pt->SetAxisRange(minx,maxx,"X");
1135 fh2E->SetAxisRange(minx,maxx,"Y");
1136 fh2Pt->SetAxisRange(minx,maxx,"Y");
1139 fh2E->SetTitleOffset(1.6,"Y");
1140 fh2E->SetLineColor(4);
1144 fh2Pt->SetTitleOffset(1.6,"Y");
1145 fh2Pt->SetLineColor(4);
1149 fh2Phi->SetTitleOffset(1.6,"Y");
1150 fh2Phi->SetLineColor(4);
1154 fh2Eta->SetTitleOffset(1.6,"Y");
1155 fh2Eta->SetLineColor(4);
1158 sprintf(name,"QA_%s_ReconstructedVSMCDistributions.eps",fCalorimeter.Data());
1161 //Reconstructed vs MC distributions
1163 sprintf(cname,"QA_%s_gamrecvsmc",fCalorimeter.Data());
1164 TCanvas * c6Gam = new TCanvas(cname, "Reconstructed vs MC distributions", 400, 400) ;
1165 c6Gam->Divide(2, 2);
1167 fhGamE->SetAxisRange(minx,maxx,"X");
1168 fhGamPt->SetAxisRange(minx,maxx,"X");
1182 sprintf(name,"QA_%s_GammaReconstructedVSMCDistributions.eps",fCalorimeter.Data());
1185 //Generated - reconstructed
1187 sprintf(cname,"QA_%s_diffgenrec",fCalorimeter.Data());
1188 TCanvas * c7 = new TCanvas(cname, "generated - reconstructed", 400, 400) ;
1193 fhGamDeltaE->SetLineColor(4);
1195 fhGamDeltaE->Draw("same");
1197 TLegend pLegendd(0.65,0.55,0.9,0.8);
1198 pLegendd.SetTextSize(0.06);
1199 pLegendd.AddEntry(fhDeltaE,"all","L");
1200 pLegendd.AddEntry(fhGamDeltaE,"from #gamma","L");
1201 pLegendd.SetFillColor(10);
1202 pLegendd.SetBorderSize(1);
1207 fhGamDeltaPt->SetLineColor(4);
1209 fhGamDeltaPt->Draw("same");
1213 fhGamDeltaPhi->SetLineColor(4);
1215 fhGamDeltaPhi->Draw("same");
1219 fhGamDeltaEta->SetLineColor(4);
1221 fhGamDeltaEta->Draw("same");
1223 sprintf(name,"QA_%s_DiffGeneratedReconstructed.eps",fCalorimeter.Data());
1226 // Reconstructed / Generated
1228 sprintf(cname,"QA_%s_ratiorecgen",fCalorimeter.Data());
1229 TCanvas * c8 = new TCanvas(cname, " reconstructed / generated", 400, 400) ;
1234 fhGamRatioE->SetLineColor(4);
1236 fhGamRatioE->Draw("same");
1238 TLegend pLegendr(0.65,0.55,0.9,0.8);
1239 pLegendr.SetTextSize(0.06);
1240 pLegendr.AddEntry(fhRatioE,"all","L");
1241 pLegendr.AddEntry(fhGamRatioE,"from #gamma","L");
1242 pLegendr.SetFillColor(10);
1243 pLegendr.SetBorderSize(1);
1248 fhGamRatioPt->SetLineColor(4);
1250 fhGamRatioPt->Draw("same");
1253 fhGamRatioPhi->SetLineColor(4);
1255 fhGamRatioPhi->Draw("same");
1258 fhGamRatioEta->SetLineColor(4);
1260 fhGamRatioEta->Draw("same");
1262 sprintf(name,"QA_%s_ReconstructedDivGenerated.eps",fCalorimeter.Data());
1266 //Generated distributions
1268 sprintf(cname,"QA_%s_gen",fCalorimeter.Data());
1269 TCanvas * c10 = new TCanvas(cname, "Generated distributions", 600, 200) ;
1274 TH1F * haxispt = (TH1F*) fhGenPi0Pt->Clone("axispt");
1275 haxispt->SetTitle("Generated Particles p_{T}, |#eta| < 1");
1276 fhGenPi0Pt->SetLineColor(1);
1277 fhGenGamPt->SetLineColor(4);
1278 fhGenEtaPt->SetLineColor(2);
1279 fhGenOmegaPt->SetLineColor(7);
1280 fhGenElePt->SetLineColor(6);
1282 //Select the maximum of the histogram to show all lines.
1283 if(fhGenPi0Pt->GetMaximum() >= fhGenGamPt->GetMaximum() && fhGenPi0Pt->GetMaximum() >= fhGenEtaPt->GetMaximum() &&
1284 fhGenPi0Pt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenPi0Pt->GetMaximum() >= fhGenElePt->GetMaximum())
1285 haxispt->SetMaximum(fhGenPi0Pt->GetMaximum());
1286 else if(fhGenGamPt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenGamPt->GetMaximum() >= fhGenEtaPt->GetMaximum() &&
1287 fhGenGamPt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenGamPt->GetMaximum() >= fhGenElePt->GetMaximum())
1288 haxispt->SetMaximum(fhGenGamPt->GetMaximum());
1289 else if(fhGenEtaPt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenEtaPt->GetMaximum() >= fhGenGamPt->GetMaximum() &&
1290 fhGenEtaPt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenEtaPt->GetMaximum() >= fhGenElePt->GetMaximum())
1291 haxispt->SetMaximum(fhGenEtaPt->GetMaximum());
1292 else if(fhGenOmegaPt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenOmegaPt->GetMaximum() >= fhGenEtaPt->GetMaximum() &&
1293 fhGenOmegaPt->GetMaximum() >= fhGenGamPt->GetMaximum() && fhGenOmegaPt->GetMaximum() >= fhGenElePt->GetMaximum())
1294 haxispt->SetMaximum(fhGenOmegaPt->GetMaximum());
1295 else if(fhGenElePt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenElePt->GetMaximum() >= fhGenEtaPt->GetMaximum() &&
1296 fhGenElePt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenElePt->GetMaximum() >= fhGenGamPt->GetMaximum())
1297 haxispt->SetMaximum(fhGenElePt->GetMaximum());
1298 haxispt->SetMinimum(1);
1299 haxispt->SetAxisRange(minx,maxx,"X");
1300 haxispt->Draw("axis");
1301 fhGenPi0Pt->Draw("same");
1302 fhGenGamPt->Draw("same");
1303 fhGenEtaPt->Draw("same");
1304 fhGenOmegaPt->Draw("same");
1305 fhGenElePt->Draw("same");
1307 TLegend pLegend(0.85,0.65,0.95,0.93);
1308 pLegend.SetTextSize(0.06);
1309 pLegend.AddEntry(fhGenPi0Pt," #pi^{0}","L");
1310 pLegend.AddEntry(fhGenGamPt," #gamma","L");
1311 pLegend.AddEntry(fhGenEtaPt," #eta","L");
1312 pLegend.AddEntry(fhGenOmegaPt," #omega","L");
1313 pLegend.AddEntry(fhGenElePt," e^{#pm}","L");
1314 pLegend.SetFillColor(10);
1315 pLegend.SetBorderSize(1);
1320 TH1F * haxiseta = (TH1F*) fhGenPi0Eta->Clone("axiseta");
1321 haxiseta->SetTitle("Generated Particles #eta, |#eta| < 1");
1322 fhGenPi0Eta->SetLineColor(1);
1323 fhGenGamEta->SetLineColor(4);
1324 fhGenEtaEta->SetLineColor(2);
1325 fhGenOmegaEta->SetLineColor(7);
1326 fhGenEleEta->SetLineColor(6);
1327 //Select the maximum of the histogram to show all lines.
1328 if(fhGenPi0Eta->GetMaximum() >= fhGenGamEta->GetMaximum() && fhGenPi0Eta->GetMaximum() >= fhGenEtaEta->GetMaximum() &&
1329 fhGenPi0Eta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenPi0Eta->GetMaximum() >= fhGenEleEta->GetMaximum())
1330 haxiseta->SetMaximum(fhGenPi0Eta->GetMaximum());
1331 else if(fhGenGamEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenGamEta->GetMaximum() >= fhGenEtaEta->GetMaximum() &&
1332 fhGenGamEta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenGamEta->GetMaximum() >= fhGenEleEta->GetMaximum())
1333 haxiseta->SetMaximum(fhGenGamEta->GetMaximum());
1334 else if(fhGenEtaEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenEtaEta->GetMaximum() >= fhGenGamEta->GetMaximum() &&
1335 fhGenEtaEta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenEtaEta->GetMaximum() >= fhGenEleEta->GetMaximum())
1336 haxiseta->SetMaximum(fhGenEtaEta->GetMaximum());
1337 else if(fhGenOmegaEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenOmegaEta->GetMaximum() >= fhGenEtaEta->GetMaximum() &&
1338 fhGenOmegaEta->GetMaximum() >= fhGenGamEta->GetMaximum() && fhGenOmegaEta->GetMaximum() >= fhGenEleEta->GetMaximum())
1339 haxiseta->SetMaximum(fhGenOmegaEta->GetMaximum());
1340 else if(fhGenEleEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenEleEta->GetMaximum() >= fhGenEtaEta->GetMaximum() &&
1341 fhGenEleEta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenEleEta->GetMaximum() >= fhGenGamEta->GetMaximum())
1342 haxiseta->SetMaximum(fhGenEleEta->GetMaximum());
1343 haxiseta->SetMinimum(100);
1344 haxiseta->Draw("axis");
1345 fhGenPi0Eta->Draw("same");
1346 fhGenGamEta->Draw("same");
1347 fhGenEtaEta->Draw("same");
1348 fhGenOmegaEta->Draw("same");
1349 fhGenEleEta->Draw("same");
1354 TH1F * haxisphi = (TH1F*) fhGenPi0Phi->Clone("axisphi");
1355 haxisphi->SetTitle("Generated Particles #phi, |#eta| < 1");
1356 fhGenPi0Phi->SetLineColor(1);
1357 fhGenGamPhi->SetLineColor(4);
1358 fhGenEtaPhi->SetLineColor(2);
1359 fhGenOmegaPhi->SetLineColor(7);
1360 fhGenElePhi->SetLineColor(6);
1361 //Select the maximum of the histogram to show all lines.
1362 if(fhGenPi0Phi->GetMaximum() >= fhGenGamPhi->GetMaximum() && fhGenPi0Phi->GetMaximum() >= fhGenEtaPhi->GetMaximum() &&
1363 fhGenPi0Phi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenPi0Phi->GetMaximum() >= fhGenElePhi->GetMaximum())
1364 haxisphi->SetMaximum(fhGenPi0Phi->GetMaximum());
1365 else if(fhGenGamPhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenGamPhi->GetMaximum() >= fhGenEtaPhi->GetMaximum() &&
1366 fhGenGamPhi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenGamPhi->GetMaximum() >= fhGenElePhi->GetMaximum())
1367 haxisphi->SetMaximum(fhGenGamPhi->GetMaximum());
1368 else if(fhGenEtaPhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenEtaPhi->GetMaximum() >= fhGenGamPhi->GetMaximum() &&
1369 fhGenEtaPhi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenEtaPhi->GetMaximum() >= fhGenElePhi->GetMaximum())
1370 haxisphi->SetMaximum(fhGenEtaPhi->GetMaximum());
1371 else if(fhGenOmegaPhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenOmegaPhi->GetMaximum() >= fhGenEtaPhi->GetMaximum() &&
1372 fhGenOmegaPhi->GetMaximum() >= fhGenGamPhi->GetMaximum() && fhGenOmegaPhi->GetMaximum() >= fhGenElePhi->GetMaximum())
1373 haxisphi->SetMaximum(fhGenOmegaPhi->GetMaximum());
1374 else if(fhGenElePhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenElePhi->GetMaximum() >= fhGenEtaPhi->GetMaximum() &&
1375 fhGenElePhi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenElePhi->GetMaximum() >= fhGenGamPhi->GetMaximum())
1376 haxisphi->SetMaximum(fhGenElePhi->GetMaximum());
1377 haxisphi->SetMinimum(100);
1378 haxisphi->Draw("axis");
1379 fhGenPi0Phi->Draw("same");
1380 fhGenGamPhi->Draw("same");
1381 fhGenEtaPhi->Draw("same");
1382 fhGenOmegaPhi->Draw("same");
1383 fhGenElePhi->Draw("same");
1385 sprintf(name,"QA_%s_GeneratedDistributions.eps",fCalorimeter.Data());
1389 //Reconstructed clusters depending on its original particle.
1391 sprintf(cname,"QA_%s_recgenid",fCalorimeter.Data());
1392 TCanvas * c11 = new TCanvas(cname, "Reconstructed particles, function of their original particle ID", 400, 400) ;
1398 TH1F * hGamE = (TH1F*) fhGamE->ProjectionX("hGamE",-1,-1);
1399 TH1F * hPi0E = (TH1F*) fhPi0E->ProjectionX("hPi0E",-1,-1);
1400 TH1F * hEleE = (TH1F*) fhEleE->ProjectionX("hEleE",-1,-1);
1401 TH1F * hNeHadE = (TH1F*) fhNeHadE->ProjectionX("hNeHadE",-1,-1);
1402 TH1F * hChHadE = (TH1F*) fhChHadE->ProjectionX("hChHadE",-1,-1);
1403 TH1F * haxisE = (TH1F*) hPi0E->Clone("axisE");
1404 haxisE->SetTitle("Reconstructed particles E, function of their original particle ID");
1405 haxisE->SetAxisRange(minx,maxx,"X");
1407 hPi0E->SetLineColor(1);
1408 hGamE->SetLineColor(4);
1409 hNeHadE->SetLineColor(2);
1410 hChHadE->SetLineColor(7);
1411 hEleE->SetLineColor(6);
1413 //Select the maximum of the histogram to show all lines.
1414 if(hPi0E->GetMaximum() >= hGamE->GetMaximum() && hPi0E->GetMaximum() >= hNeHadE->GetMaximum() &&
1415 hPi0E->GetMaximum() >= hChHadE->GetMaximum() && hPi0E->GetMaximum() >= hEleE->GetMaximum())
1416 haxisE->SetMaximum(hPi0E->GetMaximum());
1417 else if(hGamE->GetMaximum() >= hPi0E->GetMaximum() && hGamE->GetMaximum() >= hNeHadE->GetMaximum() &&
1418 hGamE->GetMaximum() >= hChHadE->GetMaximum() && hGamE->GetMaximum() >= hEleE->GetMaximum())
1419 haxisE->SetMaximum(hGamE->GetMaximum());
1420 else if(hNeHadE->GetMaximum() >= hPi0E->GetMaximum() && hNeHadE->GetMaximum() >= hGamE->GetMaximum() &&
1421 hNeHadE->GetMaximum() >= hChHadE->GetMaximum() && hNeHadE->GetMaximum() >= hEleE->GetMaximum())
1422 haxisE->SetMaximum(hNeHadE->GetMaximum());
1423 else if(hChHadE->GetMaximum() >= hPi0E->GetMaximum() && hChHadE->GetMaximum() >= hNeHadE->GetMaximum() &&
1424 hChHadE->GetMaximum() >= hGamE->GetMaximum() && hChHadE->GetMaximum() >= hEleE->GetMaximum())
1425 haxisE->SetMaximum(hChHadE->GetMaximum());
1426 else if(hEleE->GetMaximum() >= hPi0E->GetMaximum() && hEleE->GetMaximum() >= hNeHadE->GetMaximum() &&
1427 hEleE->GetMaximum() >= hChHadE->GetMaximum() && hEleE->GetMaximum() >= hGamE->GetMaximum())
1428 haxisE->SetMaximum(hEleE->GetMaximum());
1429 haxisE->SetXTitle("E (GeV)");
1430 haxisE->SetMinimum(1);
1431 haxisE->Draw("axis");
1432 hPi0E->Draw("same");
1433 hGamE->Draw("same");
1434 hNeHadE->Draw("same");
1435 hChHadE->Draw("same");
1436 hEleE->Draw("same");
1438 TLegend pLegend2(0.8,0.65,0.95,0.93);
1439 pLegend2.SetTextSize(0.06);
1440 pLegend2.AddEntry(hPi0E," #pi^{0}","L");
1441 pLegend2.AddEntry(hGamE," #gamma","L");
1442 pLegend2.AddEntry(hEleE," e^{#pm}","L");
1443 pLegend2.AddEntry(hChHadE," h^{#pm}","L");
1444 pLegend2.AddEntry(hNeHadE," h^{0}","L");
1445 pLegend2.SetFillColor(10);
1446 pLegend2.SetBorderSize(1);
1452 //printf("%s, %s, %s, %s, %s\n",fhGamPt->GetName(),fhPi0Pt->GetName(),fhElePt->GetName(),fhNeHadPt->GetName(), fhChHadPt->GetName());
1453 TH1F * hGamPt = (TH1F*) fhGamPt->ProjectionX("hGamPt",-1,-1);
1454 TH1F * hPi0Pt = (TH1F*) fhPi0Pt->ProjectionX("hPi0Pt",-1,-1);
1455 TH1F * hElePt = (TH1F*) fhElePt->ProjectionX("hElePt",-1,-1);
1456 TH1F * hNeHadPt = (TH1F*) fhNeHadPt->ProjectionX("hNeHadPt",-1,-1);
1457 TH1F * hChHadPt = (TH1F*) fhChHadPt->ProjectionX("hChHadPt",-1,-1);
1458 haxispt = (TH1F*) hPi0Pt->Clone("axispt");
1459 haxispt->SetTitle("Reconstructed particles p_{T}, function of their original particle ID");
1460 hPi0Pt->SetLineColor(1);
1461 hGamPt->SetLineColor(4);
1462 hNeHadPt->SetLineColor(2);
1463 hChHadPt->SetLineColor(7);
1464 hElePt->SetLineColor(6);
1466 //Select the maximum of the histogram to show all lines.
1467 if(hPi0Pt->GetMaximum() >= hGamPt->GetMaximum() && hPi0Pt->GetMaximum() >= hNeHadPt->GetMaximum() &&
1468 hPi0Pt->GetMaximum() >= hChHadPt->GetMaximum() && hPi0Pt->GetMaximum() >= hElePt->GetMaximum())
1469 haxispt->SetMaximum(hPi0Pt->GetMaximum());
1470 else if(hGamPt->GetMaximum() >= hPi0Pt->GetMaximum() && hGamPt->GetMaximum() >= hNeHadPt->GetMaximum() &&
1471 hGamPt->GetMaximum() >= hChHadPt->GetMaximum() && hGamPt->GetMaximum() >= hElePt->GetMaximum())
1472 haxispt->SetMaximum(hGamPt->GetMaximum());
1473 else if(hNeHadPt->GetMaximum() >= hPi0Pt->GetMaximum() && hNeHadPt->GetMaximum() >= hGamPt->GetMaximum() &&
1474 hNeHadPt->GetMaximum() >= hChHadPt->GetMaximum() && hNeHadPt->GetMaximum() >= hElePt->GetMaximum())
1475 haxispt->SetMaximum(hNeHadPt->GetMaximum());
1476 else if(hChHadPt->GetMaximum() >= hPi0Pt->GetMaximum() && hChHadPt->GetMaximum() >= hNeHadPt->GetMaximum() &&
1477 hChHadPt->GetMaximum() >= hGamPt->GetMaximum() && hChHadPt->GetMaximum() >= hElePt->GetMaximum())
1478 haxispt->SetMaximum(hChHadPt->GetMaximum());
1479 else if(hElePt->GetMaximum() >= hPi0Pt->GetMaximum() && hElePt->GetMaximum() >= hNeHadPt->GetMaximum() &&
1480 hElePt->GetMaximum() >= hChHadPt->GetMaximum() && hElePt->GetMaximum() >= hGamPt->GetMaximum())
1481 haxispt->SetMaximum(hElePt->GetMaximum());
1482 haxispt->SetXTitle("p_{T} (GeV/c)");
1483 haxispt->SetMinimum(1);
1484 haxispt->SetAxisRange(minx,maxx,"X");
1485 haxispt->Draw("axis");
1486 hPi0Pt->Draw("same");
1487 hGamPt->Draw("same");
1488 hNeHadPt->Draw("same");
1489 hChHadPt->Draw("same");
1490 hElePt->Draw("same");
1496 TH1F * hGamEta = (TH1F*) fhGamEta->ProjectionX("hGamEta",-1,-1);
1497 TH1F * hPi0Eta = (TH1F*) fhPi0Eta->ProjectionX("hPi0Eta",-1,-1);
1498 TH1F * hEleEta = (TH1F*) fhEleEta->ProjectionX("hEleEta",-1,-1);
1499 TH1F * hNeHadEta = (TH1F*) fhNeHadEta->ProjectionX("hNeHadEta",-1,-1);
1500 TH1F * hChHadEta = (TH1F*) fhChHadEta->ProjectionX("hChHadEta",-1,-1);
1501 haxiseta = (TH1F*) hPi0Eta->Clone("axiseta");
1502 haxiseta->SetTitle("Reconstructed particles #eta, function of their original particle ID");
1503 hPi0Eta->SetLineColor(1);
1504 hGamEta->SetLineColor(4);
1505 hNeHadEta->SetLineColor(2);
1506 hChHadEta->SetLineColor(7);
1507 hEleEta->SetLineColor(6);
1508 //Select the maximum of the histogram to show all lines.
1509 if(hPi0Eta->GetMaximum() >= hGamEta->GetMaximum() && hPi0Eta->GetMaximum() >= hNeHadEta->GetMaximum() &&
1510 hPi0Eta->GetMaximum() >= hChHadEta->GetMaximum() && hPi0Eta->GetMaximum() >= hEleEta->GetMaximum())
1511 haxiseta->SetMaximum(hPi0Eta->GetMaximum());
1512 else if(hGamEta->GetMaximum() >= hPi0Eta->GetMaximum() && hGamEta->GetMaximum() >= hNeHadEta->GetMaximum() &&
1513 hGamEta->GetMaximum() >= hChHadEta->GetMaximum() && hGamEta->GetMaximum() >= hEleEta->GetMaximum())
1514 haxiseta->SetMaximum(hGamEta->GetMaximum());
1515 else if(hNeHadEta->GetMaximum() >= hPi0Eta->GetMaximum() && hNeHadEta->GetMaximum() >= hGamEta->GetMaximum() &&
1516 hNeHadEta->GetMaximum() >= hChHadEta->GetMaximum() && hNeHadEta->GetMaximum() >= hEleEta->GetMaximum())
1517 haxiseta->SetMaximum(hNeHadEta->GetMaximum());
1518 else if(hChHadEta->GetMaximum() >= hPi0Eta->GetMaximum() && hChHadEta->GetMaximum() >= hNeHadEta->GetMaximum() &&
1519 hChHadEta->GetMaximum() >= hGamEta->GetMaximum() && hChHadEta->GetMaximum() >= hEleEta->GetMaximum())
1520 haxiseta->SetMaximum(hChHadEta->GetMaximum());
1521 else if(hEleEta->GetMaximum() >= hPi0Eta->GetMaximum() && hEleEta->GetMaximum() >= hNeHadEta->GetMaximum() &&
1522 hEleEta->GetMaximum() >= hChHadEta->GetMaximum() && hEleEta->GetMaximum() >= hGamEta->GetMaximum())
1523 haxiseta->SetMaximum(hEleEta->GetMaximum());
1525 haxiseta->SetXTitle("#eta");
1526 haxiseta->Draw("axis");
1527 hPi0Eta->Draw("same");
1528 hGamEta->Draw("same");
1529 hNeHadEta->Draw("same");
1530 hChHadEta->Draw("same");
1531 hEleEta->Draw("same");
1536 TH1F * hGamPhi = (TH1F*) fhGamPhi->ProjectionX("hGamPhi",-1,-1);
1537 TH1F * hPi0Phi = (TH1F*) fhPi0Phi->ProjectionX("hPi0Phi",-1,-1);
1538 TH1F * hElePhi = (TH1F*) fhElePhi->ProjectionX("hElePhi",-1,-1);
1539 TH1F * hNeHadPhi = (TH1F*) fhNeHadPhi->ProjectionX("hNeHadPhi",-1,-1);
1540 TH1F * hChHadPhi = (TH1F*) fhChHadPhi->ProjectionX("hChHadPhi",-1,-1);
1541 haxisphi = (TH1F*) hPi0Phi->Clone("axisphi");
1542 haxisphi->SetTitle("Reconstructed particles #phi, function of their original particle ID");
1544 hPi0Phi->SetLineColor(1);
1545 hGamPhi->SetLineColor(4);
1546 hNeHadPhi->SetLineColor(2);
1547 hChHadPhi->SetLineColor(7);
1548 hElePhi->SetLineColor(6);
1549 //Select the maximum of the histogram to show all lines.
1550 if(hPi0Phi->GetMaximum() >= hGamPhi->GetMaximum() && hPi0Phi->GetMaximum() >= hNeHadPhi->GetMaximum() &&
1551 hPi0Phi->GetMaximum() >= hChHadPhi->GetMaximum() && hPi0Phi->GetMaximum() >= hElePhi->GetMaximum())
1552 haxisphi->SetMaximum(hPi0Phi->GetMaximum());
1553 else if(hGamPhi->GetMaximum() >= hPi0Phi->GetMaximum() && hGamPhi->GetMaximum() >= hNeHadPhi->GetMaximum() &&
1554 hGamPhi->GetMaximum() >= hChHadPhi->GetMaximum() && hGamPhi->GetMaximum() >= hElePhi->GetMaximum())
1555 haxisphi->SetMaximum(hGamPhi->GetMaximum());
1556 else if(hNeHadPhi->GetMaximum() >= hPi0Phi->GetMaximum() && hNeHadPhi->GetMaximum() >= hGamPhi->GetMaximum() &&
1557 hNeHadPhi->GetMaximum() >= hChHadPhi->GetMaximum() && hNeHadPhi->GetMaximum() >= hElePhi->GetMaximum())
1558 haxisphi->SetMaximum(hNeHadPhi->GetMaximum());
1559 else if(hChHadPhi->GetMaximum() >= hPi0Phi->GetMaximum() && hChHadPhi->GetMaximum() >= hNeHadPhi->GetMaximum() &&
1560 hChHadPhi->GetMaximum() >= hGamPhi->GetMaximum() && hChHadPhi->GetMaximum() >= hElePhi->GetMaximum())
1561 haxisphi->SetMaximum(hChHadPhi->GetMaximum());
1562 else if(hElePhi->GetMaximum() >= hPi0Phi->GetMaximum() && hElePhi->GetMaximum() >= hNeHadPhi->GetMaximum() &&
1563 hElePhi->GetMaximum() >= hChHadPhi->GetMaximum() && hElePhi->GetMaximum() >= hGamPhi->GetMaximum())
1564 haxisphi->SetMaximum(hElePhi->GetMaximum());
1565 haxisphi->SetXTitle("#phi (rad)");
1566 haxisphi->Draw("axis");
1567 hPi0Phi->Draw("same");
1568 hGamPhi->Draw("same");
1569 hNeHadPhi->Draw("same");
1570 hChHadPhi->Draw("same");
1571 hElePhi->Draw("same");
1573 sprintf(name,"QA_%s_RecDistributionsGenID.eps",fCalorimeter.Data());
1577 //Ratio reconstructed clusters / generated particles in acceptance, for different particle ID
1580 TH1F * hPi0EClone = (TH1F*) hPi0E ->Clone("hPi0EClone");
1581 TH1F * hGamEClone = (TH1F*) hGamE ->Clone("hGamEClone");
1582 TH1F * hPi0PtClone = (TH1F*) hPi0Pt ->Clone("hPi0PtClone");
1583 TH1F * hGamPtClone = (TH1F*) hGamPt ->Clone("hGamPtClone");
1584 TH1F * hPi0EtaClone = (TH1F*) hPi0Eta->Clone("hPi0EtaClone");
1585 TH1F * hGamEtaClone = (TH1F*) hGamEta->Clone("hGamEtaClone");
1586 TH1F * hPi0PhiClone = (TH1F*) hPi0Phi->Clone("hPi0PhiClone");
1587 TH1F * hGamPhiClone = (TH1F*) hGamPhi->Clone("hGamPhiClone");
1589 sprintf(cname,"QA_%s_recgenidratio",fCalorimeter.Data());
1590 TCanvas * c12 = new TCanvas(cname, "Ratio reconstructed clusters / generated particles in acceptance, for different particle ID", 400, 400) ;
1595 haxisE->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID");
1596 hPi0EClone->Divide(fhGenPi0AccE);
1597 hGamEClone->Divide(fhGenGamAccE);
1598 haxisE->SetMaximum(1000);
1599 haxisE->SetMinimum(1e-2);
1600 haxisE->SetXTitle("E (GeV)");
1601 haxisE->SetYTitle("ratio = rec/gen");
1602 haxisE->Draw("axis");
1603 hPi0E->Draw("same");
1604 hGamE->Draw("same");
1606 TLegend pLegend3(0.75,0.2,0.9,0.4);
1607 pLegend3.SetTextSize(0.06);
1608 pLegend3.AddEntry(hPi0EClone," #pi^{0}","L");
1609 pLegend3.AddEntry(hGamEClone," #gamma","L");
1610 pLegend3.SetFillColor(10);
1611 pLegend3.SetBorderSize(1);
1616 haxispt->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID");
1617 hPi0PtClone->Divide(fhGenPi0AccPt);
1618 hGamPtClone->Divide(fhGenGamAccPt);
1619 haxispt->SetMaximum(5);
1620 haxispt->SetMinimum(1e-2);
1621 haxispt->SetXTitle("p_{T} (GeV/c)");
1622 haxispt->SetYTitle("ratio = rec/gen");
1623 haxispt->Draw("axis");
1624 hPi0PtClone->Draw("same");
1625 hGamPtClone->Draw("same");
1630 haxiseta->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID");
1631 hPi0EtaClone->Divide(fhGenPi0AccEta);
1632 hGamEtaClone->Divide(fhGenGamAccEta);
1633 haxiseta->SetMaximum(1.2);
1634 haxiseta->SetMinimum(1e-2);
1635 haxiseta->SetYTitle("ratio = rec/gen");
1636 haxiseta->SetXTitle("#eta");
1637 haxiseta->Draw("axis");
1638 hPi0EtaClone->Draw("same");
1639 hGamEtaClone->Draw("same");
1644 haxisphi->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID");
1645 hPi0PhiClone->Divide(fhGenPi0AccPhi);
1646 hGamPhiClone->Divide(fhGenGamAccPhi);
1647 haxisphi->SetYTitle("ratio = rec/gen");
1648 haxisphi->SetXTitle("#phi (rad)");
1649 haxisphi->SetMaximum(1.2);
1650 haxisphi->SetMinimum(1e-2);
1651 haxisphi->Draw("axis");
1652 hPi0PhiClone->Draw("same");
1653 hGamPhiClone->Draw("same");
1655 sprintf(name,"QA_%s_EfficiencyGenID.eps",fCalorimeter.Data());
1659 //Reconstructed distributions
1661 sprintf(cname,"QA_%s_vertex",fCalorimeter.Data());
1662 TCanvas * c13 = new TCanvas(cname, "Particle vertex", 400, 400) ;
1667 fhEMVxyz->SetTitleOffset(1.6,"Y");
1672 fhHaVxyz->SetTitleOffset(1.6,"Y");
1677 TH1F * hEMR = (TH1F*) fhEMR->ProjectionY("hEM",-1,-1);
1678 hEMR->SetLineColor(4);
1683 TH1F * hHaR = (TH1F*) fhHaR->ProjectionY("hHa",-1,-1);
1684 hHaR->SetLineColor(4);
1688 sprintf(name,"QA_%s_ParticleVertex.eps",fCalorimeter.Data());
1692 //Track-matching distributions
1695 //Reconstructed distributions, matched with tracks, generated particle dependence
1697 sprintf(cname,"QA_%s_rectrackmatchGenID",fCalorimeter.Data());
1698 TCanvas * c22ch = new TCanvas(cname, "Reconstructed distributions, matched with tracks, for different particle ID", 400, 400) ;
1699 c22ch->Divide(2, 2);
1703 TH1F * hGamECharged = (TH1F*) fhGamECharged->ProjectionX("hGamECharged",-1,-1);
1704 TH1F * hPi0ECharged = (TH1F*) fhPi0ECharged->ProjectionX("hPi0ECharged",-1,-1);
1705 TH1F * hEleECharged = (TH1F*) fhEleECharged->ProjectionX("hEleECharged",-1,-1);
1706 TH1F * hNeHadECharged = (TH1F*) fhNeHadECharged->ProjectionX("hNeHadECharged",-1,-1);
1707 TH1F * hChHadECharged = (TH1F*) fhChHadECharged->ProjectionX("hChHadECharged",-1,-1);
1708 hPi0ECharged->SetLineColor(1);
1709 hGamECharged->SetLineColor(4);
1710 hNeHadECharged->SetLineColor(2);
1711 hChHadECharged->SetLineColor(7);
1712 hEleECharged->SetLineColor(6);
1714 fhECharged->SetLineColor(3);
1715 fhECharged->SetMinimum(0.5);
1717 hPi0ECharged->Draw("same");
1718 hGamECharged->Draw("same");
1719 hNeHadECharged->Draw("same");
1720 hChHadECharged->Draw("same");
1721 hEleECharged->Draw("same");
1722 TLegend pLegend22(0.75,0.45,0.9,0.8);
1723 pLegend22.SetTextSize(0.06);
1724 pLegend22.AddEntry(fhECharged,"all","L");
1725 pLegend22.AddEntry(hPi0ECharged,"#pi^{0}","L");
1726 pLegend22.AddEntry(hGamECharged,"#gamma","L");
1727 pLegend22.AddEntry(hEleECharged,"e^{#pm}","L");
1728 pLegend22.AddEntry(hChHadECharged,"h^{#pm}","L");
1729 pLegend22.AddEntry(hNeHadECharged,"h^{0}","L");
1730 pLegend22.SetFillColor(10);
1731 pLegend22.SetBorderSize(1);
1736 TH1F * hGamPtCharged = (TH1F*) fhGamPtCharged->ProjectionX("hGamPtCharged",-1,-1);
1737 TH1F * hPi0PtCharged = (TH1F*) fhPi0PtCharged->ProjectionX("hPi0PtCharged",-1,-1);
1738 TH1F * hElePtCharged = (TH1F*) fhElePtCharged->ProjectionX("hElePtCharged",-1,-1);
1739 TH1F * hNeHadPtCharged = (TH1F*) fhNeHadPtCharged->ProjectionX("hNeHadPtCharged",-1,-1);
1740 TH1F * hChHadPtCharged = (TH1F*) fhChHadPtCharged->ProjectionX("hChHadPtCharged",-1,-1);
1741 hPi0PtCharged->SetLineColor(1);
1742 hGamPtCharged->SetLineColor(4);
1743 hNeHadPtCharged->SetLineColor(2);
1744 hChHadPtCharged->SetLineColor(7);
1745 hElePtCharged->SetLineColor(6);
1747 fhPtCharged->SetLineColor(3);
1748 fhPtCharged->SetMinimum(0.5);
1749 fhPtCharged->Draw();
1750 hPi0PtCharged->Draw("same");
1751 hGamPtCharged->Draw("same");
1752 hNeHadPtCharged->Draw("same");
1753 hChHadPtCharged->Draw("same");
1754 hElePtCharged->Draw("same");
1758 TH1F * hGamEtaCharged = (TH1F*) fhGamEtaCharged->ProjectionX("hGamEtaCharged",-1,-1);
1759 TH1F * hPi0EtaCharged = (TH1F*) fhPi0EtaCharged->ProjectionX("hPi0EtaCharged",-1,-1);
1760 TH1F * hEleEtaCharged = (TH1F*) fhEleEtaCharged->ProjectionX("hEleEtaCharged",-1,-1);
1761 TH1F * hNeHadEtaCharged = (TH1F*) fhNeHadEtaCharged->ProjectionX("hNeHadEtaCharged",-1,-1);
1762 TH1F * hChHadEtaCharged = (TH1F*) fhChHadEtaCharged->ProjectionX("hChHadEtaCharged",-1,-1);
1763 hPi0EtaCharged->SetLineColor(1);
1764 hGamEtaCharged->SetLineColor(4);
1765 hNeHadEtaCharged->SetLineColor(2);
1766 hChHadEtaCharged->SetLineColor(7);
1767 hEleEtaCharged->SetLineColor(6);
1769 fhEtaCharged->SetLineColor(3);
1770 fhEtaCharged->SetMinimum(0.5);
1771 fhEtaCharged->Draw();
1772 hPi0EtaCharged->Draw("same");
1773 hGamEtaCharged->Draw("same");
1774 hNeHadEtaCharged->Draw("same");
1775 hChHadEtaCharged->Draw("same");
1776 hEleEtaCharged->Draw("same");
1780 TH1F * hGamPhiCharged = (TH1F*) fhGamPhiCharged->ProjectionX("hGamPhiCharged",-1,-1);
1781 TH1F * hPi0PhiCharged = (TH1F*) fhPi0PhiCharged->ProjectionX("hPi0PhiCharged",-1,-1);
1782 TH1F * hElePhiCharged = (TH1F*) fhElePhiCharged->ProjectionX("hElePhiCharged",-1,-1);
1783 TH1F * hNeHadPhiCharged = (TH1F*) fhNeHadPhiCharged->ProjectionX("hNeHadPhiCharged",-1,-1);
1784 TH1F * hChHadPhiCharged = (TH1F*) fhChHadPhiCharged->ProjectionX("hChHadPhiCharged",-1,-1);
1785 hPi0PhiCharged->SetLineColor(1);
1786 hGamPhiCharged->SetLineColor(4);
1787 hNeHadPhiCharged->SetLineColor(2);
1788 hChHadPhiCharged->SetLineColor(7);
1789 hElePhiCharged->SetLineColor(6);
1791 fhPhiCharged->SetLineColor(3);
1792 fhPhiCharged->SetMinimum(0.5);
1793 fhPhiCharged->Draw();
1794 hPi0PhiCharged->Draw("same");
1795 hGamPhiCharged->Draw("same");
1796 hNeHadPhiCharged->Draw("same");
1797 hChHadPhiCharged->Draw("same");
1798 hElePhiCharged->Draw("same");
1801 sprintf(name,"QA_%s_ReconstructedDistributions_TrackMatchedGenID.eps",fCalorimeter.Data());
1804 TH1F * hGamEChargedClone = (TH1F*) hGamECharged->Clone("GamEChargedClone");
1805 TH1F * hGamPtChargedClone = (TH1F*) hGamPtCharged->Clone("GamPtChargedClone");
1806 TH1F * hGamEtaChargedClone = (TH1F*) hGamEtaCharged->Clone("GamEtaChargedClone");
1807 TH1F * hGamPhiChargedClone = (TH1F*) hGamPhiCharged->Clone("GamPhiChargedClone");
1809 TH1F * hPi0EChargedClone = (TH1F*) hPi0ECharged->Clone("Pi0EChargedClone");
1810 TH1F * hPi0PtChargedClone = (TH1F*) hPi0PtCharged->Clone("Pi0PtChargedClone");
1811 TH1F * hPi0EtaChargedClone = (TH1F*) hPi0EtaCharged->Clone("Pi0EtaChargedClone");
1812 TH1F * hPi0PhiChargedClone = (TH1F*) hPi0PhiCharged->Clone("Pi0PhiChargedClone");
1814 TH1F * hEleEChargedClone = (TH1F*) hEleECharged->Clone("EleEChargedClone");
1815 TH1F * hElePtChargedClone = (TH1F*) hElePtCharged->Clone("ElePtChargedClone");
1816 TH1F * hEleEtaChargedClone = (TH1F*) hEleEtaCharged->Clone("EleEtaChargedClone");
1817 TH1F * hElePhiChargedClone = (TH1F*) hElePhiCharged->Clone("ElePhiChargedClone");
1819 TH1F * hNeHadEChargedClone = (TH1F*) hNeHadECharged->Clone("NeHadEChargedClone");
1820 TH1F * hNeHadPtChargedClone = (TH1F*) hNeHadPtCharged->Clone("NeHadPtChargedClone");
1821 TH1F * hNeHadEtaChargedClone = (TH1F*) hNeHadEtaCharged->Clone("NeHadEtaChargedClone");
1822 TH1F * hNeHadPhiChargedClone = (TH1F*) hNeHadPhiCharged->Clone("NeHadPhiChargedClone");
1824 TH1F * hChHadEChargedClone = (TH1F*) hChHadECharged->Clone("ChHadEChargedClone");
1825 TH1F * hChHadPtChargedClone = (TH1F*) hChHadPtCharged->Clone("ChHadPtChargedClone");
1826 TH1F * hChHadEtaChargedClone = (TH1F*) hChHadEtaCharged->Clone("ChHadEtaChargedClone");
1827 TH1F * hChHadPhiChargedClone = (TH1F*) hChHadPhiCharged->Clone("ChHadPhiChargedClone");
1829 //Ratio: reconstructed track matched/ all reconstructed
1831 sprintf(cname,"QA_%s_rectrackmatchratGenID",fCalorimeter.Data());
1832 TCanvas * c3ch = new TCanvas(cname, "Ratio: reconstructed track matched/ all reconstructed, for different particle ID", 400, 400) ;
1836 hEChargedClone->SetMaximum(1.2);
1837 hEChargedClone->SetMinimum(0.001);
1838 hEChargedClone->SetLineColor(3);
1839 hEChargedClone->SetYTitle("track matched / all");
1840 hPi0EChargedClone->Divide(hPi0E);
1841 hGamEChargedClone->Divide(hGamE);
1842 hEleEChargedClone->Divide(hEleE);
1843 hNeHadEChargedClone->Divide(hNeHadE);
1844 hChHadEChargedClone->Divide(hChHadE);
1845 hEChargedClone->Draw();
1846 hPi0EChargedClone->Draw("same");
1847 hGamEChargedClone->Draw("same");
1848 hEleEChargedClone->Draw("same");
1849 hNeHadEChargedClone->Draw("same");
1850 hChHadEChargedClone->Draw("same");
1852 TLegend pLegend3ch(0.75,0.45,0.9,0.8);
1853 pLegend3ch.SetTextSize(0.06);
1854 pLegend3ch.AddEntry(hEChargedClone,"all","L");
1855 pLegend3ch.AddEntry(hPi0EChargedClone,"#pi^{0}","L");
1856 pLegend3ch.AddEntry(hGamEChargedClone,"#gamma","L");
1857 pLegend3ch.AddEntry(hEleEChargedClone,"e^{#pm}","L");
1858 pLegend3ch.AddEntry(hChHadEChargedClone,"h^{#pm}","L");
1859 pLegend3ch.AddEntry(hNeHadEChargedClone,"h^{0}","L");
1860 pLegend3ch.SetFillColor(10);
1861 pLegend3ch.SetBorderSize(1);
1865 hPtChargedClone->SetMaximum(1.2);
1866 hPtChargedClone->SetMinimum(0.001);
1867 hPtChargedClone->SetLineColor(3);
1868 hPtChargedClone->SetYTitle("track matched / all");
1869 hPi0PtChargedClone->Divide(hPi0Pt);
1870 hGamPtChargedClone->Divide(hGamPt);
1871 hElePtChargedClone->Divide(hElePt);
1872 hNeHadPtChargedClone->Divide(hNeHadPt);
1873 hChHadPtChargedClone->Divide(hChHadPt);
1874 hPtChargedClone->Draw();
1875 hPi0PtChargedClone->Draw("same");
1876 hGamPtChargedClone->Draw("same");
1877 hElePtChargedClone->Draw("same");
1878 hNeHadPtChargedClone->Draw("same");
1879 hChHadPtChargedClone->Draw("same");
1882 hEtaChargedClone->SetMaximum(1.2);
1883 hEtaChargedClone->SetMinimum(0.001);
1884 hEtaChargedClone->SetLineColor(3);
1885 hEtaChargedClone->SetYTitle("track matched / all");
1886 hPi0EtaChargedClone->Divide(hPi0Eta);
1887 hGamEtaChargedClone->Divide(hGamEta);
1888 hEleEtaChargedClone->Divide(hEleEta);
1889 hNeHadEtaChargedClone->Divide(hNeHadEta);
1890 hChHadEtaChargedClone->Divide(hChHadEta);
1891 hEtaChargedClone->Draw();
1892 hPi0EtaChargedClone->Draw("same");
1893 hGamEtaChargedClone->Draw("same");
1894 hEleEtaChargedClone->Draw("same");
1895 hNeHadEtaChargedClone->Draw("same");
1896 hChHadEtaChargedClone->Draw("same");
1899 hPhiChargedClone->SetMaximum(1.2);
1900 hPhiChargedClone->SetMinimum(0.001);
1901 hPhiChargedClone->SetLineColor(3);
1902 hPhiChargedClone->SetYTitle("track matched / all");
1903 hPi0PhiChargedClone->Divide(hPi0Phi);
1904 hGamPhiChargedClone->Divide(hGamPhi);
1905 hElePhiChargedClone->Divide(hElePhi);
1906 hNeHadPhiChargedClone->Divide(hNeHadPhi);
1907 hChHadPhiChargedClone->Divide(hChHadPhi);
1908 hPhiChargedClone->Draw();
1909 hPi0PhiChargedClone->Draw("same");
1910 hGamPhiChargedClone->Draw("same");
1911 hElePhiChargedClone->Draw("same");
1912 hNeHadPhiChargedClone->Draw("same");
1913 hChHadPhiChargedClone->Draw("same");
1915 sprintf(name,"QA_%s_RatioReconstructedMatchedDistributionsGenID.eps",fCalorimeter.Data());
1918 sprintf(cname,"QA_%s_trkmatchMCEle",fCalorimeter.Data());
1919 TCanvas *cmemc = new TCanvas(cname,"Track-matching distributions from MC electrons", 600, 200);
1924 fhMCEle1pOverE->Draw();
1925 fhMCEle1pOverER02->SetLineColor(4);
1926 fhMCEle1pOverE->SetLineColor(1);
1927 fhMCEle1pOverER02->Draw("same");
1935 fhMCEle2MatchdEdx->Draw();
1937 sprintf(name,"QA_%s_TrackMatchingDistMCEle.eps",fCalorimeter.Data());
1940 sprintf(cname,"QA_%s_trkmatchMCChHad",fCalorimeter.Data());
1941 TCanvas *cmemchad = new TCanvas(cname,"Track-matching distributions from MC charged hadrons", 600, 200);
1942 cmemchad->Divide(3,1);
1946 fhMCChHad1pOverE->Draw();
1947 fhMCChHad1pOverE->SetLineColor(1);
1948 fhMCChHad1pOverER02->SetLineColor(4);
1949 fhMCChHad1pOverER02->Draw("same");
1954 fhMCChHad1dR->Draw();
1957 fhMCChHad2MatchdEdx->Draw();
1959 sprintf(name,"QA_%s_TrackMatchingDistMCChHad.eps",fCalorimeter.Data());
1960 cmemchad->Print(name);
1962 sprintf(cname,"QA_%s_trkmatchMCNeutral",fCalorimeter.Data());
1963 TCanvas *cmemcn = new TCanvas(cname,"Track-matching distributions from MC neutrals", 600, 200);
1964 cmemcn->Divide(3,1);
1968 fhMCNeutral1pOverE->Draw();
1969 fhMCNeutral1pOverE->SetLineColor(1);
1970 fhMCNeutral1pOverER02->SetLineColor(4);
1971 fhMCNeutral1pOverER02->Draw("same");
1976 fhMCNeutral1dR->Draw();
1979 fhMCNeutral2MatchdEdx->Draw();
1981 sprintf(name,"QA_%s_TrackMatchingDistMCNeutral.eps",fCalorimeter.Data());
1982 cmemcn->Print(name);
1984 sprintf(cname,"QA_%s_trkmatchpE",fCalorimeter.Data());
1985 TCanvas *cmpoe = new TCanvas(cname,"Track-matching distributions, p/E", 400, 200);
1990 fh1pOverE->SetLineColor(1);
1991 fhMCEle1pOverE->SetLineColor(4);
1992 fhMCChHad1pOverE->SetLineColor(2);
1993 fhMCNeutral1pOverE->SetLineColor(7);
1994 fh1pOverE->SetMinimum(0.5);
1996 fhMCEle1pOverE->Draw("same");
1997 fhMCChHad1pOverE->Draw("same");
1998 fhMCNeutral1pOverE->Draw("same");
1999 TLegend pLegendpE(0.65,0.55,0.9,0.8);
2000 pLegendpE.SetTextSize(0.06);
2001 pLegendpE.AddEntry(fh1pOverE,"all","L");
2002 pLegendpE.AddEntry(fhMCEle1pOverE,"e^{#pm}","L");
2003 pLegendpE.AddEntry(fhMCChHad1pOverE,"h^{#pm}","L");
2004 pLegendpE.AddEntry(fhMCNeutral1pOverE,"neutrals","L");
2005 pLegendpE.SetFillColor(10);
2006 pLegendpE.SetBorderSize(1);
2011 fh1pOverER02->SetTitle("Track matches p/E, dR<0.2");
2012 fh1pOverER02->SetLineColor(1);
2013 fhMCEle1pOverER02->SetLineColor(4);
2014 fhMCChHad1pOverER02->SetLineColor(2);
2015 fhMCNeutral1pOverER02->SetLineColor(7);
2016 fh1pOverER02->SetMaximum(fh1pOverE->GetMaximum());
2017 fh1pOverER02->SetMinimum(0.5);
2018 fh1pOverER02->Draw();
2019 fhMCEle1pOverER02->Draw("same");
2020 fhMCChHad1pOverER02->Draw("same");
2021 fhMCNeutral1pOverER02->Draw("same");
2023 // TLegend pLegendpE2(0.65,0.55,0.9,0.8);
2024 // pLegendpE2.SetTextSize(0.06);
2025 // pLegendpE2.SetHeader("dR < 0.02");
2026 // pLegendpE2.SetFillColor(10);
2027 // pLegendpE2.SetBorderSize(1);
2028 // pLegendpE2.Draw();
2029 //Track matching histograms
2030 sprintf(name,"QA_%s_TrackMatchingPOverE.eps",fCalorimeter.Data());
2032 }//MC related histograms
2034 // char line[1024] ;
2035 // sprintf(line, ".!tar -zcf QA_%s_%s.tar.gz *%s*.eps", fCalorimeter.Data(), GetName(),fCalorimeter.Data()) ;
2036 // gROOT->ProcessLine(line);
2037 // sprintf(line, ".!rm -fR *.eps");
2038 // gROOT->ProcessLine(line);
2040 // printf("AliAnaCalorimeterQA::Terminate() - !! All the pdf files are in QA_%s_%s.tar.gz !!!\n", fCalorimeter.Data(), GetName());