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
41 //Calorimeters Correlation
42 TH2F * fhCaloCorrNClusters; // EMCAL vs PHOS, number of clusters
43 TH2F * fhCaloCorrEClusters; // EMCAL vs PHOS, total measured cluster energy
44 TH2F * fhCaloCorrNCells; // EMCAL vs PHOS, number of cells
45 TH2F * fhCaloCorrECells; // EMCAL vs PHOS, total measured cell energy
48 TH1F ** fhEMod ; //! E distribution for different module, Reco
49 TH1F ** fhNClustersMod ; //! Number of clusters for different module, Reco
50 TH2F ** fhNCellsPerClusterMod ; //! N cells per clusters different module, Reco
51 TH1F ** fhNCellsMod ; //! Number of towers/crystals with signal different module, Reco
52 TH2F ** fhGridCellsMod ; //! Cells ordered in column/row for different module, Reco
53 TH2F ** fhGridCellsEMod ; //! Cells ordered in column/row for different module, weighted with energy, Reco
54 TH1F ** fhAmplitudeMod ; //! Amplitude measured in towers/crystals different module, Reco
55 TH2F ** fhIMMod; //! cluster pairs invariant mass, different module,
56 TH2F ** fhIMCellCutMod; //! cluster pairs invariant mass, n cells > 1 per cluster, different module
60 TH1F *fhGenGamPt ; // pt of primary gamma
61 TH1F *fhGenGamEta ; // eta of primart gamma
62 TH1F *fhGenGamPhi ; // phi of primary gamma
63 TH1F *fhGenPi0Pt ; // pt of primary pi0
64 TH1F *fhGenPi0Eta ; // eta of primart pi0
65 TH1F *fhGenPi0Phi ; // phi of primary pi0
66 TH1F *fhGenEtaPt ; // pt of primary eta
67 TH1F *fhGenEtaEta ; // eta of primart eta
68 TH1F *fhGenEtaPhi ; // phi of primary eta
69 TH1F *fhGenOmegaPt ; // pt of primary omega
70 TH1F *fhGenOmegaEta ; // eta of primart omega
71 TH1F *fhGenOmegaPhi ; // phi of primary omega
72 TH1F *fhGenElePt ; // pt of primary electron
73 TH1F *fhGenEleEta ; // eta of primart electron
74 TH1F *fhGenElePhi ; // phi of primary electron
76 //TH3F * fhEMVxyz ; // Electromagnetic particle production vertex
77 TH2F * fhEMVxyz ; // Electromagnetic particle production vertex
78 TH2F * fhEMR ; // Electromagnetic distance to vertex vs rec energy
79 //TH3F * fhHaVxyz ; // Hadron production vertex
80 TH2F * fhHaVxyz ; // Hadron production vertex
81 TH2F * fhHaR ; // Hadron distance to vertex vs rec energy
83 TH2F * fhGamE ; //! E distribution of generated photons, Reco
84 TH2F * fhGamPt ; //! pT distribution of generated photons, Reco
85 TH2F * fhGamPhi; //! phi distribution of generated photon, Reco
86 TH2F * fhGamEta; //! eta distribution of generated photons, Reco
87 TH1F * fhGamDeltaE ; //! MC-Reco E distribution of generated photons
88 TH1F * fhGamDeltaPt ; //! MC-Reco pT distribution of generated photons
89 TH1F * fhGamDeltaPhi; //! MC-Reco phi distribution of generated photons
90 TH1F * fhGamDeltaEta; //! MC-Reco eta distribution of generated photons
91 TH1F * fhGamRatioE ; //! Reco/MC E distribution of generated photons
92 TH1F * fhGamRatioPt ; //! Reco/MC pT distribution of generated photons
93 TH1F * fhGamRatioPhi; //! Reco/MC phi distribution of generated photons
94 TH1F * fhGamRatioEta; //! Reco/MC eta distribution of generated photons
95 TH2F * fhEleE ; //! E distribution of generated electrons, Reco
96 TH2F * fhElePt ; //! pT distribution of generated electrons, Reco
97 TH2F * fhElePhi; //! phi distribution of generated electron, Reco
98 TH2F * fhEleEta; //! eta distribution of generated electrons, Reco
99 TH2F * fhPi0E ; //! E distribution of generated pi0, Reco, gamma decay overlapped
100 TH2F * fhPi0Pt ; //! pT distribution of generated pi0, Reco, gamma decay overlapped
101 TH2F * fhPi0Phi; //! phi distribution of generated pi0, Reco, gamma decay overlapped
102 TH2F * fhPi0Eta; //! eta distribution of generated pi0, Reco, gamma decay overlapped
103 TH2F * fhNeHadE ; //! E distribution of generated neutral hadron, Reco
104 TH2F * fhNeHadPt ; //! pT distribution of generated neutral hadron, Reco
105 TH2F * fhNeHadPhi; //! phi distribution of generated neutral hadron, Reco
106 TH2F * fhNeHadEta; //! eta distribution of generated neutral hadron, Reco
107 TH2F * fhChHadE ; //! E distribution of generated charged hadron, Reco
108 TH2F * fhChHadPt ; //! pT distribution of generated charged hadron, Reco
109 TH2F * fhChHadPhi; //! phi distribution of generated charged hadron, Reco
110 TH2F * fhChHadEta; //! eta distribution of generated charged hadron, Reco
112 TH2F * fhGamECharged ; //! E distribution of generated photons, Reco, track matched cluster
113 TH2F * fhGamPtCharged ; //! pT distribution of generated photons, Reco, track matched cluster
114 TH2F * fhGamPhiCharged; //! phi distribution of generated photon, Reco, track matched cluster
115 TH2F * fhGamEtaCharged; //! eta distribution of generated photons, Reco, track matched cluster
116 TH2F * fhEleECharged ; //! E distribution of generated electrons, Reco, track matched cluster
117 TH2F * fhElePtCharged ; //! pT distribution of generated electrons, Reco, track matched cluster
118 TH2F * fhElePhiCharged; //! phi distribution of generated electron, Reco, track matched cluster
119 TH2F * fhEleEtaCharged; //! eta distribution of generated electrons, Reco, track matched cluster
120 TH2F * fhPi0ECharged ; //! E distribution of generated pi0, Reco, gamma decay overlapped, track matched cluster
121 TH2F * fhPi0PtCharged ; //! pT distribution of generated pi0, Reco, gamma decay overlapped, track matched cluster
122 TH2F * fhPi0PhiCharged; //! phi distribution of generated pi0, Reco, gamma decay overlapped, track matched cluster
123 TH2F * fhPi0EtaCharged; //! eta distribution of generated pi0, Reco, gamma decay overlapped, track matched cluster
124 TH2F * fhNeHadECharged ; //! E distribution of generated neutral hadron, Reco, track matched cluster
125 TH2F * fhNeHadPtCharged ; //! pT distribution of generated neutral hadron, Reco, track matched cluster
126 TH2F * fhNeHadPhiCharged; //! phi distribution of generated neutral hadron, Reco , track matched cluster
127 TH2F * fhNeHadEtaCharged; //! eta distribution of generated neutral hadron, Reco, track matched cluster
128 TH2F * fhChHadECharged ; //! E distribution of generated charged hadron, Reco, track matched cluster
129 TH2F * fhChHadPtCharged ; //! pT distribution of generated charged hadron, Reco, track matched cluster
130 TH2F * fhChHadPhiCharged; //! phi distribution of generated charged hadron, Reco, track matched cluster
131 TH2F * fhChHadEtaCharged; //! eta distribution of generated charged hadron, Reco, track matched cluster
133 TH1F *fhGenGamAccE ; // E of primary gamma
134 TH1F *fhGenGamAccPt ; // pt of primary gamma
135 TH1F *fhGenGamAccEta ; // eta of primart gamma
136 TH1F *fhGenGamAccPhi ; // phi of primary gamma
137 TH1F *fhGenPi0AccE ; // E of primary pi0
138 TH1F *fhGenPi0AccPt ; // pt of primary pi0
139 TH1F *fhGenPi0AccEta ; // eta of primart pi0
140 TH1F *fhGenPi0AccPhi ; // phi of primary pi0
142 //Histograms for track-matching
143 TH2F *fh1pOverE; //! p/E for track-cluster matches
144 TH1F *fh1dR; //! distance between projected track and cluster
145 TH2F *fh2EledEdx; //! dE/dx vs. momentum for electron candidates
146 TH2F *fh2MatchdEdx; //! dE/dx vs. momentum for all matches
147 TH2F *fhMCEle1pOverE; //! p/E for track-cluster matches, MC electrons
148 TH1F *fhMCEle1dR; //! distance between projected track and cluster, MC electrons
149 TH2F *fhMCEle2MatchdEdx; //! dE/dx vs. momentum for all matches, MC electrons
151 TH2F *fhMCChHad1pOverE; //! p/E for track-cluster matches, MC charged hadrons
152 TH1F *fhMCChHad1dR; //! distance between projected track and cluster, MC charged hadrons
153 TH2F *fhMCChHad2MatchdEdx; //! dE/dx vs. momentum for all matches, MC charged
155 TH2F *fhMCNeutral1pOverE; //! p/E for track-cluster matches, MC neutral
156 TH1F *fhMCNeutral1dR; //! distance between projected track and cluster, MC neutral
157 TH2F *fhMCNeutral2MatchdEdx; //! dE/dx vs. momentum for all matches, MC neutral
159 TH2F *fh1pOverER02; //! p/E for track-cluster matches, dR > 0.2
160 TH2F *fhMCEle1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC electrons
161 TH2F *fhMCChHad1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC charged hadrons
162 TH2F *fhMCNeutral1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC neutral
164 //________________________________________________________________________
165 void ReadHistograms(TString name, Bool_t isDataMC, Bool_t fCorrelateCalos, Int_t fNModules)
167 TFile *f = new TFile("Calo.Performance.root","read");
168 TList* outputList = f->Get("Calo.Performance");
171 fhEMod = new TH1F*[fNModules];
172 fhNClustersMod = new TH1F*[fNModules];
173 fhNCellsPerClusterMod = new TH2F*[fNModules];
174 fhNCellsMod = new TH1F*[fNModules];
175 fhGridCellsMod = new TH2F*[fNModules];
176 fhGridCellsEMod = new TH2F*[fNModules];
177 fhAmplitudeMod = new TH1F*[fNModules];
178 fhIMMod = new TH2F*[fNModules];
179 fhIMCellCutMod = new TH2F*[fNModules];
182 // Histograms of this analsys are kept in the same list as other analysis, recover the position of
183 // the first one and then add the next
184 Int_t index = outputList->IndexOf(outputList->FindObject(name+"hE"));
185 //printf("Calo: %s, index: %d\n",fCalorimeter.Data(),index);
186 //Read histograms, must be in the same order as in GetCreateOutputObject.
187 fhE = (TH1F *) outputList->At(index++);
188 fhPt = (TH1F *) outputList->At(index++);
189 fhPhi = (TH1F *) outputList->At(index++);
190 fhEta = (TH1F *) outputList->At(index++);
191 fhEtaPhi = (TH2F *) outputList->At(index++);
192 fhEtaPhiE = (TH3F *) outputList->At(index++);
194 fhECharged = (TH1F *) outputList->At(index++);
195 fhPtCharged = (TH1F *) outputList->At(index++);
196 fhPhiCharged = (TH1F *) outputList->At(index++);
197 fhEtaCharged = (TH1F *) outputList->At(index++);
198 fhEtaPhiCharged = (TH2F *) outputList->At(index++);
200 fhEChargedNoOut = (TH1F *) outputList->At(index++);
201 fhPtChargedNoOut = (TH1F *) outputList->At(index++);
202 fhPhiChargedNoOut = (TH1F *) outputList->At(index++);
203 fhEtaChargedNoOut = (TH1F *) outputList->At(index++);
204 fhEtaPhiChargedNoOut = (TH2F *) outputList->At(index++);
206 fh1pOverE = (TH2F *) outputList->At(index++);
207 fh1dR = (TH1F *) outputList->At(index++);
208 fh2MatchdEdx = (TH2F *) outputList->At(index++);
209 fh2EledEdx = (TH2F *) outputList->At(index++);
210 fh1pOverER02 = (TH2F *) outputList->At(index++);
212 fhIM = (TH2F *) outputList->At(index++);
213 fhIMCellCut = (TH2F *) outputList->At(index++);
214 fhAsym = (TH2F *) outputList->At(index++);
216 fhNCellsPerCluster = (TH2F *) outputList->At(index++);
217 fhNClusters = (TH1F *) outputList->At(index++);
218 fhNCells = (TH1F *) outputList->At(index++);
219 fhAmplitude = (TH1F *) outputList->At(index++);
222 fhCaloCorrNClusters = (TH2F *) outputList->At(index++);
223 fhCaloCorrEClusters = (TH2F *) outputList->At(index++);
224 fhCaloCorrNCells = (TH2F *) outputList->At(index++);
225 fhCaloCorrECells = (TH2F *) outputList->At(index++);
228 for(Int_t imod = 0 ; imod < fNModules; imod++){
229 fhEMod[imod] = (TH1F *) outputList->At(index++);
230 fhNClustersMod[imod] = (TH1F *) outputList->At(index++);
231 fhNCellsPerClusterMod[imod] = (TH2F *) outputList->At(index++);
232 fhNCellsMod[imod] = (TH1F *) outputList->At(index++);
233 fhGridCellsMod[imod] = (TH2F *) outputList->At(index++);
234 fhGridCellsEMod[imod] = (TH2F *) outputList->At(index++);
235 fhAmplitudeMod[imod] = (TH1F *) outputList->At(index++);
236 fhIMMod[imod] = (TH2F *) outputList->At(index++);
237 fhIMCellCutMod[imod] = (TH2F *) outputList->At(index++);
242 fhDeltaE = (TH1F *) outputList->At(index++);
243 fhDeltaPt = (TH1F *) outputList->At(index++);
244 fhDeltaPhi = (TH1F *) outputList->At(index++);
245 fhDeltaEta = (TH1F *) outputList->At(index++);
247 fhRatioE = (TH1F *) outputList->At(index++);
248 fhRatioPt = (TH1F *) outputList->At(index++);
249 fhRatioPhi = (TH1F *) outputList->At(index++);
250 fhRatioEta = (TH1F *) outputList->At(index++);
252 fh2E = (TH2F *) outputList->At(index++);
253 fh2Pt = (TH2F *) outputList->At(index++);
254 fh2Phi = (TH2F *) outputList->At(index++);
255 fh2Eta = (TH2F *) outputList->At(index++);
257 fhGamE = (TH2F *) outputList->At(index++);
258 fhGamPt = (TH2F *) outputList->At(index++);
259 fhGamPhi = (TH2F *) outputList->At(index++);
260 fhGamEta = (TH2F *) outputList->At(index++);
262 fhGamDeltaE = (TH1F *) outputList->At(index++);
263 fhGamDeltaPt = (TH1F *) outputList->At(index++);
264 fhGamDeltaPhi = (TH1F *) outputList->At(index++);
265 fhGamDeltaEta = (TH1F *) outputList->At(index++);
267 fhGamRatioE = (TH1F *) outputList->At(index++);
268 fhGamRatioPt = (TH1F *) outputList->At(index++);
269 fhGamRatioPhi = (TH1F *) outputList->At(index++);
270 fhGamRatioEta = (TH1F *) outputList->At(index++);
272 fhPi0E = (TH2F *) outputList->At(index++);
273 fhPi0Pt = (TH2F *) outputList->At(index++);
274 fhPi0Phi = (TH2F *) outputList->At(index++);
275 fhPi0Eta = (TH2F *) outputList->At(index++);
277 fhEleE = (TH2F *) outputList->At(index++);
278 fhElePt = (TH2F *) outputList->At(index++);
279 fhElePhi = (TH2F *) outputList->At(index++);
280 fhEleEta = (TH2F *) outputList->At(index++);
282 fhNeHadE = (TH2F *) outputList->At(index++);
283 fhNeHadPt = (TH2F *) outputList->At(index++);
284 fhNeHadPhi = (TH2F *) outputList->At(index++);
285 fhNeHadEta = (TH2F *) outputList->At(index++);
287 fhChHadE = (TH2F *) outputList->At(index++);
288 fhChHadPt = (TH2F *) outputList->At(index++);
289 fhChHadPhi = (TH2F *) outputList->At(index++);
290 fhChHadEta = (TH2F *) outputList->At(index++);
291 fhGamECharged = (TH2F *) outputList->At(index++);
292 fhGamPtCharged = (TH2F *) outputList->At(index++);
293 fhGamPhiCharged = (TH2F *) outputList->At(index++);
294 fhGamEtaCharged = (TH2F *) outputList->At(index++);
296 fhPi0ECharged = (TH2F *) outputList->At(index++);
297 fhPi0PtCharged = (TH2F *) outputList->At(index++);
298 fhPi0PhiCharged = (TH2F *) outputList->At(index++);
299 fhPi0EtaCharged = (TH2F *) outputList->At(index++);
301 fhEleECharged = (TH2F *) outputList->At(index++);
302 fhElePtCharged = (TH2F *) outputList->At(index++);
303 fhElePhiCharged = (TH2F *) outputList->At(index++);
304 fhEleEtaCharged = (TH2F *) outputList->At(index++);
306 fhNeHadECharged = (TH2F *) outputList->At(index++);
307 fhNeHadPtCharged = (TH2F *) outputList->At(index++);
308 fhNeHadPhiCharged = (TH2F *) outputList->At(index++);
309 fhNeHadEtaCharged = (TH2F *) outputList->At(index++);
311 fhChHadECharged = (TH2F *) outputList->At(index++);
312 fhChHadPtCharged = (TH2F *) outputList->At(index++);
313 fhChHadPhiCharged = (TH2F *) outputList->At(index++);
314 fhChHadEtaCharged = (TH2F *) outputList->At(index++);
316 // fhEMVxyz = (TH3F *) outputList->At(index++);
317 // fhHaVxyz = (TH3F *) outputList->At(index++);
319 fhEMVxyz = (TH2F *) outputList->At(index++);
320 fhHaVxyz = (TH2F *) outputList->At(index++);
321 fhEMR = (TH2F *) outputList->At(index++);
322 fhHaR = (TH2F *) outputList->At(index++);
324 fhGenGamPt = (TH1F *) outputList->At(index++);
325 fhGenGamEta = (TH1F *) outputList->At(index++);
326 fhGenGamPhi = (TH1F *) outputList->At(index++);
328 fhGenPi0Pt = (TH1F *) outputList->At(index++);
329 fhGenPi0Eta = (TH1F *) outputList->At(index++);
330 fhGenPi0Phi = (TH1F *) outputList->At(index++);
332 fhGenEtaPt = (TH1F *) outputList->At(index++);
333 fhGenEtaEta = (TH1F *) outputList->At(index++);
334 fhGenEtaPhi = (TH1F *) outputList->At(index++);
336 fhGenOmegaPt = (TH1F *) outputList->At(index++);
337 fhGenOmegaEta = (TH1F *) outputList->At(index++);
338 fhGenOmegaPhi = (TH1F *) outputList->At(index++);
340 fhGenElePt = (TH1F *) outputList->At(index++);
341 fhGenEleEta = (TH1F *) outputList->At(index++);
342 fhGenElePhi = (TH1F *) outputList->At(index++);
344 fhGenGamAccE = (TH1F *) outputList->At(index++);
345 fhGenGamAccPt = (TH1F *) outputList->At(index++);
346 fhGenGamAccEta = (TH1F *) outputList->At(index++);
347 fhGenGamAccPhi = (TH1F *) outputList->At(index++);
349 fhGenPi0AccE = (TH1F *) outputList->At(index++);
350 fhGenPi0AccPt = (TH1F *) outputList->At(index++);
351 fhGenPi0AccEta = (TH1F *) outputList->At(index++);
352 fhGenPi0AccPhi = (TH1F *) outputList->At(index++);
355 fhMCEle1pOverE = (TH2F *) outputList->At(index++);
356 fhMCEle1dR = (TH1F *) outputList->At(index++);
357 fhMCEle2MatchdEdx = (TH2F *) outputList->At(index++);
359 fhMCChHad1pOverE = (TH2F *) outputList->At(index++);
360 fhMCChHad1dR = (TH1F *) outputList->At(index++);
361 fhMCChHad2MatchdEdx = (TH2F *) outputList->At(index++);
363 fhMCNeutral1pOverE = (TH2F *) outputList->At(index++);
364 fhMCNeutral1dR = (TH1F *) outputList->At(index++);
365 fhMCNeutral2MatchdEdx = (TH2F *) outputList->At(index++);
367 fhMCEle1pOverER02 = (TH2F *) outputList->At(index++);
368 fhMCChHad1pOverER02 = (TH2F *) outputList->At(index++);
369 fhMCNeutral1pOverER02 = (TH2F *) outputList->At(index++);
374 //__________________________________________________________________
375 void DrawCaloQA(TString fCalorimeter = "EMCAL", Bool_t isDataMC = kFALSE)
377 //Macro for replotting Calorimeter QA histograms
378 Bool_t fCorrelateCalos = kFALSE;
379 Int_t fNModules = 12;
380 //By default when PHOS QA is called correlation not done
381 if(fCalorimeter == "PHOS") {
382 fCorrelateCalos = kFALSE;
386 fCorrelateCalos = kTRUE;
389 cout<<"Calo? "<<fCalorimeter<<" Correlate plots? "<<fCorrelateCalos<<" MC plots?"<<isDataMC<<endl;
390 //Do some plots to end
391 gROOT->Macro("./style.C");//Set different root style parameters
392 //Recover histograms from output histograms list, needed for distributed analysis.
393 ReadHistograms(fCalorimeter+"_", isDataMC, fCorrelateCalos,fNModules);
400 //Reconstructed distributions
402 sprintf(cname,"QA_%s_rec",fCalorimeter.Data());
403 TCanvas * c = new TCanvas(cname, "Reconstructed distributions", 400, 400) ;
406 fhE->SetAxisRange(minx,maxx,"X");
407 fhPt->SetAxisRange(minx,maxx,"X");
410 if(fhE->GetEntries() > 0) gPad->SetLogy();
411 TLegend pLegendE(0.7,0.6,0.9,0.8);
412 pLegendE.SetTextSize(0.03);
413 pLegendE.AddEntry(fhE,"all modules","L");
414 pLegendE.SetFillColor(10);
415 pLegendE.SetBorderSize(1);
417 fhE->SetLineColor(1);
419 for(Int_t imod = 0; imod < fNModules; imod++){
420 fhEMod[imod]->SetLineColor(imod+1);
421 fhEMod[imod]->Draw("same");
422 pLegendE.AddEntry(fhEMod[imod],Form("module %d",imod),"L");
428 fhPt->SetLineColor(4);
432 fhPhi->SetLineColor(4);
436 fhEta->SetLineColor(4);
439 sprintf(name,"QA_%s_ReconstructedDistributions.eps",fCalorimeter.Data());
442 //Reconstructed distributions, matched with tracks
444 sprintf(cname,"QA_%s_rectrackmatch",fCalorimeter.Data());
445 TCanvas * c2 = new TCanvas(cname, "Reconstructed distributions, matched with tracks", 400, 400) ;
448 fhECharged->SetAxisRange(minx,maxx,"X");
449 fhPtCharged->SetAxisRange(minx,maxx,"X");
453 fhECharged->SetLineColor(4);
458 fhPtCharged->SetLineColor(4);
462 fhPhiCharged->SetLineColor(4);
463 fhPhiCharged->Draw();
466 fhEtaCharged->SetLineColor(4);
467 fhEtaCharged->Draw();
469 sprintf(name,"QA_%s_ReconstructedDistributions_TrackMatched.eps",fCalorimeter.Data());
472 TH1F * hEChargedClone = (TH1F*) fhECharged->Clone("EChargedClone");
473 TH1F * hPtChargedClone = (TH1F*) fhPtCharged->Clone("PtChargedClone");
474 TH1F * hEtaChargedClone = (TH1F*) fhEtaCharged->Clone("EtaChargedClone");
475 TH1F * hPhiChargedClone = (TH1F*) fhPhiCharged->Clone("PhiChargedClone");
477 TH1F * hEChargedClone2 = (TH1F*) fhECharged->Clone("EChargedClone2");
478 TH1F * hPtChargedClone2 = (TH1F*) fhPtCharged->Clone("PtChargedClone2");
479 TH1F * hEtaChargedClone2 = (TH1F*) fhEtaCharged->Clone("EtaChargedClone2");
480 TH1F * hPhiChargedClone2 = (TH1F*) fhPhiCharged->Clone("PhiChargedClone2");
482 //Ratio: reconstructed track matched/ all reconstructed
484 sprintf(cname,"QA_%s_rectrackmatchrat",fCalorimeter.Data());
485 TCanvas * c3 = new TCanvas(cname, "Ratio: reconstructed track matched/ all reconstructed", 400, 400) ;
490 hEChargedClone->SetTitleOffset(1.6,"Y");
491 hEChargedClone->SetYTitle("track matched / all ");
492 hEChargedClone->SetXTitle("E (GeV)");
493 hEChargedClone->Divide(fhE);
494 hEChargedClone->Draw();
498 hPtChargedClone->SetTitleOffset(1.6,"Y");
499 hPtChargedClone->SetYTitle("track matched / all ");
500 hPtChargedClone->SetXTitle("p_{T} (GeV/c)");
501 hPtChargedClone->Divide(fhPt);
502 hPtChargedClone->Draw();
506 hPhiChargedClone->SetTitleOffset(1.6,"Y");
507 hPhiChargedClone->SetYTitle("track matched / all ");
508 hPhiChargedClone->SetXTitle("#phi (rad)");
509 hPhiChargedClone->Divide(fhPhi);
510 hPhiChargedClone->Draw();
514 hEtaChargedClone->SetTitleOffset(1.6,"Y");
515 hEtaChargedClone->SetYTitle("track matched / all ");
516 hEtaChargedClone->SetXTitle("#eta");
517 hEtaChargedClone->Divide(fhEta);
518 hEtaChargedClone->Draw();
520 sprintf(name,"QA_%s_RatioReconstructedMatchedDistributions.eps",fCalorimeter.Data());
523 //Ratio: reconstructed track matched (minus no track param) / all
525 sprintf(cname,"QA_%s_rectrackmatchratout",fCalorimeter.Data());
526 TCanvas * c333 = new TCanvas(cname, "Ratio: reconstructed track matched (with outer track param)/ all", 400, 400) ;
530 hEChargedClone2->Add(fhEChargedNoOut,-1);
531 hEChargedClone2->SetYTitle("track matched / all");
532 hEChargedClone2->SetXTitle("E (GeV)");
533 hEChargedClone2->Divide(fhE);
534 hEChargedClone2->Draw();
537 hPtChargedClone2->Add(fhPtChargedNoOut,-1);
538 hPtChargedClone2->SetYTitle("track matched / all");
539 hPtChargedClone2->SetXTitle("p_{T} (GeV/c)");
540 hPtChargedClone2->Divide(fhPt);
541 hPtChargedClone2->Draw();
544 hPhiChargedClone2->Add(fhPhiChargedNoOut,-1);
545 hPhiChargedClone2->SetYTitle("track matched / all");
546 hPhiChargedClone2->SetXTitle("#phi (rad)");
547 hPhiChargedClone2->Divide(fhPhi);
548 hPhiChargedClone2->Draw();
551 hEtaChargedClone2->Add(fhEtaChargedNoOut,-1);
552 hEtaChargedClone2->SetYTitle("track matched / all");
553 hEtaChargedClone2->SetXTitle("#eta");
554 hEtaChargedClone2->Divide(fhEta);
555 hEtaChargedClone2->Draw();
557 sprintf(name,"QA_%s_RatioReconstructedMatchedDistributionsOuter.eps",fCalorimeter.Data());
560 // //Reconstructed distributions, matched with tracks but no outer param
562 // sprintf(cname,"QA_%s_rectrackmatch_noout",fCalorimeter.Data());
563 // TCanvas * c22 = new TCanvas(cname, "Reconstructed distributions, matched with tracks, no outer track param", 400, 400) ;
564 // c22->Divide(2, 2);
568 // fhEChargedNoOut->SetLineColor(4);
569 // fhEChargedNoOut->Draw();
573 // fhPtChargedNoOut->SetLineColor(4);
574 // fhPtChargedNoOut->Draw();
577 // fhPhiChargedNoOut->SetLineColor(4);
578 // fhPhiChargedNoOut->Draw();
581 // fhEtaChargedNoOut->SetLineColor(4);
582 // fhEtaChargedNoOut->Draw();
584 // sprintf(name,"QA_%s_ReconstructedDistributions_TrackMatched_NoOutParam.eps",fCalorimeter.Data());
587 //Ratio: reconstructed track matched/ all reconstructed
590 // TH1F * hEChargedNoOutClone = (TH1F*) fhEChargedNoOut->Clone("EChargedNoOutClone");
591 // TH1F * hPtChargedNoOutClone = (TH1F*) fhPtChargedNoOut->Clone("PtChargedNoOutClone");
592 // TH1F * hEtaChargedNoOutClone = (TH1F*) fhEtaChargedNoOut->Clone("EtaChargedNoOutClone");
593 // TH1F * hPhiChargedNoOutClone = (TH1F*) fhPhiChargedNoOut->Clone("PhiChargedNoOutClone");
595 // sprintf(cname,"QA_%s_rectrackmatchratnoout",fCalorimeter.Data());
596 // TCanvas * c33 = new TCanvas(cname, "Ratio: reconstructed track matched/ all reconstructed", 400, 400) ;
597 // c33->Divide(2, 2);
600 // hEChargedNoOutClone->SetYTitle("track matched no out/ all matched");
601 // hEChargedNoOutClone->SetXTitle("E (GeV)");
602 // hEChargedNoOutClone->Divide(fhECharged);
603 // hEChargedNoOutClone->Draw();
606 // hPtChargedNoOutClone->SetYTitle("track matched no out / all matched");
607 // hPtChargedNoOutClone->SetXTitle("p_{T} (GeV/c)");
608 // hPtChargedNoOutClone->Divide(fhPtCharged);
609 // hPtChargedNoOutClone->Draw();
612 // hPhiChargedNoOutClone->SetYTitle("track matched no out/ all matched");
613 // hPhiChargedNoOutClone->SetXTitle("#phi (rad)");
614 // hPhiChargedNoOutClone->Divide(fhPhiCharged);
615 // hPhiChargedNoOutClone->Draw();
618 // hEtaChargedNoOutClone->SetYTitle("track matched no out/ all matched");
619 // hEtaChargedNoOutClone->SetXTitle("#eta");
620 // hEtaChargedNoOutClone->Divide(fhEtaCharged);
621 // hEtaChargedNoOutClone->Draw();
623 // sprintf(name,"QA_%s_RatioMatchedDistributionsAllToNoOut.eps",fCalorimeter.Data());
628 //TRACK MATCHING P/E distributions
629 //printf("cPoverE\n");
630 sprintf(cname,"QA_%s_trkmatch",fCalorimeter.Data());
631 TCanvas *cme = new TCanvas(cname,"Track-matching distributions", 400, 400);
634 TLegend pLegendpE0(0.6,0.55,0.9,0.8);
635 pLegendpE0.SetTextSize(0.04);
636 pLegendpE0.AddEntry(fh1pOverE,"all","L");
637 pLegendpE0.AddEntry(fh1pOverER02,"dR < 0.02","L");
638 pLegendpE0.SetFillColor(10);
639 pLegendpE0.SetBorderSize(1);
644 fh1pOverE->SetTitle("Track matches p/E");
646 fh1pOverER02->SetLineColor(4);
647 fh1pOverER02->Draw("same");
655 fh2MatchdEdx->Draw();
660 sprintf(name,"QA_%s_TrackMatchingEleDist.eps",fCalorimeter.Data());
665 sprintf(cname,"QA_%s_etavsphi",fCalorimeter.Data());
666 // TCanvas * c4 = new TCanvas(cname, "reconstructed #eta vs #phi", 600, 200) ;
669 TCanvas * c4 = new TCanvas(cname, "reconstructed #eta vs #phi", 400, 200) ;
673 fhEtaPhi->Draw("cont");
676 fhEtaPhiCharged->Draw("cont");
679 // fhEtaPhiChargedNoOut->Draw("cont");
681 sprintf(name,"QA_%s_ReconstructedEtaVsPhi.eps",fCalorimeter.Data());
684 sprintf(name,"QA_%s_ReconstructedEtaVsPhiVsE.eps",fCalorimeter.Data());
685 c4->Print(name); printf("Plot: %s\n",name);
691 if(fhIM->GetEntries() > 1){
692 Int_t nebins = fhIM->GetNbinsX();
693 Int_t emax = (Int_t) fhIM->GetXaxis()->GetXmax();
694 Int_t emin = (Int_t) fhIM->GetXaxis()->GetXmin();
695 if (emin != 0 ) printf("emin != 0 \n");
696 //printf("IM: nBinsX %d, emin %2.2f, emax %2.2f\n",nebins,emin,emax);
698 sprintf(cname,"QA_%s_IM",fCalorimeter.Data());
700 TCanvas * c5 = new TCanvas(cname, "Invariant mass", 600, 400) ;
704 //fhIM->SetLineColor(4);
707 binmax = (Int_t) (1-emin)*nebins/emax;
708 TH1D *pyim1 = fhIM->ProjectionY("pyim1",binmin,binmax);
709 pyim1->SetTitle("E_{pair} < 1 GeV");
710 pyim1->SetLineColor(1);
712 TLegend pLegendIM(0.7,0.6,0.9,0.8);
713 pLegendIM.SetTextSize(0.03);
714 pLegendIM.AddEntry(pyim1,"all modules","L");
715 pLegendIM.SetFillColor(10);
716 pLegendIM.SetBorderSize(1);
717 for(Int_t imod = 0; imod < fNModules; imod++){
718 pyim1 = fhIMMod[imod]->ProjectionY(Form("pyim1_%d",imod),binmin,binmax);
719 pLegendIM.AddEntry(pyim1,Form("module %d",imod),"L");
720 pyim1->SetLineColor(imod+1);
726 binmin = (Int_t) (1-emin)*nebins/emax;
727 binmax = (Int_t) (2-emin)*nebins/emax;
728 TH1D *pyim2 = fhIM->ProjectionY("pyim2",binmin,binmax);
729 pyim2->SetTitle("1 < E_{pair} < 2 GeV");
730 pyim2->SetLineColor(1);
732 for(Int_t imod = 0; imod < fNModules; imod++){
733 pyim2 = fhIMMod[imod]->ProjectionY(Form("pyim2_%d",imod),binmin,binmax);
734 pyim2->SetLineColor(imod+1);
739 binmin = (Int_t) (2-emin)*nebins/emax;
740 binmax = (Int_t) (3-emin)*nebins/emax;
741 TH1D *pyim3 = fhIM->ProjectionY("pyim3",binmin,binmax);
742 pyim3->SetTitle("2 < E_{pair} < 3 GeV");
743 pyim3->SetLineColor(1);
745 for(Int_t imod = 0; imod < fNModules; imod++){
746 pyim3 = fhIMMod[imod]->ProjectionY(Form("pyim3_%d",imod),binmin,binmax);
747 pyim3->SetLineColor(imod+1);
752 binmin = (Int_t) (3-emin)*nebins/emax;
753 binmax = (Int_t) (4-emin)*nebins/emax;
754 TH1D *pyim4 = fhIM->ProjectionY("pyim4",binmin,binmax);
755 pyim4->SetTitle("3 < E_{pair} < 4 GeV");
756 pyim4->SetLineColor(1);
758 for(Int_t imod = 0; imod < fNModules; imod++){
759 pyim4 = fhIMMod[imod]->ProjectionY(Form("pyim4_%d",imod),binmin,binmax);
760 pyim4->SetLineColor(imod+1);
765 binmin = (Int_t) (4-emin)*nebins/emax;
766 binmax = (Int_t) (5-emin)*nebins/emax;
767 TH1D *pyim5 = fhIM->ProjectionY("pyim5",binmin,binmax);
768 pyim5->SetTitle("4< E_{pair} < 5 GeV");
769 pyim5->SetLineColor(1);
771 for(Int_t imod = 0; imod < fNModules; imod++){
772 pyim5 = fhIMMod[imod]->ProjectionY(Form("pyim5_%d",imod),binmin,binmax);
773 pyim5->SetLineColor(imod+1);
778 binmin = (Int_t) (5-emin)*nebins/emax;
780 TH1D *pyim10 = fhIM->ProjectionY("pyim10",binmin,binmax);
781 pyim10->SetTitle("E_{pair} > 5 GeV");
782 pyim10->SetLineColor(1);
784 for(Int_t imod = 0; imod < fNModules; imod++){
785 pyim10 = fhIMMod[imod]->ProjectionY(Form("pyim10_%d",imod),binmin,binmax);
786 pyim10->SetLineColor(imod+1);
787 pyim10->Draw("same");
790 sprintf(name,"QA_%s_InvariantMass.eps",fCalorimeter.Data());
791 c5->Print(name); printf("Plot: %s\n",name);
795 if(fhIMCellCut->GetEntries() > 1){
796 Int_t nebins = fhIMCellCut->GetNbinsX();
797 Int_t emax = (Int_t) fhIMCellCut->GetXaxis()->GetXmax();
798 Int_t emin = (Int_t) fhIMCellCut->GetXaxis()->GetXmin();
799 if (emin != 0 ) printf("emin != 0 \n");
800 //printf("IMCellCut: nBinsX %d, emin %2.2f, emax %2.2f\n",nebins,emin,emax);
802 sprintf(cname,"QA_%s_IMCellCut",fCalorimeter.Data());
804 TCanvas * c5cc = new TCanvas(cname, "Invariant mass, Cell Cut", 600, 400) ;
808 //fhIMCellCut->SetLineColor(4);
809 //fhIMCellCut->Draw();
811 binmax = (Int_t) (1-emin)*nebins/emax;
812 TH1D *pyimcc1 = fhIMCellCut->ProjectionY("pyimcc1",binmin,binmax);
813 pyimcc1->SetTitle("E_{pair} < 1 GeV");
814 pyimcc1->SetLineColor(1);
816 TLegend pLegendIMCellCut(0.7,0.6,0.9,0.8);
817 pLegendIMCellCut.SetTextSize(0.03);
818 pLegendIMCellCut.AddEntry(pyimcc1,"all modules","L");
819 pLegendIMCellCut.SetFillColor(10);
820 pLegendIMCellCut.SetBorderSize(1);
821 for(Int_t imod = 0; imod < fNModules; imod++){
822 pyimcc1 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc1_%d",imod),binmin,binmax);
823 pLegendIMCellCut.AddEntry(pyimcc1,Form("module %d",imod),"L");
824 pyimcc1->SetLineColor(imod+1);
825 pyimcc1->Draw("same");
827 pLegendIMCellCut.Draw();
830 binmin = (Int_t) (1-emin)*nebins/emax;
831 binmax = (Int_t) (2-emin)*nebins/emax;
832 TH1D *pyimcc2 = fhIMCellCut->ProjectionY("pyimcc2",binmin,binmax);
833 pyimcc2->SetTitle("1 < E_{pair} < 2 GeV");
834 pyimcc2->SetLineColor(1);
836 for(Int_t imod = 0; imod < fNModules; imod++){
837 pyimcc2 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc2_%d",imod),binmin,binmax);
838 pyimcc2->SetLineColor(imod+1);
839 pyimcc2->Draw("same");
843 binmin = (Int_t) (2-emin)*nebins/emax;
844 binmax = (Int_t) (3-emin)*nebins/emax;
845 TH1D *pyimcc3 = fhIMCellCut->ProjectionY("pyimcc3",binmin,binmax);
846 pyimcc3->SetTitle("2 < E_{pair} < 3 GeV");
847 pyimcc3->SetLineColor(1);
849 for(Int_t imod = 0; imod < fNModules; imod++){
850 pyimcc3 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc3_%d",imod),binmin,binmax);
851 pyimcc3->SetLineColor(imod+1);
852 pyimcc3->Draw("same");
856 binmin = (Int_t) (3-emin)*nebins/emax;
857 binmax = (Int_t) (4-emin)*nebins/emax;
858 TH1D *pyimcc4 = fhIMCellCut->ProjectionY("pyimcc4",binmin,binmax);
859 pyimcc4->SetTitle("3 < E_{pair} < 4 GeV");
860 pyimcc4->SetLineColor(1);
862 for(Int_t imod = 0; imod < fNModules; imod++){
863 pyimcc4 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc4_%d",imod),binmin,binmax);
864 pyimcc4->SetLineColor(imod+1);
865 pyimcc4->Draw("same");
869 binmin = (Int_t) (4-emin)*nebins/emax;
870 binmax = (Int_t) (5-emin)*nebins/emax;
871 TH1D *pyimcc5cc = fhIMCellCut->ProjectionY("pyimcc5cc",binmin,binmax);
872 pyimcc5cc->SetTitle("4< E_{pair} < 5 GeV");
873 pyimcc5cc->SetLineColor(1);
875 for(Int_t imod = 0; imod < fNModules; imod++){
876 pyimcc5cc = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc5cc_%d",imod),binmin,binmax);
877 pyimcc5cc->SetLineColor(imod+1);
878 pyimcc5cc->Draw("same");
882 binmin = (Int_t) (5-emin)*nebins/emax;
884 TH1D *pyimcc10 = fhIMCellCut->ProjectionY("pyimcc10",binmin,binmax);
885 pyimcc10->SetTitle("E_{pair} > 5 GeV");
886 pyimcc10->SetLineColor(1);
888 for(Int_t imod = 0; imod < fNModules; imod++){
889 pyimcc10 = fhIMCellCutMod[imod]->ProjectionY(Form("pyimcc10_%d",imod),binmin,binmax);
890 pyimcc10->SetLineColor(imod+1);
891 pyimcc10->Draw("same");
894 sprintf(name,"QA_%s_InvariantMass_CellCut.eps",fCalorimeter.Data());
895 c5cc->Print(name); printf("Plot: %s\n",name);
899 if(fhAsym->GetEntries() > 1){
900 Int_t nebins = fhAsym->GetNbinsX();
901 Int_t emax = (Int_t) fhAsym->GetXaxis()->GetXmax();
902 Int_t emin = (Int_t) fhAsym->GetXaxis()->GetXmin();
903 if (emin != 0 ) printf("emin != 0 \n");
904 //printf("Asym: nBinsX %d, emin %2.2f, emax %2.2f\n",nebins,emin,emax);
906 sprintf(cname,"QA_%s_Asym",fCalorimeter.Data());
908 TCanvas * c5b = new TCanvas(cname, "Asymmetry", 400, 400) ;
912 fhAsym->SetTitleOffset(1.6,"Y");
913 fhAsym->SetLineColor(4);
918 binmax = (Int_t) (5-emin)*nebins/emax;
919 TH1D *pyAsym5 = fhAsym->ProjectionY("pyAsym5",binmin,binmax);
920 pyAsym5->SetTitle("E_{pair} < 5 GeV");
921 pyAsym5->SetLineColor(4);
925 binmin = (Int_t) (5-emin)*nebins/emax;
926 binmax = (Int_t) (10-emin)*nebins/emax;
927 TH1D *pyAsym510 = fhAsym->ProjectionY("pyAsym5_10",binmin,binmax);
928 pyAsym510->SetTitle("5 < E_{pair} < 10 GeV");
929 pyAsym510->SetLineColor(4);
933 binmin = (Int_t) (10-emin)*nebins/emax;
935 TH1D *pyAsym10 = fhAsym->ProjectionY("pyAsym10",binmin,binmax);
936 pyAsym10->SetTitle("E_{pair} > 10 GeV");
937 pyAsym10->SetLineColor(4);
940 sprintf(name,"QA_%s_Asymmetry.eps",fCalorimeter.Data());
947 sprintf(cname,"QA_%s_nclustercellsamp",fCalorimeter.Data());
948 TCanvas * c9 = new TCanvas(cname, " CaloClusters and CaloCells", 400, 400) ;
953 TLegend pLegendN(0.7,0.6,0.9,0.8);
954 pLegendN.SetTextSize(0.03);
955 pLegendN.AddEntry(fhNClusters,"all modules","L");
956 pLegendN.SetFillColor(10);
957 pLegendN.SetBorderSize(1);
959 if(fhNClusters->GetEntries() > 0) gPad->SetLogy();
961 fhNClusters->SetLineColor(1);
963 for(Int_t imod = 0; imod < fNModules; imod++){
964 fhNClustersMod[imod]->SetLineColor(imod+1);
965 fhNClustersMod[imod]->Draw("same");
966 pLegendN.AddEntry(fhNClustersMod[imod],Form("module %d",imod),"L");
971 if(fhNCells->GetEntries() > 0) gPad->SetLogy();
973 fhNCells->SetLineColor(1);
975 for(Int_t imod = 0; imod < fNModules; imod++){
976 fhNCellsMod[imod]->SetLineColor(imod+1);
977 fhNCellsMod[imod]->Draw("same");
980 if(fhNCellsPerCluster->GetEntries() > 0) gPad->SetLogy();
982 TH1D *cpc = fhNCellsPerCluster->ProjectionY("cpc",-1,-1);
983 cpc->SetLineColor(1);
985 for(Int_t imod = 0; imod < fNModules; imod++){
986 cpc = fhNCellsPerClusterMod[imod]->ProjectionY(Form("cpc_%d",imod),-1,-1);
987 cpc->SetLineColor(imod+1);
992 if(fhAmplitude->GetEntries() > 0) gPad->SetLogy();
994 fhAmplitude->SetLineColor(1);
996 for(Int_t imod = 0; imod < fNModules; imod++){
997 fhAmplitudeMod[imod]->SetLineColor(imod+1);
998 fhAmplitudeMod[imod]->Draw("same");
1001 sprintf(name,"QA_%s_CaloClustersAndCaloCells.eps",fCalorimeter.Data());
1002 c9->Print(name); printf("Plot: %s\n",name);
1004 if(fCorrelateCalos){
1005 //Calorimeter Correlation, PHOS vs EMCAL
1006 sprintf(cname,"QA_%s_CaloCorr_EMCALvsPHOS",fCalorimeter.Data());
1007 TCanvas * ccorr = new TCanvas(cname, " EMCAL vs PHOS", 400, 400) ;
1008 ccorr->Divide(2, 2);
1013 fhCaloCorrNClusters ->Draw();
1018 fhCaloCorrNCells->Draw();
1023 fhCaloCorrEClusters->Draw();
1028 fhCaloCorrECells->Draw();
1030 sprintf(name,"QA_%s_CaloCorr_EMCALvsPHOS.eps",fCalorimeter.Data());
1031 ccorr->Print(name); printf("Plot: %s\n",name);
1034 //Grid of cell per module plots
1036 gStyle->SetOptStat(0);
1037 sprintf(cname,"QA_%s_GridCellEntries",fCalorimeter.Data());
1039 TCanvas *cgrid = new TCanvas("cgrid","Number of entries per cell", 12,12,800,400);
1040 if(fNModules%2 == 0)
1041 cgrid->Divide(fNModules/2,2);
1043 cgrid->Divide(fNModules/2+1,2);
1045 for(Int_t imod = 0; imod < fNModules ; imod++){
1050 fhGridCellsMod[imod]->SetLabelSize(0.025,"z");
1051 fhGridCellsMod[imod]->Draw("colz");
1053 sprintf(name,"QA_%s_GridCellsEntries.eps",fCalorimeter.Data());
1054 cgrid->Print(name); printf("Plot: %s\n",name);
1056 sprintf(cname,"QA_%s_GridCellAccumEnergy",fCalorimeter.Data());
1058 TCanvas *cgridE = new TCanvas("cgridE","Summed energy per cell", 12,12,800,400);
1059 cgridE->Divide(fNModules/2,2);
1060 for(Int_t imod = 0; imod < fNModules ; imod++){
1065 fhGridCellsEMod[imod]->SetLabelSize(0.025,"z");
1066 fhGridCellsEMod[imod]->Draw("colz");
1068 sprintf(name,"QA_%s_GridCellsAccumEnergy.eps",fCalorimeter.Data());
1069 cgridE->Print(name); printf("Plot: %s\n",name);
1071 sprintf(cname,"QA_%s_GridCellAverageEnergy",fCalorimeter.Data());
1073 TCanvas *cgridEA = new TCanvas("cgridEA","Average energy per cell", 12,12,800,400);
1074 cgridEA->Divide(fNModules/2,2);
1075 for(Int_t imod = 0; imod < fNModules ; imod++){
1076 cgridEA->cd(imod+1);
1080 fhGridCellsEMod[imod]->SetLabelSize(0.025,"z");
1081 fhGridCellsEMod[imod]->Divide(fhGridCellsMod[imod]);
1082 fhGridCellsEMod[imod]->Draw("colz");
1084 sprintf(name,"QA_%s_GridCellsAverageEnergy.eps",fCalorimeter.Data());
1085 cgridEA->Print(name); printf("Plot: %s\n",name);
1090 //Reconstructed vs MC distributions
1092 sprintf(cname,"QA_%s_recvsmc",fCalorimeter.Data());
1093 TCanvas * c6 = new TCanvas(cname, "Reconstructed vs MC distributions", 400, 400) ;
1096 fh2E->SetAxisRange(minx,maxx,"X");
1097 fh2Pt->SetAxisRange(minx,maxx,"X");
1098 fh2E->SetAxisRange(minx,maxx,"Y");
1099 fh2Pt->SetAxisRange(minx,maxx,"Y");
1102 fh2E->SetTitleOffset(1.6,"Y");
1103 fh2E->SetLineColor(4);
1107 fh2Pt->SetTitleOffset(1.6,"Y");
1108 fh2Pt->SetLineColor(4);
1112 fh2Phi->SetTitleOffset(1.6,"Y");
1113 fh2Phi->SetLineColor(4);
1117 fh2Eta->SetTitleOffset(1.6,"Y");
1118 fh2Eta->SetLineColor(4);
1121 sprintf(name,"QA_%s_ReconstructedVSMCDistributions.eps",fCalorimeter.Data());
1124 //Reconstructed vs MC distributions
1126 sprintf(cname,"QA_%s_gamrecvsmc",fCalorimeter.Data());
1127 TCanvas * c6Gam = new TCanvas(cname, "Reconstructed vs MC distributions", 400, 400) ;
1128 c6Gam->Divide(2, 2);
1130 fhGamE->SetAxisRange(minx,maxx,"X");
1131 fhGamPt->SetAxisRange(minx,maxx,"X");
1145 sprintf(name,"QA_%s_GammaReconstructedVSMCDistributions.eps",fCalorimeter.Data());
1148 //Generated - reconstructed
1150 sprintf(cname,"QA_%s_diffgenrec",fCalorimeter.Data());
1151 TCanvas * c7 = new TCanvas(cname, "generated - reconstructed", 400, 400) ;
1156 fhGamDeltaE->SetLineColor(4);
1158 fhGamDeltaE->Draw("same");
1160 TLegend pLegendd(0.65,0.55,0.9,0.8);
1161 pLegendd.SetTextSize(0.06);
1162 pLegendd.AddEntry(fhDeltaE,"all","L");
1163 pLegendd.AddEntry(fhGamDeltaE,"from #gamma","L");
1164 pLegendd.SetFillColor(10);
1165 pLegendd.SetBorderSize(1);
1170 fhGamDeltaPt->SetLineColor(4);
1172 fhGamDeltaPt->Draw("same");
1176 fhGamDeltaPhi->SetLineColor(4);
1178 fhGamDeltaPhi->Draw("same");
1182 fhGamDeltaEta->SetLineColor(4);
1184 fhGamDeltaEta->Draw("same");
1186 sprintf(name,"QA_%s_DiffGeneratedReconstructed.eps",fCalorimeter.Data());
1189 // Reconstructed / Generated
1191 sprintf(cname,"QA_%s_ratiorecgen",fCalorimeter.Data());
1192 TCanvas * c8 = new TCanvas(cname, " reconstructed / generated", 400, 400) ;
1197 fhGamRatioE->SetLineColor(4);
1199 fhGamRatioE->Draw("same");
1201 TLegend pLegendr(0.65,0.55,0.9,0.8);
1202 pLegendr.SetTextSize(0.06);
1203 pLegendr.AddEntry(fhRatioE,"all","L");
1204 pLegendr.AddEntry(fhGamRatioE,"from #gamma","L");
1205 pLegendr.SetFillColor(10);
1206 pLegendr.SetBorderSize(1);
1211 fhGamRatioPt->SetLineColor(4);
1213 fhGamRatioPt->Draw("same");
1216 fhGamRatioPhi->SetLineColor(4);
1218 fhGamRatioPhi->Draw("same");
1221 fhGamRatioEta->SetLineColor(4);
1223 fhGamRatioEta->Draw("same");
1225 sprintf(name,"QA_%s_ReconstructedDivGenerated.eps",fCalorimeter.Data());
1229 //Generated distributions
1231 sprintf(cname,"QA_%s_gen",fCalorimeter.Data());
1232 TCanvas * c10 = new TCanvas(cname, "Generated distributions", 600, 200) ;
1237 TH1F * haxispt = (TH1F*) fhGenPi0Pt->Clone("axispt");
1238 haxispt->SetTitle("Generated Particles p_{T}, |#eta| < 1");
1239 fhGenPi0Pt->SetLineColor(1);
1240 fhGenGamPt->SetLineColor(4);
1241 fhGenEtaPt->SetLineColor(2);
1242 fhGenOmegaPt->SetLineColor(7);
1243 fhGenElePt->SetLineColor(6);
1245 //Select the maximum of the histogram to show all lines.
1246 if(fhGenPi0Pt->GetMaximum() >= fhGenGamPt->GetMaximum() && fhGenPi0Pt->GetMaximum() >= fhGenEtaPt->GetMaximum() &&
1247 fhGenPi0Pt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenPi0Pt->GetMaximum() >= fhGenElePt->GetMaximum())
1248 haxispt->SetMaximum(fhGenPi0Pt->GetMaximum());
1249 else if(fhGenGamPt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenGamPt->GetMaximum() >= fhGenEtaPt->GetMaximum() &&
1250 fhGenGamPt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenGamPt->GetMaximum() >= fhGenElePt->GetMaximum())
1251 haxispt->SetMaximum(fhGenGamPt->GetMaximum());
1252 else if(fhGenEtaPt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenEtaPt->GetMaximum() >= fhGenGamPt->GetMaximum() &&
1253 fhGenEtaPt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenEtaPt->GetMaximum() >= fhGenElePt->GetMaximum())
1254 haxispt->SetMaximum(fhGenEtaPt->GetMaximum());
1255 else if(fhGenOmegaPt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenOmegaPt->GetMaximum() >= fhGenEtaPt->GetMaximum() &&
1256 fhGenOmegaPt->GetMaximum() >= fhGenGamPt->GetMaximum() && fhGenOmegaPt->GetMaximum() >= fhGenElePt->GetMaximum())
1257 haxispt->SetMaximum(fhGenOmegaPt->GetMaximum());
1258 else if(fhGenElePt->GetMaximum() >= fhGenPi0Pt->GetMaximum() && fhGenElePt->GetMaximum() >= fhGenEtaPt->GetMaximum() &&
1259 fhGenElePt->GetMaximum() >= fhGenOmegaPt->GetMaximum() && fhGenElePt->GetMaximum() >= fhGenGamPt->GetMaximum())
1260 haxispt->SetMaximum(fhGenElePt->GetMaximum());
1261 haxispt->SetMinimum(1);
1262 haxispt->SetAxisRange(minx,maxx,"X");
1263 haxispt->Draw("axis");
1264 fhGenPi0Pt->Draw("same");
1265 fhGenGamPt->Draw("same");
1266 fhGenEtaPt->Draw("same");
1267 fhGenOmegaPt->Draw("same");
1268 fhGenElePt->Draw("same");
1270 TLegend pLegend(0.85,0.65,0.95,0.93);
1271 pLegend.SetTextSize(0.06);
1272 pLegend.AddEntry(fhGenPi0Pt," #pi^{0}","L");
1273 pLegend.AddEntry(fhGenGamPt," #gamma","L");
1274 pLegend.AddEntry(fhGenEtaPt," #eta","L");
1275 pLegend.AddEntry(fhGenOmegaPt," #omega","L");
1276 pLegend.AddEntry(fhGenElePt," e^{#pm}","L");
1277 pLegend.SetFillColor(10);
1278 pLegend.SetBorderSize(1);
1283 TH1F * haxiseta = (TH1F*) fhGenPi0Eta->Clone("axiseta");
1284 haxiseta->SetTitle("Generated Particles #eta, |#eta| < 1");
1285 fhGenPi0Eta->SetLineColor(1);
1286 fhGenGamEta->SetLineColor(4);
1287 fhGenEtaEta->SetLineColor(2);
1288 fhGenOmegaEta->SetLineColor(7);
1289 fhGenEleEta->SetLineColor(6);
1290 //Select the maximum of the histogram to show all lines.
1291 if(fhGenPi0Eta->GetMaximum() >= fhGenGamEta->GetMaximum() && fhGenPi0Eta->GetMaximum() >= fhGenEtaEta->GetMaximum() &&
1292 fhGenPi0Eta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenPi0Eta->GetMaximum() >= fhGenEleEta->GetMaximum())
1293 haxiseta->SetMaximum(fhGenPi0Eta->GetMaximum());
1294 else if(fhGenGamEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenGamEta->GetMaximum() >= fhGenEtaEta->GetMaximum() &&
1295 fhGenGamEta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenGamEta->GetMaximum() >= fhGenEleEta->GetMaximum())
1296 haxiseta->SetMaximum(fhGenGamEta->GetMaximum());
1297 else if(fhGenEtaEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenEtaEta->GetMaximum() >= fhGenGamEta->GetMaximum() &&
1298 fhGenEtaEta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenEtaEta->GetMaximum() >= fhGenEleEta->GetMaximum())
1299 haxiseta->SetMaximum(fhGenEtaEta->GetMaximum());
1300 else if(fhGenOmegaEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenOmegaEta->GetMaximum() >= fhGenEtaEta->GetMaximum() &&
1301 fhGenOmegaEta->GetMaximum() >= fhGenGamEta->GetMaximum() && fhGenOmegaEta->GetMaximum() >= fhGenEleEta->GetMaximum())
1302 haxiseta->SetMaximum(fhGenOmegaEta->GetMaximum());
1303 else if(fhGenEleEta->GetMaximum() >= fhGenPi0Eta->GetMaximum() && fhGenEleEta->GetMaximum() >= fhGenEtaEta->GetMaximum() &&
1304 fhGenEleEta->GetMaximum() >= fhGenOmegaEta->GetMaximum() && fhGenEleEta->GetMaximum() >= fhGenGamEta->GetMaximum())
1305 haxiseta->SetMaximum(fhGenEleEta->GetMaximum());
1306 haxiseta->SetMinimum(100);
1307 haxiseta->Draw("axis");
1308 fhGenPi0Eta->Draw("same");
1309 fhGenGamEta->Draw("same");
1310 fhGenEtaEta->Draw("same");
1311 fhGenOmegaEta->Draw("same");
1312 fhGenEleEta->Draw("same");
1317 TH1F * haxisphi = (TH1F*) fhGenPi0Phi->Clone("axisphi");
1318 haxisphi->SetTitle("Generated Particles #phi, |#eta| < 1");
1319 fhGenPi0Phi->SetLineColor(1);
1320 fhGenGamPhi->SetLineColor(4);
1321 fhGenEtaPhi->SetLineColor(2);
1322 fhGenOmegaPhi->SetLineColor(7);
1323 fhGenElePhi->SetLineColor(6);
1324 //Select the maximum of the histogram to show all lines.
1325 if(fhGenPi0Phi->GetMaximum() >= fhGenGamPhi->GetMaximum() && fhGenPi0Phi->GetMaximum() >= fhGenEtaPhi->GetMaximum() &&
1326 fhGenPi0Phi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenPi0Phi->GetMaximum() >= fhGenElePhi->GetMaximum())
1327 haxisphi->SetMaximum(fhGenPi0Phi->GetMaximum());
1328 else if(fhGenGamPhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenGamPhi->GetMaximum() >= fhGenEtaPhi->GetMaximum() &&
1329 fhGenGamPhi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenGamPhi->GetMaximum() >= fhGenElePhi->GetMaximum())
1330 haxisphi->SetMaximum(fhGenGamPhi->GetMaximum());
1331 else if(fhGenEtaPhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenEtaPhi->GetMaximum() >= fhGenGamPhi->GetMaximum() &&
1332 fhGenEtaPhi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenEtaPhi->GetMaximum() >= fhGenElePhi->GetMaximum())
1333 haxisphi->SetMaximum(fhGenEtaPhi->GetMaximum());
1334 else if(fhGenOmegaPhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenOmegaPhi->GetMaximum() >= fhGenEtaPhi->GetMaximum() &&
1335 fhGenOmegaPhi->GetMaximum() >= fhGenGamPhi->GetMaximum() && fhGenOmegaPhi->GetMaximum() >= fhGenElePhi->GetMaximum())
1336 haxisphi->SetMaximum(fhGenOmegaPhi->GetMaximum());
1337 else if(fhGenElePhi->GetMaximum() >= fhGenPi0Phi->GetMaximum() && fhGenElePhi->GetMaximum() >= fhGenEtaPhi->GetMaximum() &&
1338 fhGenElePhi->GetMaximum() >= fhGenOmegaPhi->GetMaximum() && fhGenElePhi->GetMaximum() >= fhGenGamPhi->GetMaximum())
1339 haxisphi->SetMaximum(fhGenElePhi->GetMaximum());
1340 haxisphi->SetMinimum(100);
1341 haxisphi->Draw("axis");
1342 fhGenPi0Phi->Draw("same");
1343 fhGenGamPhi->Draw("same");
1344 fhGenEtaPhi->Draw("same");
1345 fhGenOmegaPhi->Draw("same");
1346 fhGenElePhi->Draw("same");
1348 sprintf(name,"QA_%s_GeneratedDistributions.eps",fCalorimeter.Data());
1352 //Reconstructed clusters depending on its original particle.
1354 sprintf(cname,"QA_%s_recgenid",fCalorimeter.Data());
1355 TCanvas * c11 = new TCanvas(cname, "Reconstructed particles, function of their original particle ID", 400, 400) ;
1361 TH1F * hGamE = (TH1F*) fhGamE->ProjectionX("hGamE",-1,-1);
1362 TH1F * hPi0E = (TH1F*) fhPi0E->ProjectionX("hPi0E",-1,-1);
1363 TH1F * hEleE = (TH1F*) fhEleE->ProjectionX("hEleE",-1,-1);
1364 TH1F * hNeHadE = (TH1F*) fhNeHadE->ProjectionX("hNeHadE",-1,-1);
1365 TH1F * hChHadE = (TH1F*) fhChHadE->ProjectionX("hChHadE",-1,-1);
1366 TH1F * haxisE = (TH1F*) hPi0E->Clone("axisE");
1367 haxisE->SetTitle("Reconstructed particles E, function of their original particle ID");
1368 haxisE->SetAxisRange(minx,maxx,"X");
1370 hPi0E->SetLineColor(1);
1371 hGamE->SetLineColor(4);
1372 hNeHadE->SetLineColor(2);
1373 hChHadE->SetLineColor(7);
1374 hEleE->SetLineColor(6);
1376 //Select the maximum of the histogram to show all lines.
1377 if(hPi0E->GetMaximum() >= hGamE->GetMaximum() && hPi0E->GetMaximum() >= hNeHadE->GetMaximum() &&
1378 hPi0E->GetMaximum() >= hChHadE->GetMaximum() && hPi0E->GetMaximum() >= hEleE->GetMaximum())
1379 haxisE->SetMaximum(hPi0E->GetMaximum());
1380 else if(hGamE->GetMaximum() >= hPi0E->GetMaximum() && hGamE->GetMaximum() >= hNeHadE->GetMaximum() &&
1381 hGamE->GetMaximum() >= hChHadE->GetMaximum() && hGamE->GetMaximum() >= hEleE->GetMaximum())
1382 haxisE->SetMaximum(hGamE->GetMaximum());
1383 else if(hNeHadE->GetMaximum() >= hPi0E->GetMaximum() && hNeHadE->GetMaximum() >= hGamE->GetMaximum() &&
1384 hNeHadE->GetMaximum() >= hChHadE->GetMaximum() && hNeHadE->GetMaximum() >= hEleE->GetMaximum())
1385 haxisE->SetMaximum(hNeHadE->GetMaximum());
1386 else if(hChHadE->GetMaximum() >= hPi0E->GetMaximum() && hChHadE->GetMaximum() >= hNeHadE->GetMaximum() &&
1387 hChHadE->GetMaximum() >= hGamE->GetMaximum() && hChHadE->GetMaximum() >= hEleE->GetMaximum())
1388 haxisE->SetMaximum(hChHadE->GetMaximum());
1389 else if(hEleE->GetMaximum() >= hPi0E->GetMaximum() && hEleE->GetMaximum() >= hNeHadE->GetMaximum() &&
1390 hEleE->GetMaximum() >= hChHadE->GetMaximum() && hEleE->GetMaximum() >= hGamE->GetMaximum())
1391 haxisE->SetMaximum(hEleE->GetMaximum());
1392 haxisE->SetXTitle("E (GeV)");
1393 haxisE->SetMinimum(1);
1394 haxisE->Draw("axis");
1395 hPi0E->Draw("same");
1396 hGamE->Draw("same");
1397 hNeHadE->Draw("same");
1398 hChHadE->Draw("same");
1399 hEleE->Draw("same");
1401 TLegend pLegend2(0.8,0.65,0.95,0.93);
1402 pLegend2.SetTextSize(0.06);
1403 pLegend2.AddEntry(hPi0E," #pi^{0}","L");
1404 pLegend2.AddEntry(hGamE," #gamma","L");
1405 pLegend2.AddEntry(hEleE," e^{#pm}","L");
1406 pLegend2.AddEntry(hChHadE," h^{#pm}","L");
1407 pLegend2.AddEntry(hNeHadE," h^{0}","L");
1408 pLegend2.SetFillColor(10);
1409 pLegend2.SetBorderSize(1);
1415 //printf("%s, %s, %s, %s, %s\n",fhGamPt->GetName(),fhPi0Pt->GetName(),fhElePt->GetName(),fhNeHadPt->GetName(), fhChHadPt->GetName());
1416 TH1F * hGamPt = (TH1F*) fhGamPt->ProjectionX("hGamPt",-1,-1);
1417 TH1F * hPi0Pt = (TH1F*) fhPi0Pt->ProjectionX("hPi0Pt",-1,-1);
1418 TH1F * hElePt = (TH1F*) fhElePt->ProjectionX("hElePt",-1,-1);
1419 TH1F * hNeHadPt = (TH1F*) fhNeHadPt->ProjectionX("hNeHadPt",-1,-1);
1420 TH1F * hChHadPt = (TH1F*) fhChHadPt->ProjectionX("hChHadPt",-1,-1);
1421 haxispt = (TH1F*) hPi0Pt->Clone("axispt");
1422 haxispt->SetTitle("Reconstructed particles p_{T}, function of their original particle ID");
1423 hPi0Pt->SetLineColor(1);
1424 hGamPt->SetLineColor(4);
1425 hNeHadPt->SetLineColor(2);
1426 hChHadPt->SetLineColor(7);
1427 hElePt->SetLineColor(6);
1429 //Select the maximum of the histogram to show all lines.
1430 if(hPi0Pt->GetMaximum() >= hGamPt->GetMaximum() && hPi0Pt->GetMaximum() >= hNeHadPt->GetMaximum() &&
1431 hPi0Pt->GetMaximum() >= hChHadPt->GetMaximum() && hPi0Pt->GetMaximum() >= hElePt->GetMaximum())
1432 haxispt->SetMaximum(hPi0Pt->GetMaximum());
1433 else if(hGamPt->GetMaximum() >= hPi0Pt->GetMaximum() && hGamPt->GetMaximum() >= hNeHadPt->GetMaximum() &&
1434 hGamPt->GetMaximum() >= hChHadPt->GetMaximum() && hGamPt->GetMaximum() >= hElePt->GetMaximum())
1435 haxispt->SetMaximum(hGamPt->GetMaximum());
1436 else if(hNeHadPt->GetMaximum() >= hPi0Pt->GetMaximum() && hNeHadPt->GetMaximum() >= hGamPt->GetMaximum() &&
1437 hNeHadPt->GetMaximum() >= hChHadPt->GetMaximum() && hNeHadPt->GetMaximum() >= hElePt->GetMaximum())
1438 haxispt->SetMaximum(hNeHadPt->GetMaximum());
1439 else if(hChHadPt->GetMaximum() >= hPi0Pt->GetMaximum() && hChHadPt->GetMaximum() >= hNeHadPt->GetMaximum() &&
1440 hChHadPt->GetMaximum() >= hGamPt->GetMaximum() && hChHadPt->GetMaximum() >= hElePt->GetMaximum())
1441 haxispt->SetMaximum(hChHadPt->GetMaximum());
1442 else if(hElePt->GetMaximum() >= hPi0Pt->GetMaximum() && hElePt->GetMaximum() >= hNeHadPt->GetMaximum() &&
1443 hElePt->GetMaximum() >= hChHadPt->GetMaximum() && hElePt->GetMaximum() >= hGamPt->GetMaximum())
1444 haxispt->SetMaximum(hElePt->GetMaximum());
1445 haxispt->SetXTitle("p_{T} (GeV/c)");
1446 haxispt->SetMinimum(1);
1447 haxispt->SetAxisRange(minx,maxx,"X");
1448 haxispt->Draw("axis");
1449 hPi0Pt->Draw("same");
1450 hGamPt->Draw("same");
1451 hNeHadPt->Draw("same");
1452 hChHadPt->Draw("same");
1453 hElePt->Draw("same");
1459 TH1F * hGamEta = (TH1F*) fhGamEta->ProjectionX("hGamEta",-1,-1);
1460 TH1F * hPi0Eta = (TH1F*) fhPi0Eta->ProjectionX("hPi0Eta",-1,-1);
1461 TH1F * hEleEta = (TH1F*) fhEleEta->ProjectionX("hEleEta",-1,-1);
1462 TH1F * hNeHadEta = (TH1F*) fhNeHadEta->ProjectionX("hNeHadEta",-1,-1);
1463 TH1F * hChHadEta = (TH1F*) fhChHadEta->ProjectionX("hChHadEta",-1,-1);
1464 haxiseta = (TH1F*) hPi0Eta->Clone("axiseta");
1465 haxiseta->SetTitle("Reconstructed particles #eta, function of their original particle ID");
1466 hPi0Eta->SetLineColor(1);
1467 hGamEta->SetLineColor(4);
1468 hNeHadEta->SetLineColor(2);
1469 hChHadEta->SetLineColor(7);
1470 hEleEta->SetLineColor(6);
1471 //Select the maximum of the histogram to show all lines.
1472 if(hPi0Eta->GetMaximum() >= hGamEta->GetMaximum() && hPi0Eta->GetMaximum() >= hNeHadEta->GetMaximum() &&
1473 hPi0Eta->GetMaximum() >= hChHadEta->GetMaximum() && hPi0Eta->GetMaximum() >= hEleEta->GetMaximum())
1474 haxiseta->SetMaximum(hPi0Eta->GetMaximum());
1475 else if(hGamEta->GetMaximum() >= hPi0Eta->GetMaximum() && hGamEta->GetMaximum() >= hNeHadEta->GetMaximum() &&
1476 hGamEta->GetMaximum() >= hChHadEta->GetMaximum() && hGamEta->GetMaximum() >= hEleEta->GetMaximum())
1477 haxiseta->SetMaximum(hGamEta->GetMaximum());
1478 else if(hNeHadEta->GetMaximum() >= hPi0Eta->GetMaximum() && hNeHadEta->GetMaximum() >= hGamEta->GetMaximum() &&
1479 hNeHadEta->GetMaximum() >= hChHadEta->GetMaximum() && hNeHadEta->GetMaximum() >= hEleEta->GetMaximum())
1480 haxiseta->SetMaximum(hNeHadEta->GetMaximum());
1481 else if(hChHadEta->GetMaximum() >= hPi0Eta->GetMaximum() && hChHadEta->GetMaximum() >= hNeHadEta->GetMaximum() &&
1482 hChHadEta->GetMaximum() >= hGamEta->GetMaximum() && hChHadEta->GetMaximum() >= hEleEta->GetMaximum())
1483 haxiseta->SetMaximum(hChHadEta->GetMaximum());
1484 else if(hEleEta->GetMaximum() >= hPi0Eta->GetMaximum() && hEleEta->GetMaximum() >= hNeHadEta->GetMaximum() &&
1485 hEleEta->GetMaximum() >= hChHadEta->GetMaximum() && hEleEta->GetMaximum() >= hGamEta->GetMaximum())
1486 haxiseta->SetMaximum(hEleEta->GetMaximum());
1488 haxiseta->SetXTitle("#eta");
1489 haxiseta->Draw("axis");
1490 hPi0Eta->Draw("same");
1491 hGamEta->Draw("same");
1492 hNeHadEta->Draw("same");
1493 hChHadEta->Draw("same");
1494 hEleEta->Draw("same");
1499 TH1F * hGamPhi = (TH1F*) fhGamPhi->ProjectionX("hGamPhi",-1,-1);
1500 TH1F * hPi0Phi = (TH1F*) fhPi0Phi->ProjectionX("hPi0Phi",-1,-1);
1501 TH1F * hElePhi = (TH1F*) fhElePhi->ProjectionX("hElePhi",-1,-1);
1502 TH1F * hNeHadPhi = (TH1F*) fhNeHadPhi->ProjectionX("hNeHadPhi",-1,-1);
1503 TH1F * hChHadPhi = (TH1F*) fhChHadPhi->ProjectionX("hChHadPhi",-1,-1);
1504 haxisphi = (TH1F*) hPi0Phi->Clone("axisphi");
1505 haxisphi->SetTitle("Reconstructed particles #phi, function of their original particle ID");
1507 hPi0Phi->SetLineColor(1);
1508 hGamPhi->SetLineColor(4);
1509 hNeHadPhi->SetLineColor(2);
1510 hChHadPhi->SetLineColor(7);
1511 hElePhi->SetLineColor(6);
1512 //Select the maximum of the histogram to show all lines.
1513 if(hPi0Phi->GetMaximum() >= hGamPhi->GetMaximum() && hPi0Phi->GetMaximum() >= hNeHadPhi->GetMaximum() &&
1514 hPi0Phi->GetMaximum() >= hChHadPhi->GetMaximum() && hPi0Phi->GetMaximum() >= hElePhi->GetMaximum())
1515 haxisphi->SetMaximum(hPi0Phi->GetMaximum());
1516 else if(hGamPhi->GetMaximum() >= hPi0Phi->GetMaximum() && hGamPhi->GetMaximum() >= hNeHadPhi->GetMaximum() &&
1517 hGamPhi->GetMaximum() >= hChHadPhi->GetMaximum() && hGamPhi->GetMaximum() >= hElePhi->GetMaximum())
1518 haxisphi->SetMaximum(hGamPhi->GetMaximum());
1519 else if(hNeHadPhi->GetMaximum() >= hPi0Phi->GetMaximum() && hNeHadPhi->GetMaximum() >= hGamPhi->GetMaximum() &&
1520 hNeHadPhi->GetMaximum() >= hChHadPhi->GetMaximum() && hNeHadPhi->GetMaximum() >= hElePhi->GetMaximum())
1521 haxisphi->SetMaximum(hNeHadPhi->GetMaximum());
1522 else if(hChHadPhi->GetMaximum() >= hPi0Phi->GetMaximum() && hChHadPhi->GetMaximum() >= hNeHadPhi->GetMaximum() &&
1523 hChHadPhi->GetMaximum() >= hGamPhi->GetMaximum() && hChHadPhi->GetMaximum() >= hElePhi->GetMaximum())
1524 haxisphi->SetMaximum(hChHadPhi->GetMaximum());
1525 else if(hElePhi->GetMaximum() >= hPi0Phi->GetMaximum() && hElePhi->GetMaximum() >= hNeHadPhi->GetMaximum() &&
1526 hElePhi->GetMaximum() >= hChHadPhi->GetMaximum() && hElePhi->GetMaximum() >= hGamPhi->GetMaximum())
1527 haxisphi->SetMaximum(hElePhi->GetMaximum());
1528 haxisphi->SetXTitle("#phi (rad)");
1529 haxisphi->Draw("axis");
1530 hPi0Phi->Draw("same");
1531 hGamPhi->Draw("same");
1532 hNeHadPhi->Draw("same");
1533 hChHadPhi->Draw("same");
1534 hElePhi->Draw("same");
1536 sprintf(name,"QA_%s_RecDistributionsGenID.eps",fCalorimeter.Data());
1540 //Ratio reconstructed clusters / generated particles in acceptance, for different particle ID
1543 TH1F * hPi0EClone = (TH1F*) hPi0E ->Clone("hPi0EClone");
1544 TH1F * hGamEClone = (TH1F*) hGamE ->Clone("hGamEClone");
1545 TH1F * hPi0PtClone = (TH1F*) hPi0Pt ->Clone("hPi0PtClone");
1546 TH1F * hGamPtClone = (TH1F*) hGamPt ->Clone("hGamPtClone");
1547 TH1F * hPi0EtaClone = (TH1F*) hPi0Eta->Clone("hPi0EtaClone");
1548 TH1F * hGamEtaClone = (TH1F*) hGamEta->Clone("hGamEtaClone");
1549 TH1F * hPi0PhiClone = (TH1F*) hPi0Phi->Clone("hPi0PhiClone");
1550 TH1F * hGamPhiClone = (TH1F*) hGamPhi->Clone("hGamPhiClone");
1552 sprintf(cname,"QA_%s_recgenidratio",fCalorimeter.Data());
1553 TCanvas * c12 = new TCanvas(cname, "Ratio reconstructed clusters / generated particles in acceptance, for different particle ID", 400, 400) ;
1558 haxisE->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID");
1559 hPi0EClone->Divide(fhGenPi0AccE);
1560 hGamEClone->Divide(fhGenGamAccE);
1561 haxisE->SetMaximum(1000);
1562 haxisE->SetMinimum(1e-2);
1563 haxisE->SetXTitle("E (GeV)");
1564 haxisE->SetYTitle("ratio = rec/gen");
1565 haxisE->Draw("axis");
1566 hPi0E->Draw("same");
1567 hGamE->Draw("same");
1569 TLegend pLegend3(0.75,0.2,0.9,0.4);
1570 pLegend3.SetTextSize(0.06);
1571 pLegend3.AddEntry(hPi0EClone," #pi^{0}","L");
1572 pLegend3.AddEntry(hGamEClone," #gamma","L");
1573 pLegend3.SetFillColor(10);
1574 pLegend3.SetBorderSize(1);
1579 haxispt->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID");
1580 hPi0PtClone->Divide(fhGenPi0AccPt);
1581 hGamPtClone->Divide(fhGenGamAccPt);
1582 haxispt->SetMaximum(5);
1583 haxispt->SetMinimum(1e-2);
1584 haxispt->SetXTitle("p_{T} (GeV/c)");
1585 haxispt->SetYTitle("ratio = rec/gen");
1586 haxispt->Draw("axis");
1587 hPi0PtClone->Draw("same");
1588 hGamPtClone->Draw("same");
1593 haxiseta->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID");
1594 hPi0EtaClone->Divide(fhGenPi0AccEta);
1595 hGamEtaClone->Divide(fhGenGamAccEta);
1596 haxiseta->SetMaximum(1.2);
1597 haxiseta->SetMinimum(1e-2);
1598 haxiseta->SetYTitle("ratio = rec/gen");
1599 haxiseta->SetXTitle("#eta");
1600 haxiseta->Draw("axis");
1601 hPi0EtaClone->Draw("same");
1602 hGamEtaClone->Draw("same");
1607 haxisphi->SetTitle("Ratio reconstructed clusters / generated particles in acceptance, for different particle ID");
1608 hPi0PhiClone->Divide(fhGenPi0AccPhi);
1609 hGamPhiClone->Divide(fhGenGamAccPhi);
1610 haxisphi->SetYTitle("ratio = rec/gen");
1611 haxisphi->SetXTitle("#phi (rad)");
1612 haxisphi->SetMaximum(1.2);
1613 haxisphi->SetMinimum(1e-2);
1614 haxisphi->Draw("axis");
1615 hPi0PhiClone->Draw("same");
1616 hGamPhiClone->Draw("same");
1618 sprintf(name,"QA_%s_EfficiencyGenID.eps",fCalorimeter.Data());
1622 //Reconstructed distributions
1624 sprintf(cname,"QA_%s_vertex",fCalorimeter.Data());
1625 TCanvas * c13 = new TCanvas(cname, "Particle vertex", 400, 400) ;
1630 fhEMVxyz->SetTitleOffset(1.6,"Y");
1635 fhHaVxyz->SetTitleOffset(1.6,"Y");
1640 TH1F * hEMR = (TH1F*) fhEMR->ProjectionY("hEM",-1,-1);
1641 hEMR->SetLineColor(4);
1646 TH1F * hHaR = (TH1F*) fhHaR->ProjectionY("hHa",-1,-1);
1647 hHaR->SetLineColor(4);
1651 sprintf(name,"QA_%s_ParticleVertex.eps",fCalorimeter.Data());
1655 //Track-matching distributions
1658 //Reconstructed distributions, matched with tracks, generated particle dependence
1660 sprintf(cname,"QA_%s_rectrackmatchGenID",fCalorimeter.Data());
1661 TCanvas * c22ch = new TCanvas(cname, "Reconstructed distributions, matched with tracks, for different particle ID", 400, 400) ;
1662 c22ch->Divide(2, 2);
1666 TH1F * hGamECharged = (TH1F*) fhGamECharged->ProjectionX("hGamECharged",-1,-1);
1667 TH1F * hPi0ECharged = (TH1F*) fhPi0ECharged->ProjectionX("hPi0ECharged",-1,-1);
1668 TH1F * hEleECharged = (TH1F*) fhEleECharged->ProjectionX("hEleECharged",-1,-1);
1669 TH1F * hNeHadECharged = (TH1F*) fhNeHadECharged->ProjectionX("hNeHadECharged",-1,-1);
1670 TH1F * hChHadECharged = (TH1F*) fhChHadECharged->ProjectionX("hChHadECharged",-1,-1);
1671 hPi0ECharged->SetLineColor(1);
1672 hGamECharged->SetLineColor(4);
1673 hNeHadECharged->SetLineColor(2);
1674 hChHadECharged->SetLineColor(7);
1675 hEleECharged->SetLineColor(6);
1677 fhECharged->SetLineColor(3);
1678 fhECharged->SetMinimum(0.5);
1680 hPi0ECharged->Draw("same");
1681 hGamECharged->Draw("same");
1682 hNeHadECharged->Draw("same");
1683 hChHadECharged->Draw("same");
1684 hEleECharged->Draw("same");
1685 TLegend pLegend22(0.75,0.45,0.9,0.8);
1686 pLegend22.SetTextSize(0.06);
1687 pLegend22.AddEntry(fhECharged,"all","L");
1688 pLegend22.AddEntry(hPi0ECharged,"#pi^{0}","L");
1689 pLegend22.AddEntry(hGamECharged,"#gamma","L");
1690 pLegend22.AddEntry(hEleECharged,"e^{#pm}","L");
1691 pLegend22.AddEntry(hChHadECharged,"h^{#pm}","L");
1692 pLegend22.AddEntry(hNeHadECharged,"h^{0}","L");
1693 pLegend22.SetFillColor(10);
1694 pLegend22.SetBorderSize(1);
1699 TH1F * hGamPtCharged = (TH1F*) fhGamPtCharged->ProjectionX("hGamPtCharged",-1,-1);
1700 TH1F * hPi0PtCharged = (TH1F*) fhPi0PtCharged->ProjectionX("hPi0PtCharged",-1,-1);
1701 TH1F * hElePtCharged = (TH1F*) fhElePtCharged->ProjectionX("hElePtCharged",-1,-1);
1702 TH1F * hNeHadPtCharged = (TH1F*) fhNeHadPtCharged->ProjectionX("hNeHadPtCharged",-1,-1);
1703 TH1F * hChHadPtCharged = (TH1F*) fhChHadPtCharged->ProjectionX("hChHadPtCharged",-1,-1);
1704 hPi0PtCharged->SetLineColor(1);
1705 hGamPtCharged->SetLineColor(4);
1706 hNeHadPtCharged->SetLineColor(2);
1707 hChHadPtCharged->SetLineColor(7);
1708 hElePtCharged->SetLineColor(6);
1710 fhPtCharged->SetLineColor(3);
1711 fhPtCharged->SetMinimum(0.5);
1712 fhPtCharged->Draw();
1713 hPi0PtCharged->Draw("same");
1714 hGamPtCharged->Draw("same");
1715 hNeHadPtCharged->Draw("same");
1716 hChHadPtCharged->Draw("same");
1717 hElePtCharged->Draw("same");
1721 TH1F * hGamEtaCharged = (TH1F*) fhGamEtaCharged->ProjectionX("hGamEtaCharged",-1,-1);
1722 TH1F * hPi0EtaCharged = (TH1F*) fhPi0EtaCharged->ProjectionX("hPi0EtaCharged",-1,-1);
1723 TH1F * hEleEtaCharged = (TH1F*) fhEleEtaCharged->ProjectionX("hEleEtaCharged",-1,-1);
1724 TH1F * hNeHadEtaCharged = (TH1F*) fhNeHadEtaCharged->ProjectionX("hNeHadEtaCharged",-1,-1);
1725 TH1F * hChHadEtaCharged = (TH1F*) fhChHadEtaCharged->ProjectionX("hChHadEtaCharged",-1,-1);
1726 hPi0EtaCharged->SetLineColor(1);
1727 hGamEtaCharged->SetLineColor(4);
1728 hNeHadEtaCharged->SetLineColor(2);
1729 hChHadEtaCharged->SetLineColor(7);
1730 hEleEtaCharged->SetLineColor(6);
1732 fhEtaCharged->SetLineColor(3);
1733 fhEtaCharged->SetMinimum(0.5);
1734 fhEtaCharged->Draw();
1735 hPi0EtaCharged->Draw("same");
1736 hGamEtaCharged->Draw("same");
1737 hNeHadEtaCharged->Draw("same");
1738 hChHadEtaCharged->Draw("same");
1739 hEleEtaCharged->Draw("same");
1743 TH1F * hGamPhiCharged = (TH1F*) fhGamPhiCharged->ProjectionX("hGamPhiCharged",-1,-1);
1744 TH1F * hPi0PhiCharged = (TH1F*) fhPi0PhiCharged->ProjectionX("hPi0PhiCharged",-1,-1);
1745 TH1F * hElePhiCharged = (TH1F*) fhElePhiCharged->ProjectionX("hElePhiCharged",-1,-1);
1746 TH1F * hNeHadPhiCharged = (TH1F*) fhNeHadPhiCharged->ProjectionX("hNeHadPhiCharged",-1,-1);
1747 TH1F * hChHadPhiCharged = (TH1F*) fhChHadPhiCharged->ProjectionX("hChHadPhiCharged",-1,-1);
1748 hPi0PhiCharged->SetLineColor(1);
1749 hGamPhiCharged->SetLineColor(4);
1750 hNeHadPhiCharged->SetLineColor(2);
1751 hChHadPhiCharged->SetLineColor(7);
1752 hElePhiCharged->SetLineColor(6);
1754 fhPhiCharged->SetLineColor(3);
1755 fhPhiCharged->SetMinimum(0.5);
1756 fhPhiCharged->Draw();
1757 hPi0PhiCharged->Draw("same");
1758 hGamPhiCharged->Draw("same");
1759 hNeHadPhiCharged->Draw("same");
1760 hChHadPhiCharged->Draw("same");
1761 hElePhiCharged->Draw("same");
1764 sprintf(name,"QA_%s_ReconstructedDistributions_TrackMatchedGenID.eps",fCalorimeter.Data());
1767 TH1F * hGamEChargedClone = (TH1F*) hGamECharged->Clone("GamEChargedClone");
1768 TH1F * hGamPtChargedClone = (TH1F*) hGamPtCharged->Clone("GamPtChargedClone");
1769 TH1F * hGamEtaChargedClone = (TH1F*) hGamEtaCharged->Clone("GamEtaChargedClone");
1770 TH1F * hGamPhiChargedClone = (TH1F*) hGamPhiCharged->Clone("GamPhiChargedClone");
1772 TH1F * hPi0EChargedClone = (TH1F*) hPi0ECharged->Clone("Pi0EChargedClone");
1773 TH1F * hPi0PtChargedClone = (TH1F*) hPi0PtCharged->Clone("Pi0PtChargedClone");
1774 TH1F * hPi0EtaChargedClone = (TH1F*) hPi0EtaCharged->Clone("Pi0EtaChargedClone");
1775 TH1F * hPi0PhiChargedClone = (TH1F*) hPi0PhiCharged->Clone("Pi0PhiChargedClone");
1777 TH1F * hEleEChargedClone = (TH1F*) hEleECharged->Clone("EleEChargedClone");
1778 TH1F * hElePtChargedClone = (TH1F*) hElePtCharged->Clone("ElePtChargedClone");
1779 TH1F * hEleEtaChargedClone = (TH1F*) hEleEtaCharged->Clone("EleEtaChargedClone");
1780 TH1F * hElePhiChargedClone = (TH1F*) hElePhiCharged->Clone("ElePhiChargedClone");
1782 TH1F * hNeHadEChargedClone = (TH1F*) hNeHadECharged->Clone("NeHadEChargedClone");
1783 TH1F * hNeHadPtChargedClone = (TH1F*) hNeHadPtCharged->Clone("NeHadPtChargedClone");
1784 TH1F * hNeHadEtaChargedClone = (TH1F*) hNeHadEtaCharged->Clone("NeHadEtaChargedClone");
1785 TH1F * hNeHadPhiChargedClone = (TH1F*) hNeHadPhiCharged->Clone("NeHadPhiChargedClone");
1787 TH1F * hChHadEChargedClone = (TH1F*) hChHadECharged->Clone("ChHadEChargedClone");
1788 TH1F * hChHadPtChargedClone = (TH1F*) hChHadPtCharged->Clone("ChHadPtChargedClone");
1789 TH1F * hChHadEtaChargedClone = (TH1F*) hChHadEtaCharged->Clone("ChHadEtaChargedClone");
1790 TH1F * hChHadPhiChargedClone = (TH1F*) hChHadPhiCharged->Clone("ChHadPhiChargedClone");
1792 //Ratio: reconstructed track matched/ all reconstructed
1794 sprintf(cname,"QA_%s_rectrackmatchratGenID",fCalorimeter.Data());
1795 TCanvas * c3ch = new TCanvas(cname, "Ratio: reconstructed track matched/ all reconstructed, for different particle ID", 400, 400) ;
1799 hEChargedClone->SetMaximum(1.2);
1800 hEChargedClone->SetMinimum(0.001);
1801 hEChargedClone->SetLineColor(3);
1802 hEChargedClone->SetYTitle("track matched / all");
1803 hPi0EChargedClone->Divide(hPi0E);
1804 hGamEChargedClone->Divide(hGamE);
1805 hEleEChargedClone->Divide(hEleE);
1806 hNeHadEChargedClone->Divide(hNeHadE);
1807 hChHadEChargedClone->Divide(hChHadE);
1808 hEChargedClone->Draw();
1809 hPi0EChargedClone->Draw("same");
1810 hGamEChargedClone->Draw("same");
1811 hEleEChargedClone->Draw("same");
1812 hNeHadEChargedClone->Draw("same");
1813 hChHadEChargedClone->Draw("same");
1815 TLegend pLegend3ch(0.75,0.45,0.9,0.8);
1816 pLegend3ch.SetTextSize(0.06);
1817 pLegend3ch.AddEntry(hEChargedClone,"all","L");
1818 pLegend3ch.AddEntry(hPi0EChargedClone,"#pi^{0}","L");
1819 pLegend3ch.AddEntry(hGamEChargedClone,"#gamma","L");
1820 pLegend3ch.AddEntry(hEleEChargedClone,"e^{#pm}","L");
1821 pLegend3ch.AddEntry(hChHadEChargedClone,"h^{#pm}","L");
1822 pLegend3ch.AddEntry(hNeHadEChargedClone,"h^{0}","L");
1823 pLegend3ch.SetFillColor(10);
1824 pLegend3ch.SetBorderSize(1);
1828 hPtChargedClone->SetMaximum(1.2);
1829 hPtChargedClone->SetMinimum(0.001);
1830 hPtChargedClone->SetLineColor(3);
1831 hPtChargedClone->SetYTitle("track matched / all");
1832 hPi0PtChargedClone->Divide(hPi0Pt);
1833 hGamPtChargedClone->Divide(hGamPt);
1834 hElePtChargedClone->Divide(hElePt);
1835 hNeHadPtChargedClone->Divide(hNeHadPt);
1836 hChHadPtChargedClone->Divide(hChHadPt);
1837 hPtChargedClone->Draw();
1838 hPi0PtChargedClone->Draw("same");
1839 hGamPtChargedClone->Draw("same");
1840 hElePtChargedClone->Draw("same");
1841 hNeHadPtChargedClone->Draw("same");
1842 hChHadPtChargedClone->Draw("same");
1845 hEtaChargedClone->SetMaximum(1.2);
1846 hEtaChargedClone->SetMinimum(0.001);
1847 hEtaChargedClone->SetLineColor(3);
1848 hEtaChargedClone->SetYTitle("track matched / all");
1849 hPi0EtaChargedClone->Divide(hPi0Eta);
1850 hGamEtaChargedClone->Divide(hGamEta);
1851 hEleEtaChargedClone->Divide(hEleEta);
1852 hNeHadEtaChargedClone->Divide(hNeHadEta);
1853 hChHadEtaChargedClone->Divide(hChHadEta);
1854 hEtaChargedClone->Draw();
1855 hPi0EtaChargedClone->Draw("same");
1856 hGamEtaChargedClone->Draw("same");
1857 hEleEtaChargedClone->Draw("same");
1858 hNeHadEtaChargedClone->Draw("same");
1859 hChHadEtaChargedClone->Draw("same");
1862 hPhiChargedClone->SetMaximum(1.2);
1863 hPhiChargedClone->SetMinimum(0.001);
1864 hPhiChargedClone->SetLineColor(3);
1865 hPhiChargedClone->SetYTitle("track matched / all");
1866 hPi0PhiChargedClone->Divide(hPi0Phi);
1867 hGamPhiChargedClone->Divide(hGamPhi);
1868 hElePhiChargedClone->Divide(hElePhi);
1869 hNeHadPhiChargedClone->Divide(hNeHadPhi);
1870 hChHadPhiChargedClone->Divide(hChHadPhi);
1871 hPhiChargedClone->Draw();
1872 hPi0PhiChargedClone->Draw("same");
1873 hGamPhiChargedClone->Draw("same");
1874 hElePhiChargedClone->Draw("same");
1875 hNeHadPhiChargedClone->Draw("same");
1876 hChHadPhiChargedClone->Draw("same");
1878 sprintf(name,"QA_%s_RatioReconstructedMatchedDistributionsGenID.eps",fCalorimeter.Data());
1881 sprintf(cname,"QA_%s_trkmatchMCEle",fCalorimeter.Data());
1882 TCanvas *cmemc = new TCanvas(cname,"Track-matching distributions from MC electrons", 600, 200);
1887 fhMCEle1pOverE->Draw();
1888 fhMCEle1pOverER02->SetLineColor(4);
1889 fhMCEle1pOverE->SetLineColor(1);
1890 fhMCEle1pOverER02->Draw("same");
1898 fhMCEle2MatchdEdx->Draw();
1900 sprintf(name,"QA_%s_TrackMatchingDistMCEle.eps",fCalorimeter.Data());
1903 sprintf(cname,"QA_%s_trkmatchMCChHad",fCalorimeter.Data());
1904 TCanvas *cmemchad = new TCanvas(cname,"Track-matching distributions from MC charged hadrons", 600, 200);
1905 cmemchad->Divide(3,1);
1909 fhMCChHad1pOverE->Draw();
1910 fhMCChHad1pOverE->SetLineColor(1);
1911 fhMCChHad1pOverER02->SetLineColor(4);
1912 fhMCChHad1pOverER02->Draw("same");
1917 fhMCChHad1dR->Draw();
1920 fhMCChHad2MatchdEdx->Draw();
1922 sprintf(name,"QA_%s_TrackMatchingDistMCChHad.eps",fCalorimeter.Data());
1923 cmemchad->Print(name);
1925 sprintf(cname,"QA_%s_trkmatchMCNeutral",fCalorimeter.Data());
1926 TCanvas *cmemcn = new TCanvas(cname,"Track-matching distributions from MC neutrals", 600, 200);
1927 cmemcn->Divide(3,1);
1931 fhMCNeutral1pOverE->Draw();
1932 fhMCNeutral1pOverE->SetLineColor(1);
1933 fhMCNeutral1pOverER02->SetLineColor(4);
1934 fhMCNeutral1pOverER02->Draw("same");
1939 fhMCNeutral1dR->Draw();
1942 fhMCNeutral2MatchdEdx->Draw();
1944 sprintf(name,"QA_%s_TrackMatchingDistMCNeutral.eps",fCalorimeter.Data());
1945 cmemcn->Print(name);
1947 sprintf(cname,"QA_%s_trkmatchpE",fCalorimeter.Data());
1948 TCanvas *cmpoe = new TCanvas(cname,"Track-matching distributions, p/E", 400, 200);
1953 fh1pOverE->SetLineColor(1);
1954 fhMCEle1pOverE->SetLineColor(4);
1955 fhMCChHad1pOverE->SetLineColor(2);
1956 fhMCNeutral1pOverE->SetLineColor(7);
1957 fh1pOverE->SetMinimum(0.5);
1959 fhMCEle1pOverE->Draw("same");
1960 fhMCChHad1pOverE->Draw("same");
1961 fhMCNeutral1pOverE->Draw("same");
1962 TLegend pLegendpE(0.65,0.55,0.9,0.8);
1963 pLegendpE.SetTextSize(0.06);
1964 pLegendpE.AddEntry(fh1pOverE,"all","L");
1965 pLegendpE.AddEntry(fhMCEle1pOverE,"e^{#pm}","L");
1966 pLegendpE.AddEntry(fhMCChHad1pOverE,"h^{#pm}","L");
1967 pLegendpE.AddEntry(fhMCNeutral1pOverE,"neutrals","L");
1968 pLegendpE.SetFillColor(10);
1969 pLegendpE.SetBorderSize(1);
1974 fh1pOverER02->SetTitle("Track matches p/E, dR<0.2");
1975 fh1pOverER02->SetLineColor(1);
1976 fhMCEle1pOverER02->SetLineColor(4);
1977 fhMCChHad1pOverER02->SetLineColor(2);
1978 fhMCNeutral1pOverER02->SetLineColor(7);
1979 fh1pOverER02->SetMaximum(fh1pOverE->GetMaximum());
1980 fh1pOverER02->SetMinimum(0.5);
1981 fh1pOverER02->Draw();
1982 fhMCEle1pOverER02->Draw("same");
1983 fhMCChHad1pOverER02->Draw("same");
1984 fhMCNeutral1pOverER02->Draw("same");
1986 // TLegend pLegendpE2(0.65,0.55,0.9,0.8);
1987 // pLegendpE2.SetTextSize(0.06);
1988 // pLegendpE2.SetHeader("dR < 0.02");
1989 // pLegendpE2.SetFillColor(10);
1990 // pLegendpE2.SetBorderSize(1);
1991 // pLegendpE2.Draw();
1992 //Track matching histograms
1993 sprintf(name,"QA_%s_TrackMatchingPOverE.eps",fCalorimeter.Data());
1995 }//MC related histograms
1997 // char line[1024] ;
1998 // sprintf(line, ".!tar -zcf QA_%s_%s.tar.gz *%s*.eps", fCalorimeter.Data(), GetName(),fCalorimeter.Data()) ;
1999 // gROOT->ProcessLine(line);
2000 // sprintf(line, ".!rm -fR *.eps");
2001 // gROOT->ProcessLine(line);
2003 // printf("AliAnaCalorimeterQA::Terminate() - !! All the pdf files are in QA_%s_%s.tar.gz !!!\n", fCalorimeter.Data(), GetName());