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 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
177 fHistoTrueK0sWithPi0DaughterMCPt(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 fHistoMultipleCountTrueClusterGamma(NULL),
244 fVectorDoubleCountTruePi0s(0),
245 fVectorDoubleCountTrueEtas(0),
246 fVectorDoubleCountTrueClusterGammas(0),
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),
264 tSigInvMassPtAlphaTheta(NULL),
265 tBckInvMassPtAlphaTheta(NULL),
266 fInvMassTreeInvMass(0),
268 fInvMassTreeAlpha(0),
269 fInvMassTreeTheta(0),
270 fInvMassTreeMixPool(0),
271 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 fProduceTreeEOverP(kFALSE),
317 fProduceCellIDPlots(kFALSE),
319 fFileNameBroken(NULL),
320 fCloseHighPtClusters(NULL),
330 fV0ReaderName(
"V0ReaderV1"),
339 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 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
439 fHistoTrueK0sWithPi0DaughterMCPt(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 fHistoMultipleCountTrueClusterGamma(NULL),
506 fVectorDoubleCountTruePi0s(0),
507 fVectorDoubleCountTrueEtas(0),
508 fVectorDoubleCountTrueClusterGammas(0),
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),
526 tSigInvMassPtAlphaTheta(NULL),
527 tBckInvMassPtAlphaTheta(NULL),
528 fInvMassTreeInvMass(0),
530 fInvMassTreeAlpha(0),
531 fInvMassTreeTheta(0),
532 fInvMassTreeMixPool(0),
533 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 fProduceTreeEOverP(kFALSE),
579 fProduceCellIDPlots(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;}
678 }
else if (
fIsMC == 3){
686 Int_t nBinsQAPt = 200;
689 Int_t nBinsClusterPt = 500;
699 nBinsClusterPt = 800;
786 TString cutstringMeson =
"NoMesonCut";
791 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s_%s",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
795 fESDList[iCut]->SetName(Form(
"%s_%s_%s ESD histograms",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
799 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents",14,-0.5,13.5);
801 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
802 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
804 TString TriggerNames =
"Not Trigger: ";
806 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
811 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
812 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,
"SPD Pile-Up");
815 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problems");
816 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
817 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
818 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
819 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
828 TString TriggerNames =
"Not Trigger: ";
862 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ",1000,-50,50);
886 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",30000,0,30000);
888 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",2500,0,2500);
890 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",1500,0,1500);
912 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
914 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E",nBinsClusterPt, minClusterPt, maxClusterPt);
916 fHistoClusOverlapHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaOverlapHeaders_Pt",
"ClusGammaOverlapHeaders_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
919 fHistoClusGammaPtM02[iCut] =
new TH2F(
"ClusGamma_Pt_M02",
"ClusGamma_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
952 fHistoMotherPi0PtY[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Y",
"ESD_MotherPi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
955 fHistoMotherEtaPtY[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Y",
"ESD_MotherEta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
958 fHistoMotherPi0PtAlpha[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Alpha",
"ESD_MotherPi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
961 fHistoMotherEtaPtAlpha[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Alpha",
"ESD_MotherEta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
982 Int_t nMaxCells = 12*48*24;
994 fTreeList[iCut]->SetName(Form(
"%s_%s_%s InvMass Tree",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1021 fClusterTreeList[iCut]->SetName(Form(
"%s_%s EoverP Tree",cutstringEvent.Data(),cutstringCalo.Data()));
1025 tClusterEOverP[iCut] =
new TTree(
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt",
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt");
1241 TString cutstringMeson =
"NoMesonCut";
1246 fMCList[iCut]->SetName(Form(
"%s_%s_%s MC histograms",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1247 fMCList[iCut]->SetOwner(kTRUE);
1253 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1255 fHistoMCAllSecondaryGammaPt[iCut] =
new TH2F(
"MC_AllSecondaryGamma_Pt",
"MC_AllSecondaryGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt, 5, -0.5, 4.5);
1262 fHistoMCDecayGammaPi0Pt[iCut] =
new TH1F(
"MC_DecayGammaPi0_Pt",
"MC_DecayGammaPi0_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1264 fHistoMCDecayGammaRhoPt[iCut] =
new TH1F(
"MC_DecayGammaRho_Pt",
"MC_DecayGammaRho_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1266 fHistoMCDecayGammaEtaPt[iCut] =
new TH1F(
"MC_DecayGammaEta_Pt",
"MC_DecayGammaEta_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1268 fHistoMCDecayGammaOmegaPt[iCut] =
new TH1F(
"MC_DecayGammaOmega_Pt",
"MC_DecayGammaOmmega_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1270 fHistoMCDecayGammaEtapPt[iCut] =
new TH1F(
"MC_DecayGammaEtap_Pt",
"MC_DecayGammaEtap_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1272 fHistoMCDecayGammaPhiPt[iCut] =
new TH1F(
"MC_DecayGammaPhi_Pt",
"MC_DecayGammaPhi_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1274 fHistoMCDecayGammaSigmaPt[iCut] =
new TH1F(
"MC_DecayGammaSigma_Pt",
"MC_DecayGammaSigma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1291 fHistoMCPi0Pt[iCut] =
new TH1F(
"MC_Pi0_Pt",
"MC_Pi0_Pt",nBinsPt, minPt, maxPt);
1294 fHistoMCPi0WOWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOWeights_Pt",
"MC_Pi0_WOWeights_Pt",nBinsPt, minPt, maxPt);
1298 fHistoMCEtaPt[iCut] =
new TH1F(
"MC_Eta_Pt",
"MC_Eta_Pt",nBinsPt, minPt, maxPt);
1301 fHistoMCEtaWOWeightPt[iCut] =
new TH1F(
"MC_Eta_WOWeights_Pt",
"MC_Eta_WOWeights_Pt",nBinsPt, minPt, maxPt);
1304 fHistoMCPi0InAccPt[iCut] =
new TH1F(
"MC_Pi0InAcc_Pt",
"MC_Pi0InAcc_Pt",nBinsPt, minPt, maxPt);
1307 fHistoMCEtaInAccPt[iCut] =
new TH1F(
"MC_EtaInAcc_Pt",
"MC_EtaInAcc_Pt",nBinsPt, minPt, maxPt);
1313 fHistoMCPi0WOEvtWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOEventWeights_Pt",
"MC_Pi0_WOEventWeights_Pt",nBinsPt, minPt, maxPt);
1315 fHistoMCEtaWOEvtWeightPt[iCut] =
new TH1F(
"MC_Eta_WOEventWeights_Pt",
"MC_Eta_WOEventWeights_Pt",nBinsPt, minPt, maxPt);
1322 fHistoMCPi0PtJetPt[iCut] =
new TH2F(
"MC_Pi0_Pt_JetPt",
"MC_Pi0_Pt_JetPt",nBinsQAPt, minQAPt, maxQAPt,200,0,200);
1326 fHistoMCEtaPtJetPt[iCut] =
new TH2F(
"MC_Eta_Pt_JetPt",
"MC_Eta_Pt_JetPt",nBinsQAPt, minQAPt, maxQAPt,200,0,200);
1351 fHistoMCSecEtaPt[iCut] =
new TH1F(
"MC_SecEta_Pt",
"MC_SecEta_Pt",nBinsPt, minPt, maxPt);
1362 fHistoMCPi0PtY[iCut] =
new TH2F(
"MC_Pi0_Pt_Y",
"MC_Pi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1366 fHistoMCEtaPtY[iCut] =
new TH2F(
"MC_Eta_Pt_Y",
"MC_Eta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1370 fHistoMCPi0PtAlpha[iCut] =
new TH2F(
"MC_Pi0_Pt_Alpha",
"MC_Pi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
1373 fHistoMCEtaPtAlpha[iCut] =
new TH2F(
"MC_Eta_Pt_Alpha",
"MC_Eta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
1386 fTrueList[iCut]->SetName(Form(
"%s_%s_%s True histograms",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1391 fHistoClusPhotonBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonBG_Pt",
"ESD_TrueClusPhotonBG_Pt",nBinsClusterPt, minClusterPt, maxClusterPt,10,-0.5,9.5);
1403 fHistoClusPhotonPlusConvBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonPlusConvBG_Pt",
"ESD_TrueClusPhotonPlusConvBG_Pt",nBinsClusterPt, minClusterPt, maxClusterPt,10,-0.5,9.5);
1417 fHistoClustPhotonElectronBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonElectronBG_Pt_M02",
"ESD_TrueClusPhotonElectronBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1419 fHistoClustPhotonPionBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonPionBG_Pt_M02",
"ESD_TrueClusPhotonPionBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1421 fHistoClustPhotonKaonBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonKaonBG_Pt_M02",
"ESD_TrueClusPhotonKaonBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1423 fHistoClustPhotonK0lBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonK0lBG_Pt_M02",
"ESD_TrueClusPhotonK0lBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1425 fHistoClustPhotonNeutronBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonNeutronBG_Pt_M02",
"ESD_TrueClusPhotonNeutronBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1427 fHistoClustPhotonRestBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonRestBG_Pt_M02",
"ESD_TrueClusPhotonRestBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1444 fHistoTrueClusGammaPt[iCut] =
new TH1F(
"TrueClusGamma_Pt",
"ESD_TrueClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1448 fHistoTrueClusGammaPtM02[iCut] =
new TH2F(
"TrueClusGamma_Pt_M02",
"TrueClusGamma_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1451 fHistoTruePrimaryClusGammaPt[iCut] =
new TH1F(
"TruePrimaryClusGamma_Pt",
"ESD_TruePrimaryClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1453 fHistoTruePrimaryClusGammaESDPtMCPt[iCut] =
new TH2F(
"TruePrimaryClusGamma_Pt_MCPt",
"ESD_TruePrimaryClusGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt,nBinsClusterPt, minClusterPt, maxClusterPt);
1455 fHistoTruePrimaryClusConvGammaPt[iCut] =
new TH1F(
"TruePrimaryClusConvGamma_Pt",
"ESD_TruePrimaryClusConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1457 fHistoTruePrimaryClusConvGammaESDPtMCPt[iCut] =
new TH2F(
"TruePrimaryClusConvGamma_Pt_MCPt",
"ESD_TruePrimaryClusConvGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt,nBinsClusterPt, minClusterPt, maxClusterPt);
1459 fHistoTrueSecondaryClusGammaPt[iCut] =
new TH2F(
"ESD_TrueSecondaryClusGamma_Pt",
"ESD_TrueSecondaryClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt, 5, -0.5, 4.5);
1473 fHistoTrueSecondaryClusGammaMCPt[iCut] =
new TH2F(
"ESD_TrueSecondaryClusGamma_MCPt",
"ESD_TrueSecondaryClusGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt, 5, -0.5, 4.5);
1540 fHistoTrueClusUnConvGammaPt[iCut] =
new TH1F(
"TrueClusUnConvGamma_Pt",
"TrueClusUnConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1542 fHistoTrueClusUnConvGammaMCPt[iCut] =
new TH1F(
"TrueClusUnConvGamma_MCPt",
"TrueClusUnConvGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt);
1548 fHistoTrueClusElectronPt[iCut] =
new TH1F(
"TrueClusElectron_Pt",
"TrueElectronGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1550 fHistoTrueClusConvGammaPt[iCut] =
new TH1F(
"TrueClusConvGamma_Pt",
"TrueClusConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1552 fHistoTrueClusConvGammaMCPt[iCut] =
new TH1F(
"TrueClusConvGamma_MCPt",
"TrueClusConvGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt);
1554 fHistoTrueClusConvGammaFullyPt[iCut] =
new TH1F(
"TrueClusConvGammaFullyContained_Pt",
"TrueClusConvGammaFullyContained_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1556 fHistoTrueClusMergedGammaPt[iCut] =
new TH1F(
"TrueClusMergedGamma_Pt",
"TrueClusMergedGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1560 fHistoTrueClusDalitzPt[iCut] =
new TH1F(
"TrueClusDalitz_Pt",
"TrueClusDalitz_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1562 fHistoTrueClusDalitzMergedPt[iCut] =
new TH1F(
"TrueClusDalitzMerged_Pt",
"TrueClusDalitzMerged_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1566 fHistoTrueClusShowerPt[iCut] =
new TH1F(
"TrueClusShower_Pt",
"TrueClusShower_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1568 fHistoTrueClusSubLeadingPt[iCut] =
new TH1F(
"TrueClusSubleading_Pt",
"TrueClusSubleading_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1572 fHistoTrueClusEMNonLeadingPt[iCut] =
new TH1F(
"TrueClusEMNonLeading_Pt",
"TrueClusEMNonLeading_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1720 fHistoTruePi0PtY[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Y",
"ESD_TruePi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1723 fHistoTrueEtaPtY[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Y",
"ESD_TrueEta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1726 fHistoTruePi0PtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Alpha",
"ESD_TruePi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
1729 fHistoTrueEtaPtAlpha[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Alpha",
"ESD_TrueEta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
1733 fHistoTruePi0PtOpenAngle[iCut] =
new TH2F(
"ESD_TruePi0_Pt_OpenAngle",
"ESD_TruePi0_Pt_OpenAngle",nBinsQAPt, minQAPt, maxQAPt,100,0,0.5);
1736 fHistoTrueEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_TrueEta_Pt_OpenAngle",
"ESD_TrueEta_Pt_OpenAngle",nBinsQAPt, minQAPt, maxQAPt,180,0,1.8);
1765 fHistoTruePi0Category1[iCut] =
new TH2F(
"ESD_TruePi0Category1_InvMass_Pt",
"ESD_TruePi0Category1_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1767 fHistoTrueEtaCategory1[iCut] =
new TH2F(
"ESD_TrueEtaCategory1_InvMass_Pt",
"ESD_TrueEtaCategory1_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1769 fHistoTruePi0Category2[iCut] =
new TH2F(
"ESD_TruePi0Category2_InvMass_Pt",
"ESD_TruePi0Category2_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1771 fHistoTrueEtaCategory2[iCut] =
new TH2F(
"ESD_TrueEtaCategory2_InvMass_Pt",
"ESD_TrueEtaCategory2_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1773 fHistoTruePi0Category3[iCut] =
new TH2F(
"ESD_TruePi0Category3_InvMass_Pt",
"ESD_TruePi0Category3_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1775 fHistoTrueEtaCategory3[iCut] =
new TH2F(
"ESD_TrueEtaCategory3_InvMass_Pt",
"ESD_TrueEtaCategory3_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1777 fHistoTruePi0Category4_6[iCut] =
new TH2F(
"ESD_TruePi0Category4_6_InvMass_Pt",
"ESD_TruePi0Category4_6_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1779 fHistoTrueEtaCategory4_6[iCut] =
new TH2F(
"ESD_TrueEtaCategory4_6_InvMass_Pt",
"ESD_TrueEtaCategory4_6_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1781 fHistoTruePi0Category5[iCut] =
new TH2F(
"ESD_TruePi0Category5_InvMass_Pt",
"ESD_TruePi0Category5_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1783 fHistoTrueEtaCategory5[iCut] =
new TH2F(
"ESD_TrueEtaCategory5_InvMass_Pt",
"ESD_TrueEtaCategory5_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1785 fHistoTruePi0Category7[iCut] =
new TH2F(
"ESD_TruePi0Category7_InvMass_Pt",
"ESD_TruePi0Category7_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1787 fHistoTrueEtaCategory7[iCut] =
new TH2F(
"ESD_TrueEtaCategory7_InvMass_Pt",
"ESD_TrueEtaCategory7_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1789 fHistoTruePi0Category8[iCut] =
new TH2F(
"ESD_TruePi0Category8_InvMass_Pt",
"ESD_TruePi0Category8_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1791 fHistoTrueEtaCategory8[iCut] =
new TH2F(
"ESD_TrueEtaCategory8_InvMass_Pt",
"ESD_TrueEtaCategory8_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1797 fTreeList[iCut]->SetName(Form(
"%s_%s_%s True ClusterComb tree",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1830 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
1866 fstream fOutputLocalDebug;
1867 fOutputLocalDebug.open(
"debugOutput.txt",ios::out);
1868 fOutputLocalDebug.close();
1894 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
1915 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
1916 if(eventQuality == 2 || eventQuality == 3){
1937 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
1945 Bool_t isRunningEMCALrelAna = kFALSE;
1954 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
1974 Bool_t triggered = kTRUE;
1975 if(eventNotAccepted){
1979 if (eventNotAccepted==3 &&
fIsMC>0){
1986 if(eventQuality != 0){
1992 if (triggered == kTRUE) {
2012 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2022 if (nameBin.CompareTo(
"")== 0){
2024 ->GetAcceptedHeader())->At(i))->GetString();
2025 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
2039 if (triggered==kFALSE)
continue;
2081 if(nclus == 0)
return;
2091 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
2094 Int_t maxClusterID = -1;
2095 map<Long_t,Int_t> mapIsClusterAccepted;
2096 map<Long_t,Int_t> mapIsClusterAcceptedWithoutTrackMatch;
2098 for(Long_t i = 0; i < nclus; i++){
2100 AliVCluster* clus = NULL;
2101 if(
fInputEvent->IsA()==AliESDEvent::Class()) clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2102 else if(
fInputEvent->IsA()==AliAODEvent::Class()) clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2111 TLorentzVector clusterVector;
2112 clus->GetMomentum(clusterVector,vertex);
2114 TLorentzVector* tmpvec =
new TLorentzVector();
2115 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
2119 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
2123 maxClusterEnergy = clus->E();
2124 maxClusterID = (
Int_t) i;
2127 mapIsClusterAccepted[i] = 1;
2128 mapIsClusterAcceptedWithoutTrackMatch[i] = 1;
2137 Int_t* mclabelsCluster = clus->GetLabels();
2140 if (clus->GetNLabels()>0){
2141 for (
Int_t k =0; k< (
Int_t)clus->GetNLabels(); k++){
2154 if (clus->GetNLabels()>1){
2155 Int_t* mclabelsCluster = clus->GetLabels();
2156 for (
Int_t l = 1; l < (
Int_t)clus->GetNLabels(); l++ ){
2178 delete PhotonCandidate;
2186 for(Long_t i = 0; i < nclus; i++){
2187 if( mapIsClusterAccepted[i] != 1 )
continue;
2189 AliVCluster* clus = NULL;
2190 if(
fInputEvent->IsA()==AliESDEvent::Class()) clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2191 else if(
fInputEvent->IsA()==AliAODEvent::Class()) clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2209 AliError(
"Task needs AOD or ESD event...");
2213 AliESDtrackCuts *EsdTrackCuts = 0x0;
2218 if( (runNumber<=146860) || (runNumber>=197470 && runNumber<=197692) || (runNumber>=172440 && runNumber<=193766) ){
2219 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010();
2221 }
else if (runNumber>=209122){
2222 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2015PbPb();
2225 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011();
2227 EsdTrackCuts->SetMaxDCAToVertexZ(2);
2228 EsdTrackCuts->SetEtaRange(-0.8, 0.8);
2229 EsdTrackCuts->SetPtRange(0.15);
2232 for(Long_t i = 0; i < nclus; i++){
2233 if( mapIsClusterAcceptedWithoutTrackMatch[i] != 1 )
continue;
2235 AliVCluster* clus = NULL;
2236 if(
fInputEvent->IsA()==AliESDEvent::Class()) clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2237 else if(
fInputEvent->IsA()==AliAODEvent::Class()) clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2245 Int_t labelTrackMatch = -1;
2251 AliVTrack* currTrack =
dynamic_cast<AliVTrack*
>(
fInputEvent->GetTrack(labelTrackMatch));
2257 AliESDtrack *esdt =
dynamic_cast<AliESDtrack*
>(currTrack);
2258 if(!EsdTrackCuts->AcceptTrack(esdt)){
2269 AliAODTrack *aodt =
dynamic_cast<AliAODTrack*
>(currTrack);
2270 if(!aodt->IsHybridGlobalConstrainedGlobal()){
2274 if(TMath::Abs(aodt->Eta())>0.8){
2292 Float_t temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kElectron));
2297 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kPion));
2302 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kKaon));
2307 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,
AliPID::kProton));
2319 Float_t clsPos[3] = {0.,0.,0.};
2320 Float_t secondClsPos[3] = {0.,0.,0.};
2321 TLorentzVector clusterVector;
2323 clus->GetPosition(clsPos);
2324 TVector3 clsPosVec(clsPos);
2327 for(
Int_t j=0; j<nclus; j++){
2328 if( i == j )
continue;
2329 if( mapIsClusterAcceptedWithoutTrackMatch[j] != 1 )
continue;
2331 AliVCluster* secondClus = NULL;
2332 if(
fInputEvent->IsA()==AliESDEvent::Class()) secondClus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(j));
2333 else if(
fInputEvent->IsA()==AliAODEvent::Class()) secondClus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(j));
2334 if(!secondClus)
continue;
2335 secondClus->GetPosition(secondClsPos);
2336 TVector3 secondClsPosVec(secondClsPos);
2338 Float_t dPhi = clsPosVec.DeltaPhi(secondClsPosVec);
2339 Float_t dEta = clsPosVec.Eta()-secondClsPosVec.Eta();
2340 if(TMath::Sqrt(dEta*dEta + dPhi*dPhi) < 0.2){
2341 secondClus->GetMomentum(clusterVector,vertex);
2342 sum_Et += clusterVector.Et();
2351 TLorentzVector vecTrack;
2352 vecTrack.SetPxPyPzE(currTrack->Px(),currTrack->Py(),currTrack->Pz(),currTrack->E());
2361 mapIsClusterAcceptedWithoutTrackMatch.clear();
2374 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2375 Double_t mcProdVtxX = primVtxMC->GetX();
2376 Double_t mcProdVtxY = primVtxMC->GetY();
2377 Double_t mcProdVtxZ = primVtxMC->GetZ();
2379 TParticle *Photon = NULL;
2380 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2392 Int_t pdgCodeParticle = Photon->GetPdgCode();
2411 if(Photon->GetMother(0) > -1){
2412 TParticle* motherPart = (TParticle*)
fMCEvent->Particle(Photon->GetMother(0));
2422 if (TruePhotonCandidate->
IsDalitz())
2428 if (TruePhotonCandidate->
IsShower())
2441 Int_t motherLab = Photon->GetMother(0);
2442 if (motherLab > -1){
2449 Int_t grandMotherLab =
fMCEvent->Particle(motherLab)->GetMother(0);
2450 if (grandMotherLab > -1){
2479 Int_t secondaryClass = -1;
2487 if (secondaryClass == 2) {
2491 }
else if (secondaryClass == 5) {
2495 }
else if (secondaryClass == 3) {
2499 }
else if (secondaryClass == 4) {
2508 if (secondaryClass == 2) {
2512 }
else if (secondaryClass == 5) {
2516 }
else if (secondaryClass == 3) {
2520 }
else if (secondaryClass == 4) {
2538 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2539 Double_t mcProdVtxX = primVtxMC->GetX();
2540 Double_t mcProdVtxY = primVtxMC->GetY();
2541 Double_t mcProdVtxZ = primVtxMC->GetZ();
2543 AliAODMCParticle *Photon = NULL;
2544 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2546 if (AODMCTrackArray){
2547 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2551 AliInfo(
"AODMCTrackArray could not be loaded");
2559 Int_t pdgCodeParticle = Photon->GetPdgCode();
2578 AliAODMCParticle *motherPart = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
2587 if (TruePhotonCandidate->
IsDalitz())
2593 if (TruePhotonCandidate->
IsShower())
2607 Int_t motherLab = Photon->GetMother();
2608 if (motherLab > -1){
2615 Int_t grandMotherLab = ((AliAODMCParticle*) AODMCTrackArray->At(motherLab))->GetMother();
2616 if (grandMotherLab > -1){
2630 if (Photon->GetMother()> -1){
2631 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
2647 Int_t secondaryClass = -1;
2655 if (secondaryClass == 2) {
2659 }
else if (secondaryClass == 5) {
2663 }
else if (secondaryClass == 3) {
2667 }
else if (secondaryClass == 4) {
2676 if (secondaryClass == 2) {
2680 }
else if (secondaryClass == 5) {
2684 }
else if (secondaryClass == 3) {
2688 }
else if (secondaryClass == 4) {
2704 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2705 Double_t mcProdVtxX = primVtxMC->GetX();
2706 Double_t mcProdVtxY = primVtxMC->GetY();
2707 Double_t mcProdVtxZ = primVtxMC->GetZ();
2709 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2710 if (AODMCTrackArray == NULL)
return;
2713 for(Long_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
2715 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
2716 if (!particle)
continue;
2721 Int_t isMCFromMBHeader = -1;
2730 if(particle->GetMother() >-1){
2731 switch((static_cast<AliAODMCParticle*>(AODMCTrackArray->At(particle->GetMother())))->GetPdgCode()){
2760 if(particle->E() - particle->Pz() == 0 || particle->E() + particle->Pz() == 0){
2767 if ( particle->GetPdgCode() == 211 ){
2769 }
else if ( particle->GetPdgCode() == -211 ){
2771 }
else if ( particle->GetPdgCode() == 321 ){
2773 }
else if ( particle->GetPdgCode() == -321 ){
2775 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
2777 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
2779 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
2786 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
2787 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
2790 if (particle->Pt()>0.005){
2796 if(particle->E() - particle->Pz() == 0 || particle->E() + particle->Pz() == 0){
2802 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
2803 alpha = TMath::Abs((daughter0->E() - daughter1->E()))/(daughter0->E() + daughter1->E());
2806 if(particle->GetPdgCode() == 111){
2815 }
else if(particle->GetPdgCode() == 221){
2830 if(particle->GetPdgCode() == 111){
2833 }
else if(particle->GetPdgCode() == 221){
2842 Int_t isMCFromMBHeader = -1;
2850 if(particle->GetMother() >-1){
2851 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
2852 if(tmpMother->GetMother() >-1){
2853 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
2854 if(tmpGrandMother->GetPdgCode() == 310) {
2856 }
else if (tmpGrandMother->GetPdgCode() == 130) {
2858 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
2860 }
else if (tmpGrandMother->GetPdgCode() == 221) {
2863 if( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
2877 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
2878 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
2879 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
2880 Int_t pdgCode = mother->GetPdgCode();
2881 if(particle->GetPdgCode() == 111){
2885 }
else if(particle->GetPdgCode() == 221){
2894 if(particle->GetPdgCode() == 111){
2907 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2908 Double_t mcProdVtxX = primVtxMC->GetX();
2909 Double_t mcProdVtxY = primVtxMC->GetY();
2910 Double_t mcProdVtxZ = primVtxMC->GetZ();
2913 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
2916 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
2917 if (!particle)
continue;
2919 Int_t isMCFromMBHeader = -1;
2928 if(particle->GetMother(0) >-1){
2929 switch(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()){
2958 if(particle->Energy() - particle->Pz() == 0 || particle->Energy() + particle->Pz() == 0){
2965 if ( particle->GetPdgCode() == 211 ){
2967 }
else if ( particle->GetPdgCode() == -211 ){
2969 }
else if ( particle->GetPdgCode() == 321 ){
2971 }
else if ( particle->GetPdgCode() == -321 ){
2973 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
2975 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
2977 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
2984 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
2985 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
2989 if (particle->Pt()>0.005){
2994 if(particle->Energy() - particle->Pz() == 0 || particle->Energy() + particle->Pz() == 0){
3001 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3002 alpha = TMath::Abs((daughter0->Energy() - daughter1->Energy()))/(daughter0->Energy() + daughter1->Energy());
3005 if(particle->GetPdgCode() == 111){
3014 }
else if(particle->GetPdgCode() == 221){
3029 if( kDaughter0IsPrim && kDaughter1IsPrim &&
3032 if(particle->GetPdgCode() == 111){
3035 }
else if(particle->GetPdgCode() == 221){
3044 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3045 if (!particle)
continue;
3047 Int_t isMCFromMBHeader = -1;
3055 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3056 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3058 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3060 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3062 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 221) {
3065 if ( !(TMath::Abs(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()) == 11 &&
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 22) )
3076 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3077 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3079 if(particle->GetFirstMother() > -1) pdgCode = ((TParticle*)
fMCEvent->Particle( particle->GetFirstMother() ))->GetPdgCode();
3081 if(particle->GetPdgCode() == 111){
3085 }
else if(particle->GetPdgCode() == 221){
3093 if(particle->GetPdgCode() == 111){
3113 if (gamma0==NULL)
continue;
3119 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fClusterCandidates->GetEntries();secondGammaIndex++){
3121 if (gamma1==NULL)
continue;
3128 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
3138 if ( pi0cand->M() > 0.05 && pi0cand->M() < 0.17){
3143 if ( pi0cand->M() > 0.45 && pi0cand->M() < 0.65){
3209 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3210 Double_t mcProdVtxX = primVtxMC->GetX();
3211 Double_t mcProdVtxY = primVtxMC->GetY();
3212 Double_t mcProdVtxZ = primVtxMC->GetZ();
3215 Bool_t isTruePi0 = kFALSE;
3216 Bool_t isTrueEta = kFALSE;
3217 Bool_t isTrueGamma = kFALSE;
3218 Bool_t isSameConvertedGamma = kFALSE;
3219 Int_t convertedPhotonLabel0 = -1;
3220 Int_t convertedPhotonLabel1 = -1;
3223 Int_t gamma0MotherLabel = -1;
3225 TParticle * gammaMC0 = 0x0;
3226 if(gamma0MCLabel != -1){
3227 gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
3231 gamma0MotherLabel=gammaMC0->GetMother(0);
3233 if (TrueGammaCandidate0->
IsConversion() && (gammaMC0->GetMother(0) > -1)){
3234 convertedPhotonLabel0 = gammaMC0->GetMother(0);
3235 gamma0MotherLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
3237 gamma0MotherLabel=gammaMC0->GetMother(0);
3242 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
3245 Int_t gamma1MotherLabel = -1;
3248 TParticle * gammaMC1 = 0x0;
3249 if(gamma1MCLabel != -1){
3251 gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
3255 gamma1MotherLabel = gammaMC1->GetMother(0);
3259 convertedPhotonLabel1 = gammaMC1->GetMother(0);
3261 if(convertedPhotonLabel1 > -1) gamma1MotherLabel =
fMCEvent->Particle(convertedPhotonLabel1)->GetMother(0);
3263 gamma1MotherLabel=gammaMC1->GetMother(0);
3270 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3271 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
3274 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 221){
3281 fPt = Pi0Candidate->Pt();
3286 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
3291 Double_t scaling = (375 - TMath::Sqrt(vertex[0]*vertex[0]+vertex[1]*vertex[1]))/(TMath::Sqrt(Pi0Candidate->Px()*Pi0Candidate->Px()+Pi0Candidate->Py()*Pi0Candidate->Py()));
3292 vertex[0] = vertex[0] + scaling*Pi0Candidate->Px();
3293 vertex[1] = vertex[1] + scaling*Pi0Candidate->Py();
3294 vertex[2] = vertex[2] + scaling*Pi0Candidate->Pz();
3298 AliVCluster* clus1 = NULL;
3301 TLorentzVector clusterVector1;
3302 clus1->GetMomentum(clusterVector1,vertex);
3304 TLorentzVector* tmpvec1 =
new TLorentzVector();
3305 tmpvec1->SetPxPyPzE(clusterVector1.Px(),clusterVector1.Py(),clusterVector1.Pz(),clusterVector1.E());
3308 if(!PhotonCandidate1)
return;
3311 AliVCluster* clus2 = NULL;
3314 TLorentzVector clusterVector2;
3315 clus2->GetMomentum(clusterVector2,vertex);
3316 TLorentzVector* tmpvec2 =
new TLorentzVector();
3317 tmpvec2->SetPxPyPzE(clusterVector2.Px(),clusterVector2.Py(),clusterVector2.Pz(),clusterVector2.E());
3320 if(!PhotonCandidate2)
return;
3327 delete PhotonCandidate1;
3328 delete PhotonCandidate2;
3335 if (convertedPhotonLabel0 > -1 && convertedPhotonLabel1 > -1){
3336 if (convertedPhotonLabel0==convertedPhotonLabel1){
3337 isSameConvertedGamma = kTRUE;
3345 if(isTruePi0 || isTrueEta){
3454 if (!isSameConvertedGamma ){
3467 if (!isSameConvertedGamma ){
3482 if ( Pi0Candidate->M() > 0.05 && Pi0Candidate->M() < 0.17){
3487 }
else if (isTrueEta){
3488 if ( Pi0Candidate->M() > 0.45 && Pi0Candidate->M() < 0.65){
3498 Long_t secMotherLabel = -1;
3499 if(gamma0MotherLabel > -1) secMotherLabel = ((TParticle*)
fMCEvent->Particle(gamma0MotherLabel))->GetMother(0);
3507 if (secMotherLabel >-1){
3508 if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==310 && isTruePi0){
3515 }
else if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==130 && isTruePi0){
3519 }
else if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==221 && isTruePi0){
3526 }
else if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==3122 && isTruePi0){
3533 }
else if (isTruePi0){
3538 }
else if (isTrueEta){
3549 if (((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->Pt()>0.005){
3564 }
else if (isTrueEta){
3585 }
else if(!isTruePi0 && !isTrueEta){
3587 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3590 if( ((((TParticle*)
fMCEvent->Particle(gamma0MotherLabel))->GetPdgCode() == 111
3591 || ((TParticle*)
fMCEvent->Particle(gamma0MotherLabel))->GetPdgCode() == 221)
3594 ((((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111
3595 || ((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 221)
3599 }
else if( (TrueGammaCandidate0->E()/Pi0Candidate->E() > 0.7) || (TrueGammaCandidate1->E()/Pi0Candidate->E() > 0.7) ){
3612 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3613 Double_t mcProdVtxX = primVtxMC->GetX();
3614 Double_t mcProdVtxY = primVtxMC->GetY();
3615 Double_t mcProdVtxZ = primVtxMC->GetZ();
3618 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3619 if (AODMCTrackArray == NULL)
return;
3621 Bool_t isTruePi0 = kFALSE;
3622 Bool_t isTrueEta = kFALSE;
3623 Bool_t isSameConvertedGamma = kFALSE;
3624 Int_t convertedPhotonLabel0 = -1;
3625 Int_t convertedPhotonLabel1 = -1;
3628 Int_t gamma0MotherLabel = -1;
3631 AliAODMCParticle * gammaMC0 = 0x0;
3632 if(gamma0MCLabel != -1){
3634 gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
3638 gamma0MotherLabel=gammaMC0->GetMother();
3641 convertedPhotonLabel0 = gammaMC0->GetMother();
3642 AliAODMCParticle * gammaGrandMotherMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gammaMC0->GetMother()));
3643 gamma0MotherLabel=gammaGrandMotherMC0->GetMother();
3644 }
else gamma0MotherLabel=gammaMC0->GetMother();
3650 Int_t gamma1MotherLabel = -1;
3653 AliAODMCParticle *gammaMC1 = 0x0;
3654 if(gamma1MCLabel != -1){
3656 gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
3660 gamma1MotherLabel=gammaMC1->GetMother();
3663 convertedPhotonLabel1 = gammaMC1->GetMother();
3664 AliAODMCParticle * gammaGrandMotherMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gammaMC1->GetMother()));
3665 gamma1MotherLabel=gammaGrandMotherMC1->GetMother();
3666 }
else gamma1MotherLabel=gammaMC1->GetMother();
3671 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3672 if(((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 111){
3675 if(((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 221){
3680 if (convertedPhotonLabel0 > -1 && convertedPhotonLabel1 > 1){
3681 if (convertedPhotonLabel0==convertedPhotonLabel1){
3682 isSameConvertedGamma = kTRUE;
3690 if(isTruePi0 || isTrueEta){
3795 if (!isSameConvertedGamma ){
3808 if (!isSameConvertedGamma ){
3823 if ( Pi0Candidate->M() > 0.05 && Pi0Candidate->M() < 0.17){
3828 }
else if (isTrueEta){
3829 if ( Pi0Candidate->M() > 0.45 && Pi0Candidate->M() < 0.65){
3839 Long_t secMotherLabel =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->GetMother();
3846 if (secMotherLabel >-1){
3847 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==310 && isTruePi0 ){
3851 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==130 && isTruePi0 ){
3855 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==221 && isTruePi0){
3859 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==3122 && isTruePi0){
3867 if (static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt()>0.005){
3877 }
else if (isTrueEta){
3886 (Pi0Candidate->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted*
fWeightJetJetMC);
3891 (Pi0Candidate->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted*
fWeightJetJetMC);
3895 }
else if(!isTruePi0 && !isTrueEta) {
3897 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3900 if( ((((AliAODMCParticle*)AODMCTrackArray->At(gamma0MotherLabel))->GetPdgCode() == 111
3901 || ((AliAODMCParticle*)AODMCTrackArray->At(gamma0MotherLabel))->GetPdgCode() == 221)
3904 ((((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 111
3905 || ((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 221)
3909 }
else if( (TrueGammaCandidate0->E()/Pi0Candidate->E() > 0.7) || (TrueGammaCandidate1->E()/Pi0Candidate->E() > 0.7) ){