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 = 100;
621 Int_t nBinsQAPt = 175;
623 Int_t nBinsClusterPt = 500;
638 for(
Int_t i=0; i<nBinsPt+1;i++){
639 if (i < 1) arrPtBinning[i] = 0.25*i;
640 else if(i<56) arrPtBinning[i] = 0.25+0.05*(i-1);
641 else if(i<126) arrPtBinning[i] = 3.+0.1*(i-56);
642 else if(i<166) arrPtBinning[i] = 10.+0.25*(i-126);
643 else if(i<186) arrPtBinning[i] = 20.+1.0*(i-166);
644 else arrPtBinning[i] = maxPt;
648 for(
Int_t i=0; i<nBinsQAPt+1;i++){
649 if(i<60) arrQAPtBinning[i] = 0.05*i;
650 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
651 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
652 else if(i<190) arrQAPtBinning[i] = 20.+1.0*(i-170);
653 else arrQAPtBinning[i] = maxQAPt;
655 nBinsClusterPt = 301;
658 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
659 if (i < 1) arrClusPtBinning[i] = 0.3*i;
660 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
661 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
662 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
663 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
664 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
665 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
666 else arrClusPtBinning[i] = maxClusterPt;
675 for(
Int_t i=0; i<nBinsPt+1;i++){
676 if (i < 1) arrPtBinning[i] = 0.10*i;
677 else if(i<59) arrPtBinning[i] = 0.10+0.05*(i-1);
678 else if(i<129) arrPtBinning[i] = 3.+0.1*(i-59);
679 else if(i<169) arrPtBinning[i] = 10.+0.25*(i-129);
680 else if(i<199) arrPtBinning[i] = 20.+1.0*(i-169);
681 else arrPtBinning[i] = maxPt;
685 for(
Int_t i=0; i<nBinsQAPt+1;i++){
686 if(i<60) arrQAPtBinning[i] = 0.05*i;
687 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
688 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
689 else if(i<200) arrQAPtBinning[i] = 20.+1.0*(i-170);
690 else arrQAPtBinning[i] = maxQAPt;
692 nBinsClusterPt = 301;
695 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
696 if (i < 1) arrClusPtBinning[i] = 0.3*i;
697 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
698 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
699 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
700 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
701 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
702 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
703 else arrClusPtBinning[i] = maxClusterPt;
710 for(
Int_t i=0; i<nBinsPt+1;i++){
711 if (i < 1) arrPtBinning[i] = 0.3*i;
712 else if(i<58) arrPtBinning[i] = 0.3+0.1*(i-1);
713 else if(i<82) arrPtBinning[i] = 6.+0.25*(i-58);
714 else if(i<90) arrPtBinning[i] = 12.+1.0*(i-82);
715 else arrPtBinning[i] = maxPt;
719 for(
Int_t i=0; i<nBinsQAPt+1;i++){
720 if(i<60) arrQAPtBinning[i] = 0.1*i;
721 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
722 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
723 else arrQAPtBinning[i] = maxQAPt;
725 nBinsClusterPt = 148;
728 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
729 if (i < 1) arrClusPtBinning[i] = 0.3*i;
730 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
731 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
732 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
733 else arrClusPtBinning[i] = maxClusterPt;
743 for(
Int_t i=0; i<=nBinsPt;i++){
744 if(i<=30) arrPtBinning[i] = 0.0 + 0.10*i;
745 else if(i<=38) arrPtBinning[i] = 3.0 + 0.25*(i-30);
746 else if(i<=48) arrPtBinning[i] = 5.0 + 0.50*(i-38);
747 else arrPtBinning[i] = 10.0 + 1.0*(i-48);
752 for(
Int_t i=0; i<=nBinsQAPt;i++){
753 if(i<=30) arrQAPtBinning[i] = 0.0 + 0.10*i;
754 else if(i<=38) arrQAPtBinning[i] = 3.0 + 0.25*(i-30);
755 else if(i<=48) arrQAPtBinning[i] = 5.0 + 0.50*(i-38);
756 else arrQAPtBinning[i] = 10.0 + 1.0*(i-48);
759 nBinsClusterPt = 148;
762 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
763 if (i < 1) arrClusPtBinning[i] = 0.3*i;
764 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
765 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
766 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
767 else arrClusPtBinning[i] = maxClusterPt;
774 for(
Int_t i=0; i<nBinsPt+1;i++){
775 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
777 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
778 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
780 for(
Int_t i=0; i<nBinsQAPt+1;i++){
781 if(i<60) arrQAPtBinning[i] = 0.05*i;
782 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
783 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
784 else if(i<175) arrQAPtBinning[i] = 20.+1*(i-170);
785 else arrQAPtBinning[i] = maxQAPt;
793 }
else if (
fIsMC == 3){
888 TString cutstringMeson =
"NoMesonCut";
893 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s_%s",cutstringEvent.Data() ,cutstringPhoton.Data(),cutstringMeson.Data()));
897 fESDList[iCut]->SetName(Form(
"%s_%s_%s ESD histograms",cutstringEvent.Data() ,cutstringPhoton.Data(),cutstringMeson.Data()));
902 fHistoNEvents[iCut] =
new TH1F(
"NEventsUnweighted",
"NEventsUnweighted", 14, -0.5, 13.5);
904 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents", 14, -0.5, 13.5);
906 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
907 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
909 TString TriggerNames =
"Not Trigger: ";
911 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
916 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
920 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problem");
921 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
922 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
923 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
924 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
932 TString TriggerNames =
"Not Trigger: ";
964 TString TriggerNames =
"Not Trigger: ";
984 fHistoNGoodESDTracks[iCut] =
new TH1F(
"GoodESDTracksUnweighted",
"GoodESDTracksUnweighted", nTracks, -0.5, nTracks-0.5);
986 fHistoVertexZ[iCut] =
new TH1F(
"VertexZUnweighted",
"VertexZUnweighted", 200, -10, 10);
996 fHistoNGoodESDTracks[iCut] =
new TH1F(
"GoodESDTracks",
"GoodESDTracks", nTracks, -0.5, nTracks-0.5);
998 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ", 200, -10, 10);
1003 fHistoCentrality[iCut] =
new TH1F(
"Centrality",
"Centrality", 100, -0.5, 99.5);
1015 fHistoNGammaCandidates[iCut] =
new TH1F(
"GammaCandidates",
"GammaCandidates", nGammaCand, -0.5, nGammaCand-0.5);
1023 fHistoSPDClusterTrackletBackground[iCut] =
new TH2F(
"SPD tracklets vs SPD clusters",
"SPD tracklets vs SPD clusters", nSPDTracklets, 0, (nSPDTracklets*2), nSPDTracklets, 0, (nSPDTracklets*4));
1038 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 30000, 0, 30000);
1040 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 2500, 0, 2500);
1042 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 1500, 0, 1500);
1045 fHistoEtaShift[iCut] =
new TProfile(
"Eta Shift",
"Eta Shift", 1, -0.5, 0.5);
1048 fHistoConvGammaPt[iCut] =
new TH1F(
"ESD_ConvGamma_Pt",
"ESD_ConvGamma_Pt", nBinsQAPt, arrQAPtBinning);
1067 fHistoCaloGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
1071 fHistoCaloGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E", nBinsClusterPt, arrClusPtBinning);
1079 fPhotonDCAList[iCut]->SetName(Form(
"%s_%s_%s Photon DCA tree", cutstringEvent.Data(), cutstringPhoton.Data(), cutstringMeson.Data()));
1099 fHistoConvGammaPsiPairPt[iCut]=
new TH2F(
"ESD_ConvGamma_PsiPair_Pt",
"ESD_ConvGamma_PsiPair_Pt", 500, 0, 5, nBinsQAPt, arrQAPtBinning);
1103 fHistoConvGammaR[iCut] =
new TH1F(
"ESD_ConvGamma_R",
"ESD_ConvGamma_R", 800, 0, 200);
1106 fHistoConvGammaEta[iCut] =
new TH1F(
"ESD_ConvGamma_Eta",
"ESD_ConvGamma_Eta", 1000, -2, 2);
1109 fHistoConvGammaPhi[iCut] =
new TH1F(
"ESD_ConvGamma_Phi",
"ESD_ConvGamma_Phi", 360, 0, 2*TMath::Pi());
1115 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
1119 fHistoMotherInvMassEalpha[iCut] =
new TH2F(
"ESD_Mother_InvMass_vs_E_alpha",
"ESD_Mother_InvMass_vs_E_alpha", 800, 0, 0.8, nBinsPt, arrPtBinning);
1130 fMesonDCAList[iCut]->SetName(Form(
"%s_%s_%s Meson DCA tree",cutstringEvent.Data() ,cutstringPhoton.Data(),cutstringMeson.Data()));
1148 fHistoMotherPi0PtY[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Y",
"ESD_MotherPi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1150 fHistoMotherEtaPtY[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Y",
"ESD_MotherEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1152 fHistoMotherPi0PtOpenAngle[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_OpenAngle",
"ESD_MotherPi0_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 100, 0, TMath::Pi());
1154 fHistoMotherEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_MotherEta_Pt_OpenAngle",
"ESD_MotherEta_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 100, 0, TMath::Pi());
1157 fHistoMotherPi0PtAlpha[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Alpha",
"ESD_MotherPi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1159 fHistoMotherEtaPtAlpha[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Alpha",
"ESD_MotherEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1168 sPtRDeltaROpenAngle[iCut] =
new THnSparseF(
"PhotonPair_Pt_R_DeltaR_OpenAngle",
"PhotonPair_Pt_R_DeltaR_OpenAngle", nDim2, nBins2, xMin2, xMax2);
1307 TString cutstringMeson =
"NoMesonCut";
1312 fMCList[iCut]->SetName(Form(
"%s_%s_%s MC histograms",cutstringEvent.Data() ,cutstringPhoton.Data(),cutstringMeson.Data()));
1313 fMCList[iCut]->SetOwner(kTRUE);
1319 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1327 fHistoMCDecayGammaPi0Pt[iCut] =
new TH1F(
"MC_DecayGammaPi0_Pt",
"MC_DecayGammaPi0_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1329 fHistoMCDecayGammaRhoPt[iCut] =
new TH1F(
"MC_DecayGammaRho_Pt",
"MC_DecayGammaRho_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1331 fHistoMCDecayGammaEtaPt[iCut] =
new TH1F(
"MC_DecayGammaEta_Pt",
"MC_DecayGammaEta_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1337 fHistoMCDecayGammaPhiPt[iCut] =
new TH1F(
"MC_DecayGammaPhi_Pt",
"MC_DecayGammaPhi_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1341 fHistoMCConvGammaPt[iCut] =
new TH1F(
"MC_ConvGamma_Pt",
"MC_ConvGamma_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1365 fHistoMCConvGammaR[iCut] =
new TH1F(
"MC_ConvGamma_R",
"MC_ConvGamma_R", 800, 0, 200);
1372 fHistoMCPi0Pt[iCut] =
new TH1F(
"MC_Pi0_Pt",
"MC_Pi0_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1375 fHistoMCPi0WOWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOWeights_Pt",
"MC_Pi0_WOWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1379 fHistoMCEtaPt[iCut] =
new TH1F(
"MC_Eta_Pt",
"MC_Eta_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1382 fHistoMCEtaWOWeightPt[iCut] =
new TH1F(
"MC_Eta_WOWeights_Pt",
"MC_Eta_WOWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1392 fHistoMCPi0InAccPt[iCut] =
new TH1F(
"MC_Pi0InAcc_Pt",
"MC_Pi0InAcc_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1395 fHistoMCEtaInAccPt[iCut] =
new TH1F(
"MC_EtaInAcc_Pt",
"MC_EtaInAcc_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1400 fHistoMCPi0WOEvtWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOEventWeights_Pt",
"MC_Pi0_WOEventWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1402 fHistoMCEtaWOEvtWeightPt[iCut] =
new TH1F(
"MC_Eta_WOEventWeights_Pt",
"MC_Eta_WOEventWeights_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1412 fHistoMCPi0PtJetPt[iCut] =
new TH2F(
"MC_Pi0_Pt_JetPt",
"MC_Pi0_Pt_JetPt", nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1415 fHistoMCEtaPtJetPt[iCut] =
new TH2F(
"MC_Eta_Pt_JetPt",
"MC_Eta_Pt_JetPt", nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1441 fHistoMCSecEtaPt[iCut] =
new TH1F(
"MC_SecEta_Pt",
"MC_SecEta_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1452 fHistoMCPi0PtAlpha[iCut] =
new TH2F(
"MC_Pi0_Pt_Alpha",
"MC_Pi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1454 fHistoMCEtaPtAlpha[iCut] =
new TH2F(
"MC_Eta_Pt_Alpha",
"MC_Eta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1458 fHistoMCPi0PtY[iCut] =
new TH2F(
"MC_Pi0_Pt_Y",
"MC_Pi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1461 fHistoMCEtaPtY[iCut] =
new TH2F(
"MC_Eta_Pt_Y",
"MC_Eta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1473 fTrueList[iCut]->SetName(Form(
"%s_%s_%s True histograms",cutstringEvent.Data() ,cutstringPhoton.Data(),cutstringMeson.Data()));
1477 fHistoTrueConvGammaPt[iCut] =
new TH1F(
"ESD_TrueConvGamma_Pt",
"ESD_TrueConvGamma_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1485 fHistoCombinatorialPt[iCut] =
new TH2F(
"ESD_TrueCombinatorial_Pt",
"ESD_TrueCombinatorial_Pt", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt, 16, -0.5, 15.5);
1521 fHistoCombinatorialMothersPt[iCut] =
new TH3F(
"ESD_TrueCombinatorialMothers_Pt",
"ESD_TrueCombinatorialMothers_Pt", 6, 0, 6, 13, 0, 13, 250, 0., 25);
1544 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());
1546 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());
1548 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());
1550 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());
1552 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());
1562 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt, (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1567 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt, (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1570 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt, (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1573 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt, (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1599 fHistoTrueConvGammaR[iCut] =
new TH1F(
"ESD_TrueConvGamma_R",
"ESD_TrueConvGamma_R", 800, 0, 200);
1604 fHistoTrueConvGammaPtMC[iCut] =
new TH1F(
"ESD_TrueConvGamma_PtMC",
"ESD_TrueConvGamma_PtMC", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1628 pESDTruePrimaryMotherWeightsInvMassPt[iCut] =
new TProfile2D(
"ESD_TruePrimaryMotherWeights_InvMass_Pt",
"ESD_TruePrimaryMotherWeights_InvMass_Pt", 800, 0, 0.8, nBinsPt, arrPtBinning);
1682 fHistoTruePi0PtY[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Y",
"ESD_TruePi0_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1684 fHistoTrueEtaPtY[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Y",
"ESD_TrueEta_Pt_Y", nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1686 fHistoTruePi0PtOpenAngle[iCut] =
new TH2F(
"ESD_TruePi0_Pt_OpenAngle",
"ESD_TruePi0_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 200, 0, 2*TMath::Pi());
1688 fHistoTrueEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_TrueEta_Pt_OpenAngle",
"ESD_TrueEta_Pt_OpenAngle", nBinsQAPt, arrQAPtBinning, 200, 0, 2*TMath::Pi());
1692 fHistoTruePi0PtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Alpha",
"ESD_TruePi0_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1694 fHistoTrueEtaPtAlpha[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Alpha",
"ESD_TrueEta_Pt_Alpha", nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1778 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
1806 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
1808 if(eventQuality == 2 || eventQuality == 3){
1832 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
1849 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
1870 if(eventNotAccepted){
1878 if(eventQuality != 0){
1932 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
1942 if (nameBin.CompareTo(
"")== 0){
1944 ->GetAcceptedHeader())->At(i))->GetString();
1946 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
2040 if(!PhotonCandidate)
continue;
2043 Float_t weightMatBudgetGamma = 1.;
2050 Int_t isPosFromMBHeader
2053 Int_t isNegFromMBHeader
2090 if (
fIsHeavyIon == 1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
2097 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
2110 GammaCandidatesStepOne->Add(PhotonCandidate);
2113 GammaCandidatesStepTwo->Add(PhotonCandidate);
2117 for(
Int_t i = 0;i<GammaCandidatesStepOne->GetEntries();i++){
2119 if(!PhotonCandidate)
continue;
2122 Float_t weightMatBudgetGamma = 1.;
2129 Int_t isPosFromMBHeader
2131 Int_t isNegFromMBHeader
2162 if (
fIsHeavyIon ==1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
2169 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
2179 }
else GammaCandidatesStepTwo->Add(PhotonCandidate);
2183 for(
Int_t i = 0;i<GammaCandidatesStepTwo->GetEntries();i++){
2185 if(!PhotonCandidate)
continue;
2188 Float_t weightMatBudgetGamma = 1.;
2194 Int_t isPosFromMBHeader
2196 Int_t isNegFromMBHeader
2226 if (
fIsHeavyIon == 1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
2233 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
2246 delete GammaCandidatesStepOne;
2247 GammaCandidatesStepOne = 0x0;
2248 delete GammaCandidatesStepTwo;
2249 GammaCandidatesStepTwo = 0x0;
2255 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2256 Double_t mcProdVtxX = primVtxMC->GetX();
2257 Double_t mcProdVtxY = primVtxMC->GetY();
2258 Double_t mcProdVtxZ = primVtxMC->GetZ();
2261 if( magField < 0.0 ){
2268 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2269 if (AODMCTrackArray != NULL && TruePhotonCandidate != NULL){
2271 AliAODMCParticle *posDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelPositive());
2272 AliAODMCParticle *negDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelNegative());
2275 if(posDaughter == NULL || negDaughter == NULL)
return;
2276 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
2278 Double_t PhiParticle[2] = {posDaughter->Phi(),negDaughter->Phi()};
2280 if(posDaughter->GetMother() != negDaughter->GetMother()){
2283 if(posDaughter->GetMother() > -1){
2284 AliAODMCParticle *Mom = (AliAODMCParticle*) AODMCTrackArray->At(posDaughter->GetMother());
2285 if(Mom->GetMother() == -1){
2288 AliAODMCParticle *GranMom = (AliAODMCParticle*) AODMCTrackArray->At(Mom->GetMother());
2289 if(GranMom->GetMother() == -1){
2292 AliAODMCParticle *GranGranMom = (AliAODMCParticle*) AODMCTrackArray->At(GranMom->GetMother());
2293 if(GranGranMom->GetMother() == -1){
2299 if(negDaughter->GetMother() > -1){
2300 AliAODMCParticle *Mom = (AliAODMCParticle*) AODMCTrackArray->At(negDaughter->GetMother());
2301 if(Mom->GetMother() == -1){
2304 AliAODMCParticle *GranMom = (AliAODMCParticle*) AODMCTrackArray->At(Mom->GetMother());
2305 if(GranMom->GetMother() == -1){
2308 AliAODMCParticle *GranGranMom = (AliAODMCParticle*) AODMCTrackArray->At(GranMom->GetMother());
2309 if(GranGranMom->GetMother() == -1){
2319 else if(posDaughter->GetMother() == -1){
2329 if(pdgCode[0]!=11 || pdgCode[1]!=11){
2333 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode()){
2338 AliAODMCParticle *Photon = (AliAODMCParticle*) AODMCTrackArray->At(posDaughter->GetMother());
2341 Double_t deltaPhi = magField * TVector2::Phi_mpi_pi( electronCandidate->Phi()-positronCandidate->Phi());
2343 if(Photon->GetPdgCode() != 22){
2349 if(((posDaughter->GetMCProcessCode())) != 5 || ((negDaughter->GetMCProcessCode())) != 5){
2356 rConv = sqrt( (posDaughter->Xv()*posDaughter->Xv()) + (posDaughter->Yv()*posDaughter->Yv()) );
2360 Float_t weightMatBudgetGamma = 1.;
2390 if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 && ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetMother() > -1 ){
2391 if (((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 310){
2396 }
else if (((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 130) {
2401 }
else if (((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 3122) {
2406 }
else if (((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 221) {
2426 if( magField < 0.0 ){
2433 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2434 Double_t mcProdVtxX = primVtxMC->GetX();
2435 Double_t mcProdVtxY = primVtxMC->GetY();
2436 Double_t mcProdVtxZ = primVtxMC->GetZ();
2444 if(posDaughter == NULL || negDaughter == NULL)
return;
2445 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
2447 Double_t PhiParticle[2] = {posDaughter->Phi(),negDaughter->Phi()};
2450 if(posDaughter->GetMother(0) != negDaughter->GetMother(0)){
2453 if(posDaughter->GetMother(0) > -1){
2454 TParticle *Mom =
fMCEvent->Particle(posDaughter->GetMother(0));
2455 if(Mom->GetMother(0) == -1){
2458 TParticle *GranMom =
fMCEvent->Particle(Mom->GetMother(0));
2459 if(GranMom->GetMother(0) == -1){
2462 TParticle *GranGranMom =
fMCEvent->Particle(GranMom->GetMother(0));
2463 if(GranGranMom->GetMother(0) == -1){
2469 if(negDaughter->GetMother(0) > -1){
2470 TParticle *Mom =
fMCEvent->Particle(negDaughter->GetMother(0));
2471 if(Mom->GetMother(0) == -1){
2474 TParticle *GranMom =
fMCEvent->Particle(Mom->GetMother(0));
2475 if(GranMom->GetMother(0) == -1){
2478 TParticle *GranGranMom =
fMCEvent->Particle(GranMom->GetMother(0));
2479 if(GranGranMom->GetMother(0) == -1){
2487 }
else if(posDaughter->GetMother(0) == -1){
2496 if(pdgCode[0]!=11 || pdgCode[1]!=11)
return;
2498 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode())
return;
2503 Double_t deltaPhi = magField * TVector2::Phi_mpi_pi( electronCandidate->Phi()-positronCandidate->Phi());
2505 if(Photon->GetPdgCode() != 22){
2510 if(posDaughter->GetUniqueID() != 5 || negDaughter->GetUniqueID() !=5)
return;
2513 Float_t weightMatBudgetGamma = 1.;
2546 if( Photon->GetMother(0) > -1 &&
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0) > -1){
2547 if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
2552 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
2557 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
2562 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 221) {
2581 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2582 Double_t mcProdVtxX = primVtxMC->GetX();
2583 Double_t mcProdVtxY = primVtxMC->GetY();
2584 Double_t mcProdVtxZ = primVtxMC->GetZ();
2586 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2588 if (AODMCTrackArray){
2590 for(
Int_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
2592 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
2593 if (!particle)
continue;
2598 Int_t isMCFromMBHeader = -1;
2608 if(particle->GetMother() >-1){
2609 switch((static_cast<AliAODMCParticle*>(AODMCTrackArray->At(particle->GetMother())))->GetPdgCode()){
2636 for(
Int_t daughterIndex=particle->GetDaughter(0);daughterIndex<=particle->GetDaughter(1);daughterIndex++){
2637 AliAODMCParticle *tmpDaughter =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(daughterIndex));
2638 if(!tmpDaughter)
continue;
2639 if(TMath::Abs(tmpDaughter->GetPdgCode()) == 11){
2640 rConv = sqrt( (tmpDaughter->Xv()*tmpDaughter->Xv()) + (tmpDaughter->Yv()*tmpDaughter->Yv()) );
2654 if (particle->E() != TMath::Abs(particle->Pz())){
2655 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
2657 if( !(ratio <= 0) ){
2662 if ( particle->GetPdgCode() == 211 ){
2664 }
else if ( particle->GetPdgCode() == -211 ){
2666 }
else if ( particle->GetPdgCode() == 321 ){
2668 }
else if ( particle->GetPdgCode() == -321 ){
2670 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
2672 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
2674 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
2676 }
else if ( TMath::Abs(particle->GetPdgCode()) == 223 ){
2678 }
else if ( TMath::Abs(particle->GetPdgCode()) == 333 ){
2680 }
else if ( TMath::Abs(particle->GetPdgCode()) == 113 ){
2686 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
2687 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
2690 if (particle->Pt()>0.005){
2700 if (particle->E() != TMath::Abs(particle->Pz())){
2701 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
2703 if( !(ratio <= 0) ){
2708 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
2709 alpha = TMath::Abs((daughter0->E() - daughter1->E()))/(daughter0->E() + daughter1->E());
2712 if(particle->GetPdgCode() == 111){
2721 }
else if(particle->GetPdgCode() == 221){
2738 if(particle->GetPdgCode() == 111){
2742 }
else if(particle->GetPdgCode() == 221){
2752 Int_t isMCFromMBHeader = -1;
2761 if (particle->GetMother() > -1) {
2762 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
2763 if (tmpMother->GetMother() > -1) {
2764 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
2765 if(tmpGrandMother->GetPdgCode() == 310) {
2767 }
else if (tmpGrandMother->GetPdgCode() == 130) {
2769 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
2772 if ( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
2784 if (particle->GetMother() > -1) {
2785 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
2786 if (tmpMother->GetMother() > -1) {
2787 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
2788 if(tmpGrandMother->GetPdgCode() == 310) {
2790 }
else if (tmpGrandMother->GetPdgCode() == 130) {
2792 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
2795 if ( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
2809 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
2810 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
2811 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
2812 Int_t pdgCode = mother->GetPdgCode();
2813 if(particle->GetPdgCode() == 111){
2817 }
else if(particle->GetPdgCode() == 221){
2827 if(particle->GetPdgCode() == 111){
2842 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2843 Double_t mcProdVtxX = primVtxMC->GetX();
2844 Double_t mcProdVtxY = primVtxMC->GetY();
2845 Double_t mcProdVtxZ = primVtxMC->GetZ();
2849 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
2853 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
2854 if (!particle)
continue;
2856 Int_t isMCFromMBHeader = -1;
2866 if(particle->GetMother(0) >-1){
2867 switch(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()){
2903 if (particle->Energy() != TMath::Abs(particle->Pz())){
2904 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
2906 if( !(ratio <= 0) ){
2911 if ( particle->GetPdgCode() == 211 ){
2913 }
else if ( particle->GetPdgCode() == -211 ){
2915 }
else if ( particle->GetPdgCode() == 321 ){
2917 }
else if ( particle->GetPdgCode() == -321 ){
2919 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
2921 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
2923 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
2925 }
else if ( TMath::Abs(particle->GetPdgCode()) == 223 ){
2927 }
else if ( TMath::Abs(particle->GetPdgCode()) == 333 ){
2929 }
else if ( TMath::Abs(particle->GetPdgCode()) == 113 ){
2936 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
2937 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
2941 if (particle->Pt()>0.005){
2950 if (particle->Energy() != TMath::Abs(particle->Pz())){
2951 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
2953 if( !(ratio <= 0) ){
2958 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
2959 alpha = TMath::Abs((daughter0->Energy() - daughter1->Energy()))/(daughter0->Energy() + daughter1->Energy());
2962 if(particle->GetPdgCode() == 111){
2971 }
else if(particle->GetPdgCode() == 221){
2986 if( kDaughter0IsPrim && kDaughter1IsPrim &&
2992 if(particle->GetPdgCode() == 111){
2996 }
else if(particle->GetPdgCode() == 221){
3006 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3007 if (!particle)
continue;
3009 Int_t isMCFromMBHeader = -1;
3018 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3019 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3021 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3023 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3026 if ( !(TMath::Abs(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()) == 11 &&
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 22) )
3035 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3036 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3038 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3040 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3043 if ( !(TMath::Abs(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()) == 11 &&
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 22) )
3054 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3055 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3057 if(particle->GetFirstMother()>-1) pdgCode = ((TParticle*)
fMCEvent->Particle( particle->GetFirstMother() ))->GetPdgCode();
3058 if(particle->GetPdgCode() == 111){
3062 Double_t deltaX = particle->Vx() - mcProdVtxX;
3063 Double_t deltaY = particle->Vy() - mcProdVtxY;
3064 Double_t deltaZ = particle->Vz() - mcProdVtxZ;
3065 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
3068 }
else if(particle->GetPdgCode() == 221){
3078 if(particle->GetPdgCode() == 111){
3096 if (gamma0==NULL)
continue;
3097 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fGammaCandidates->GetEntries();secondGammaIndex++){
3100 if (gamma1==NULL)
continue;
3107 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
3126 if ( pi0cand->M() > 0.05 && pi0cand->M() < 0.17){
3134 if ( pi0cand->M() > 0.45 && pi0cand->M() < 0.65){
3155 sparesFill[0] = pi0cand->M();
3156 sparesFill[1] = pi0cand->Pt();
3167 sparesFill[0] = pi0cand->M();
3168 sparesFill[1] = pi0cand->Pt();
3186 fPt = pi0cand->Pt();
3201 }
else if (
fPt > 0.299 &&
fPt < 20. ) {
3217 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3218 Double_t mcProdVtxX = primVtxMC->GetX();
3219 Double_t mcProdVtxY = primVtxMC->GetY();
3220 Double_t mcProdVtxZ = primVtxMC->GetZ();
3224 Bool_t isTruePi0 = kFALSE;
3225 Bool_t isTrueEta = kFALSE;
3226 Bool_t isTruePi0Dalitz = kFALSE;
3227 Bool_t isTrueEtaDalitz = kFALSE;
3228 Bool_t gamma0DalitzCand = kFALSE;
3229 Bool_t gamma1DalitzCand = kFALSE;
3231 Int_t gamma0MotherLabel = -1;
3232 if(gamma0MCLabel != -1){
3236 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
3237 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3238 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
3239 if(gammaMC0->GetPdgCode() == 22){
3240 gamma0MotherLabel=gammaMC0->GetFirstMother();
3243 if(gammaMC0->GetPdgCode() ==111){
3244 gamma0DalitzCand = kTRUE;
3245 gamma0MotherLabel=-111;
3247 if(gammaMC0->GetPdgCode() ==221){
3248 gamma0DalitzCand = kTRUE;
3249 gamma0MotherLabel=-221;
3255 Int_t gamma1MotherLabel = -1;
3256 if(gamma1MCLabel != -1){
3260 TParticle * gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
3261 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3262 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
3263 if(gammaMC1->GetPdgCode() == 22){
3264 gamma1MotherLabel=gammaMC1->GetFirstMother();
3267 if(gammaMC1->GetPdgCode() ==111 ){
3268 gamma1DalitzCand = kTRUE;
3269 gamma1MotherLabel=-111;
3271 if(gammaMC1->GetPdgCode() ==221){
3272 gamma1DalitzCand = kTRUE;
3273 gamma1MotherLabel=-221;
3277 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3278 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
3285 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 221){
3295 if (gamma1DalitzCand || gamma0DalitzCand){
3296 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
3297 if (gamma0MotherLabel == -111) isTruePi0Dalitz = kTRUE;
3298 if (gamma0MotherLabel == -221) isTrueEtaDalitz = kTRUE;
3300 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
3301 if (gamma1MotherLabel == -111) isTruePi0Dalitz = kTRUE;
3302 if (gamma1MotherLabel == -221) isTrueEtaDalitz = kTRUE;
3307 if(isTruePi0 || isTrueEta){
3317 if ( Pi0Candidate->M() > 0.05 && Pi0Candidate->M() < 0.17){
3325 }
else if (isTrueEta){
3326 if ( Pi0Candidate->M() > 0.45 && Pi0Candidate->M() < 0.65){
3338 if(!isPrimary && gamma1MotherLabel>-1){
3339 Long_t secMotherLabel = ((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetMother(0);
3347 if (secMotherLabel >-1){
3348 if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==310){
3353 if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==130){
3358 if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==221){
3363 if(
fMCEvent->Particle(secMotherLabel)->GetPdgCode()==3122){
3373 if (((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->Pt()>0.005){
3393 }
else if(!isTruePi0 && !isTrueEta){
3395 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3402 if( isTruePi0Dalitz || isTrueEtaDalitz ){
3406 }
else if (gamma0DalitzCand || gamma1DalitzCand){
3417 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3418 Double_t mcProdVtxX = primVtxMC->GetX();
3419 Double_t mcProdVtxY = primVtxMC->GetY();
3420 Double_t mcProdVtxZ = primVtxMC->GetZ();
3423 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3424 Bool_t isTruePi0 = kFALSE;
3425 Bool_t isTrueEta = kFALSE;
3426 Bool_t isTruePi0Dalitz = kFALSE;
3427 Bool_t isTrueEtaDalitz = kFALSE;
3428 Bool_t gamma0DalitzCand = kFALSE;
3429 Bool_t gamma1DalitzCand = kFALSE;
3431 if (AODMCTrackArray!=NULL && TrueGammaCandidate0 != NULL){
3432 AliAODMCParticle *positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelPositive()));
3433 AliAODMCParticle *negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelNegative()));
3436 Int_t gamma0MCLabel = -1;
3437 Int_t gamma0MotherLabel = -1;
3438 if(!positiveMC||!negativeMC)
3441 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
3442 gamma0MCLabel = positiveMC->GetMother();
3445 if(gamma0MCLabel != -1){
3447 AliAODMCParticle * gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
3448 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3449 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
3450 if(gammaMC0->GetPdgCode() == 22){
3451 gamma0MotherLabel=gammaMC0->GetMother();
3454 if(gammaMC0->GetPdgCode() ==111){
3455 gamma0DalitzCand = kTRUE;
3456 gamma0MotherLabel=-111;
3458 if(gammaMC0->GetPdgCode() ==221){
3459 gamma0DalitzCand = kTRUE;
3460 gamma0MotherLabel=-221;
3464 positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelPositive()));
3465 negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelNegative()));
3467 Int_t gamma1MCLabel = -1;
3468 Int_t gamma1MotherLabel = -1;
3469 if(!positiveMC||!negativeMC)
3472 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
3473 gamma1MCLabel = positiveMC->GetMother();
3475 if(gamma1MCLabel != -1){
3477 AliAODMCParticle * gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
3478 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3479 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
3480 if(gammaMC1->GetPdgCode() == 22){
3481 gamma1MotherLabel=gammaMC1->GetMother();
3484 if(gammaMC1->GetPdgCode() ==111 ){
3485 gamma1DalitzCand = kTRUE;
3486 gamma1MotherLabel=-111;
3488 if(gammaMC1->GetPdgCode() ==221){
3489 gamma1DalitzCand = kTRUE;
3490 gamma1MotherLabel=-221;
3494 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3495 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 111){
3502 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 221){
3512 if (gamma1DalitzCand || gamma0DalitzCand){
3513 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
3514 if (gamma0MotherLabel == -111) isTruePi0Dalitz = kTRUE;
3515 if (gamma0MotherLabel == -221) isTrueEtaDalitz = kTRUE;
3517 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
3518 if (gamma1MotherLabel == -111) isTruePi0Dalitz = kTRUE;
3519 if (gamma1MotherLabel == -221) isTrueEtaDalitz = kTRUE;
3523 if(isTruePi0 || isTrueEta){
3533 if ( Pi0Candidate->M() > 0.05 && Pi0Candidate->M() < 0.17){
3540 }
else if (isTrueEta){
3541 if ( Pi0Candidate->M() > 0.45 && Pi0Candidate->M() < 0.65){
3553 Long_t secMotherLabel =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->GetMother();
3561 if (secMotherLabel >-1){
3562 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==310){
3567 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==130){
3572 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==221){
3577 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==3122){
3587 if (static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt()>0.005){
3599 (Pi0Candidate->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted*weightMatBudget);
3604 (Pi0Candidate->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted*weightMatBudget);
3608 }
else if(!isTruePi0 && !isTrueEta) {
3610 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3617 if( isTruePi0Dalitz || isTrueEtaDalitz ){
3621 }
else if (gamma0DalitzCand || gamma1DalitzCand){
3650 Double_t massBGprob = backgroundCandidateProb->M();
3651 if(massBGprob>0.1 && massBGprob<0.14){
3653 delete backgroundCandidateProb;
3657 delete backgroundCandidateProb;
3658 backgroundCandidateProb = 0x0;
3674 delete backgroundCandidate;
3675 backgroundCandidate = 0x0;
3691 for(
UInt_t iPrevious=0;iPrevious<previousEventV0s->size();iPrevious++){
3712 delete backgroundCandidate;
3713 backgroundCandidate = 0x0;
3720 if(previousEventV0s){
3726 for(
UInt_t iPrevious=0;iPrevious<previousEventV0s->size();iPrevious++){
3750 delete backgroundCandidate;
3751 backgroundCandidate = 0x0;
3784 if (gamma0==NULL)
continue;
3785 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fGammaCandidates->GetEntries();secondGammaIndex++){
3787 if (gamma1 == NULL)
continue;
3813 if(previousEventGammas){
3826 for(
UInt_t iPrevious=0;iPrevious<previousEventGammas->size();iPrevious++){
3853 Double_t nRadiansPM = fNDegreesPMBackground*TMath::Pi()/180;
3854 Double_t rotationValue =
fRandom.Rndm()*2*nRadiansPM + TMath::Pi()-nRadiansPM;
3855 gamma->RotateZ(rotationValue);
3861 previousEventEP=previousEventEP+TMath::Pi();
3862 thisEventEP=thisEventEP+TMath::Pi();
3863 Double_t rotationValue= thisEventEP-previousEventEP;
3864 gamma->RotateZ(rotationValue);