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 = 148;
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<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
833 else arrClusPtBinning[i] = maxClusterPt;
839 for(
Int_t i=0; i<nBinsPt+1;i++){
840 if (i < 1) arrPtBinning[i] = 1*i;
841 else if(i<51) arrPtBinning[i] = 1+0.1*(i-1);
842 else if(i<75) arrPtBinning[i] = 6.+0.25*(i-51);
843 else if(i<83) arrPtBinning[i] = 12.+1.0*(i-75);
844 else arrPtBinning[i] = maxPt;
848 for(
Int_t i=0; i<nBinsQAPt+1;i++){
849 if(i<60) arrQAPtBinning[i] = 0.1*i;
850 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
851 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
852 else arrQAPtBinning[i] = maxQAPt;
854 nBinsClusterPt = 148;
857 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
858 if (i < 1) arrClusPtBinning[i] = 0.3*i;
859 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
860 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
861 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
862 else arrClusPtBinning[i] = maxClusterPt;
865 for(
Int_t i=0; i<nBinsPt+1;i++){
866 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
868 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
869 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
871 for(
Int_t i=0; i<nBinsQAPt+1;i++){
872 if(i<60) arrQAPtBinning[i] = 0.05*i;
873 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
874 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
875 else if(i<175) arrQAPtBinning[i] = 20.+1.0*(i-170);
876 else arrQAPtBinning[i] = maxQAPt;
966 TString cutstringMeson =
"NoMesonCut";
971 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s_%s", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
975 fESDList[iCut]->SetName(Form(
"%s_%s_%s ESD histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
979 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents", 14, -0.5, 13.5);
981 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
982 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
984 TString TriggerNames =
"Not Trigger: ";
986 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
991 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
992 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,
"SPD Pile-Up");
995 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problems");
996 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
997 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
998 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
999 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
1008 TString TriggerNames =
"Not Trigger: ";
1043 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ", 200, -10, 10);
1081 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 30000, 0, 30000);
1083 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 2500, 0, 2500);
1085 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 1500, 0, 1500);
1091 fProfileEtaShift[iCut] =
new TProfile(
"Eta Shift",
"Eta Shift", 1, -0.5, 0.5);
1110 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1113 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E", nBinsClusterPt, arrClusPtBinning);
1119 fHistoClusAllHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaAllHeaders_Pt",
"ClusGammaAllHeaders_Pt", nBinsClusterPt, arrClusPtBinning);
1126 fHistoClusGammaPtM02[iCut] =
new TH2F(
"ClusGamma_Pt_M02",
"ClusGamma_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1142 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
1151 fHistoMotherInvMassPtAlpha[iCut] =
new TH2F(
"ESD_Mother_InvMass_vs_Pt_Alpha",
"ESD_Mother_InvMass_vs_Pt_Alpha", 800, 0, 0.8, nBinsPt, arrPtBinning);
1171 fHistoMotherPi0PtY[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Y",
"ESD_MotherPi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1175 fHistoMotherEtaPtY[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Y",
"ESD_MotherEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1179 fHistoMotherPi0PtAlpha[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Alpha",
"ESD_MotherPi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1183 fHistoMotherEtaPtAlpha[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Alpha",
"ESD_MotherEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1233 Int_t nMaxCells = 12*48*24;
1249 fTreeList[iCut]->SetName(Form(
"%s_%s_%s InvMass Tree", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1276 fClusterTreeList[iCut]->SetName(Form(
"%s_%s EoverP Tree",cutstringEvent.Data(),cutstringCalo.Data()));
1280 tClusterEOverP[iCut] =
new TTree(
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt",
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt");
1496 TString cutstringMeson =
"NoMesonCut";
1501 fMCList[iCut]->SetName(Form(
"%s_%s_%s MC histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1502 fMCList[iCut]->SetOwner(kTRUE);
1509 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1521 fHistoMCDecayGammaPi0Pt[iCut] =
new TH1F(
"MC_DecayGammaPi0_Pt",
"MC_DecayGammaPi0_Pt", nBinsClusterPt, arrClusPtBinning);
1524 fHistoMCDecayGammaRhoPt[iCut] =
new TH1F(
"MC_DecayGammaRho_Pt",
"MC_DecayGammaRho_Pt", nBinsClusterPt, arrClusPtBinning);
1527 fHistoMCDecayGammaEtaPt[iCut] =
new TH1F(
"MC_DecayGammaEta_Pt",
"MC_DecayGammaEta_Pt", nBinsClusterPt, arrClusPtBinning);
1530 fHistoMCDecayGammaOmegaPt[iCut] =
new TH1F(
"MC_DecayGammaOmega_Pt",
"MC_DecayGammaOmmega_Pt", nBinsClusterPt, arrClusPtBinning);
1533 fHistoMCDecayGammaEtapPt[iCut] =
new TH1F(
"MC_DecayGammaEtap_Pt",
"MC_DecayGammaEtap_Pt", nBinsClusterPt, arrClusPtBinning);
1536 fHistoMCDecayGammaPhiPt[iCut] =
new TH1F(
"MC_DecayGammaPhi_Pt",
"MC_DecayGammaPhi_Pt", nBinsClusterPt, arrClusPtBinning);
1539 fHistoMCDecayGammaSigmaPt[iCut] =
new TH1F(
"MC_DecayGammaSigma_Pt",
"MC_DecayGammaSigma_Pt", nBinsClusterPt, arrClusPtBinning);
1557 fHistoMCPi0Pt[iCut] =
new TH1F(
"MC_Pi0_Pt",
"MC_Pi0_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1561 fHistoMCPi0WOWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOWeights_Pt",
"MC_Pi0_WOWeights_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1566 fHistoMCEtaPt[iCut] =
new TH1F(
"MC_Eta_Pt",
"MC_Eta_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1570 fHistoMCEtaWOWeightPt[iCut] =
new TH1F(
"MC_Eta_WOWeights_Pt",
"MC_Eta_WOWeights_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1574 fHistoMCPi0InAccPt[iCut] =
new TH1F(
"MC_Pi0InAcc_Pt",
"MC_Pi0InAcc_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1578 fHistoMCEtaInAccPt[iCut] =
new TH1F(
"MC_EtaInAcc_Pt",
"MC_EtaInAcc_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1585 fHistoMCPi0WOEvtWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOEventWeights_Pt",
"MC_Pi0_WOEventWeights_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1588 fHistoMCEtaWOEvtWeightPt[iCut] =
new TH1F(
"MC_Eta_WOEventWeights_Pt",
"MC_Eta_WOEventWeights_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1598 fHistoMCPi0PtJetPt[iCut] =
new TH2F(
"MC_Pi0_Pt_JetPt",
"MC_Pi0_Pt_JetPt", nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1603 fHistoMCEtaPtJetPt[iCut] =
new TH2F(
"MC_Eta_Pt_JetPt",
"MC_Eta_Pt_JetPt", nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1637 fHistoMCSecEtaPt[iCut] =
new TH1F(
"MC_SecEta_Pt",
"MC_SecEta_Pt", (
Int_t)((maxPt-minPt)/0.1), minPt, maxPt);
1649 fHistoMCPi0PtY[iCut] =
new TH2F(
"MC_Pi0_Pt_Y",
"MC_Pi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1654 fHistoMCEtaPtY[iCut] =
new TH2F(
"MC_Eta_Pt_Y",
"MC_Eta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1659 fHistoMCPi0PtAlpha[iCut] =
new TH2F(
"MC_Pi0_Pt_Alpha",
"MC_Pi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1663 fHistoMCEtaPtAlpha[iCut] =
new TH2F(
"MC_Eta_Pt_Alpha",
"MC_Eta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1675 fTrueList[iCut]->SetName(Form(
"%s_%s_%s True histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1680 fHistoClusPhotonBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonBG_Pt",
"ESD_TrueClusPhotonBG_Pt", nBinsClusterPt, arrClusPtBinning,10,-0.5,9.5);
1694 fHistoClusPhotonPlusConvBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonPlusConvBG_Pt",
"ESD_TrueClusPhotonPlusConvBG_Pt", nBinsClusterPt, arrClusPtBinning,10,-0.5,9.5);
1714 fHistoClustPhotonPionBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonPionBG_Pt_M02",
"ESD_TrueClusPhotonPionBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1718 fHistoClustPhotonKaonBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonKaonBG_Pt_M02",
"ESD_TrueClusPhotonKaonBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1722 fHistoClustPhotonK0lBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonK0lBG_Pt_M02",
"ESD_TrueClusPhotonK0lBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1726 fHistoClustPhotonNeutronBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonNeutronBG_Pt_M02",
"ESD_TrueClusPhotonNeutronBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1730 fHistoClustPhotonRestBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonRestBG_Pt_M02",
"ESD_TrueClusPhotonRestBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1761 fHistoTrueClusGammaPt[iCut] =
new TH1F(
"TrueClusGamma_Pt",
"ESD_TrueClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1766 fHistoTrueClusGammaPtM02[iCut] =
new TH2F(
"TrueClusGamma_Pt_M02",
"TrueClusGamma_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1771 fHistoTruePrimaryClusGammaPt[iCut] =
new TH1F(
"TruePrimaryClusGamma_Pt",
"ESD_TruePrimaryClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1823 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1828 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1833 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1838 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1843 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1848 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1890 fHistoTrueClusUnConvGammaPt[iCut] =
new TH1F(
"TrueClusUnConvGamma_Pt",
"TrueClusUnConvGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1902 fHistoTrueClusElectronPt[iCut] =
new TH1F(
"TrueClusElectron_Pt",
"TrueElectronGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1905 fHistoTrueClusConvGammaPt[iCut] =
new TH1F(
"TrueClusConvGamma_Pt",
"TrueClusConvGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1908 fHistoTrueClusConvGammaMCPt[iCut] =
new TH1F(
"TrueClusConvGamma_MCPt",
"TrueClusConvGamma_MCPt", nBinsClusterPt, arrClusPtBinning);
1911 fHistoTrueClusConvGammaFullyPt[iCut] =
new TH1F(
"TrueClusConvGammaFullyContained_Pt",
"TrueClusConvGammaFullyContained_Pt", nBinsClusterPt, arrClusPtBinning);
1914 fHistoTrueClusMergedGammaPt[iCut] =
new TH1F(
"TrueClusMergedGamma_Pt",
"TrueClusMergedGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1920 fHistoTrueClusDalitzPt[iCut] =
new TH1F(
"TrueClusDalitz_Pt",
"TrueClusDalitz_Pt", nBinsClusterPt, arrClusPtBinning);
1929 fHistoTrueClusShowerPt[iCut] =
new TH1F(
"TrueClusShower_Pt",
"TrueClusShower_Pt", nBinsClusterPt, arrClusPtBinning);
1932 fHistoTrueClusSubLeadingPt[iCut] =
new TH1F(
"TrueClusSubleading_Pt",
"TrueClusSubleading_Pt", nBinsClusterPt, arrClusPtBinning);
1964 fHistoTruePi0InvMassPt[iCut] =
new TH2F(
"ESD_TruePi0_InvMass_Pt",
"ESD_TruePi0_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
1968 fHistoTrueEtaInvMassPt[iCut] =
new TH2F(
"ESD_TrueEta_InvMass_Pt",
"ESD_TrueEta_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2022 fHistoTruePi0InvMassPtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_InvMass_vs_Pt_Alpha",
"ESD_TruePi0_InvMass_vs_Pt_Alpha", 800, 0, 0.8, nBinsPt, arrPtBinning);
2078 nBinsPt, arrPtBinning);
2083 nBinsPt, arrPtBinning);
2116 nBinsPt, arrPtBinning);
2121 nBinsPt, arrPtBinning);
2131 nBinsPt, arrPtBinning);
2162 fHistoTruePi0PtY[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Y",
"ESD_TruePi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
2166 fHistoTrueEtaPtY[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Y",
"ESD_TrueEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
2170 fHistoTruePi0PtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Alpha",
"ESD_TruePi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
2174 fHistoTrueEtaPtAlpha[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Alpha",
"ESD_TrueEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
2179 fHistoTruePi0PtOpenAngle[iCut] =
new TH2F(
"ESD_TruePi0_Pt_OpenAngle",
"ESD_TruePi0_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 100, 0, 0.5);
2183 fHistoTrueEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_TrueEta_Pt_OpenAngle",
"ESD_TrueEta_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 180, 0, 1.8);
2221 fHistoTruePi0Category1[iCut] =
new TH2F(
"ESD_TruePi0Category1_InvMass_Pt",
"ESD_TruePi0Category1_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2225 fHistoTrueEtaCategory1[iCut] =
new TH2F(
"ESD_TrueEtaCategory1_InvMass_Pt",
"ESD_TrueEtaCategory1_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2229 fHistoTruePi0Category2[iCut] =
new TH2F(
"ESD_TruePi0Category2_InvMass_Pt",
"ESD_TruePi0Category2_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2233 fHistoTrueEtaCategory2[iCut] =
new TH2F(
"ESD_TrueEtaCategory2_InvMass_Pt",
"ESD_TrueEtaCategory2_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2237 fHistoTruePi0Category3[iCut] =
new TH2F(
"ESD_TruePi0Category3_InvMass_Pt",
"ESD_TruePi0Category3_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2241 fHistoTrueEtaCategory3[iCut] =
new TH2F(
"ESD_TrueEtaCategory3_InvMass_Pt",
"ESD_TrueEtaCategory3_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2245 fHistoTruePi0Category4_6[iCut] =
new TH2F(
"ESD_TruePi0Category4_6_InvMass_Pt",
"ESD_TruePi0Category4_6_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2249 fHistoTrueEtaCategory4_6[iCut] =
new TH2F(
"ESD_TrueEtaCategory4_6_InvMass_Pt",
"ESD_TrueEtaCategory4_6_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2253 fHistoTruePi0Category5[iCut] =
new TH2F(
"ESD_TruePi0Category5_InvMass_Pt",
"ESD_TruePi0Category5_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2257 fHistoTrueEtaCategory5[iCut] =
new TH2F(
"ESD_TrueEtaCategory5_InvMass_Pt",
"ESD_TrueEtaCategory5_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2261 fHistoTruePi0Category7[iCut] =
new TH2F(
"ESD_TruePi0Category7_InvMass_Pt",
"ESD_TruePi0Category7_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2265 fHistoTrueEtaCategory7[iCut] =
new TH2F(
"ESD_TrueEtaCategory7_InvMass_Pt",
"ESD_TrueEtaCategory7_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2269 fHistoTruePi0Category8[iCut] =
new TH2F(
"ESD_TruePi0Category8_InvMass_Pt",
"ESD_TruePi0Category8_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2273 fHistoTrueEtaCategory8[iCut] =
new TH2F(
"ESD_TrueEtaCategory8_InvMass_Pt",
"ESD_TrueEtaCategory8_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2281 fTreeList[iCut]->SetName(Form(
"%s_%s_%s True ClusterComb tree", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
2314 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
2354 fstream fOutputLocalDebug;
2355 fOutputLocalDebug.open(
"debugOutput.txt",ios::out);
2356 fOutputLocalDebug.close();
2382 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
2403 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
2404 if(eventQuality == 2 || eventQuality == 3){
2425 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
2434 Bool_t isRunningEMCALrelAna = kFALSE;
2443 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
2463 Bool_t triggered = kTRUE;
2464 if(eventNotAccepted){
2468 if (eventNotAccepted==3 &&
fIsMC>0){
2475 if(eventQuality != 0){
2481 if (triggered == kTRUE) {
2501 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2511 if (nameBin.CompareTo(
"")== 0){
2513 ->GetAcceptedHeader())->At(i))->GetString();
2514 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
2528 if (triggered==kFALSE)
continue;
2569 TClonesArray * arrClustersProcess = NULL;
2575 if(!arrClustersProcess)
2576 AliFatal(Form(
"%sClustersBranch was not found in AliAnalysisTaskGammaCalo! Check the correction framework settings!",
fCorrTaskSetting.Data()));
2577 nclus = arrClustersProcess->GetEntries();
2580 if(nclus == 0)
return;
2589 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
2592 Int_t maxClusterID = -1;
2593 map<Long_t,Int_t> mapIsClusterAccepted;
2594 map<Long_t,Int_t> mapIsClusterAcceptedWithoutTrackMatch;
2596 for(Long_t i = 0; i < nclus; i++){
2598 AliVCluster* clus = NULL;
2600 if(arrClustersProcess)
2601 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2603 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2604 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2605 if(arrClustersProcess)
2606 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2608 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2621 TLorentzVector clusterVector;
2622 clus->GetMomentum(clusterVector,vertex);
2624 TLorentzVector* tmpvec =
new TLorentzVector();
2625 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
2629 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
2633 maxClusterEnergy = clus->E();
2634 maxClusterID = (
Int_t) i;
2637 mapIsClusterAccepted[i] = 1;
2638 mapIsClusterAcceptedWithoutTrackMatch[i] = 1;
2647 Int_t* mclabelsCluster = clus->GetLabels();
2650 if (clus->GetNLabels()>0){
2651 for (
Int_t k =0; k< (
Int_t)clus->GetNLabels(); k++){
2664 if (clus->GetNLabels()>1){
2665 Int_t* mclabelsCluster = clus->GetLabels();
2666 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;
2667 for (
Int_t l = 1; l < (
Int_t)clus->GetNLabels(); l++ ){
2693 delete PhotonCandidate;
2701 for(Long_t i = 0; i < nclus; i++){
2702 if( mapIsClusterAccepted[i] != 1 )
continue;
2704 AliVCluster* clus = NULL;
2706 if(arrClustersProcess)
2707 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2709 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2710 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2711 if(arrClustersProcess)
2712 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2714 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2734 AliError(
"Task needs AOD or ESD event...");
2738 AliESDtrackCuts *EsdTrackCuts = 0x0;
2743 if( (runNumber<=146860) || (runNumber>=197470 && runNumber<=197692) || (runNumber>=172440 && runNumber<=193766) ){
2744 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010();
2746 }
else if (runNumber>=209122){
2747 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2015PbPb();
2750 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011();
2752 EsdTrackCuts->SetMaxDCAToVertexZ(2);
2753 EsdTrackCuts->SetEtaRange(-0.8, 0.8);
2754 EsdTrackCuts->SetPtRange(0.15);
2757 for(Long_t i = 0; i < nclus; i++){
2758 if( mapIsClusterAcceptedWithoutTrackMatch[i] != 1 )
continue;
2760 AliVCluster* clus = NULL;
2762 if(arrClustersProcess)
2763 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2765 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2766 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2767 if(arrClustersProcess)
2768 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2770 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2780 Int_t labelTrackMatch = -1;
2786 AliVTrack* currTrack =
dynamic_cast<AliVTrack*
>(
fInputEvent->GetTrack(labelTrackMatch));
2792 AliESDtrack *esdt =
dynamic_cast<AliESDtrack*
>(currTrack);
2793 if(!EsdTrackCuts->AcceptTrack(esdt)){
2804 AliAODTrack *aodt =
dynamic_cast<AliAODTrack*
>(currTrack);
2805 if(!aodt->IsHybridGlobalConstrainedGlobal()){
2809 if(TMath::Abs(aodt->Eta())>0.8){
2827 Float_t temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kElectron));
2832 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kPion));
2837 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kKaon));
2842 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,
AliPID::kProton));
2854 Float_t clsPos[3] = {0.,0.,0.};
2855 Float_t secondClsPos[3] = {0.,0.,0.};
2856 TLorentzVector clusterVector;
2858 clus->GetPosition(clsPos);
2859 TVector3 clsPosVec(clsPos);
2862 for(
Int_t j=0; j<nclus; j++){
2863 if( i == j )
continue;
2864 if( mapIsClusterAcceptedWithoutTrackMatch[j] != 1 )
continue;
2866 AliVCluster* secondClus = NULL;
2868 if(arrClustersProcess)
2869 secondClus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(j));
2871 secondClus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(j));
2872 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2873 if(arrClustersProcess)
2874 secondClus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(j));
2876 secondClus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(j));
2879 if(!secondClus)
continue;
2880 secondClus->GetPosition(secondClsPos);
2881 TVector3 secondClsPosVec(secondClsPos);
2883 Float_t dPhi = clsPosVec.DeltaPhi(secondClsPosVec);
2884 Float_t dEta = clsPosVec.Eta()-secondClsPosVec.Eta();
2885 if(TMath::Sqrt(dEta*dEta + dPhi*dPhi) < 0.2){
2886 secondClus->GetMomentum(clusterVector,vertex);
2887 sum_Et += clusterVector.Et();
2896 TLorentzVector vecTrack;
2897 vecTrack.SetPxPyPzE(currTrack->Px(),currTrack->Py(),currTrack->Pz(),currTrack->E());
2906 mapIsClusterAcceptedWithoutTrackMatch.clear();
2920 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2921 Double_t mcProdVtxX = primVtxMC->GetX();
2922 Double_t mcProdVtxY = primVtxMC->GetY();
2923 Double_t mcProdVtxZ = primVtxMC->GetZ();
2925 TParticle *Photon = NULL;
2926 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2938 Int_t pdgCodeParticle = Photon->GetPdgCode();
2957 if(Photon->GetMother(0) > -1){
2958 TParticle* motherPart = (TParticle*)
fMCEvent->Particle(Photon->GetMother(0));
2968 if (TruePhotonCandidate->
IsDalitz())
2974 if (TruePhotonCandidate->
IsShower())
2987 Int_t motherLab = Photon->GetMother(0);
2988 if (motherLab > -1){
2995 Int_t grandMotherLab =
fMCEvent->Particle(motherLab)->GetMother(0);
2996 if (grandMotherLab > -1){
3025 Int_t secondaryClass = -1;
3033 if (secondaryClass == 2) {
3037 }
else if (secondaryClass == 5) {
3041 }
else if (secondaryClass == 3) {
3045 }
else if (secondaryClass == 4) {
3054 if (secondaryClass == 2) {
3058 }
else if (secondaryClass == 5) {
3062 }
else if (secondaryClass == 3) {
3066 }
else if (secondaryClass == 4) {
3083 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3084 Double_t mcProdVtxX = primVtxMC->GetX();
3085 Double_t mcProdVtxY = primVtxMC->GetY();
3086 Double_t mcProdVtxZ = primVtxMC->GetZ();
3088 AliAODMCParticle *Photon = NULL;
3089 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3091 if (AODMCTrackArray){
3092 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
3096 AliInfo(
"AODMCTrackArray could not be loaded");
3104 Int_t pdgCodeParticle = Photon->GetPdgCode();
3122 AliAODMCParticle *motherPart = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
3131 if (TruePhotonCandidate->
IsDalitz())
3137 if (TruePhotonCandidate->
IsShower())
3151 Int_t motherLab = Photon->GetMother();
3152 if (motherLab > -1){
3159 Int_t grandMotherLab = ((AliAODMCParticle*) AODMCTrackArray->At(motherLab))->GetMother();
3160 if (grandMotherLab > -1){
3174 if (Photon->GetMother()> -1){
3175 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
3191 Int_t secondaryClass = -1;
3199 if (secondaryClass == 2) {
3203 }
else if (secondaryClass == 5) {
3207 }
else if (secondaryClass == 3) {
3211 }
else if (secondaryClass == 4) {
3220 if (secondaryClass == 2) {
3224 }
else if (secondaryClass == 5) {
3228 }
else if (secondaryClass == 3) {
3232 }
else if (secondaryClass == 4) {
3248 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3249 Double_t mcProdVtxX = primVtxMC->GetX();
3250 Double_t mcProdVtxY = primVtxMC->GetY();
3251 Double_t mcProdVtxZ = primVtxMC->GetZ();
3253 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3254 if (AODMCTrackArray == NULL)
return;
3257 for(Long_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
3259 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
3260 if (!particle)
continue;
3265 Int_t isMCFromMBHeader = -1;
3274 if(particle->GetMother() >-1){
3275 switch((static_cast<AliAODMCParticle*>(AODMCTrackArray->At(particle->GetMother())))->GetPdgCode()){
3305 if (particle->E() != TMath::Abs(particle->Pz())){
3306 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3308 if( !(ratio <= 0) ){
3313 if ( particle->GetPdgCode() == 211 ){
3315 }
else if ( particle->GetPdgCode() == -211 ){
3317 }
else if ( particle->GetPdgCode() == 321 ){
3319 }
else if ( particle->GetPdgCode() == -321 ){
3321 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3323 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3325 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3332 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3333 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3336 if (particle->Pt()>0.005){
3343 if (particle->E() != TMath::Abs(particle->Pz())){
3344 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3346 if( !(ratio <= 0) ){
3350 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3351 alpha = TMath::Abs((daughter0->E() - daughter1->E()))/(daughter0->E() + daughter1->E());
3354 if(particle->GetPdgCode() == 111){
3363 }
else if(particle->GetPdgCode() == 221){
3378 if(particle->GetPdgCode() == 111){
3381 }
else if(particle->GetPdgCode() == 221){
3390 Int_t isMCFromMBHeader = -1;
3398 if(particle->GetMother() >-1){
3399 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3400 if(tmpMother->GetMother() >-1){
3401 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
3402 if(tmpGrandMother->GetPdgCode() == 310) {
3404 }
else if (tmpGrandMother->GetPdgCode() == 130) {
3406 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
3408 }
else if (tmpGrandMother->GetPdgCode() == 221) {
3411 if( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
3425 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3426 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3427 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3428 Int_t pdgCode = mother->GetPdgCode();
3429 if(particle->GetPdgCode() == 111){
3433 }
else if(particle->GetPdgCode() == 221){
3442 if(particle->GetPdgCode() == 111){
3455 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3456 Double_t mcProdVtxX = primVtxMC->GetX();
3457 Double_t mcProdVtxY = primVtxMC->GetY();
3458 Double_t mcProdVtxZ = primVtxMC->GetZ();
3461 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
3464 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3465 if (!particle)
continue;
3467 Int_t isMCFromMBHeader = -1;
3476 if(particle->GetMother(0) >-1){
3477 switch(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()){
3507 if (particle->Energy() != TMath::Abs(particle->Pz())){
3508 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3510 if( !(ratio <= 0) ){
3515 if ( particle->GetPdgCode() == 211 ){
3517 }
else if ( particle->GetPdgCode() == -211 ){
3519 }
else if ( particle->GetPdgCode() == 321 ){
3521 }
else if ( particle->GetPdgCode() == -321 ){
3523 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3525 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3527 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3534 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3535 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3539 if (particle->Pt()>0.005){
3545 if (particle->Energy() != TMath::Abs(particle->Pz())){
3546 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3548 if( !(ratio <= 0) ){
3552 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3553 alpha = TMath::Abs((daughter0->Energy() - daughter1->Energy()))/(daughter0->Energy() + daughter1->Energy());
3556 if(particle->GetPdgCode() == 111){
3565 }
else if(particle->GetPdgCode() == 221){
3580 if( kDaughter0IsPrim && kDaughter1IsPrim &&
3583 if(particle->GetPdgCode() == 111){
3586 }
else if(particle->GetPdgCode() == 221){
3595 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3596 if (!particle)
continue;
3598 Int_t isMCFromMBHeader = -1;
3606 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3607 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3609 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3611 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3613 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 221) {
3616 if ( !(TMath::Abs(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()) == 11 &&
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 22) )
3627 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3628 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3630 if(particle->GetFirstMother() > -1) pdgCode = ((TParticle*)
fMCEvent->Particle( particle->GetFirstMother() ))->GetPdgCode();
3632 if(particle->GetPdgCode() == 111){
3636 }
else if(particle->GetPdgCode() == 221){
3644 if(particle->GetPdgCode() == 111){
3664 if (gamma0==NULL)
continue;
3670 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fClusterCandidates->GetEntries();secondGammaIndex++){
3672 if (gamma1==NULL)
continue;
3679 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
3689 if ( pi0cand->M() > 0.05 && pi0cand->M() < 0.17){
3695 if ( pi0cand->M() > 0.45 && pi0cand->M() < 0.65){
3763 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3764 Double_t mcProdVtxX = primVtxMC->GetX();
3765 Double_t mcProdVtxY = primVtxMC->GetY();
3766 Double_t mcProdVtxZ = primVtxMC->GetZ();
3769 Bool_t isTruePi0 = kFALSE;
3770 Bool_t isTrueEta = kFALSE;
3772 Bool_t isSameConvertedGamma = kFALSE;
3773 Int_t convertedPhotonLabel0 = -1;
3774 Int_t convertedPhotonLabel1 = -1;
3777 Int_t gamma0MotherLabel = -1;
3779 TParticle * gammaMC0 = 0x0;
3780 if(gamma0MCLabel != -1){
3781 gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
3785 gamma0MotherLabel=gammaMC0->GetMother(0);
3787 if (TrueGammaCandidate0->
IsConversion() && (gammaMC0->GetMother(0) > -1)){
3788 convertedPhotonLabel0 = gammaMC0->GetMother(0);
3789 gamma0MotherLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
3791 gamma0MotherLabel=gammaMC0->GetMother(0);
3796 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
3799 Int_t gamma1MotherLabel = -1;
3802 TParticle * gammaMC1 = 0x0;
3803 if(gamma1MCLabel != -1){
3805 gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
3809 gamma1MotherLabel = gammaMC1->GetMother(0);
3813 convertedPhotonLabel1 = gammaMC1->GetMother(0);
3815 if(convertedPhotonLabel1 > -1) gamma1MotherLabel =
fMCEvent->Particle(convertedPhotonLabel1)->GetMother(0);
3817 gamma1MotherLabel=gammaMC1->GetMother(0);
3824 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3825 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
3828 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 221){
3835 fPt = Pi0Candidate->Pt();
3840 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
3845 Double_t scaling = (375 - TMath::Sqrt(vertex[0]*vertex[0]+vertex[1]*vertex[1]))/(TMath::Sqrt(Pi0Candidate->Px()*Pi0Candidate->Px()+Pi0Candidate->Py()*Pi0Candidate->Py()));
3846 vertex[0] = vertex[0] + scaling*Pi0Candidate->Px();
3847 vertex[1] = vertex[1] + scaling*Pi0Candidate->Py();
3848 vertex[2] = vertex[2] + scaling*Pi0Candidate->Pz();
3852 TClonesArray * arrClustersMesonCand = NULL;
3854 arrClustersMesonCand = dynamic_cast<TClonesArray*>(
fInputEvent->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
3856 AliVCluster* clus1 = NULL;
3858 if(arrClustersMesonCand)
3859 clus1 =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate0->
GetCaloClusterRef()));
3862 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
3863 if(arrClustersMesonCand)
3864 clus1 =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate0->
GetCaloClusterRef()));
3870 TLorentzVector clusterVector1;
3871 clus1->GetMomentum(clusterVector1,vertex);
3872 if(arrClustersMesonCand)
delete clus1;
3873 TLorentzVector* tmpvec1 =
new TLorentzVector();
3874 tmpvec1->SetPxPyPzE(clusterVector1.Px(),clusterVector1.Py(),clusterVector1.Pz(),clusterVector1.E());
3877 if(!PhotonCandidate1)
return;
3880 AliVCluster* clus2 = NULL;
3882 if(arrClustersMesonCand)
3883 clus2 =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate1->
GetCaloClusterRef()));
3886 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
3887 if(arrClustersMesonCand)
3888 clus2 =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate1->
GetCaloClusterRef()));
3894 TLorentzVector clusterVector2;
3895 clus2->GetMomentum(clusterVector2,vertex);
3896 if(arrClustersMesonCand)
delete clus2;
3897 TLorentzVector* tmpvec2 =
new TLorentzVector();
3898 tmpvec2->SetPxPyPzE(clusterVector2.Px(),clusterVector2.Py(),clusterVector2.Pz(),clusterVector2.E());
3901 if(!PhotonCandidate2)
return;
3908 delete PhotonCandidate1;
3909 delete PhotonCandidate2;
3916 if (convertedPhotonLabel0 > -1 && convertedPhotonLabel1 > -1){
3917 if (convertedPhotonLabel0==convertedPhotonLabel1){
3918 isSameConvertedGamma = kTRUE;
3926 if(isTruePi0 || isTrueEta){