33 #include "THnSparse.h" 36 #include "AliAnalysisTask.h" 37 #include "AliAnalysisManager.h" 38 #include "AliESDEvent.h" 39 #include "AliESDInputHandler.h" 40 #include "AliMCEventHandler.h" 41 #include "AliMCEvent.h" 42 #include "AliMCParticle.h" 43 #include "AliCentrality.h" 44 #include "AliESDVZERO.h" 45 #include "AliESDpid.h" 47 #include "AliVParticle.h" 48 #include "AliESDtrack.h" 49 #include "AliESDtrackCuts.h" 50 #include "AliKFVertex.h" 51 #include "AliGenCocktailEventHeader.h" 53 #include "AliAODMCParticle.h" 54 #include "AliAODMCHeader.h" 55 #include "AliEventplane.h" 56 #include "AliAODEvent.h" 66 fV0ReaderName("V0ReaderV1"),
67 fDoLightOutput(kFALSE),
80 fHeaderNameList(NULL),
83 fGammaCandidates(NULL),
87 fClusterCutArray(NULL),
88 fHistoCaloGammaPt(NULL),
89 fHistoCaloGammaE(NULL),
90 fHistoConvGammaPt(NULL),
91 fHistoConvGammaR(NULL),
92 fHistoConvGammaEta(NULL),
93 fHistoConvGammaPhi(NULL),
94 fHistoConvGammaPsiPairPt(NULL),
95 tESDConvGammaPtDcazCat(NULL),
102 fHistoMotherInvMassPt(NULL),
103 sESDMotherInvMassPtZM(NULL),
104 fHistoMotherBackInvMassPt(NULL),
105 sESDMotherBackInvMassPtZM(NULL),
106 fHistoMotherInvMassEalpha(NULL),
107 fHistoMotherPi0PtY(NULL),
108 fHistoMotherEtaPtY(NULL),
109 fHistoMotherPi0PtAlpha(NULL),
110 fHistoMotherEtaPtAlpha(NULL),
111 fHistoMotherPi0PtOpenAngle(NULL),
112 fHistoMotherEtaPtOpenAngle(NULL),
113 sPtRDeltaROpenAngle(NULL),
114 fHistoMCHeaders(NULL),
115 fHistoMCAllGammaPt(NULL),
116 fHistoMCAllSecondaryGammaPt(NULL),
117 fHistoMCDecayGammaPi0Pt(NULL),
118 fHistoMCDecayGammaRhoPt(NULL),
119 fHistoMCDecayGammaEtaPt(NULL),
120 fHistoMCDecayGammaOmegaPt(NULL),
121 fHistoMCDecayGammaEtapPt(NULL),
122 fHistoMCDecayGammaPhiPt(NULL),
123 fHistoMCDecayGammaSigmaPt(NULL),
124 fHistoMCConvGammaPt(NULL),
125 fHistoMCSecondaryConvGammaPt(NULL),
126 fHistoMCConvGammaR(NULL),
127 fHistoMCConvGammaEta(NULL),
129 fHistoMCPi0WOWeightPt(NULL),
130 fHistoMCPi0WOEvtWeightPt(NULL),
131 fHistoMCEtaWOEvtWeightPt(NULL),
133 fHistoMCEtaWOWeightPt(NULL),
134 fHistoMCPi0WOWeightInAccPt(NULL),
135 fHistoMCEtaWOWeightInAccPt(NULL),
136 fHistoMCPi0InAccPt(NULL),
137 fHistoMCEtaInAccPt(NULL),
138 fHistoMCPi0WOEvtWeightInAccPt(NULL),
139 fHistoMCEtaWOEvtWeightInAccPt(NULL),
140 fHistoMCPi0PtY(NULL),
141 fHistoMCEtaPtY(NULL),
142 fHistoMCPi0PtAlpha(NULL),
143 fHistoMCEtaPtAlpha(NULL),
144 fHistoMCPrimaryPtvsSource(NULL),
145 fHistoMCSecPi0PtvsSource(NULL),
146 fHistoMCSecPi0RvsSource(NULL),
147 fHistoMCSecPi0Source(NULL),
148 fHistoMCSecPi0InAccPtvsSource(NULL),
149 fHistoMCSecEtaPt(NULL),
150 fHistoMCSecEtaSource(NULL),
151 fHistoMCPi0PtJetPt(NULL),
152 fHistoMCEtaPtJetPt(NULL),
153 fHistoMCPhysicalPrimariesPt(NULL),
154 fHistoTrueMotherInvMassPt(NULL),
155 fHistoTruePrimaryMotherInvMassPt(NULL),
156 fHistoTruePrimaryMotherW0WeightingInvMassPt(NULL),
157 pESDTruePrimaryMotherWeightsInvMassPt(NULL),
158 fHistoTruePrimaryPi0MCPtResolPt(NULL),
159 fHistoTruePrimaryEtaMCPtResolPt(NULL),
160 fHistoTrueSecondaryMotherInvMassPt(NULL),
161 fHistoTrueSecondaryMotherFromK0sInvMassPt(NULL),
162 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
163 fHistoTrueSecondaryMotherFromK0lInvMassPt(NULL),
164 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
165 fHistoTrueSecondaryMotherFromEtaInvMassPt(NULL),
166 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
167 fHistoTrueSecondaryMotherFromLambdaInvMassPt(NULL),
168 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
169 fHistoTrueBckGGInvMassPt(NULL),
170 fHistoTrueBckContInvMassPt(NULL),
171 fHistoTruePi0PtY(NULL),
172 fHistoTrueEtaPtY(NULL),
173 fHistoTruePi0PtAlpha(NULL),
174 fHistoTrueEtaPtAlpha(NULL),
175 fHistoTruePi0PtOpenAngle(NULL),
176 fHistoTrueEtaPtOpenAngle(NULL),
177 fHistoTrueMotherDalitzInvMassPt(NULL),
178 fHistoTrueConvGammaPt(NULL),
179 fHistoTrueConvGammaR(NULL),
180 fHistoTrueConvGammaPtMC(NULL),
181 fHistoTrueConvGammaRMC(NULL),
182 fHistoTrueConvGammaEta(NULL),
183 fHistoTrueConvGammaPsiPairPt(NULL),
184 fHistoCombinatorialPt(NULL),
185 fHistoCombinatorialMothersPt(NULL),
186 fHistoCombinatorialPtDeltaPhi_ek(NULL),
187 fHistoCombinatorialPtDeltaPhi_ep(NULL),
188 fHistoCombinatorialPtDeltaPhi_epi(NULL),
189 fHistoCombinatorialPtDeltaPhi_pik(NULL),
190 fHistoCombinatorialPtDeltaPhi_pip(NULL),
191 fHistoTruePrimaryConvGammaPt(NULL),
192 fHistoTrueSecondaryConvGammaPt(NULL),
193 fHistoTrueSecondaryConvGammaMCPt(NULL),
194 fHistoTruePrimaryConvGammaESDPtMCPt(NULL),
195 fHistoTrueSecondaryConvGammaFromXFromK0sMCPtESDPt(NULL),
196 fHistoTrueSecondaryConvGammaFromXFromK0lMCPtESDPt(NULL),
197 fHistoTrueSecondaryConvGammaFromXFromLambdaMCPtESDPt(NULL),
198 fHistoTrueDalitzPsiPairDeltaPhi(NULL),
199 fHistoTrueGammaPsiPairDeltaPhi(NULL),
200 fHistoDoubleCountTruePi0InvMassPt(NULL),
201 fHistoDoubleCountTrueEtaInvMassPt(NULL),
202 fHistoDoubleCountTrueConvGammaRPt(NULL),
203 vecDoubleCountTruePi0s(0),
204 vecDoubleCountTrueEtas(0),
205 vecDoubleCountTrueConvGammas(0),
206 fHistoMultipleCountTruePi0(NULL),
207 fHistoMultipleCountTrueEta(NULL),
208 fHistoMultipleCountTrueConvGamma(NULL),
209 mapMultipleCountTruePi0s(),
210 mapMultipleCountTrueEtas(),
211 mapMultipleCountTrueConvGammas(),
213 fHistoNEventsWOWeight(NULL),
214 fHistoNGoodESDTracks(NULL),
215 fHistoNEventsWeighted(NULL),
216 fHistoNGoodESDTracksWeighted(NULL),
218 fHistoVertexZWeighted(NULL),
219 fDoCentralityFlat(0),
220 fHistoCentrality(NULL),
221 fHistoCentralityFlattened(NULL),
222 fHistoCentralityVsPrimaryTracks(NULL),
223 fHistoNGammaCandidates(NULL),
224 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
225 fHistoSPDClusterTrackletBackground(NULL),
226 fHistoV0MultVsNumberTPCoutTracks(NULL),
227 fHistoNV0Tracks(NULL),
228 fProfileEtaShift(NULL),
229 fProfileJetJetXSection(NULL),
230 fhJetJetNTrials(NULL),
231 fHistoEtaShift(NULL),
232 tESDMesonsInvMassPtDcazMinDcazMaxFlag(NULL),
239 fEventPlaneAngle(-100),
241 fnGammaCandidates(0),
252 fMoveParticleAccordingToVertex(kTRUE),
254 fDoMesonAnalysis(kTRUE),
257 fDoChargedPrimary(kFALSE),
258 fDoPlotVsCentrality(kFALSE),
259 fIsFromSelectedHeader(kTRUE),
263 fWeightCentrality(NULL),
264 fEnableClusterCutsForTrigger(kFALSE),
265 fDoMaterialBudgetWeightingOfGammasForTrueMesons(kFALSE),
267 fFileNameBroken(NULL)
276 fV0ReaderName(
"V0ReaderV1"),
277 fDoLightOutput(kFALSE),
286 fPhotonDCAList(NULL),
290 fHeaderNameList(NULL),
293 fGammaCandidates(NULL),
294 fEventCutArray(NULL),
296 fMesonCutArray(NULL),
297 fClusterCutArray(NULL),
298 fHistoCaloGammaPt(NULL),
299 fHistoCaloGammaE(NULL),
300 fHistoConvGammaPt(NULL),
301 fHistoConvGammaR(NULL),
302 fHistoConvGammaEta(NULL),
303 fHistoConvGammaPhi(NULL),
304 fHistoConvGammaPsiPairPt(NULL),
305 tESDConvGammaPtDcazCat(NULL),
312 fHistoMotherInvMassPt(NULL),
313 sESDMotherInvMassPtZM(NULL),
314 fHistoMotherBackInvMassPt(NULL),
315 sESDMotherBackInvMassPtZM(NULL),
316 fHistoMotherInvMassEalpha(NULL),
317 fHistoMotherPi0PtY(NULL),
318 fHistoMotherEtaPtY(NULL),
319 fHistoMotherPi0PtAlpha(NULL),
320 fHistoMotherEtaPtAlpha(NULL),
321 fHistoMotherPi0PtOpenAngle(NULL),
322 fHistoMotherEtaPtOpenAngle(NULL),
323 sPtRDeltaROpenAngle(NULL),
324 fHistoMCHeaders(NULL),
325 fHistoMCAllGammaPt(NULL),
326 fHistoMCAllSecondaryGammaPt(NULL),
327 fHistoMCDecayGammaPi0Pt(NULL),
328 fHistoMCDecayGammaRhoPt(NULL),
329 fHistoMCDecayGammaEtaPt(NULL),
330 fHistoMCDecayGammaOmegaPt(NULL),
331 fHistoMCDecayGammaEtapPt(NULL),
332 fHistoMCDecayGammaPhiPt(NULL),
333 fHistoMCDecayGammaSigmaPt(NULL),
334 fHistoMCConvGammaPt(NULL),
335 fHistoMCSecondaryConvGammaPt(NULL),
336 fHistoMCConvGammaR(NULL),
337 fHistoMCConvGammaEta(NULL),
339 fHistoMCPi0WOWeightPt(NULL),
340 fHistoMCPi0WOEvtWeightPt(NULL),
341 fHistoMCEtaWOEvtWeightPt(NULL),
343 fHistoMCEtaWOWeightPt(NULL),
344 fHistoMCPi0WOWeightInAccPt(NULL),
345 fHistoMCEtaWOWeightInAccPt(NULL),
346 fHistoMCPi0InAccPt(NULL),
347 fHistoMCEtaInAccPt(NULL),
348 fHistoMCPi0WOEvtWeightInAccPt(NULL),
349 fHistoMCEtaWOEvtWeightInAccPt(NULL),
350 fHistoMCPi0PtY(NULL),
351 fHistoMCEtaPtY(NULL),
352 fHistoMCPi0PtAlpha(NULL),
353 fHistoMCEtaPtAlpha(NULL),
354 fHistoMCPrimaryPtvsSource(NULL),
355 fHistoMCSecPi0PtvsSource(NULL),
356 fHistoMCSecPi0RvsSource(NULL),
357 fHistoMCSecPi0Source(NULL),
358 fHistoMCSecPi0InAccPtvsSource(NULL),
359 fHistoMCSecEtaPt(NULL),
360 fHistoMCSecEtaSource(NULL),
361 fHistoMCPi0PtJetPt(NULL),
362 fHistoMCEtaPtJetPt(NULL),
363 fHistoMCPhysicalPrimariesPt(NULL),
364 fHistoTrueMotherInvMassPt(NULL),
365 fHistoTruePrimaryMotherInvMassPt(NULL),
366 fHistoTruePrimaryMotherW0WeightingInvMassPt(NULL),
367 pESDTruePrimaryMotherWeightsInvMassPt(NULL),
368 fHistoTruePrimaryPi0MCPtResolPt(NULL),
369 fHistoTruePrimaryEtaMCPtResolPt(NULL),
370 fHistoTrueSecondaryMotherInvMassPt(NULL),
371 fHistoTrueSecondaryMotherFromK0sInvMassPt(NULL),
372 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
373 fHistoTrueSecondaryMotherFromK0lInvMassPt(NULL),
374 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
375 fHistoTrueSecondaryMotherFromEtaInvMassPt(NULL),
376 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
377 fHistoTrueSecondaryMotherFromLambdaInvMassPt(NULL),
378 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
379 fHistoTrueBckGGInvMassPt(NULL),
380 fHistoTrueBckContInvMassPt(NULL),
381 fHistoTruePi0PtY(NULL),
382 fHistoTrueEtaPtY(NULL),
383 fHistoTruePi0PtAlpha(NULL),
384 fHistoTrueEtaPtAlpha(NULL),
385 fHistoTruePi0PtOpenAngle(NULL),
386 fHistoTrueEtaPtOpenAngle(NULL),
387 fHistoTrueMotherDalitzInvMassPt(NULL),
388 fHistoTrueConvGammaPt(NULL),
389 fHistoTrueConvGammaR(NULL),
390 fHistoTrueConvGammaPtMC(NULL),
391 fHistoTrueConvGammaRMC(NULL),
392 fHistoTrueConvGammaEta(NULL),
393 fHistoTrueConvGammaPsiPairPt(NULL),
394 fHistoCombinatorialPt(NULL),
395 fHistoCombinatorialMothersPt(NULL),
396 fHistoCombinatorialPtDeltaPhi_ek(NULL),
397 fHistoCombinatorialPtDeltaPhi_ep(NULL),
398 fHistoCombinatorialPtDeltaPhi_epi(NULL),
399 fHistoCombinatorialPtDeltaPhi_pik(NULL),
400 fHistoCombinatorialPtDeltaPhi_pip(NULL),
401 fHistoTruePrimaryConvGammaPt(NULL),
402 fHistoTrueSecondaryConvGammaPt(NULL),
403 fHistoTrueSecondaryConvGammaMCPt(NULL),
404 fHistoTruePrimaryConvGammaESDPtMCPt(NULL),
405 fHistoTrueSecondaryConvGammaFromXFromK0sMCPtESDPt(NULL),
406 fHistoTrueSecondaryConvGammaFromXFromK0lMCPtESDPt(NULL),
407 fHistoTrueSecondaryConvGammaFromXFromLambdaMCPtESDPt(NULL),
408 fHistoTrueDalitzPsiPairDeltaPhi(NULL),
409 fHistoTrueGammaPsiPairDeltaPhi(NULL),
410 fHistoDoubleCountTruePi0InvMassPt(NULL),
411 fHistoDoubleCountTrueEtaInvMassPt(NULL),
412 fHistoDoubleCountTrueConvGammaRPt(NULL),
413 vecDoubleCountTruePi0s(0),
414 vecDoubleCountTrueEtas(0),
415 vecDoubleCountTrueConvGammas(0),
416 fHistoMultipleCountTruePi0(NULL),
417 fHistoMultipleCountTrueEta(NULL),
418 fHistoMultipleCountTrueConvGamma(NULL),
419 mapMultipleCountTruePi0s(),
420 mapMultipleCountTrueEtas(),
421 mapMultipleCountTrueConvGammas(),
423 fHistoNEventsWOWeight(NULL),
424 fHistoNGoodESDTracks(NULL),
425 fHistoNEventsWeighted(NULL),
426 fHistoNGoodESDTracksWeighted(NULL),
428 fHistoVertexZWeighted(NULL),
429 fDoCentralityFlat(0),
430 fHistoCentrality(NULL),
431 fHistoCentralityFlattened(NULL),
432 fHistoCentralityVsPrimaryTracks(NULL),
433 fHistoNGammaCandidates(NULL),
434 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
435 fHistoSPDClusterTrackletBackground(NULL),
436 fHistoV0MultVsNumberTPCoutTracks(NULL),
437 fHistoNV0Tracks(NULL),
438 fProfileEtaShift(NULL),
439 fProfileJetJetXSection(NULL),
440 fhJetJetNTrials(NULL),
441 fHistoEtaShift(NULL),
442 tESDMesonsInvMassPtDcazMinDcazMaxFlag(NULL),
449 fEventPlaneAngle(-100),
451 fnGammaCandidates(0),
462 fMoveParticleAccordingToVertex(kTRUE),
464 fDoMesonAnalysis(kTRUE),
467 fDoChargedPrimary(kFALSE),
468 fDoPlotVsCentrality(kFALSE),
469 fIsFromSelectedHeader(kTRUE),
473 fWeightCentrality(NULL),
474 fEnableClusterCutsForTrigger(kFALSE),
475 fDoMaterialBudgetWeightingOfGammasForTrueMesons(kFALSE),
477 fFileNameBroken(NULL)
480 DefineOutput(1, TList::Class());
507 const Int_t nDim = 4;
508 Int_t nBins[nDim] = {800,250,7,4};
511 Int_t nBinsRP[nDim] = {800,250,7,8};
513 Double_t xMaxRP[nDim] = {0.8,25,7,8};
531 if(collisionSystem == 1 || collisionSystem == 2 ||
532 collisionSystem == 5 || collisionSystem == 8 ||
533 collisionSystem == 9){
534 centMin = centMin*10;
535 centMax = centMax*10;
536 if(centMax ==0 && centMax!=centMin) centMax=100;
537 }
else if(collisionSystem == 3 || collisionSystem == 6) {
540 }
else if(collisionSystem == 4 || collisionSystem == 7) {
541 centMin = ((centMin*5)+45);
542 centMax = ((centMax*5)+45);
547 fBackList[iCut]->SetName(Form(
"%s_%s_%s Back histograms",cutstringEvent.Data(), cutstringPhoton.Data(),cutstringMeson.Data()));
552 sESDMotherBackInvMassPtZM[iCut] =
new THnSparseF(
"Back_Back_InvMass_Pt_z_m",
"Back_Back_InvMass_Pt_z_m",nDim,nBins,xMin,xMax);
554 sESDMotherBackInvMassPtZM[iCut] =
new THnSparseF(
"Back_Back_InvMass_Pt_z_psi",
"Back_Back_InvMass_Pt_z_psi",nDim,nBinsRP,xMinRP,xMaxRP);
560 fMotherList[iCut]->SetName(Form(
"%s_%s_%s Mother histograms",cutstringEvent.Data() ,cutstringPhoton.Data(),cutstringMeson.Data()));
565 sESDMotherInvMassPtZM[iCut] =
new THnSparseF(
"Back_Mother_InvMass_Pt_z_m",
"Back_Mother_InvMass_Pt_z_m",nDim,nBins,xMin,xMax);
567 sESDMotherInvMassPtZM[iCut] =
new THnSparseF(
"Back_Mother_InvMass_Pt_z_psi",
"Back_Mother_InvMass_Pt_z_psi",nDim,nBinsRP,xMinRP,xMaxRP);
574 collisionSystem,centMin,centMax,
594 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
598 const Int_t nDim2 = 4;
599 Int_t nBins2[nDim2] = {250,180,100,100};
601 Double_t xMax2[nDim2] = {25,180,10,0.1};
604 Int_t nGammaCand = 50;
606 Int_t nSPDTracklets = 200;
607 Int_t nSPDClusters = 400;
608 Int_t nBinsTrklCls = 100;
612 nSPDTracklets = 6000;
613 nSPDClusters = 20000;
627 Int_t nBinsQAPt = 175;
629 Int_t nBinsClusterPt = 500;
644 for(
Int_t i=0; i<nBinsPt+1;i++){
645 if (i < 1) arrPtBinning[i] = 0.25*i;
646 else if(i<56) arrPtBinning[i] = 0.25+0.05*(i-1);
647 else if(i<126) arrPtBinning[i] = 3.+0.1*(i-56);
648 else if(i<166) arrPtBinning[i] = 10.+0.25*(i-126);
649 else if(i<186) arrPtBinning[i] = 20.+1.0*(i-166);
650 else arrPtBinning[i] = maxPt;
654 for(
Int_t i=0; i<nBinsQAPt+1;i++){
655 if(i<60) arrQAPtBinning[i] = 0.05*i;
656 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
657 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
658 else if(i<190) arrQAPtBinning[i] = 20.+1.0*(i-170);
659 else arrQAPtBinning[i] = maxQAPt;
661 nBinsClusterPt = 301;
664 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
665 if (i < 1) arrClusPtBinning[i] = 0.3*i;
666 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
667 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
668 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
669 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
670 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
671 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
672 else arrClusPtBinning[i] = maxClusterPt;
682 for(
Int_t i=0; i<nBinsPt+1;i++){
683 if (i < 1) arrPtBinning[i] = 0.10*i;
684 else if(i<59) arrPtBinning[i] = 0.10+0.05*(i-1);
685 else if(i<129) arrPtBinning[i] = 3.+0.1*(i-59);
686 else if(i<169) arrPtBinning[i] = 10.+0.25*(i-129);
687 else if(i<199) arrPtBinning[i] = 20.+1.0*(i-169);
688 else arrPtBinning[i] = maxPt;
692 for(
Int_t i=0; i<nBinsQAPt+1;i++){
693 if(i<60) arrQAPtBinning[i] = 0.05*i;
694 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
695 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
696 else if(i<200) arrQAPtBinning[i] = 20.+1.0*(i-170);
697 else arrQAPtBinning[i] = maxQAPt;
699 nBinsClusterPt = 301;
702 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
703 if (i < 1) arrClusPtBinning[i] = 0.3*i;
704 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
705 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
706 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
707 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
708 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
709 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
710 else arrClusPtBinning[i] = maxClusterPt;
718 for(
Int_t i=0; i<nBinsPt+1;i++){
719 if (i < 1) arrPtBinning[i] = 0.3*i;
720 else if(i<58) arrPtBinning[i] = 0.3+0.1*(i-1);
721 else if(i<82) arrPtBinning[i] = 6.+0.25*(i-58);
722 else if(i<90) arrPtBinning[i] = 12.+1.0*(i-82);
723 else arrPtBinning[i] = maxPt;
727 for(
Int_t i=0; i<nBinsQAPt+1;i++){
728 if(i<60) arrQAPtBinning[i] = 0.1*i;
729 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
730 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
731 else arrQAPtBinning[i] = maxQAPt;
733 nBinsClusterPt = 148;
736 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
737 if (i < 1) arrClusPtBinning[i] = 0.3*i;
738 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
739 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
740 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
741 else arrClusPtBinning[i] = maxClusterPt;
749 for(
Int_t i=0; i<=nBinsPt;i++){
750 if(i<=30) arrPtBinning[i] = 0.0 + 0.10*i;
751 else if(i<=38) arrPtBinning[i] = 3.0 + 0.25*(i-30);
752 else if(i<=48) arrPtBinning[i] = 5.0 + 0.50*(i-38);
753 else arrPtBinning[i] = 10.0 + 1.0*(i-48);
758 for(
Int_t i=0; i<=nBinsQAPt;i++){
759 if(i<=30) arrQAPtBinning[i] = 0.0 + 0.10*i;
760 else if(i<=38) arrQAPtBinning[i] = 3.0 + 0.25*(i-30);
761 else if(i<=48) arrQAPtBinning[i] = 5.0 + 0.50*(i-38);
762 else arrQAPtBinning[i] = 10.0 + 1.0*(i-48);
765 nBinsClusterPt = 148;
768 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
769 if (i < 1) arrClusPtBinning[i] = 0.3*i;
770 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
771 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
772 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
773 else arrClusPtBinning[i] = maxClusterPt;
778 for(
Int_t i=0; i<nBinsPt+1;i++){
779 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
781 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
782 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
784 for(
Int_t i=0; i<nBinsQAPt+1;i++){
785 if(i<60) arrQAPtBinning[i] = 0.05*i;
786 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
787 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
788 else if(i<175) arrQAPtBinning[i] = 20.+1*(i-170);
789 else arrQAPtBinning[i] = maxQAPt;
797 }
else if (
fIsMC == 3){
892 TString cutstringMeson =
"NoMesonCut";
897 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s_%s",cutstringEvent.Data() ,cutstringPhoton.Data(),cutstringMeson.Data()));
901 fESDList[iCut]->SetName(Form(
"%s_%s_%s ESD histograms",cutstringEvent.Data() ,cutstringPhoton.Data(),cutstringMeson.Data()));
906 fHistoNEvents[iCut] =
new TH1F(
"NEventsUnweighted",
"NEventsUnweighted", 14, -0.5, 13.5);
908 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents", 14, -0.5, 13.5);
910 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
911 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
913 TString TriggerNames =
"Not Trigger: ";
915 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
920 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
924 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problem");
925 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
926 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
927 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
928 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
936 TString TriggerNames =
"Not Trigger: ";
968 TString TriggerNames =
"Not Trigger: ";
988 fHistoNGoodESDTracks[iCut] =
new TH1F(
"GoodESDTracksUnweighted",
"GoodESDTracksUnweighted", nTracks, -0.5, nTracks-0.5);
990 fHistoVertexZ[iCut] =
new TH1F(
"VertexZUnweighted",
"VertexZUnweighted", 200, -10, 10);
1000 fHistoNGoodESDTracks[iCut] =
new TH1F(
"GoodESDTracks",
"GoodESDTracks", nTracks, -0.5, nTracks-0.5);
1002 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ", 200, -10, 10);
1007 fHistoCentrality[iCut] =
new TH1F(
"Centrality",
"Centrality", 100, -0.5, 99.5);
1019 fHistoNGammaCandidates[iCut] =
new TH1F(
"GammaCandidates",
"GammaCandidates", nGammaCand, -0.5, nGammaCand-0.5);
1042 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 20000, 0, 40000);
1044 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 2500, 0, 2500);
1046 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 1500, 0, 1500);
1049 fHistoEtaShift[iCut] =
new TProfile(
"Eta Shift",
"Eta Shift", 1, -0.5, 0.5);
1052 fHistoConvGammaPt[iCut] =
new TH1F(
"ESD_ConvGamma_Pt",
"ESD_ConvGamma_Pt", nBinsPt, arrPtBinning);
1071 fHistoCaloGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1075 fHistoCaloGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E", nBinsClusterPt, arrClusPtBinning);
1083 fPhotonDCAList[iCut]->SetName(Form(
"%s_%s_%s Photon DCA tree", cutstringEvent.Data(), cutstringPhoton.Data(), cutstringMeson.Data()));
1103 fHistoConvGammaPsiPairPt[iCut]=
new TH2F(
"ESD_ConvGamma_PsiPair_Pt",
"ESD_ConvGamma_PsiPair_Pt", 500, 0, 5, nBinsQAPt, arrQAPtBinning);
1107 fHistoConvGammaR[iCut] =
new TH1F(
"ESD_ConvGamma_R",
"ESD_ConvGamma_R", 800, 0, 200);
1110 fHistoConvGammaEta[iCut] =
new TH1F(
"ESD_ConvGamma_Eta",
"ESD_ConvGamma_Eta", 1000, -2, 2);
1113 fHistoConvGammaPhi[iCut] =
new TH1F(
"ESD_ConvGamma_Phi",
"ESD_ConvGamma_Phi", 360, 0, 2*TMath::Pi());
1119 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
1123 fHistoMotherInvMassEalpha[iCut] =
new TH2F(
"ESD_Mother_InvMass_vs_E_alpha",
"ESD_Mother_InvMass_vs_E_alpha", 800, 0, 0.8, nBinsPt, arrPtBinning);
1134 fMesonDCAList[iCut]->SetName(Form(
"%s_%s_%s Meson DCA tree",cutstringEvent.Data() ,cutstringPhoton.Data(),cutstringMeson.Data()));
1152 fHistoMotherPi0PtY[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Y",
"ESD_MotherPi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1154 fHistoMotherEtaPtY[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Y",
"ESD_MotherEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1156 fHistoMotherPi0PtOpenAngle[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_OpenAngle",
"ESD_MotherPi0_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 100, 0, TMath::Pi());
1158 fHistoMotherEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_MotherEta_Pt_OpenAngle",
"ESD_MotherEta_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 100, 0, TMath::Pi());
1161 fHistoMotherPi0PtAlpha[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Alpha",
"ESD_MotherPi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1163 fHistoMotherEtaPtAlpha[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Alpha",
"ESD_MotherEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1172 sPtRDeltaROpenAngle[iCut] =
new THnSparseF(
"PhotonPair_Pt_R_DeltaR_OpenAngle",
"PhotonPair_Pt_R_DeltaR_OpenAngle", nDim2, nBins2, xMin2, xMax2);
1311 TString cutstringMeson =
"NoMesonCut";
1316 fMCList[iCut]->SetName(Form(
"%s_%s_%s MC histograms",cutstringEvent.Data() ,cutstringPhoton.Data(),cutstringMeson.Data()));
1317 fMCList[iCut]->SetOwner(kTRUE);
1323 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt", nBinsPt, arrPtBinning);
1331 fHistoMCDecayGammaPi0Pt[iCut] =
new TH1F(
"MC_DecayGammaPi0_Pt",
"MC_DecayGammaPi0_Pt", nBinsPt, arrPtBinning);
1333 fHistoMCDecayGammaRhoPt[iCut] =
new TH1F(
"MC_DecayGammaRho_Pt",
"MC_DecayGammaRho_Pt", nBinsPt, arrPtBinning);
1335 fHistoMCDecayGammaEtaPt[iCut] =
new TH1F(
"MC_DecayGammaEta_Pt",
"MC_DecayGammaEta_Pt", nBinsPt, arrPtBinning);
1341 fHistoMCDecayGammaPhiPt[iCut] =
new TH1F(
"MC_DecayGammaPhi_Pt",
"MC_DecayGammaPhi_Pt", nBinsPt, arrPtBinning);
1345 fHistoMCConvGammaPt[iCut] =
new TH1F(
"MC_ConvGamma_Pt",
"MC_ConvGamma_Pt", nBinsPt, arrPtBinning);
1369 fHistoMCConvGammaR[iCut] =
new TH1F(
"MC_ConvGamma_R",
"MC_ConvGamma_R", 800, 0, 200);
1376 fHistoMCPi0Pt[iCut] =
new TH1F(
"MC_Pi0_Pt",
"MC_Pi0_Pt", nBinsPt, arrPtBinning);
1379 fHistoMCPi0WOWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOWeights_Pt",
"MC_Pi0_WOWeights_Pt", nBinsPt, arrPtBinning);
1383 fHistoMCEtaPt[iCut] =
new TH1F(
"MC_Eta_Pt",
"MC_Eta_Pt", nBinsPt, arrPtBinning);
1386 fHistoMCEtaWOWeightPt[iCut] =
new TH1F(
"MC_Eta_WOWeights_Pt",
"MC_Eta_WOWeights_Pt", nBinsPt, arrPtBinning);
1396 fHistoMCPi0InAccPt[iCut] =
new TH1F(
"MC_Pi0InAcc_Pt",
"MC_Pi0InAcc_Pt", nBinsPt, arrPtBinning);
1399 fHistoMCEtaInAccPt[iCut] =
new TH1F(
"MC_EtaInAcc_Pt",
"MC_EtaInAcc_Pt", nBinsPt, arrPtBinning);
1404 fHistoMCPi0WOEvtWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOEventWeights_Pt",
"MC_Pi0_WOEventWeights_Pt", nBinsPt, arrPtBinning);
1406 fHistoMCEtaWOEvtWeightPt[iCut] =
new TH1F(
"MC_Eta_WOEventWeights_Pt",
"MC_Eta_WOEventWeights_Pt", nBinsPt, arrPtBinning);
1416 fHistoMCPi0PtJetPt[iCut] =
new TH2F(
"MC_Pi0_Pt_JetPt",
"MC_Pi0_Pt_JetPt", nBinsPt, arrPtBinning, 200, 0, 200);
1419 fHistoMCEtaPtJetPt[iCut] =
new TH2F(
"MC_Eta_Pt_JetPt",
"MC_Eta_Pt_JetPt", nBinsPt, arrPtBinning, 200, 0, 200);
1445 fHistoMCSecEtaPt[iCut] =
new TH1F(
"MC_SecEta_Pt",
"MC_SecEta_Pt", nBinsPt, arrPtBinning);
1456 fHistoMCPi0PtAlpha[iCut] =
new TH2F(
"MC_Pi0_Pt_Alpha",
"MC_Pi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1458 fHistoMCEtaPtAlpha[iCut] =
new TH2F(
"MC_Eta_Pt_Alpha",
"MC_Eta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1462 fHistoMCPi0PtY[iCut] =
new TH2F(
"MC_Pi0_Pt_Y",
"MC_Pi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1465 fHistoMCEtaPtY[iCut] =
new TH2F(
"MC_Eta_Pt_Y",
"MC_Eta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1477 fTrueList[iCut]->SetName(Form(
"%s_%s_%s True histograms",cutstringEvent.Data() ,cutstringPhoton.Data(),cutstringMeson.Data()));
1481 fHistoTrueConvGammaPt[iCut] =
new TH1F(
"ESD_TrueConvGamma_Pt",
"ESD_TrueConvGamma_Pt", nBinsPt, arrPtBinning);
1489 fHistoCombinatorialPt[iCut] =
new TH2F(
"ESD_TrueCombinatorial_Pt",
"ESD_TrueCombinatorial_Pt", nBinsPt, arrPtBinning, 16, -0.5, 15.5);
1525 fHistoCombinatorialMothersPt[iCut] =
new TH3F(
"ESD_TrueCombinatorialMothers_Pt",
"ESD_TrueCombinatorialMothers_Pt", 6, 0, 6, 13, 0, 13, 250, 0., 25);
1548 fHistoCombinatorialPtDeltaPhi_ek[iCut] =
new TH2F(
"ESD_TrueCombinatorial_Pt_DeltaPhi_ek",
"ESD_TrueCombinatorial_Pt_DeltaPhi_ek", nBinsQAPt, arrQAPtBinning, 90, -0.5*TMath::Pi(), 0.5*TMath::Pi());
1550 fHistoCombinatorialPtDeltaPhi_ep[iCut] =
new TH2F(
"ESD_TrueCombinatorial_Pt_DeltaPhi_ep",
"ESD_TrueCombinatorial_Pt_DeltaPhi_ep", nBinsQAPt, arrQAPtBinning, 90, -0.5*TMath::Pi(), 0.5*TMath::Pi());
1552 fHistoCombinatorialPtDeltaPhi_epi[iCut] =
new TH2F(
"ESD_TrueCombinatorial_Pt_DeltaPhi_epi",
"ESD_TrueCombinatorial_Pt_DeltaPhi_epi", nBinsQAPt, arrQAPtBinning, 90, -0.5*TMath::Pi(), 0.5*TMath::Pi());
1554 fHistoCombinatorialPtDeltaPhi_pik[iCut] =
new TH2F(
"ESD_TrueCombinatorial_Pt_DeltaPhi_pik",
"ESD_TrueCombinatorial_Pt_DeltaPhi_pik", nBinsQAPt, arrQAPtBinning, 90, -0.5*TMath::Pi(), 0.5*TMath::Pi());
1556 fHistoCombinatorialPtDeltaPhi_pip[iCut] =
new TH2F(
"ESD_TrueCombinatorial_Pt_DeltaPhi_pip",
"ESD_TrueCombinatorial_Pt_DeltaPhi_pip", nBinsQAPt, arrQAPtBinning, 90, -0.5*TMath::Pi(), 0.5*TMath::Pi());
1566 nBinsPt, arrPtBinning, nBinsPt, arrPtBinning);
1571 nBinsPt, arrPtBinning, nBinsPt, arrPtBinning);
1574 nBinsPt, arrPtBinning, nBinsPt, arrPtBinning);
1577 nBinsPt, arrPtBinning, nBinsPt, arrPtBinning);
1603 fHistoTrueConvGammaR[iCut] =
new TH1F(
"ESD_TrueConvGamma_R",
"ESD_TrueConvGamma_R", 800, 0, 200);
1608 fHistoTrueConvGammaPtMC[iCut] =
new TH1F(
"ESD_TrueConvGamma_PtMC",
"ESD_TrueConvGamma_PtMC", nBinsPt, arrPtBinning);
1632 pESDTruePrimaryMotherWeightsInvMassPt[iCut] =
new TProfile2D(
"ESD_TruePrimaryMotherWeights_InvMass_Pt",
"ESD_TruePrimaryMotherWeights_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
1686 fHistoTruePi0PtY[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Y",
"ESD_TruePi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1688 fHistoTrueEtaPtY[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Y",
"ESD_TrueEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1690 fHistoTruePi0PtOpenAngle[iCut] =
new TH2F(
"ESD_TruePi0_Pt_OpenAngle",
"ESD_TruePi0_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 200, 0, 2*TMath::Pi());
1692 fHistoTrueEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_TrueEta_Pt_OpenAngle",
"ESD_TrueEta_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 200, 0, 2*TMath::Pi());
1696 fHistoTruePi0PtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Alpha",
"ESD_TruePi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1698 fHistoTrueEtaPtAlpha[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Alpha",
"ESD_TrueEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1782 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
1810 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
1812 if(eventQuality == 2 || eventQuality == 3){
1836 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
1853 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
1874 if(eventNotAccepted){
1882 if(eventQuality != 0){
1936 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
1946 if (nameBin.CompareTo(
"")== 0){
1948 ->GetAcceptedHeader())->At(i))->GetString();
1950 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
2044 if(!PhotonCandidate)
continue;
2047 Float_t weightMatBudgetGamma = 1.;
2054 Int_t isPosFromMBHeader
2057 Int_t isNegFromMBHeader
2094 if (
fIsHeavyIon == 1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
2101 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
2114 GammaCandidatesStepOne->Add(PhotonCandidate);
2117 GammaCandidatesStepTwo->Add(PhotonCandidate);
2121 for(
Int_t i = 0;i<GammaCandidatesStepOne->GetEntries();i++){
2123 if(!PhotonCandidate)
continue;
2126 Float_t weightMatBudgetGamma = 1.;
2133 Int_t isPosFromMBHeader
2135 Int_t isNegFromMBHeader
2166 if (
fIsHeavyIon ==1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
2173 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
2183 }
else GammaCandidatesStepTwo->Add(PhotonCandidate);
2187 for(
Int_t i = 0;i<GammaCandidatesStepTwo->GetEntries();i++){
2189 if(!PhotonCandidate)
continue;
2192 Float_t weightMatBudgetGamma = 1.;
2198 Int_t isPosFromMBHeader
2200 Int_t isNegFromMBHeader
2230 if (
fIsHeavyIon == 1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
2237 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
2250 delete GammaCandidatesStepOne;
2251 GammaCandidatesStepOne = 0x0;
2252 delete GammaCandidatesStepTwo;
2253 GammaCandidatesStepTwo = 0x0;
2259 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2260 Double_t mcProdVtxX = primVtxMC->GetX();
2261 Double_t mcProdVtxY = primVtxMC->GetY();
2262 Double_t mcProdVtxZ = primVtxMC->GetZ();
2265 if( magField < 0.0 ){
2272 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2273 if (AODMCTrackArray != NULL && TruePhotonCandidate != NULL){
2275 AliAODMCParticle *posDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelPositive());
2276 AliAODMCParticle *negDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelNegative());
2279 if(posDaughter == NULL || negDaughter == NULL)
return;
2280 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
2282 Double_t PhiParticle[2] = {posDaughter->Phi(),negDaughter->Phi()};
2284 if(posDaughter->GetMother() != negDaughter->GetMother()){
2287 if(posDaughter->GetMother() > -1){
2288 AliAODMCParticle *Mom = (AliAODMCParticle*) AODMCTrackArray->At(posDaughter->GetMother());
2289 if(Mom->GetMother() == -1){
2292 AliAODMCParticle *GranMom = (AliAODMCParticle*) AODMCTrackArray->At(Mom->GetMother());
2293 if(GranMom->GetMother() == -1){
2296 AliAODMCParticle *GranGranMom = (AliAODMCParticle*) AODMCTrackArray->At(GranMom->GetMother());
2297 if(GranGranMom->GetMother() == -1){
2303 if(negDaughter->GetMother() > -1){
2304 AliAODMCParticle *Mom = (AliAODMCParticle*) AODMCTrackArray->At(negDaughter->GetMother());
2305 if(Mom->GetMother() == -1){
2308 AliAODMCParticle *GranMom = (AliAODMCParticle*) AODMCTrackArray->At(Mom->GetMother());
2309 if(GranMom->GetMother() == -1){
2312 AliAODMCParticle *GranGranMom = (AliAODMCParticle*) AODMCTrackArray->At(GranMom->GetMother());
2313 if(GranGranMom->GetMother() == -1){
2323 else if(posDaughter->GetMother() == -1){
2333 if(pdgCode[0]!=11 || pdgCode[1]!=11){
2337 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode()){
2342 AliAODMCParticle *Photon = (AliAODMCParticle*) AODMCTrackArray->At(posDaughter->GetMother());
2345 Double_t deltaPhi = magField * TVector2::Phi_mpi_pi( electronCandidate->Phi()-positronCandidate->Phi());
2347 if(Photon->GetPdgCode() != 22){
2353 if(((posDaughter->GetMCProcessCode())) != 5 || ((negDaughter->GetMCProcessCode())) != 5){
2360 rConv = sqrt( (posDaughter->Xv()*posDaughter->Xv()) + (posDaughter->Yv()*posDaughter->Yv()) );
2364 Float_t weightMatBudgetGamma = 1.;
2394 if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 && ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetMother() > -1 ){
2395 if (((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 310){
2400 }
else if (((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 130) {
2405 }
else if (((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 3122) {
2410 }
else if (((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 221) {
2430 if( magField < 0.0 ){
2437 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2438 Double_t mcProdVtxX = primVtxMC->GetX();
2439 Double_t mcProdVtxY = primVtxMC->GetY();
2440 Double_t mcProdVtxZ = primVtxMC->GetZ();
2448 if(posDaughter == NULL || negDaughter == NULL)
return;
2449 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
2451 Double_t PhiParticle[2] = {posDaughter->Phi(),negDaughter->Phi()};
2454 if(posDaughter->GetMother(0) != negDaughter->GetMother(0)){
2457 if(posDaughter->GetMother(0) > -1){
2458 TParticle *Mom =
fMCEvent->Particle(posDaughter->GetMother(0));
2459 if(Mom->GetMother(0) == -1){
2462 TParticle *GranMom =
fMCEvent->Particle(Mom->GetMother(0));
2463 if(GranMom->GetMother(0) == -1){
2466 TParticle *GranGranMom =
fMCEvent->Particle(GranMom->GetMother(0));
2467 if(GranGranMom->GetMother(0) == -1){
2473 if(negDaughter->GetMother(0) > -1){
2474 TParticle *Mom =
fMCEvent->Particle(negDaughter->GetMother(0));
2475 if(Mom->GetMother(0) == -1){
2478 TParticle *GranMom =
fMCEvent->Particle(Mom->GetMother(0));
2479 if(GranMom->GetMother(0) == -1){
2482 TParticle *GranGranMom =
fMCEvent->Particle(GranMom->GetMother(0));
2483 if(GranGranMom->GetMother(0) == -1){
2491 }
else if(posDaughter->GetMother(0) == -1){
2500 if(pdgCode[0]!=11 || pdgCode[1]!=11)
return;
2502 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode())
return;
2507 Double_t deltaPhi = magField * TVector2::Phi_mpi_pi( electronCandidate->Phi()-positronCandidate->Phi());
2509 if(Photon->GetPdgCode() != 22){
2514 if(posDaughter->GetUniqueID() != 5 || negDaughter->GetUniqueID() !=5)
return;
2517 Float_t weightMatBudgetGamma = 1.;
2550 if( Photon->GetMother(0) > -1 &&
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0) > -1){
2551 if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
2556 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
2561 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
2566 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 221) {
2585 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2586 Double_t mcProdVtxX = primVtxMC->GetX();
2587 Double_t mcProdVtxY = primVtxMC->GetY();
2588 Double_t mcProdVtxZ = primVtxMC->GetZ();
2590 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2592 if (AODMCTrackArray){
2594 for(
Int_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
2596 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
2597 if (!particle)
continue;
2602 Int_t isMCFromMBHeader = -1;
2612 if(particle->GetMother() >-1){
2613 switch((static_cast<AliAODMCParticle*>(AODMCTrackArray->At(particle->GetMother())))->GetPdgCode()){
2640 for(
Int_t daughterIndex=particle->GetDaughter(0);daughterIndex<=particle->GetDaughter(1);daughterIndex++){
2641 AliAODMCParticle *tmpDaughter =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(daughterIndex));
2642 if(!tmpDaughter)
continue;
2643 if(TMath::Abs(tmpDaughter->GetPdgCode()) == 11){
2644 rConv = sqrt( (tmpDaughter->Xv()*tmpDaughter->Xv()) + (tmpDaughter->Yv()*tmpDaughter->Yv()) );
2658 if (particle->E() != TMath::Abs(particle->Pz())){
2659 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
2661 if( !(ratio <= 0) ){
2666 if ( particle->GetPdgCode() == 211 ){
2668 }
else if ( particle->GetPdgCode() == -211 ){
2670 }
else if ( particle->GetPdgCode() == 321 ){
2672 }
else if ( particle->GetPdgCode() == -321 ){
2674 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
2676 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
2678 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
2680 }
else if ( TMath::Abs(particle->GetPdgCode()) == 223 ){
2682 }
else if ( TMath::Abs(particle->GetPdgCode()) == 333 ){
2684 }
else if ( TMath::Abs(particle->GetPdgCode()) == 113 ){
2690 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
2691 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
2694 if (particle->Pt()>0.005){
2704 if (particle->E() != TMath::Abs(particle->Pz())){
2705 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
2707 if( !(ratio <= 0) ){
2712 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
2713 alpha = TMath::Abs((daughter0->E() - daughter1->E()))/(daughter0->E() + daughter1->E());
2716 if(particle->GetPdgCode() == 111){
2725 }
else if(particle->GetPdgCode() == 221){
2742 if(particle->GetPdgCode() == 111){
2746 }
else if(particle->GetPdgCode() == 221){
2756 Int_t isMCFromMBHeader = -1;
2765 if (particle->GetMother() > -1) {
2766 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
2767 if (tmpMother->GetMother() > -1) {
2768 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
2769 if(tmpGrandMother->GetPdgCode() == 310) {
2771 }
else if (tmpGrandMother->GetPdgCode() == 130) {
2773 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
2776 if ( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
2788 if (particle->GetMother() > -1) {
2789 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
2790 if (tmpMother->GetMother() > -1) {
2791 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
2792 if(tmpGrandMother->GetPdgCode() == 310) {
2794 }
else if (tmpGrandMother->GetPdgCode() == 130) {
2796 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
2799 if ( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
2813 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
2814 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
2815 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
2816 Int_t pdgCode = mother->GetPdgCode();
2817 if(particle->GetPdgCode() == 111){
2821 }
else if(particle->GetPdgCode() == 221){
2831 if(particle->GetPdgCode() == 111){
2846 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2847 Double_t mcProdVtxX = primVtxMC->GetX();
2848 Double_t mcProdVtxY = primVtxMC->GetY();
2849 Double_t mcProdVtxZ = primVtxMC->GetZ();
2853 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
2857 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
2858 if (!particle)
continue;
2860 Int_t isMCFromMBHeader = -1;
2870 if(particle->GetMother(0) >-1){
2871 switch(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()){
2907 if (particle->Energy() != TMath::Abs(particle->Pz())){
2908 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
2910 if( !(ratio <= 0) ){
2915 if ( particle->GetPdgCode() == 211 ){
2917 }
else if ( particle->GetPdgCode() == -211 ){
2919 }
else if ( particle->GetPdgCode() == 321 ){
2921 }
else if ( particle->GetPdgCode() == -321 ){
2923 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
2925 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
2927 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
2929 }
else if ( TMath::Abs(particle->GetPdgCode()) == 223 ){
2931 }
else if ( TMath::Abs(particle->GetPdgCode()) == 333 ){
2933 }
else if ( TMath::Abs(particle->GetPdgCode()) == 113 ){
2940 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
2941 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
2945 if (particle->Pt()>0.005){
2954 if (particle->Energy() != TMath::Abs(particle->Pz())){
2955 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
2957 if( !(ratio <= 0) ){
2962 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
2963 alpha = TMath::Abs((daughter0->Energy() - daughter1->Energy()))/(daughter0->Energy() + daughter1->Energy());
2966 if(particle->GetPdgCode() == 111){
2975 }
else if(particle->GetPdgCode() == 221){
2990 if( kDaughter0IsPrim && kDaughter1IsPrim &&
2996 if(particle->GetPdgCode() == 111){
3000 }
else if(particle->GetPdgCode() == 221){
3010 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3011 if (!particle)
continue;
3013 Int_t isMCFromMBHeader = -1;
3022 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3023 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3025 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3027 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3030 if ( !(TMath::Abs(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()) == 11 &&
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 22) )
3039 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3040 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3042 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3044 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3047 if ( !(TMath::Abs(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()) == 11 &&
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 22) )
3058 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3059 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3061 if(particle->GetFirstMother()>-1) pdgCode = ((TParticle*)
fMCEvent->Particle( particle->GetFirstMother() ))->GetPdgCode();
3062 if(particle->GetPdgCode() == 111){
3066 Double_t deltaX = particle->Vx() - mcProdVtxX;
3067 Double_t deltaY = particle->Vy() - mcProdVtxY;
3068 Double_t deltaZ = particle->Vz() - mcProdVtxZ;
3069 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
3072 }
else if(particle->GetPdgCode() == 221){
3082 if(particle->GetPdgCode() == 111){
3100 if (gamma0==NULL)
continue;
3101 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fGammaCandidates->GetEntries();secondGammaIndex++){
3104 if (gamma1==NULL)
continue;
3111 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
3130 if ( pi0cand->M() > 0.05 && pi0cand->M() < 0.17){
3138 if ( pi0cand->M() > 0.45 && pi0cand->M() < 0.65){
3159 sparesFill[0] = pi0cand->M();
3160 sparesFill[1] = pi0cand->Pt();
3171 sparesFill[0] = pi0cand->M();
3172 sparesFill[1] = pi0cand->Pt();
3190 fPt = pi0cand->Pt();
3205 }
else if (
fPt > 0.299 &&
fPt < 20. ) {
3221 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3222 Double_t mcProdVtxX = primVtxMC->GetX();
3223 Double_t mcProdVtxY = primVtxMC->GetY();
3224 Double_t mcProdVtxZ = primVtxMC->GetZ();
3228 Bool_t isTruePi0 = kFALSE;
3229 Bool_t isTrueEta = kFALSE;
3230 Bool_t isTruePi0Dalitz = kFALSE;
3231 Bool_t isTrueEtaDalitz = kFALSE;
3232 Bool_t gamma0DalitzCand = kFALSE;
3233 Bool_t gamma1DalitzCand = kFALSE;
3235 Int_t gamma0MotherLabel = -1;
3236 if(gamma0MCLabel != -1){
3240 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
3241 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3242 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
3243 if(gammaMC0->GetPdgCode() == 22){
3244 gamma0MotherLabel=gammaMC0->GetFirstMother();
3247 if(gammaMC0->GetPdgCode() ==111){
3248 gamma0DalitzCand = kTRUE;
3249 gamma0MotherLabel=-111;
3251 if(gammaMC0->GetPdgCode() ==221){
3252 gamma0DalitzCand = kTRUE;
3253 gamma0MotherLabel=-221;
3259 Int_t gamma1MotherLabel = -1;
3260 if(gamma1MCLabel != -1){
3264 TParticle * gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
3265 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3266 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
3267 if(gammaMC1->GetPdgCode() == 22){
3268 gamma1MotherLabel=gammaMC1->GetFirstMother();
3271 if(gammaMC1->GetPdgCode() ==111 ){
3272 gamma1DalitzCand = kTRUE;
3273 gamma1MotherLabel=-111;
3275 if(gammaMC1->GetPdgCode() ==221){
3276 gamma1DalitzCand = kTRUE;
3277 gamma1MotherLabel=-221;
3281 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3282 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
3289 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 221){
3299 if (gamma1DalitzCand || gamma0DalitzCand){
3300 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
3301 if (gamma0MotherLabel == -111) isTruePi0Dalitz = kTRUE;
3302 if (gamma0MotherLabel == -221) isTrueEtaDalitz = kTRUE;
3304 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
3305 if (gamma1MotherLabel == -111) isTruePi0Dalitz = kTRUE;
3306 if (gamma1MotherLabel == -221) isTrueEtaDalitz = kTRUE;
3311 if(isTruePi0 || isTrueEta){
3321 if ( Pi0Candidate->M() > 0.05 && Pi0Candidate->M() < 0.17){
3329 }
else if (isTrueEta){
3330 if ( Pi0Candidate->M() > 0.45 && Pi0Candidate->M() < 0.65){
3342 if(!isPrimary && gamma1MotherLabel>-1){
3343 Long_t secMotherLabel = ((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetMother(0);
3351 if (secMotherLabel >-1){
3352 if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==310){
3357 if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==130){
3362 if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==221){
3367 if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==3122){
3377 if (((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->Pt()>0.005){
3397 }
else if(!isTruePi0 && !isTrueEta){
3399 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3406 if( isTruePi0Dalitz || isTrueEtaDalitz ){
3410 }
else if (gamma0DalitzCand || gamma1DalitzCand){
3421 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3422 Double_t mcProdVtxX = primVtxMC->GetX();
3423 Double_t mcProdVtxY = primVtxMC->GetY();
3424 Double_t mcProdVtxZ = primVtxMC->GetZ();
3427 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3428 Bool_t isTruePi0 = kFALSE;
3429 Bool_t isTrueEta = kFALSE;
3430 Bool_t isTruePi0Dalitz = kFALSE;
3431 Bool_t isTrueEtaDalitz = kFALSE;
3432 Bool_t gamma0DalitzCand = kFALSE;
3433 Bool_t gamma1DalitzCand = kFALSE;
3435 if (AODMCTrackArray!=NULL && TrueGammaCandidate0 != NULL){
3436 AliAODMCParticle *positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelPositive()));
3437 AliAODMCParticle *negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelNegative()));
3440 Int_t gamma0MCLabel = -1;
3441 Int_t gamma0MotherLabel = -1;
3442 if(!positiveMC||!negativeMC)
3445 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
3446 gamma0MCLabel = positiveMC->GetMother();
3449 if(gamma0MCLabel != -1){
3451 AliAODMCParticle * gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
3452 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3453 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
3454 if(gammaMC0->GetPdgCode() == 22){
3455 gamma0MotherLabel=gammaMC0->GetMother();
3458 if(gammaMC0->GetPdgCode() ==111){
3459 gamma0DalitzCand = kTRUE;
3460 gamma0MotherLabel=-111;
3462 if(gammaMC0->GetPdgCode() ==221){
3463 gamma0DalitzCand = kTRUE;
3464 gamma0MotherLabel=-221;
3468 positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelPositive()));
3469 negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelNegative()));
3471 Int_t gamma1MCLabel = -1;
3472 Int_t gamma1MotherLabel = -1;
3473 if(!positiveMC||!negativeMC)
3476 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
3477 gamma1MCLabel = positiveMC->GetMother();
3479 if(gamma1MCLabel != -1){
3481 AliAODMCParticle * gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
3482 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3483 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
3484 if(gammaMC1->GetPdgCode() == 22){
3485 gamma1MotherLabel=gammaMC1->GetMother();
3488 if(gammaMC1->GetPdgCode() ==111 ){
3489 gamma1DalitzCand = kTRUE;
3490 gamma1MotherLabel=-111;
3492 if(gammaMC1->GetPdgCode() ==221){
3493 gamma1DalitzCand = kTRUE;
3494 gamma1MotherLabel=-221;
3498 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3499 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 111){
3506 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 221){
3516 if (gamma1DalitzCand || gamma0DalitzCand){
3517 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
3518 if (gamma0MotherLabel == -111) isTruePi0Dalitz = kTRUE;
3519 if (gamma0MotherLabel == -221) isTrueEtaDalitz = kTRUE;
3521 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
3522 if (gamma1MotherLabel == -111) isTruePi0Dalitz = kTRUE;
3523 if (gamma1MotherLabel == -221) isTrueEtaDalitz = kTRUE;
3527 if(isTruePi0 || isTrueEta){
3537 if ( Pi0Candidate->M() > 0.05 && Pi0Candidate->M() < 0.17){
3544 }
else if (isTrueEta){
3545 if ( Pi0Candidate->M() > 0.45 && Pi0Candidate->M() < 0.65){
3557 Long_t secMotherLabel =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->GetMother();
3565 if (secMotherLabel >-1){
3566 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==310){
3571 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==130){
3576 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==221){
3581 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==3122){
3591 if (static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt()>0.005){
3603 (Pi0Candidate->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted*weightMatBudget);
3608 (Pi0Candidate->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted*weightMatBudget);
3612 }
else if(!isTruePi0 && !isTrueEta) {
3614 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3621 if( isTruePi0Dalitz || isTrueEtaDalitz ){
3625 }
else if (gamma0DalitzCand || gamma1DalitzCand){
3654 Double_t massBGprob = backgroundCandidateProb->M();
3655 if(massBGprob>0.1 && massBGprob<0.14){
3657 delete backgroundCandidateProb;
3661 delete backgroundCandidateProb;
3662 backgroundCandidateProb = 0x0;
3678 delete backgroundCandidate;
3679 backgroundCandidate = 0x0;
3695 for(
UInt_t iPrevious=0;iPrevious<previousEventV0s->size();iPrevious++){
3716 delete backgroundCandidate;
3717 backgroundCandidate = 0x0;
3724 if(previousEventV0s){
3730 for(
UInt_t iPrevious=0;iPrevious<previousEventV0s->size();iPrevious++){
3754 delete backgroundCandidate;
3755 backgroundCandidate = 0x0;
3788 if (gamma0==NULL)
continue;
3789 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fGammaCandidates->GetEntries();secondGammaIndex++){
3791 if (gamma1 == NULL)
continue;
3817 if(previousEventGammas){
3830 for(
UInt_t iPrevious=0;iPrevious<previousEventGammas->size();iPrevious++){
3857 Double_t nRadiansPM = fNDegreesPMBackground*TMath::Pi()/180;
3858 Double_t rotationValue =
fRandom.Rndm()*2*nRadiansPM + TMath::Pi()-nRadiansPM;
3859 gamma->RotateZ(rotationValue);
3865 previousEventEP=previousEventEP+TMath::Pi();
3866 thisEventEP=thisEventEP+TMath::Pi();
3867 Double_t rotationValue= thisEventEP-previousEventEP;
3868 gamma->RotateZ(rotationValue);
3900 if(pdgCode[0]==11 && pdgCode[1]==11){
3902 }
else if( (pdgCode[0]==11 && pdgCode[1]==211) || (pdgCode[0]==211 && pdgCode[1]==11) ){
3904 }
else if( (pdgCode[0]==11 && pdgCode[1]==321) || (pdgCode[0]==321 && pdgCode[1]==11) ){