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 fHistoNGammaCandidatesBasic(NULL),
263 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
264 fHistoSPDClusterTrackletBackground(NULL),
265 fHistoNV0Tracks(NULL),
266 fProfileEtaShift(NULL),
267 fProfileJetJetXSection(NULL),
268 fHistoJetJetNTrials(NULL),
269 tTrueInvMassROpenABPtFlag(NULL),
276 tSigInvMassPtAlphaTheta(NULL),
277 tBckInvMassPtAlphaTheta(NULL),
278 fInvMassTreeInvMass(0),
280 fInvMassTreeAlpha(0),
281 fInvMassTreeTheta(0),
282 fInvMassTreeMixPool(0),
283 fInvMassTreeZVertex(0),
285 tClusterEOverP(NULL),
290 fClusterLeadCellID(0),
291 fClusterClassification(0),
299 fClusterIsoSumClusterEt(0),
300 fClusterIsoSumTrackEt(0),
303 fEventPlaneAngle(-100),
308 fDoLightOutput(kFALSE),
309 fDoMesonAnalysis(kTRUE),
312 fIsFromDesiredHeader(kTRUE),
313 fIsOverlappingWithOtherHeader(kFALSE),
316 fSetPlotHistsExtQA(kFALSE),
318 fDoInOutTimingCluster(kFALSE),
319 fMinTimingCluster(0),
320 fMaxTimingCluster(0),
321 fEnableSortForClusMC(kFALSE),
322 fProduceCellIDPlots(kFALSE),
323 fProduceTreeEOverP(kFALSE),
325 fFileNameBroken(NULL),
326 tClusterQATree(NULL),
327 fCloseHighPtClusters(NULL),
329 fAllowOverlapHeaders(kTRUE),
330 fNCurrentClusterBasic(0)
339 fV0ReaderName(
"V0ReaderV1"),
340 fCorrTaskSetting(
""),
351 fClusterTreeList(NULL),
353 fClusterCandidates(NULL),
354 fEventCutArray(NULL),
356 fClusterCutArray(NULL),
357 fCaloPhotonCuts(NULL),
358 fMesonCutArray(NULL),
360 fHistoMotherInvMassPt(NULL),
361 fSparseMotherInvMassPtZM(NULL),
362 fHistoMotherBackInvMassPt(NULL),
363 fSparseMotherBackInvMassPtZM(NULL),
364 fHistoMotherInvMassPtAlpha(NULL),
365 fHistoMotherBackInvMassPtAlpha(NULL),
366 fHistoMotherPi0PtY(NULL),
367 fHistoMotherEtaPtY(NULL),
368 fHistoMotherPi0PtAlpha(NULL),
369 fHistoMotherEtaPtAlpha(NULL),
370 fHistoMotherPi0PtOpenAngle(NULL),
371 fHistoMotherEtaPtOpenAngle(NULL),
372 fHistoMotherPi0NGoodESDTracksPt(NULL),
373 fHistoMotherEtaNGoodESDTracksPt(NULL),
374 fHistoClusGammaPt(NULL),
375 fHistoClusGammaE(NULL),
376 fHistoClusOverlapHeadersGammaPt(NULL),
377 fHistoClusAllHeadersGammaPt(NULL),
378 fHistoClusRejectedHeadersGammaPt(NULL),
379 fHistoClusGammaPtM02(NULL),
380 fHistoMCHeaders(NULL),
381 fHistoMCAllGammaPt(NULL),
382 fHistoMCAllSecondaryGammaPt(NULL),
383 fHistoMCDecayGammaPi0Pt(NULL),
384 fHistoMCDecayGammaRhoPt(NULL),
385 fHistoMCDecayGammaEtaPt(NULL),
386 fHistoMCDecayGammaOmegaPt(NULL),
387 fHistoMCDecayGammaEtapPt(NULL),
388 fHistoMCDecayGammaPhiPt(NULL),
389 fHistoMCDecayGammaSigmaPt(NULL),
391 fHistoMCPi0WOWeightPt(NULL),
392 fHistoMCPi0WOEvtWeightPt(NULL),
394 fHistoMCEtaWOWeightPt(NULL),
395 fHistoMCEtaWOEvtWeightPt(NULL),
396 fHistoMCPi0InAccPt(NULL),
397 fHistoMCEtaInAccPt(NULL),
398 fHistoMCPi0WOEvtWeightInAccPt(NULL),
399 fHistoMCEtaWOEvtWeightInAccPt(NULL),
400 fHistoMCPi0PtY(NULL),
401 fHistoMCEtaPtY(NULL),
402 fHistoMCPi0PtAlpha(NULL),
403 fHistoMCEtaPtAlpha(NULL),
404 fHistoMCPrimaryPtvsSource(NULL),
405 fHistoMCSecPi0PtvsSource(NULL),
406 fHistoMCSecPi0Source(NULL),
407 fHistoMCSecPi0InAccPtvsSource(NULL),
408 fHistoMCSecEtaPt(NULL),
409 fHistoMCSecEtaSource(NULL),
410 fHistoMCPi0PtJetPt(NULL),
411 fHistoMCEtaPtJetPt(NULL),
412 fHistoTruePi0InvMassPt(NULL),
413 fHistoTrueEtaInvMassPt(NULL),
414 fHistoTruePi0CaloPhotonInvMassPt(NULL),
415 fHistoTrueEtaCaloPhotonInvMassPt(NULL),
416 fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
417 fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
418 fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt(NULL),
419 fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt(NULL),
420 fHistoTruePi0CaloElectronInvMassPt(NULL),
421 fHistoTrueEtaCaloElectronInvMassPt(NULL),
422 fHistoTruePi0CaloMergedClusterInvMassPt(NULL),
423 fHistoTrueEtaCaloMergedClusterInvMassPt(NULL),
424 fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL),
425 fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL),
426 fHistoTruePi0NonMergedElectronPhotonInvMassPt(NULL),
427 fHistoTruePi0NonMergedElectronMergedPhotonInvMassPt(NULL),
428 fHistoTruePi0Category1(NULL),
429 fHistoTrueEtaCategory1(NULL),
430 fHistoTruePi0Category2(NULL),
431 fHistoTrueEtaCategory2(NULL),
432 fHistoTruePi0Category3(NULL),
433 fHistoTrueEtaCategory3(NULL),
434 fHistoTruePi0Category4_6(NULL),
435 fHistoTrueEtaCategory4_6(NULL),
436 fHistoTruePi0Category5(NULL),
437 fHistoTrueEtaCategory5(NULL),
438 fHistoTruePi0Category7(NULL),
439 fHistoTrueEtaCategory7(NULL),
440 fHistoTruePi0Category8(NULL),
441 fHistoTrueEtaCategory8(NULL),
442 fHistoTruePrimaryPi0InvMassPt(NULL),
443 fHistoTruePrimaryEtaInvMassPt(NULL),
444 fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL),
445 fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL),
446 fProfileTruePrimaryPi0WeightsInvMassPt(NULL),
447 fProfileTruePrimaryEtaWeightsInvMassPt(NULL),
448 fHistoTruePrimaryPi0MCPtResolPt(NULL),
449 fHistoTruePrimaryEtaMCPtResolPt(NULL),
450 fHistoTrueSecondaryPi0InvMassPt(NULL),
451 fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
452 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
453 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
454 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
455 fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
456 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
457 fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL),
458 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
459 fHistoTrueBckGGInvMassPt(NULL),
460 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
461 fHistoTrueBckAsymEClustersInvMassPt(NULL),
462 fHistoTrueBckContInvMassPt(NULL),
463 fHistoTruePi0PtY(NULL),
464 fHistoTrueEtaPtY(NULL),
465 fHistoTruePi0PtAlpha(NULL),
466 fHistoTrueEtaPtAlpha(NULL),
467 fHistoTruePi0PtOpenAngle(NULL),
468 fHistoTrueEtaPtOpenAngle(NULL),
469 fHistoClusPhotonBGPt(NULL),
470 fHistoClusPhotonPlusConvBGPt(NULL),
471 fHistoClustPhotonElectronBGPtM02(NULL),
472 fHistoClustPhotonPionBGPtM02(NULL),
473 fHistoClustPhotonKaonBGPtM02(NULL),
474 fHistoClustPhotonK0lBGPtM02(NULL),
475 fHistoClustPhotonNeutronBGPtM02(NULL),
476 fHistoClustPhotonRestBGPtM02(NULL),
477 fHistoClustPhotonPlusConvElectronBGPtM02(NULL),
478 fHistoClustPhotonPlusConvPionBGPtM02(NULL),
479 fHistoClustPhotonPlusConvKaonBGPtM02(NULL),
480 fHistoClustPhotonPlusConvK0lBGPtM02(NULL),
481 fHistoClustPhotonPlusConvNeutronBGPtM02(NULL),
482 fHistoClustPhotonPlusConvRestBGPtM02(NULL),
483 fHistoTrueClusGammaPt(NULL),
484 fHistoTrueClusUnConvGammaPt(NULL),
485 fHistoTrueClusUnConvGammaMCPt(NULL),
486 fHistoTrueClusGammaPtM02(NULL),
487 fHistoTrueClusUnConvGammaPtM02(NULL),
488 fHistoTrueClusElectronPt(NULL),
489 fHistoTrueClusConvGammaPt(NULL),
490 fHistoTrueClusConvGammaMCPt(NULL),
491 fHistoTrueClusConvGammaFullyPt(NULL),
492 fHistoTrueClusMergedGammaPt(NULL),
493 fHistoTrueClusMergedPartConvGammaPt(NULL),
494 fHistoTrueClusDalitzPt(NULL),
495 fHistoTrueClusDalitzMergedPt(NULL),
496 fHistoTrueClusPhotonFromElecMotherPt(NULL),
497 fHistoTrueClusShowerPt(NULL),
498 fHistoTrueClusSubLeadingPt(NULL),
499 fHistoTrueClusNParticles(NULL),
500 fHistoTrueClusEMNonLeadingPt(NULL),
501 fHistoTrueNLabelsInClus(NULL),
502 fHistoTruePrimaryClusGammaPt(NULL),
503 fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
504 fHistoTruePrimaryClusConvGammaPt(NULL),
505 fHistoTruePrimaryClusConvGammaESDPtMCPt(NULL),
506 fHistoTrueSecondaryClusGammaPt(NULL),
507 fHistoTrueSecondaryClusConvGammaPt(NULL),
508 fHistoTrueSecondaryClusGammaMCPt(NULL),
509 fHistoTrueSecondaryClusConvGammaMCPt(NULL),
510 fHistoTrueSecondaryClusGammaFromXFromK0sMCPtESDPt(NULL),
511 fHistoTrueSecondaryClusConvGammaFromXFromK0sMCPtESDPt(NULL),
512 fHistoTrueSecondaryClusGammaFromXFromK0lMCPtESDPt(NULL),
513 fHistoTrueSecondaryClusConvGammaFromXFromK0lMCPtESDPt(NULL),
514 fHistoTrueSecondaryClusGammaFromXFromLambdaMCPtESDPt(NULL),
515 fHistoTrueSecondaryClusConvGammaFromXFromLambdaMCPtESDPt(NULL),
516 fHistoDoubleCountTruePi0InvMassPt(NULL),
517 fHistoDoubleCountTrueEtaInvMassPt(NULL),
518 fHistoDoubleCountTrueClusterGammaPt(NULL),
519 fVectorDoubleCountTruePi0s(0),
520 fVectorDoubleCountTrueEtas(0),
521 fVectorDoubleCountTrueClusterGammas(0),
522 fHistoMultipleCountTrueClusterGamma(NULL),
523 fMapMultipleCountTrueClusterGammas(),
524 fHistoTruePi0InvMassPtAlpha(NULL),
525 fHistoTruePi0PureGammaInvMassPtAlpha(NULL),
526 fHistCellIDvsClusterEnergy(NULL),
527 fHistCellIDvsClusterEnergyMax(NULL),
529 fHistoNEventsWOWeight(NULL),
530 fHistoNGoodESDTracks(NULL),
532 fHistoNGammaCandidates(NULL),
533 fHistoNGammaCandidatesBasic(NULL),
534 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
535 fHistoSPDClusterTrackletBackground(NULL),
536 fHistoNV0Tracks(NULL),
537 fProfileEtaShift(NULL),
538 fProfileJetJetXSection(NULL),
539 fHistoJetJetNTrials(NULL),
540 tTrueInvMassROpenABPtFlag(NULL),
547 tSigInvMassPtAlphaTheta(NULL),
548 tBckInvMassPtAlphaTheta(NULL),
549 fInvMassTreeInvMass(0),
551 fInvMassTreeAlpha(0),
552 fInvMassTreeTheta(0),
553 fInvMassTreeMixPool(0),
554 fInvMassTreeZVertex(0),
556 tClusterEOverP(NULL),
561 fClusterLeadCellID(0),
562 fClusterClassification(0),
570 fClusterIsoSumClusterEt(0),
571 fClusterIsoSumTrackEt(0),
574 fEventPlaneAngle(-100),
579 fDoLightOutput(kFALSE),
580 fDoMesonAnalysis(kTRUE),
583 fIsFromDesiredHeader(kTRUE),
584 fIsOverlappingWithOtherHeader(kFALSE),
587 fSetPlotHistsExtQA(kFALSE),
589 fDoInOutTimingCluster(kFALSE),
590 fMinTimingCluster(0),
591 fMaxTimingCluster(0),
592 fEnableSortForClusMC(kFALSE),
593 fProduceCellIDPlots(kFALSE),
594 fProduceTreeEOverP(kFALSE),
596 fFileNameBroken(NULL),
597 tClusterQATree(NULL),
598 fCloseHighPtClusters(NULL),
600 fAllowOverlapHeaders(kTRUE),
601 fNCurrentClusterBasic(0)
604 DefineOutput(1, TList::Class());
621 const Int_t nDim = 4;
622 Int_t nBins[nDim] = {800,350,7,6};
644 if(collisionSystem == 1 || collisionSystem == 2 ||
645 collisionSystem == 5 || collisionSystem == 8 ||
646 collisionSystem == 9){
647 centMin = centMin*10;
648 centMax = centMax*10;
649 if(centMax ==0 && centMax!=centMin) centMax=100;
650 }
else if(collisionSystem == 3 || collisionSystem == 6){
653 }
else if(collisionSystem == 4 || collisionSystem == 7){
654 centMin = ((centMin*5)+45);
655 centMax = ((centMax*5)+45);
660 fBackList[iCut]->SetName(Form(
"%s_%s_%s Back histograms",cutstringEvent.Data(),cutstringCalo.Data(), cutstringMeson.Data()));
668 fMotherList[iCut]->SetName(Form(
"%s_%s_%s Mother histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
672 fSparseMotherInvMassPtZM[iCut] =
new THnSparseF(
"Back_Mother_InvMass_Pt_z_m",
"Back_Mother_InvMass_Pt_z_m", nDim,nBins,xMin,xMax);
678 collisionSystem,centMin,centMax,
690 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
695 }
else if (
fIsMC == 3){
704 Int_t nBinsQAPt = 175;
706 Int_t nBinsClusterPt = 500;
716 for(
Int_t i=0; i<nBinsPt+1;i++){
717 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
721 for(
Int_t i=0; i<nBinsQAPt+1;i++){
722 if(i<60) arrQAPtBinning[i] = 0.05*i;
723 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
724 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
725 else if(i<190) arrQAPtBinning[i] = 20.+1.0*(i-170);
726 else arrQAPtBinning[i] = maxQAPt;
728 nBinsClusterPt = 800;
731 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
732 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
741 for(
Int_t i=0; i<nBinsPt+1;i++){
742 if (i < 1) arrPtBinning[i] = 0.5*i;
743 else if(i<51) arrPtBinning[i] = 0.5+0.05*(i-1);
744 else if(i<121) arrPtBinning[i] = 3.+0.1*(i-51);
745 else if(i<161) arrPtBinning[i] = 10.+0.25*(i-121);
746 else if(i<201) arrPtBinning[i] = 20.+0.5*(i-161);
747 else if(i<261) arrPtBinning[i] = 40.+1.0*(i-201);
748 else arrPtBinning[i] = maxPt;
752 for(
Int_t i=0; i<nBinsQAPt+1;i++){
753 if(i<60) arrQAPtBinning[i] = 0.05*i;
754 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
755 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
756 else if(i<210) arrQAPtBinning[i] = 20.+0.5*(i-170);
757 else if(i<270) arrQAPtBinning[i] = 40.+1.0*(i-210);
758 else arrQAPtBinning[i] = maxQAPt;
760 nBinsClusterPt = 301;
763 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
764 if (i < 1) arrClusPtBinning[i] = 0.3*i;
765 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
766 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
767 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
768 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
769 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
770 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
771 else arrClusPtBinning[i] = maxClusterPt;
780 for(
Int_t i=0; i<nBinsPt+1;i++){
781 if (i < 1) arrPtBinning[i] = 0.5*i;
782 else if(i<51) arrPtBinning[i] = 0.5+0.05*(i-1);
783 else if(i<121) arrPtBinning[i] = 3.+0.1*(i-51);
784 else if(i<161) arrPtBinning[i] = 10.+0.25*(i-121);
785 else if(i<201) arrPtBinning[i] = 20.+1.0*(i-161);
786 else arrPtBinning[i] = maxPt;
790 for(
Int_t i=0; i<nBinsQAPt+1;i++){
791 if(i<60) arrQAPtBinning[i] = 0.05*i;
792 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
793 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
794 else if(i<210) arrQAPtBinning[i] = 20.+1.0*(i-170);
795 else arrQAPtBinning[i] = maxQAPt;
797 nBinsClusterPt = 301;
800 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
801 if (i < 1) arrClusPtBinning[i] = 0.3*i;
802 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
803 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
804 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
805 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
806 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
807 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
808 else arrClusPtBinning[i] = maxClusterPt;
814 for(
Int_t i=0; i<nBinsPt+1;i++){
815 if (i < 1) arrPtBinning[i] = 0.5*i;
816 else if(i<56) arrPtBinning[i] = 0.5+0.1*(i-1);
817 else if(i<80) arrPtBinning[i] = 6.+0.25*(i-56);
818 else if(i<88) arrPtBinning[i] = 12.+1.0*(i-80);
819 else arrPtBinning[i] = maxPt;
823 for(
Int_t i=0; i<nBinsQAPt+1;i++){
824 if(i<60) arrQAPtBinning[i] = 0.1*i;
825 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
826 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
827 else arrQAPtBinning[i] = maxQAPt;
829 nBinsClusterPt = 148;
832 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
833 if (i < 1) arrClusPtBinning[i] = 0.3*i;
834 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
835 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
836 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
837 else arrClusPtBinning[i] = maxClusterPt;
843 for(
Int_t i=0; i<nBinsPt+1;i++){
844 if (i < 1) arrPtBinning[i] = 0.5*i;
845 else if(i<56) arrPtBinning[i] = 0.5+0.1*(i-1);
846 else if(i<80) arrPtBinning[i] = 6.+0.25*(i-56);
847 else if(i<88) arrPtBinning[i] = 12.+1.0*(i-80);
848 else arrPtBinning[i] = maxPt;
852 for(
Int_t i=0; i<nBinsQAPt+1;i++){
853 if(i<60) arrQAPtBinning[i] = 0.1*i;
854 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
855 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
856 else arrQAPtBinning[i] = maxQAPt;
858 nBinsClusterPt = 148;
861 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
862 if (i < 1) arrClusPtBinning[i] = 0.3*i;
863 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
864 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
865 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
866 else arrClusPtBinning[i] = maxClusterPt;
869 for(
Int_t i=0; i<nBinsPt+1;i++){
870 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
872 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
873 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
875 for(
Int_t i=0; i<nBinsQAPt+1;i++){
876 if(i<60) arrQAPtBinning[i] = 0.05*i;
877 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
878 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
879 else if(i<175) arrQAPtBinning[i] = 20.+1.0*(i-170);
880 else arrQAPtBinning[i] = maxQAPt;
970 TString cutstringMeson =
"NoMesonCut";
975 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s_%s", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
979 fESDList[iCut]->SetName(Form(
"%s_%s_%s ESD histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
983 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents", 14, -0.5, 13.5);
985 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
986 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
988 TString TriggerNames =
"Not Trigger: ";
990 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
995 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
996 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,
"SPD Pile-Up");
999 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problems");
1000 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
1001 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
1002 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
1003 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
1012 TString TriggerNames =
"Not Trigger: ";
1047 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ", 200, -10, 10);
1085 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 30000, 0, 30000);
1087 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 2500, 0, 2500);
1089 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 1500, 0, 1500);
1095 fProfileEtaShift[iCut] =
new TProfile(
"Eta Shift",
"Eta Shift", 1, -0.5, 0.5);
1114 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1117 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E", nBinsClusterPt, arrClusPtBinning);
1123 fHistoClusAllHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaAllHeaders_Pt",
"ClusGammaAllHeaders_Pt", nBinsClusterPt, arrClusPtBinning);
1130 fHistoClusGammaPtM02[iCut] =
new TH2F(
"ClusGamma_Pt_M02",
"ClusGamma_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1146 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
1155 fHistoMotherInvMassPtAlpha[iCut] =
new TH2F(
"ESD_Mother_InvMass_vs_Pt_Alpha",
"ESD_Mother_InvMass_vs_Pt_Alpha", 800, 0, 0.8, nBinsPt, arrPtBinning);
1175 fHistoMotherPi0PtY[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Y",
"ESD_MotherPi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1179 fHistoMotherEtaPtY[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Y",
"ESD_MotherEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1183 fHistoMotherPi0PtAlpha[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Alpha",
"ESD_MotherPi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1187 fHistoMotherEtaPtAlpha[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Alpha",
"ESD_MotherEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1237 Int_t nMaxCells = 12*48*24;
1253 fTreeList[iCut]->SetName(Form(
"%s_%s_%s InvMass Tree", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1280 fClusterTreeList[iCut]->SetName(Form(
"%s_%s EoverP Tree",cutstringEvent.Data(),cutstringCalo.Data()));
1284 tClusterEOverP[iCut] =
new TTree(
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt",
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt");
1500 TString cutstringMeson =
"NoMesonCut";
1505 fMCList[iCut]->SetName(Form(
"%s_%s_%s MC histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1506 fMCList[iCut]->SetOwner(kTRUE);
1513 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1525 fHistoMCDecayGammaPi0Pt[iCut] =
new TH1F(
"MC_DecayGammaPi0_Pt",
"MC_DecayGammaPi0_Pt", nBinsClusterPt, arrClusPtBinning);
1528 fHistoMCDecayGammaRhoPt[iCut] =
new TH1F(
"MC_DecayGammaRho_Pt",
"MC_DecayGammaRho_Pt", nBinsClusterPt, arrClusPtBinning);
1531 fHistoMCDecayGammaEtaPt[iCut] =
new TH1F(
"MC_DecayGammaEta_Pt",
"MC_DecayGammaEta_Pt", nBinsClusterPt, arrClusPtBinning);
1534 fHistoMCDecayGammaOmegaPt[iCut] =
new TH1F(
"MC_DecayGammaOmega_Pt",
"MC_DecayGammaOmmega_Pt", nBinsClusterPt, arrClusPtBinning);
1537 fHistoMCDecayGammaEtapPt[iCut] =
new TH1F(
"MC_DecayGammaEtap_Pt",
"MC_DecayGammaEtap_Pt", nBinsClusterPt, arrClusPtBinning);
1540 fHistoMCDecayGammaPhiPt[iCut] =
new TH1F(
"MC_DecayGammaPhi_Pt",
"MC_DecayGammaPhi_Pt", nBinsClusterPt, arrClusPtBinning);
1543 fHistoMCDecayGammaSigmaPt[iCut] =
new TH1F(
"MC_DecayGammaSigma_Pt",
"MC_DecayGammaSigma_Pt", nBinsClusterPt, arrClusPtBinning);
1561 fHistoMCPi0Pt[iCut] =
new TH1F(
"MC_Pi0_Pt",
"MC_Pi0_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1565 fHistoMCPi0WOWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOWeights_Pt",
"MC_Pi0_WOWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1570 fHistoMCEtaPt[iCut] =
new TH1F(
"MC_Eta_Pt",
"MC_Eta_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1574 fHistoMCEtaWOWeightPt[iCut] =
new TH1F(
"MC_Eta_WOWeights_Pt",
"MC_Eta_WOWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1578 fHistoMCPi0InAccPt[iCut] =
new TH1F(
"MC_Pi0InAcc_Pt",
"MC_Pi0InAcc_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1582 fHistoMCEtaInAccPt[iCut] =
new TH1F(
"MC_EtaInAcc_Pt",
"MC_EtaInAcc_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1589 fHistoMCPi0WOEvtWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOEventWeights_Pt",
"MC_Pi0_WOEventWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1592 fHistoMCEtaWOEvtWeightPt[iCut] =
new TH1F(
"MC_Eta_WOEventWeights_Pt",
"MC_Eta_WOEventWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1602 fHistoMCPi0PtJetPt[iCut] =
new TH2F(
"MC_Pi0_Pt_JetPt",
"MC_Pi0_Pt_JetPt", nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1607 fHistoMCEtaPtJetPt[iCut] =
new TH2F(
"MC_Eta_Pt_JetPt",
"MC_Eta_Pt_JetPt", nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1641 fHistoMCSecEtaPt[iCut] =
new TH1F(
"MC_SecEta_Pt",
"MC_SecEta_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1653 fHistoMCPi0PtY[iCut] =
new TH2F(
"MC_Pi0_Pt_Y",
"MC_Pi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1658 fHistoMCEtaPtY[iCut] =
new TH2F(
"MC_Eta_Pt_Y",
"MC_Eta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1663 fHistoMCPi0PtAlpha[iCut] =
new TH2F(
"MC_Pi0_Pt_Alpha",
"MC_Pi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1667 fHistoMCEtaPtAlpha[iCut] =
new TH2F(
"MC_Eta_Pt_Alpha",
"MC_Eta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1679 fTrueList[iCut]->SetName(Form(
"%s_%s_%s True histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1684 fHistoClusPhotonBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonBG_Pt",
"ESD_TrueClusPhotonBG_Pt", nBinsClusterPt, arrClusPtBinning,10,-0.5,9.5);
1698 fHistoClusPhotonPlusConvBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonPlusConvBG_Pt",
"ESD_TrueClusPhotonPlusConvBG_Pt", nBinsClusterPt, arrClusPtBinning,10,-0.5,9.5);
1718 fHistoClustPhotonPionBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonPionBG_Pt_M02",
"ESD_TrueClusPhotonPionBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1722 fHistoClustPhotonKaonBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonKaonBG_Pt_M02",
"ESD_TrueClusPhotonKaonBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1726 fHistoClustPhotonK0lBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonK0lBG_Pt_M02",
"ESD_TrueClusPhotonK0lBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1730 fHistoClustPhotonNeutronBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonNeutronBG_Pt_M02",
"ESD_TrueClusPhotonNeutronBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1734 fHistoClustPhotonRestBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonRestBG_Pt_M02",
"ESD_TrueClusPhotonRestBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1765 fHistoTrueClusGammaPt[iCut] =
new TH1F(
"TrueClusGamma_Pt",
"ESD_TrueClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1770 fHistoTrueClusGammaPtM02[iCut] =
new TH2F(
"TrueClusGamma_Pt_M02",
"TrueClusGamma_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1775 fHistoTruePrimaryClusGammaPt[iCut] =
new TH1F(
"TruePrimaryClusGamma_Pt",
"ESD_TruePrimaryClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1827 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1832 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1837 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1842 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1847 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1852 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1894 fHistoTrueClusUnConvGammaPt[iCut] =
new TH1F(
"TrueClusUnConvGamma_Pt",
"TrueClusUnConvGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1906 fHistoTrueClusElectronPt[iCut] =
new TH1F(
"TrueClusElectron_Pt",
"TrueElectronGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1909 fHistoTrueClusConvGammaPt[iCut] =
new TH1F(
"TrueClusConvGamma_Pt",
"TrueClusConvGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1912 fHistoTrueClusConvGammaMCPt[iCut] =
new TH1F(
"TrueClusConvGamma_MCPt",
"TrueClusConvGamma_MCPt", nBinsClusterPt, arrClusPtBinning);
1915 fHistoTrueClusConvGammaFullyPt[iCut] =
new TH1F(
"TrueClusConvGammaFullyContained_Pt",
"TrueClusConvGammaFullyContained_Pt", nBinsClusterPt, arrClusPtBinning);
1918 fHistoTrueClusMergedGammaPt[iCut] =
new TH1F(
"TrueClusMergedGamma_Pt",
"TrueClusMergedGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1924 fHistoTrueClusDalitzPt[iCut] =
new TH1F(
"TrueClusDalitz_Pt",
"TrueClusDalitz_Pt", nBinsClusterPt, arrClusPtBinning);
1933 fHistoTrueClusShowerPt[iCut] =
new TH1F(
"TrueClusShower_Pt",
"TrueClusShower_Pt", nBinsClusterPt, arrClusPtBinning);
1936 fHistoTrueClusSubLeadingPt[iCut] =
new TH1F(
"TrueClusSubleading_Pt",
"TrueClusSubleading_Pt", nBinsClusterPt, arrClusPtBinning);
1968 fHistoTruePi0InvMassPt[iCut] =
new TH2F(
"ESD_TruePi0_InvMass_Pt",
"ESD_TruePi0_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
1972 fHistoTrueEtaInvMassPt[iCut] =
new TH2F(
"ESD_TrueEta_InvMass_Pt",
"ESD_TrueEta_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2026 fHistoTruePi0InvMassPtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_InvMass_vs_Pt_Alpha",
"ESD_TruePi0_InvMass_vs_Pt_Alpha", 800, 0, 0.8, nBinsPt, arrPtBinning);
2082 nBinsPt, arrPtBinning);
2087 nBinsPt, arrPtBinning);
2120 nBinsPt, arrPtBinning);
2125 nBinsPt, arrPtBinning);
2135 nBinsPt, arrPtBinning);
2166 fHistoTruePi0PtY[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Y",
"ESD_TruePi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
2170 fHistoTrueEtaPtY[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Y",
"ESD_TrueEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
2174 fHistoTruePi0PtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Alpha",
"ESD_TruePi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
2178 fHistoTrueEtaPtAlpha[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Alpha",
"ESD_TrueEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
2183 fHistoTruePi0PtOpenAngle[iCut] =
new TH2F(
"ESD_TruePi0_Pt_OpenAngle",
"ESD_TruePi0_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 100, 0, 0.5);
2187 fHistoTrueEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_TrueEta_Pt_OpenAngle",
"ESD_TrueEta_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 180, 0, 1.8);
2225 fHistoTruePi0Category1[iCut] =
new TH2F(
"ESD_TruePi0Category1_InvMass_Pt",
"ESD_TruePi0Category1_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2229 fHistoTrueEtaCategory1[iCut] =
new TH2F(
"ESD_TrueEtaCategory1_InvMass_Pt",
"ESD_TrueEtaCategory1_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2233 fHistoTruePi0Category2[iCut] =
new TH2F(
"ESD_TruePi0Category2_InvMass_Pt",
"ESD_TruePi0Category2_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2237 fHistoTrueEtaCategory2[iCut] =
new TH2F(
"ESD_TrueEtaCategory2_InvMass_Pt",
"ESD_TrueEtaCategory2_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2241 fHistoTruePi0Category3[iCut] =
new TH2F(
"ESD_TruePi0Category3_InvMass_Pt",
"ESD_TruePi0Category3_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2245 fHistoTrueEtaCategory3[iCut] =
new TH2F(
"ESD_TrueEtaCategory3_InvMass_Pt",
"ESD_TrueEtaCategory3_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2249 fHistoTruePi0Category4_6[iCut] =
new TH2F(
"ESD_TruePi0Category4_6_InvMass_Pt",
"ESD_TruePi0Category4_6_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2253 fHistoTrueEtaCategory4_6[iCut] =
new TH2F(
"ESD_TrueEtaCategory4_6_InvMass_Pt",
"ESD_TrueEtaCategory4_6_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2257 fHistoTruePi0Category5[iCut] =
new TH2F(
"ESD_TruePi0Category5_InvMass_Pt",
"ESD_TruePi0Category5_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2261 fHistoTrueEtaCategory5[iCut] =
new TH2F(
"ESD_TrueEtaCategory5_InvMass_Pt",
"ESD_TrueEtaCategory5_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2265 fHistoTruePi0Category7[iCut] =
new TH2F(
"ESD_TruePi0Category7_InvMass_Pt",
"ESD_TruePi0Category7_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2269 fHistoTrueEtaCategory7[iCut] =
new TH2F(
"ESD_TrueEtaCategory7_InvMass_Pt",
"ESD_TrueEtaCategory7_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2273 fHistoTruePi0Category8[iCut] =
new TH2F(
"ESD_TruePi0Category8_InvMass_Pt",
"ESD_TruePi0Category8_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2277 fHistoTrueEtaCategory8[iCut] =
new TH2F(
"ESD_TrueEtaCategory8_InvMass_Pt",
"ESD_TrueEtaCategory8_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2285 fTreeList[iCut]->SetName(Form(
"%s_%s_%s True ClusterComb tree", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
2318 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
2358 fstream fOutputLocalDebug;
2359 fOutputLocalDebug.open(
"debugOutput.txt",ios::out);
2360 fOutputLocalDebug.close();
2386 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
2407 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
2408 if(eventQuality == 2 || eventQuality == 3){
2429 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
2438 Bool_t isRunningEMCALrelAna = kFALSE;
2447 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
2467 Bool_t triggered = kTRUE;
2468 if(eventNotAccepted){
2472 if (eventNotAccepted==3 &&
fIsMC>0){
2479 if(eventQuality != 0){
2485 if (triggered == kTRUE) {
2505 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2515 if (nameBin.CompareTo(
"")== 0){
2517 ->GetAcceptedHeader())->At(i))->GetString();
2518 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
2532 if (triggered==kFALSE)
continue;
2573 TClonesArray * arrClustersProcess = NULL;
2579 if(!arrClustersProcess)
2580 AliFatal(Form(
"%sClustersBranch was not found in AliAnalysisTaskGammaCalo! Check the correction framework settings!",
fCorrTaskSetting.Data()));
2581 nclus = arrClustersProcess->GetEntries();
2584 if(nclus == 0)
return;
2593 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
2596 Int_t maxClusterID = -1;
2597 map<Long_t,Int_t> mapIsClusterAccepted;
2598 map<Long_t,Int_t> mapIsClusterAcceptedWithoutTrackMatch;
2600 for(Long_t i = 0; i < nclus; i++){
2601 AliVCluster* clus = NULL;
2603 if(arrClustersProcess)
2604 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2606 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2607 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2608 if(arrClustersProcess)
2609 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2611 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2624 TLorentzVector clusterVector;
2625 clus->GetMomentum(clusterVector,vertex);
2627 TLorentzVector* tmpvec =
new TLorentzVector();
2628 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
2632 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
2636 maxClusterEnergy = clus->E();
2637 maxClusterID = (
Int_t) i;
2640 mapIsClusterAccepted[i] = 1;
2641 mapIsClusterAcceptedWithoutTrackMatch[i] = 1;
2650 Int_t* mclabelsCluster = clus->GetLabels();
2653 if (clus->GetNLabels()>0){
2654 for (
Int_t k =0; k< (
Int_t)clus->GetNLabels(); k++){
2667 if (clus->GetNLabels()>1){
2668 Int_t* mclabelsCluster = clus->GetLabels();
2669 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;
2670 for (
Int_t l = 1; l < (
Int_t)clus->GetNLabels(); l++ ){
2696 delete PhotonCandidate;
2704 for(Long_t i = 0; i < nclus; i++){
2705 if( mapIsClusterAccepted[i] != 1 )
continue;
2707 AliVCluster* clus = NULL;
2709 if(arrClustersProcess)
2710 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2712 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2713 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2714 if(arrClustersProcess)
2715 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2717 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2737 AliError(
"Task needs AOD or ESD event...");
2741 AliESDtrackCuts *EsdTrackCuts = 0x0;
2746 if( (runNumber<=146860) || (runNumber>=197470 && runNumber<=197692) || (runNumber>=172440 && runNumber<=193766) ){
2747 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010();
2749 }
else if (runNumber>=209122){
2750 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2015PbPb();
2753 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011();
2755 EsdTrackCuts->SetMaxDCAToVertexZ(2);
2756 EsdTrackCuts->SetEtaRange(-0.8, 0.8);
2757 EsdTrackCuts->SetPtRange(0.15);
2760 for(Long_t i = 0; i < nclus; i++){
2761 if( mapIsClusterAcceptedWithoutTrackMatch[i] != 1 )
continue;
2763 AliVCluster* clus = NULL;
2765 if(arrClustersProcess)
2766 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2768 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2769 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2770 if(arrClustersProcess)
2771 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2773 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2783 Int_t labelTrackMatch = -1;
2789 AliVTrack* currTrack =
dynamic_cast<AliVTrack*
>(
fInputEvent->GetTrack(labelTrackMatch));
2795 AliESDtrack *esdt =
dynamic_cast<AliESDtrack*
>(currTrack);
2796 if(!EsdTrackCuts->AcceptTrack(esdt)){
2807 AliAODTrack *aodt =
dynamic_cast<AliAODTrack*
>(currTrack);
2808 if(!aodt->IsHybridGlobalConstrainedGlobal()){
2812 if(TMath::Abs(aodt->Eta())>0.8){
2830 Float_t temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kElectron));
2835 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kPion));
2840 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kKaon));
2845 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,
AliPID::kProton));
2857 Float_t clsPos[3] = {0.,0.,0.};
2858 Float_t secondClsPos[3] = {0.,0.,0.};
2859 TLorentzVector clusterVector;
2861 clus->GetPosition(clsPos);
2862 TVector3 clsPosVec(clsPos);
2865 for(
Int_t j=0; j<nclus; j++){
2866 if( i == j )
continue;
2867 if( mapIsClusterAcceptedWithoutTrackMatch[j] != 1 )
continue;
2869 AliVCluster* secondClus = NULL;
2871 if(arrClustersProcess)
2872 secondClus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(j));
2874 secondClus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(j));
2875 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2876 if(arrClustersProcess)
2877 secondClus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(j));
2879 secondClus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(j));
2882 if(!secondClus)
continue;
2883 secondClus->GetPosition(secondClsPos);
2884 TVector3 secondClsPosVec(secondClsPos);
2886 Float_t dPhi = clsPosVec.DeltaPhi(secondClsPosVec);
2887 Float_t dEta = clsPosVec.Eta()-secondClsPosVec.Eta();
2888 if(TMath::Sqrt(dEta*dEta + dPhi*dPhi) < 0.2){
2889 secondClus->GetMomentum(clusterVector,vertex);
2890 sum_Et += clusterVector.Et();
2899 TLorentzVector vecTrack;
2900 vecTrack.SetPxPyPzE(currTrack->Px(),currTrack->Py(),currTrack->Pz(),currTrack->E());
2909 mapIsClusterAcceptedWithoutTrackMatch.clear();
2923 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2924 Double_t mcProdVtxX = primVtxMC->GetX();
2925 Double_t mcProdVtxY = primVtxMC->GetY();
2926 Double_t mcProdVtxZ = primVtxMC->GetZ();
2928 TParticle *Photon = NULL;
2929 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2941 Int_t pdgCodeParticle = Photon->GetPdgCode();
2960 if(Photon->GetMother(0) > -1){
2961 TParticle* motherPart = (TParticle*)
fMCEvent->Particle(Photon->GetMother(0));
2971 if (TruePhotonCandidate->
IsDalitz())
2977 if (TruePhotonCandidate->
IsShower())
2990 Int_t motherLab = Photon->GetMother(0);
2991 if (motherLab > -1){
2998 Int_t grandMotherLab =
fMCEvent->Particle(motherLab)->GetMother(0);
2999 if (grandMotherLab > -1){
3028 Int_t secondaryClass = -1;
3036 if (secondaryClass == 2) {
3040 }
else if (secondaryClass == 5) {
3044 }
else if (secondaryClass == 3) {
3048 }
else if (secondaryClass == 4) {
3057 if (secondaryClass == 2) {
3061 }
else if (secondaryClass == 5) {
3065 }
else if (secondaryClass == 3) {
3069 }
else if (secondaryClass == 4) {
3086 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3087 Double_t mcProdVtxX = primVtxMC->GetX();
3088 Double_t mcProdVtxY = primVtxMC->GetY();
3089 Double_t mcProdVtxZ = primVtxMC->GetZ();
3091 AliAODMCParticle *Photon = NULL;
3092 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3094 if (AODMCTrackArray){
3095 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
3099 AliInfo(
"AODMCTrackArray could not be loaded");
3107 Int_t pdgCodeParticle = Photon->GetPdgCode();
3125 AliAODMCParticle *motherPart = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
3134 if (TruePhotonCandidate->
IsDalitz())
3140 if (TruePhotonCandidate->
IsShower())
3154 Int_t motherLab = Photon->GetMother();
3155 if (motherLab > -1){
3162 Int_t grandMotherLab = ((AliAODMCParticle*) AODMCTrackArray->At(motherLab))->GetMother();
3163 if (grandMotherLab > -1){
3177 if (Photon->GetMother()> -1){
3178 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
3194 Int_t secondaryClass = -1;
3202 if (secondaryClass == 2) {
3206 }
else if (secondaryClass == 5) {
3210 }
else if (secondaryClass == 3) {
3214 }
else if (secondaryClass == 4) {
3223 if (secondaryClass == 2) {
3227 }
else if (secondaryClass == 5) {
3231 }
else if (secondaryClass == 3) {
3235 }
else if (secondaryClass == 4) {
3251 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3252 Double_t mcProdVtxX = primVtxMC->GetX();
3253 Double_t mcProdVtxY = primVtxMC->GetY();
3254 Double_t mcProdVtxZ = primVtxMC->GetZ();
3256 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3257 if (AODMCTrackArray == NULL)
return;
3260 for(Long_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
3262 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
3263 if (!particle)
continue;
3268 Int_t isMCFromMBHeader = -1;
3277 if(particle->GetMother() >-1){
3278 switch((static_cast<AliAODMCParticle*>(AODMCTrackArray->At(particle->GetMother())))->GetPdgCode()){
3308 if (particle->E() != TMath::Abs(particle->Pz())){
3309 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3311 if( !(ratio <= 0) ){
3316 if ( particle->GetPdgCode() == 211 ){
3318 }
else if ( particle->GetPdgCode() == -211 ){
3320 }
else if ( particle->GetPdgCode() == 321 ){
3322 }
else if ( particle->GetPdgCode() == -321 ){
3324 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3326 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3328 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3335 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3336 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3339 if (particle->Pt()>0.005){
3346 if (particle->E() != TMath::Abs(particle->Pz())){
3347 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3349 if( !(ratio <= 0) ){
3353 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3354 alpha = TMath::Abs((daughter0->E() - daughter1->E()))/(daughter0->E() + daughter1->E());
3357 if(particle->GetPdgCode() == 111){
3366 }
else if(particle->GetPdgCode() == 221){
3381 if(particle->GetPdgCode() == 111){
3384 }
else if(particle->GetPdgCode() == 221){
3393 Int_t isMCFromMBHeader = -1;
3401 if(particle->GetMother() >-1){
3402 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3403 if(tmpMother->GetMother() >-1){
3404 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
3405 if(tmpGrandMother->GetPdgCode() == 310) {
3407 }
else if (tmpGrandMother->GetPdgCode() == 130) {
3409 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
3411 }
else if (tmpGrandMother->GetPdgCode() == 221) {
3414 if( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
3428 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3429 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3430 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3431 Int_t pdgCode = mother->GetPdgCode();
3432 if(particle->GetPdgCode() == 111){
3436 }
else if(particle->GetPdgCode() == 221){
3445 if(particle->GetPdgCode() == 111){
3458 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3459 Double_t mcProdVtxX = primVtxMC->GetX();
3460 Double_t mcProdVtxY = primVtxMC->GetY();
3461 Double_t mcProdVtxZ = primVtxMC->GetZ();
3464 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
3467 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3468 if (!particle)
continue;
3470 Int_t isMCFromMBHeader = -1;
3479 if(particle->GetMother(0) >-1){
3480 switch(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()){
3510 if (particle->Energy() != TMath::Abs(particle->Pz())){
3511 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3513 if( !(ratio <= 0) ){
3518 if ( particle->GetPdgCode() == 211 ){
3520 }
else if ( particle->GetPdgCode() == -211 ){
3522 }
else if ( particle->GetPdgCode() == 321 ){
3524 }
else if ( particle->GetPdgCode() == -321 ){
3526 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3528 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3530 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3537 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3538 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3542 if (particle->Pt()>0.005){
3548 if (particle->Energy() != TMath::Abs(particle->Pz())){
3549 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3551 if( !(ratio <= 0) ){
3555 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3556 alpha = TMath::Abs((daughter0->Energy() - daughter1->Energy()))/(daughter0->Energy() + daughter1->Energy());
3559 if(particle->GetPdgCode() == 111){
3568 }
else if(particle->GetPdgCode() == 221){
3583 if( kDaughter0IsPrim && kDaughter1IsPrim &&
3586 if(particle->GetPdgCode() == 111){
3589 }
else if(particle->GetPdgCode() == 221){
3598 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3599 if (!particle)
continue;
3601 Int_t isMCFromMBHeader = -1;
3609 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3610 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3612 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3614 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3616 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 221) {
3619 if ( !(TMath::Abs(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()) == 11 &&
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 22) )
3630 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3631 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3633 if(particle->GetFirstMother() > -1) pdgCode = ((TParticle*)
fMCEvent->Particle( particle->GetFirstMother() ))->GetPdgCode();
3635 if(particle->GetPdgCode() == 111){
3639 }
else if(particle->GetPdgCode() == 221){
3647 if(particle->GetPdgCode() == 111){
3667 if (gamma0==NULL)
continue;
3673 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fClusterCandidates->GetEntries();secondGammaIndex++){
3675 if (gamma1==NULL)
continue;
3682 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
3692 if ( pi0cand->M() > 0.05 && pi0cand->M() < 0.17){
3698 if ( pi0cand->M() > 0.45 && pi0cand->M() < 0.65){
3766 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3767 Double_t mcProdVtxX = primVtxMC->GetX();
3768 Double_t mcProdVtxY = primVtxMC->GetY();
3769 Double_t mcProdVtxZ = primVtxMC->GetZ();
3772 Bool_t isTruePi0 = kFALSE;
3773 Bool_t isTrueEta = kFALSE;
3775 Bool_t isSameConvertedGamma = kFALSE;
3776 Int_t convertedPhotonLabel0 = -1;
3777 Int_t convertedPhotonLabel1 = -1;
3780 Int_t gamma0MotherLabel = -1;
3782 TParticle * gammaMC0 = 0x0;
3783 if(gamma0MCLabel != -1){
3784 gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
3788 gamma0MotherLabel=gammaMC0->GetMother(0);
3790 if (TrueGammaCandidate0->
IsConversion() && (gammaMC0->GetMother(0) > -1)){
3791 convertedPhotonLabel0 = gammaMC0->GetMother(0);
3792 gamma0MotherLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
3794 gamma0MotherLabel=gammaMC0->GetMother(0);
3799 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
3802 Int_t gamma1MotherLabel = -1;
3805 TParticle * gammaMC1 = 0x0;
3806 if(gamma1MCLabel != -1){
3808 gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
3812 gamma1MotherLabel = gammaMC1->GetMother(0);
3816 convertedPhotonLabel1 = gammaMC1->GetMother(0);
3818 if(convertedPhotonLabel1 > -1) gamma1MotherLabel =
fMCEvent->Particle(convertedPhotonLabel1)->GetMother(0);
3820 gamma1MotherLabel=gammaMC1->GetMother(0);
3827 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3828 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
3831 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 221){
3838 fPt = Pi0Candidate->Pt();
3843 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
3848 Double_t scaling = (375 - TMath::Sqrt(vertex[0]*vertex[0]+vertex[1]*vertex[1]))/(TMath::Sqrt(Pi0Candidate->Px()*Pi0Candidate->Px()+Pi0Candidate->Py()*Pi0Candidate->Py()));
3849 vertex[0] = vertex[0] + scaling*Pi0Candidate->Px();
3850 vertex[1] = vertex[1] + scaling*Pi0Candidate->Py();
3851 vertex[2] = vertex[2] + scaling*Pi0Candidate->Pz();
3855 TClonesArray * arrClustersMesonCand = NULL;
3857 arrClustersMesonCand = dynamic_cast<TClonesArray*>(
fInputEvent->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
3859 AliVCluster* clus1 = NULL;
3861 if(arrClustersMesonCand)
3862 clus1 =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate0->
GetCaloClusterRef()));
3865 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
3866 if(arrClustersMesonCand)
3867 clus1 =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate0->
GetCaloClusterRef()));
3873 TLorentzVector clusterVector1;
3874 clus1->GetMomentum(clusterVector1,vertex);
3875 if(arrClustersMesonCand)
delete clus1;
3876 TLorentzVector* tmpvec1 =
new TLorentzVector();
3877 tmpvec1->SetPxPyPzE(clusterVector1.Px(),clusterVector1.Py(),clusterVector1.Pz(),clusterVector1.E());
3880 if(!PhotonCandidate1)
return;
3883 AliVCluster* clus2 = NULL;
3885 if(arrClustersMesonCand)
3886 clus2 =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate1->
GetCaloClusterRef()));
3889 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
3890 if(arrClustersMesonCand)
3891 clus2 =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate1->
GetCaloClusterRef()));
3897 TLorentzVector clusterVector2;
3898 clus2->GetMomentum(clusterVector2,vertex);
3899 if(arrClustersMesonCand)
delete clus2;
3900 TLorentzVector* tmpvec2 =
new TLorentzVector();
3901 tmpvec2->SetPxPyPzE(clusterVector2.Px(),clusterVector2.Py(),clusterVector2.Pz(),clusterVector2.E());
3904 if(!PhotonCandidate2)
return;
3911 delete PhotonCandidate1;
3912 delete PhotonCandidate2;
3919 if (convertedPhotonLabel0 > -1 && convertedPhotonLabel1 > -1){
3920 if (convertedPhotonLabel0==convertedPhotonLabel1){
3921 isSameConvertedGamma = kTRUE;
3929 if(isTruePi0 || isTrueEta){
4022 if (TrueGammaCandidate0->