9fdb2372 |
1 | \r |
2 | /** ------------------------------ Monte Carlo flag -----------------------------------------*/\r |
3 | Bool_t doMCTruth = kTRUE;\r |
4 | /** ---------------------------- end Monte Carlo flag ---------------------------------------*/\r |
5 | \r |
6 | /** ------------------------- Choose KFParticle OR ESDTrack --------------------------------*/\r |
7 | Bool_t useKFParticle = kTRUE;\r |
8 | Bool_t useESDTrack = kFALSE;\r |
9 | /** ----------------------- end Choose KFParticle OR ESDTrack -----------------------------*/\r |
10 | \r |
11 | \r |
12 | Bool_t calculateBackground = kTRUE;\r |
13 | \r |
a6f44de5 |
14 | Int_t numberOfFilesToAnalyze=100;\r |
15 | \r |
9fdb2372 |
16 | /** ---------------------------------- define cuts here ------------------------------------*/\r |
17 | \r |
18 | Int_t pidOfNegativeTrack=11;\r |
19 | Int_t pidOfPositiveTrack=-11;\r |
20 | \r |
21 | Double_t maxRCut = 200.;\r |
22 | Double_t etaCut = 1.2;\r |
23 | Double_t ptCut = 0.1;\r |
a6f44de5 |
24 | Double_t chi2CutConversion = 20.;\r |
25 | Double_t chi2CutMeson = 20.;\r |
9fdb2372 |
26 | \r |
27 | Double_t xVertexCut = 0.;\r |
28 | Double_t yVertexCut = 0.;\r |
29 | Double_t zVertexCut = 0.;\r |
30 | \r |
31 | Double_t sigmaCutGammaMass=0.0001;\r |
32 | \r |
33 | Bool_t useImprovedVertex = kTRUE;\r |
34 | \r |
35 | // define masses of different particles, this will be used by the KF particle\r |
36 | // together with the width to set mass constraints. Units in GeV.\r |
37 | Double_t electronMass = 0.00051099892;\r |
38 | Double_t gammaMass = 0.;\r |
39 | Double_t pi0Mass = 0.1349766;\r |
40 | Double_t etaMass = 0.54751;\r |
41 | \r |
42 | // define the width constraint used by KF particle.\r |
43 | Double_t gammaWidth = 0.01;\r |
44 | Double_t pi0Width = 0.01;\r |
45 | Double_t etaWidth = 0.01;\r |
46 | \r |
47 | // define the probability of track being an electron\r |
48 | Double_t probElectron = 0.5;\r |
49 | \r |
50 | /** ----------------------------------end define cuts here----------------------------------*/\r |
51 | \r |
52 | /** -------------------------------- Phi/R Mapping ---------------------------------------*/\r |
53 | Int_t nPhiIndex = 18;\r |
54 | Int_t nRIndex = 40;\r |
55 | \r |
56 | Double_t minRadius = 0.;\r |
57 | Double_t maxRadius = 200.;\r |
58 | Double_t minPhi = -TMath::Pi();\r |
59 | Double_t maxPhi = TMath::Pi();\r |
60 | /** ------------------------------- end Phi/R Mapping ------------------------------------*/\r |
61 | \r |
62 | /** ------------------- define which histograms to plot here --------------------------------*/\r |
63 | /** NB: to change the bin numbers, see below the histogram flags */\r |
64 | Bool_t plotMCEPR = kTRUE;\r |
a6f44de5 |
65 | Bool_t plotMCEPZR = kTRUE;\r |
66 | Bool_t plotMCEPXY = kTRUE;\r |
9fdb2372 |
67 | Bool_t plotMCEPOpeningAngle = kTRUE;\r |
68 | \r |
69 | Bool_t plotMCEEnergy = kTRUE;\r |
70 | Bool_t plotMCEPt = kTRUE;\r |
71 | Bool_t plotMCEEta = kTRUE;\r |
72 | Bool_t plotMCEPhi = kTRUE;\r |
73 | \r |
74 | Bool_t plotMCPEnergy = kTRUE;\r |
75 | Bool_t plotMCPPt = kTRUE;\r |
76 | Bool_t plotMCPEta = kTRUE;\r |
77 | Bool_t plotMCPPhi = kTRUE;\r |
78 | \r |
79 | Bool_t plotMCGammaEnergy = kTRUE;\r |
80 | Bool_t plotMCGammaPt = kTRUE;\r |
81 | Bool_t plotMCGammaEta = kTRUE;\r |
82 | Bool_t plotMCGammaPhi = kTRUE;\r |
83 | \r |
84 | Bool_t plotMCDirectGammaEnergy = kTRUE;\r |
85 | Bool_t plotMCDirectGammaPt = kTRUE;\r |
86 | Bool_t plotMCDirectGammaEta = kTRUE;\r |
87 | Bool_t plotMCDirectGammaPhi = kTRUE;\r |
88 | \r |
a6f44de5 |
89 | Bool_t plotMCMatchGammaEta = kTRUE;\r |
90 | Bool_t plotMCMatchGammaPhi = kTRUE;\r |
91 | Bool_t plotMCMatchGammaPt = kTRUE;\r |
92 | Bool_t plotMCMatchGammaEnergy = kTRUE;\r |
93 | Bool_t plotMCMatchGammaMass = kTRUE;\r |
94 | Bool_t plotMCMatchGammaOpeningAngle = kTRUE;\r |
95 | Bool_t plotMCMatchGammaR = kTRUE;\r |
96 | Bool_t plotMCMatchGammaZR = kTRUE;\r |
97 | Bool_t plotMCMatchGammaXY = kTRUE;\r |
9fdb2372 |
98 | \r |
99 | Bool_t plotMCPi0Eta = kTRUE;\r |
100 | Bool_t plotMCPi0Phi = kTRUE;\r |
101 | Bool_t plotMCPi0Pt = kTRUE;\r |
102 | Bool_t plotMCPi0Energy = kTRUE;\r |
103 | Bool_t plotMCPi0Mass = kTRUE;\r |
104 | Bool_t plotMCPi0OpeningAngle = kTRUE;\r |
105 | Bool_t plotMCPi0R = kTRUE;\r |
a6f44de5 |
106 | Bool_t plotMCPi0ZR = kTRUE;\r |
107 | Bool_t plotMCPi0XY = kTRUE;\r |
9fdb2372 |
108 | \r |
109 | Bool_t plotMCEtaEta = kTRUE;\r |
110 | Bool_t plotMCEtaPhi = kTRUE;\r |
111 | Bool_t plotMCEtaPt = kTRUE;\r |
112 | Bool_t plotMCEtaEnergy = kTRUE;\r |
113 | Bool_t plotMCEtaMass = kTRUE;\r |
114 | Bool_t plotMCEtaOpeningAngleGamma = kTRUE;\r |
115 | Bool_t plotMCEtaR = kTRUE;\r |
a6f44de5 |
116 | Bool_t plotMCEtaZR = kTRUE;\r |
117 | Bool_t plotMCEtaXY = kTRUE;\r |
9fdb2372 |
118 | \r |
119 | // Histograms from esd tracks\r |
120 | Bool_t plotESDEPR = kTRUE;\r |
a6f44de5 |
121 | Bool_t plotESDEPZR = kTRUE;\r |
122 | Bool_t plotESDEPXY = kTRUE;\r |
9fdb2372 |
123 | Bool_t plotESDEPOpeningAngle = kTRUE;\r |
124 | \r |
125 | Bool_t plotESDEEnergy = kTRUE;\r |
126 | Bool_t plotESDEPt = kTRUE;\r |
127 | Bool_t plotESDEEta = kTRUE;\r |
128 | Bool_t plotESDEPhi = kTRUE;\r |
129 | \r |
130 | Bool_t plotESDPEnergy = kTRUE;\r |
131 | Bool_t plotESDPPt = kTRUE;\r |
132 | Bool_t plotESDPEta = kTRUE;\r |
133 | Bool_t plotESDPPhi = kTRUE;\r |
134 | \r |
135 | \r |
136 | Bool_t plotESDGammaEnergy = kTRUE;\r |
137 | Bool_t plotESDGammaPt = kTRUE;\r |
138 | Bool_t plotESDGammaEta = kTRUE;\r |
139 | Bool_t plotESDGammaPhi = kTRUE;\r |
140 | \r |
a6f44de5 |
141 | Bool_t plotESDMatchGammaOpeningAngle = kTRUE;\r |
142 | Bool_t plotESDMatchGammaEnergy = kTRUE;\r |
143 | Bool_t plotESDMatchGammaPt = kTRUE;\r |
144 | Bool_t plotESDMatchGammaEta = kTRUE;\r |
145 | Bool_t plotESDMatchGammaPhi = kTRUE;\r |
146 | Bool_t plotESDMatchGammaMass = kTRUE;\r |
147 | Bool_t plotESDMatchGammaWidth = kTRUE;\r |
148 | Bool_t plotESDMatchGammaChi2 = kTRUE;\r |
149 | Bool_t plotESDMatchGammaNDF = kTRUE;\r |
150 | Bool_t plotESDMatchGammaR = kTRUE;\r |
151 | Bool_t plotESDMatchGammaZR = kTRUE;\r |
152 | Bool_t plotESDMatchGammaXY = kTRUE;\r |
9fdb2372 |
153 | \r |
154 | Bool_t plotESDTwoGammaCombinationOpeningAngleGamma = kTRUE;\r |
a6f44de5 |
155 | Bool_t plotESDTwoGammaCombinationEnergy = kTRUE;\r |
156 | Bool_t plotESDTwoGammaCombinationPt = kTRUE;\r |
157 | Bool_t plotESDTwoGammaCombinationEta = kTRUE;\r |
158 | Bool_t plotESDTwoGammaCombinationPhi = kTRUE;\r |
159 | Bool_t plotESDTwoGammaCombinationMass = kTRUE;\r |
160 | Bool_t plotESDTwoGammaCombinationR = kTRUE;\r |
161 | Bool_t plotESDTwoGammaCombinationZR = kTRUE;\r |
162 | Bool_t plotESDTwoGammaCombinationXY = kTRUE;\r |
9fdb2372 |
163 | \r |
164 | Bool_t plotESDBackgroundOpeningAngleGamma = kTRUE;\r |
165 | Bool_t plotESDBackgroundEnergy = kTRUE;\r |
166 | Bool_t plotESDBackgroundPt = kTRUE;\r |
167 | Bool_t plotESDBackgroundEta = kTRUE;\r |
168 | Bool_t plotESDBackgroundPhi = kTRUE;\r |
169 | Bool_t plotESDBackgroundMass = kTRUE;\r |
170 | Bool_t plotESDBackgroundR = kTRUE;\r |
a6f44de5 |
171 | Bool_t plotESDBackgroundZR = kTRUE;\r |
172 | Bool_t plotESDBackgroundXY = kTRUE;\r |
9fdb2372 |
173 | \r |
a6f44de5 |
174 | Bool_t plotMapping = kTRUE; \r |
9fdb2372 |
175 | \r |
a6f44de5 |
176 | Bool_t plotResolutiondPt = kTRUE;\r |
177 | Bool_t plotResolutiondR = kTRUE;\r |
178 | Bool_t plotResolutiondZ = kTRUE;\r |
9fdb2372 |
179 | \r |
180 | Bool_t plotResolutiondRdPt = kTRUE;\r |
181 | \r |
182 | Bool_t plotResolutionMCPt = kTRUE;\r |
183 | Bool_t plotResolutionMCR = kTRUE;\r |
184 | Bool_t plotResolutionMCZ = kTRUE;\r |
185 | \r |
186 | Bool_t plotResolutionESDPt = kTRUE;\r |
187 | Bool_t plotResolutionESDR = kTRUE;\r |
188 | Bool_t plotResolutionESDZ = kTRUE;\r |
189 | \r |
a6f44de5 |
190 | Bool_t plotNumberOfV0s = kTRUE;\r |
191 | Bool_t plotNumberOfSurvivingV0s = kTRUE;\r |
9fdb2372 |
192 | \r |
193 | // debug histograms\r |
a6f44de5 |
194 | Bool_t plotV0MassDebugCut1 = kTRUE;\r |
195 | Bool_t plotV0MassDebugCut2 = kTRUE;\r |
196 | Bool_t plotV0MassDebugCut3 = kTRUE;\r |
197 | Bool_t plotV0MassDebugCut4 = kTRUE;\r |
198 | Bool_t plotV0MassDebugCut5 = kTRUE;\r |
199 | Bool_t plotV0MassDebugCut6 = kTRUE;\r |
200 | Bool_t plotV0MassDebugCut7 = kTRUE;\r |
201 | Bool_t plotV0MassDebugCut8 = kTRUE;\r |
9fdb2372 |
202 | \r |
a6f44de5 |
203 | Bool_t plotPi0Spectra = kTRUE;\r |
204 | Bool_t plotEtaSpectra = kTRUE;\r |
9fdb2372 |
205 | \r |
206 | \r |
207 | /** ----------------- end define which histograms to plot here -------------------------------*/\r |
208 | \r |
209 | \r |
210 | \r |
211 | /** ----------- Define the binning for the different plot types here -------------------------*/\r |
212 | //R-plots\r |
213 | Int_t nXBinsR = 1000;\r |
214 | Double_t firstXBinR = 0.;\r |
215 | Double_t lastXBinR = 250.;\r |
216 | \r |
217 | //ZR-plots\r |
218 | Int_t nXBinsZR = 2000;\r |
219 | Double_t firstXBinZR = -10.;\r |
220 | Double_t lastXBinZR = 10.;\r |
221 | Int_t nYBinsZR = 1000;\r |
222 | Double_t firstYBinZR = 0.;\r |
223 | Double_t lastYBinZR = 250.;\r |
224 | \r |
225 | //XY-plots\r |
226 | Int_t nXBinsXY = 2000;\r |
227 | Double_t firstXBinXY = -250.;\r |
228 | Double_t lastXBinXY = 250.;\r |
229 | Int_t nYBinsXY = 2000;\r |
230 | Double_t firstYBinXY = -250.;\r |
231 | Double_t lastYBinXY = 250.;\r |
232 | \r |
233 | //OpenAngle-plots\r |
234 | Int_t nXBinsOpeningAngle = 200;\r |
235 | Double_t firstXBinOpeningAngle = 0.;\r |
236 | Double_t lastXBinOpeningAngle = TMath::Pi()/2;\r |
237 | \r |
238 | //Energy-plots\r |
239 | Int_t nXBinsEnergy = 500;\r |
240 | Double_t firstXBinEnergy = 0.;\r |
241 | Double_t lastXBinEnergy = 5.;\r |
242 | \r |
243 | //Pt-plots\r |
244 | Int_t nXBinsPt = 500;\r |
245 | Double_t firstXBinPt = 0.;\r |
246 | Double_t lastXBinPt = 5.;\r |
247 | \r |
248 | //Eta-plots\r |
249 | Int_t nXBinsEta = 400;\r |
250 | Double_t firstXBinEta = -2.;\r |
251 | Double_t lastXBinEta = 2.;\r |
252 | \r |
253 | //Phi-plots\r |
254 | Int_t nXBinsPhi = 720;\r |
255 | Double_t firstXBinPhi = -TMath::Pi();\r |
256 | Double_t lastXBinPhi = TMath::Pi();\r |
257 | \r |
258 | //Mapping-plots\r |
259 | Int_t nXBinsMapping = 40;\r |
260 | Double_t firstXBinMapping = -20.;\r |
261 | Double_t lastXBinMapping = 20.;\r |
262 | Int_t nYBinsMapping = 30;\r |
263 | Double_t firstYBinMapping = -1.5;\r |
264 | Double_t lastYBinMapping = 1.5;\r |
265 | \r |
266 | //ResolutionPlots\r |
267 | //RESdPt\r |
268 | Int_t nXBinsResdPt=500;\r |
269 | Int_t firstXBinResdPt= 0;\r |
270 | Int_t lastXBinResdPt=5;\r |
271 | Int_t nYBinsResdPt=1000;\r |
272 | Int_t firstYBinResdPt= -5;\r |
273 | Int_t lastYBinResdPt=5;\r |
274 | \r |
275 | //RESdR\r |
276 | Int_t nXBinsResdR=1000;\r |
277 | Int_t firstXBinResdR= 0;\r |
278 | Int_t lastXBinResdR=250;\r |
279 | Int_t nYBinsResdR=1000;\r |
280 | Int_t firstYBinResdR= -25;\r |
281 | Int_t lastYBinResdR=25;\r |
282 | \r |
283 | //RESdZ\r |
284 | Int_t nXBinsResdZ=2000;\r |
285 | Int_t firstXBinResdZ= -20;\r |
286 | Int_t lastXBinResdZ=20;\r |
287 | Int_t nYBinsResdZ=1000;\r |
288 | Int_t firstYBinResdZ= -20;\r |
289 | Int_t lastYBinResdZ=20;\r |
290 | \r |
291 | //RESdRdPt\r |
292 | Int_t nXBinsResdRdPt=1000;\r |
293 | Int_t firstXBinResdRdPt= -22;\r |
294 | Int_t lastXBinResdRdPt=22;\r |
295 | Int_t nYBinsResdRdPt=1000;\r |
296 | Int_t firstYBinResdRdPt= -5;\r |
297 | Int_t lastYBinResdRdPt=5;\r |
298 | \r |
299 | \r |
300 | //RESMCPt\r |
301 | Int_t nXBinsResPt=500;\r |
302 | Int_t firstXBinResPt= 0;\r |
303 | Int_t lastXBinResPt=5;\r |
304 | \r |
305 | //RESMCR\r |
306 | Int_t nXBinsResR=1000;\r |
307 | Int_t firstXBinResR= 0;\r |
308 | Int_t lastXBinResR=250;\r |
309 | \r |
310 | //RESMCZ\r |
311 | Int_t nXBinsResZ=1000;\r |
312 | Int_t firstXBinResZ= 0;\r |
313 | Int_t lastXBinResZ=250;\r |
314 | \r |
315 | //GammaMass-plots\r |
316 | Int_t nXBinsGammaMass = 100;\r |
317 | Double_t firstXBinGammaMass = 0.;\r |
318 | Double_t lastXBinGammaMass = 1.;\r |
319 | \r |
320 | //Pi0Mass-plots\r |
321 | Int_t nXBinsPi0Mass = 100;\r |
322 | Double_t firstXBinPi0Mass = 0.;\r |
323 | Double_t lastXBinPi0Mass = 1.;\r |
324 | \r |
325 | //EtaMass-plots\r |
326 | Int_t nXBinsEtaMass = 100;\r |
327 | Double_t firstXBinEtaMass = 0.;\r |
328 | Double_t lastXBinEtaMass = 1.;\r |
329 | \r |
330 | //GammaWidth-plots\r |
331 | Int_t nXBinsGammaWidth = 100;\r |
332 | Double_t firstXBinGammaWidth = 0.;\r |
333 | Double_t lastXBinGammaWidth = 1.;\r |
334 | \r |
335 | //GammaChi2-plots\r |
336 | Int_t nXBinsGammaChi2 = 100;\r |
337 | Double_t firstXBinGammaChi2 = 0;\r |
338 | Double_t lastXBinGammaChi2 = 100.;\r |
339 | \r |
340 | //GammaNDF-plots\r |
341 | Int_t nXBinsGammaNDF = 10;\r |
342 | Double_t firstXBinGammaNDF = 0.;\r |
343 | Double_t lastXBinGammaNDF = 10.;\r |
344 | \r |
345 | //Spectra-plots\r |
346 | Int_t nXBinsSpectra = 100;\r |
347 | Double_t firstXBinSpectra = 0.;\r |
348 | Double_t lastXBinSpectra = 1.;\r |
349 | Int_t nYBinsSpectra = 500;\r |
350 | Double_t firstYBinSpectra = 0.;\r |
351 | Double_t lastYBinSpectra = 100.;\r |
352 | \r |
353 | /** ---------- end Define the binning for the different plot types here ----------------------*/\r |
354 | \r |
355 | \r |
356 | \r |
357 | /************************************************************************************************\r |
358 | * *\r |
359 | * *\r |
360 | * EVERYTHING BELOW IS FOR DEVELOPERS ONLY *\r |
361 | * *\r |
362 | * *\r |
363 | ************************************************************************************************/\r |
364 | \r |
365 | void ConfigGammaConversion(const char *chainName, const char *sample, int limit = 0){\r |
366 | \r |
367 | build();//build (if necessary) and load the libraries needed\r |
368 | \r |
369 | gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C"); // load the CreateChain macro\r |
370 | \r |
371 | AliLog::SetGlobalLogLevel(AliLog::kError);\r |
372 | \r |
373 | //-------------------------------- Creating the histograms -------------------------------\r |
374 | AliGammaConversionHistograms * histograms = new AliGammaConversionHistograms();\r |
375 | \r |
376 | if(plotMCEPR == kTRUE){ histograms->AddHistogram("MC_EP_R","Radius of gamma conversion points",nXBinsR, firstXBinR, lastXBinR,"counts","cm");}\r |
377 | if(plotMCEPZR == kTRUE){ histograms->AddHistogram("MC_EP_ZR","Radius of gamma conversion points vs Z",nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "cm", "cm");}\r |
378 | if(plotMCEPXY == kTRUE){ histograms->AddHistogram("MC_EP_XY","Gamma XY converison point.",nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "cm", "cm");}\r |
379 | if(plotMCEPOpeningAngle == kTRUE){ histograms->AddHistogram("MC_EP_OpeningAngle","Opening angle of e+e- pairs from gamma conversion",nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "counts", "cm");}\r |
380 | \r |
381 | if(plotMCEEnergy == kTRUE){ histograms->AddHistogram("MC_E_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
382 | if(plotMCEPt == kTRUE){ histograms->AddHistogram("MC_E_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
383 | if(plotMCEEta == kTRUE){ histograms->AddHistogram("MC_E_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
384 | if(plotMCEPhi == kTRUE){ histograms->AddHistogram("MC_E_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
385 | \r |
386 | if(plotMCPEnergy == kTRUE){ histograms->AddHistogram("MC_P_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
387 | if(plotMCPPt == kTRUE){ histograms->AddHistogram("MC_P_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
388 | if(plotMCPEta == kTRUE){ histograms->AddHistogram("MC_P_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
389 | if(plotMCPPhi == kTRUE){ histograms->AddHistogram("MC_P_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
390 | \r |
391 | if(plotMCGammaEnergy == kTRUE){ histograms->AddHistogram("MC_Gamma_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
392 | if(plotMCGammaPt == kTRUE){ histograms->AddHistogram("MC_Gamma_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
393 | if(plotMCGammaEta == kTRUE){ histograms->AddHistogram("MC_Gamma_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
394 | if(plotMCGammaPhi == kTRUE){ histograms->AddHistogram("MC_Gamma_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
395 | \r |
396 | if(plotMCDirectGammaEnergy == kTRUE){ histograms->AddHistogram("MC_DirectGamma_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
397 | if(plotMCDirectGammaPt == kTRUE){ histograms->AddHistogram("MC_DirectGamma_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
398 | if(plotMCDirectGammaEta == kTRUE){ histograms->AddHistogram("MC_DirectGamma_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
399 | if(plotMCDirectGammaPhi == kTRUE){ histograms->AddHistogram("MC_DirectGamma_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
400 | \r |
401 | if(plotMCMatchGammaEta == kTRUE){ histograms->AddHistogram("MC_Match_Gamma_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
402 | if(plotMCMatchGammaPhi == kTRUE){ histograms->AddHistogram("MC_Match_Gamma_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
403 | if(plotMCMatchGammaPt == kTRUE){ histograms->AddHistogram("MC_Match_Gamma_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
404 | if(plotMCMatchGammaEnergy == kTRUE){ histograms->AddHistogram("MC_Match_Gamma_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
405 | if(plotMCMatchGammaMass == kTRUE){ histograms->AddHistogram("MC_Match_Gamma_Mass" ,"" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass, "", "");}\r |
406 | if(plotMCMatchGammaOpeningAngle == kTRUE){ histograms->AddHistogram("MC_Match_Gamma_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}\r |
a6f44de5 |
407 | if(plotMCMatchGammaR == kTRUE){ histograms->AddHistogram("MC_Match_Gamma_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}\r |
408 | if(plotMCMatchGammaZR == kTRUE){ histograms->AddHistogram("MC_Match_Gamma_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}\r |
409 | if(plotMCMatchGammaXY == kTRUE){ histograms->AddHistogram("MC_Match_Gamma_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}\r |
9fdb2372 |
410 | \r |
411 | if(plotMCPi0Eta == kTRUE){ histograms->AddHistogram("MC_Pi0_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
412 | if(plotMCPi0Phi == kTRUE){ histograms->AddHistogram("MC_Pi0_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
413 | if(plotMCPi0Pt == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
414 | if(plotMCPi0Energy == kTRUE){ histograms->AddHistogram("MC_Pi0_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
415 | if(plotMCPi0Mass == kTRUE){ histograms->AddHistogram("MC_Pi0_Mass" ,"" , nXBinsPi0Mass, firstXBinPi0Mass, lastXBinPi0Mass, "", "");}\r |
416 | if(plotMCPi0OpeningAngle == kTRUE){ histograms->AddHistogram("MC_Pi0_GammaDaughter_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}\r |
417 | if(plotMCPi0R == kTRUE){ histograms->AddHistogram("MC_Pi0_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}\r |
418 | if(plotMCPi0ZR == kTRUE){ histograms->AddHistogram("MC_Pi0_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}\r |
419 | if(plotMCPi0XY == kTRUE){ histograms->AddHistogram("MC_Pi0_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}\r |
420 | \r |
a6f44de5 |
421 | if(plotMCPi0Eta == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
422 | if(plotMCPi0Phi == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
423 | if(plotMCPi0Pt == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
424 | if(plotMCPi0Energy == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
425 | if(plotMCPi0Mass == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Mass" ,"" , nXBinsPi0Mass, firstXBinPi0Mass, lastXBinPi0Mass, "", "");}\r |
426 | if(plotMCPi0OpeningAngle == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_GammaDaughter_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}\r |
427 | if(plotMCPi0R == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}\r |
428 | if(plotMCPi0ZR == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}\r |
429 | if(plotMCPi0XY == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}\r |
430 | \r |
9fdb2372 |
431 | if(plotMCEtaEta == kTRUE){ histograms->AddHistogram("MC_Eta_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
432 | if(plotMCEtaPhi == kTRUE){ histograms->AddHistogram("MC_Eta_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
433 | if(plotMCEtaPt == kTRUE){ histograms->AddHistogram("MC_Eta_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
434 | if(plotMCEtaEnergy == kTRUE){ histograms->AddHistogram("MC_Eta_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
435 | if(plotMCEtaMass == kTRUE){ histograms->AddHistogram("MC_Eta_Mass" ,"" , nXBinsEtaMass, firstXBinEtaMass, lastXBinEtaMass, "", "");}\r |
436 | if(plotMCEtaOpeningAngleGamma == kTRUE){ histograms->AddHistogram("MC_Eta_GammaDaughter_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}\r |
437 | if(plotMCEtaR == kTRUE){ histograms->AddHistogram("MC_Eta_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}\r |
438 | if(plotMCEtaZR == kTRUE){ histograms->AddHistogram("MC_Eta_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}\r |
439 | if(plotMCEtaXY == kTRUE){ histograms->AddHistogram("MC_Eta_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}\r |
440 | \r |
441 | // Histograms from esd tracks\r |
442 | if(plotESDEPR == kTRUE){ histograms->AddHistogram("ESD_EP_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}\r |
443 | if(plotESDEPZR == kTRUE){ histograms->AddHistogram("ESD_EP_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}\r |
444 | if(plotESDEPXY == kTRUE){ histograms->AddHistogram("ESD_EP_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}\r |
445 | if(plotESDEPOpeningAngle == kTRUE){ histograms->AddHistogram("ESD_EP_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}\r |
446 | \r |
447 | if(plotESDEEnergy == kTRUE){ histograms->AddHistogram("ESD_E_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
448 | if(plotESDEPt == kTRUE){ histograms->AddHistogram("ESD_E_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
449 | if(plotESDEEta == kTRUE){ histograms->AddHistogram("ESD_E_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
450 | if(plotESDEPhi == kTRUE){ histograms->AddHistogram("ESD_E_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
451 | \r |
452 | if(plotESDPEnergy == kTRUE){ histograms->AddHistogram("ESD_P_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
453 | if(plotESDPPt == kTRUE){ histograms->AddHistogram("ESD_P_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
454 | if(plotESDPEta == kTRUE){ histograms->AddHistogram("ESD_P_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
455 | if(plotESDPPhi == kTRUE){ histograms->AddHistogram("ESD_P_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
456 | \r |
457 | if(plotESDGammaEnergy == kTRUE){ histograms->AddHistogram("ESD_Gamma_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
458 | if(plotESDGammaPt == kTRUE){ histograms->AddHistogram("ESD_Gamma_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
459 | if(plotESDGammaEta == kTRUE){ histograms->AddHistogram("ESD_Gamma_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
460 | if(plotESDGammaPhi == kTRUE){ histograms->AddHistogram("ESD_Gamma_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
461 | \r |
462 | if(plotESDMatchGammaOpeningAngle == kTRUE){ histograms->AddHistogram("ESD_Match_Gamma_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}\r |
463 | if(plotESDMatchGammaEnergy == kTRUE){ histograms->AddHistogram("ESD_Match_Gamma_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
464 | if(plotESDMatchGammaPt == kTRUE){ histograms->AddHistogram("ESD_Match_Gamma_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
465 | if(plotESDMatchGammaEta == kTRUE){ histograms->AddHistogram("ESD_Match_Gamma_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
466 | if(plotESDMatchGammaPhi == kTRUE){ histograms->AddHistogram("ESD_Match_Gamma_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
467 | if(plotESDMatchGammaMass == kTRUE){ histograms->AddHistogram("ESD_Match_Gamma_Mass" ,"" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass, "", "");}\r |
468 | if(plotESDMatchGammaWidth == kTRUE){ histograms->AddHistogram("ESD_Match_Gamma_Width" ,"" , nXBinsGammaWidth, firstXBinGammaWidth, lastXBinGammaWidth, "", "");}\r |
469 | if(plotESDMatchGammaChi2 == kTRUE){ histograms->AddHistogram("ESD_Match_Gamma_Chi2" ,"" , nXBinsGammaChi2, firstXBinGammaChi2, lastXBinGammaChi2, "", "");}\r |
470 | if(plotESDMatchGammaNDF == kTRUE){ histograms->AddHistogram("ESD_Match_Gamma_NDF" ,"" , nXBinsGammaNDF, firstXBinGammaNDF, lastXBinGammaNDF, "", "");}\r |
471 | if(plotESDMatchGammaR == kTRUE){ histograms->AddHistogram("ESD_Match_Gamma_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}\r |
472 | if(plotESDMatchGammaZR == kTRUE){ histograms->AddHistogram("ESD_Match_Gamma_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}\r |
473 | if(plotESDMatchGammaXY == kTRUE){ histograms->AddHistogram("ESD_Match_Gamma_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}\r |
474 | \r |
475 | if(plotESDTwoGammaCombinationOpeningAngleGamma == kTRUE){ histograms->AddHistogram("ESD_TwoGammaCombination_GammaDaughter_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}\r |
476 | if(plotESDTwoGammaCombinationEnergy == kTRUE){ histograms->AddHistogram("ESD_TwoGammaCombination_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
477 | if(plotESDTwoGammaCombinationPt == kTRUE){ histograms->AddHistogram("ESD_TwoGammaCombination_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
478 | if(plotESDTwoGammaCombinationEta == kTRUE){ histograms->AddHistogram("ESD_TwoGammaCombination_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
479 | if(plotESDTwoGammaCombinationPhi == kTRUE){ histograms->AddHistogram("ESD_TwoGammaCombination_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
480 | if(plotESDTwoGammaCombinationMass == kTRUE){ histograms->AddHistogram("ESD_TwoGammaCombination_Mass" ,"" , nXBinsPi0Mass, firstXBinPi0Mass, lastXBinPi0Mass, "", "");}\r |
481 | if(plotESDTwoGammaCombinationR == kTRUE){ histograms->AddHistogram("ESD_TwoGammaCombination_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}\r |
482 | if(plotESDTwoGammaCombinationZR == kTRUE){ histograms->AddHistogram("ESD_TwoGammaCombination_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}\r |
483 | if(plotESDTwoGammaCombinationXY == kTRUE){ histograms->AddHistogram("ESD_TwoGammaCombination_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}\r |
484 | \r |
9fdb2372 |
485 | if(plotESDBackgroundOpeningAngleGamma == kTRUE){ histograms->AddHistogram("ESD_Background_GammaDaughter_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}\r |
486 | if(plotESDBackgroundEnergy == kTRUE){ histograms->AddHistogram("ESD_Background_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}\r |
487 | if(plotESDBackgroundPt == kTRUE){ histograms->AddHistogram("ESD_Background_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}\r |
488 | if(plotESDBackgroundEta == kTRUE){ histograms->AddHistogram("ESD_Background_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}\r |
489 | if(plotESDBackgroundPhi == kTRUE){ histograms->AddHistogram("ESD_Background_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}\r |
490 | if(plotESDBackgroundMass == kTRUE){ histograms->AddHistogram("ESD_Background_Mass" ,"" , nXBinsEtaMass, firstXBinEtaMass, lastXBinEtaMass, "", "");}\r |
491 | if(plotESDBackgroundR == kTRUE){ histograms->AddHistogram("ESD_Background_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}\r |
492 | if(plotESDBackgroundZR == kTRUE){ histograms->AddHistogram("ESD_Background_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}\r |
493 | if(plotESDBackgroundXY == kTRUE){ histograms->AddHistogram("ESD_Background_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}\r |
494 | \r |
495 | if(plotMapping == kTRUE){\r |
496 | histograms->InitializeMappingValues(nPhiIndex,nRIndex,nXBinsMapping,minRadius,maxRadius,nYBinsMapping,minPhi,maxPhi);\r |
497 | histograms->AddMappingHistograms(nPhiIndex,nRIndex,nXBinsMapping,minRadius,maxRadius,nYBinsMapping,minPhi,maxPhi);\r |
498 | }\r |
499 | \r |
500 | if(plotResolutiondPt == kTRUE){histograms->AddHistogram("Resolution_dPt" ,"" , nXBinsResdPt, firstXBinResdPt, lastXBinResdPt, nYBinsResdPt, firstYBinResdPt, lastYBinResdPt, "", "");}\r |
501 | if(plotResolutiondR == kTRUE){histograms->AddHistogram("Resolution_dR" ,"" , nXBinsResdR, firstXBinResdR, lastXBinResdR, nYBinsResdR, firstYBinResdR, lastYBinResdR, "", "");}\r |
502 | if(plotResolutiondZ == kTRUE){histograms->AddHistogram("Resolution_dZ" ,"" , nXBinsResdZ, firstXBinResdZ, lastXBinResdZ, nYBinsResdZ, firstYBinResdZ, lastYBinResdZ, "", "");}\r |
503 | \r |
504 | if(plotResolutiondRdPt == kTRUE){histograms->AddHistogram("Resolution_dR_dPt" ,"" , nXBinsResdRdPt, firstXBinResdRdPt, lastXBinResdRdPt, nYBinsResdRdPt, firstYBinResdRdPt, lastYBinResdRdPt, "", "");}\r |
505 | \r |
506 | if(plotResolutionMCPt == kTRUE){histograms->AddHistogram("Resolution_MC_Pt" ,"" , nXBinsResPt, firstXBinResPt, lastXBinResPt,"","");}\r |
507 | if(plotResolutionMCR == kTRUE){histograms->AddHistogram("Resolution_MC_R" ,"" , nXBinsResR, firstXBinResR, lastXBinResR,"","");}\r |
508 | if(plotResolutionMCZ == kTRUE){histograms->AddHistogram("Resolution_MC_Z" ,"" , nXBinsResZ, firstXBinResZ, lastXBinResZ,"","");}\r |
509 | \r |
510 | if(plotResolutionESDPt == kTRUE){histograms->AddHistogram("Resolution_ESD_Pt" ,"" , nXBinsResPt, firstXBinResPt, lastXBinResPt,"","");}\r |
511 | if(plotResolutionESDR == kTRUE){histograms->AddHistogram("Resolution_ESD_R" ,"" , nXBinsResR, firstXBinResR, lastXBinResR,"","");}\r |
512 | if(plotResolutionESDZ == kTRUE){histograms->AddHistogram("Resolution_ESD_Z" ,"" , nXBinsResZ, firstXBinResZ, lastXBinResZ,"","");}\r |
513 | \r |
514 | if(plotNumberOfV0s == kTRUE){histograms->AddHistogram("NumberOfV0s","Number of v0s",100, 0, 100,"","");}\r |
515 | if(plotNumberOfSurvivingV0s == kTRUE){histograms->AddHistogram("NumberOfSurvivingV0s","Number of surviving v0s",100, 0, 100,"","");}\r |
516 | \r |
517 | // debug histograms\r |
518 | if(plotV0MassDebugCut1 == kTRUE){histograms->AddHistogram("V0MassDebugCut1" ,"debug1" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}\r |
519 | if(plotV0MassDebugCut2 == kTRUE){histograms->AddHistogram("V0MassDebugCut2" ,"debug2" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}\r |
520 | if(plotV0MassDebugCut3 == kTRUE){histograms->AddHistogram("V0MassDebugCut3" ,"debug3" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}\r |
521 | if(plotV0MassDebugCut4 == kTRUE){histograms->AddHistogram("V0MassDebugCut4" ,"debug4" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}\r |
522 | if(plotV0MassDebugCut5 == kTRUE){histograms->AddHistogram("V0MassDebugCut5" ,"debug5" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}\r |
523 | if(plotV0MassDebugCut6 == kTRUE){histograms->AddHistogram("V0MassDebugCut6" ,"debug6" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}\r |
524 | if(plotV0MassDebugCut7 == kTRUE){histograms->AddHistogram("V0MassDebugCut7" ,"debug7" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}\r |
525 | if(plotV0MassDebugCut8 == kTRUE){histograms->AddHistogram("V0MassDebugCut8" ,"debug8" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}\r |
526 | \r |
527 | \r |
a6f44de5 |
528 | if(plotPi0Spectra == kTRUE){histograms->AddHistogram("InvMass_vs_Pt_Spectra" ,"Invariant Mass vs Pt" , nXBinsSpectra, firstXBinSpectra, lastXBinSpectra,nYBinsSpectra, firstYBinSpectra, lastYBinSpectra,"InvMass [GeV]","Pt [GeV]");}\r |
529 | \r |
530 | if(plotPi0Spectra == kTRUE && calculateBackground == kTRUE){histograms->AddHistogram("Background_InvMass_vs_Pt_Spectra" ,"Background Invariant Mass vs Pt" , nXBinsSpectra, firstXBinSpectra, lastXBinSpectra,nYBinsSpectra, firstYBinSpectra, lastYBinSpectra,"InvMass [GeV]","Pt [GeV]");}\r |
9fdb2372 |
531 | \r |
532 | \r |
533 | \r |
534 | //------------------------------ end Creating the histograms -----------------------------\r |
535 | \r |
536 | // Create the Analysis manager\r |
537 | AliAnalysisManager *mgr = new AliAnalysisManager("My Manager", "My Analysis");\r |
538 | \r |
539 | // Define Input Event Handler \r |
540 | AliESDInputHandler* inpHandler = new AliESDInputHandler();\r |
541 | \r |
542 | // Define Output Event Handler\r |
543 | AliAODHandler* aodHandler = new AliAODHandler();\r |
544 | aodHandler->SetOutputFileName("aodAliGammaConversion.root");\r |
545 | \r |
546 | // Define MC Truth Event Handler\r |
547 | AliMCEventHandler* mcHandler = new AliMCEventHandler();\r |
548 | \r |
549 | // Add Handlers to the Task Manager\r |
550 | mgr->SetInputEventHandler (inpHandler);\r |
551 | mgr->SetOutputEventHandler (aodHandler);\r |
552 | mgr->SetMCtruthEventHandler(mcHandler);\r |
553 | \r |
554 | // Be sure you are told what you are doing\r |
555 | mgr->SetDebugLevel(10);\r |
556 | \r |
557 | // Declare Common Input Tchain\r |
558 | AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("Chain",TChain::Class(),AliAnalysisManager::kInputContainer);\r |
559 | \r |
560 | // Common Output Tree in common ‘default’ output file\r |
561 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("tree", TTree::Class(),AliAnalysisManager::kOutputContainer, "default");\r |
562 | \r |
563 | // Private output objects\r |
564 | AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histogramsAliGammaConversion", TList::Class(),AliAnalysisManager::kOutputContainer, "histogramsAliGammaConversion.root");\r |
565 | \r |
566 | \r |
567 | //------------------------ END: Define input/output handlers ---------------------------------------------------\r |
568 | \r |
569 | \r |
570 | //check for errors in the specified data\r |
571 | if(useKFParticle == kTRUE && useESDTrack == kTRUE){\r |
572 | //Print warning, cannot use both\r |
573 | }\r |
574 | if(useKFParticle == kFALSE && useESDTrack == kFALSE){\r |
575 | //Print warning, one have to be specified\r |
576 | }\r |
577 | \r |
578 | \r |
579 | //Create the V0Reader\r |
580 | AliV0Reader * v0Reader = new AliV0Reader();\r |
581 | if(useKFParticle){\r |
582 | v0Reader->UseKFParticle();\r |
583 | }\r |
584 | else if(useESDTrack){\r |
585 | v0Reader->UseESDTrack();\r |
586 | }\r |
587 | v0Reader->SetNegativeTrackPID(pidOfNegativeTrack);\r |
588 | v0Reader->SetPositiveTrackPID(pidOfPositiveTrack);\r |
589 | v0Reader->SetMaxRCut(maxRCut);\r |
590 | v0Reader->SetEtaCut(etaCut);\r |
591 | v0Reader->SetPtCut(ptCut);\r |
a6f44de5 |
592 | v0Reader->SetChi2CutConversion(chi2CutConversion);\r |
593 | v0Reader->SetChi2CutMeson(chi2CutMeson);\r |
9fdb2372 |
594 | v0Reader->SetPIDProbability(probElectron);\r |
595 | v0Reader->SetXVertexCut(xVertexCut);\r |
596 | v0Reader->SetYVertexCut(yVertexCut);\r |
597 | v0Reader->SetZVertexCut(zVertexCut);\r |
598 | v0Reader->SetSigmaMass(sigmaCutGammaMass);\r |
599 | v0Reader->SetUseImprovedVertex(useImprovedVertex);\r |
a6f44de5 |
600 | v0Reader->SetDoMCTruth(doMCTruth);\r |
9fdb2372 |
601 | \r |
602 | // Create the GammaConversionTask\r |
603 | AliAnalysisTaskGammaConversion *gammaconversion = new AliAnalysisTaskGammaConversion("GammaConversionTask");\r |
604 | gammaconversion->SetDebugLevel(10);\r |
605 | \r |
606 | gammaconversion->SetV0Reader(v0Reader);\r |
607 | gammaconversion->SetCalculateBackground(calculateBackground);\r |
608 | gammaconversion->Init();\r |
609 | \r |
610 | gammaconversion->SetElectronMass(electronMass);\r |
611 | gammaconversion->SetGammaMass(gammaMass);\r |
612 | gammaconversion->SetPi0Mass(pi0Mass);\r |
613 | gammaconversion->SetEtaMass(etaMass);\r |
614 | \r |
615 | gammaconversion->SetGammaWidth(gammaWidth);\r |
616 | gammaconversion->SetPi0Width(pi0Width);\r |
617 | gammaconversion->SetEtaWidth(etaWidth);\r |
618 | \r |
619 | // define the width constraint used by KF particle.\r |
620 | Double_t gammaWidth = 0.01;\r |
621 | Double_t pi0Width = 0.01;\r |
622 | Double_t etaWidth = 0.01;\r |
623 | \r |
624 | gammaconversion->SetHistograms(histograms);\r |
625 | v0Reader->SetHistograms(histograms);// also give the pointer to the v0reader, for debugging cuts\r |
626 | \r |
627 | gammaconversion->SetDoMCTruth(doMCTruth);\r |
628 | \r |
629 | \r |
630 | // Add task to the manager \r |
631 | mgr->AddTask(gammaconversion);\r |
632 | \r |
633 | // Connect I/O to the task\r |
634 | mgr->ConnectInput (gammaconversion, 0, cinput1);\r |
635 | mgr->ConnectOutput(gammaconversion, 0, coutput1);\r |
636 | mgr->ConnectOutput(gammaconversion, 1, coutput2);\r |
637 | \r |
a6f44de5 |
638 | TChain* chain= CreateESDChain(sample,numberOfFilesToAnalyze);\r |
9fdb2372 |
639 | \r |
640 | mgr->InitAnalysis();\r |
641 | \r |
642 | mgr->PrintStatus();\r |
643 | \r |
644 | mgr->StartAnalysis("local",chain);\r |
645 | }\r |
646 | \r |
647 | \r |
648 | \r |
649 | \r |
650 | void build() {\r |
651 | TStopwatch timer;\r |
652 | timer.Start();\r |
653 | gSystem->Load("libTree.so");\r |
654 | gSystem->Load("libGeom");\r |
655 | // gSystem->Load("libANALYSISalice");\r |
656 | \r |
657 | ////\r |
658 | ////\r |
659 | //Setting up STEERBase.par//\r |
660 | ////\r |
661 | setupPar("STEERBase");\r |
662 | gSystem->Load("libSTEERBase.so");\r |
663 | \r |
664 | ////\r |
665 | //Setting up ESD.par//\r |
666 | ////\r |
667 | setupPar("ESD");\r |
668 | gSystem->Load("libVMC.so");\r |
669 | gSystem->Load("libESD.so");\r |
670 | \r |
671 | ////\r |
672 | //Setting up AOD.par//\r |
673 | ////\r |
674 | setupPar("AOD");\r |
675 | gSystem->Load("libAOD.so");\r |
676 | \r |
677 | ////\r |
678 | //Setting up ANALYSIS.par//\r |
679 | ////\r |
680 | setupPar("ANALYSIS");\r |
681 | gSystem->Load("libANALYSIS.so");\r |
682 | \r |
683 | ////\r |
684 | //Setting up ANALYSISalice.par//\r |
685 | ////\r |
686 | setupPar("ANALYSISalice");\r |
687 | gSystem->Load("libANALYSISalice.so");\r |
688 | \r |
689 | ////\r |
690 | //Setting up PWG4Gamma.par//\r |
691 | ////\r |
692 | // setupPar("PWG4Gamma");\r |
693 | // gSystem->Load("libPWG4Gamma.so");\r |
694 | setupPar("PWG4PartCorr");\r |
695 | gSystem->Load("libPWG4PartCorr.so");\r |
696 | //if head:: use PWG4PartCorr\r |
697 | \r |
698 | //gROOT->LoadMacro("AliAnalysisTaskPi0.cxx+");\r |
699 | // gROOT->LoadMacro("AliAnalysisTaskPtMC.cxx+");\r |
700 | // gROOT->LoadMacro("AliAnalysisTaskPi0MC.cxx+");\r |
701 | // gROOT->LoadMacro("AliAnaScale.cxx+");\r |
702 | \r |
703 | \r |
704 | //gROOT->LoadMacro("$ALICEROOT/PWG0/CreateESDChain.C");\r |
705 | //TChain* chain = CreateESDChain("files1.txt");\r |
706 | \r |
707 | \r |
708 | \r |
709 | ////\r |
710 | \r |
711 | \r |
712 | }\r |
713 | \r |
714 | Int_t setupPar(const char* pararchivename) {\r |
715 | ///////////////////\r |
716 | // Setup PAR File//\r |
717 | ///////////////////\r |
718 | if (pararchivename) {\r |
719 | char processline[1024];\r |
720 | sprintf(processline,".! tar xvzf %s.par",pararchivename);\r |
721 | gROOT->ProcessLine(processline);\r |
722 | const char* ocwd = gSystem->WorkingDirectory();\r |
723 | gSystem->ChangeDirectory(pararchivename);\r |
724 | \r |
725 | // check for BUILD.sh and execute\r |
726 | if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {\r |
727 | printf("*******************************\n");\r |
728 | printf("*** Building PAR archive ***\n");\r |
729 | printf("*******************************\n");\r |
730 | \r |
731 | if (gSystem->Exec("PROOF-INF/BUILD.sh")) {\r |
732 | Error("runAnalysis","Cannot Build the PAR Archive! - Abort!");\r |
733 | return -1;\r |
734 | }\r |
735 | }\r |
736 | // check for SETUP.C and execute\r |
737 | if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {\r |
738 | printf("*******************************\n");\r |
739 | printf("*** Setup PAR archive ***\n");\r |
740 | printf("*******************************\n");\r |
741 | gROOT->Macro("PROOF-INF/SETUP.C");\r |
742 | }\r |
743 | \r |
744 | gSystem->ChangeDirectory("../");\r |
745 | } \r |
746 | return 1;\r |
747 | }\r |