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"),
80 fClusterTreeList(NULL),
81 fOutputContainer(NULL),
82 fClusterCandidates(NULL),
85 fClusterCutArray(NULL),
86 fCaloPhotonCuts(NULL),
89 fHistoMotherInvMassPt(NULL),
90 fSparseMotherInvMassPtZM(NULL),
91 fHistoMotherBackInvMassPt(NULL),
92 fSparseMotherBackInvMassPtZM(NULL),
93 fHistoMotherInvMassPtAlpha(NULL),
94 fHistoMotherBackInvMassPtAlpha(NULL),
95 fHistoMotherPi0PtY(NULL),
96 fHistoMotherEtaPtY(NULL),
97 fHistoMotherPi0PtAlpha(NULL),
98 fHistoMotherEtaPtAlpha(NULL),
99 fHistoMotherPi0PtOpenAngle(NULL),
100 fHistoMotherEtaPtOpenAngle(NULL),
101 fHistoMotherPi0NGoodESDTracksPt(NULL),
102 fHistoMotherEtaNGoodESDTracksPt(NULL),
103 fHistoClusGammaPt(NULL),
104 fHistoClusGammaE(NULL),
105 fHistoClusOverlapHeadersGammaPt(NULL),
106 fHistoClusAllHeadersGammaPt(NULL),
107 fHistoClusRejectedHeadersGammaPt(NULL),
108 fHistoClusGammaPtM02(NULL),
109 fHistoMCHeaders(NULL),
110 fHistoMCAllGammaPt(NULL),
111 fHistoMCAllSecondaryGammaPt(NULL),
112 fHistoMCDecayGammaPi0Pt(NULL),
113 fHistoMCDecayGammaRhoPt(NULL),
114 fHistoMCDecayGammaEtaPt(NULL),
115 fHistoMCDecayGammaOmegaPt(NULL),
116 fHistoMCDecayGammaEtapPt(NULL),
117 fHistoMCDecayGammaPhiPt(NULL),
118 fHistoMCDecayGammaSigmaPt(NULL),
120 fHistoMCPi0WOWeightPt(NULL),
121 fHistoMCPi0WOEvtWeightPt(NULL),
123 fHistoMCEtaWOWeightPt(NULL),
124 fHistoMCEtaWOEvtWeightPt(NULL),
125 fHistoMCPi0InAccPt(NULL),
126 fHistoMCEtaInAccPt(NULL),
127 fHistoMCPi0WOEvtWeightInAccPt(NULL),
128 fHistoMCEtaWOEvtWeightInAccPt(NULL),
129 fHistoMCPi0PtY(NULL),
130 fHistoMCEtaPtY(NULL),
131 fHistoMCPi0PtAlpha(NULL),
132 fHistoMCEtaPtAlpha(NULL),
133 fHistoMCPrimaryPtvsSource(NULL),
134 fHistoMCSecPi0PtvsSource(NULL),
135 fHistoMCSecPi0Source(NULL),
136 fHistoMCSecPi0InAccPtvsSource(NULL),
137 fHistoMCSecEtaPt(NULL),
138 fHistoMCSecEtaSource(NULL),
139 fHistoMCPi0PtJetPt(NULL),
140 fHistoMCEtaPtJetPt(NULL),
141 fHistoTruePi0InvMassPt(NULL),
142 fHistoTrueEtaInvMassPt(NULL),
143 fHistoTruePi0CaloPhotonInvMassPt(NULL),
144 fHistoTrueEtaCaloPhotonInvMassPt(NULL),
145 fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
146 fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
147 fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt(NULL),
148 fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt(NULL),
149 fHistoTruePi0CaloElectronInvMassPt(NULL),
150 fHistoTrueEtaCaloElectronInvMassPt(NULL),
151 fHistoTruePi0CaloMergedClusterInvMassPt(NULL),
152 fHistoTrueEtaCaloMergedClusterInvMassPt(NULL),
153 fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL),
154 fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL),
155 fHistoTruePi0NonMergedElectronPhotonInvMassPt(NULL),
156 fHistoTruePi0NonMergedElectronMergedPhotonInvMassPt(NULL),
157 fHistoTruePi0Category1(NULL),
158 fHistoTrueEtaCategory1(NULL),
159 fHistoTruePi0Category2(NULL),
160 fHistoTrueEtaCategory2(NULL),
161 fHistoTruePi0Category3(NULL),
162 fHistoTrueEtaCategory3(NULL),
163 fHistoTruePi0Category4_6(NULL),
164 fHistoTrueEtaCategory4_6(NULL),
165 fHistoTruePi0Category5(NULL),
166 fHistoTrueEtaCategory5(NULL),
167 fHistoTruePi0Category7(NULL),
168 fHistoTrueEtaCategory7(NULL),
169 fHistoTruePi0Category8(NULL),
170 fHistoTrueEtaCategory8(NULL),
171 fHistoTruePrimaryPi0InvMassPt(NULL),
172 fHistoTruePrimaryEtaInvMassPt(NULL),
173 fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL),
174 fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL),
175 fProfileTruePrimaryPi0WeightsInvMassPt(NULL),
176 fProfileTruePrimaryEtaWeightsInvMassPt(NULL),
177 fHistoTruePrimaryPi0MCPtResolPt(NULL),
178 fHistoTruePrimaryEtaMCPtResolPt(NULL),
179 fHistoTrueSecondaryPi0InvMassPt(NULL),
180 fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
181 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
182 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
183 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
184 fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
185 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
186 fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL),
187 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
188 fHistoTrueBckGGInvMassPt(NULL),
189 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
190 fHistoTrueBckAsymEClustersInvMassPt(NULL),
191 fHistoTrueBckContInvMassPt(NULL),
192 fHistoTruePi0PtY(NULL),
193 fHistoTrueEtaPtY(NULL),
194 fHistoTruePi0PtAlpha(NULL),
195 fHistoTrueEtaPtAlpha(NULL),
196 fHistoTruePi0PtOpenAngle(NULL),
197 fHistoTrueEtaPtOpenAngle(NULL),
198 fHistoClusPhotonBGPt(NULL),
199 fHistoClusPhotonPlusConvBGPt(NULL),
200 fHistoClustPhotonElectronBGPtM02(NULL),
201 fHistoClustPhotonPionBGPtM02(NULL),
202 fHistoClustPhotonKaonBGPtM02(NULL),
203 fHistoClustPhotonK0lBGPtM02(NULL),
204 fHistoClustPhotonNeutronBGPtM02(NULL),
205 fHistoClustPhotonRestBGPtM02(NULL),
206 fHistoClustPhotonPlusConvElectronBGPtM02(NULL),
207 fHistoClustPhotonPlusConvPionBGPtM02(NULL),
208 fHistoClustPhotonPlusConvKaonBGPtM02(NULL),
209 fHistoClustPhotonPlusConvK0lBGPtM02(NULL),
210 fHistoClustPhotonPlusConvNeutronBGPtM02(NULL),
211 fHistoClustPhotonPlusConvRestBGPtM02(NULL),
212 fHistoTrueClusGammaPt(NULL),
213 fHistoTrueClusUnConvGammaPt(NULL),
214 fHistoTrueClusUnConvGammaMCPt(NULL),
215 fHistoTrueClusGammaPtM02(NULL),
216 fHistoTrueClusUnConvGammaPtM02(NULL),
217 fHistoTrueClusElectronPt(NULL),
218 fHistoTrueClusConvGammaPt(NULL),
219 fHistoTrueClusConvGammaMCPt(NULL),
220 fHistoTrueClusConvGammaFullyPt(NULL),
221 fHistoTrueClusMergedGammaPt(NULL),
222 fHistoTrueClusMergedPartConvGammaPt(NULL),
223 fHistoTrueClusDalitzPt(NULL),
224 fHistoTrueClusDalitzMergedPt(NULL),
225 fHistoTrueClusPhotonFromElecMotherPt(NULL),
226 fHistoTrueClusShowerPt(NULL),
227 fHistoTrueClusSubLeadingPt(NULL),
228 fHistoTrueClusNParticles(NULL),
229 fHistoTrueClusEMNonLeadingPt(NULL),
230 fHistoTrueNLabelsInClus(NULL),
231 fHistoTruePrimaryClusGammaPt(NULL),
232 fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
233 fHistoTruePrimaryClusConvGammaPt(NULL),
234 fHistoTruePrimaryClusConvGammaESDPtMCPt(NULL),
235 fHistoTrueSecondaryClusGammaPt(NULL),
236 fHistoTrueSecondaryClusConvGammaPt(NULL),
237 fHistoTrueSecondaryClusGammaMCPt(NULL),
238 fHistoTrueSecondaryClusConvGammaMCPt(NULL),
239 fHistoTrueSecondaryClusGammaFromXFromK0sMCPtESDPt(NULL),
240 fHistoTrueSecondaryClusConvGammaFromXFromK0sMCPtESDPt(NULL),
241 fHistoTrueSecondaryClusGammaFromXFromK0lMCPtESDPt(NULL),
242 fHistoTrueSecondaryClusConvGammaFromXFromK0lMCPtESDPt(NULL),
243 fHistoTrueSecondaryClusGammaFromXFromLambdaMCPtESDPt(NULL),
244 fHistoTrueSecondaryClusConvGammaFromXFromLambdaMCPtESDPt(NULL),
245 fHistoDoubleCountTruePi0InvMassPt(NULL),
246 fHistoDoubleCountTrueEtaInvMassPt(NULL),
247 fHistoDoubleCountTrueClusterGammaPt(NULL),
248 fVectorDoubleCountTruePi0s(0),
249 fVectorDoubleCountTrueEtas(0),
250 fVectorDoubleCountTrueClusterGammas(0),
251 fHistoMultipleCountTrueClusterGamma(NULL),
252 fMapMultipleCountTrueClusterGammas(),
253 fHistoTruePi0InvMassPtAlpha(NULL),
254 fHistoTruePi0PureGammaInvMassPtAlpha(NULL),
255 fHistCellIDvsClusterEnergy(NULL),
256 fHistCellIDvsClusterEnergyMax(NULL),
258 fHistoNEventsWOWeight(NULL),
259 fHistoNGoodESDTracks(NULL),
261 fHistoNGammaCandidates(NULL),
262 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
263 fHistoSPDClusterTrackletBackground(NULL),
264 fHistoNV0Tracks(NULL),
265 fProfileEtaShift(NULL),
266 fProfileJetJetXSection(NULL),
267 fHistoJetJetNTrials(NULL),
268 tTrueInvMassROpenABPtFlag(NULL),
275 tSigInvMassPtAlphaTheta(NULL),
276 tBckInvMassPtAlphaTheta(NULL),
277 fInvMassTreeInvMass(0),
279 fInvMassTreeAlpha(0),
280 fInvMassTreeTheta(0),
281 fInvMassTreeMixPool(0),
282 fInvMassTreeZVertex(0),
284 tClusterEOverP(NULL),
289 fClusterLeadCellID(0),
290 fClusterClassification(0),
298 fClusterIsoSumClusterEt(0),
299 fClusterIsoSumTrackEt(0),
302 fEventPlaneAngle(-100),
307 fDoLightOutput(kFALSE),
308 fDoMesonAnalysis(kTRUE),
311 fIsFromDesiredHeader(kTRUE),
312 fIsOverlappingWithOtherHeader(kFALSE),
315 fSetPlotHistsExtQA(kFALSE),
317 fDoInOutTimingCluster(kFALSE),
318 fMinTimingCluster(0),
319 fMaxTimingCluster(0),
320 fEnableSortForClusMC(kFALSE),
321 fProduceCellIDPlots(kFALSE),
322 fProduceTreeEOverP(kFALSE),
324 fFileNameBroken(NULL),
325 tClusterQATree(NULL),
326 fCloseHighPtClusters(NULL),
328 fAllowOverlapHeaders(kTRUE)
337 fV0ReaderName(
"V0ReaderV1"),
338 fCorrTaskSetting(
""),
349 fClusterTreeList(NULL),
351 fClusterCandidates(NULL),
352 fEventCutArray(NULL),
354 fClusterCutArray(NULL),
355 fCaloPhotonCuts(NULL),
356 fMesonCutArray(NULL),
358 fHistoMotherInvMassPt(NULL),
359 fSparseMotherInvMassPtZM(NULL),
360 fHistoMotherBackInvMassPt(NULL),
361 fSparseMotherBackInvMassPtZM(NULL),
362 fHistoMotherInvMassPtAlpha(NULL),
363 fHistoMotherBackInvMassPtAlpha(NULL),
364 fHistoMotherPi0PtY(NULL),
365 fHistoMotherEtaPtY(NULL),
366 fHistoMotherPi0PtAlpha(NULL),
367 fHistoMotherEtaPtAlpha(NULL),
368 fHistoMotherPi0PtOpenAngle(NULL),
369 fHistoMotherEtaPtOpenAngle(NULL),
370 fHistoMotherPi0NGoodESDTracksPt(NULL),
371 fHistoMotherEtaNGoodESDTracksPt(NULL),
372 fHistoClusGammaPt(NULL),
373 fHistoClusGammaE(NULL),
374 fHistoClusOverlapHeadersGammaPt(NULL),
375 fHistoClusAllHeadersGammaPt(NULL),
376 fHistoClusRejectedHeadersGammaPt(NULL),
377 fHistoClusGammaPtM02(NULL),
378 fHistoMCHeaders(NULL),
379 fHistoMCAllGammaPt(NULL),
380 fHistoMCAllSecondaryGammaPt(NULL),
381 fHistoMCDecayGammaPi0Pt(NULL),
382 fHistoMCDecayGammaRhoPt(NULL),
383 fHistoMCDecayGammaEtaPt(NULL),
384 fHistoMCDecayGammaOmegaPt(NULL),
385 fHistoMCDecayGammaEtapPt(NULL),
386 fHistoMCDecayGammaPhiPt(NULL),
387 fHistoMCDecayGammaSigmaPt(NULL),
389 fHistoMCPi0WOWeightPt(NULL),
390 fHistoMCPi0WOEvtWeightPt(NULL),
392 fHistoMCEtaWOWeightPt(NULL),
393 fHistoMCEtaWOEvtWeightPt(NULL),
394 fHistoMCPi0InAccPt(NULL),
395 fHistoMCEtaInAccPt(NULL),
396 fHistoMCPi0WOEvtWeightInAccPt(NULL),
397 fHistoMCEtaWOEvtWeightInAccPt(NULL),
398 fHistoMCPi0PtY(NULL),
399 fHistoMCEtaPtY(NULL),
400 fHistoMCPi0PtAlpha(NULL),
401 fHistoMCEtaPtAlpha(NULL),
402 fHistoMCPrimaryPtvsSource(NULL),
403 fHistoMCSecPi0PtvsSource(NULL),
404 fHistoMCSecPi0Source(NULL),
405 fHistoMCSecPi0InAccPtvsSource(NULL),
406 fHistoMCSecEtaPt(NULL),
407 fHistoMCSecEtaSource(NULL),
408 fHistoMCPi0PtJetPt(NULL),
409 fHistoMCEtaPtJetPt(NULL),
410 fHistoTruePi0InvMassPt(NULL),
411 fHistoTrueEtaInvMassPt(NULL),
412 fHistoTruePi0CaloPhotonInvMassPt(NULL),
413 fHistoTrueEtaCaloPhotonInvMassPt(NULL),
414 fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
415 fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
416 fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt(NULL),
417 fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt(NULL),
418 fHistoTruePi0CaloElectronInvMassPt(NULL),
419 fHistoTrueEtaCaloElectronInvMassPt(NULL),
420 fHistoTruePi0CaloMergedClusterInvMassPt(NULL),
421 fHistoTrueEtaCaloMergedClusterInvMassPt(NULL),
422 fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL),
423 fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL),
424 fHistoTruePi0NonMergedElectronPhotonInvMassPt(NULL),
425 fHistoTruePi0NonMergedElectronMergedPhotonInvMassPt(NULL),
426 fHistoTruePi0Category1(NULL),
427 fHistoTrueEtaCategory1(NULL),
428 fHistoTruePi0Category2(NULL),
429 fHistoTrueEtaCategory2(NULL),
430 fHistoTruePi0Category3(NULL),
431 fHistoTrueEtaCategory3(NULL),
432 fHistoTruePi0Category4_6(NULL),
433 fHistoTrueEtaCategory4_6(NULL),
434 fHistoTruePi0Category5(NULL),
435 fHistoTrueEtaCategory5(NULL),
436 fHistoTruePi0Category7(NULL),
437 fHistoTrueEtaCategory7(NULL),
438 fHistoTruePi0Category8(NULL),
439 fHistoTrueEtaCategory8(NULL),
440 fHistoTruePrimaryPi0InvMassPt(NULL),
441 fHistoTruePrimaryEtaInvMassPt(NULL),
442 fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL),
443 fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL),
444 fProfileTruePrimaryPi0WeightsInvMassPt(NULL),
445 fProfileTruePrimaryEtaWeightsInvMassPt(NULL),
446 fHistoTruePrimaryPi0MCPtResolPt(NULL),
447 fHistoTruePrimaryEtaMCPtResolPt(NULL),
448 fHistoTrueSecondaryPi0InvMassPt(NULL),
449 fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
450 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
451 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
452 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
453 fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
454 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
455 fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL),
456 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
457 fHistoTrueBckGGInvMassPt(NULL),
458 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
459 fHistoTrueBckAsymEClustersInvMassPt(NULL),
460 fHistoTrueBckContInvMassPt(NULL),
461 fHistoTruePi0PtY(NULL),
462 fHistoTrueEtaPtY(NULL),
463 fHistoTruePi0PtAlpha(NULL),
464 fHistoTrueEtaPtAlpha(NULL),
465 fHistoTruePi0PtOpenAngle(NULL),
466 fHistoTrueEtaPtOpenAngle(NULL),
467 fHistoClusPhotonBGPt(NULL),
468 fHistoClusPhotonPlusConvBGPt(NULL),
469 fHistoClustPhotonElectronBGPtM02(NULL),
470 fHistoClustPhotonPionBGPtM02(NULL),
471 fHistoClustPhotonKaonBGPtM02(NULL),
472 fHistoClustPhotonK0lBGPtM02(NULL),
473 fHistoClustPhotonNeutronBGPtM02(NULL),
474 fHistoClustPhotonRestBGPtM02(NULL),
475 fHistoClustPhotonPlusConvElectronBGPtM02(NULL),
476 fHistoClustPhotonPlusConvPionBGPtM02(NULL),
477 fHistoClustPhotonPlusConvKaonBGPtM02(NULL),
478 fHistoClustPhotonPlusConvK0lBGPtM02(NULL),
479 fHistoClustPhotonPlusConvNeutronBGPtM02(NULL),
480 fHistoClustPhotonPlusConvRestBGPtM02(NULL),
481 fHistoTrueClusGammaPt(NULL),
482 fHistoTrueClusUnConvGammaPt(NULL),
483 fHistoTrueClusUnConvGammaMCPt(NULL),
484 fHistoTrueClusGammaPtM02(NULL),
485 fHistoTrueClusUnConvGammaPtM02(NULL),
486 fHistoTrueClusElectronPt(NULL),
487 fHistoTrueClusConvGammaPt(NULL),
488 fHistoTrueClusConvGammaMCPt(NULL),
489 fHistoTrueClusConvGammaFullyPt(NULL),
490 fHistoTrueClusMergedGammaPt(NULL),
491 fHistoTrueClusMergedPartConvGammaPt(NULL),
492 fHistoTrueClusDalitzPt(NULL),
493 fHistoTrueClusDalitzMergedPt(NULL),
494 fHistoTrueClusPhotonFromElecMotherPt(NULL),
495 fHistoTrueClusShowerPt(NULL),
496 fHistoTrueClusSubLeadingPt(NULL),
497 fHistoTrueClusNParticles(NULL),
498 fHistoTrueClusEMNonLeadingPt(NULL),
499 fHistoTrueNLabelsInClus(NULL),
500 fHistoTruePrimaryClusGammaPt(NULL),
501 fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
502 fHistoTruePrimaryClusConvGammaPt(NULL),
503 fHistoTruePrimaryClusConvGammaESDPtMCPt(NULL),
504 fHistoTrueSecondaryClusGammaPt(NULL),
505 fHistoTrueSecondaryClusConvGammaPt(NULL),
506 fHistoTrueSecondaryClusGammaMCPt(NULL),
507 fHistoTrueSecondaryClusConvGammaMCPt(NULL),
508 fHistoTrueSecondaryClusGammaFromXFromK0sMCPtESDPt(NULL),
509 fHistoTrueSecondaryClusConvGammaFromXFromK0sMCPtESDPt(NULL),
510 fHistoTrueSecondaryClusGammaFromXFromK0lMCPtESDPt(NULL),
511 fHistoTrueSecondaryClusConvGammaFromXFromK0lMCPtESDPt(NULL),
512 fHistoTrueSecondaryClusGammaFromXFromLambdaMCPtESDPt(NULL),
513 fHistoTrueSecondaryClusConvGammaFromXFromLambdaMCPtESDPt(NULL),
514 fHistoDoubleCountTruePi0InvMassPt(NULL),
515 fHistoDoubleCountTrueEtaInvMassPt(NULL),
516 fHistoDoubleCountTrueClusterGammaPt(NULL),
517 fVectorDoubleCountTruePi0s(0),
518 fVectorDoubleCountTrueEtas(0),
519 fVectorDoubleCountTrueClusterGammas(0),
520 fHistoMultipleCountTrueClusterGamma(NULL),
521 fMapMultipleCountTrueClusterGammas(),
522 fHistoTruePi0InvMassPtAlpha(NULL),
523 fHistoTruePi0PureGammaInvMassPtAlpha(NULL),
524 fHistCellIDvsClusterEnergy(NULL),
525 fHistCellIDvsClusterEnergyMax(NULL),
527 fHistoNEventsWOWeight(NULL),
528 fHistoNGoodESDTracks(NULL),
530 fHistoNGammaCandidates(NULL),
531 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
532 fHistoSPDClusterTrackletBackground(NULL),
533 fHistoNV0Tracks(NULL),
534 fProfileEtaShift(NULL),
535 fProfileJetJetXSection(NULL),
536 fHistoJetJetNTrials(NULL),
537 tTrueInvMassROpenABPtFlag(NULL),
544 tSigInvMassPtAlphaTheta(NULL),
545 tBckInvMassPtAlphaTheta(NULL),
546 fInvMassTreeInvMass(0),
548 fInvMassTreeAlpha(0),
549 fInvMassTreeTheta(0),
550 fInvMassTreeMixPool(0),
551 fInvMassTreeZVertex(0),
553 tClusterEOverP(NULL),
558 fClusterLeadCellID(0),
559 fClusterClassification(0),
567 fClusterIsoSumClusterEt(0),
568 fClusterIsoSumTrackEt(0),
571 fEventPlaneAngle(-100),
576 fDoLightOutput(kFALSE),
577 fDoMesonAnalysis(kTRUE),
580 fIsFromDesiredHeader(kTRUE),
581 fIsOverlappingWithOtherHeader(kFALSE),
584 fSetPlotHistsExtQA(kFALSE),
586 fDoInOutTimingCluster(kFALSE),
587 fMinTimingCluster(0),
588 fMaxTimingCluster(0),
589 fEnableSortForClusMC(kFALSE),
590 fProduceCellIDPlots(kFALSE),
591 fProduceTreeEOverP(kFALSE),
593 fFileNameBroken(NULL),
594 tClusterQATree(NULL),
595 fCloseHighPtClusters(NULL),
597 fAllowOverlapHeaders(kTRUE)
600 DefineOutput(1, TList::Class());
617 const Int_t nDim = 4;
618 Int_t nBins[nDim] = {800,350,7,6};
640 if(collisionSystem == 1 || collisionSystem == 2 ||
641 collisionSystem == 5 || collisionSystem == 8 ||
642 collisionSystem == 9){
643 centMin = centMin*10;
644 centMax = centMax*10;
645 if(centMax ==0 && centMax!=centMin) centMax=100;
646 }
else if(collisionSystem == 3 || collisionSystem == 6){
649 }
else if(collisionSystem == 4 || collisionSystem == 7){
650 centMin = ((centMin*5)+45);
651 centMax = ((centMax*5)+45);
656 fBackList[iCut]->SetName(Form(
"%s_%s_%s Back histograms",cutstringEvent.Data(),cutstringCalo.Data(), cutstringMeson.Data()));
664 fMotherList[iCut]->SetName(Form(
"%s_%s_%s Mother histograms",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
668 fSparseMotherInvMassPtZM[iCut] =
new THnSparseF(
"Back_Mother_InvMass_Pt_z_m",
"Back_Mother_InvMass_Pt_z_m",nDim,nBins,xMin,xMax);
674 collisionSystem,centMin,centMax,
686 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
691 }
else if (
fIsMC == 3){
699 Int_t nBinsQAPt = 200;
702 Int_t nBinsClusterPt = 500;
712 nBinsClusterPt = 800;
725 nBinsClusterPt = 1000;
815 TString cutstringMeson =
"NoMesonCut";
820 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s_%s",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
824 fESDList[iCut]->SetName(Form(
"%s_%s_%s ESD histograms",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
828 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents",14,-0.5,13.5);
830 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
831 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
833 TString TriggerNames =
"Not Trigger: ";
835 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
840 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
841 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,
"SPD Pile-Up");
844 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problems");
845 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
846 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
847 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
848 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
857 TString TriggerNames =
"Not Trigger: ";
891 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ",1000,-50,50);
915 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",30000,0,30000);
917 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",2500,0,2500);
919 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",1500,0,1500);
941 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
943 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E",nBinsClusterPt, minClusterPt, maxClusterPt);
945 fHistoClusOverlapHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaOverlapHeaders_Pt",
"ClusGammaOverlapHeaders_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
948 fHistoClusAllHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaAllHeaders_Pt",
"ClusGammaAllHeaders_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
955 fHistoClusGammaPtM02[iCut] =
new TH2F(
"ClusGamma_Pt_M02",
"ClusGamma_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
990 fHistoMotherPi0PtY[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Y",
"ESD_MotherPi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
993 fHistoMotherEtaPtY[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Y",
"ESD_MotherEta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
996 fHistoMotherPi0PtAlpha[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Alpha",
"ESD_MotherPi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
999 fHistoMotherEtaPtAlpha[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Alpha",
"ESD_MotherEta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
1034 Int_t nMaxCells = 12*48*24;
1046 fTreeList[iCut]->SetName(Form(
"%s_%s_%s InvMass Tree",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1073 fClusterTreeList[iCut]->SetName(Form(
"%s_%s EoverP Tree",cutstringEvent.Data(),cutstringCalo.Data()));
1077 tClusterEOverP[iCut] =
new TTree(
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt",
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt");
1293 TString cutstringMeson =
"NoMesonCut";
1298 fMCList[iCut]->SetName(Form(
"%s_%s_%s MC histograms",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1299 fMCList[iCut]->SetOwner(kTRUE);
1305 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1307 fHistoMCAllSecondaryGammaPt[iCut] =
new TH2F(
"MC_AllSecondaryGamma_Pt",
"MC_AllSecondaryGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt, 5, -0.5, 4.5);
1314 fHistoMCDecayGammaPi0Pt[iCut] =
new TH1F(
"MC_DecayGammaPi0_Pt",
"MC_DecayGammaPi0_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1316 fHistoMCDecayGammaRhoPt[iCut] =
new TH1F(
"MC_DecayGammaRho_Pt",
"MC_DecayGammaRho_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1318 fHistoMCDecayGammaEtaPt[iCut] =
new TH1F(
"MC_DecayGammaEta_Pt",
"MC_DecayGammaEta_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1320 fHistoMCDecayGammaOmegaPt[iCut] =
new TH1F(
"MC_DecayGammaOmega_Pt",
"MC_DecayGammaOmmega_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1322 fHistoMCDecayGammaEtapPt[iCut] =
new TH1F(
"MC_DecayGammaEtap_Pt",
"MC_DecayGammaEtap_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1324 fHistoMCDecayGammaPhiPt[iCut] =
new TH1F(
"MC_DecayGammaPhi_Pt",
"MC_DecayGammaPhi_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1326 fHistoMCDecayGammaSigmaPt[iCut] =
new TH1F(
"MC_DecayGammaSigma_Pt",
"MC_DecayGammaSigma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1343 fHistoMCPi0Pt[iCut] =
new TH1F(
"MC_Pi0_Pt",
"MC_Pi0_Pt",nBinsPt, minPt, maxPt);
1346 fHistoMCPi0WOWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOWeights_Pt",
"MC_Pi0_WOWeights_Pt",nBinsPt, minPt, maxPt);
1350 fHistoMCEtaPt[iCut] =
new TH1F(
"MC_Eta_Pt",
"MC_Eta_Pt",nBinsPt, minPt, maxPt);
1353 fHistoMCEtaWOWeightPt[iCut] =
new TH1F(
"MC_Eta_WOWeights_Pt",
"MC_Eta_WOWeights_Pt",nBinsPt, minPt, maxPt);
1356 fHistoMCPi0InAccPt[iCut] =
new TH1F(
"MC_Pi0InAcc_Pt",
"MC_Pi0InAcc_Pt",nBinsPt, minPt, maxPt);
1359 fHistoMCEtaInAccPt[iCut] =
new TH1F(
"MC_EtaInAcc_Pt",
"MC_EtaInAcc_Pt",nBinsPt, minPt, maxPt);
1365 fHistoMCPi0WOEvtWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOEventWeights_Pt",
"MC_Pi0_WOEventWeights_Pt",nBinsPt, minPt, maxPt);
1367 fHistoMCEtaWOEvtWeightPt[iCut] =
new TH1F(
"MC_Eta_WOEventWeights_Pt",
"MC_Eta_WOEventWeights_Pt",nBinsPt, minPt, maxPt);
1374 fHistoMCPi0PtJetPt[iCut] =
new TH2F(
"MC_Pi0_Pt_JetPt",
"MC_Pi0_Pt_JetPt",nBinsQAPt, minQAPt, maxQAPt,200,0,200);
1378 fHistoMCEtaPtJetPt[iCut] =
new TH2F(
"MC_Eta_Pt_JetPt",
"MC_Eta_Pt_JetPt",nBinsQAPt, minQAPt, maxQAPt,200,0,200);
1403 fHistoMCSecEtaPt[iCut] =
new TH1F(
"MC_SecEta_Pt",
"MC_SecEta_Pt",nBinsPt, minPt, maxPt);
1414 fHistoMCPi0PtY[iCut] =
new TH2F(
"MC_Pi0_Pt_Y",
"MC_Pi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1418 fHistoMCEtaPtY[iCut] =
new TH2F(
"MC_Eta_Pt_Y",
"MC_Eta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1422 fHistoMCPi0PtAlpha[iCut] =
new TH2F(
"MC_Pi0_Pt_Alpha",
"MC_Pi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
1425 fHistoMCEtaPtAlpha[iCut] =
new TH2F(
"MC_Eta_Pt_Alpha",
"MC_Eta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
1436 fTrueList[iCut]->SetName(Form(
"%s_%s_%s True histograms",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1441 fHistoClusPhotonBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonBG_Pt",
"ESD_TrueClusPhotonBG_Pt",nBinsClusterPt, minClusterPt, maxClusterPt,10,-0.5,9.5);
1453 fHistoClusPhotonPlusConvBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonPlusConvBG_Pt",
"ESD_TrueClusPhotonPlusConvBG_Pt",nBinsClusterPt, minClusterPt, maxClusterPt,10,-0.5,9.5);
1467 fHistoClustPhotonElectronBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonElectronBG_Pt_M02",
"ESD_TrueClusPhotonElectronBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1469 fHistoClustPhotonPionBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonPionBG_Pt_M02",
"ESD_TrueClusPhotonPionBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1471 fHistoClustPhotonKaonBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonKaonBG_Pt_M02",
"ESD_TrueClusPhotonKaonBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1473 fHistoClustPhotonK0lBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonK0lBG_Pt_M02",
"ESD_TrueClusPhotonK0lBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1475 fHistoClustPhotonNeutronBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonNeutronBG_Pt_M02",
"ESD_TrueClusPhotonNeutronBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1477 fHistoClustPhotonRestBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonRestBG_Pt_M02",
"ESD_TrueClusPhotonRestBG_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1494 fHistoTrueClusGammaPt[iCut] =
new TH1F(
"TrueClusGamma_Pt",
"ESD_TrueClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1498 fHistoTrueClusGammaPtM02[iCut] =
new TH2F(
"TrueClusGamma_Pt_M02",
"TrueClusGamma_Pt_M02",nBinsClusterPt, minClusterPt, maxClusterPt,100,0,1);
1501 fHistoTruePrimaryClusGammaPt[iCut] =
new TH1F(
"TruePrimaryClusGamma_Pt",
"ESD_TruePrimaryClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1503 fHistoTruePrimaryClusGammaESDPtMCPt[iCut] =
new TH2F(
"TruePrimaryClusGamma_Pt_MCPt",
"ESD_TruePrimaryClusGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt,nBinsClusterPt, minClusterPt, maxClusterPt);
1505 fHistoTruePrimaryClusConvGammaPt[iCut] =
new TH1F(
"TruePrimaryClusConvGamma_Pt",
"ESD_TruePrimaryClusConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1507 fHistoTruePrimaryClusConvGammaESDPtMCPt[iCut] =
new TH2F(
"TruePrimaryClusConvGamma_Pt_MCPt",
"ESD_TruePrimaryClusConvGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt,nBinsClusterPt, minClusterPt, maxClusterPt);
1509 fHistoTrueSecondaryClusGammaPt[iCut] =
new TH2F(
"ESD_TrueSecondaryClusGamma_Pt",
"ESD_TrueSecondaryClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt, 5, -0.5, 4.5);
1523 fHistoTrueSecondaryClusGammaMCPt[iCut] =
new TH2F(
"ESD_TrueSecondaryClusGamma_MCPt",
"ESD_TrueSecondaryClusGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt, 5, -0.5, 4.5);
1590 fHistoTrueClusUnConvGammaPt[iCut] =
new TH1F(
"TrueClusUnConvGamma_Pt",
"TrueClusUnConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1592 fHistoTrueClusUnConvGammaMCPt[iCut] =
new TH1F(
"TrueClusUnConvGamma_MCPt",
"TrueClusUnConvGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt);
1598 fHistoTrueClusElectronPt[iCut] =
new TH1F(
"TrueClusElectron_Pt",
"TrueElectronGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1600 fHistoTrueClusConvGammaPt[iCut] =
new TH1F(
"TrueClusConvGamma_Pt",
"TrueClusConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1602 fHistoTrueClusConvGammaMCPt[iCut] =
new TH1F(
"TrueClusConvGamma_MCPt",
"TrueClusConvGamma_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt);
1604 fHistoTrueClusConvGammaFullyPt[iCut] =
new TH1F(
"TrueClusConvGammaFullyContained_Pt",
"TrueClusConvGammaFullyContained_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1606 fHistoTrueClusMergedGammaPt[iCut] =
new TH1F(
"TrueClusMergedGamma_Pt",
"TrueClusMergedGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1610 fHistoTrueClusDalitzPt[iCut] =
new TH1F(
"TrueClusDalitz_Pt",
"TrueClusDalitz_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1612 fHistoTrueClusDalitzMergedPt[iCut] =
new TH1F(
"TrueClusDalitzMerged_Pt",
"TrueClusDalitzMerged_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1616 fHistoTrueClusShowerPt[iCut] =
new TH1F(
"TrueClusShower_Pt",
"TrueClusShower_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1618 fHistoTrueClusSubLeadingPt[iCut] =
new TH1F(
"TrueClusSubleading_Pt",
"TrueClusSubleading_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1622 fHistoTrueClusEMNonLeadingPt[iCut] =
new TH1F(
"TrueClusEMNonLeading_Pt",
"TrueClusEMNonLeading_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1770 fHistoTruePi0PtY[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Y",
"ESD_TruePi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1773 fHistoTrueEtaPtY[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Y",
"ESD_TrueEta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1776 fHistoTruePi0PtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Alpha",
"ESD_TruePi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
1779 fHistoTrueEtaPtAlpha[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Alpha",
"ESD_TrueEta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,100,0,1);
1783 fHistoTruePi0PtOpenAngle[iCut] =
new TH2F(
"ESD_TruePi0_Pt_OpenAngle",
"ESD_TruePi0_Pt_OpenAngle",nBinsQAPt, minQAPt, maxQAPt,100,0,0.5);
1786 fHistoTrueEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_TrueEta_Pt_OpenAngle",
"ESD_TrueEta_Pt_OpenAngle",nBinsQAPt, minQAPt, maxQAPt,180,0,1.8);
1815 fHistoTruePi0Category1[iCut] =
new TH2F(
"ESD_TruePi0Category1_InvMass_Pt",
"ESD_TruePi0Category1_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1817 fHistoTrueEtaCategory1[iCut] =
new TH2F(
"ESD_TrueEtaCategory1_InvMass_Pt",
"ESD_TrueEtaCategory1_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1819 fHistoTruePi0Category2[iCut] =
new TH2F(
"ESD_TruePi0Category2_InvMass_Pt",
"ESD_TruePi0Category2_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1821 fHistoTrueEtaCategory2[iCut] =
new TH2F(
"ESD_TrueEtaCategory2_InvMass_Pt",
"ESD_TrueEtaCategory2_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1823 fHistoTruePi0Category3[iCut] =
new TH2F(
"ESD_TruePi0Category3_InvMass_Pt",
"ESD_TruePi0Category3_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1825 fHistoTrueEtaCategory3[iCut] =
new TH2F(
"ESD_TrueEtaCategory3_InvMass_Pt",
"ESD_TrueEtaCategory3_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1827 fHistoTruePi0Category4_6[iCut] =
new TH2F(
"ESD_TruePi0Category4_6_InvMass_Pt",
"ESD_TruePi0Category4_6_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1829 fHistoTrueEtaCategory4_6[iCut] =
new TH2F(
"ESD_TrueEtaCategory4_6_InvMass_Pt",
"ESD_TrueEtaCategory4_6_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1831 fHistoTruePi0Category5[iCut] =
new TH2F(
"ESD_TruePi0Category5_InvMass_Pt",
"ESD_TruePi0Category5_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1833 fHistoTrueEtaCategory5[iCut] =
new TH2F(
"ESD_TrueEtaCategory5_InvMass_Pt",
"ESD_TrueEtaCategory5_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1835 fHistoTruePi0Category7[iCut] =
new TH2F(
"ESD_TruePi0Category7_InvMass_Pt",
"ESD_TruePi0Category7_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1837 fHistoTrueEtaCategory7[iCut] =
new TH2F(
"ESD_TrueEtaCategory7_InvMass_Pt",
"ESD_TrueEtaCategory7_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1839 fHistoTruePi0Category8[iCut] =
new TH2F(
"ESD_TruePi0Category8_InvMass_Pt",
"ESD_TruePi0Category8_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1841 fHistoTrueEtaCategory8[iCut] =
new TH2F(
"ESD_TrueEtaCategory8_InvMass_Pt",
"ESD_TrueEtaCategory8_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1847 fTreeList[iCut]->SetName(Form(
"%s_%s_%s True ClusterComb tree",cutstringEvent.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1880 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
1920 fstream fOutputLocalDebug;
1921 fOutputLocalDebug.open(
"debugOutput.txt",ios::out);
1922 fOutputLocalDebug.close();
1948 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
1969 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
1970 if(eventQuality == 2 || eventQuality == 3){
1991 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
1999 Bool_t isRunningEMCALrelAna = kFALSE;
2008 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
2028 Bool_t triggered = kTRUE;
2029 if(eventNotAccepted){
2033 if (eventNotAccepted==3 &&
fIsMC>0){
2040 if(eventQuality != 0){
2046 if (triggered == kTRUE) {
2066 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2076 if (nameBin.CompareTo(
"")== 0){
2078 ->GetAcceptedHeader())->At(i))->GetString();
2079 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
2093 if (triggered==kFALSE)
continue;
2132 TClonesArray * arrClustersProcess = NULL;
2137 if(!arrClustersProcess)
2138 AliFatal(Form(
"%sClustersBranch was not found in AliAnalysisTaskGammaCalo! Check the correction framework settings!",
fCorrTaskSetting.Data()));
2139 nclus = arrClustersProcess->GetEntries();
2142 if(nclus == 0)
return;
2151 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
2154 Int_t maxClusterID = -1;
2155 map<Long_t,Int_t> mapIsClusterAccepted;
2156 map<Long_t,Int_t> mapIsClusterAcceptedWithoutTrackMatch;
2158 for(Long_t i = 0; i < nclus; i++){
2160 AliVCluster* clus = NULL;
2162 if(arrClustersProcess)
2163 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2165 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2166 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2167 if(arrClustersProcess)
2168 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2170 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2180 TLorentzVector clusterVector;
2181 clus->GetMomentum(clusterVector,vertex);
2183 TLorentzVector* tmpvec =
new TLorentzVector();
2184 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
2188 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
2192 maxClusterEnergy = clus->E();
2193 maxClusterID = (
Int_t) i;
2196 mapIsClusterAccepted[i] = 1;
2197 mapIsClusterAcceptedWithoutTrackMatch[i] = 1;
2206 Int_t* mclabelsCluster = clus->GetLabels();
2209 if (clus->GetNLabels()>0){
2210 for (
Int_t k =0; k< (
Int_t)clus->GetNLabels(); k++){
2223 if (clus->GetNLabels()>1){
2224 Int_t* mclabelsCluster = clus->GetLabels();
2225 if (
fLocalDebugFlag > 1) cout <<
"testing if other labels in cluster belong to different header, need to test " << (
Int_t)clus->GetNLabels()-1 <<
" additional labels" << endl;
2226 for (
Int_t l = 1; l < (
Int_t)clus->GetNLabels(); l++ ){
2252 delete PhotonCandidate;
2260 for(Long_t i = 0; i < nclus; i++){
2261 if( mapIsClusterAccepted[i] != 1 )
continue;
2263 AliVCluster* clus = NULL;
2265 if(arrClustersProcess)
2266 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2268 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2269 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2270 if(arrClustersProcess)
2271 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2273 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2293 AliError(
"Task needs AOD or ESD event...");
2297 AliESDtrackCuts *EsdTrackCuts = 0x0;
2302 if( (runNumber<=146860) || (runNumber>=197470 && runNumber<=197692) || (runNumber>=172440 && runNumber<=193766) ){
2303 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010();
2305 }
else if (runNumber>=209122){
2306 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2015PbPb();
2309 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011();
2311 EsdTrackCuts->SetMaxDCAToVertexZ(2);
2312 EsdTrackCuts->SetEtaRange(-0.8, 0.8);
2313 EsdTrackCuts->SetPtRange(0.15);
2316 for(Long_t i = 0; i < nclus; i++){
2317 if( mapIsClusterAcceptedWithoutTrackMatch[i] != 1 )
continue;
2319 AliVCluster* clus = NULL;
2321 if(arrClustersProcess)
2322 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2324 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2325 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2326 if(arrClustersProcess)
2327 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2329 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2339 Int_t labelTrackMatch = -1;
2345 AliVTrack* currTrack =
dynamic_cast<AliVTrack*
>(
fInputEvent->GetTrack(labelTrackMatch));
2351 AliESDtrack *esdt =
dynamic_cast<AliESDtrack*
>(currTrack);
2352 if(!EsdTrackCuts->AcceptTrack(esdt)){
2363 AliAODTrack *aodt =
dynamic_cast<AliAODTrack*
>(currTrack);
2364 if(!aodt->IsHybridGlobalConstrainedGlobal()){
2368 if(TMath::Abs(aodt->Eta())>0.8){
2386 Float_t temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kElectron));
2391 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kPion));
2396 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kKaon));
2401 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,
AliPID::kProton));
2413 Float_t clsPos[3] = {0.,0.,0.};
2414 Float_t secondClsPos[3] = {0.,0.,0.};
2415 TLorentzVector clusterVector;
2417 clus->GetPosition(clsPos);
2418 TVector3 clsPosVec(clsPos);
2421 for(
Int_t j=0; j<nclus; j++){
2422 if( i == j )
continue;
2423 if( mapIsClusterAcceptedWithoutTrackMatch[j] != 1 )
continue;
2425 AliVCluster* secondClus = NULL;
2427 if(arrClustersProcess)
2428 secondClus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(j));
2430 secondClus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(j));
2431 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2432 if(arrClustersProcess)
2433 secondClus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(j));
2435 secondClus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(j));
2438 if(!secondClus)
continue;
2439 secondClus->GetPosition(secondClsPos);
2440 TVector3 secondClsPosVec(secondClsPos);
2442 Float_t dPhi = clsPosVec.DeltaPhi(secondClsPosVec);
2443 Float_t dEta = clsPosVec.Eta()-secondClsPosVec.Eta();
2444 if(TMath::Sqrt(dEta*dEta + dPhi*dPhi) < 0.2){
2445 secondClus->GetMomentum(clusterVector,vertex);
2446 sum_Et += clusterVector.Et();
2455 TLorentzVector vecTrack;
2456 vecTrack.SetPxPyPzE(currTrack->Px(),currTrack->Py(),currTrack->Pz(),currTrack->E());
2465 mapIsClusterAcceptedWithoutTrackMatch.clear();
2478 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2479 Double_t mcProdVtxX = primVtxMC->GetX();
2480 Double_t mcProdVtxY = primVtxMC->GetY();
2481 Double_t mcProdVtxZ = primVtxMC->GetZ();
2483 TParticle *Photon = NULL;
2484 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2496 Int_t pdgCodeParticle = Photon->GetPdgCode();
2515 if(Photon->GetMother(0) > -1){
2516 TParticle* motherPart = (TParticle*)
fMCEvent->Particle(Photon->GetMother(0));
2526 if (TruePhotonCandidate->
IsDalitz())
2532 if (TruePhotonCandidate->
IsShower())
2545 Int_t motherLab = Photon->GetMother(0);
2546 if (motherLab > -1){
2553 Int_t grandMotherLab =
fMCEvent->Particle(motherLab)->GetMother(0);
2554 if (grandMotherLab > -1){
2583 Int_t secondaryClass = -1;
2591 if (secondaryClass == 2) {
2595 }
else if (secondaryClass == 5) {
2599 }
else if (secondaryClass == 3) {
2603 }
else if (secondaryClass == 4) {
2612 if (secondaryClass == 2) {
2616 }
else if (secondaryClass == 5) {
2620 }
else if (secondaryClass == 3) {
2624 }
else if (secondaryClass == 4) {
2641 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2642 Double_t mcProdVtxX = primVtxMC->GetX();
2643 Double_t mcProdVtxY = primVtxMC->GetY();
2644 Double_t mcProdVtxZ = primVtxMC->GetZ();
2646 AliAODMCParticle *Photon = NULL;
2647 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2649 if (AODMCTrackArray){
2650 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2654 AliInfo(
"AODMCTrackArray could not be loaded");
2662 Int_t pdgCodeParticle = Photon->GetPdgCode();
2680 AliAODMCParticle *motherPart = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
2689 if (TruePhotonCandidate->
IsDalitz())
2695 if (TruePhotonCandidate->
IsShower())
2709 Int_t motherLab = Photon->GetMother();
2710 if (motherLab > -1){
2717 Int_t grandMotherLab = ((AliAODMCParticle*) AODMCTrackArray->At(motherLab))->GetMother();
2718 if (grandMotherLab > -1){
2732 if (Photon->GetMother()> -1){
2733 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
2749 Int_t secondaryClass = -1;
2757 if (secondaryClass == 2) {
2761 }
else if (secondaryClass == 5) {
2765 }
else if (secondaryClass == 3) {
2769 }
else if (secondaryClass == 4) {
2778 if (secondaryClass == 2) {
2782 }
else if (secondaryClass == 5) {
2786 }
else if (secondaryClass == 3) {
2790 }
else if (secondaryClass == 4) {
2806 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2807 Double_t mcProdVtxX = primVtxMC->GetX();
2808 Double_t mcProdVtxY = primVtxMC->GetY();
2809 Double_t mcProdVtxZ = primVtxMC->GetZ();
2811 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2812 if (AODMCTrackArray == NULL)
return;
2815 for(Long_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
2817 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
2818 if (!particle)
continue;
2823 Int_t isMCFromMBHeader = -1;
2832 if(particle->GetMother() >-1){
2833 switch((static_cast<AliAODMCParticle*>(AODMCTrackArray->At(particle->GetMother())))->GetPdgCode()){
2863 if (particle->E() != TMath::Abs(particle->Pz())){
2864 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
2866 if( !(ratio <= 0) ){
2871 if ( particle->GetPdgCode() == 211 ){
2873 }
else if ( particle->GetPdgCode() == -211 ){
2875 }
else if ( particle->GetPdgCode() == 321 ){
2877 }
else if ( particle->GetPdgCode() == -321 ){
2879 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
2881 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
2883 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
2890 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
2891 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
2894 if (particle->Pt()>0.005){
2901 if (particle->E() != TMath::Abs(particle->Pz())){
2902 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
2904 if( !(ratio <= 0) ){
2908 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
2909 alpha = TMath::Abs((daughter0->E() - daughter1->E()))/(daughter0->E() + daughter1->E());
2912 if(particle->GetPdgCode() == 111){
2921 }
else if(particle->GetPdgCode() == 221){
2936 if(particle->GetPdgCode() == 111){
2939 }
else if(particle->GetPdgCode() == 221){
2948 Int_t isMCFromMBHeader = -1;
2956 if(particle->GetMother() >-1){
2957 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
2958 if(tmpMother->GetMother() >-1){
2959 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
2960 if(tmpGrandMother->GetPdgCode() == 310) {
2962 }
else if (tmpGrandMother->GetPdgCode() == 130) {
2964 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
2966 }
else if (tmpGrandMother->GetPdgCode() == 221) {
2969 if( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
2983 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
2984 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
2985 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
2986 Int_t pdgCode = mother->GetPdgCode();
2987 if(particle->GetPdgCode() == 111){
2991 }
else if(particle->GetPdgCode() == 221){
3000 if(particle->GetPdgCode() == 111){
3013 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3014 Double_t mcProdVtxX = primVtxMC->GetX();
3015 Double_t mcProdVtxY = primVtxMC->GetY();
3016 Double_t mcProdVtxZ = primVtxMC->GetZ();
3019 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
3022 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3023 if (!particle)
continue;
3025 Int_t isMCFromMBHeader = -1;
3034 if(particle->GetMother(0) >-1){
3035 switch(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()){
3065 if (particle->Energy() != TMath::Abs(particle->Pz())){
3066 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3068 if( !(ratio <= 0) ){
3073 if ( particle->GetPdgCode() == 211 ){
3075 }
else if ( particle->GetPdgCode() == -211 ){
3077 }
else if ( particle->GetPdgCode() == 321 ){
3079 }
else if ( particle->GetPdgCode() == -321 ){
3081 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3083 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3085 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3092 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3093 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3097 if (particle->Pt()>0.005){
3103 if (particle->Energy() != TMath::Abs(particle->Pz())){
3104 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3106 if( !(ratio <= 0) ){
3110 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3111 alpha = TMath::Abs((daughter0->Energy() - daughter1->Energy()))/(daughter0->Energy() + daughter1->Energy());
3114 if(particle->GetPdgCode() == 111){
3123 }
else if(particle->GetPdgCode() == 221){
3138 if( kDaughter0IsPrim && kDaughter1IsPrim &&
3141 if(particle->GetPdgCode() == 111){
3144 }
else if(particle->GetPdgCode() == 221){
3153 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3154 if (!particle)
continue;
3156 Int_t isMCFromMBHeader = -1;
3164 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3165 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3167 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3169 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3171 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 221) {
3174 if ( !(TMath::Abs(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()) == 11 &&
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 22) )
3185 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3186 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3188 if(particle->GetFirstMother() > -1) pdgCode = ((TParticle*)
fMCEvent->Particle( particle->GetFirstMother() ))->GetPdgCode();
3190 if(particle->GetPdgCode() == 111){
3194 }
else if(particle->GetPdgCode() == 221){
3202 if(particle->GetPdgCode() == 111){
3222 if (gamma0==NULL)
continue;
3228 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fClusterCandidates->GetEntries();secondGammaIndex++){
3230 if (gamma1==NULL)
continue;
3237 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
3247 if ( pi0cand->M() > 0.05 && pi0cand->M() < 0.17){
3253 if ( pi0cand->M() > 0.45 && pi0cand->M() < 0.65){
3321 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3322 Double_t mcProdVtxX = primVtxMC->GetX();
3323 Double_t mcProdVtxY = primVtxMC->GetY();
3324 Double_t mcProdVtxZ = primVtxMC->GetZ();
3327 Bool_t isTruePi0 = kFALSE;
3328 Bool_t isTrueEta = kFALSE;
3330 Bool_t isSameConvertedGamma = kFALSE;
3331 Int_t convertedPhotonLabel0 = -1;
3332 Int_t convertedPhotonLabel1 = -1;
3335 Int_t gamma0MotherLabel = -1;
3337 TParticle * gammaMC0 = 0x0;
3338 if(gamma0MCLabel != -1){
3339 gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
3343 gamma0MotherLabel=gammaMC0->GetMother(0);
3345 if (TrueGammaCandidate0->
IsConversion() && (gammaMC0->GetMother(0) > -1)){
3346 convertedPhotonLabel0 = gammaMC0->GetMother(0);
3347 gamma0MotherLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
3349 gamma0MotherLabel=gammaMC0->GetMother(0);
3354 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
3357 Int_t gamma1MotherLabel = -1;
3360 TParticle * gammaMC1 = 0x0;
3361 if(gamma1MCLabel != -1){
3363 gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
3367 gamma1MotherLabel = gammaMC1->GetMother(0);
3371 convertedPhotonLabel1 = gammaMC1->GetMother(0);
3373 if(convertedPhotonLabel1 > -1) gamma1MotherLabel =
fMCEvent->Particle(convertedPhotonLabel1)->GetMother(0);
3375 gamma1MotherLabel=gammaMC1->GetMother(0);
3382 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3383 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
3386 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 221){
3393 fPt = Pi0Candidate->Pt();
3398 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
3403 Double_t scaling = (375 - TMath::Sqrt(vertex[0]*vertex[0]+vertex[1]*vertex[1]))/(TMath::Sqrt(Pi0Candidate->Px()*Pi0Candidate->Px()+Pi0Candidate->Py()*Pi0Candidate->Py()));
3404 vertex[0] = vertex[0] + scaling*Pi0Candidate->Px();
3405 vertex[1] = vertex[1] + scaling*Pi0Candidate->Py();
3406 vertex[2] = vertex[2] + scaling*Pi0Candidate->Pz();
3410 TClonesArray * arrClustersMesonCand = NULL;
3412 arrClustersMesonCand = dynamic_cast<TClonesArray*>(
fInputEvent->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
3414 AliVCluster* clus1 = NULL;
3416 if(arrClustersMesonCand)
3417 clus1 =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate0->
GetCaloClusterRef()));
3420 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
3421 if(arrClustersMesonCand)
3422 clus1 =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate0->
GetCaloClusterRef()));
3428 TLorentzVector clusterVector1;
3429 clus1->GetMomentum(clusterVector1,vertex);
3431 TLorentzVector* tmpvec1 =
new TLorentzVector();
3432 tmpvec1->SetPxPyPzE(clusterVector1.Px(),clusterVector1.Py(),clusterVector1.Pz(),clusterVector1.E());
3435 if(!PhotonCandidate1)
return;
3438 AliVCluster* clus2 = NULL;
3440 if(arrClustersMesonCand)
3441 clus2 =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate1->
GetCaloClusterRef()));
3444 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
3445 if(arrClustersMesonCand)
3446 clus2 =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate1->
GetCaloClusterRef()));
3452 TLorentzVector clusterVector2;
3453 clus2->GetMomentum(clusterVector2,vertex);
3454 TLorentzVector* tmpvec2 =
new TLorentzVector();
3455 tmpvec2->SetPxPyPzE(clusterVector2.Px(),clusterVector2.Py(),clusterVector2.Pz(),clusterVector2.E());
3458 if(!PhotonCandidate2)
return;
3465 delete PhotonCandidate1;
3466 delete PhotonCandidate2;
3473 if (convertedPhotonLabel0 > -1 && convertedPhotonLabel1 > -1){
3474 if (convertedPhotonLabel0==convertedPhotonLabel1){
3475 isSameConvertedGamma = kTRUE;
3483 if(isTruePi0 || isTrueEta){
3592 if (!isSameConvertedGamma ){
3605 if (!isSameConvertedGamma ){
3620 if ( Pi0Candidate->M() > 0.05 && Pi0Candidate->M() < 0.17){
3625 }
else if (isTrueEta){
3626 if ( Pi0Candidate->M() > 0.45 && Pi0Candidate->M() < 0.65){
3636 Long_t secMotherLabel = -1;
3637 if(gamma0MotherLabel > -1) secMotherLabel = ((TParticle*)
fMCEvent->Particle(gamma0MotherLabel))->GetMother(0);
3645 if (secMotherLabel >-1){
3646 if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==310 && isTruePi0){
3653 }
else if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==130 && isTruePi0){
3657 }
else if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==221 && isTruePi0){
3664 }
else if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==3122 && isTruePi0){
3671 }
else if (isTruePi0){
3676 }
else if (isTrueEta){
3687 if (((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->Pt()>0.005){
3702 }
else if (isTrueEta){
3723 }
else if(!isTruePi0 && !isTrueEta){
3725 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3728 if( ((((TParticle*)
fMCEvent->Particle(gamma0MotherLabel))->GetPdgCode() == 111
3729 || ((TParticle*)
fMCEvent->Particle(gamma0MotherLabel))->GetPdgCode() == 221)
3732 ((((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111
3733 || ((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 221)
3737 }
else if( (TrueGammaCandidate0->E()/Pi0Candidate->E() > 0.7) || (TrueGammaCandidate1->E()/Pi0Candidate->E() > 0.7) ){
3750 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3751 Double_t mcProdVtxX = primVtxMC->GetX();
3752 Double_t mcProdVtxY = primVtxMC->GetY();
3753 Double_t mcProdVtxZ = primVtxMC->GetZ();
3756 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3757 if (AODMCTrackArray == NULL)
return;
3759 Bool_t isTruePi0 = kFALSE;
3760 Bool_t isTrueEta = kFALSE;
3761 Bool_t isSameConvertedGamma = kFALSE;
3762 Int_t convertedPhotonLabel0 = -1;
3763 Int_t convertedPhotonLabel1 = -1;
3766 Int_t gamma0MotherLabel = -1;
3769 AliAODMCParticle * gammaMC0 = 0x0;
3770 if(gamma0MCLabel != -1){
3772 gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
3776 gamma0MotherLabel=gammaMC0->GetMother();
3779 convertedPhotonLabel0 = gammaMC0->GetMother();
3780 AliAODMCParticle * gammaGrandMotherMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gammaMC0->GetMother()));
3781 gamma0MotherLabel=gammaGrandMotherMC0->GetMother();
3782 }
else gamma0MotherLabel=gammaMC0->GetMother();
3788 Int_t gamma1MotherLabel = -1;
3791 AliAODMCParticle *gammaMC1 = 0x0;
3792 if(gamma1MCLabel != -1){
3794 gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
3798 gamma1MotherLabel=gammaMC1->GetMother();
3801 convertedPhotonLabel1 = gammaMC1->GetMother();
3802 AliAODMCParticle * gammaGrandMotherMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gammaMC1->GetMother()));
3803 gamma1MotherLabel=gammaGrandMotherMC1->GetMother();
3804 }
else gamma1MotherLabel=gammaMC1->GetMother();
3809 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3810 if(((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 111){
3813 if(((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 221){
3818 if (convertedPhotonLabel0 > -1 && convertedPhotonLabel1 > 1){
3819 if (convertedPhotonLabel0==convertedPhotonLabel1){
3820 isSameConvertedGamma = kTRUE;
3828 if(isTruePi0 || isTrueEta){
3933 if (!isSameConvertedGamma ){
3946 if (!isSameConvertedGamma ){
3961 if ( Pi0Candidate->M() > 0.05 && Pi0Candidate->M() < 0.17){
3966 }
else if (isTrueEta){
3967 if ( Pi0Candidate->M() > 0.45 && Pi0Candidate->M() < 0.65){
3977 Long_t secMotherLabel =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->GetMother();