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 fHistoMotherPi0PtY(NULL),
94 fHistoMotherEtaPtY(NULL),
95 fHistoMotherPi0PtAlpha(NULL),
96 fHistoMotherEtaPtAlpha(NULL),
97 fHistoMotherPi0PtOpenAngle(NULL),
98 fHistoMotherEtaPtOpenAngle(NULL),
99 fHistoMotherPi0NGoodESDTracksPt(NULL),
100 fHistoMotherEtaNGoodESDTracksPt(NULL),
101 fHistoMotherInvMassECalib(NULL),
102 fHistoMotherBackInvMassECalib(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 fHistoMotherPi0PtY(NULL),
365 fHistoMotherEtaPtY(NULL),
366 fHistoMotherPi0PtAlpha(NULL),
367 fHistoMotherEtaPtAlpha(NULL),
368 fHistoMotherPi0PtOpenAngle(NULL),
369 fHistoMotherEtaPtOpenAngle(NULL),
370 fHistoMotherPi0NGoodESDTracksPt(NULL),
371 fHistoMotherEtaNGoodESDTracksPt(NULL),
372 fHistoMotherInvMassECalib(NULL),
373 fHistoMotherBackInvMassECalib(NULL),
374 fHistoClusGammaPt(NULL),
375 fHistoClusGammaE(NULL),
376 fHistoClusOverlapHeadersGammaPt(NULL),
377 fHistoClusAllHeadersGammaPt(NULL),
378 fHistoClusRejectedHeadersGammaPt(NULL),
379 fHistoClusGammaPtM02(NULL),
380 fHistoMCHeaders(NULL),
381 fHistoMCAllGammaPt(NULL),
382 fHistoMCAllSecondaryGammaPt(NULL),
383 fHistoMCDecayGammaPi0Pt(NULL),
384 fHistoMCDecayGammaRhoPt(NULL),
385 fHistoMCDecayGammaEtaPt(NULL),
386 fHistoMCDecayGammaOmegaPt(NULL),
387 fHistoMCDecayGammaEtapPt(NULL),
388 fHistoMCDecayGammaPhiPt(NULL),
389 fHistoMCDecayGammaSigmaPt(NULL),
391 fHistoMCPi0WOWeightPt(NULL),
392 fHistoMCPi0WOEvtWeightPt(NULL),
394 fHistoMCEtaWOWeightPt(NULL),
395 fHistoMCEtaWOEvtWeightPt(NULL),
396 fHistoMCPi0InAccPt(NULL),
397 fHistoMCEtaInAccPt(NULL),
398 fHistoMCPi0WOEvtWeightInAccPt(NULL),
399 fHistoMCEtaWOEvtWeightInAccPt(NULL),
400 fHistoMCPi0PtY(NULL),
401 fHistoMCEtaPtY(NULL),
402 fHistoMCPi0PtAlpha(NULL),
403 fHistoMCEtaPtAlpha(NULL),
404 fHistoMCPrimaryPtvsSource(NULL),
405 fHistoMCSecPi0PtvsSource(NULL),
406 fHistoMCSecPi0Source(NULL),
407 fHistoMCSecPi0InAccPtvsSource(NULL),
408 fHistoMCSecEtaPt(NULL),
409 fHistoMCSecEtaSource(NULL),
410 fHistoMCPi0PtJetPt(NULL),
411 fHistoMCEtaPtJetPt(NULL),
412 fHistoTruePi0InvMassPt(NULL),
413 fHistoTrueEtaInvMassPt(NULL),
414 fHistoTruePi0CaloPhotonInvMassPt(NULL),
415 fHistoTrueEtaCaloPhotonInvMassPt(NULL),
416 fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
417 fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
418 fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt(NULL),
419 fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt(NULL),
420 fHistoTruePi0CaloElectronInvMassPt(NULL),
421 fHistoTrueEtaCaloElectronInvMassPt(NULL),
422 fHistoTruePi0CaloMergedClusterInvMassPt(NULL),
423 fHistoTrueEtaCaloMergedClusterInvMassPt(NULL),
424 fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL),
425 fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL),
426 fHistoTruePi0NonMergedElectronPhotonInvMassPt(NULL),
427 fHistoTruePi0NonMergedElectronMergedPhotonInvMassPt(NULL),
428 fHistoTruePi0Category1(NULL),
429 fHistoTrueEtaCategory1(NULL),
430 fHistoTruePi0Category2(NULL),
431 fHistoTrueEtaCategory2(NULL),
432 fHistoTruePi0Category3(NULL),
433 fHistoTrueEtaCategory3(NULL),
434 fHistoTruePi0Category4_6(NULL),
435 fHistoTrueEtaCategory4_6(NULL),
436 fHistoTruePi0Category5(NULL),
437 fHistoTrueEtaCategory5(NULL),
438 fHistoTruePi0Category7(NULL),
439 fHistoTrueEtaCategory7(NULL),
440 fHistoTruePi0Category8(NULL),
441 fHistoTrueEtaCategory8(NULL),
442 fHistoTruePrimaryPi0InvMassPt(NULL),
443 fHistoTruePrimaryEtaInvMassPt(NULL),
444 fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL),
445 fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL),
446 fProfileTruePrimaryPi0WeightsInvMassPt(NULL),
447 fProfileTruePrimaryEtaWeightsInvMassPt(NULL),
448 fHistoTruePrimaryPi0MCPtResolPt(NULL),
449 fHistoTruePrimaryEtaMCPtResolPt(NULL),
450 fHistoTrueSecondaryPi0InvMassPt(NULL),
451 fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
452 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
453 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
454 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
455 fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
456 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
457 fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL),
458 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
459 fHistoTrueBckGGInvMassPt(NULL),
460 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
461 fHistoTrueBckAsymEClustersInvMassPt(NULL),
462 fHistoTrueBckContInvMassPt(NULL),
463 fHistoTruePi0PtY(NULL),
464 fHistoTrueEtaPtY(NULL),
465 fHistoTruePi0PtAlpha(NULL),
466 fHistoTrueEtaPtAlpha(NULL),
467 fHistoTruePi0PtOpenAngle(NULL),
468 fHistoTrueEtaPtOpenAngle(NULL),
469 fHistoClusPhotonBGPt(NULL),
470 fHistoClusPhotonPlusConvBGPt(NULL),
471 fHistoClustPhotonElectronBGPtM02(NULL),
472 fHistoClustPhotonPionBGPtM02(NULL),
473 fHistoClustPhotonKaonBGPtM02(NULL),
474 fHistoClustPhotonK0lBGPtM02(NULL),
475 fHistoClustPhotonNeutronBGPtM02(NULL),
476 fHistoClustPhotonRestBGPtM02(NULL),
477 fHistoClustPhotonPlusConvElectronBGPtM02(NULL),
478 fHistoClustPhotonPlusConvPionBGPtM02(NULL),
479 fHistoClustPhotonPlusConvKaonBGPtM02(NULL),
480 fHistoClustPhotonPlusConvK0lBGPtM02(NULL),
481 fHistoClustPhotonPlusConvNeutronBGPtM02(NULL),
482 fHistoClustPhotonPlusConvRestBGPtM02(NULL),
483 fHistoTrueClusGammaPt(NULL),
484 fHistoTrueClusUnConvGammaPt(NULL),
485 fHistoTrueClusUnConvGammaMCPt(NULL),
486 fHistoTrueClusGammaPtM02(NULL),
487 fHistoTrueClusUnConvGammaPtM02(NULL),
488 fHistoTrueClusElectronPt(NULL),
489 fHistoTrueClusConvGammaPt(NULL),
490 fHistoTrueClusConvGammaMCPt(NULL),
491 fHistoTrueClusConvGammaFullyPt(NULL),
492 fHistoTrueClusMergedGammaPt(NULL),
493 fHistoTrueClusMergedPartConvGammaPt(NULL),
494 fHistoTrueClusDalitzPt(NULL),
495 fHistoTrueClusDalitzMergedPt(NULL),
496 fHistoTrueClusPhotonFromElecMotherPt(NULL),
497 fHistoTrueClusShowerPt(NULL),
498 fHistoTrueClusSubLeadingPt(NULL),
499 fHistoTrueClusNParticles(NULL),
500 fHistoTrueClusEMNonLeadingPt(NULL),
501 fHistoTrueNLabelsInClus(NULL),
502 fHistoTruePrimaryClusGammaPt(NULL),
503 fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
504 fHistoTruePrimaryClusConvGammaPt(NULL),
505 fHistoTruePrimaryClusConvGammaESDPtMCPt(NULL),
506 fHistoTrueSecondaryClusGammaPt(NULL),
507 fHistoTrueSecondaryClusConvGammaPt(NULL),
508 fHistoTrueSecondaryClusGammaMCPt(NULL),
509 fHistoTrueSecondaryClusConvGammaMCPt(NULL),
510 fHistoTrueSecondaryClusGammaFromXFromK0sMCPtESDPt(NULL),
511 fHistoTrueSecondaryClusConvGammaFromXFromK0sMCPtESDPt(NULL),
512 fHistoTrueSecondaryClusGammaFromXFromK0lMCPtESDPt(NULL),
513 fHistoTrueSecondaryClusConvGammaFromXFromK0lMCPtESDPt(NULL),
514 fHistoTrueSecondaryClusGammaFromXFromLambdaMCPtESDPt(NULL),
515 fHistoTrueSecondaryClusConvGammaFromXFromLambdaMCPtESDPt(NULL),
516 fHistoDoubleCountTruePi0InvMassPt(NULL),
517 fHistoDoubleCountTrueEtaInvMassPt(NULL),
518 fHistoDoubleCountTrueClusterGammaPt(NULL),
519 fVectorDoubleCountTruePi0s(0),
520 fVectorDoubleCountTrueEtas(0),
521 fVectorDoubleCountTrueClusterGammas(0),
522 fHistoMultipleCountTrueClusterGamma(NULL),
523 fMapMultipleCountTrueClusterGammas(),
524 fHistoTruePi0InvMassPtAlpha(NULL),
525 fHistoTruePi0PureGammaInvMassPtAlpha(NULL),
526 fHistCellIDvsClusterEnergy(NULL),
527 fHistCellIDvsClusterEnergyMax(NULL),
529 fHistoNEventsWOWeight(NULL),
530 fHistoNGoodESDTracks(NULL),
532 fHistoNGammaCandidates(NULL),
533 fHistoNGammaCandidatesBasic(NULL),
534 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
535 fHistoSPDClusterTrackletBackground(NULL),
536 fHistoNV0Tracks(NULL),
537 fProfileEtaShift(NULL),
538 fProfileJetJetXSection(NULL),
539 fHistoJetJetNTrials(NULL),
540 tTrueInvMassROpenABPtFlag(NULL),
547 tSigInvMassPtAlphaTheta(NULL),
548 tBckInvMassPtAlphaTheta(NULL),
549 fInvMassTreeInvMass(0),
551 fInvMassTreeAlpha(0),
552 fInvMassTreeTheta(0),
553 fInvMassTreeMixPool(0),
554 fInvMassTreeZVertex(0),
556 tClusterEOverP(NULL),
561 fClusterLeadCellID(0),
562 fClusterClassification(0),
570 fClusterIsoSumClusterEt(0),
571 fClusterIsoSumTrackEt(0),
574 fEventPlaneAngle(-100),
579 fDoLightOutput(kFALSE),
580 fDoMesonAnalysis(kTRUE),
583 fIsFromDesiredHeader(kTRUE),
584 fIsOverlappingWithOtherHeader(kFALSE),
587 fSetPlotHistsExtQA(kFALSE),
589 fDoInOutTimingCluster(kFALSE),
590 fMinTimingCluster(0),
591 fMaxTimingCluster(0),
592 fEnableSortForClusMC(kFALSE),
593 fProduceCellIDPlots(kFALSE),
594 fProduceTreeEOverP(kFALSE),
596 fFileNameBroken(NULL),
597 tClusterQATree(NULL),
598 fCloseHighPtClusters(NULL),
600 fAllowOverlapHeaders(kTRUE),
601 fNCurrentClusterBasic(0)
604 DefineOutput(1, TList::Class());
621 const Int_t nDim = 4;
622 Int_t nBins[nDim] = {800,350,7,6};
644 if(collisionSystem == 1 || collisionSystem == 2 ||
645 collisionSystem == 5 || collisionSystem == 8 ||
646 collisionSystem == 9){
647 centMin = centMin*10;
648 centMax = centMax*10;
649 if(centMax ==0 && centMax!=centMin) centMax=100;
650 }
else if(collisionSystem == 3 || collisionSystem == 6){
653 }
else if(collisionSystem == 4 || collisionSystem == 7){
654 centMin = ((centMin*5)+45);
655 centMax = ((centMax*5)+45);
660 fBackList[iCut]->SetName(Form(
"%s_%s_%s Back histograms",cutstringEvent.Data(),cutstringCalo.Data(), cutstringMeson.Data()));
668 fMotherList[iCut]->SetName(Form(
"%s_%s_%s Mother histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
672 fSparseMotherInvMassPtZM[iCut] =
new THnSparseF(
"Back_Mother_InvMass_Pt_z_m",
"Back_Mother_InvMass_Pt_z_m", nDim,nBins,xMin,xMax);
678 collisionSystem,centMin,centMax,
690 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
695 }
else if (
fIsMC == 3){
704 Int_t nBinsQAPt = 175;
706 Int_t nBinsClusterPt = 500;
716 for(
Int_t i=0; i<nBinsPt+1;i++){
717 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
721 for(
Int_t i=0; i<nBinsQAPt+1;i++){
722 if(i<60) arrQAPtBinning[i] = 0.05*i;
723 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
724 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
725 else if(i<190) arrQAPtBinning[i] = 20.+1.0*(i-170);
726 else arrQAPtBinning[i] = maxQAPt;
728 nBinsClusterPt = 800;
731 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
732 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
740 for(
Int_t i=0; i<nBinsPt+1;i++){
741 if (i < 1) arrPtBinning[i] = 0.3*i;
742 else if(i<55) arrPtBinning[i] = 0.3+0.05*(i-1);
743 else if(i<225) arrPtBinning[i] = 3.+0.1*(i-55);
744 else if(i<265) arrPtBinning[i] = 20.+0.25*(i-225);
745 else if(i<305) arrPtBinning[i] = 30.+0.5*(i-265);
746 else if(i<325) arrPtBinning[i] = 50.+1.0*(i-305);
747 else if(i<335) arrPtBinning[i] = 70.+2.5*(i-325);
748 else arrPtBinning[i] = maxPt;
752 for(
Int_t i=0; i<nBinsQAPt+1;i++){
753 if(i<60) arrQAPtBinning[i] = 0.05*i;
754 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
755 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
756 else if(i<210) arrQAPtBinning[i] = 20.+0.5*(i-170);
757 else if(i<270) arrQAPtBinning[i] = 40.+1.0*(i-210);
758 else arrQAPtBinning[i] = maxQAPt;
760 nBinsClusterPt = 335;
763 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
764 if (i < 1) arrClusPtBinning[i] = 0.3*i;
765 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
766 else if(i<225) arrClusPtBinning[i] = 3.+0.1*(i-55);
767 else if(i<265) arrClusPtBinning[i] = 20.+0.25*(i-225);
768 else if(i<305) arrClusPtBinning[i] = 30.+0.5*(i-265);
769 else if(i<325) arrClusPtBinning[i] = 50.+1.0*(i-305);
770 else if(i<335) arrClusPtBinning[i] = 70.+2.5*(i-325);
771 else arrClusPtBinning[i] = maxClusterPt;
778 for(
Int_t i=0; i<nBinsPt+1;i++){
779 if (i < 1) arrPtBinning[i] = 0.5*i;
780 else if(i<51) arrPtBinning[i] = 0.5+0.05*(i-1);
781 else if(i<121) arrPtBinning[i] = 3.+0.1*(i-51);
782 else if(i<161) arrPtBinning[i] = 10.+0.25*(i-121);
783 else if(i<201) arrPtBinning[i] = 20.+0.5*(i-161);
784 else if(i<261) arrPtBinning[i] = 40.+1.0*(i-201);
785 else arrPtBinning[i] = maxPt;
789 for(
Int_t i=0; i<nBinsQAPt+1;i++){
790 if(i<60) arrQAPtBinning[i] = 0.05*i;
791 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
792 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
793 else if(i<210) arrQAPtBinning[i] = 20.+0.5*(i-170);
794 else if(i<270) arrQAPtBinning[i] = 40.+1.0*(i-210);
795 else arrQAPtBinning[i] = maxQAPt;
797 nBinsClusterPt = 301;
800 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
801 if (i < 1) arrClusPtBinning[i] = 0.3*i;
802 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
803 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
804 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
805 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
806 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
807 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
808 else arrClusPtBinning[i] = maxClusterPt;
817 for(
Int_t i=0; i<nBinsPt+1;i++){
818 if (i < 1) arrPtBinning[i] = 0.5*i;
819 else if(i<51) arrPtBinning[i] = 0.5+0.05*(i-1);
820 else if(i<121) arrPtBinning[i] = 3.+0.1*(i-51);
821 else if(i<161) arrPtBinning[i] = 10.+0.25*(i-121);
822 else if(i<201) arrPtBinning[i] = 20.+1.0*(i-161);
823 else arrPtBinning[i] = maxPt;
827 for(
Int_t i=0; i<nBinsQAPt+1;i++){
828 if(i<60) arrQAPtBinning[i] = 0.05*i;
829 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
830 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
831 else if(i<210) arrQAPtBinning[i] = 20.+1.0*(i-170);
832 else arrQAPtBinning[i] = maxQAPt;
834 nBinsClusterPt = 301;
837 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
838 if (i < 1) arrClusPtBinning[i] = 0.3*i;
839 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
840 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
841 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
842 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
843 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
844 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
845 else arrClusPtBinning[i] = maxClusterPt;
851 for(
Int_t i=0; i<nBinsPt+1;i++){
852 if (i < 1) arrPtBinning[i] = 0.5*i;
853 else if(i<56) arrPtBinning[i] = 0.5+0.1*(i-1);
854 else if(i<80) arrPtBinning[i] = 6.+0.25*(i-56);
855 else if(i<88) arrPtBinning[i] = 12.+1.0*(i-80);
856 else arrPtBinning[i] = maxPt;
860 for(
Int_t i=0; i<nBinsQAPt+1;i++){
861 if(i<60) arrQAPtBinning[i] = 0.1*i;
862 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
863 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
864 else arrQAPtBinning[i] = maxQAPt;
866 nBinsClusterPt = 148;
869 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
870 if (i < 1) arrClusPtBinning[i] = 0.3*i;
871 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
872 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
873 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
874 else arrClusPtBinning[i] = maxClusterPt;
880 for(
Int_t i=0; i<nBinsPt+1;i++){
881 if (i < 1) arrPtBinning[i] = 0.5*i;
882 else if(i<56) arrPtBinning[i] = 0.5+0.1*(i-1);
883 else if(i<80) arrPtBinning[i] = 6.+0.25*(i-56);
884 else if(i<88) arrPtBinning[i] = 12.+1.0*(i-80);
885 else arrPtBinning[i] = maxPt;
889 for(
Int_t i=0; i<nBinsQAPt+1;i++){
890 if(i<60) arrQAPtBinning[i] = 0.1*i;
891 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
892 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
893 else arrQAPtBinning[i] = maxQAPt;
895 nBinsClusterPt = 148;
898 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
899 if (i < 1) arrClusPtBinning[i] = 0.3*i;
900 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
901 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
902 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
903 else arrClusPtBinning[i] = maxClusterPt;
906 for(
Int_t i=0; i<nBinsPt+1;i++){
907 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
909 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
910 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
912 for(
Int_t i=0; i<nBinsQAPt+1;i++){
913 if(i<60) arrQAPtBinning[i] = 0.05*i;
914 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
915 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
916 else if(i<175) arrQAPtBinning[i] = 20.+1.0*(i-170);
917 else arrQAPtBinning[i] = maxQAPt;
1007 TString cutstringMeson =
"NoMesonCut";
1012 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s_%s", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1016 fESDList[iCut]->SetName(Form(
"%s_%s_%s ESD histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1020 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents", 14, -0.5, 13.5);
1022 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
1023 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
1025 TString TriggerNames =
"Not Trigger: ";
1027 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
1032 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
1033 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,
"SPD Pile-Up");
1036 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problems");
1037 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
1038 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
1039 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
1040 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
1049 TString TriggerNames =
"Not Trigger: ";
1084 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ", 200, -10, 10);
1122 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 30000, 0, 30000);
1124 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 2500, 0, 2500);
1126 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 1500, 0, 1500);
1132 fProfileEtaShift[iCut] =
new TProfile(
"Eta Shift",
"Eta Shift", 1, -0.5, 0.5);
1151 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1154 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E", nBinsClusterPt, arrClusPtBinning);
1160 fHistoClusAllHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaAllHeaders_Pt",
"ClusGammaAllHeaders_Pt", nBinsClusterPt, arrClusPtBinning);
1167 fHistoClusGammaPtM02[iCut] =
new TH2F(
"ClusGamma_Pt_M02",
"ClusGamma_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1183 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
1212 fHistoMotherPi0PtY[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Y",
"ESD_MotherPi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1216 fHistoMotherEtaPtY[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Y",
"ESD_MotherEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1220 fHistoMotherPi0PtAlpha[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Alpha",
"ESD_MotherPi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1224 fHistoMotherEtaPtAlpha[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Alpha",
"ESD_MotherEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1274 Int_t nMaxCells = 12*48*24;
1290 fTreeList[iCut]->SetName(Form(
"%s_%s_%s InvMass Tree", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1317 fClusterTreeList[iCut]->SetName(Form(
"%s_%s EoverP Tree",cutstringEvent.Data(),cutstringCalo.Data()));
1321 tClusterEOverP[iCut] =
new TTree(
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt",
"EOverP_ClusE_ClusM02_ClusM20_TrackP_TrackPt");
1537 TString cutstringMeson =
"NoMesonCut";
1542 fMCList[iCut]->SetName(Form(
"%s_%s_%s MC histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1543 fMCList[iCut]->SetOwner(kTRUE);
1550 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1562 fHistoMCDecayGammaPi0Pt[iCut] =
new TH1F(
"MC_DecayGammaPi0_Pt",
"MC_DecayGammaPi0_Pt", nBinsClusterPt, arrClusPtBinning);
1565 fHistoMCDecayGammaRhoPt[iCut] =
new TH1F(
"MC_DecayGammaRho_Pt",
"MC_DecayGammaRho_Pt", nBinsClusterPt, arrClusPtBinning);
1568 fHistoMCDecayGammaEtaPt[iCut] =
new TH1F(
"MC_DecayGammaEta_Pt",
"MC_DecayGammaEta_Pt", nBinsClusterPt, arrClusPtBinning);
1571 fHistoMCDecayGammaOmegaPt[iCut] =
new TH1F(
"MC_DecayGammaOmega_Pt",
"MC_DecayGammaOmmega_Pt", nBinsClusterPt, arrClusPtBinning);
1574 fHistoMCDecayGammaEtapPt[iCut] =
new TH1F(
"MC_DecayGammaEtap_Pt",
"MC_DecayGammaEtap_Pt", nBinsClusterPt, arrClusPtBinning);
1577 fHistoMCDecayGammaPhiPt[iCut] =
new TH1F(
"MC_DecayGammaPhi_Pt",
"MC_DecayGammaPhi_Pt", nBinsClusterPt, arrClusPtBinning);
1580 fHistoMCDecayGammaSigmaPt[iCut] =
new TH1F(
"MC_DecayGammaSigma_Pt",
"MC_DecayGammaSigma_Pt", nBinsClusterPt, arrClusPtBinning);
1598 fHistoMCPi0Pt[iCut] =
new TH1F(
"MC_Pi0_Pt",
"MC_Pi0_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1602 fHistoMCPi0WOWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOWeights_Pt",
"MC_Pi0_WOWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1607 fHistoMCEtaPt[iCut] =
new TH1F(
"MC_Eta_Pt",
"MC_Eta_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1611 fHistoMCEtaWOWeightPt[iCut] =
new TH1F(
"MC_Eta_WOWeights_Pt",
"MC_Eta_WOWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1615 fHistoMCPi0InAccPt[iCut] =
new TH1F(
"MC_Pi0InAcc_Pt",
"MC_Pi0InAcc_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1619 fHistoMCEtaInAccPt[iCut] =
new TH1F(
"MC_EtaInAcc_Pt",
"MC_EtaInAcc_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1626 fHistoMCPi0WOEvtWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOEventWeights_Pt",
"MC_Pi0_WOEventWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1629 fHistoMCEtaWOEvtWeightPt[iCut] =
new TH1F(
"MC_Eta_WOEventWeights_Pt",
"MC_Eta_WOEventWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1639 fHistoMCPi0PtJetPt[iCut] =
new TH2F(
"MC_Pi0_Pt_JetPt",
"MC_Pi0_Pt_JetPt", nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1644 fHistoMCEtaPtJetPt[iCut] =
new TH2F(
"MC_Eta_Pt_JetPt",
"MC_Eta_Pt_JetPt", nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1678 fHistoMCSecEtaPt[iCut] =
new TH1F(
"MC_SecEta_Pt",
"MC_SecEta_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1690 fHistoMCPi0PtY[iCut] =
new TH2F(
"MC_Pi0_Pt_Y",
"MC_Pi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1695 fHistoMCEtaPtY[iCut] =
new TH2F(
"MC_Eta_Pt_Y",
"MC_Eta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1700 fHistoMCPi0PtAlpha[iCut] =
new TH2F(
"MC_Pi0_Pt_Alpha",
"MC_Pi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1704 fHistoMCEtaPtAlpha[iCut] =
new TH2F(
"MC_Eta_Pt_Alpha",
"MC_Eta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1716 fTrueList[iCut]->SetName(Form(
"%s_%s_%s True histograms", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
1721 fHistoClusPhotonBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonBG_Pt",
"ESD_TrueClusPhotonBG_Pt", nBinsClusterPt, arrClusPtBinning,10,-0.5,9.5);
1735 fHistoClusPhotonPlusConvBGPt[iCut] =
new TH2F(
"ESD_TrueClusPhotonPlusConvBG_Pt",
"ESD_TrueClusPhotonPlusConvBG_Pt", nBinsClusterPt, arrClusPtBinning,10,-0.5,9.5);
1755 fHistoClustPhotonPionBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonPionBG_Pt_M02",
"ESD_TrueClusPhotonPionBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1759 fHistoClustPhotonKaonBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonKaonBG_Pt_M02",
"ESD_TrueClusPhotonKaonBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1763 fHistoClustPhotonK0lBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonK0lBG_Pt_M02",
"ESD_TrueClusPhotonK0lBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1767 fHistoClustPhotonNeutronBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonNeutronBG_Pt_M02",
"ESD_TrueClusPhotonNeutronBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1771 fHistoClustPhotonRestBGPtM02[iCut] =
new TH2F(
"ESD_TrueClusPhotonRestBG_Pt_M02",
"ESD_TrueClusPhotonRestBG_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1802 fHistoTrueClusGammaPt[iCut] =
new TH1F(
"TrueClusGamma_Pt",
"ESD_TrueClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1807 fHistoTrueClusGammaPtM02[iCut] =
new TH2F(
"TrueClusGamma_Pt_M02",
"TrueClusGamma_Pt_M02", nBinsClusterPt, arrClusPtBinning, 100, 0, 1);
1812 fHistoTruePrimaryClusGammaPt[iCut] =
new TH1F(
"TruePrimaryClusGamma_Pt",
"ESD_TruePrimaryClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1864 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1869 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1874 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1879 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1884 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1889 nBinsClusterPt, arrClusPtBinning, nBinsClusterPt, arrClusPtBinning);
1931 fHistoTrueClusUnConvGammaPt[iCut] =
new TH1F(
"TrueClusUnConvGamma_Pt",
"TrueClusUnConvGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1943 fHistoTrueClusElectronPt[iCut] =
new TH1F(
"TrueClusElectron_Pt",
"TrueElectronGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1946 fHistoTrueClusConvGammaPt[iCut] =
new TH1F(
"TrueClusConvGamma_Pt",
"TrueClusConvGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1949 fHistoTrueClusConvGammaMCPt[iCut] =
new TH1F(
"TrueClusConvGamma_MCPt",
"TrueClusConvGamma_MCPt", nBinsClusterPt, arrClusPtBinning);
1952 fHistoTrueClusConvGammaFullyPt[iCut] =
new TH1F(
"TrueClusConvGammaFullyContained_Pt",
"TrueClusConvGammaFullyContained_Pt", nBinsClusterPt, arrClusPtBinning);
1955 fHistoTrueClusMergedGammaPt[iCut] =
new TH1F(
"TrueClusMergedGamma_Pt",
"TrueClusMergedGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1961 fHistoTrueClusDalitzPt[iCut] =
new TH1F(
"TrueClusDalitz_Pt",
"TrueClusDalitz_Pt", nBinsClusterPt, arrClusPtBinning);
1970 fHistoTrueClusShowerPt[iCut] =
new TH1F(
"TrueClusShower_Pt",
"TrueClusShower_Pt", nBinsClusterPt, arrClusPtBinning);
1973 fHistoTrueClusSubLeadingPt[iCut] =
new TH1F(
"TrueClusSubleading_Pt",
"TrueClusSubleading_Pt", nBinsClusterPt, arrClusPtBinning);
2005 fHistoTruePi0InvMassPt[iCut] =
new TH2F(
"ESD_TruePi0_InvMass_Pt",
"ESD_TruePi0_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2009 fHistoTrueEtaInvMassPt[iCut] =
new TH2F(
"ESD_TrueEta_InvMass_Pt",
"ESD_TrueEta_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2063 fHistoTruePi0InvMassPtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_InvMass_vs_Pt_Alpha",
"ESD_TruePi0_InvMass_vs_Pt_Alpha", 800, 0, 0.8, nBinsPt, arrPtBinning);
2119 nBinsPt, arrPtBinning);
2124 nBinsPt, arrPtBinning);
2157 nBinsPt, arrPtBinning);
2162 nBinsPt, arrPtBinning);
2172 nBinsPt, arrPtBinning);
2203 fHistoTruePi0PtY[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Y",
"ESD_TruePi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
2207 fHistoTrueEtaPtY[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Y",
"ESD_TrueEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
2211 fHistoTruePi0PtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Alpha",
"ESD_TruePi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
2215 fHistoTrueEtaPtAlpha[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Alpha",
"ESD_TrueEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
2220 fHistoTruePi0PtOpenAngle[iCut] =
new TH2F(
"ESD_TruePi0_Pt_OpenAngle",
"ESD_TruePi0_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 100, 0, 0.5);
2224 fHistoTrueEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_TrueEta_Pt_OpenAngle",
"ESD_TrueEta_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 180, 0, 1.8);
2262 fHistoTruePi0Category1[iCut] =
new TH2F(
"ESD_TruePi0Category1_InvMass_Pt",
"ESD_TruePi0Category1_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2266 fHistoTrueEtaCategory1[iCut] =
new TH2F(
"ESD_TrueEtaCategory1_InvMass_Pt",
"ESD_TrueEtaCategory1_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2270 fHistoTruePi0Category2[iCut] =
new TH2F(
"ESD_TruePi0Category2_InvMass_Pt",
"ESD_TruePi0Category2_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2274 fHistoTrueEtaCategory2[iCut] =
new TH2F(
"ESD_TrueEtaCategory2_InvMass_Pt",
"ESD_TrueEtaCategory2_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2278 fHistoTruePi0Category3[iCut] =
new TH2F(
"ESD_TruePi0Category3_InvMass_Pt",
"ESD_TruePi0Category3_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2282 fHistoTrueEtaCategory3[iCut] =
new TH2F(
"ESD_TrueEtaCategory3_InvMass_Pt",
"ESD_TrueEtaCategory3_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2286 fHistoTruePi0Category4_6[iCut] =
new TH2F(
"ESD_TruePi0Category4_6_InvMass_Pt",
"ESD_TruePi0Category4_6_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2290 fHistoTrueEtaCategory4_6[iCut] =
new TH2F(
"ESD_TrueEtaCategory4_6_InvMass_Pt",
"ESD_TrueEtaCategory4_6_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2294 fHistoTruePi0Category5[iCut] =
new TH2F(
"ESD_TruePi0Category5_InvMass_Pt",
"ESD_TruePi0Category5_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2298 fHistoTrueEtaCategory5[iCut] =
new TH2F(
"ESD_TrueEtaCategory5_InvMass_Pt",
"ESD_TrueEtaCategory5_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2302 fHistoTruePi0Category7[iCut] =
new TH2F(
"ESD_TruePi0Category7_InvMass_Pt",
"ESD_TruePi0Category7_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2306 fHistoTrueEtaCategory7[iCut] =
new TH2F(
"ESD_TrueEtaCategory7_InvMass_Pt",
"ESD_TrueEtaCategory7_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2310 fHistoTruePi0Category8[iCut] =
new TH2F(
"ESD_TruePi0Category8_InvMass_Pt",
"ESD_TruePi0Category8_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2314 fHistoTrueEtaCategory8[iCut] =
new TH2F(
"ESD_TrueEtaCategory8_InvMass_Pt",
"ESD_TrueEtaCategory8_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2322 fTreeList[iCut]->SetName(Form(
"%s_%s_%s True ClusterComb tree", cutstringEvent.Data(), cutstringCalo.Data(), cutstringMeson.Data()));
2355 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
2395 fstream fOutputLocalDebug;
2396 fOutputLocalDebug.open(
"debugOutput.txt",ios::out);
2397 fOutputLocalDebug.close();
2423 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
2445 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
2446 if(eventQuality == 2 || eventQuality == 3){
2467 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
2476 Bool_t isRunningEMCALrelAna = kFALSE;
2485 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
2505 Bool_t triggered = kTRUE;
2506 if(eventNotAccepted){
2510 if (eventNotAccepted==3 &&
fIsMC>0){
2517 if(eventQuality != 0){
2523 if (triggered == kTRUE) {
2543 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2553 if (nameBin.CompareTo(
"")== 0){
2555 ->GetAcceptedHeader())->At(i))->GetString();
2556 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
2570 if (triggered==kFALSE)
continue;
2610 TClonesArray * arrClustersProcess = NULL;
2616 if(!arrClustersProcess)
2617 AliFatal(Form(
"%sClustersBranch was not found in AliAnalysisTaskGammaCalo! Check the correction framework settings!",
fCorrTaskSetting.Data()));
2618 nclus = arrClustersProcess->GetEntries();
2621 if(nclus == 0)
return;
2630 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
2633 Int_t maxClusterID = -1;
2634 map<Long_t,Int_t> mapIsClusterAccepted;
2635 map<Long_t,Int_t> mapIsClusterAcceptedWithoutTrackMatch;
2637 for(Long_t i = 0; i < nclus; i++){
2640 AliVCluster* clus = NULL;
2642 if(arrClustersProcess)
2643 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2645 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2646 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2647 if(arrClustersProcess)
2648 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2650 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2657 tempClusterWeight = 1;
2669 TLorentzVector clusterVector;
2670 clus->GetMomentum(clusterVector,vertex);
2672 TLorentzVector* tmpvec =
new TLorentzVector();
2673 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
2677 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
2681 maxClusterEnergy = clus->E();
2682 maxClusterID = (
Int_t) i;
2685 mapIsClusterAccepted[i] = 1;
2686 mapIsClusterAcceptedWithoutTrackMatch[i] = 1;
2695 Int_t* mclabelsCluster = clus->GetLabels();
2698 if (clus->GetNLabels()>0){
2699 for (
Int_t k =0; k< (
Int_t)clus->GetNLabels(); k++){
2714 if (clus->GetNLabels()>1){
2715 Int_t* mclabelsCluster = clus->GetLabels();
2716 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;
2717 for (
Int_t l = 1; l < (
Int_t)clus->GetNLabels(); l++ ){
2743 delete PhotonCandidate;
2751 for(Long_t i = 0; i < nclus; i++){
2752 if( mapIsClusterAccepted[i] != 1 )
continue;
2754 AliVCluster* clus = NULL;
2756 if(arrClustersProcess)
2757 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2759 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2760 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2761 if(arrClustersProcess)
2762 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2764 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2784 AliError(
"Task needs AOD or ESD event...");
2788 AliESDtrackCuts *EsdTrackCuts = 0x0;
2793 if( (runNumber<=146860) || (runNumber>=197470 && runNumber<=197692) || (runNumber>=172440 && runNumber<=193766) ){
2794 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010();
2796 }
else if (runNumber>=209122){
2797 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2015PbPb();
2800 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011();
2802 EsdTrackCuts->SetMaxDCAToVertexZ(2);
2803 EsdTrackCuts->SetEtaRange(-0.8, 0.8);
2804 EsdTrackCuts->SetPtRange(0.15);
2807 for(Long_t i = 0; i < nclus; i++){
2808 if( mapIsClusterAcceptedWithoutTrackMatch[i] != 1 )
continue;
2810 AliVCluster* clus = NULL;
2812 if(arrClustersProcess)
2813 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2815 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2816 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2817 if(arrClustersProcess)
2818 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2820 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2830 Int_t labelTrackMatch = -1;
2836 AliVTrack* currTrack =
dynamic_cast<AliVTrack*
>(
fInputEvent->GetTrack(labelTrackMatch));
2842 AliESDtrack *esdt =
dynamic_cast<AliESDtrack*
>(currTrack);
2843 if(!EsdTrackCuts->AcceptTrack(esdt)){
2854 AliAODTrack *aodt =
dynamic_cast<AliAODTrack*
>(currTrack);
2855 if(!aodt->IsHybridGlobalConstrainedGlobal()){
2859 if(TMath::Abs(aodt->Eta())>0.8){
2877 Float_t temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kElectron));
2882 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kPion));
2887 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,AliPID::kKaon));
2892 temp = TMath::Abs(pidResponse->NumberOfSigmasTPC(currTrack,
AliPID::kProton));
2904 Float_t clsPos[3] = {0.,0.,0.};
2905 Float_t secondClsPos[3] = {0.,0.,0.};
2906 TLorentzVector clusterVector;
2908 clus->GetPosition(clsPos);
2909 TVector3 clsPosVec(clsPos);
2912 for(
Int_t j=0; j<nclus; j++){
2913 if( i == j )
continue;
2914 if( mapIsClusterAcceptedWithoutTrackMatch[j] != 1 )
continue;
2916 AliVCluster* secondClus = NULL;
2918 if(arrClustersProcess)
2919 secondClus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(j));
2921 secondClus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(j));
2922 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2923 if(arrClustersProcess)
2924 secondClus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(j));
2926 secondClus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(j));
2929 if(!secondClus)
continue;
2930 secondClus->GetPosition(secondClsPos);
2931 TVector3 secondClsPosVec(secondClsPos);
2933 Float_t dPhi = clsPosVec.DeltaPhi(secondClsPosVec);
2934 Float_t dEta = clsPosVec.Eta()-secondClsPosVec.Eta();
2935 if(TMath::Sqrt(dEta*dEta + dPhi*dPhi) < 0.2){
2936 secondClus->GetMomentum(clusterVector,vertex);
2937 sum_Et += clusterVector.Et();
2946 TLorentzVector vecTrack;
2947 vecTrack.SetPxPyPzE(currTrack->Px(),currTrack->Py(),currTrack->Pz(),currTrack->E());
2956 mapIsClusterAcceptedWithoutTrackMatch.clear();
2969 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2970 Double_t mcProdVtxX = primVtxMC->GetX();
2971 Double_t mcProdVtxY = primVtxMC->GetY();
2972 Double_t mcProdVtxZ = primVtxMC->GetZ();
2975 TParticle *Photon = NULL;
2976 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2992 Int_t pdgCodeParticle = Photon->GetPdgCode();
3011 if(Photon->GetMother(0) > -1){
3012 TParticle* motherPart = (TParticle*)
fMCEvent->Particle(Photon->GetMother(0));
3022 if (TruePhotonCandidate->
IsDalitz())
3028 if (TruePhotonCandidate->
IsShower())
3041 Int_t motherLab = Photon->GetMother(0);
3042 if (motherLab > -1){
3049 Int_t grandMotherLab =
fMCEvent->Particle(motherLab)->GetMother(0);
3050 if (grandMotherLab > -1){
3079 Int_t secondaryClass = -1;
3087 if (secondaryClass == 2) {
3091 }
else if (secondaryClass == 5) {
3095 }
else if (secondaryClass == 3) {
3099 }
else if (secondaryClass == 4) {
3108 if (secondaryClass == 2) {
3112 }
else if (secondaryClass == 5) {
3116 }
else if (secondaryClass == 3) {
3120 }
else if (secondaryClass == 4) {
3137 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3138 Double_t mcProdVtxX = primVtxMC->GetX();
3139 Double_t mcProdVtxY = primVtxMC->GetY();
3140 Double_t mcProdVtxZ = primVtxMC->GetZ();
3143 AliAODMCParticle *Photon = NULL;
3144 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3146 if (AODMCTrackArray){
3147 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
3151 AliInfo(
"AODMCTrackArray could not be loaded");
3159 Int_t pdgCodeParticle = Photon->GetPdgCode();
3182 AliAODMCParticle *motherPart = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
3191 if (TruePhotonCandidate->
IsDalitz())
3197 if (TruePhotonCandidate->
IsShower())
3211 Int_t motherLab = Photon->GetMother();
3212 if (motherLab > -1){
3219 Int_t grandMotherLab = ((AliAODMCParticle*) AODMCTrackArray->At(motherLab))->GetMother();
3220 if (grandMotherLab > -1){
3234 if (Photon->GetMother()> -1){
3235 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
3251 Int_t secondaryClass = -1;
3259 if (secondaryClass == 2) {
3263 }
else if (secondaryClass == 5) {
3267 }
else if (secondaryClass == 3) {
3271 }
else if (secondaryClass == 4) {
3280 if (secondaryClass == 2) {
3284 }
else if (secondaryClass == 5) {
3288 }
else if (secondaryClass == 3) {
3292 }
else if (secondaryClass == 4) {
3308 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3309 Double_t mcProdVtxX = primVtxMC->GetX();
3310 Double_t mcProdVtxY = primVtxMC->GetY();
3311 Double_t mcProdVtxZ = primVtxMC->GetZ();
3314 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3315 if (AODMCTrackArray == NULL)
return;
3318 for(Long_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
3321 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
3322 if (!particle)
continue;
3327 Int_t isMCFromMBHeader = -1;
3338 if(particle->GetMother() >-1){
3339 switch((static_cast<AliAODMCParticle*>(AODMCTrackArray->At(particle->GetMother())))->GetPdgCode()){
3369 if (particle->E() != TMath::Abs(particle->Pz())){
3370 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3372 if( !(ratio <= 0) ){
3377 if ( particle->GetPdgCode() == 211 ){
3379 }
else if ( particle->GetPdgCode() == -211 ){
3381 }
else if ( particle->GetPdgCode() == 321 ){
3383 }
else if ( particle->GetPdgCode() == -321 ){
3385 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3387 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3389 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3396 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3397 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3400 if (particle->Pt()>0.005){
3407 if (particle->E() != TMath::Abs(particle->Pz())){
3408 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3410 if( !(ratio <= 0) ){
3414 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3415 alpha = TMath::Abs((daughter0->E() - daughter1->E()))/(daughter0->E() + daughter1->E());
3418 if(particle->GetPdgCode() == 111){
3427 }
else if(particle->GetPdgCode() == 221){
3442 if(particle->GetPdgCode() == 111){
3445 }
else if(particle->GetPdgCode() == 221){
3454 Int_t isMCFromMBHeader = -1;
3463 if(particle->GetMother() >-1){
3464 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3465 if(tmpMother->GetMother() >-1){
3466 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
3467 if(tmpGrandMother->GetPdgCode() == 310) {
3469 }
else if (tmpGrandMother->GetPdgCode() == 130) {
3471 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
3473 }
else if (tmpGrandMother->GetPdgCode() == 221) {
3476 if( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
3490 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3491 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3492 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3493 Int_t pdgCode = mother->GetPdgCode();
3494 if(particle->GetPdgCode() == 111){
3498 }
else if(particle->GetPdgCode() == 221){
3507 if(particle->GetPdgCode() == 111){
3520 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3521 Double_t mcProdVtxX = primVtxMC->GetX();
3522 Double_t mcProdVtxY = primVtxMC->GetY();
3523 Double_t mcProdVtxZ = primVtxMC->GetZ();
3526 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
3530 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3531 if (!particle)
continue;
3533 Int_t isMCFromMBHeader = -1;
3544 if(particle->GetMother(0) >-1){
3545 switch(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()){
3575 if (particle->Energy() != TMath::Abs(particle->Pz())){
3576 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3578 if( !(ratio <= 0) ){
3583 if ( particle->GetPdgCode() == 211 ){
3585 }
else if ( particle->GetPdgCode() == -211 ){
3587 }
else if ( particle->GetPdgCode() == 321 ){
3589 }
else if ( particle->GetPdgCode() == -321 ){
3591 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3593 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3595 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3602 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3603 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3607 if (particle->Pt()>0.005){
3613 if (particle->Energy() != TMath::Abs(particle->Pz())){
3614 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3616 if( !(ratio <= 0) ){
3620 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3621 alpha = TMath::Abs((daughter0->Energy() - daughter1->Energy()))/(daughter0->Energy() + daughter1->Energy());
3624 if(particle->GetPdgCode() == 111){
3633 }
else if(particle->GetPdgCode() == 221){
3648 if( kDaughter0IsPrim && kDaughter1IsPrim &&
3651 if(particle->GetPdgCode() == 111){
3654 }
else if(particle->GetPdgCode() == 221){
3663 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3664 if (!particle)
continue;
3667 Int_t isMCFromMBHeader = -1;
3677 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3678 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3680 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3682 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3684 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 221) {
3687 if ( !(TMath::Abs(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()) == 11 &&
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 22) )
3698 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3699 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3701 if(particle->GetFirstMother() > -1) pdgCode = ((TParticle*)
fMCEvent->Particle( particle->GetFirstMother() ))->GetPdgCode();
3703 if(particle->GetPdgCode() == 111){
3707 }
else if(particle->GetPdgCode() == 221){
3715 if(particle->GetPdgCode() == 111){
3735 if (gamma0==NULL)
continue;
3741 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fClusterCandidates->GetEntries();secondGammaIndex++){
3743 if (gamma1==NULL)
continue;
3754 tempPi0CandWeight = 1;
3757 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
3768 if ( pi0cand->M() > 0.05 && pi0cand->M() < 0.17){
3774 if ( pi0cand->M() > 0.45 && pi0cand->M() < 0.65){
3842 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3843 Double_t mcProdVtxX = primVtxMC->GetX();
3844 Double_t mcProdVtxY = primVtxMC->GetY();
3845 Double_t mcProdVtxZ = primVtxMC->GetZ();
3850 Bool_t isTruePi0 = kFALSE;
3851 Bool_t isTrueEta = kFALSE;
3853 Bool_t isSameConvertedGamma = kFALSE;
3854 Int_t convertedPhotonLabel0 = -1;
3855 Int_t convertedPhotonLabel1 = -1;
3858 Int_t gamma0MotherLabel = -1;
3860 TParticle * gammaMC0 = 0x0;
3861 if(gamma0MCLabel != -1){
3862 gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
3866 gamma0MotherLabel=gammaMC0->GetMother(0);
3868 if (TrueGammaCandidate0->
IsConversion() && (gammaMC0->GetMother(0) > -1)){
3869 convertedPhotonLabel0 = gammaMC0->GetMother(0);
3870 gamma0MotherLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
3872 gamma0MotherLabel=gammaMC0->GetMother(0);
3877 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
3880 Int_t gamma1MotherLabel = -1;
3883 TParticle * gammaMC1 = 0x0;
3884 if(gamma1MCLabel != -1){
3886 gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
3890 gamma1MotherLabel = gammaMC1->GetMother(0);
3894 convertedPhotonLabel1 = gammaMC1->GetMother(0);
3896 if(convertedPhotonLabel1 > -1) gamma1MotherLabel =
fMCEvent->Particle(convertedPhotonLabel1)->GetMother(0);
3898 gamma1MotherLabel=gammaMC1->GetMother(0);
3905 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3906 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
3909 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 221){
3918 tempTruePi0CandWeight = 1;
3923 fPt = Pi0Candidate->Pt();
3928 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
3933 Double_t scaling = (375 - TMath::Sqrt(vertex[0]*vertex[0]+vertex[1]*vertex[1]))/(TMath::Sqrt(Pi0Candidate->Px()*Pi0Candidate->Px()+Pi0Candidate->Py()*Pi0Candidate->Py()));
3934 vertex[0] = vertex[0] + scaling*Pi0Candidate->Px();
3935 vertex[1] = vertex[1] + scaling*Pi0Candidate->Py();
3936 vertex[2] = vertex[2] + scaling*Pi0Candidate->Pz();
3940 TClonesArray * arrClustersMesonCand = NULL;
3942 arrClustersMesonCand = dynamic_cast<TClonesArray*>(
fInputEvent->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
3944 AliVCluster* clus1 = NULL;
3946 if(arrClustersMesonCand)
3947 clus1 =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate0->
GetCaloClusterRef()));
3950 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
3951 if(arrClustersMesonCand)
3952 clus1 =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate0->
GetCaloClusterRef()));
3958 TLorentzVector clusterVector1;
3959 clus1->GetMomentum(clusterVector1,vertex);
3960 if(arrClustersMesonCand)
delete clus1;
3961 TLorentzVector* tmpvec1 =
new TLorentzVector();
3962 tmpvec1->SetPxPyPzE(clusterVector1.Px(),clusterVector1.Py(),clusterVector1.Pz(),clusterVector1.E());
3965 if(!PhotonCandidate1)
return;
3968 AliVCluster* clus2 = NULL;
3970 if(arrClustersMesonCand)
3971 clus2 =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate1->
GetCaloClusterRef()));
3974 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
3975 if(arrClustersMesonCand)
3976 clus2 =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMesonCand->At(TrueGammaCandidate1->
GetCaloClusterRef()));
3982 TLorentzVector clusterVector2;
3983 clus2->GetMomentum(clusterVector2,vertex);
3984 if(arrClustersMesonCand)
delete clus2;
3985 TLorentzVector* tmpvec2 =
new TLorentzVector();
3986 tmpvec2->SetPxPyPzE(clusterVector2.Px(),clusterVector2.Py(),clusterVector2.Pz(),clusterVector2.E());
3989 if(!PhotonCandidate2)
return;
3996 delete PhotonCandidate1;
3997 delete PhotonCandidate2;
4004 if (convertedPhotonLabel0 > -1 && convertedPhotonLabel1 > -1){
4005 if (convertedPhotonLabel0==convertedPhotonLabel1){
4006 isSameConvertedGamma = kTRUE;
4014 if(isTruePi0 || isTrueEta){