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){
703 Int_t nBinsQAPt = 175;
705 Int_t nBinsClusterPt = 500;
715 for(
Int_t i=0; i<nBinsPt+1;i++){
716 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
720 for(
Int_t i=0; i<nBinsQAPt+1;i++){
721 if(i<60) arrQAPtBinning[i] = 0.05*i;
722 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
723 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
724 else if(i<190) arrQAPtBinning[i] = 20.+1.0*(i-170);
725 else arrQAPtBinning[i] = maxQAPt;
727 nBinsClusterPt = 800;
730 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
731 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
739 for(
Int_t i=0; i<nBinsPt+1;i++){
740 if (i < 1) arrPtBinning[i] = 1.*i;
741 else if(i<41) arrPtBinning[i] = 1.+0.05*(i-1);
742 else if(i<111) arrPtBinning[i] = 3.+0.1*(i-41);
743 else if(i<151) arrPtBinning[i] = 10.+0.25*(i-111);
744 else if(i<191) arrPtBinning[i] = 20.+0.5*(i-151);
745 else if(i<251) arrPtBinning[i] = 40.+1.0*(i-191);
746 else arrPtBinning[i] = maxPt;
750 for(
Int_t i=0; i<nBinsQAPt+1;i++){
751 if(i<60) arrQAPtBinning[i] = 0.05*i;
752 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
753 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
754 else if(i<210) arrQAPtBinning[i] = 20.+0.5*(i-170);
755 else if(i<270) arrQAPtBinning[i] = 40.+1.0*(i-210);
756 else arrQAPtBinning[i] = maxQAPt;
758 nBinsClusterPt = 301;
761 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
762 if (i < 1) arrClusPtBinning[i] = 0.3*i;
763 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
764 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
765 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
766 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
767 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
768 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
769 else arrClusPtBinning[i] = maxClusterPt;
776 for(
Int_t i=0; i<nBinsPt+1;i++){
777 if (i < 1) arrPtBinning[i] = 1.*i;
778 else if(i<41) arrPtBinning[i] = 1.+0.05*(i-1);
779 else if(i<111) arrPtBinning[i] = 3.+0.1*(i-41);
780 else if(i<151) arrPtBinning[i] = 10.+0.25*(i-111);
781 else if(i<191) arrPtBinning[i] = 20.+1.0*(i-151);
782 else arrPtBinning[i] = maxPt;
786 for(
Int_t i=0; i<nBinsQAPt+1;i++){
787 if(i<60) arrQAPtBinning[i] = 0.05*i;
788 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
789 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
790 else if(i<210) arrQAPtBinning[i] = 20.+1.0*(i-170);
791 else arrQAPtBinning[i] = maxQAPt;
793 nBinsClusterPt = 301;
796 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
797 if (i < 1) arrClusPtBinning[i] = 0.3*i;
798 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
799 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
800 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
801 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
802 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
803 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
804 else arrClusPtBinning[i] = maxClusterPt;
810 for(
Int_t i=0; i<nBinsPt+1;i++){
811 if (i < 1) arrPtBinning[i] = 1*i;
812 else if(i<51) arrPtBinning[i] = 1+0.1*(i-1);
813 else if(i<75) arrPtBinning[i] = 6.+0.25*(i-51);
814 else if(i<83) arrPtBinning[i] = 12.+1.0*(i-75);
815 else arrPtBinning[i] = maxPt;
819 for(
Int_t i=0; i<nBinsQAPt+1;i++){
820 if(i<60) arrQAPtBinning[i] = 0.1*i;
821 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
822 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
823 else arrQAPtBinning[i] = maxQAPt;
825 nBinsClusterPt = 143;
828 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
829 if (i < 1) arrClusPtBinning[i] = 0.3*i;
830 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
831 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
832 else if(i<143) arrClusPtBinning[i] = 20.+1.0*(i-123);
833 else arrClusPtBinning[i] = maxClusterPt;
836 for(
Int_t i=0; i<nBinsPt+1;i++){
837 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
839 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
840 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
842 for(
Int_t i=0; i<nBinsQAPt+1;i++){
843 if(i<60) arrQAPtBinning[i] = 0.05*i;
844 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
845 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
846 else if(i<175) arrQAPtBinning[i] = 20.+1.0*(i-170);
847 else arrQAPtBinning[i] = maxQAPt;
937 TString cutstringMeson =
"NoMesonCut";
942 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s_%s", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
946 fESDList[iCut]->SetName(Form(
"%s_%s_%s ESD histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
950 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents", 14, -0.5, 13.5);
952 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
953 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
955 TString TriggerNames =
"Not Trigger: ";
957 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
962 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
963 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,
"SPD Pile-Up");
966 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problems");
967 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
968 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
969 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
970 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
979 TString TriggerNames =
"Not Trigger: ";
1014 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ", 200, -10, 10);
1052 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 30000, 0, 30000);
1054 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 2500, 0, 2500);
1056 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 1500, 0, 1500);
1062 fProfileEtaShift[iCut] =
new TProfile(
"Eta Shift",
"Eta Shift", 1, -0.5, 0.5);
1081 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1084 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E", nBinsClusterPt, arrClusPtBinning);
1090 fHistoClusAllHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaAllHeaders_Pt",
"ClusGammaAllHeaders_Pt", nBinsClusterPt, arrClusPtBinning);
1097 fHistoClusGammaPtM02[iCut] =
new TH2F(
"ClusGamma_Pt_M02",
"ClusGamma_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1113 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
1122 fHistoMotherInvMassPtAlpha[iCut] =
new TH2F(
"ESD_Mother_InvMass_vs_Pt_Alpha",
"ESD_Mother_InvMass_vs_Pt_Alpha", 800, 0, 0.8, nBinsPt, arrPtBinning);
1142 fHistoMotherPi0PtY[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Y",
"ESD_MotherPi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1146 fHistoMotherEtaPtY[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Y",
"ESD_MotherEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1150 fHistoMotherPi0PtAlpha[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Alpha",
"ESD_MotherPi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1154 fHistoMotherEtaPtAlpha[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Alpha",
"ESD_MotherEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1204 Int_t nMaxCells = 12*48*24;
1220 fTreeList[iCut]->SetName(Form(
"%s_%s_%s InvMass Tree", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1247 fClusterTreeList[iCut]->SetName(Form(
"%s_%s EoverP Tree",cutstringEvent.Data(),cutstringCalo.Data()));
1251 tClusterEOverP[iCut] =
new TTree(
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt",
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt");
1467 TString cutstringMeson =
"NoMesonCut";
1472 fMCList[iCut]->SetName(Form(
"%s_%s_%s MC histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1473 fMCList[iCut]->SetOwner(kTRUE);
1480 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1492 fHistoMCDecayGammaPi0Pt[iCut] =
new TH1F(
"MC_DecayGammaPi0_Pt",
"MC_DecayGammaPi0_Pt", nBinsClusterPt, arrClusPtBinning);
1495 fHistoMCDecayGammaRhoPt[iCut] =
new TH1F(
"MC_DecayGammaRho_Pt",
"MC_DecayGammaRho_Pt", nBinsClusterPt, arrClusPtBinning);
1498 fHistoMCDecayGammaEtaPt[iCut] =
new TH1F(
"MC_DecayGammaEta_Pt",
"MC_DecayGammaEta_Pt", nBinsClusterPt, arrClusPtBinning);
1501 fHistoMCDecayGammaOmegaPt[iCut] =
new TH1F(
"MC_DecayGammaOmega_Pt",
"MC_DecayGammaOmmega_Pt", nBinsClusterPt, arrClusPtBinning);
1504 fHistoMCDecayGammaEtapPt[iCut] =
new TH1F(
"MC_DecayGammaEtap_Pt",
"MC_DecayGammaEtap_Pt", nBinsClusterPt, arrClusPtBinning);
1507 fHistoMCDecayGammaPhiPt[iCut] =
new TH1F(
"MC_DecayGammaPhi_Pt",
"MC_DecayGammaPhi_Pt", nBinsClusterPt, arrClusPtBinning);
1510 fHistoMCDecayGammaSigmaPt[iCut] =
new TH1F(
"MC_DecayGammaSigma_Pt",
"MC_DecayGammaSigma_Pt", nBinsClusterPt, arrClusPtBinning);
1528 fHistoMCPi0Pt[iCut] =
new TH1F(
"MC_Pi0_Pt",
"MC_Pi0_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1532 fHistoMCPi0WOWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOWeights_Pt",
"MC_Pi0_WOWeights_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1537 fHistoMCEtaPt[iCut] =
new TH1F(
"MC_Eta_Pt",
"MC_Eta_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1541 fHistoMCEtaWOWeightPt[iCut] =
new TH1F(
"MC_Eta_WOWeights_Pt",
"MC_Eta_WOWeights_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1545 fHistoMCPi0InAccPt[iCut] =
new TH1F(
"MC_Pi0InAcc_Pt",
"MC_Pi0InAcc_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1549 fHistoMCEtaInAccPt[iCut] =
new TH1F(
"MC_EtaInAcc_Pt",
"MC_EtaInAcc_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1556 fHistoMCPi0WOEvtWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOEventWeights_Pt",
"MC_Pi0_WOEventWeights_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1559 fHistoMCEtaWOEvtWeightPt[iCut] =
new TH1F(
"MC_Eta_WOEventWeights_Pt",
"MC_Eta_WOEventWeights_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1569 fHistoMCPi0PtJetPt[iCut] =
new TH2F(
"MC_Pi0_Pt_JetPt",
"MC_Pi0_Pt_JetPt", nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1574 fHistoMCEtaPtJetPt[iCut] =
new TH2F(
"MC_Eta_Pt_JetPt",
"MC_Eta_Pt_JetPt", nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1608 fHistoMCSecEtaPt[iCut] =
new TH1F(
"MC_SecEta_Pt",
"MC_SecEta_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1620 fHistoMCPi0PtY[iCut] =
new TH2F(
"MC_Pi0_Pt_Y",
"MC_Pi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1625 fHistoMCEtaPtY[iCut] =
new TH2F(
"MC_Eta_Pt_Y",
"MC_Eta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1630 fHistoMCPi0PtAlpha[iCut] =
new TH2F(
"MC_Pi0_Pt_Alpha",
"MC_Pi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1634 fHistoMCEtaPtAlpha[iCut] =
new TH2F(
"MC_Eta_Pt_Alpha",
"MC_Eta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1646 fTrueList[iCut]->SetName(Form(
"%s_%s_%s True histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1651 fHistoClusPhotonBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonBG_Pt",
"ESD_TrueClusPhotonBG_Pt", nBinsClusterPt, arrClusPtBinning,10,-0.5,9.5);
1665 fHistoClusPhotonPlusConvBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonPlusConvBG_Pt",
"ESD_TrueClusPhotonPlusConvBG_Pt", nBinsClusterPt, arrClusPtBinning,10,-0.5,9.5);
1685 fHistoClustPhotonPionBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonPionBG_Pt_M02",
"ESD_TrueClusPhotonPionBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1689 fHistoClustPhotonKaonBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonKaonBG_Pt_M02",
"ESD_TrueClusPhotonKaonBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1693 fHistoClustPhotonK0lBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonK0lBG_Pt_M02",
"ESD_TrueClusPhotonK0lBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1697 fHistoClustPhotonNeutronBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonNeutronBG_Pt_M02",
"ESD_TrueClusPhotonNeutronBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1701 fHistoClustPhotonRestBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonRestBG_Pt_M02",
"ESD_TrueClusPhotonRestBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1732 fHistoTrueClusGammaPt[iCut] =
new TH1F(
"TrueClusGamma_Pt",
"ESD_TrueClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1737 fHistoTrueClusGammaPtM02[iCut] =
new TH2F(
"TrueClusGamma_Pt_M02",
"TrueClusGamma_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1742 fHistoTruePrimaryClusGammaPt[iCut] =
new TH1F(
"TruePrimaryClusGamma_Pt",
"ESD_TruePrimaryClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1794 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1799 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1804 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1809 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1814 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1819 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1861 fHistoTrueClusUnConvGammaPt[iCut] =
new TH1F(
"TrueClusUnConvGamma_Pt",
"TrueClusUnConvGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1873 fHistoTrueClusElectronPt[iCut] =
new TH1F(
"TrueClusElectron_Pt",
"TrueElectronGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1876 fHistoTrueClusConvGammaPt[iCut] =
new TH1F(
"TrueClusConvGamma_Pt",
"TrueClusConvGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1879 fHistoTrueClusConvGammaMCPt[iCut] =
new TH1F(
"TrueClusConvGamma_MCPt",
"TrueClusConvGamma_MCPt", nBinsClusterPt, arrClusPtBinning);
1882 fHistoTrueClusConvGammaFullyPt[iCut] =
new TH1F(
"TrueClusConvGammaFullyContained_Pt",
"TrueClusConvGammaFullyContained_Pt", nBinsClusterPt, arrClusPtBinning);
1885 fHistoTrueClusMergedGammaPt[iCut] =
new TH1F(
"TrueClusMergedGamma_Pt",
"TrueClusMergedGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1891 fHistoTrueClusDalitzPt[iCut] =
new TH1F(
"TrueClusDalitz_Pt",
"TrueClusDalitz_Pt", nBinsClusterPt, arrClusPtBinning);
1900 fHistoTrueClusShowerPt[iCut] =
new TH1F(
"TrueClusShower_Pt",
"TrueClusShower_Pt", nBinsClusterPt, arrClusPtBinning);
1903 fHistoTrueClusSubLeadingPt[iCut] =
new TH1F(
"TrueClusSubleading_Pt",
"TrueClusSubleading_Pt", nBinsClusterPt, arrClusPtBinning);
1935 fHistoTruePi0InvMassPt[iCut] =
new TH2F(
"ESD_TruePi0_InvMass_Pt",
"ESD_TruePi0_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
1939 fHistoTrueEtaInvMassPt[iCut] =
new TH2F(
"ESD_TrueEta_InvMass_Pt",
"ESD_TrueEta_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
1993 fHistoTruePi0InvMassPtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_InvMass_vs_Pt_Alpha",
"ESD_TruePi0_InvMass_vs_Pt_Alpha", 800, 0, 0.8, nBinsPt, arrPtBinning);
2049 nBinsPt, arrPtBinning);
2054 nBinsPt, arrPtBinning);
2087 nBinsPt, arrPtBinning);
2092 nBinsPt, arrPtBinning);
2102 nBinsPt, arrPtBinning);
2133 fHistoTruePi0PtY[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Y",
"ESD_TruePi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
2137 fHistoTrueEtaPtY[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Y",
"ESD_TrueEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
2141 fHistoTruePi0PtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Alpha",
"ESD_TruePi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
2145 fHistoTrueEtaPtAlpha[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Alpha",
"ESD_TrueEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
2150 fHistoTruePi0PtOpenAngle[iCut] =
new TH2F(
"ESD_TruePi0_Pt_OpenAngle",
"ESD_TruePi0_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 100, 0, 0.5);
2154 fHistoTrueEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_TrueEta_Pt_OpenAngle",
"ESD_TrueEta_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 180, 0, 1.8);
2192 fHistoTruePi0Category1[iCut] =
new TH2F(
"ESD_TruePi0Category1_InvMass_Pt",
"ESD_TruePi0Category1_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2196 fHistoTrueEtaCategory1[iCut] =
new TH2F(
"ESD_TrueEtaCategory1_InvMass_Pt",
"ESD_TrueEtaCategory1_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2200 fHistoTruePi0Category2[iCut] =
new TH2F(
"ESD_TruePi0Category2_InvMass_Pt",
"ESD_TruePi0Category2_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2204 fHistoTrueEtaCategory2[iCut] =
new TH2F(
"ESD_TrueEtaCategory2_InvMass_Pt",
"ESD_TrueEtaCategory2_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2208 fHistoTruePi0Category3[iCut] =
new TH2F(
"ESD_TruePi0Category3_InvMass_Pt",
"ESD_TruePi0Category3_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2212 fHistoTrueEtaCategory3[iCut] =
new TH2F(
"ESD_TrueEtaCategory3_InvMass_Pt",
"ESD_TrueEtaCategory3_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2216 fHistoTruePi0Category4_6[iCut] =
new TH2F(
"ESD_TruePi0Category4_6_InvMass_Pt",
"ESD_TruePi0Category4_6_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2220 fHistoTrueEtaCategory4_6[iCut] =
new TH2F(
"ESD_TrueEtaCategory4_6_InvMass_Pt",
"ESD_TrueEtaCategory4_6_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2224 fHistoTruePi0Category5[iCut] =
new TH2F(
"ESD_TruePi0Category5_InvMass_Pt",
"ESD_TruePi0Category5_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2228 fHistoTrueEtaCategory5[iCut] =
new TH2F(
"ESD_TrueEtaCategory5_InvMass_Pt",
"ESD_TrueEtaCategory5_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2232 fHistoTruePi0Category7[iCut] =
new TH2F(
"ESD_TruePi0Category7_InvMass_Pt",
"ESD_TruePi0Category7_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2236 fHistoTrueEtaCategory7[iCut] =
new TH2F(
"ESD_TrueEtaCategory7_InvMass_Pt",
"ESD_TrueEtaCategory7_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2240 fHistoTruePi0Category8[iCut] =
new TH2F(
"ESD_TruePi0Category8_InvMass_Pt",
"ESD_TruePi0Category8_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2244 fHistoTrueEtaCategory8[iCut] =
new TH2F(
"ESD_TrueEtaCategory8_InvMass_Pt",
"ESD_TrueEtaCategory8_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2252 fTreeList[iCut]->SetName(Form(
"%s_%s_%s True ClusterComb tree", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
2285 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
2325 fstream fOutputLocalDebug;
2326 fOutputLocalDebug.open(
"debugOutput.txt",ios::out);
2327 fOutputLocalDebug.close();
2353 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
2374 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
2375 if(eventQuality == 2 || eventQuality == 3){
2396 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
2405 Bool_t isRunningEMCALrelAna = kFALSE;
2414 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
2434 Bool_t triggered = kTRUE;
2435 if(eventNotAccepted){
2439 if (eventNotAccepted==3 &&
fIsMC>0){
2446 if(eventQuality != 0){
2452 if (triggered == kTRUE) {
2472 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2482 if (nameBin.CompareTo(
"")== 0){
2484 ->GetAcceptedHeader())->At(i))->GetString();
2485 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
2499 if (triggered==kFALSE)
continue;
2540 TClonesArray * arrClustersProcess = NULL;
2546 if(!arrClustersProcess)
2547 AliFatal(Form(
"%sClustersBranch was not found in AliAnalysisTaskGammaCalo! Check the correction framework settings!",
fCorrTaskSetting.Data()));
2548 nclus = arrClustersProcess->GetEntries();
2551 if(nclus == 0)
return;
2560 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
2563 Int_t maxClusterID = -1;
2564 map<Long_t,Int_t> mapIsClusterAccepted;
2565 map<Long_t,Int_t> mapIsClusterAcceptedWithoutTrackMatch;
2567 for(Long_t i = 0; i < nclus; i++){
2569 AliVCluster* clus = NULL;
2571 if(arrClustersProcess)
2572 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2574 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2575 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2576 if(arrClustersProcess)
2577 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2579 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2592 TLorentzVector clusterVector;
2593 clus->GetMomentum(clusterVector,vertex);
2595 TLorentzVector* tmpvec =
new TLorentzVector();
2596 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
2600 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
2604 maxClusterEnergy = clus->E();
2605 maxClusterID = (
Int_t) i;
2608 mapIsClusterAccepted[i] = 1;
2609 mapIsClusterAcceptedWithoutTrackMatch[i] = 1;
2618 Int_t* mclabelsCluster = clus->GetLabels();
2621 if (clus->GetNLabels()>0){
2622 for (
Int_t k =0; k< (
Int_t)clus->GetNLabels(); k++){
2635 if (clus->GetNLabels()>1){
2636 Int_t* mclabelsCluster = clus->GetLabels();
2637 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;
2638 for (
Int_t l = 1; l < (
Int_t)clus->GetNLabels(); l++ ){
2664 delete PhotonCandidate;
2672 for(Long_t i = 0; i < nclus; i++){
2673 if( mapIsClusterAccepted[i] != 1 )
continue;
2675 AliVCluster* clus = NULL;
2677 if(arrClustersProcess)
2678 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2680 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2681 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2682 if(arrClustersProcess)
2683 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2685 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2705 AliError(
"Task needs AOD or ESD event...");
2709 AliESDtrackCuts *EsdTrackCuts = 0x0;
2714 if( (runNumber<=146860) || (runNumber>=197470 && runNumber<=197692) || (runNumber>=172440 && runNumber<=193766) ){
2715 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010();
2717 }
else if (runNumber>=209122){
2718 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2015PbPb();
2721 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011();
2723 EsdTrackCuts->SetMaxDCAToVertexZ(2);
2724 EsdTrackCuts->SetEtaRange(-0.8, 0.8);
2725 EsdTrackCuts->SetPtRange(0.15);
2728 for(Long_t i = 0; i < nclus; i++){
2729 if( mapIsClusterAcceptedWithoutTrackMatch[i] != 1 )
continue;
2731 AliVCluster* clus = NULL;
2733 if(arrClustersProcess)
2734 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2736 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2737 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2738 if(arrClustersProcess)
2739 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2741 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2751 Int_t labelTrackMatch = -1;
2757 AliVTrack* currTrack =
dynamic_cast<AliVTrack*
>(
fInputEvent->GetTrack(labelTrackMatch));
2763 AliESDtrack *esdt =
dynamic_cast<AliESDtrack*
>(currTrack);
2764 if(!EsdTrackCuts->AcceptTrack(esdt)){
2775 AliAODTrack *aodt =
dynamic_cast<AliAODTrack*
>(currTrack);
2776 if(!aodt->IsHybridGlobalConstrainedGlobal()){
2780 if(TMath::Abs(aodt->Eta())>0.8){
2798 Float_t temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kElectron));
2803 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kPion));
2808 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kKaon));
2813 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,
AliPID::kProton));
2825 Float_t clsPos[3] = {0.,0.,0.};
2826 Float_t secondClsPos[3] = {0.,0.,0.};
2827 TLorentzVector clusterVector;
2829 clus->GetPosition(clsPos);
2830 TVector3 clsPosVec(clsPos);
2833 for(
Int_t j=0; j<nclus; j++){
2834 if( i == j )
continue;
2835 if( mapIsClusterAcceptedWithoutTrackMatch[j] != 1 )
continue;
2837 AliVCluster* secondClus = NULL;
2839 if(arrClustersProcess)
2840 secondClus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(j));
2842 secondClus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(j));
2843 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2844 if(arrClustersProcess)
2845 secondClus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(j));
2847 secondClus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(j));
2850 if(!secondClus)
continue;
2851 secondClus->GetPosition(secondClsPos);
2852 TVector3 secondClsPosVec(secondClsPos);
2854 Float_t dPhi = clsPosVec.DeltaPhi(secondClsPosVec);
2855 Float_t dEta = clsPosVec.Eta()-secondClsPosVec.Eta();
2856 if(TMath::Sqrt(dEta*dEta + dPhi*dPhi) < 0.2){
2857 secondClus->GetMomentum(clusterVector,vertex);
2858 sum_Et += clusterVector.Et();
2867 TLorentzVector vecTrack;
2868 vecTrack.SetPxPyPzE(currTrack->Px(),currTrack->Py(),currTrack->Pz(),currTrack->E());
2877 mapIsClusterAcceptedWithoutTrackMatch.clear();
2891 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2892 Double_t mcProdVtxX = primVtxMC->GetX();
2893 Double_t mcProdVtxY = primVtxMC->GetY();
2894 Double_t mcProdVtxZ = primVtxMC->GetZ();
2896 TParticle *Photon = NULL;
2897 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2909 Int_t pdgCodeParticle = Photon->GetPdgCode();
2928 if(Photon->GetMother(0) > -1){
2929 TParticle* motherPart = (TParticle*)
fMCEvent->Particle(Photon->GetMother(0));
2939 if (TruePhotonCandidate->
IsDalitz())
2945 if (TruePhotonCandidate->
IsShower())
2958 Int_t motherLab = Photon->GetMother(0);
2959 if (motherLab > -1){
2966 Int_t grandMotherLab =
fMCEvent->Particle(motherLab)->GetMother(0);
2967 if (grandMotherLab > -1){
2996 Int_t secondaryClass = -1;
3004 if (secondaryClass == 2) {
3008 }
else if (secondaryClass == 5) {
3012 }
else if (secondaryClass == 3) {
3016 }
else if (secondaryClass == 4) {
3025 if (secondaryClass == 2) {
3029 }
else if (secondaryClass == 5) {
3033 }
else if (secondaryClass == 3) {
3037 }
else if (secondaryClass == 4) {
3054 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3055 Double_t mcProdVtxX = primVtxMC->GetX();
3056 Double_t mcProdVtxY = primVtxMC->GetY();
3057 Double_t mcProdVtxZ = primVtxMC->GetZ();
3059 AliAODMCParticle *Photon = NULL;
3060 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3062 if (AODMCTrackArray){
3063 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
3067 AliInfo(
"AODMCTrackArray could not be loaded");
3075 Int_t pdgCodeParticle = Photon->GetPdgCode();
3093 AliAODMCParticle *motherPart = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
3102 if (TruePhotonCandidate->
IsDalitz())
3108 if (TruePhotonCandidate->
IsShower())
3122 Int_t motherLab = Photon->GetMother();
3123 if (motherLab > -1){
3130 Int_t grandMotherLab = ((AliAODMCParticle*) AODMCTrackArray->At(motherLab))->GetMother();
3131 if (grandMotherLab > -1){
3145 if (Photon->GetMother()> -1){
3146 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
3162 Int_t secondaryClass = -1;
3170 if (secondaryClass == 2) {
3174 }
else if (secondaryClass == 5) {
3178 }
else if (secondaryClass == 3) {
3182 }
else if (secondaryClass == 4) {
3191 if (secondaryClass == 2) {
3195 }
else if (secondaryClass == 5) {
3199 }
else if (secondaryClass == 3) {
3203 }
else if (secondaryClass == 4) {
3219 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3220 Double_t mcProdVtxX = primVtxMC->GetX();
3221 Double_t mcProdVtxY = primVtxMC->GetY();
3222 Double_t mcProdVtxZ = primVtxMC->GetZ();
3224 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3225 if (AODMCTrackArray == NULL)
return;
3228 for(Long_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
3230 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
3231 if (!particle)
continue;
3236 Int_t isMCFromMBHeader = -1;
3245 if(particle->GetMother() >-1){
3246 switch((static_cast<AliAODMCParticle*>(AODMCTrackArray->At(particle->GetMother())))->GetPdgCode()){
3276 if (particle->E() != TMath::Abs(particle->Pz())){
3277 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3279 if( !(ratio <= 0) ){
3284 if ( particle->GetPdgCode() == 211 ){
3286 }
else if ( particle->GetPdgCode() == -211 ){
3288 }
else if ( particle->GetPdgCode() == 321 ){
3290 }
else if ( particle->GetPdgCode() == -321 ){
3292 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3294 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3296 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3303 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3304 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3307 if (particle->Pt()>0.005){
3314 if (particle->E() != TMath::Abs(particle->Pz())){
3315 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3317 if( !(ratio <= 0) ){
3321 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3322 alpha = TMath::Abs((daughter0->E() - daughter1->E()))/(daughter0->E() + daughter1->E());
3325 if(particle->GetPdgCode() == 111){
3334 }
else if(particle->GetPdgCode() == 221){
3349 if(particle->GetPdgCode() == 111){
3352 }
else if(particle->GetPdgCode() == 221){
3361 Int_t isMCFromMBHeader = -1;
3369 if(particle->GetMother() >-1){
3370 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3371 if(tmpMother->GetMother() >-1){
3372 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
3373 if(tmpGrandMother->GetPdgCode() == 310) {
3375 }
else if (tmpGrandMother->GetPdgCode() == 130) {
3377 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
3379 }
else if (tmpGrandMother->GetPdgCode() == 221) {
3382 if( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
3396 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3397 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3398 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3399 Int_t pdgCode = mother->GetPdgCode();
3400 if(particle->GetPdgCode() == 111){
3404 }
else if(particle->GetPdgCode() == 221){
3413 if(particle->GetPdgCode() == 111){
3426 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3427 Double_t mcProdVtxX = primVtxMC->GetX();
3428 Double_t mcProdVtxY = primVtxMC->GetY();
3429 Double_t mcProdVtxZ = primVtxMC->GetZ();
3432 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
3435 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3436 if (!particle)
continue;
3438 Int_t isMCFromMBHeader = -1;
3447 if(particle->GetMother(0) >-1){
3448 switch(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()){
3478 if (particle->Energy() != TMath::Abs(particle->Pz())){
3479 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3481 if( !(ratio <= 0) ){
3486 if ( particle->GetPdgCode() == 211 ){
3488 }
else if ( particle->GetPdgCode() == -211 ){
3490 }
else if ( particle->GetPdgCode() == 321 ){
3492 }
else if ( particle->GetPdgCode() == -321 ){
3494 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3496 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3498 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3505 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3506 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3510 if (particle->Pt()>0.005){
3516 if (particle->Energy() != TMath::Abs(particle->Pz())){
3517 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3519 if( !(ratio <= 0) ){
3523 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3524 alpha = TMath::Abs((daughter0->Energy() - daughter1->Energy()))/(daughter0->Energy() + daughter1->Energy());
3527 if(particle->GetPdgCode() == 111){
3536 }
else if(particle->GetPdgCode() == 221){
3551 if( kDaughter0IsPrim && kDaughter1IsPrim &&
3554 if(particle->GetPdgCode() == 111){
3557 }
else if(particle->GetPdgCode() == 221){
3566 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3567 if (!particle)
continue;
3569 Int_t isMCFromMBHeader = -1;
3577 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3578 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3580 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3582 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3584 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 221) {
3587 if ( !(TMath::Abs(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()) == 11 &&
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 22) )
3598 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3599 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3601 if(particle->GetFirstMother() > -1) pdgCode = ((TParticle*)
fMCEvent->Particle( particle->GetFirstMother() ))->GetPdgCode();
3603 if(particle->GetPdgCode() == 111){
3607 }
else if(particle->GetPdgCode() == 221){
3615 if(particle->GetPdgCode() == 111){
3635 if (gamma0==NULL)
continue;
3641 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fClusterCandidates->GetEntries();secondGammaIndex++){
3643 if (gamma1==NULL)
continue;
3650 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
3660 if ( pi0cand->M() > 0.05 && pi0cand->M() < 0.17){
3666 if ( pi0cand->M() > 0.45 && pi0cand->M() < 0.65){
3734 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3735 Double_t mcProdVtxX = primVtxMC->GetX();
3736 Double_t mcProdVtxY = primVtxMC->GetY();
3737 Double_t mcProdVtxZ = primVtxMC->GetZ();
3740 Bool_t isTruePi0 = kFALSE;
3741 Bool_t isTrueEta = kFALSE;
3743 Bool_t isSameConvertedGamma = kFALSE;
3744 Int_t convertedPhotonLabel0 = -1;
3745 Int_t convertedPhotonLabel1 = -1;
3748 Int_t gamma0MotherLabel = -1;
3750 TParticle * gammaMC0 = 0x0;
3751 if(gamma0MCLabel != -1){
3752 gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
3756 gamma0MotherLabel=gammaMC0->GetMother(0);
3758 if (TrueGammaCandidate0->
IsConversion() && (gammaMC0->GetMother(0) > -1)){
3759 convertedPhotonLabel0 = gammaMC0->GetMother(0);
3760 gamma0MotherLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
3762 gamma0MotherLabel=gammaMC0->GetMother(0);
3767 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
3770 Int_t gamma1MotherLabel = -1;
3773 TParticle * gammaMC1 = 0x0;
3774 if(gamma1MCLabel != -1){
3776 gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
3780 gamma1MotherLabel = gammaMC1->GetMother(0);
3784 convertedPhotonLabel1 = gammaMC1->GetMother(0);
3786 if(convertedPhotonLabel1 > -1) gamma1MotherLabel =
fMCEvent->Particle(convertedPhotonLabel1)->GetMother(0);
3788 gamma1MotherLabel=gammaMC1->GetMother(0);
3795 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3796 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
3799 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 221){
3806 fPt = Pi0Candidate->Pt();
3811 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
3816 Double_t scaling = (375 - TMath::Sqrt(vertex[0]*vertex[0]+vertex[1]*vertex[1]))/(TMath::Sqrt(Pi0Candidate->Px()*Pi0Candidate->Px()+Pi0Candidate->Py()*Pi0Candidate->Py()));
3817 vertex[0] = vertex[0] + scaling*Pi0Candidate->Px();
3818 vertex[1] = vertex[1] + scaling*Pi0Candidate->Py();
3819 vertex[2] = vertex[2] + scaling*Pi0Candidate->Pz();
3823 TClonesArray * arrClustersMesonCand = NULL;
3825 arrClustersMesonCand = dynamic_cast<TClonesArray*>(
fInputEvent->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
3827 AliVCluster* clus1 = NULL;
3829 if(arrClustersMesonCand)
3830 clus1 =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate0->
GetCaloClusterRef()));
3833 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
3834 if(arrClustersMesonCand)
3835 clus1 =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate0->
GetCaloClusterRef()));
3841 TLorentzVector clusterVector1;
3842 clus1->GetMomentum(clusterVector1,vertex);
3844 TLorentzVector* tmpvec1 =
new TLorentzVector();
3845 tmpvec1->SetPxPyPzE(clusterVector1.Px(),clusterVector1.Py(),clusterVector1.Pz(),clusterVector1.E());
3848 if(!PhotonCandidate1)
return;
3851 AliVCluster* clus2 = NULL;
3853 if(arrClustersMesonCand)
3854 clus2 =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate1->
GetCaloClusterRef()));
3857 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
3858 if(arrClustersMesonCand)
3859 clus2 =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate1->
GetCaloClusterRef()));
3865 TLorentzVector clusterVector2;
3866 clus2->GetMomentum(clusterVector2,vertex);
3867 TLorentzVector* tmpvec2 =
new TLorentzVector();
3868 tmpvec2->SetPxPyPzE(clusterVector2.Px(),clusterVector2.Py(),clusterVector2.Pz(),clusterVector2.E());
3871 if(!PhotonCandidate2)
return;
3878 delete PhotonCandidate1;
3879 delete PhotonCandidate2;
3886 if (convertedPhotonLabel0 > -1 && convertedPhotonLabel1 > -1){
3887 if (convertedPhotonLabel0==convertedPhotonLabel1){
3888 isSameConvertedGamma = kTRUE;
3896 if(isTruePi0 || isTrueEta){
4005 if (!isSameConvertedGamma ){