29 #include "THnSparse.h"
32 #include "AliAnalysisTask.h"
33 #include "AliAnalysisManager.h"
34 #include "AliESDEvent.h"
35 #include "AliESDInputHandler.h"
36 #include "AliMCEventHandler.h"
37 #include "AliMCEvent.h"
38 #include "AliMCParticle.h"
39 #include "AliCentrality.h"
40 #include "AliESDVZERO.h"
41 #include "AliESDpid.h"
43 #include "AliVParticle.h"
44 #include "AliESDtrack.h"
45 #include "AliESDtrackCuts.h"
46 #include "AliKFVertex.h"
48 #include "AliGenCocktailEventHeader.h"
49 #include "AliAODMCParticle.h"
50 #include "AliAODMCHeader.h"
51 #include "AliEventplane.h"
53 #include "AliAODEvent.h"
54 #include "AliAODInputHandler.h"
55 #include "AliESDEvent.h"
56 #include "AliESDInputHandler.h"
57 #include "AliInputEventHandler.h"
68 fV0ReaderName("V0ReaderV1"),
79 fClusterTreeList(NULL),
80 fOutputContainer(NULL),
81 fClusterCandidates(NULL),
84 fClusterCutArray(NULL),
85 fCaloPhotonCuts(NULL),
88 fHistoMotherInvMassPt(NULL),
89 fSparseMotherInvMassPtZM(NULL),
90 fHistoMotherBackInvMassPt(NULL),
91 fSparseMotherBackInvMassPtZM(NULL),
92 fHistoMotherInvMassPtAlpha(NULL),
93 fHistoMotherBackInvMassPtAlpha(NULL),
94 fHistoMotherPi0PtY(NULL),
95 fHistoMotherEtaPtY(NULL),
96 fHistoMotherPi0PtAlpha(NULL),
97 fHistoMotherEtaPtAlpha(NULL),
98 fHistoMotherPi0PtOpenAngle(NULL),
99 fHistoMotherEtaPtOpenAngle(NULL),
100 fHistoClusGammaPt(NULL),
101 fHistoClusGammaE(NULL),
102 fHistoClusOverlapHeadersGammaPt(NULL),
103 fHistoClusGammaPtM02(NULL),
104 fHistoMCHeaders(NULL),
105 fHistoMCAllGammaPt(NULL),
106 fHistoMCAllSecondaryGammaPt(NULL),
107 fHistoMCDecayGammaPi0Pt(NULL),
108 fHistoMCDecayGammaRhoPt(NULL),
109 fHistoMCDecayGammaEtaPt(NULL),
110 fHistoMCDecayGammaOmegaPt(NULL),
111 fHistoMCDecayGammaEtapPt(NULL),
112 fHistoMCDecayGammaPhiPt(NULL),
113 fHistoMCDecayGammaSigmaPt(NULL),
115 fHistoMCPi0WOWeightPt(NULL),
116 fHistoMCPi0WOEvtWeightPt(NULL),
118 fHistoMCEtaWOWeightPt(NULL),
119 fHistoMCEtaWOEvtWeightPt(NULL),
120 fHistoMCPi0InAccPt(NULL),
121 fHistoMCEtaInAccPt(NULL),
122 fHistoMCPi0WOEvtWeightInAccPt(NULL),
123 fHistoMCEtaWOEvtWeightInAccPt(NULL),
124 fHistoMCPi0PtY(NULL),
125 fHistoMCEtaPtY(NULL),
126 fHistoMCPi0PtAlpha(NULL),
127 fHistoMCEtaPtAlpha(NULL),
128 fHistoMCPrimaryPtvsSource(NULL),
129 fHistoMCSecPi0PtvsSource(NULL),
130 fHistoMCSecPi0Source(NULL),
131 fHistoMCSecPi0InAccPtvsSource(NULL),
132 fHistoMCSecEtaPt(NULL),
133 fHistoMCSecEtaSource(NULL),
134 fHistoMCPi0PtJetPt(NULL),
135 fHistoMCEtaPtJetPt(NULL),
136 fHistoTruePi0InvMassPt(NULL),
137 fHistoTrueEtaInvMassPt(NULL),
138 fHistoTruePi0CaloPhotonInvMassPt(NULL),
139 fHistoTrueEtaCaloPhotonInvMassPt(NULL),
140 fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
141 fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
142 fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt(NULL),
143 fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt(NULL),
144 fHistoTruePi0CaloElectronInvMassPt(NULL),
145 fHistoTrueEtaCaloElectronInvMassPt(NULL),
146 fHistoTruePi0CaloMergedClusterInvMassPt(NULL),
147 fHistoTrueEtaCaloMergedClusterInvMassPt(NULL),
148 fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL),
149 fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL),
150 fHistoTruePi0NonMergedElectronPhotonInvMassPt(NULL),
151 fHistoTruePi0NonMergedElectronMergedPhotonInvMassPt(NULL),
152 fHistoTruePi0Category1(NULL),
153 fHistoTrueEtaCategory1(NULL),
154 fHistoTruePi0Category2(NULL),
155 fHistoTrueEtaCategory2(NULL),
156 fHistoTruePi0Category3(NULL),
157 fHistoTrueEtaCategory3(NULL),
158 fHistoTruePi0Category4_6(NULL),
159 fHistoTrueEtaCategory4_6(NULL),
160 fHistoTruePi0Category5(NULL),
161 fHistoTrueEtaCategory5(NULL),
162 fHistoTruePi0Category7(NULL),
163 fHistoTrueEtaCategory7(NULL),
164 fHistoTruePi0Category8(NULL),
165 fHistoTrueEtaCategory8(NULL),
166 fHistoTruePrimaryPi0InvMassPt(NULL),
167 fHistoTruePrimaryEtaInvMassPt(NULL),
168 fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL),
169 fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL),
170 fProfileTruePrimaryPi0WeightsInvMassPt(NULL),
171 fProfileTruePrimaryEtaWeightsInvMassPt(NULL),
172 fHistoTruePrimaryPi0MCPtResolPt(NULL),
173 fHistoTruePrimaryEtaMCPtResolPt(NULL),
174 fHistoTrueSecondaryPi0InvMassPt(NULL),
175 fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
176 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
177 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
178 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
179 fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
180 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
181 fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL),
182 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
183 fHistoTrueBckGGInvMassPt(NULL),
184 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
185 fHistoTrueBckAsymEClustersInvMassPt(NULL),
186 fHistoTrueBckContInvMassPt(NULL),
187 fHistoTruePi0PtY(NULL),
188 fHistoTrueEtaPtY(NULL),
189 fHistoTruePi0PtAlpha(NULL),
190 fHistoTrueEtaPtAlpha(NULL),
191 fHistoTruePi0PtOpenAngle(NULL),
192 fHistoTrueEtaPtOpenAngle(NULL),
193 fHistoClusPhotonBGPt(NULL),
194 fHistoClusPhotonPlusConvBGPt(NULL),
195 fHistoClustPhotonElectronBGPtM02(NULL),
196 fHistoClustPhotonPionBGPtM02(NULL),
197 fHistoClustPhotonKaonBGPtM02(NULL),
198 fHistoClustPhotonK0lBGPtM02(NULL),
199 fHistoClustPhotonNeutronBGPtM02(NULL),
200 fHistoClustPhotonRestBGPtM02(NULL),
201 fHistoClustPhotonPlusConvElectronBGPtM02(NULL),
202 fHistoClustPhotonPlusConvPionBGPtM02(NULL),
203 fHistoClustPhotonPlusConvKaonBGPtM02(NULL),
204 fHistoClustPhotonPlusConvK0lBGPtM02(NULL),
205 fHistoClustPhotonPlusConvNeutronBGPtM02(NULL),
206 fHistoClustPhotonPlusConvRestBGPtM02(NULL),
207 fHistoTrueClusGammaPt(NULL),
208 fHistoTrueClusUnConvGammaPt(NULL),
209 fHistoTrueClusUnConvGammaMCPt(NULL),
210 fHistoTrueClusGammaPtM02(NULL),
211 fHistoTrueClusUnConvGammaPtM02(NULL),
212 fHistoTrueClusElectronPt(NULL),
213 fHistoTrueClusConvGammaPt(NULL),
214 fHistoTrueClusConvGammaMCPt(NULL),
215 fHistoTrueClusConvGammaFullyPt(NULL),
216 fHistoTrueClusMergedGammaPt(NULL),
217 fHistoTrueClusMergedPartConvGammaPt(NULL),
218 fHistoTrueClusDalitzPt(NULL),
219 fHistoTrueClusDalitzMergedPt(NULL),
220 fHistoTrueClusPhotonFromElecMotherPt(NULL),
221 fHistoTrueClusShowerPt(NULL),
222 fHistoTrueClusSubLeadingPt(NULL),
223 fHistoTrueClusNParticles(NULL),
224 fHistoTrueClusEMNonLeadingPt(NULL),
225 fHistoTrueNLabelsInClus(NULL),
226 fHistoTruePrimaryClusGammaPt(NULL),
227 fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
228 fHistoTruePrimaryClusConvGammaPt(NULL),
229 fHistoTruePrimaryClusConvGammaESDPtMCPt(NULL),
230 fHistoTrueSecondaryClusGammaPt(NULL),
231 fHistoTrueSecondaryClusConvGammaPt(NULL),
232 fHistoTrueSecondaryClusGammaMCPt(NULL),
233 fHistoTrueSecondaryClusConvGammaMCPt(NULL),
234 fHistoTrueSecondaryClusGammaFromXFromK0sMCPtESDPt(NULL),
235 fHistoTrueSecondaryClusConvGammaFromXFromK0sMCPtESDPt(NULL),
236 fHistoTrueSecondaryClusGammaFromXFromK0lMCPtESDPt(NULL),
237 fHistoTrueSecondaryClusConvGammaFromXFromK0lMCPtESDPt(NULL),
238 fHistoTrueSecondaryClusGammaFromXFromLambdaMCPtESDPt(NULL),
239 fHistoTrueSecondaryClusConvGammaFromXFromLambdaMCPtESDPt(NULL),
240 fHistoDoubleCountTruePi0InvMassPt(NULL),
241 fHistoDoubleCountTrueEtaInvMassPt(NULL),
242 fHistoDoubleCountTrueClusterGammaPt(NULL),
243 fVectorDoubleCountTruePi0s(0),
244 fVectorDoubleCountTrueEtas(0),
245 fVectorDoubleCountTrueClusterGammas(0),
246 fHistoMultipleCountTrueClusterGamma(NULL),
247 fMapMultipleCountTrueClusterGammas(),
248 fHistoTruePi0InvMassPtAlpha(NULL),
249 fHistoTruePi0PureGammaInvMassPtAlpha(NULL),
250 fHistCellIDvsClusterEnergy(NULL),
251 fHistCellIDvsClusterEnergyMax(NULL),
253 fHistoNEventsWOWeight(NULL),
254 fHistoNGoodESDTracks(NULL),
256 fHistoNGammaCandidates(NULL),
257 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
258 fHistoSPDClusterTrackletBackground(NULL),
259 fHistoNV0Tracks(NULL),
260 fProfileEtaShift(NULL),
261 fProfileJetJetXSection(NULL),
262 fHistoJetJetNTrials(NULL),
263 tTrueInvMassROpenABPtFlag(NULL),
270 tSigInvMassPtAlphaTheta(NULL),
271 tBckInvMassPtAlphaTheta(NULL),
272 fInvMassTreeInvMass(0),
274 fInvMassTreeAlpha(0),
275 fInvMassTreeTheta(0),
276 fInvMassTreeMixPool(0),
277 fInvMassTreeZVertex(0),
279 tClusterEOverP(NULL),
284 fClusterLeadCellID(0),
285 fClusterClassification(0),
293 fClusterIsoSumClusterEt(0),
294 fClusterIsoSumTrackEt(0),
297 fEventPlaneAngle(-100),
302 fDoLightOutput(kFALSE),
303 fDoMesonAnalysis(kTRUE),
306 fIsFromMBHeader(kTRUE),
307 fIsOverlappingWithOtherHeader(kFALSE),
310 fSetPlotHistsExtQA(kFALSE),
312 fDoInOutTimingCluster(kFALSE),
313 fMinTimingCluster(0),
314 fMaxTimingCluster(0),
315 fEnableSortForClusMC(kFALSE),
316 fProduceCellIDPlots(kFALSE),
317 fProduceTreeEOverP(kFALSE),
319 fFileNameBroken(NULL),
320 fCloseHighPtClusters(NULL),
330 fV0ReaderName(
"V0ReaderV1"),
341 fClusterTreeList(NULL),
343 fClusterCandidates(NULL),
344 fEventCutArray(NULL),
346 fClusterCutArray(NULL),
347 fCaloPhotonCuts(NULL),
348 fMesonCutArray(NULL),
350 fHistoMotherInvMassPt(NULL),
351 fSparseMotherInvMassPtZM(NULL),
352 fHistoMotherBackInvMassPt(NULL),
353 fSparseMotherBackInvMassPtZM(NULL),
354 fHistoMotherInvMassPtAlpha(NULL),
355 fHistoMotherBackInvMassPtAlpha(NULL),
356 fHistoMotherPi0PtY(NULL),
357 fHistoMotherEtaPtY(NULL),
358 fHistoMotherPi0PtAlpha(NULL),
359 fHistoMotherEtaPtAlpha(NULL),
360 fHistoMotherPi0PtOpenAngle(NULL),
361 fHistoMotherEtaPtOpenAngle(NULL),
362 fHistoClusGammaPt(NULL),
363 fHistoClusGammaE(NULL),
364 fHistoClusOverlapHeadersGammaPt(NULL),
365 fHistoClusGammaPtM02(NULL),
366 fHistoMCHeaders(NULL),
367 fHistoMCAllGammaPt(NULL),
368 fHistoMCAllSecondaryGammaPt(NULL),
369 fHistoMCDecayGammaPi0Pt(NULL),
370 fHistoMCDecayGammaRhoPt(NULL),
371 fHistoMCDecayGammaEtaPt(NULL),
372 fHistoMCDecayGammaOmegaPt(NULL),
373 fHistoMCDecayGammaEtapPt(NULL),
374 fHistoMCDecayGammaPhiPt(NULL),
375 fHistoMCDecayGammaSigmaPt(NULL),
377 fHistoMCPi0WOWeightPt(NULL),
378 fHistoMCPi0WOEvtWeightPt(NULL),
380 fHistoMCEtaWOWeightPt(NULL),
381 fHistoMCEtaWOEvtWeightPt(NULL),
382 fHistoMCPi0InAccPt(NULL),
383 fHistoMCEtaInAccPt(NULL),
384 fHistoMCPi0WOEvtWeightInAccPt(NULL),
385 fHistoMCEtaWOEvtWeightInAccPt(NULL),
386 fHistoMCPi0PtY(NULL),
387 fHistoMCEtaPtY(NULL),
388 fHistoMCPi0PtAlpha(NULL),
389 fHistoMCEtaPtAlpha(NULL),
390 fHistoMCPrimaryPtvsSource(NULL),
391 fHistoMCSecPi0PtvsSource(NULL),
392 fHistoMCSecPi0Source(NULL),
393 fHistoMCSecPi0InAccPtvsSource(NULL),
394 fHistoMCSecEtaPt(NULL),
395 fHistoMCSecEtaSource(NULL),
396 fHistoMCPi0PtJetPt(NULL),
397 fHistoMCEtaPtJetPt(NULL),
398 fHistoTruePi0InvMassPt(NULL),
399 fHistoTrueEtaInvMassPt(NULL),
400 fHistoTruePi0CaloPhotonInvMassPt(NULL),
401 fHistoTrueEtaCaloPhotonInvMassPt(NULL),
402 fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
403 fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
404 fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt(NULL),
405 fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt(NULL),
406 fHistoTruePi0CaloElectronInvMassPt(NULL),
407 fHistoTrueEtaCaloElectronInvMassPt(NULL),
408 fHistoTruePi0CaloMergedClusterInvMassPt(NULL),
409 fHistoTrueEtaCaloMergedClusterInvMassPt(NULL),
410 fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL),
411 fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL),
412 fHistoTruePi0NonMergedElectronPhotonInvMassPt(NULL),
413 fHistoTruePi0NonMergedElectronMergedPhotonInvMassPt(NULL),
414 fHistoTruePi0Category1(NULL),
415 fHistoTrueEtaCategory1(NULL),
416 fHistoTruePi0Category2(NULL),
417 fHistoTrueEtaCategory2(NULL),
418 fHistoTruePi0Category3(NULL),
419 fHistoTrueEtaCategory3(NULL),
420 fHistoTruePi0Category4_6(NULL),
421 fHistoTrueEtaCategory4_6(NULL),
422 fHistoTruePi0Category5(NULL),
423 fHistoTrueEtaCategory5(NULL),
424 fHistoTruePi0Category7(NULL),
425 fHistoTrueEtaCategory7(NULL),
426 fHistoTruePi0Category8(NULL),
427 fHistoTrueEtaCategory8(NULL),
428 fHistoTruePrimaryPi0InvMassPt(NULL),
429 fHistoTruePrimaryEtaInvMassPt(NULL),
430 fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL),
431 fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL),
432 fProfileTruePrimaryPi0WeightsInvMassPt(NULL),
433 fProfileTruePrimaryEtaWeightsInvMassPt(NULL),
434 fHistoTruePrimaryPi0MCPtResolPt(NULL),
435 fHistoTruePrimaryEtaMCPtResolPt(NULL),
436 fHistoTrueSecondaryPi0InvMassPt(NULL),
437 fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
438 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
439 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
440 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
441 fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
442 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
443 fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL),
444 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
445 fHistoTrueBckGGInvMassPt(NULL),
446 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
447 fHistoTrueBckAsymEClustersInvMassPt(NULL),
448 fHistoTrueBckContInvMassPt(NULL),
449 fHistoTruePi0PtY(NULL),
450 fHistoTrueEtaPtY(NULL),
451 fHistoTruePi0PtAlpha(NULL),
452 fHistoTrueEtaPtAlpha(NULL),
453 fHistoTruePi0PtOpenAngle(NULL),
454 fHistoTrueEtaPtOpenAngle(NULL),
455 fHistoClusPhotonBGPt(NULL),
456 fHistoClusPhotonPlusConvBGPt(NULL),
457 fHistoClustPhotonElectronBGPtM02(NULL),
458 fHistoClustPhotonPionBGPtM02(NULL),
459 fHistoClustPhotonKaonBGPtM02(NULL),
460 fHistoClustPhotonK0lBGPtM02(NULL),
461 fHistoClustPhotonNeutronBGPtM02(NULL),
462 fHistoClustPhotonRestBGPtM02(NULL),
463 fHistoClustPhotonPlusConvElectronBGPtM02(NULL),
464 fHistoClustPhotonPlusConvPionBGPtM02(NULL),
465 fHistoClustPhotonPlusConvKaonBGPtM02(NULL),
466 fHistoClustPhotonPlusConvK0lBGPtM02(NULL),
467 fHistoClustPhotonPlusConvNeutronBGPtM02(NULL),
468 fHistoClustPhotonPlusConvRestBGPtM02(NULL),
469 fHistoTrueClusGammaPt(NULL),
470 fHistoTrueClusUnConvGammaPt(NULL),
471 fHistoTrueClusUnConvGammaMCPt(NULL),
472 fHistoTrueClusGammaPtM02(NULL),
473 fHistoTrueClusUnConvGammaPtM02(NULL),
474 fHistoTrueClusElectronPt(NULL),
475 fHistoTrueClusConvGammaPt(NULL),
476 fHistoTrueClusConvGammaMCPt(NULL),
477 fHistoTrueClusConvGammaFullyPt(NULL),
478 fHistoTrueClusMergedGammaPt(NULL),
479 fHistoTrueClusMergedPartConvGammaPt(NULL),
480 fHistoTrueClusDalitzPt(NULL),
481 fHistoTrueClusDalitzMergedPt(NULL),
482 fHistoTrueClusPhotonFromElecMotherPt(NULL),
483 fHistoTrueClusShowerPt(NULL),
484 fHistoTrueClusSubLeadingPt(NULL),
485 fHistoTrueClusNParticles(NULL),
486 fHistoTrueClusEMNonLeadingPt(NULL),
487 fHistoTrueNLabelsInClus(NULL),
488 fHistoTruePrimaryClusGammaPt(NULL),
489 fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
490 fHistoTruePrimaryClusConvGammaPt(NULL),
491 fHistoTruePrimaryClusConvGammaESDPtMCPt(NULL),
492 fHistoTrueSecondaryClusGammaPt(NULL),
493 fHistoTrueSecondaryClusConvGammaPt(NULL),
494 fHistoTrueSecondaryClusGammaMCPt(NULL),
495 fHistoTrueSecondaryClusConvGammaMCPt(NULL),
496 fHistoTrueSecondaryClusGammaFromXFromK0sMCPtESDPt(NULL),
497 fHistoTrueSecondaryClusConvGammaFromXFromK0sMCPtESDPt(NULL),
498 fHistoTrueSecondaryClusGammaFromXFromK0lMCPtESDPt(NULL),
499 fHistoTrueSecondaryClusConvGammaFromXFromK0lMCPtESDPt(NULL),
500 fHistoTrueSecondaryClusGammaFromXFromLambdaMCPtESDPt(NULL),
501 fHistoTrueSecondaryClusConvGammaFromXFromLambdaMCPtESDPt(NULL),
502 fHistoDoubleCountTruePi0InvMassPt(NULL),
503 fHistoDoubleCountTrueEtaInvMassPt(NULL),
504 fHistoDoubleCountTrueClusterGammaPt(NULL),
505 fVectorDoubleCountTruePi0s(0),
506 fVectorDoubleCountTrueEtas(0),
507 fVectorDoubleCountTrueClusterGammas(0),
508 fHistoMultipleCountTrueClusterGamma(NULL),
509 fMapMultipleCountTrueClusterGammas(),
510 fHistoTruePi0InvMassPtAlpha(NULL),
511 fHistoTruePi0PureGammaInvMassPtAlpha(NULL),
512 fHistCellIDvsClusterEnergy(NULL),
513 fHistCellIDvsClusterEnergyMax(NULL),
515 fHistoNEventsWOWeight(NULL),
516 fHistoNGoodESDTracks(NULL),
518 fHistoNGammaCandidates(NULL),
519 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
520 fHistoSPDClusterTrackletBackground(NULL),
521 fHistoNV0Tracks(NULL),
522 fProfileEtaShift(NULL),
523 fProfileJetJetXSection(NULL),
524 fHistoJetJetNTrials(NULL),
525 tTrueInvMassROpenABPtFlag(NULL),
532 tSigInvMassPtAlphaTheta(NULL),
533 tBckInvMassPtAlphaTheta(NULL),
534 fInvMassTreeInvMass(0),
536 fInvMassTreeAlpha(0),
537 fInvMassTreeTheta(0),
538 fInvMassTreeMixPool(0),
539 fInvMassTreeZVertex(0),
541 tClusterEOverP(NULL),
546 fClusterLeadCellID(0),
547 fClusterClassification(0),
555 fClusterIsoSumClusterEt(0),
556 fClusterIsoSumTrackEt(0),
559 fEventPlaneAngle(-100),
564 fDoLightOutput(kFALSE),
565 fDoMesonAnalysis(kTRUE),
568 fIsFromMBHeader(kTRUE),
569 fIsOverlappingWithOtherHeader(kFALSE),
572 fSetPlotHistsExtQA(kFALSE),
574 fDoInOutTimingCluster(kFALSE),
575 fMinTimingCluster(0),
576 fMaxTimingCluster(0),
577 fEnableSortForClusMC(kFALSE),
578 fProduceCellIDPlots(kFALSE),
579 fProduceTreeEOverP(kFALSE),
581 fFileNameBroken(NULL),
582 fCloseHighPtClusters(NULL),
586 DefineOutput(1, TList::Class());
603 const Int_t nDim = 4;
604 Int_t nBins[nDim] = {800,350,7,6};
626 if(collisionSystem == 1 || collisionSystem == 2 ||
627 collisionSystem == 5 || collisionSystem == 8 ||
628 collisionSystem == 9){
629 centMin = centMin*10;
630 centMax = centMax*10;
631 if(centMax ==0 && centMax!=centMin) centMax=100;
632 }
else if(collisionSystem == 3 || collisionSystem == 6){
635 }
else if(collisionSystem == 4 || collisionSystem == 7){
636 centMin = ((centMin*5)+45);
637 centMax = ((centMax*5)+45);
642 fBackList[iCut]->SetName(Form(
"%s_%s_%s Back histograms",cutstringEvent.Data(),cutstringCalo.Data(), cutstringMeson.Data()));
650 fMotherList[iCut]->SetName(Form(
"%s_%s_%s Mother histograms",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
654 fSparseMotherInvMassPtZM[iCut] =
new THnSparseF(
"Back_Mother_InvMass_Pt_z_m",
"Back_Mother_InvMass_Pt_z_m",nDim,nBins,xMin,xMax);
660 collisionSystem,centMin,centMax,
672 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
677 }
else if (
fIsMC == 3){
685 Int_t nBinsQAPt = 200;
688 Int_t nBinsClusterPt = 500;
698 nBinsClusterPt = 800;
711 nBinsClusterPt = 1000;
797 TString cutstringMeson =
"NoMesonCut";
802 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s_%s",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
806 fESDList[iCut]->SetName(Form(
"%s_%s_%s ESD histograms",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
810 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents",14,-0.5,13.5);
812 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
813 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
815 TString TriggerNames =
"Not Trigger: ";
817 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
822 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
823 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,
"SPD Pile-Up");
826 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problems");
827 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
828 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
829 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
830 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
839 TString TriggerNames =
"Not Trigger: ";
873 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ",1000,-50,50);
897 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",30000,0,30000);
899 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",2500,0,2500);
901 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",1500,0,1500);
923 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
925 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E",nBinsClusterPt, minClusterPt, maxClusterPt);
927 fHistoClusOverlapHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaOverlapHeaders_Pt",
"ClusGammaOverlapHeaders_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
930 fHistoClusGammaPtM02[iCut] =
new TH2F(
"ClusGamma_Pt_M02",
"ClusGamma_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
963 fHistoMotherPi0PtY[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Y",
"ESD_MotherPi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
966 fHistoMotherEtaPtY[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Y",
"ESD_MotherEta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
969 fHistoMotherPi0PtAlpha[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Alpha",
"ESD_MotherPi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
972 fHistoMotherEtaPtAlpha[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Alpha",
"ESD_MotherEta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
993 Int_t nMaxCells = 12*48*24;
1005 fTreeList[iCut]->SetName(Form(
"%s_%s_%s InvMass Tree",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1032 fClusterTreeList[iCut]->SetName(Form(
"%s_%s EoverP Tree",cutstringEvent.Data(),cutstringCalo.Data()));
1036 tClusterEOverP[iCut] =
new TTree(
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt",
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt");
1252 TString cutstringMeson =
"NoMesonCut";
1257 fMCList[iCut]->SetName(Form(
"%s_%s_%s MC histograms",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1258 fMCList[iCut]->SetOwner(kTRUE);
1264 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1266 fHistoMCAllSecondaryGammaPt[iCut] =
new TH2F(
"MC_AllSecondaryGamma_Pt",
"MC_AllSecondaryGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt, 5, -0.5, 4.5);
1273 fHistoMCDecayGammaPi0Pt[iCut] =
new TH1F(
"MC_DecayGammaPi0_Pt",
"MC_DecayGammaPi0_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1275 fHistoMCDecayGammaRhoPt[iCut] =
new TH1F(
"MC_DecayGammaRho_Pt",
"MC_DecayGammaRho_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1277 fHistoMCDecayGammaEtaPt[iCut] =
new TH1F(
"MC_DecayGammaEta_Pt",
"MC_DecayGammaEta_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1279 fHistoMCDecayGammaOmegaPt[iCut] =
new TH1F(
"MC_DecayGammaOmega_Pt",
"MC_DecayGammaOmmega_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1281 fHistoMCDecayGammaEtapPt[iCut] =
new TH1F(
"MC_DecayGammaEtap_Pt",
"MC_DecayGammaEtap_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1283 fHistoMCDecayGammaPhiPt[iCut] =
new TH1F(
"MC_DecayGammaPhi_Pt",
"MC_DecayGammaPhi_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1285 fHistoMCDecayGammaSigmaPt[iCut] =
new TH1F(
"MC_DecayGammaSigma_Pt",
"MC_DecayGammaSigma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1302 fHistoMCPi0Pt[iCut] =
new TH1F(
"MC_Pi0_Pt",
"MC_Pi0_Pt",nBinsPt, minPt, maxPt);
1305 fHistoMCPi0WOWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOWeights_Pt",
"MC_Pi0_WOWeights_Pt",nBinsPt, minPt, maxPt);
1309 fHistoMCEtaPt[iCut] =
new TH1F(
"MC_Eta_Pt",
"MC_Eta_Pt",nBinsPt, minPt, maxPt);
1312 fHistoMCEtaWOWeightPt[iCut] =
new TH1F(
"MC_Eta_WOWeights_Pt",
"MC_Eta_WOWeights_Pt",nBinsPt, minPt, maxPt);
1315 fHistoMCPi0InAccPt[iCut] =
new TH1F(
"MC_Pi0InAcc_Pt",
"MC_Pi0InAcc_Pt",nBinsPt, minPt, maxPt);
1318 fHistoMCEtaInAccPt[iCut] =
new TH1F(
"MC_EtaInAcc_Pt",
"MC_EtaInAcc_Pt",nBinsPt, minPt, maxPt);
1324 fHistoMCPi0WOEvtWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOEventWeights_Pt",
"MC_Pi0_WOEventWeights_Pt",nBinsPt, minPt, maxPt);
1326 fHistoMCEtaWOEvtWeightPt[iCut] =
new TH1F(
"MC_Eta_WOEventWeights_Pt",
"MC_Eta_WOEventWeights_Pt",nBinsPt, minPt, maxPt);
1333 fHistoMCPi0PtJetPt[iCut] =
new TH2F(
"MC_Pi0_Pt_JetPt",
"MC_Pi0_Pt_JetPt",nBinsQAPt, minQAPt, maxQAPt,200,0,200);
1337 fHistoMCEtaPtJetPt[iCut] =
new TH2F(
"MC_Eta_Pt_JetPt",
"MC_Eta_Pt_JetPt",nBinsQAPt, minQAPt, maxQAPt,200,0,200);
1362 fHistoMCSecEtaPt[iCut] =
new TH1F(
"MC_SecEta_Pt",
"MC_SecEta_Pt",nBinsPt, minPt, maxPt);
1373 fHistoMCPi0PtY[iCut] =
new TH2F(
"MC_Pi0_Pt_Y",
"MC_Pi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1377 fHistoMCEtaPtY[iCut] =
new TH2F(
"MC_Eta_Pt_Y",
"MC_Eta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1381 fHistoMCPi0PtAlpha[iCut] =
new TH2F(
"MC_Pi0_Pt_Alpha",
"MC_Pi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
1384 fHistoMCEtaPtAlpha[iCut] =
new TH2F(
"MC_Eta_Pt_Alpha",
"MC_Eta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
1397 fTrueList[iCut]->SetName(Form(
"%s_%s_%s True histograms",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1402 fHistoClusPhotonBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonBG_Pt",
"ESD_TrueClusPhotonBG_Pt",nBinsClusterPt, minClusterPt, maxClusterPt,10,-0.5,9.5);
1414 fHistoClusPhotonPlusConvBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonPlusConvBG_Pt",
"ESD_TrueClusPhotonPlusConvBG_Pt",nBinsClusterPt, minClusterPt, maxClusterPt,10,-0.5,9.5);
1428 fHistoClustPhotonElectronBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonElectronBG_Pt_M02",
"ESD_TrueClusPhotonElectronBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1430 fHistoClustPhotonPionBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonPionBG_Pt_M02",
"ESD_TrueClusPhotonPionBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1432 fHistoClustPhotonKaonBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonKaonBG_Pt_M02",
"ESD_TrueClusPhotonKaonBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1434 fHistoClustPhotonK0lBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonK0lBG_Pt_M02",
"ESD_TrueClusPhotonK0lBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1436 fHistoClustPhotonNeutronBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonNeutronBG_Pt_M02",
"ESD_TrueClusPhotonNeutronBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1438 fHistoClustPhotonRestBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonRestBG_Pt_M02",
"ESD_TrueClusPhotonRestBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1455 fHistoTrueClusGammaPt[iCut] =
new TH1F(
"TrueClusGamma_Pt",
"ESD_TrueClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1459 fHistoTrueClusGammaPtM02[iCut] =
new TH2F(
"TrueClusGamma_Pt_M02",
"TrueClusGamma_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1462 fHistoTruePrimaryClusGammaPt[iCut] =
new TH1F(
"TruePrimaryClusGamma_Pt",
"ESD_TruePrimaryClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1464 fHistoTruePrimaryClusGammaESDPtMCPt[iCut] =
new TH2F(
"TruePrimaryClusGamma_Pt_MCPt",
"ESD_TruePrimaryClusGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt,nBinsClusterPt, minClusterPt, maxClusterPt);
1466 fHistoTruePrimaryClusConvGammaPt[iCut] =
new TH1F(
"TruePrimaryClusConvGamma_Pt",
"ESD_TruePrimaryClusConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1468 fHistoTruePrimaryClusConvGammaESDPtMCPt[iCut] =
new TH2F(
"TruePrimaryClusConvGamma_Pt_MCPt",
"ESD_TruePrimaryClusConvGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt,nBinsClusterPt, minClusterPt, maxClusterPt);
1470 fHistoTrueSecondaryClusGammaPt[iCut] =
new TH2F(
"ESD_TrueSecondaryClusGamma_Pt",
"ESD_TrueSecondaryClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt, 5, -0.5, 4.5);
1484 fHistoTrueSecondaryClusGammaMCPt[iCut] =
new TH2F(
"ESD_TrueSecondaryClusGamma_MCPt",
"ESD_TrueSecondaryClusGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt, 5, -0.5, 4.5);
1551 fHistoTrueClusUnConvGammaPt[iCut] =
new TH1F(
"TrueClusUnConvGamma_Pt",
"TrueClusUnConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1553 fHistoTrueClusUnConvGammaMCPt[iCut] =
new TH1F(
"TrueClusUnConvGamma_MCPt",
"TrueClusUnConvGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt);
1559 fHistoTrueClusElectronPt[iCut] =
new TH1F(
"TrueClusElectron_Pt",
"TrueElectronGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1561 fHistoTrueClusConvGammaPt[iCut] =
new TH1F(
"TrueClusConvGamma_Pt",
"TrueClusConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1563 fHistoTrueClusConvGammaMCPt[iCut] =
new TH1F(
"TrueClusConvGamma_MCPt",
"TrueClusConvGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt);
1565 fHistoTrueClusConvGammaFullyPt[iCut] =
new TH1F(
"TrueClusConvGammaFullyContained_Pt",
"TrueClusConvGammaFullyContained_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1567 fHistoTrueClusMergedGammaPt[iCut] =
new TH1F(
"TrueClusMergedGamma_Pt",
"TrueClusMergedGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1571 fHistoTrueClusDalitzPt[iCut] =
new TH1F(
"TrueClusDalitz_Pt",
"TrueClusDalitz_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1573 fHistoTrueClusDalitzMergedPt[iCut] =
new TH1F(
"TrueClusDalitzMerged_Pt",
"TrueClusDalitzMerged_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1577 fHistoTrueClusShowerPt[iCut] =
new TH1F(
"TrueClusShower_Pt",
"TrueClusShower_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1579 fHistoTrueClusSubLeadingPt[iCut] =
new TH1F(
"TrueClusSubleading_Pt",
"TrueClusSubleading_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1583 fHistoTrueClusEMNonLeadingPt[iCut] =
new TH1F(
"TrueClusEMNonLeading_Pt",
"TrueClusEMNonLeading_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1731 fHistoTruePi0PtY[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Y",
"ESD_TruePi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1734 fHistoTrueEtaPtY[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Y",
"ESD_TrueEta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1737 fHistoTruePi0PtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Alpha",
"ESD_TruePi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
1740 fHistoTrueEtaPtAlpha[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Alpha",
"ESD_TrueEta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
1744 fHistoTruePi0PtOpenAngle[iCut] =
new TH2F(
"ESD_TruePi0_Pt_OpenAngle",
"ESD_TruePi0_Pt_OpenAngle",nBinsQAPt, minQAPt, maxQAPt,100,0,0.5);
1747 fHistoTrueEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_TrueEta_Pt_OpenAngle",
"ESD_TrueEta_Pt_OpenAngle",nBinsQAPt, minQAPt, maxQAPt,180,0,1.8);
1776 fHistoTruePi0Category1[iCut] =
new TH2F(
"ESD_TruePi0Category1_InvMass_Pt",
"ESD_TruePi0Category1_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1778 fHistoTrueEtaCategory1[iCut] =
new TH2F(
"ESD_TrueEtaCategory1_InvMass_Pt",
"ESD_TrueEtaCategory1_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1780 fHistoTruePi0Category2[iCut] =
new TH2F(
"ESD_TruePi0Category2_InvMass_Pt",
"ESD_TruePi0Category2_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1782 fHistoTrueEtaCategory2[iCut] =
new TH2F(
"ESD_TrueEtaCategory2_InvMass_Pt",
"ESD_TrueEtaCategory2_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1784 fHistoTruePi0Category3[iCut] =
new TH2F(
"ESD_TruePi0Category3_InvMass_Pt",
"ESD_TruePi0Category3_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1786 fHistoTrueEtaCategory3[iCut] =
new TH2F(
"ESD_TrueEtaCategory3_InvMass_Pt",
"ESD_TrueEtaCategory3_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1788 fHistoTruePi0Category4_6[iCut] =
new TH2F(
"ESD_TruePi0Category4_6_InvMass_Pt",
"ESD_TruePi0Category4_6_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1790 fHistoTrueEtaCategory4_6[iCut] =
new TH2F(
"ESD_TrueEtaCategory4_6_InvMass_Pt",
"ESD_TrueEtaCategory4_6_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1792 fHistoTruePi0Category5[iCut] =
new TH2F(
"ESD_TruePi0Category5_InvMass_Pt",
"ESD_TruePi0Category5_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1794 fHistoTrueEtaCategory5[iCut] =
new TH2F(
"ESD_TrueEtaCategory5_InvMass_Pt",
"ESD_TrueEtaCategory5_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1796 fHistoTruePi0Category7[iCut] =
new TH2F(
"ESD_TruePi0Category7_InvMass_Pt",
"ESD_TruePi0Category7_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1798 fHistoTrueEtaCategory7[iCut] =
new TH2F(
"ESD_TrueEtaCategory7_InvMass_Pt",
"ESD_TrueEtaCategory7_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1800 fHistoTruePi0Category8[iCut] =
new TH2F(
"ESD_TruePi0Category8_InvMass_Pt",
"ESD_TruePi0Category8_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1802 fHistoTrueEtaCategory8[iCut] =
new TH2F(
"ESD_TrueEtaCategory8_InvMass_Pt",
"ESD_TrueEtaCategory8_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1808 fTreeList[iCut]->SetName(Form(
"%s_%s_%s True ClusterComb tree",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1841 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
1877 fstream fOutputLocalDebug;
1878 fOutputLocalDebug.open(
"debugOutput.txt",ios::out);
1879 fOutputLocalDebug.close();
1905 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
1926 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
1927 if(eventQuality == 2 || eventQuality == 3){
1948 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
1956 Bool_t isRunningEMCALrelAna = kFALSE;
1965 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
1985 Bool_t triggered = kTRUE;
1986 if(eventNotAccepted){
1990 if (eventNotAccepted==3 &&
fIsMC>0){
1997 if(eventQuality != 0){
2003 if (triggered == kTRUE) {
2023 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2033 if (nameBin.CompareTo(
"")== 0){
2035 ->GetAcceptedHeader())->At(i))->GetString();
2036 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
2050 if (triggered==kFALSE)
continue;
2092 if(nclus == 0)
return;
2102 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
2105 Int_t maxClusterID = -1;
2106 map<Long_t,Int_t> mapIsClusterAccepted;
2107 map<Long_t,Int_t> mapIsClusterAcceptedWithoutTrackMatch;
2109 for(Long_t i = 0; i < nclus; i++){
2111 AliVCluster* clus = NULL;
2112 if(
fInputEvent->IsA()==AliESDEvent::Class()) clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2113 else if(
fInputEvent->IsA()==AliAODEvent::Class()) clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2122 TLorentzVector clusterVector;
2123 clus->GetMomentum(clusterVector,vertex);
2125 TLorentzVector* tmpvec =
new TLorentzVector();
2126 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
2130 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
2134 maxClusterEnergy = clus->E();
2135 maxClusterID = (
Int_t) i;
2138 mapIsClusterAccepted[i] = 1;
2139 mapIsClusterAcceptedWithoutTrackMatch[i] = 1;
2148 Int_t* mclabelsCluster = clus->GetLabels();
2151 if (clus->GetNLabels()>0){
2152 for (
Int_t k =0; k< (
Int_t)clus->GetNLabels(); k++){
2165 if (clus->GetNLabels()>1){
2166 Int_t* mclabelsCluster = clus->GetLabels();
2167 for (
Int_t l = 1; l < (
Int_t)clus->GetNLabels(); l++ ){
2189 delete PhotonCandidate;
2197 for(Long_t i = 0; i < nclus; i++){
2198 if( mapIsClusterAccepted[i] != 1 )
continue;
2200 AliVCluster* clus = NULL;
2201 if(
fInputEvent->IsA()==AliESDEvent::Class()) clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2202 else if(
fInputEvent->IsA()==AliAODEvent::Class()) clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2220 AliError(
"Task needs AOD or ESD event...");
2224 AliESDtrackCuts *EsdTrackCuts = 0x0;
2229 if( (runNumber<=146860) || (runNumber>=197470 && runNumber<=197692) || (runNumber>=172440 && runNumber<=193766) ){
2230 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010();
2232 }
else if (runNumber>=209122){
2233 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2015PbPb();
2236 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011();
2238 EsdTrackCuts->SetMaxDCAToVertexZ(2);
2239 EsdTrackCuts->SetEtaRange(-0.8, 0.8);
2240 EsdTrackCuts->SetPtRange(0.15);
2243 for(Long_t i = 0; i < nclus; i++){
2244 if( mapIsClusterAcceptedWithoutTrackMatch[i] != 1 )
continue;
2246 AliVCluster* clus = NULL;
2247 if(
fInputEvent->IsA()==AliESDEvent::Class()) clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2248 else if(
fInputEvent->IsA()==AliAODEvent::Class()) clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2256 Int_t labelTrackMatch = -1;
2262 AliVTrack* currTrack =
dynamic_cast<AliVTrack*
>(
fInputEvent->GetTrack(labelTrackMatch));
2268 AliESDtrack *esdt =
dynamic_cast<AliESDtrack*
>(currTrack);
2269 if(!EsdTrackCuts->AcceptTrack(esdt)){
2280 AliAODTrack *aodt =
dynamic_cast<AliAODTrack*
>(currTrack);
2281 if(!aodt->IsHybridGlobalConstrainedGlobal()){
2285 if(TMath::Abs(aodt->Eta())>0.8){
2303 Float_t temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kElectron));
2308 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kPion));
2313 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kKaon));
2318 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,
AliPID::kProton));
2330 Float_t clsPos[3] = {0.,0.,0.};
2331 Float_t secondClsPos[3] = {0.,0.,0.};
2332 TLorentzVector clusterVector;
2334 clus->GetPosition(clsPos);
2335 TVector3 clsPosVec(clsPos);
2338 for(
Int_t j=0; j<nclus; j++){
2339 if( i == j )
continue;
2340 if( mapIsClusterAcceptedWithoutTrackMatch[j] != 1 )
continue;
2342 AliVCluster* secondClus = NULL;
2343 if(
fInputEvent->IsA()==AliESDEvent::Class()) secondClus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(j));
2344 else if(
fInputEvent->IsA()==AliAODEvent::Class()) secondClus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(j));
2345 if(!secondClus)
continue;
2346 secondClus->GetPosition(secondClsPos);
2347 TVector3 secondClsPosVec(secondClsPos);
2349 Float_t dPhi = clsPosVec.DeltaPhi(secondClsPosVec);
2350 Float_t dEta = clsPosVec.Eta()-secondClsPosVec.Eta();
2351 if(TMath::Sqrt(dEta*dEta + dPhi*dPhi) < 0.2){
2352 secondClus->GetMomentum(clusterVector,vertex);
2353 sum_Et += clusterVector.Et();
2362 TLorentzVector vecTrack;
2363 vecTrack.SetPxPyPzE(currTrack->Px(),currTrack->Py(),currTrack->Pz(),currTrack->E());
2372 mapIsClusterAcceptedWithoutTrackMatch.clear();
2385 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2386 Double_t mcProdVtxX = primVtxMC->GetX();
2387 Double_t mcProdVtxY = primVtxMC->GetY();
2388 Double_t mcProdVtxZ = primVtxMC->GetZ();
2390 TParticle *Photon = NULL;
2391 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2403 Int_t pdgCodeParticle = Photon->GetPdgCode();
2422 if(Photon->GetMother(0) > -1){
2423 TParticle* motherPart = (TParticle*)
fMCEvent->Particle(Photon->GetMother(0));
2433 if (TruePhotonCandidate->
IsDalitz())
2439 if (TruePhotonCandidate->
IsShower())
2452 Int_t motherLab = Photon->GetMother(0);
2453 if (motherLab > -1){
2460 Int_t grandMotherLab =
fMCEvent->Particle(motherLab)->GetMother(0);
2461 if (grandMotherLab > -1){
2490 Int_t secondaryClass = -1;
2498 if (secondaryClass == 2) {
2502 }
else if (secondaryClass == 5) {
2506 }
else if (secondaryClass == 3) {
2510 }
else if (secondaryClass == 4) {
2519 if (secondaryClass == 2) {
2523 }
else if (secondaryClass == 5) {
2527 }
else if (secondaryClass == 3) {
2531 }
else if (secondaryClass == 4) {
2549 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2550 Double_t mcProdVtxX = primVtxMC->GetX();
2551 Double_t mcProdVtxY = primVtxMC->GetY();
2552 Double_t mcProdVtxZ = primVtxMC->GetZ();
2554 AliAODMCParticle *Photon = NULL;
2555 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2557 if (AODMCTrackArray){
2558 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2562 AliInfo(
"AODMCTrackArray could not be loaded");
2570 Int_t pdgCodeParticle = Photon->GetPdgCode();
2589 AliAODMCParticle *motherPart = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
2598 if (TruePhotonCandidate->
IsDalitz())
2604 if (TruePhotonCandidate->
IsShower())
2618 Int_t motherLab = Photon->GetMother();
2619 if (motherLab > -1){
2626 Int_t grandMotherLab = ((AliAODMCParticle*) AODMCTrackArray->At(motherLab))->GetMother();
2627 if (grandMotherLab > -1){
2641 if (Photon->GetMother()> -1){
2642 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
2658 Int_t secondaryClass = -1;
2666 if (secondaryClass == 2) {
2670 }
else if (secondaryClass == 5) {
2674 }
else if (secondaryClass == 3) {
2678 }
else if (secondaryClass == 4) {
2687 if (secondaryClass == 2) {
2691 }
else if (secondaryClass == 5) {
2695 }
else if (secondaryClass == 3) {
2699 }
else if (secondaryClass == 4) {
2715 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2716 Double_t mcProdVtxX = primVtxMC->GetX();
2717 Double_t mcProdVtxY = primVtxMC->GetY();
2718 Double_t mcProdVtxZ = primVtxMC->GetZ();
2720 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2721 if (AODMCTrackArray == NULL)
return;
2724 for(Long_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
2726 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
2727 if (!particle)
continue;
2732 Int_t isMCFromMBHeader = -1;
2741 if(particle->GetMother() >-1){
2742 switch((static_cast<AliAODMCParticle*>(AODMCTrackArray->At(particle->GetMother())))->GetPdgCode()){
2772 if (particle->E() != TMath::Abs(particle->Pz())){
2773 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
2775 if( !(ratio <= 0) ){
2780 if ( particle->GetPdgCode() == 211 ){
2782 }
else if ( particle->GetPdgCode() == -211 ){
2784 }
else if ( particle->GetPdgCode() == 321 ){
2786 }
else if ( particle->GetPdgCode() == -321 ){
2788 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
2790 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
2792 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
2799 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
2800 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
2803 if (particle->Pt()>0.005){
2810 if (particle->E() != TMath::Abs(particle->Pz())){
2811 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
2813 if( !(ratio <= 0) ){
2817 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
2818 alpha = TMath::Abs((daughter0->E() - daughter1->E()))/(daughter0->E() + daughter1->E());
2821 if(particle->GetPdgCode() == 111){
2830 }
else if(particle->GetPdgCode() == 221){
2845 if(particle->GetPdgCode() == 111){
2848 }
else if(particle->GetPdgCode() == 221){
2857 Int_t isMCFromMBHeader = -1;
2865 if(particle->GetMother() >-1){
2866 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
2867 if(tmpMother->GetMother() >-1){
2868 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
2869 if(tmpGrandMother->GetPdgCode() == 310) {
2871 }
else if (tmpGrandMother->GetPdgCode() == 130) {
2873 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
2875 }
else if (tmpGrandMother->GetPdgCode() == 221) {
2878 if( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
2892 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
2893 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
2894 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
2895 Int_t pdgCode = mother->GetPdgCode();
2896 if(particle->GetPdgCode() == 111){
2900 }
else if(particle->GetPdgCode() == 221){
2909 if(particle->GetPdgCode() == 111){
2922 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2923 Double_t mcProdVtxX = primVtxMC->GetX();
2924 Double_t mcProdVtxY = primVtxMC->GetY();
2925 Double_t mcProdVtxZ = primVtxMC->GetZ();
2928 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
2931 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
2932 if (!particle)
continue;
2934 Int_t isMCFromMBHeader = -1;
2943 if(particle->GetMother(0) >-1){
2944 switch(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()){
2974 if (particle->Energy() != TMath::Abs(particle->Pz())){
2975 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
2977 if( !(ratio <= 0) ){
2982 if ( particle->GetPdgCode() == 211 ){
2984 }
else if ( particle->GetPdgCode() == -211 ){
2986 }
else if ( particle->GetPdgCode() == 321 ){
2988 }
else if ( particle->GetPdgCode() == -321 ){
2990 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
2992 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
2994 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3001 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3002 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3006 if (particle->Pt()>0.005){
3012 if (particle->Energy() != TMath::Abs(particle->Pz())){
3013 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3015 if( !(ratio <= 0) ){
3019 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3020 alpha = TMath::Abs((daughter0->Energy() - daughter1->Energy()))/(daughter0->Energy() + daughter1->Energy());
3023 if(particle->GetPdgCode() == 111){
3032 }
else if(particle->GetPdgCode() == 221){
3047 if( kDaughter0IsPrim && kDaughter1IsPrim &&
3050 if(particle->GetPdgCode() == 111){
3053 }
else if(particle->GetPdgCode() == 221){
3062 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3063 if (!particle)
continue;
3065 Int_t isMCFromMBHeader = -1;
3073 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3074 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3076 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3078 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3080 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 221) {
3083 if ( !(TMath::Abs(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()) == 11 &&
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 22) )
3094 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3095 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3097 if(particle->GetFirstMother() > -1) pdgCode = ((TParticle*)
fMCEvent->Particle( particle->GetFirstMother() ))->GetPdgCode();
3099 if(particle->GetPdgCode() == 111){
3103 }
else if(particle->GetPdgCode() == 221){
3111 if(particle->GetPdgCode() == 111){
3131 if (gamma0==NULL)
continue;
3137 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fClusterCandidates->GetEntries();secondGammaIndex++){
3139 if (gamma1==NULL)
continue;
3146 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
3156 if ( pi0cand->M() > 0.05 && pi0cand->M() < 0.17){
3161 if ( pi0cand->M() > 0.45 && pi0cand->M() < 0.65){
3227 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3228 Double_t mcProdVtxX = primVtxMC->GetX();
3229 Double_t mcProdVtxY = primVtxMC->GetY();
3230 Double_t mcProdVtxZ = primVtxMC->GetZ();
3233 Bool_t isTruePi0 = kFALSE;
3234 Bool_t isTrueEta = kFALSE;
3236 Bool_t isSameConvertedGamma = kFALSE;
3237 Int_t convertedPhotonLabel0 = -1;
3238 Int_t convertedPhotonLabel1 = -1;
3241 Int_t gamma0MotherLabel = -1;
3243 TParticle * gammaMC0 = 0x0;
3244 if(gamma0MCLabel != -1){
3245 gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
3249 gamma0MotherLabel=gammaMC0->GetMother(0);
3251 if (TrueGammaCandidate0->
IsConversion() && (gammaMC0->GetMother(0) > -1)){
3252 convertedPhotonLabel0 = gammaMC0->GetMother(0);
3253 gamma0MotherLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
3255 gamma0MotherLabel=gammaMC0->GetMother(0);
3260 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
3263 Int_t gamma1MotherLabel = -1;
3266 TParticle * gammaMC1 = 0x0;
3267 if(gamma1MCLabel != -1){
3269 gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
3273 gamma1MotherLabel = gammaMC1->GetMother(0);
3277 convertedPhotonLabel1 = gammaMC1->GetMother(0);
3279 if(convertedPhotonLabel1 > -1) gamma1MotherLabel =
fMCEvent->Particle(convertedPhotonLabel1)->GetMother(0);
3281 gamma1MotherLabel=gammaMC1->GetMother(0);
3288 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3289 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
3292 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 221){
3299 fPt = Pi0Candidate->Pt();
3304 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
3309 Double_t scaling = (375 - TMath::Sqrt(vertex[0]*vertex[0]+vertex[1]*vertex[1]))/(TMath::Sqrt(Pi0Candidate->Px()*Pi0Candidate->Px()+Pi0Candidate->Py()*Pi0Candidate->Py()));
3310 vertex[0] = vertex[0] + scaling*Pi0Candidate->Px();
3311 vertex[1] = vertex[1] + scaling*Pi0Candidate->Py();
3312 vertex[2] = vertex[2] + scaling*Pi0Candidate->Pz();
3316 AliVCluster* clus1 = NULL;
3319 TLorentzVector clusterVector1;
3320 clus1->GetMomentum(clusterVector1,vertex);
3322 TLorentzVector* tmpvec1 =
new TLorentzVector();
3323 tmpvec1->SetPxPyPzE(clusterVector1.Px(),clusterVector1.Py(),clusterVector1.Pz(),clusterVector1.E());
3326 if(!PhotonCandidate1)
return;
3329 AliVCluster* clus2 = NULL;
3332 TLorentzVector clusterVector2;
3333 clus2->GetMomentum(clusterVector2,vertex);
3334 TLorentzVector* tmpvec2 =
new TLorentzVector();
3335 tmpvec2->SetPxPyPzE(clusterVector2.Px(),clusterVector2.Py(),clusterVector2.Pz(),clusterVector2.E());
3338 if(!PhotonCandidate2)
return;
3345 delete PhotonCandidate1;
3346 delete PhotonCandidate2;
3353 if (convertedPhotonLabel0 > -1 && convertedPhotonLabel1 > -1){
3354 if (convertedPhotonLabel0==convertedPhotonLabel1){
3355 isSameConvertedGamma = kTRUE;
3363 if(isTruePi0 || isTrueEta){
3472 if (!isSameConvertedGamma ){
3485 if (!isSameConvertedGamma ){
3500 if ( Pi0Candidate->M() > 0.05 && Pi0Candidate->M() < 0.17){
3505 }
else if (isTrueEta){
3506 if ( Pi0Candidate->M() > 0.45 && Pi0Candidate->M() < 0.65){
3516 Long_t secMotherLabel = -1;
3517 if(gamma0MotherLabel > -1) secMotherLabel = ((TParticle*)
fMCEvent->Particle(gamma0MotherLabel))->GetMother(0);
3525 if (secMotherLabel >-1){
3526 if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==310 && isTruePi0){
3533 }
else if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==130 && isTruePi0){
3537 }
else if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==221 && isTruePi0){
3544 }
else if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==3122 && isTruePi0){
3551 }
else if (isTruePi0){
3556 }
else if (isTrueEta){
3567 if (((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->Pt()>0.005){
3582 }
else if (isTrueEta){
3603 }
else if(!isTruePi0 && !isTrueEta){
3605 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3608 if( ((((TParticle*)
fMCEvent->Particle(gamma0MotherLabel))->GetPdgCode() == 111
3609 || ((TParticle*)
fMCEvent->Particle(gamma0MotherLabel))->GetPdgCode() == 221)
3612 ((((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111
3613 || ((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 221)
3617 }
else if( (TrueGammaCandidate0->E()/Pi0Candidate->E() > 0.7) || (TrueGammaCandidate1->E()/Pi0Candidate->E() > 0.7) ){
3630 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3631 Double_t mcProdVtxX = primVtxMC->GetX();
3632 Double_t mcProdVtxY = primVtxMC->GetY();
3633 Double_t mcProdVtxZ = primVtxMC->GetZ();
3636 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3637 if (AODMCTrackArray == NULL)
return;
3639 Bool_t isTruePi0 = kFALSE;
3640 Bool_t isTrueEta = kFALSE;
3641 Bool_t isSameConvertedGamma = kFALSE;
3642 Int_t convertedPhotonLabel0 = -1;
3643 Int_t convertedPhotonLabel1 = -1;
3646 Int_t gamma0MotherLabel = -1;
3649 AliAODMCParticle * gammaMC0 = 0x0;
3650 if(gamma0MCLabel != -1){
3652 gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
3656 gamma0MotherLabel=gammaMC0->GetMother();
3659 convertedPhotonLabel0 = gammaMC0->GetMother();
3660 AliAODMCParticle * gammaGrandMotherMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gammaMC0->GetMother()));
3661 gamma0MotherLabel=gammaGrandMotherMC0->GetMother();
3662 }
else gamma0MotherLabel=gammaMC0->GetMother();
3668 Int_t gamma1MotherLabel = -1;
3671 AliAODMCParticle *gammaMC1 = 0x0;
3672 if(gamma1MCLabel != -1){
3674 gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
3678 gamma1MotherLabel=gammaMC1->GetMother();
3681 convertedPhotonLabel1 = gammaMC1->GetMother();
3682 AliAODMCParticle * gammaGrandMotherMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gammaMC1->GetMother()));
3683 gamma1MotherLabel=gammaGrandMotherMC1->GetMother();
3684 }
else gamma1MotherLabel=gammaMC1->GetMother();
3689 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3690 if(((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 111){
3693 if(((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 221){
3698 if (convertedPhotonLabel0 > -1 && convertedPhotonLabel1 > 1){
3699 if (convertedPhotonLabel0==convertedPhotonLabel1){
3700 isSameConvertedGamma = kTRUE;
3708 if(isTruePi0 || isTrueEta){
3813 if (!isSameConvertedGamma ){
3826 if (!isSameConvertedGamma ){
3841 if ( Pi0Candidate->M() > 0.05 && Pi0Candidate->M() < 0.17){
3846 }
else if (isTrueEta){
3847 if ( Pi0Candidate->M() > 0.45 && Pi0Candidate->M() < 0.65){
3857 Long_t secMotherLabel =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->GetMother();
3864 if (secMotherLabel >-1){
3865 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==310 && isTruePi0 ){
3869 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==130 && isTruePi0 ){
3873 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==221 && isTruePi0){
3877 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==3122 && isTruePi0){
3885 if (static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt()>0.005){
3895 }
else if (isTrueEta){
3904 (Pi0Candidate->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted*
fWeightJetJetMC);
3909 (Pi0Candidate->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted*
fWeightJetJetMC);
3913 }
else if(!isTruePi0 && !isTrueEta) {
3915 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3918 if( ((((AliAODMCParticle*)AODMCTrackArray->At(gamma0MotherLabel))->GetPdgCode() == 111
3919 || ((AliAODMCParticle*)AODMCTrackArray->At(gamma0MotherLabel))->GetPdgCode() == 221)
3922 ((((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 111
3923 || ((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 221)