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" 47 #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" 67 fV0ReaderName("V0ReaderV1"),
72 fBGClusHandlerRP(NULL),
81 fInvMassShowerShape(NULL),
84 fClusterOutputList(NULL),
85 fOutputContainer(NULL),
87 fGammaCandidates(NULL),
88 fClusterCandidates(NULL),
92 fConversionCuts(NULL),
93 fClusterCutArray(NULL),
94 fCaloPhotonCuts(NULL),
97 fHistoConvGammaPt(NULL),
98 fTreeConvGammaPtDcazCat(NULL),
102 fCharPhotonMCInfo(0),
103 tESDGammaERM02(NULL),
110 tESDClusterNCells(0),
111 tESDClusterMaxECell(0),
113 tESDInvMassShowerShape(0),
114 tESDIMMesonInvMass(0),
119 tESDIMClusterLeadCellID(0),
120 tESDIMClusterClassification(0),
121 tESDIMClusMatchedTrackPt(0),
122 tESDIMClusTrackDeltaEta(0),
123 tESDIMClusTrackDeltaPhi(0),
124 tESDIMClusterIsoSumClusterEt(0),
125 tESDIMClusterIsoSumTrackEt(0),
126 tESDmapIsClusterAcceptedWithoutTrackMatch(),
127 fHistoMotherInvMassPt(NULL),
128 fHistoMotherMatchedInvMassPt(NULL),
129 fSparseMotherInvMassPtZM(NULL),
130 fHistoMotherBackInvMassPt(NULL),
131 fSparseMotherBackInvMassPtZM(NULL),
132 fHistoMotherInvMassPtAlpha(NULL),
133 fHistoMotherPi0PtY(NULL),
134 fHistoMotherEtaPtY(NULL),
135 fHistoMotherPi0PtAlpha(NULL),
136 fHistoMotherEtaPtAlpha(NULL),
137 fHistoMotherPi0PtOpenAngle(NULL),
138 fHistoMotherEtaPtOpenAngle(NULL),
139 fHistoMotherPi0ConvPhotonEtaPhi(NULL),
140 fHistoMotherEtaConvPhotonEtaPhi(NULL),
141 fHistoMotherInvMassECalib(NULL),
142 fHistoMotherBackInvMassECalib(NULL),
143 fHistoPhotonPairPtconv(NULL),
144 fHistoPhotonPairMixedEventPtconv(NULL),
145 fHistoClusGammaPt(NULL),
146 fHistoClusGammaE(NULL),
147 fHistoClusOverlapHeadersGammaPt(NULL),
148 fHistoClusAllHeadersGammaPt(NULL),
149 fHistoClusRejectedHeadersGammaPt(NULL),
150 fHistoMCHeaders(NULL),
151 fHistoMCAllGammaPt(NULL),
152 fHistoMCAllGammaEMCALAccPt(NULL),
153 fHistoMCAllSecondaryGammaPt(NULL),
154 fHistoMCDecayGammaPi0Pt(NULL),
155 fHistoMCDecayGammaRhoPt(NULL),
156 fHistoMCDecayGammaEtaPt(NULL),
157 fHistoMCDecayGammaOmegaPt(NULL),
158 fHistoMCDecayGammaEtapPt(NULL),
159 fHistoMCDecayGammaPhiPt(NULL),
160 fHistoMCDecayGammaSigmaPt(NULL),
161 fHistoMCConvGammaPt(NULL),
162 fHistoMCSecondaryConvGammaPt(NULL),
164 fHistoMCPi0WOWeightPt(NULL),
165 fHistoMCPi0WOEvtWeightPt(NULL),
167 fHistoMCEtaWOWeightPt(NULL),
168 fHistoMCEtaWOEvtWeightPt(NULL),
169 fHistoMCPi0InAccPt(NULL),
170 fHistoMCPi0WOWeightInAccPt(NULL),
171 fHistoMCPi0WOEvtWeightInAccPt(NULL),
172 fHistoMCEtaInAccPt(NULL),
173 fHistoMCEtaWOWeightInAccPt(NULL),
174 fHistoMCEtaWOEvtWeightInAccPt(NULL),
175 fHistoMCPi0PtY(NULL),
176 fHistoMCEtaPtY(NULL),
177 fHistoMCPi0PtAlpha(NULL),
178 fHistoMCEtaPtAlpha(NULL),
179 fHistoMCPrimaryPtvsSource(NULL),
180 fHistoMCSecPi0PtvsSource(NULL),
181 fHistoMCSecPi0Source(NULL),
182 fHistoMCSecPi0InAccPtvsSource(NULL),
183 fHistoMCSecEtaPt(NULL),
184 fHistoMCSecEtaSource(NULL),
185 fHistoMCPi0PtJetPt(NULL),
186 fHistoMCEtaPtJetPt(NULL),
187 fHistoMCPi0PtGammaLeg(NULL),
188 fHistoMCPi0WOWeightPtGammaLeg(NULL),
189 fHistoMCPi0InAccPtGammaLeg(NULL),
190 fHistoMCPi0WOWeightInAccPtGammaLeg(NULL),
191 fHistoMCSecPi0PtGamma1vsSource(NULL),
192 fHistoMCSecPi0InAccPtGamma1vsSource(NULL),
193 fHistoMCSecPi0PtGamma2vsSource(NULL),
194 fHistoMCSecPi0InAccPtGamma2vsSource(NULL),
195 fHistoTruePi0InvMassPt(NULL),
196 fHistoTrueEtaInvMassPt(NULL),
197 fHistoTruePi0MatchedInvMassPt(NULL),
198 fHistoTrueEtaMatchedInvMassPt(NULL),
199 fHistoTruePi0CaloPhotonInvMassPt(NULL),
200 fHistoTrueEtaCaloPhotonInvMassPt(NULL),
201 fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
202 fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt(NULL),
203 fHistoTruePi0CaloConvPhotonConvRPt(NULL),
204 fHistoTruePi0CaloConvPhotonConvRAlpha(NULL),
205 fHistoTruePi0CaloConvPhotonPtAlpha(NULL),
206 fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
207 fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt(NULL),
208 fHistoTrueEtaCaloConvPhotonConvRPt(NULL),
209 fHistoTrueEtaCaloConvPhotonConvRAlpha(NULL),
210 fHistoTrueEtaCaloConvPhotonPtAlpha(NULL),
211 fHistoTruePi0CaloElectronInvMassPt(NULL),
212 fHistoTrueEtaCaloElectronInvMassPt(NULL),
213 fHistoTruePi0CaloMergedClusterInvMassPt(NULL),
214 fHistoTrueEtaCaloMergedClusterInvMassPt(NULL),
215 fHistoTrueMotherCaloEMNonLeadingInvMassPt(NULL),
216 fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL),
217 fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL),
218 fHistoTruePrimaryPi0InvMassPt(NULL),
219 fHistoTruePrimaryEtaInvMassPt(NULL),
220 fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL),
221 fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL),
222 fProfileTruePrimaryPi0WeightsInvMassPt(NULL),
223 fProfileTruePrimaryEtaWeightsInvMassPt(NULL),
224 fHistoTruePrimaryPi0MCPtResolPt(NULL),
225 fHistoTruePrimaryEtaMCPtResolPt(NULL),
226 fHistoTrueMotherPi0ConvPhotonEtaPhi(NULL),
227 fHistoTrueMotherEtaConvPhotonEtaPhi(NULL),
228 fHistoTrueSecondaryPi0InvMassPt(NULL),
229 fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
230 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
231 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
232 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
233 fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
234 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
235 fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL),
236 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
237 fHistoTrueBckGGInvMassPt(NULL),
238 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
239 fHistoTrueBckAsymEClustersInvMassPt(NULL),
240 fHistoTrueBckContInvMassPt(NULL),
241 fHistoTruePi0PtY(NULL),
242 fHistoTrueEtaPtY(NULL),
243 fHistoTruePi0PtAlpha(NULL),
244 fHistoTrueEtaPtAlpha(NULL),
245 fHistoTruePi0PtOpenAngle(NULL),
246 fHistoTrueEtaPtOpenAngle(NULL),
247 fHistoTrueConvGammaPt(NULL),
248 fHistoCombinatorialPt(NULL),
249 fHistoTruePrimaryConvGammaPt(NULL),
250 fHistoTruePrimaryConvGammaESDPtMCPt(NULL),
251 fHistoTrueSecondaryConvGammaPt(NULL),
252 fHistoTrueSecondaryConvGammaMCPt(NULL),
253 fHistoTrueSecondaryConvGammaFromXFromK0sMCPtESDPt(NULL),
254 fHistoTrueSecondaryConvGammaFromXFromK0lMCPtESDPt(NULL),
255 fHistoTrueSecondaryConvGammaFromXFromLambdaMCPtESDPt(NULL),
256 fHistoTrueClusGammaPt(NULL),
257 fHistoTrueClusElectronPt(NULL),
258 fHistoTrueClusConvGammaPt(NULL),
259 fHistoTrueClusConvGammaFullyPt(NULL),
260 fHistoTrueClusMergedGammaPt(NULL),
261 fHistoTrueClusMergedPartConvGammaPt(NULL),
262 fHistoTrueClusDalitzPt(NULL),
263 fHistoTrueClusDalitzMergedPt(NULL),
264 fHistoTrueClusPhotonFromElecMotherPt(NULL),
265 fHistoTrueClusShowerPt(NULL),
266 fHistoTrueClusSubLeadingPt(NULL),
267 fHistoTrueClusNMothers(NULL),
268 fHistoTrueClusEMNonLeadingPt(NULL),
269 fHistoTrueNLabelsInClusPt(NULL),
270 fHistoTruePrimaryClusGammaPt(NULL),
271 fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
272 fHistoTruePrimaryClusConvGammaPt(NULL),
273 fHistoTruePrimaryClusConvGammaESDPtMCPt(NULL),
274 fHistoTrueSecondaryClusGammaPt(NULL),
275 fHistoTrueSecondaryClusGammaFromK0sPt(NULL),
276 fHistoTrueSecondaryClusGammaFromK0lPt(NULL),
277 fHistoTrueSecondaryClusGammaFromLambdaPt(NULL),
278 fHistoTruePrimaryPi0PhotonPairPtconv(NULL),
279 fHistoTruePrimaryPi0W0WeightsPhotonPairPtconv(NULL),
280 fHistoTruePrimaryPi0DCPtconv(NULL),
281 fHistoTruePrimaryPi0MissingPtconv(NULL),
282 fHistoTrueSecondaryPi0PhotonPairPtconv(NULL),
283 fHistoTrueSecondaryPi0FromK0sPhotonPairPtconv(NULL),
284 fHistoTrueSecondaryPi0FromK0lPhotonPairPtconv(NULL),
285 fHistoTrueSecondaryPi0FromLambdaPhotonPairPtconv(NULL),
286 fHistoTrueSecondaryPi0DCPtconvSource(NULL),
287 fHistoTrueSecondaryPi0MissingPtconvSource(NULL),
288 fVectorRecTruePi0s(0),
289 fVectorRecTrueEtas(0),
290 fHistoDoubleCountTruePi0InvMassPt(NULL),
291 fHistoDoubleCountTrueEtaInvMassPt(NULL),
292 fHistoDoubleCountTrueConvGammaRPt(NULL),
293 fHistoDoubleCountTrueClusterGammaPt(NULL),
294 fVectorDoubleCountTruePi0s(0),
295 fVectorDoubleCountTrueEtas(0),
296 fVectorDoubleCountTrueConvGammas(0),
297 fVectorDoubleCountTrueClusterGammas(0),
298 fHistoMultipleCountTruePi0(NULL),
299 fHistoMultipleCountTrueEta(NULL),
300 fHistoMultipleCountTrueConvGamma(NULL),
301 fHistoMultipleCountTrueClusterGamma(NULL),
302 fMapMultipleCountTruePi0s(),
303 fMapMultipleCountTrueEtas(),
304 fMapMultipleCountTrueConvGammas(),
305 fMapMultipleCountTrueClusterGammas(),
306 fHistoTrueClusGammaEM02(NULL),
307 fHistoTrueClusPi0EM02(NULL),
308 fHistoTruePi0InvMassECalib(NULL),
309 fHistoTruePi0PureGammaInvMassECalib(NULL),
311 fHistoNEventsWOWeight(NULL),
312 fHistoNGoodESDTracks(NULL),
316 fHistoNGammaCandidates(NULL),
317 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
318 fHistoSPDClusterTrackletBackground(NULL),
319 fHistoNV0Tracks(NULL),
320 fProfileEtaShift(NULL),
321 fProfileJetJetXSection(NULL),
322 fHistoJetJetNTrials(NULL),
325 fEventPlaneAngle(-100),
327 fNGammaCandidates(0),
338 fMoveParticleAccordingToVertex(kTRUE),
340 fDoLightOutput(kFALSE),
341 fDoMesonAnalysis(kTRUE),
345 fIsFromDesiredHeader(kTRUE),
346 fIsOverlappingWithOtherHeader(kFALSE),
349 fSetPlotHistsExtQA(kFALSE),
351 fDoConvGammaShowerShapeTree(kFALSE),
352 fEnableSortForClusMC(kFALSE),
353 fDoPrimaryTrackMatching(kFALSE),
354 fDoInvMassShowerShapeTree(kFALSE),
356 fFileNameBroken(NULL),
357 fAllowOverlapHeaders(kTRUE)
366 fV0ReaderName(
"V0ReaderV1"),
367 fCorrTaskSetting(
""),
370 fBGClusHandler(NULL),
371 fBGClusHandlerRP(NULL),
378 fPhotonDCAList(NULL),
380 fInvMassShowerShape(NULL),
383 fClusterOutputList(NULL),
386 fGammaCandidates(NULL),
387 fClusterCandidates(NULL),
388 fEventCutArray(NULL),
391 fConversionCuts(NULL),
392 fClusterCutArray(NULL),
393 fCaloPhotonCuts(NULL),
394 fMesonCutArray(NULL),
396 fHistoConvGammaPt(NULL),
397 fTreeConvGammaPtDcazCat(NULL),
401 fCharPhotonMCInfo(0),
402 tESDGammaERM02(NULL),
409 tESDClusterNCells(0),
410 tESDClusterMaxECell(0),
412 tESDInvMassShowerShape(0),
413 tESDIMMesonInvMass(0),
418 tESDIMClusterLeadCellID(0),
419 tESDIMClusterClassification(0),
420 tESDIMClusMatchedTrackPt(0),
421 tESDIMClusTrackDeltaEta(0),
422 tESDIMClusTrackDeltaPhi(0),
423 tESDIMClusterIsoSumClusterEt(0),
424 tESDIMClusterIsoSumTrackEt(0),
425 tESDmapIsClusterAcceptedWithoutTrackMatch(),
426 fHistoMotherInvMassPt(NULL),
427 fHistoMotherMatchedInvMassPt(NULL),
428 fSparseMotherInvMassPtZM(NULL),
429 fHistoMotherBackInvMassPt(NULL),
430 fSparseMotherBackInvMassPtZM(NULL),
431 fHistoMotherInvMassPtAlpha(NULL),
432 fHistoMotherPi0PtY(NULL),
433 fHistoMotherEtaPtY(NULL),
434 fHistoMotherPi0PtAlpha(NULL),
435 fHistoMotherEtaPtAlpha(NULL),
436 fHistoMotherPi0PtOpenAngle(NULL),
437 fHistoMotherEtaPtOpenAngle(NULL),
438 fHistoMotherPi0ConvPhotonEtaPhi(NULL),
439 fHistoMotherEtaConvPhotonEtaPhi(NULL),
440 fHistoMotherInvMassECalib(NULL),
441 fHistoMotherBackInvMassECalib(NULL),
442 fHistoPhotonPairPtconv(NULL),
443 fHistoPhotonPairMixedEventPtconv(NULL),
444 fHistoClusGammaPt(NULL),
445 fHistoClusGammaE(NULL),
446 fHistoClusOverlapHeadersGammaPt(NULL),
447 fHistoClusAllHeadersGammaPt(NULL),
448 fHistoClusRejectedHeadersGammaPt(NULL),
449 fHistoMCHeaders(NULL),
450 fHistoMCAllGammaPt(NULL),
451 fHistoMCAllGammaEMCALAccPt(NULL),
452 fHistoMCAllSecondaryGammaPt(NULL),
453 fHistoMCDecayGammaPi0Pt(NULL),
454 fHistoMCDecayGammaRhoPt(NULL),
455 fHistoMCDecayGammaEtaPt(NULL),
456 fHistoMCDecayGammaOmegaPt(NULL),
457 fHistoMCDecayGammaEtapPt(NULL),
458 fHistoMCDecayGammaPhiPt(NULL),
459 fHistoMCDecayGammaSigmaPt(NULL),
460 fHistoMCConvGammaPt(NULL),
461 fHistoMCSecondaryConvGammaPt(NULL),
463 fHistoMCPi0WOWeightPt(NULL),
464 fHistoMCPi0WOEvtWeightPt(NULL),
466 fHistoMCEtaWOWeightPt(NULL),
467 fHistoMCEtaWOEvtWeightPt(NULL),
468 fHistoMCPi0InAccPt(NULL),
469 fHistoMCPi0WOWeightInAccPt(NULL),
470 fHistoMCPi0WOEvtWeightInAccPt(NULL),
471 fHistoMCEtaInAccPt(NULL),
472 fHistoMCEtaWOWeightInAccPt(NULL),
473 fHistoMCEtaWOEvtWeightInAccPt(NULL),
474 fHistoMCPi0PtY(NULL),
475 fHistoMCEtaPtY(NULL),
476 fHistoMCPi0PtAlpha(NULL),
477 fHistoMCEtaPtAlpha(NULL),
478 fHistoMCPrimaryPtvsSource(NULL),
479 fHistoMCSecPi0PtvsSource(NULL),
480 fHistoMCSecPi0Source(NULL),
481 fHistoMCSecPi0InAccPtvsSource(NULL),
482 fHistoMCSecEtaPt(NULL),
483 fHistoMCSecEtaSource(NULL),
484 fHistoMCPi0PtJetPt(NULL),
485 fHistoMCEtaPtJetPt(NULL),
486 fHistoMCPi0PtGammaLeg(NULL),
487 fHistoMCPi0WOWeightPtGammaLeg(NULL),
488 fHistoMCPi0InAccPtGammaLeg(NULL),
489 fHistoMCPi0WOWeightInAccPtGammaLeg(NULL),
490 fHistoMCSecPi0PtGamma1vsSource(NULL),
491 fHistoMCSecPi0InAccPtGamma1vsSource(NULL),
492 fHistoMCSecPi0PtGamma2vsSource(NULL),
493 fHistoMCSecPi0InAccPtGamma2vsSource(NULL),
494 fHistoTruePi0InvMassPt(NULL),
495 fHistoTrueEtaInvMassPt(NULL),
496 fHistoTruePi0MatchedInvMassPt(NULL),
497 fHistoTrueEtaMatchedInvMassPt(NULL),
498 fHistoTruePi0CaloPhotonInvMassPt(NULL),
499 fHistoTrueEtaCaloPhotonInvMassPt(NULL),
500 fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
501 fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt(NULL),
502 fHistoTruePi0CaloConvPhotonConvRPt(NULL),
503 fHistoTruePi0CaloConvPhotonConvRAlpha(NULL),
504 fHistoTruePi0CaloConvPhotonPtAlpha(NULL),
505 fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
506 fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt(NULL),
507 fHistoTrueEtaCaloConvPhotonConvRPt(NULL),
508 fHistoTrueEtaCaloConvPhotonConvRAlpha(NULL),
509 fHistoTrueEtaCaloConvPhotonPtAlpha(NULL),
510 fHistoTruePi0CaloElectronInvMassPt(NULL),
511 fHistoTrueEtaCaloElectronInvMassPt(NULL),
512 fHistoTruePi0CaloMergedClusterInvMassPt(NULL),
513 fHistoTrueEtaCaloMergedClusterInvMassPt(NULL),
514 fHistoTrueMotherCaloEMNonLeadingInvMassPt(NULL),
515 fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL),
516 fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL),
517 fHistoTruePrimaryPi0InvMassPt(NULL),
518 fHistoTruePrimaryEtaInvMassPt(NULL),
519 fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL),
520 fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL),
521 fProfileTruePrimaryPi0WeightsInvMassPt(NULL),
522 fProfileTruePrimaryEtaWeightsInvMassPt(NULL),
523 fHistoTruePrimaryPi0MCPtResolPt(NULL),
524 fHistoTruePrimaryEtaMCPtResolPt(NULL),
525 fHistoTrueMotherPi0ConvPhotonEtaPhi(NULL),
526 fHistoTrueMotherEtaConvPhotonEtaPhi(NULL),
527 fHistoTrueSecondaryPi0InvMassPt(NULL),
528 fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
529 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
530 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
531 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
532 fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
533 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
534 fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL),
535 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
536 fHistoTrueBckGGInvMassPt(NULL),
537 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
538 fHistoTrueBckAsymEClustersInvMassPt(NULL),
539 fHistoTrueBckContInvMassPt(NULL),
540 fHistoTruePi0PtY(NULL),
541 fHistoTrueEtaPtY(NULL),
542 fHistoTruePi0PtAlpha(NULL),
543 fHistoTrueEtaPtAlpha(NULL),
544 fHistoTruePi0PtOpenAngle(NULL),
545 fHistoTrueEtaPtOpenAngle(NULL),
546 fHistoTrueConvGammaPt(NULL),
547 fHistoCombinatorialPt(NULL),
548 fHistoTruePrimaryConvGammaPt(NULL),
549 fHistoTruePrimaryConvGammaESDPtMCPt(NULL),
550 fHistoTrueSecondaryConvGammaPt(NULL),
551 fHistoTrueSecondaryConvGammaMCPt(NULL),
552 fHistoTrueSecondaryConvGammaFromXFromK0sMCPtESDPt(NULL),
553 fHistoTrueSecondaryConvGammaFromXFromK0lMCPtESDPt(NULL),
554 fHistoTrueSecondaryConvGammaFromXFromLambdaMCPtESDPt(NULL),
555 fHistoTrueClusGammaPt(NULL),
556 fHistoTrueClusElectronPt(NULL),
557 fHistoTrueClusConvGammaPt(NULL),
558 fHistoTrueClusConvGammaFullyPt(NULL),
559 fHistoTrueClusMergedGammaPt(NULL),
560 fHistoTrueClusMergedPartConvGammaPt(NULL),
561 fHistoTrueClusDalitzPt(NULL),
562 fHistoTrueClusDalitzMergedPt(NULL),
563 fHistoTrueClusPhotonFromElecMotherPt(NULL),
564 fHistoTrueClusShowerPt(NULL),
565 fHistoTrueClusSubLeadingPt(NULL),
566 fHistoTrueClusNMothers(NULL),
567 fHistoTrueClusEMNonLeadingPt(NULL),
568 fHistoTrueNLabelsInClusPt(NULL),
569 fHistoTruePrimaryClusGammaPt(NULL),
570 fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
571 fHistoTruePrimaryClusConvGammaPt(NULL),
572 fHistoTruePrimaryClusConvGammaESDPtMCPt(NULL),
573 fHistoTrueSecondaryClusGammaPt(NULL),
574 fHistoTrueSecondaryClusGammaFromK0sPt(NULL),
575 fHistoTrueSecondaryClusGammaFromK0lPt(NULL),
576 fHistoTrueSecondaryClusGammaFromLambdaPt(NULL),
577 fHistoTruePrimaryPi0PhotonPairPtconv(NULL),
578 fHistoTruePrimaryPi0W0WeightsPhotonPairPtconv(NULL),
579 fHistoTruePrimaryPi0DCPtconv(NULL),
580 fHistoTruePrimaryPi0MissingPtconv(NULL),
581 fHistoTrueSecondaryPi0PhotonPairPtconv(NULL),
582 fHistoTrueSecondaryPi0FromK0sPhotonPairPtconv(NULL),
583 fHistoTrueSecondaryPi0FromK0lPhotonPairPtconv(NULL),
584 fHistoTrueSecondaryPi0FromLambdaPhotonPairPtconv(NULL),
585 fHistoTrueSecondaryPi0DCPtconvSource(NULL),
586 fHistoTrueSecondaryPi0MissingPtconvSource(NULL),
587 fVectorRecTruePi0s(0),
588 fVectorRecTrueEtas(0),
589 fHistoDoubleCountTruePi0InvMassPt(NULL),
590 fHistoDoubleCountTrueEtaInvMassPt(NULL),
591 fHistoDoubleCountTrueConvGammaRPt(NULL),
592 fHistoDoubleCountTrueClusterGammaPt(NULL),
593 fVectorDoubleCountTruePi0s(0),
594 fVectorDoubleCountTrueEtas(0),
595 fVectorDoubleCountTrueConvGammas(0),
596 fVectorDoubleCountTrueClusterGammas(0),
597 fHistoMultipleCountTruePi0(NULL),
598 fHistoMultipleCountTrueEta(NULL),
599 fHistoMultipleCountTrueConvGamma(NULL),
600 fHistoMultipleCountTrueClusterGamma(NULL),
601 fMapMultipleCountTruePi0s(),
602 fMapMultipleCountTrueEtas(),
603 fMapMultipleCountTrueConvGammas(),
604 fMapMultipleCountTrueClusterGammas(),
605 fHistoTrueClusGammaEM02(NULL),
606 fHistoTrueClusPi0EM02(NULL),
607 fHistoTruePi0InvMassECalib(NULL),
608 fHistoTruePi0PureGammaInvMassECalib(NULL),
610 fHistoNEventsWOWeight(NULL),
611 fHistoNGoodESDTracks(NULL),
615 fHistoNGammaCandidates(NULL),
616 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
617 fHistoSPDClusterTrackletBackground(NULL),
618 fHistoNV0Tracks(NULL),
619 fProfileEtaShift(NULL),
620 fProfileJetJetXSection(NULL),
621 fHistoJetJetNTrials(NULL),
624 fEventPlaneAngle(-100),
626 fNGammaCandidates(0),
637 fMoveParticleAccordingToVertex(kTRUE),
639 fDoLightOutput(kFALSE),
640 fDoMesonAnalysis(kTRUE),
644 fIsFromDesiredHeader(kTRUE),
645 fIsOverlappingWithOtherHeader(kFALSE),
648 fSetPlotHistsExtQA(kFALSE),
650 fDoConvGammaShowerShapeTree(kFALSE),
651 fEnableSortForClusMC(kFALSE),
652 fDoPrimaryTrackMatching(kFALSE),
653 fDoInvMassShowerShapeTree(kFALSE),
655 fFileNameBroken(NULL),
656 fAllowOverlapHeaders(kTRUE)
659 DefineOutput(1, TList::Class());
692 const Int_t nDim = 4;
693 Int_t nBins[nDim] = {800,300,7,4};
719 if(collisionSystem == 1 || collisionSystem == 2 ||
720 collisionSystem == 5 || collisionSystem == 8 ||
721 collisionSystem == 9){
722 centMin = centMin*10;
723 centMax = centMax*10;
724 if(centMax ==0 && centMax!=centMin) centMax=100;
725 }
else if(collisionSystem == 3 || collisionSystem == 6){
728 }
else if(collisionSystem == 4 || collisionSystem == 7){
729 centMin = ((centMin*5)+45);
730 centMax = ((centMax*5)+45);
735 fBackList[iCut]->SetName(Form(
"%s_%s_%s_%s Back histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(), cutstringMeson.Data()));
743 fMotherList[iCut]->SetName(Form(
"%s_%s_%s_%s Mother histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
747 fSparseMotherInvMassPtZM[iCut] =
new THnSparseF(
"Back_Mother_InvMass_Pt_z_m",
"Back_Mother_InvMass_Pt_z_m",nDim,nBins,xMin,xMax);
753 collisionSystem,centMin,centMax,
758 collisionSystem,centMin,centMax,
781 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
787 }
else if (
fIsMC == 3){
886 Int_t nBinsQAPt = 170;
888 Int_t nBinsClusterPt = 500;
898 for(
Int_t i=0; i<nBinsQAPt+1;i++){
899 if(i<60) arrQAPtBinning[i] = 0.05*i;
900 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
901 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
902 else if(i<190) arrQAPtBinning[i] = 20.+1.0*(i-170);
903 else arrQAPtBinning[i] = maxQAPt;
908 for(
Int_t i=0; i<nBinsPt+1;i++){
909 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
911 nBinsClusterPt = 800;
914 for(
Int_t i=0; i<nBinsPt+1;i++){
915 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
925 for(
Int_t i=0; i<nBinsPt+1;i++){
926 if (i < 1) arrPtBinning[i] = 0.3*i;
927 else if(i<55) arrPtBinning[i] = 0.3+0.05*(i-1);
928 else if(i<125) arrPtBinning[i] = 3.+0.1*(i-55);
929 else if(i<165) arrPtBinning[i] = 10.+0.25*(i-125);
930 else if(i<205) arrPtBinning[i] = 20.+1.0*(i-165);
931 else arrPtBinning[i] = maxPt;
935 for(
Int_t i=0; i<nBinsQAPt+1;i++){
936 if(i<60) arrQAPtBinning[i] = 0.05*i;
937 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
938 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
939 else if(i<210) arrQAPtBinning[i] = 20.+1.0*(i-170);
940 else arrQAPtBinning[i] = maxQAPt;
942 nBinsClusterPt = 301;
945 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
946 if (i < 1) arrClusPtBinning[i] = 0.3*i;
947 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
948 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
949 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
950 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
951 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
952 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
953 else arrClusPtBinning[i] = maxClusterPt;
963 for(
Int_t i=0; i<nBinsPt+1;i++){
964 if (i < 1) arrPtBinning[i] = 0.3*i;
965 else if(i<55) arrPtBinning[i] = 0.3+0.05*(i-1);
966 else if(i<125) arrPtBinning[i] = 3.+0.1*(i-55);
967 else if(i<185) arrPtBinning[i] = 10.+0.25*(i-125);
968 else if(i<235) arrPtBinning[i] = 25.+0.5*(i-185);
969 else if(i<285) arrPtBinning[i] = 50.+1.0*(i-235);
970 else arrPtBinning[i] = maxPt;
974 for(
Int_t i=0; i<nBinsQAPt+1;i++){
975 if(i<60) arrQAPtBinning[i] = 0.05*i;
976 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
977 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
978 else if(i<210) arrQAPtBinning[i] = 20.+0.5*(i-170);
979 else if(i<270) arrQAPtBinning[i] = 40.+1.0*(i-210);
980 else arrQAPtBinning[i] = maxQAPt;
982 nBinsClusterPt = 301;
985 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
986 if (i < 1) arrClusPtBinning[i] = 0.3*i;
987 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
988 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
989 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
990 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
991 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
992 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
993 else arrClusPtBinning[i] = maxClusterPt;
999 for(
Int_t i=0; i<nBinsPt+1;i++){
1000 if (i < 1) arrPtBinning[i] = 0.3*i;
1001 else if(i<58) arrPtBinning[i] = 0.3+0.1*(i-1);
1002 else if(i<82) arrPtBinning[i] = 6.+0.25*(i-58);
1003 else if(i<90) arrPtBinning[i] = 12.+1.0*(i-82);
1004 else arrPtBinning[i] = maxPt;
1008 for(
Int_t i=0; i<nBinsQAPt+1;i++){
1009 if(i<60) arrQAPtBinning[i] = 0.1*i;
1010 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
1011 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
1012 else arrQAPtBinning[i] = maxQAPt;
1014 nBinsClusterPt = 148;
1017 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
1018 if (i < 1) arrClusPtBinning[i] = 0.3*i;
1019 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
1020 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
1021 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
1022 else arrClusPtBinning[i] = maxClusterPt;
1028 for(
Int_t i=0; i<nBinsPt+1;i++){
1029 if (i < 1) arrPtBinning[i] = 0.3*i;
1030 else if(i<58) arrPtBinning[i] = 0.3+0.1*(i-1);
1031 else if(i<82) arrPtBinning[i] = 6.+0.25*(i-58);
1032 else if(i<90) arrPtBinning[i] = 12.+1.0*(i-82);
1033 else arrPtBinning[i] = maxPt;
1037 for(
Int_t i=0; i<nBinsQAPt+1;i++){
1038 if(i<60) arrQAPtBinning[i] = 0.1*i;
1039 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
1040 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
1041 else arrQAPtBinning[i] = maxQAPt;
1043 nBinsClusterPt = 148;
1046 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
1047 if (i < 1) arrClusPtBinning[i] = 0.3*i;
1048 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
1049 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
1050 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
1051 else arrClusPtBinning[i] = maxClusterPt;
1055 for(
Int_t i=0; i<nBinsPt+1;i++){
1056 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
1058 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
1059 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
1061 for(
Int_t i=0; i<nBinsQAPt+1;i++){
1062 if(i<60) arrQAPtBinning[i] = 0.05*i;
1063 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
1064 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
1065 else arrQAPtBinning[i] = maxQAPt;
1073 TString cutstringMeson =
"NoMesonCut";
1078 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s_%s_%s",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1082 fESDList[iCut]->SetName(Form(
"%s_%s_%s_%s ESD histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1086 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents", 14, -0.5, 13.5);
1088 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
1089 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
1091 TString TriggerNames =
"Not Trigger: ";
1093 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
1098 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
1102 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problem");
1103 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
1104 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
1105 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
1106 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
1115 TString TriggerNames =
"Not Trigger: ";
1151 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ", 200, -10, 10);
1154 fHistoVertexX[iCut] =
new TH1F(
"VertexX",
"VertexX", 100, -5, 5);
1156 fHistoVertexY[iCut] =
new TH1F(
"VertexY",
"VertexY", 100, -5, 5);
1184 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 30000, 0, 30000);
1186 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 2500, 0, 2500);
1188 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 1500, 0, 1500);
1192 fHistoConvGammaPt[iCut] =
new TH1F(
"ESD_ConvGamma_Pt",
"ESD_ConvGamma_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1198 fProfileEtaShift[iCut] =
new TProfile(
"Eta Shift",
"Eta Shift", 1, -0.5, 0.5);
1219 fPhotonDCAList[iCut]->SetName(Form(
"%s_%s_%s_%s Photon DCA tree",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1234 fClusterOutputList[iCut]->SetName(Form(
"%s_%s_%s_%s Cluster Output",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1238 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1241 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E", nBinsClusterPt, arrClusPtBinning);
1247 fHistoClusAllHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaAllHeaders_Pt",
"ClusGammaAllHeaders_Pt", nBinsClusterPt, arrClusPtBinning);
1256 fGammaERM02[iCut]->SetName(Form(
"%s_%s_%s_%s ConvGamma-Cluster Matched",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1260 tESDGammaERM02[iCut] =
new TTree(
"ESD_ConvGamma_E_ConvR_M02_M20",
"ESD_ConvGamma_E_ConvR_M02_M20");
1275 fInvMassShowerShape[iCut]->SetName(Form(
"%s_%s_%s_%s InvMass_ShowerShape",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1278 tESDInvMassShowerShape[iCut] =
new TTree(
"ESD_Meson_InvMass_Pt_ClusE_ClusM02_ClusM20",
"ESD_Meson_InvMass_Pt_ClusE_ClusM02_ClusM20");
1303 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
1321 fHistoMotherInvMassPtAlpha[iCut] =
new TH2F(
"ESD_Mother_InvMass_vs_Pt_Alpha",
"ESD_Mother_InvMass_vs_Pt_Alpha", 800, 0, 0.8, nBinsPt, arrPtBinning);
1366 fHistoMotherPi0PtY[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Y",
"ESD_MotherPi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1370 fHistoMotherEtaPtY[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Y",
"ESD_MotherEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1374 fHistoMotherPi0PtAlpha[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Alpha",
"ESD_MotherPi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 200, -1, 1);
1378 fHistoMotherEtaPtAlpha[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Alpha",
"ESD_MotherEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 200, -1, 1);
1386 fHistoMotherEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_MotherEta_Pt_OpenAngle",
"ESD_MotherEta_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 200, 0, TMath::Pi());
1613 TString cutstringMeson =
"NoMesonCut";
1618 fMCList[iCut]->SetName(Form(
"%s_%s_%s_%s MC histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1619 fMCList[iCut]->SetOwner(kTRUE);
1624 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1635 fHistoMCDecayGammaPi0Pt[iCut] =
new TH1F(
"MC_DecayGammaPi0_Pt",
"MC_DecayGammaPi0_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1637 fHistoMCDecayGammaRhoPt[iCut] =
new TH1F(
"MC_DecayGammaRho_Pt",
"MC_DecayGammaRho_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1639 fHistoMCDecayGammaEtaPt[iCut] =
new TH1F(
"MC_DecayGammaEta_Pt",
"MC_DecayGammaEta_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1645 fHistoMCDecayGammaPhiPt[iCut] =
new TH1F(
"MC_DecayGammaPhi_Pt",
"MC_DecayGammaPhi_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1649 fHistoMCConvGammaPt[iCut] =
new TH1F(
"MC_ConvGamma_Pt",
"MC_ConvGamma_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1675 fHistoMCPi0Pt[iCut] =
new TH1F(
"MC_Pi0_Pt",
"MC_Pi0_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1678 fHistoMCPi0WOWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOWeights_Pt",
"MC_Pi0_WOWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1681 fHistoMCEtaPt[iCut] =
new TH1F(
"MC_Eta_Pt",
"MC_Eta_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1684 fHistoMCEtaWOWeightPt[iCut] =
new TH1F(
"MC_Eta_WOWeights_Pt",
"MC_Eta_WOWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1687 fHistoMCPi0InAccPt[iCut] =
new TH1F(
"MC_Pi0InAcc_Pt",
"MC_Pi0InAcc_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1692 fHistoMCEtaInAccPt[iCut] =
new TH1F(
"MC_EtaInAcc_Pt",
"MC_EtaInAcc_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1703 fHistoMCPi0WOEvtWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOEventWeights_Pt",
"MC_Pi0_WOEventWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1705 fHistoMCEtaWOEvtWeightPt[iCut] =
new TH1F(
"MC_Eta_WOEventWeights_Pt",
"MC_Eta_WOEventWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1713 fHistoMCPi0PtJetPt[iCut] =
new TH2F(
"MC_Pi0_Pt_JetPt",
"MC_Pi0_Pt_JetPt", nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1716 fHistoMCEtaPtJetPt[iCut] =
new TH2F(
"MC_Eta_Pt_JetPt",
"MC_Eta_Pt_JetPt", nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1739 fHistoMCSecEtaPt[iCut] =
new TH1F(
"MC_SecEta_Pt",
"MC_SecEta_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1751 fHistoMCPi0PtGammaLeg[iCut] =
new TH2F(
"MC_Pi0_PtGamma_Leg",
"MC_Pi0_PtGamma_Leg", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt, 3, -0.5, 2.5);
1784 fHistoMCPi0PtY[iCut] =
new TH2F(
"MC_Pi0_Pt_Y",
"MC_Pi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1787 fHistoMCEtaPtY[iCut] =
new TH2F(
"MC_Eta_Pt_Y",
"MC_Eta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1790 fHistoMCPi0PtAlpha[iCut] =
new TH2F(
"MC_Pi0_Pt_Alpha",
"MC_Pi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 200, -1, 1);
1792 fHistoMCEtaPtAlpha[iCut] =
new TH2F(
"MC_Eta_Pt_Alpha",
"MC_Eta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 200, -1, 1);
1803 fTrueList[iCut]->SetName(Form(
"%s_%s_%s_%s True histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1808 fHistoTrueConvGammaPt[iCut] =
new TH1F(
"ESD_TrueConvGamma_Pt",
"ESD_TrueConvGamma_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1819 fHistoCombinatorialPt[iCut] =
new TH2F(
"ESD_TrueCombinatorial_Pt",
"ESD_TrueCombinatorial_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt, 16, -0.5, 15.5);
1861 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt, (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1867 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt, (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1872 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt, (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1877 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt, (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1883 fHistoTrueClusGammaPt[iCut] =
new TH1F(
"TrueClusGamma_Pt",
"ESD_TrueClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1887 fHistoTruePrimaryClusGammaPt[iCut] =
new TH1F(
"TruePrimaryClusGamma_Pt",
"ESD_TruePrimaryClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1894 fHistoTrueClusElectronPt[iCut] =
new TH1F(
"TrueClusElectron_Pt",
"TrueElectronGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1897 fHistoTrueClusConvGammaPt[iCut] =
new TH1F(
"TrueClusConvGamma_Pt",
"TrueClusConvGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1928 fHistoTrueNLabelsInClusPt[iCut] =
new TH2F(
"TrueNLabelsInClus_Pt",
"TrueNLabelsInClus_Pt", 100, -0.5, 99.5, nBinsClusterPt, arrClusPtBinning);
1933 fHistoTrueClusPi0EM02[iCut] =
new TH2F(
"TrueClusPi0EM02",
"TrueClusPi0EM02", nBinsClusterPt, arrClusPtBinning, 400, 0, 5);
1988 fHistoTrueClusConvGammaFullyPt[iCut] =
new TH1F(
"TrueClusConvGammaFullyContained_Pt",
"TrueClusConvGammaFullyContained_Pt", nBinsClusterPt, arrClusPtBinning);
1991 fHistoTrueClusMergedGammaPt[iCut] =
new TH1F(
"TrueClusMergedGamma_Pt",
"TrueClusMergedGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1997 fHistoTrueClusDalitzPt[iCut] =
new TH1F(
"TrueClusDalitz_Pt",
"TrueClusDalitz_Pt", nBinsClusterPt, arrClusPtBinning);
2006 fHistoTrueClusShowerPt[iCut] =
new TH1F(
"TrueClusShower_Pt",
"TrueClusShower_Pt", nBinsClusterPt, arrClusPtBinning);
2009 fHistoTrueClusSubLeadingPt[iCut] =
new TH1F(
"TrueClusSubleading_Pt",
"TrueClusSubleading_Pt", nBinsClusterPt, arrClusPtBinning);
2029 fHistoTruePi0InvMassPt[iCut] =
new TH2F(
"ESD_TruePi0_InvMass_Pt",
"ESD_TruePi0_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2033 fHistoTrueEtaInvMassPt[iCut] =
new TH2F(
"ESD_TrueEta_InvMass_Pt",
"ESD_TrueEta_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
2211 800, 0, 0.8, nBinsPt, arrPtBinning);
2217 800, 0, 0.8, nBinsPt, arrPtBinning);
2238 800, 0, 0.8, nBinsPt, arrPtBinning);
2244 800, 0, 0.8, nBinsPt, arrPtBinning);
2288 800, 0, 0.8, nBinsPt, arrPtBinning);
2293 800, 0, 0.8, nBinsPt, arrPtBinning);
2343 fHistoTruePi0PtY[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Y",
"ESD_TruePi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
2347 fHistoTrueEtaPtY[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Y",
"ESD_TrueEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
2351 fHistoTruePi0PtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Alpha",
"ESD_TruePi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 200, -1, 1);
2355 fHistoTrueEtaPtAlpha[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Alpha",
"ESD_TrueEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 200, -1, 1);
2360 fHistoTruePi0PtOpenAngle[iCut] =
new TH2F(
"ESD_TruePi0_Pt_OpenAngle",
"ESD_TruePi0_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
2364 fHistoTrueEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_TrueEta_Pt_OpenAngle",
"ESD_TrueEta_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 200, 0, TMath::Pi());
2425 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
2489 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
2510 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
2512 if(eventQuality == 2 || eventQuality == 3){
2539 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
2554 Bool_t isRunningEMCALrelAna = kFALSE;
2563 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
2584 Bool_t triggered = kTRUE;
2586 if(eventNotAccepted!= 0){
2590 if (eventNotAccepted==3 &&
fIsMC > 0){
2597 if(eventQuality != 0){
2604 if (triggered==kTRUE){
2627 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2636 if (nameBin.CompareTo(
"")== 0){
2638 ->GetAcceptedHeader())->At(i))->GetString();
2639 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
2652 if (triggered==kFALSE)
continue;
2743 TClonesArray * arrClustersProcess = NULL;
2748 if(!arrClustersProcess)
2749 AliFatal(Form(
"%sClustersBranch was not found in AliAnalysisTaskGammaConvCalo! Check the correction framework settings!",
fCorrTaskSetting.Data()));
2750 nclus = arrClustersProcess->GetEntries();
2755 if(nclus == 0)
return;
2765 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
2768 for(
Int_t i = 0; i < nclus; i++){
2769 AliVCluster* clus = NULL;
2771 if(arrClustersProcess)
2772 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2774 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2775 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2776 if(arrClustersProcess)
2777 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2779 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2782 if (!clus)
continue;
2790 TLorentzVector clusterVector;
2791 clus->GetMomentum(clusterVector,vertex);
2793 TLorentzVector* tmpvec =
new TLorentzVector();
2794 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
2798 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
2807 Int_t* mclabelsCluster = clus->GetLabels();
2810 if (clus->GetNLabels()>0){
2811 for (
Int_t k =0; k<(
Int_t)clus->GetNLabels(); k++){
2827 if (clus->GetNLabels()>1){
2828 Int_t* mclabelsCluster = clus->GetLabels();
2829 for (
Int_t l = 1; l < (
Int_t)clus->GetNLabels(); l++ ){
2854 delete PhotonCandidate;
2867 TParticle *Photon = NULL;
2868 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2882 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2883 Double_t mcProdVtxX = primVtxMC->GetX();
2884 Double_t mcProdVtxY = primVtxMC->GetY();
2885 Double_t mcProdVtxZ = primVtxMC->GetZ();
2913 Int_t secondaryClass = -1;
2919 if (secondaryClass > 0 ){
2923 if (secondaryClass == 2)
2926 else if (secondaryClass == 3)
2928 else if (secondaryClass == 5)
2960 if (TruePhotonCandidate->
IsDalitz())
2969 if (TruePhotonCandidate->
IsShower())
2979 Int_t motherLab = Photon->GetMother(0);
2980 if (motherLab > -1){
2987 if ( TMath::Abs(
fMCEvent->Particle(motherLab)->GetPdgCode()) == 111 &&
2995 Int_t grandMotherLab =
fMCEvent->Particle(motherLab)->GetMother(0);
2996 if (grandMotherLab > -1){
3013 AliAODMCParticle *Photon = NULL;
3014 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3015 if (AODMCTrackArray){
3016 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
3020 AliInfo(
"AODMCTrackArray could not be loaded");
3032 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3033 Double_t mcProdVtxX = primVtxMC->GetX();
3034 Double_t mcProdVtxY = primVtxMC->GetY();
3035 Double_t mcProdVtxZ = primVtxMC->GetZ();
3040 if (Photon->GetMother()> -1){
3041 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
3058 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
3062 Int_t secondaryClass = -1;
3068 if (secondaryClass > 0 ){
3072 if (secondaryClass == 2)
3075 else if (secondaryClass == 3)
3077 else if (secondaryClass == 5)
3100 if (TruePhotonCandidate->
IsDalitz())
3106 if (TruePhotonCandidate->
IsShower())
3113 Int_t motherLab = Photon->GetMother();
3114 if (motherLab > -1){
3125 Int_t grandMotherLab = ((AliAODMCParticle*) AODMCTrackArray->At(motherLab))->GetMother();
3126 if (grandMotherLab > -1){
3148 if(!PhotonCandidate)
continue;
3174 if (
fIsHeavyIon == 1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 30.){
3183 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 30.){
3197 GammaCandidatesStepOne->Add(PhotonCandidate);
3200 GammaCandidatesStepTwo->Add(PhotonCandidate);
3204 for(
Int_t i = 0;i<GammaCandidatesStepOne->GetEntries();i++){
3206 if(!PhotonCandidate)
continue;
3226 if (
fIsHeavyIon ==1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 30.){
3235 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 30.){
3246 }
else GammaCandidatesStepTwo->Add(PhotonCandidate);
3250 for(
Int_t i = 0;i<GammaCandidatesStepTwo->GetEntries();i++){
3252 if(!PhotonCandidate)
continue;
3271 if (
fIsHeavyIon == 1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 65.){
3280 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 65.){
3294 delete GammaCandidatesStepOne;
3295 GammaCandidatesStepOne = 0x0;
3296 delete GammaCandidatesStepTwo;
3297 GammaCandidatesStepTwo = 0x0;
3304 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3305 Double_t mcProdVtxX = primVtxMC->GetX();
3306 Double_t mcProdVtxY = primVtxMC->GetY();
3307 Double_t mcProdVtxZ = primVtxMC->GetZ();
3310 if( magField < 0.0 ){
3317 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3318 if (AODMCTrackArray == NULL)
return;
3319 AliAODMCParticle *posDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelPositive());
3320 AliAODMCParticle *negDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelNegative());
3323 if(posDaughter == NULL || negDaughter == NULL)
return;
3324 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
3326 if(posDaughter->GetMother() != negDaughter->GetMother()){
3331 else if(posDaughter->GetMother() == -1){
3337 if(pdgCode[0]!=11 || pdgCode[1]!=11){
3342 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode()){
3347 AliAODMCParticle *Photon = (AliAODMCParticle*) AODMCTrackArray->At(posDaughter->GetMother());
3348 if(Photon->GetPdgCode() != 22){
3353 if(((posDaughter->GetMCProcessCode())) != 5 || ((negDaughter->GetMCProcessCode())) != 5){
3386 if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3387 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 310){
3395 }
else if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3396 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 130) {
3404 }
else if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3405 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 3122){
3412 }
else if (((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3413 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 221) {
3433 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3434 Double_t mcProdVtxX = primVtxMC->GetX();
3435 Double_t mcProdVtxY = primVtxMC->GetY();
3436 Double_t mcProdVtxZ = primVtxMC->GetZ();
3439 if( magField < 0.0 ){
3451 if(posDaughter == NULL || negDaughter == NULL)
return;
3452 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
3454 if(posDaughter->GetMother(0) != negDaughter->GetMother(0)){
3458 else if(posDaughter->GetMother(0) == -1){
3463 if(pdgCode[0]!=11 || pdgCode[1]!=11)
return;
3465 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode())
return;
3469 if(Photon->GetPdgCode() != 22){
3473 if(posDaughter->GetUniqueID() != 5 || negDaughter->GetUniqueID() !=5)
return;
3487 fCharPhotonMCInfo = 6;
3497 fCharPhotonMCInfo = 2;
3498 if( Photon->GetMother(0) > -1 &&
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0) > -1){
3499 if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3500 fCharPhotonMCInfo = 4;
3506 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3507 fCharPhotonMCInfo = 7;
3513 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3514 fCharPhotonMCInfo = 5;
3520 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 221) {
3521 fCharPhotonMCInfo = 3;
3546 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3547 Double_t mcProdVtxX = primVtxMC->GetX();
3548 Double_t mcProdVtxY = primVtxMC->GetY();
3549 Double_t mcProdVtxZ = primVtxMC->GetZ();
3551 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3552 if (AODMCTrackArray == NULL)
return;
3555 for(Long_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
3557 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
3558 if (!particle)
continue;
3563 Int_t isMCFromMBHeader = -1;
3573 if (TMath::Abs(particle->Eta()) < 0.66 ){
3576 if(particle->GetMother() >-1){
3577 switch((static_cast<AliAODMCParticle*>(AODMCTrackArray->At(particle->GetMother())))->GetPdgCode()){
3604 for(
Int_t daughterIndex=particle->GetDaughter(0);daughterIndex<=particle->GetDaughter(1);daughterIndex++){
3605 AliAODMCParticle *tmpDaughter =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(daughterIndex));
3606 if(!tmpDaughter)
continue;
3615 if (particle->E() != TMath::Abs(particle->Pz())){
3616 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3618 if( !(ratio <= 0) ){
3623 if ( particle->GetPdgCode() == 211 ){
3625 }
else if ( particle->GetPdgCode() == -211 ){
3627 }
else if ( particle->GetPdgCode() == 321 ){
3629 }
else if ( particle->GetPdgCode() == -321 ){
3631 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3633 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3635 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3643 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3644 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3647 if (particle->Pt()>0.005){
3656 if (particle->E() != TMath::Abs(particle->Pz())){
3657 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3659 if( !(ratio <= 0) ){
3663 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3664 alpha = (daughter0->E() - daughter1->E())/(daughter0->E() + daughter1->E());
3668 if(particle->GetPdgCode() == 111){
3691 }
else if(particle->GetPdgCode() == 221){
3710 if(particle->GetPdgCode() == 111){
3727 }
else if(particle->GetPdgCode() == 221){
3738 Int_t isMCFromMBHeader = -1;
3745 if (particle->GetMother() > -1) {
3746 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3747 if (tmpMother->GetMother() > -1) {
3748 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
3749 if(tmpGrandMother->GetPdgCode() == 310) {
3751 }
else if (tmpGrandMother->GetPdgCode() == 130) {
3753 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
3756 if ( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
3768 if (particle->GetMother() > -1) {
3769 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3770 if (tmpMother->GetMother() > -1) {
3771 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
3772 if(tmpGrandMother->GetPdgCode() == 310) {
3774 }
else if (tmpGrandMother->GetPdgCode() == 130) {
3776 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
3779 if ( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
3793 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3794 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3795 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3796 Int_t pdgCode = mother->GetPdgCode();
3797 if(particle->GetPdgCode() == 111){
3805 }
else if(particle->GetPdgCode() == 221){
3819 if (particle->GetPdgCode() == 111){
3838 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3839 Double_t mcProdVtxX = primVtxMC->GetX();
3840 Double_t mcProdVtxY = primVtxMC->GetY();
3841 Double_t mcProdVtxZ = primVtxMC->GetZ();
3845 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
3848 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3849 if (!particle)
continue;
3851 Int_t isMCFromMBHeader = -1;
3861 if (TMath::Abs(particle->Eta()) < 0.66 ){
3865 if(particle->GetMother(0) >-1){
3866 switch(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()){
3903 if (particle->Energy() != TMath::Abs(particle->Pz())){
3904 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3906 if( !(ratio <= 0) ){
3911 if ( particle->GetPdgCode() == 211 ){
3913 }
else if ( particle->GetPdgCode() == -211 ){
3915 }
else if ( particle->GetPdgCode() == 321 ){
3917 }
else if ( particle->GetPdgCode() == -321 ){
3919 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3921 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3923 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3931 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3932 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3936 if (particle->Pt()>0.005){
3942 if (particle->Energy() != TMath::Abs(particle->Pz())){
3943 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3945 if( !(ratio <= 0) ){
3950 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3951 alpha = (daughter0->Energy() - daughter1->Energy())/(daughter0->Energy() + daughter1->Energy());
3954 if(particle->GetPdgCode() == 111){