19 #include "TParticle.h" 21 #include "TMCProcess.h" 22 #include "TDatabasePDG.h" 25 #include "TDirectory.h" 29 #include "THnSparse.h" 31 #include "AliAnalysisManager.h" 32 #include "AliESDInputHandler.h" 33 #include "AliESDtrack.h" 34 #include "AliMCEvent.h" 35 #include "AliMCEventHandler.h" 38 #include "AliESDtrackCuts.h" 39 #include "AliESDpidCuts.h" 40 #include "AliMCEvent.h" 42 #include "AliESDEvent.h" 43 #include "AliESDpid.h" 44 #include "AliKFParticle.h" 45 #include "AliMCEventHandler.h" 46 #include "AliKFVertex.h" 47 #include "AliTriggerAnalysis.h" 48 #include "AliCentrality.h" 49 #include "AliMultiplicity.h" 50 #include "AliAODEvent.h" 60 fV0ReaderName("V0ReaderV1"),
73 fSelectorNegPionIndex(0),
74 fSelectorPosPionIndex(0),
75 fGoodConvGammas(NULL),
76 fClusterCandidates(NULL),
77 fNeutralPionCandidates(NULL),
78 fNeutralPionSidebandCandidates(NULL),
79 fPosPionCandidates(NULL),
80 fNegPionCandidates(NULL),
81 fGoodVirtualParticles(NULL),
84 fClusterCutArray(NULL),
86 fNeutralPionMesonCutArray(NULL),
89 fConversionCuts(NULL),
91 fTreePiPiSameMother(NULL),
92 fTreePiPiPiSameMother(NULL),
94 fSamePiPiMotherID(-1),
95 fSamePiPiMotherInvMass(-1),
96 fSamePiPiMotherPt(-1),
97 fSamePiPiPiMotherID(-1),
98 fSamePiPiPiMotherInvMass(-1),
99 fSamePiPiPiMotherPt(-1),
100 fHistoConvGammaPt(NULL),
101 fHistoConvGammaEta(NULL),
102 fHistoClusterGammaPt(NULL),
103 fHistoClusterGammaEta(NULL),
104 fHistoNegPionPt(NULL),
105 fHistoPosPionPt(NULL),
106 fHistoNegPionPhi(NULL),
107 fHistoPosPionPhi(NULL),
108 fHistoNegPionEta(NULL),
109 fHistoPosPionEta(NULL),
110 fHistoNegPionClsTPC(NULL),
111 fHistoPosPionClsTPC(NULL),
112 fHistoPionDCAxy(NULL),
113 fHistoPionDCAz(NULL),
114 fHistoPionTPCdEdxNSigma(NULL),
115 fHistoPionTPCdEdx(NULL),
116 fHistoPionPionInvMassPt(NULL),
117 fHistoGammaGammaInvMassPt(NULL),
118 fHistoMotherInvMassPt(NULL),
119 fHistoMotherInvMassPtRejectedKinematic(NULL),
120 fHistoBackInvMassPtGroup1(NULL),
121 fHistoBackInvMassPtGroup2(NULL),
122 fHistoBackInvMassPtGroup3(NULL),
123 fHistoBackInvMassPtGroup4(NULL),
124 fHistoMotherLikeSignBackInvMassPt(NULL),
125 fHistoAngleOmegaPiPlPiMi(NULL),
126 fHistoAngleOmegaPiZero(NULL),
127 fHistoAngleOmegaPiPl(NULL),
128 fHistoAngleOmegaPiMi(NULL),
129 fHistoAnglePiPlPiMi(NULL),
130 fHistoAnglePiZeroPiMi(NULL),
131 fHistoAnglePiPlPiZero(NULL),
132 fHistoAngleSum(NULL),
133 fHistoTrueAngleSum(NULL),
134 fHistoMotherInvMassSubPi0(NULL),
135 fHistoBackInvMassPtGroup1SubPi0(NULL),
136 fHistoBackInvMassPtGroup2SubPi0(NULL),
137 fHistoBackInvMassPtGroup3SubPi0(NULL),
138 fHistoBackInvMassPtGroup4SubPi0(NULL),
139 fHistoMotherLikeSignBackInvMassSubPi0Pt(NULL),
140 fHistoMotherInvMassFixedPzPi0(NULL),
141 fHistoBackInvMassPtGroup1FixedPzPi0(NULL),
142 fHistoBackInvMassPtGroup2FixedPzPi0(NULL),
143 fHistoBackInvMassPtGroup3FixedPzPi0(NULL),
144 fHistoBackInvMassPtGroup4FixedPzPi0(NULL),
145 fHistoMotherLikeSignBackInvMassFixedPzPi0Pt(NULL),
146 fHistoMCAllGammaPt(NULL),
147 fHistoMCConvGammaPt(NULL),
148 fHistoMCAllPosPionsPt(NULL),
149 fHistoMCAllNegPionsPt(NULL),
150 fHistoMCGammaFromNeutralMesonPt(NULL),
151 fHistoMCPosPionsFromNeutralMesonPt(NULL),
152 fHistoMCNegPionsFromNeutralMesonPt(NULL),
153 fHistoMCEtaPiPlPiMiPiZeroPt(NULL),
154 fHistoMCEtaPiPlPiMiPiZeroInAccPt(NULL),
155 fHistoMCOmegaPiPlPiMiPiZeroPt(NULL),
156 fHistoMCOmegaPiPlPiMiPiZeroInAccPt(NULL),
157 fHistoTrueMotherPiPlPiMiPiZeroInvMassPt(NULL),
158 fHistoTrueMotherOmegaPiPlPiMiPiZeroInvMassPt(NULL),
159 fHistoTrueMotherEtaPiPlPiMiPiZeroInvMassPt(NULL),
160 fHistoTrueMotherGammaGammaInvMassPt(NULL),
161 fHistoTrueMotherGammaGammaFromEtaInvMassPt(NULL),
162 fHistoTrueMotherGammaGammaFromOmegaInvMassPt(NULL),
163 fHistoTrueConvGammaPt(NULL),
164 fHistoTrueConvGammaFromNeutralMesonPt(NULL),
165 fHistoTrueClusterGammaPt(NULL),
166 fHistoTrueClusterGammaFromNeutralMesonPt(NULL),
167 fHistoTruePosPionPt(NULL),
168 fHistoTruePosPionFromNeutralMesonPt(NULL),
169 fHistoTrueNegPionPt(NULL),
170 fHistoTrueNegPionFromNeutralMesonPt(NULL),
171 fHistoTruePionPionInvMassPt(NULL),
172 fHistoTruePionPionFromSameMotherInvMassPt(NULL),
173 fHistoTruePionPionFromEtaInvMassPt(NULL),
174 fHistoTruePionPionFromOmegaInvMassPt(NULL),
175 fHistoTruePiPlPiMiSameMotherFromEtaInvMassPt(NULL),
176 fHistoTruePiPlPiMiSameMotherFromOmegaInvMassPt(NULL),
177 fHistoTruePiPlPiMiSameMotherFromRhoInvMassPt(NULL),
178 fHistoTruePiPlPiMiSameMotherFromEtaPrimeInvMassPt(NULL),
179 fHistoTruePiPlPiMiSameMotherFromK0sInvMassPt(NULL),
180 fHistoTruePiPlPiMiSameMotherFromK0lInvMassPt(NULL),
181 fHistoTruePiMiPiZeroSameMotherFromEtaInvMassPt(NULL),
182 fHistoTruePiMiPiZeroSameMotherFromOmegaInvMassPt(NULL),
183 fHistoTruePiMiPiZeroSameMotherFromRhoInvMassPt(NULL),
184 fHistoTruePiMiPiZeroSameMotherFromK0lInvMassPt(NULL),
185 fHistoTruePiPlPiZeroSameMotherFromEtaInvMassPt(NULL),
186 fHistoTruePiPlPiZeroSameMotherFromOmegaInvMassPt(NULL),
187 fHistoTruePiPlPiZeroSameMotherFromRhoInvMassPt(NULL),
188 fHistoTruePiPlPiZeroSameMotherFromK0lInvMassPt(NULL),
189 fHistoTruePiPlPiMiPiZeroPureCombinatoricalInvMassPt(NULL),
190 fHistoTruePiPlPiMiPiZeroContaminationInvMassPt(NULL),
191 fHistoDoubleCountTruePi0InvMassPt(NULL),
192 fHistoDoubleCountTrueEtaInvMassPt(NULL),
193 fHistoDoubleCountTrueOmegaInvMassPt(NULL),
194 fHistoDoubleCountTrueConvGammaRPt(NULL),
195 fVectorDoubleCountTruePi0s(0),
196 fVectorDoubleCountTrueEtas(0),
197 fVectorDoubleCountTrueOmegas(0),
198 fVectorDoubleCountTrueConvGammas(0),
200 fHistoNGoodESDTracks(NULL),
201 fProfileEtaShift(NULL),
202 fHistoSPDClusterTrackletBackground(NULL),
206 fNumberOfESDTracks(0),
207 fMoveParticleAccordingToVertex(kFALSE),
209 fDoMesonAnalysis(kTRUE),
211 fIsFromMBHeader(kTRUE),
213 fDoLightOutput(kFALSE),
216 fNeutralPionPtMin(0.)
225 fV0ReaderName(
"V0ReaderV1"),
227 fBGHandlerPiPl(NULL),
228 fBGHandlerPiMi(NULL),
238 fSelectorNegPionIndex(0),
239 fSelectorPosPionIndex(0),
240 fGoodConvGammas(NULL),
241 fClusterCandidates(NULL),
242 fNeutralPionCandidates(NULL),
243 fNeutralPionSidebandCandidates(NULL),
244 fPosPionCandidates(NULL),
245 fNegPionCandidates(NULL),
246 fGoodVirtualParticles(NULL),
247 fEventCutArray(NULL),
248 fGammaCutArray(NULL),
249 fClusterCutArray(NULL),
251 fNeutralPionMesonCutArray(NULL),
252 fMesonCutArray(NULL),
254 fConversionCuts(NULL),
256 fTreePiPiSameMother(NULL),
257 fTreePiPiPiSameMother(NULL),
259 fSamePiPiMotherID(-1),
260 fSamePiPiMotherInvMass(-1),
261 fSamePiPiMotherPt(-1),
262 fSamePiPiPiMotherID(-1),
263 fSamePiPiPiMotherInvMass(-1),
264 fSamePiPiPiMotherPt(-1),
265 fHistoConvGammaPt(NULL),
266 fHistoConvGammaEta(NULL),
267 fHistoClusterGammaPt(NULL),
268 fHistoClusterGammaEta(NULL),
269 fHistoNegPionPt(NULL),
270 fHistoPosPionPt(NULL),
271 fHistoNegPionPhi(NULL),
272 fHistoPosPionPhi(NULL),
273 fHistoNegPionEta(NULL),
274 fHistoPosPionEta(NULL),
275 fHistoNegPionClsTPC(NULL),
276 fHistoPosPionClsTPC(NULL),
277 fHistoPionDCAxy(NULL),
278 fHistoPionDCAz(NULL),
279 fHistoPionTPCdEdxNSigma(NULL),
280 fHistoPionTPCdEdx(NULL),
281 fHistoPionPionInvMassPt(NULL),
282 fHistoGammaGammaInvMassPt(NULL),
283 fHistoMotherInvMassPt(NULL),
284 fHistoMotherInvMassPtRejectedKinematic(NULL),
285 fHistoBackInvMassPtGroup1(NULL),
286 fHistoBackInvMassPtGroup2(NULL),
287 fHistoBackInvMassPtGroup3(NULL),
288 fHistoBackInvMassPtGroup4(NULL),
289 fHistoMotherLikeSignBackInvMassPt(NULL),
290 fHistoAngleOmegaPiPlPiMi(NULL),
291 fHistoAngleOmegaPiZero(NULL),
292 fHistoAngleOmegaPiPl(NULL),
293 fHistoAngleOmegaPiMi(NULL),
294 fHistoAnglePiPlPiMi(NULL),
295 fHistoAnglePiZeroPiMi(NULL),
296 fHistoAnglePiPlPiZero(NULL),
297 fHistoAngleSum(NULL),
298 fHistoTrueAngleSum(NULL),
299 fHistoMotherInvMassSubPi0(NULL),
300 fHistoBackInvMassPtGroup1SubPi0(NULL),
301 fHistoBackInvMassPtGroup2SubPi0(NULL),
302 fHistoBackInvMassPtGroup3SubPi0(NULL),
303 fHistoBackInvMassPtGroup4SubPi0(NULL),
304 fHistoMotherLikeSignBackInvMassSubPi0Pt(NULL),
305 fHistoMotherInvMassFixedPzPi0(NULL),
306 fHistoBackInvMassPtGroup1FixedPzPi0(NULL),
307 fHistoBackInvMassPtGroup2FixedPzPi0(NULL),
308 fHistoBackInvMassPtGroup3FixedPzPi0(NULL),
309 fHistoBackInvMassPtGroup4FixedPzPi0(NULL),
310 fHistoMotherLikeSignBackInvMassFixedPzPi0Pt(NULL),
311 fHistoMCAllGammaPt(NULL),
312 fHistoMCConvGammaPt(NULL),
313 fHistoMCAllPosPionsPt(NULL),
314 fHistoMCAllNegPionsPt(NULL),
315 fHistoMCGammaFromNeutralMesonPt(NULL),
316 fHistoMCPosPionsFromNeutralMesonPt(NULL),
317 fHistoMCNegPionsFromNeutralMesonPt(NULL),
318 fHistoMCEtaPiPlPiMiPiZeroPt(NULL),
319 fHistoMCEtaPiPlPiMiPiZeroInAccPt(NULL),
320 fHistoMCOmegaPiPlPiMiPiZeroPt(NULL),
321 fHistoMCOmegaPiPlPiMiPiZeroInAccPt(NULL),
322 fHistoTrueMotherPiPlPiMiPiZeroInvMassPt(NULL),
323 fHistoTrueMotherOmegaPiPlPiMiPiZeroInvMassPt(NULL),
324 fHistoTrueMotherEtaPiPlPiMiPiZeroInvMassPt(NULL),
325 fHistoTrueMotherGammaGammaInvMassPt(NULL),
326 fHistoTrueMotherGammaGammaFromEtaInvMassPt(NULL),
327 fHistoTrueMotherGammaGammaFromOmegaInvMassPt(NULL),
328 fHistoTrueConvGammaPt(NULL),
329 fHistoTrueConvGammaFromNeutralMesonPt(NULL),
330 fHistoTrueClusterGammaPt(NULL),
331 fHistoTrueClusterGammaFromNeutralMesonPt(NULL),
332 fHistoTruePosPionPt(NULL),
333 fHistoTruePosPionFromNeutralMesonPt(NULL),
334 fHistoTrueNegPionPt(NULL),
335 fHistoTrueNegPionFromNeutralMesonPt(NULL),
336 fHistoTruePionPionInvMassPt(NULL),
337 fHistoTruePionPionFromSameMotherInvMassPt(NULL),
338 fHistoTruePionPionFromEtaInvMassPt(NULL),
339 fHistoTruePionPionFromOmegaInvMassPt(NULL),
340 fHistoTruePiPlPiMiSameMotherFromEtaInvMassPt(NULL),
341 fHistoTruePiPlPiMiSameMotherFromOmegaInvMassPt(NULL),
342 fHistoTruePiPlPiMiSameMotherFromRhoInvMassPt(NULL),
343 fHistoTruePiPlPiMiSameMotherFromEtaPrimeInvMassPt(NULL),
344 fHistoTruePiPlPiMiSameMotherFromK0sInvMassPt(NULL),
345 fHistoTruePiPlPiMiSameMotherFromK0lInvMassPt(NULL),
346 fHistoTruePiMiPiZeroSameMotherFromEtaInvMassPt(NULL),
347 fHistoTruePiMiPiZeroSameMotherFromOmegaInvMassPt(NULL),
348 fHistoTruePiMiPiZeroSameMotherFromRhoInvMassPt(NULL),
349 fHistoTruePiMiPiZeroSameMotherFromK0lInvMassPt(NULL),
350 fHistoTruePiPlPiZeroSameMotherFromEtaInvMassPt(NULL),
351 fHistoTruePiPlPiZeroSameMotherFromOmegaInvMassPt(NULL),
352 fHistoTruePiPlPiZeroSameMotherFromRhoInvMassPt(NULL),
353 fHistoTruePiPlPiZeroSameMotherFromK0lInvMassPt(NULL),
354 fHistoTruePiPlPiMiPiZeroPureCombinatoricalInvMassPt(NULL),
355 fHistoTruePiPlPiMiPiZeroContaminationInvMassPt(NULL),
356 fHistoDoubleCountTruePi0InvMassPt(NULL),
357 fHistoDoubleCountTrueEtaInvMassPt(NULL),
358 fHistoDoubleCountTrueOmegaInvMassPt(NULL),
359 fHistoDoubleCountTrueConvGammaRPt(NULL),
360 fVectorDoubleCountTruePi0s(0),
361 fVectorDoubleCountTrueEtas(0),
362 fVectorDoubleCountTrueOmegas(0),
363 fVectorDoubleCountTrueConvGammas(0),
365 fHistoNGoodESDTracks(NULL),
366 fProfileEtaShift(NULL),
367 fHistoSPDClusterTrackletBackground(NULL),
371 fNumberOfESDTracks(0),
372 fMoveParticleAccordingToVertex(kFALSE),
374 fDoMesonAnalysis(kTRUE),
376 fIsFromMBHeader(kTRUE),
378 fDoLightOutput(kFALSE),
381 fNeutralPionPtMin(0.)
383 DefineOutput(1, TList::Class());
392 cout<<
"Destructor"<<endl;
447 TString cutstringConvGamma =
"";
449 TString cutstringCaloGamma =
"";
455 if (
fNeutralPionMode == 0) fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
456 else if (
fNeutralPionMode == 1) fullCutString = Form(
"%i_%s_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
457 else if (
fNeutralPionMode == 2) fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringCaloGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
463 if(collisionSystem == 1 || collisionSystem == 2 ||
464 collisionSystem == 5 || collisionSystem == 8 ||
465 collisionSystem == 9){
466 centMin = centMin*10;
467 centMax = centMax*10;
469 else if(collisionSystem == 3 || collisionSystem == 6){
473 else if(collisionSystem == 4 || collisionSystem == 7){
474 centMin = ((centMin*5)+45);
475 centMax = ((centMax*5)+45);
498 Double_t HistoMassRange[2] = {0.4,1.0};
499 Double_t HistoMassRangeSub[2] = {0.1,1.0};
500 Double_t HistoPtRange[2] = {0.,25.};
605 TString cutstringConvGamma =
"";
608 TString cutstringCaloGamma =
"";
616 fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
618 fullCutString = Form(
"%i_%s_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
620 fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringCaloGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
621 TString nameCutFolder = Form(
"Cut Number %s", fullCutString.Data());
622 TString nameESDList = Form(
"%s ESD histograms", fullCutString.Data());
625 fCutFolder[iCut]->SetName(nameCutFolder.Data());
626 fCutFolder[iCut]->SetOwner(kTRUE);
630 fESDList[iCut]->SetName(nameESDList.Data());
635 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
636 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
639 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
643 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problem");
644 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
645 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
646 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
660 fHistoConvGammaPt[iCut] =
new TH1F(
"ESD_ConvGamma_Pt",
"ESD_ConvGamma_Pt",250,0,25);
662 fHistoConvGammaEta[iCut] =
new TH1F(
"ESD_ConvGamma_Eta",
"ESD_ConvGamma_Eta",600,-1.5,1.5);
671 fHistoNegPionPt[iCut] =
new TH1F(
"ESD_PrimaryNegPions_Pt",
"ESD_PrimaryNegPions_Pt",1000,0,25);
673 fHistoPosPionPt[iCut] =
new TH1F(
"ESD_PrimaryPosPions_Pt",
"ESD_PrimaryPosPions_Pt",1000,0,25);
675 fHistoNegPionPhi[iCut] =
new TH1F(
"ESD_PrimaryNegPions_Phi",
"ESD_PrimaryNegPions_Phi",360,0,2*TMath::Pi());
677 fHistoPosPionPhi[iCut] =
new TH1F(
"ESD_PrimaryPosPions_Phi",
"ESD_PrimaryPosPions_Phi",360,0,2*TMath::Pi());
683 fHistoNegPionEta[iCut] =
new TH1F(
"ESD_PrimaryNegPions_Eta",
"ESD_PrimaryNegPions_Eta",600,-1.5,1.5);
685 fHistoPosPionEta[iCut] =
new TH1F(
"ESD_PrimaryPosPions_Eta",
"ESD_PrimaryPosPions_Eta",600,-1.5,1.5);
687 fHistoNegPionClsTPC[iCut] =
new TH2F(
"ESD_PrimaryNegPions_ClsTPC",
"ESD_PrimaryNegPions_ClsTPC",100,0,1,400,0.,10.);
689 fHistoPosPionClsTPC[iCut] =
new TH2F(
"ESD_PrimaryPosPions_ClsTPC",
"ESD_PrimaryPosPions_ClsTPC",100,0,1,400,0.,10.);
691 fHistoPionDCAxy[iCut] =
new TH2F(
"ESD_PrimaryPions_DCAxy",
"ESD_PrimaryPions_DCAxy",800,-4.0,4.0,400,0.,10.);
693 fHistoPionDCAz[iCut] =
new TH2F(
"ESD_PrimaryPions_DCAz",
"ESD_PrimaryPions_DCAz",800,-4.0,4.0,400,0.,10.);
697 fHistoPionTPCdEdx[iCut] =
new TH2F(
"ESD_PrimaryPions_TPCdEdxSignal",
"ESD_PrimaryPions_TPCdEdxSignal" ,150,0.05,20.0,800,0.0,200);
703 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
705 fHistoMotherInvMassPtRejectedKinematic[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt_KinematicRejected",
"ESD_Mother_InvMass_Pt_KinematicRejected",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
708 fHistoBackInvMassPtGroup1[iCut] =
new TH2F(
"ESD_Background_1_InvMass_Pt",
"ESD_Background_1_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
709 fHistoBackInvMassPtGroup2[iCut] =
new TH2F(
"ESD_Background_2_InvMass_Pt",
"ESD_Background_2_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
710 fHistoBackInvMassPtGroup3[iCut] =
new TH2F(
"ESD_Background_3_InvMass_Pt",
"ESD_Background_3_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
711 fHistoBackInvMassPtGroup4[iCut] =
new TH2F(
"ESD_Background_4_InvMass_Pt",
"ESD_Background_4_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
719 fHistoMotherLikeSignBackInvMassPt[iCut] =
new TH2F(
"ESD_Background_LikeSign_InvMass_Pt",
"ESD_Background_LikeSign_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
723 fHistoMotherInvMassSubPi0[iCut] =
new TH2F(
"ESD_InvMass_Mother_Sub_InvMass(NeutralPion)_Pt",
"ESD_Mother_InvMass_Sub_InvMass(NeutralPion)_Pt",HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
727 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
729 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
731 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
733 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
742 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
746 fHistoMotherInvMassFixedPzPi0[iCut] =
new TH2F(
"ESD_InvMass_Mother_FixedPz(NeutralPion)_Pt",
"ESD_Mother_InvMass_FixedPz(NeutralPion)_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
749 fHistoBackInvMassPtGroup1FixedPzPi0[iCut] =
new TH2F(
"ESD_Background_1_InvMass_FixedPz(NeutralPion)_Pt",
"ESD_Background_1_InvMass_FixedPz(NeutralPion)_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
750 fHistoBackInvMassPtGroup2FixedPzPi0[iCut] =
new TH2F(
"ESD_Background_2_InvMass_FixedPz(NeutralPion)_Pt",
"ESD_Background_2_InvMass_FixedPz(NeutralPion)_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
751 fHistoBackInvMassPtGroup3FixedPzPi0[iCut] =
new TH2F(
"ESD_Background_3_InvMass_FixedPz(NeutralPion)_Pt",
"ESD_Background_3_InvMass_FixedPz(NeutralPion)_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
752 fHistoBackInvMassPtGroup4FixedPzPi0[iCut] =
new TH2F(
"ESD_Background_4_InvMass_FixedPz(NeutralPion)_Pt",
"ESD_Background_4_InvMass_FixedPz(NeutralPion)_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
760 fHistoMotherLikeSignBackInvMassFixedPzPi0Pt[iCut] =
new TH2F(
"ESD_Background_LikeSign_InvMass_FixedPz(NeutralPion)_Pt",
"ESD_Background_LikeSign_InvMass_FixedPz(NeutralPion)_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
765 fHistoAngleOmegaPiPlPiMi[iCut] =
new TH2F(
"ESD_Mother_AngleOmegaNegPionsPosPions_Pt",
"ESD_Mother_AngleOmegaNegPionsPosPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
767 fHistoAngleOmegaPiMi[iCut] =
new TH2F(
"ESD_Mother_AngleOmegaNegPions_Pt",
"ESD_Mother_AngleOmegaNegPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
769 fHistoAngleOmegaPiPl[iCut] =
new TH2F(
"ESD_Mother_AngleOmegaPosPions_Pt",
"ESD_Mother_AngleOmegaPosPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
771 fHistoAngleOmegaPiZero[iCut] =
new TH2F(
"ESD_Mother_AngleOmegaNeutralPion_Pt",
"ESD_Mother_AngleOmegaNeutralPion_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
773 fHistoAnglePiPlPiZero[iCut] =
new TH2F(
"ESD_Mother_AnglePosPionsNeutralPion_Pt",
"ESD_Mother_AnglePosPionsNeutralPion_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
775 fHistoAnglePiPlPiMi[iCut] =
new TH2F(
"ESD_Mother_AnglePosPionsNegPions_Pt",
"ESD_Mother_AnglePosPionsNegPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
777 fHistoAnglePiZeroPiMi[iCut] =
new TH2F(
"ESD_Mother_AngleNeutralPionNegPions_Pt",
"ESD_Mother_AngleNeutralPionNegPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
779 fHistoAngleSum[iCut] =
new TH2F(
"ESD_Mother_AngleSum_Pt",
"ESD_Mother_AngleSum_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],720,0,2*TMath::Pi());
784 Int_t bins = AxisAfter->GetNbins();
785 Double_t from = AxisAfter->GetXmin();
789 Double_t factor = TMath::Power(to/from, 1./bins);
790 for(
Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1];
792 AxisAfter->Set(bins, newBins);
794 AxisAfter->Set(bins, newBins);
798 fCutFolder[iCut]->Add(
fESDList[iCut]);
885 TString cutstringConvGamma =
"";
888 TString cutstringCaloGamma =
"";
896 fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),
897 cutstringMeson.Data());
899 fullCutString = Form(
"%i_%s_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(), cutstringNeutralPion.Data(),
900 cutstringPion.Data(), cutstringMeson.Data());
902 fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(), cutstringCaloGamma.Data(), cutstringNeutralPion.Data(), cutstringPion.Data(),
903 cutstringMeson.Data());
904 TString nameMCList = Form(
"%s MC histograms", fullCutString.Data());
905 TString nameTrueRecList = Form(
"%s True histograms", fullCutString.Data());
906 TString nameTrueRecTTreeList = Form(
"%s True TTrees", fullCutString.Data());
909 fMCList[iCut]->SetName(nameMCList.Data());
910 fMCList[iCut]->SetOwner(kTRUE);
914 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
917 fHistoMCConvGammaPt[iCut] =
new TH1F(
"MC_ConvGamma_Pt",
"MC_ConvGamma_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
921 fHistoMCAllPosPionsPt[iCut] =
new TH1F(
"MC_AllPosPions_Pt",
"MC_AllPosPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
923 fHistoMCAllNegPionsPt[iCut] =
new TH1F(
"MC_AllNegPions_Pt",
"MC_AllNegPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
925 fHistoMCGammaFromNeutralMesonPt[iCut] =
new TH1F(
"MC_GammaFromNeutralMeson_Pt",
"MC_GammaFromNeutralMeson_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
949 fTrueList[iCut]->SetName(nameTrueRecList.Data());
955 fHistoTrueConvGammaPt[iCut] =
new TH1F(
"ESD_TrueConvGamma_Pt",
"ESD_TrueConvGamma_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
963 fHistoTrueClusterGammaPt[iCut] =
new TH1F(
"ESD_TrueClusterGamma_Pt",
"ESD_TrueClusterGamma_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
968 fHistoTruePosPionPt[iCut] =
new TH1F(
"ESD_TruePosPion_Pt",
"ESD_TruePosPion_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
970 fHistoTrueNegPionPt[iCut] =
new TH1F(
"ESD_TrueNegPion_Pt",
"ESD_TrueNegPion_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
973 fHistoTrueNegPionFromNeutralMesonPt[iCut] =
new TH1F(
"ESD_TrueNegPionFromNeutralMeson_Pt",
"ESD_TrueNegPionFromNeutralMeson_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
975 fHistoTruePosPionFromNeutralMesonPt[iCut] =
new TH1F(
"ESD_TruePosPionFromNeutralMeson_Pt",
"ESD_TruePosPionFromNeutralMeson_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
985 fHistoTrueMotherPiPlPiMiPiZeroInvMassPt[iCut] =
new TH2F(
"ESD_TrueMotherPiPlPiMiPiZero_InvMass_Pt",
"ESD_TrueMotherPiPlPiMiPiZero_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
989 fHistoTrueMotherOmegaPiPlPiMiPiZeroInvMassPt[iCut] =
new TH2F(
"ESD_TrueMotherOmegaPiPlPiMiPiZero_InvMass_Pt",
"ESD_TrueMotherOmegaPiPlPiMiPiZero_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
990 fHistoTrueMotherEtaPiPlPiMiPiZeroInvMassPt[iCut] =
new TH2F(
"ESD_TrueMotherEtaPiPlPiMiPiZero_InvMass_Pt",
"ESD_TrueMotherEtaPiPlPiMiPiZero_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1003 fHistoTrueAngleSum[iCut] =
new TH2F(
"ESD_TrueMother_AngleSum_Pt",
"ESD_TrueMother_AngleSum_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],720,0,2*TMath::Pi());
1023 2000,0.,2.,200,0.,20.);
1083 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
1100 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
1106 if(!
fPionSelector){printf(
"Error: No PionSelector");
return;}
1164 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
1167 if(InputEvent()->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
1168 if(eventQuality == 2 || eventQuality == 3){
1176 if(!
fPionSelector){printf(
"Error: No PionSelector");
return;}
1190 Bool_t isRunningEMCALrelAna = kFALSE;
1197 if(eventNotAccepted){
1203 if(eventQuality != 0){
1212 fHistoSPDClusterTrackletBackground[iCut]->Fill(fInputEvent->GetMultiplicity()->GetNumberOfTracklets(),(fInputEvent->GetNumberOfITSClusters(0)+fInputEvent->GetNumberOfITSClusters(1)));
1289 printf(
" Eta t PiPlusPiMinus Gamma Task %s :: Eta Shift Manually Set to %f \n\n",
1312 nclus = fInputEvent->GetNumberOfCaloClusters();
1316 if(nclus == 0)
return;
1320 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
1323 for(Long_t i = 0; i < nclus; i++){
1325 AliVCluster* clus = NULL;
1326 if(fInputEvent->IsA()==AliESDEvent::Class()) clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)fInputEvent->GetCaloCluster(i));
1327 else if(fInputEvent->IsA()==AliAODEvent::Class()) clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)fInputEvent->GetCaloCluster(i));
1329 if (!clus)
continue;
1332 TLorentzVector clusterVector;
1333 clus->GetMomentum(clusterVector,vertex);
1335 TLorentzVector* tmpvec =
new TLorentzVector();
1336 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
1340 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
1347 Int_t* mclabelsCluster = clus->GetLabels();
1350 if (clus->GetNLabels()>0){
1351 for (
Int_t k =0; k< (
Int_t)clus->GetNLabels(); k++){
1386 TParticle *Photon = NULL;
1387 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
1391 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
1392 Double_t mcProdVtxX = primVtxMC->GetX();
1393 Double_t mcProdVtxY = primVtxMC->GetY();
1394 Double_t mcProdVtxZ = primVtxMC->GetZ();
1439 if(!PhotonCandidate)
continue;
1444 Int_t isPosFromMBHeader
1447 Int_t isNegFromMBHeader
1450 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
1471 GoodGammasStepOne->Add(PhotonCandidate);
1474 GoodGammasStepTwo->Add(PhotonCandidate);
1480 for(
Int_t i = 0;i<GoodGammasStepOne->GetEntries();i++){
1482 if(!PhotonCandidate)
continue;
1485 Int_t isPosFromMBHeader
1487 Int_t isNegFromMBHeader
1489 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
1502 else GoodGammasStepTwo->Add(PhotonCandidate);
1506 for(
Int_t i = 0;i<GoodGammasStepTwo->GetEntries();i++){
1508 if(!PhotonCandidate)
continue;
1511 Int_t isPosFromMBHeader
1513 Int_t isNegFromMBHeader
1515 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
1532 delete GoodGammasStepOne;
1533 GoodGammasStepOne = 0x0;
1534 delete GoodGammasStepTwo;
1535 GoodGammasStepTwo = 0x0;
1545 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
1546 Double_t mcProdVtxX = primVtxMC->GetX();
1547 Double_t mcProdVtxY = primVtxMC->GetY();
1548 Double_t mcProdVtxZ = primVtxMC->GetZ();
1551 if(posDaughter == NULL || negDaughter == NULL)
return;
1552 if(posDaughter->GetMother(0) != negDaughter->GetMother(0)){
1556 else if (posDaughter->GetMother(0) == -1){
1560 if(TMath::Abs(posDaughter->GetPdgCode())!=11 || TMath::Abs(negDaughter->GetPdgCode())!=11)
return;
1561 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode())
return;
1562 if(posDaughter->GetUniqueID() != 5 || negDaughter->GetUniqueID() !=5)
return;
1565 if(Photon->GetPdgCode() != 22)
return;
1573 if( gammaIsPrimary ){
1587 for(
Int_t firstGammaIndex=0;firstGammaIndex<
fGoodConvGammas->GetEntries()-1;firstGammaIndex++){
1589 if (gamma0==NULL)
continue;
1590 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fGoodConvGammas->GetEntries();secondGammaIndex++){
1593 if (gamma1==NULL)
continue;
1600 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
1608 if(fInputEvent->IsA()==AliESDEvent::Class())
1610 if(fInputEvent->IsA()==AliAODEvent::Class())
1646 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
1650 if (gamma0==NULL)
continue;
1653 if (firstGammaIndex == secondGammaIndex)
continue;
1655 if (gamma1==NULL)
continue;
1658 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
1699 Bool_t isTruePi0 = kFALSE;
1701 Int_t gamma0MotherLabel = -1;
1702 Int_t motherRealLabel = -1;
1704 if(gamma0MCLabel != -1){
1705 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
1709 gamma0MotherLabel=gammaMC0->GetMother(0);
1710 motherRealLabel=gammaMC0->GetFirstMother();
1712 if (TrueGammaCandidate0->
IsConversion() && gammaMC0->GetMother(0)>-1){
1713 gamma0MotherLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
1714 motherRealLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
1716 gamma0MotherLabel=gammaMC0->GetMother(0);
1717 motherRealLabel=gammaMC0->GetMother(0);
1723 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
1726 Int_t gamma1MotherLabel = -1;
1728 if(gamma1MCLabel != -1){
1730 TParticle * gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
1734 gamma1MotherLabel=gammaMC1->GetMother(0);
1736 if (TrueGammaCandidate1->
IsConversion() && gammaMC1->GetMother(0)>-1) gamma1MotherLabel=
fMCEvent->Particle(gammaMC1->GetMother(0))->GetMother(0);
1737 else gamma1MotherLabel=gammaMC1->GetMother(0);
1742 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
1743 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
1770 if(TrueGammaCandidate0->
GetV0Index()<fInputEvent->GetNumberOfV0s()){
1771 Bool_t isTruePi0 = kFALSE;
1772 Bool_t isTruePi0Dalitz = kFALSE;
1773 Bool_t gamma0DalitzCand = kFALSE;
1774 Bool_t gamma1DalitzCand = kFALSE;
1776 Int_t gamma0MotherLabel = -1;
1777 Int_t motherRealLabel = -1;
1778 if(gamma0MCLabel != -1){
1782 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
1783 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
1784 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
1785 if(gammaMC0->GetPdgCode() == 22){
1786 gamma0MotherLabel=gammaMC0->GetFirstMother();
1787 motherRealLabel=gammaMC0->GetFirstMother();
1790 if(gammaMC0->GetPdgCode() ==111){
1791 gamma0DalitzCand = kTRUE;
1792 gamma0MotherLabel=-111;
1793 motherRealLabel=gamma0MCLabel;
1797 if(TrueGammaCandidate1->
GetV0Index()<fInputEvent->GetNumberOfV0s()){
1799 Int_t gamma1MotherLabel = -1;
1800 if(gamma1MCLabel != -1){
1804 TParticle * gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
1805 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
1806 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
1807 if(gammaMC1->GetPdgCode() == 22){
1808 gamma1MotherLabel=gammaMC1->GetFirstMother();
1811 if(gammaMC1->GetPdgCode() ==111 ){
1812 gamma1DalitzCand = kTRUE;
1813 gamma1MotherLabel=-111;
1817 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
1818 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
1825 if (gamma1DalitzCand || gamma0DalitzCand){
1826 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
1827 if (gamma0MotherLabel == -111) isTruePi0Dalitz = kTRUE;
1829 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
1830 if (gamma1MotherLabel == -111) isTruePi0Dalitz = kTRUE;
1835 if(isTruePi0 || isTruePi0Dalitz){
1857 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
1858 Bool_t isTruePi0 = kFALSE;
1859 Bool_t isTruePi0Dalitz = kFALSE;
1860 Bool_t gamma0DalitzCand = kFALSE;
1861 Bool_t gamma1DalitzCand = kFALSE;
1862 Int_t motherRealLabel = -1;
1864 if (AODMCTrackArray!=NULL && TrueGammaCandidate0 != NULL){
1865 AliAODMCParticle *positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelPositive()));
1866 AliAODMCParticle *negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelNegative()));
1868 Int_t gamma0MCLabel = -1;
1869 Int_t gamma0MotherLabel = -1;
1870 if(!positiveMC||!negativeMC)
1873 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
1874 gamma0MCLabel = positiveMC->GetMother();
1877 if(gamma0MCLabel != -1){
1879 AliAODMCParticle * gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
1880 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
1881 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
1882 if(gammaMC0->GetPdgCode() == 22){
1883 gamma0MotherLabel=gammaMC0->GetMother();
1884 motherRealLabel=gammaMC0->GetMother();
1887 if(gammaMC0->GetPdgCode() ==111){
1888 gamma0DalitzCand = kTRUE;
1889 gamma0MotherLabel=-111;
1890 motherRealLabel=gamma0MCLabel;
1894 positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelPositive()));
1895 negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelNegative()));
1897 Int_t gamma1MCLabel = -1;
1898 Int_t gamma1MotherLabel = -1;
1899 if(!positiveMC||!negativeMC)
1902 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
1903 gamma1MCLabel = positiveMC->GetMother();
1905 if(gamma1MCLabel != -1){
1907 AliAODMCParticle * gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
1908 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
1909 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
1910 if(gammaMC1->GetPdgCode() == 22){
1911 gamma1MotherLabel=gammaMC1->GetMother();
1914 if(gammaMC1->GetPdgCode() ==111 ){
1915 gamma1DalitzCand = kTRUE;
1916 gamma1MotherLabel=-111;
1920 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
1921 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 111){
1928 if (gamma1DalitzCand || gamma0DalitzCand){
1929 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
1930 if (gamma0MotherLabel == -111) isTruePi0Dalitz = kTRUE;
1932 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
1933 if (gamma1MotherLabel == -111) isTruePi0Dalitz = kTRUE;
1937 if(isTruePi0 || isTruePi0Dalitz){
1962 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
1966 if (gamma0==NULL)
continue;
1971 if (gamma1==NULL)
continue;
1974 AliVCluster* cluster = fInputEvent->GetCaloCluster(gamma1->
GetCaloClusterRef());
1979 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
2023 if(TrueGammaCandidate0->
GetV0Index()<fInputEvent->GetNumberOfV0s()){
2024 Bool_t isTruePi0 = kFALSE;
2025 Bool_t isTruePi0Dalitz = kFALSE;
2026 Bool_t gamma0DalitzCand = kFALSE;
2029 Int_t gamma0MotherLabel = -1;
2030 Int_t motherRealLabel = -1;
2031 if(gamma0MCLabel != -1){
2035 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
2036 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
2037 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
2038 if(gammaMC0->GetPdgCode() == 22){
2039 gamma0MotherLabel=gammaMC0->GetFirstMother();
2040 motherRealLabel=gammaMC0->GetFirstMother();
2043 if(gammaMC0->GetPdgCode() ==111){
2044 gamma0DalitzCand = kTRUE;
2045 gamma0MotherLabel=-111;
2046 motherRealLabel=gamma0MCLabel;
2052 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
2055 Int_t gamma1MotherLabel = -1;
2058 if(gamma1MCLabel != -1){
2060 TParticle * gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
2064 gamma1MotherLabel=gammaMC1->GetMother(0);
2066 if (TrueGammaCandidate1->
IsConversion() && gammaMC1->GetMother(0)>-1) gamma1MotherLabel=
fMCEvent->Particle(gammaMC1->GetMother(0))->GetMother(0);
2067 else gamma1MotherLabel=gammaMC1->GetMother(0);
2072 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
2073 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
2079 if (gamma0DalitzCand ){
2080 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
2081 if (gamma0MotherLabel == -111) isTruePi0Dalitz = kTRUE;
2085 if(isTruePi0 || isTruePi0Dalitz ){
2106 Double_t magField = fInputEvent->GetMagneticField();
2107 if( magField < 0.0 ){
2113 vector<Int_t> lGoodNegPionIndexPrev(0);
2114 vector<Int_t> lGoodPosPionIndexPrev(0);
2121 TLorentzVector *negPionforHandler =
new TLorentzVector();
2122 negPionforHandler->SetPxPyPzE(negPionCandidate->Px(), negPionCandidate->Py(), negPionCandidate->Pz(), negPionCandidate->E());
2125 delete negPionforHandler;
2134 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2135 Double_t mcProdVtxX = primVtxMC->GetX();
2136 Double_t mcProdVtxY = primVtxMC->GetY();
2137 Double_t mcProdVtxZ = primVtxMC->GetZ();
2139 Int_t labelNegPion = TMath::Abs( negPionCandidate->GetLabel() );
2141 if( labelNegPion>-1 && labelNegPion < fMCEvent->GetNumberOfTracks() ){
2142 TParticle* negPion =
fMCEvent->Particle(labelNegPion);
2143 if( negPion->GetPdgCode() == -211 ){
2146 if( negPionIsPrimary ){
2150 if( negPionIsPrimary ) {
2165 TLorentzVector *posPionforHandler =
new TLorentzVector();
2166 posPionforHandler->SetPxPyPzE(posPionCandidate->Px(), posPionCandidate->Py(), posPionCandidate->Pz(), posPionCandidate->E());
2169 delete posPionforHandler;
2177 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2178 Double_t mcProdVtxX = primVtxMC->GetX();
2179 Double_t mcProdVtxY = primVtxMC->GetY();
2180 Double_t mcProdVtxZ = primVtxMC->GetZ();
2182 Int_t labelPosPion = TMath::Abs( posPionCandidate->GetLabel() );
2184 if( labelPosPion>-1 && labelPosPion < fMCEvent->GetNumberOfTracks() ) {
2185 TParticle* posPion =
fMCEvent->Particle(labelPosPion);
2186 if( posPion->GetPdgCode() == 211 ){
2188 if( posPionIsPrimary ){
2192 if(posPionIsPrimary){
2203 for(
UInt_t i = 0; i < lGoodNegPionIndexPrev.size(); i++){
2204 AliESDtrack *negPionCandidate =
fESDEvent->GetTrack(lGoodNegPionIndexPrev[i]);
2205 AliKFParticle negPionCandidateKF( *negPionCandidate->GetConstrainedParam(), 211 );
2207 for(
UInt_t j = 0; j < lGoodPosPionIndexPrev.size(); j++){
2208 AliESDtrack *posPionCandidate =
fESDEvent->GetTrack(lGoodPosPionIndexPrev[j]);
2209 AliKFParticle posPionCandidateKF( *posPionCandidate->GetConstrainedParam(), 211 );
2213 AliKFVertex primaryVertexImproved(*fInputEvent->GetPrimaryVertex());
2215 virtualPhoton->SetProductionVertex(primaryVertexImproved);
2216 virtualPhoton->SetTrackLabels( lGoodPosPionIndexPrev[j], lGoodNegPionIndexPrev[i]);
2220 Int_t motherlabelp = 0;
2221 Int_t motherlabeln = 0;
2222 TParticle *fNegativeMCParticle =NULL;
2223 TParticle *fPositiveMCParticle =NULL;
2225 labeln=TMath::Abs(negPionCandidate->GetLabel());
2226 labelp=TMath::Abs(posPionCandidate->GetLabel());
2227 if(labeln>-1) fNegativeMCParticle =
fMCEvent->Particle(labeln);
2228 if(labelp>-1) fPositiveMCParticle =
fMCEvent->Particle(labelp);
2230 if (fNegativeMCParticle == NULL || fPositiveMCParticle == NULL)
return;
2232 motherlabeln = fNegativeMCParticle->GetMother(0);
2233 motherlabelp = fPositiveMCParticle->GetMother(0);
2234 virtualPhoton->SetMCLabelPositive(labelp);
2235 virtualPhoton->SetMCLabelNegative(labeln);
2242 if (fPositiveMCParticle && fNegativeMCParticle ) {
2245 if(TMath::Abs(fNegativeMCParticle->GetPdgCode())==211 && TMath::Abs(fPositiveMCParticle->GetPdgCode())==211){
2247 if (motherlabeln == motherlabelp){
2259 if(TMath::Abs(fNegativeMCParticle->GetPdgCode())==211 && TMath::Abs(fPositiveMCParticle->GetPdgCode())==211){
2261 if (motherlabeln == motherlabelp){
2296 Float_t dcaToVertexXYPos = -1.0;
2297 Float_t dcaToVertexZPos = -1.0;
2298 Float_t dcaToVertexXYNeg = -1.0;
2299 Float_t dcaToVertexZNeg = -1.0;
2307 posPionCandidate->GetImpactParameters(bPos,bCovPos);
2308 if (bCovPos[0]<=0 || bCovPos[2]<=0) {
2309 AliDebug(1,
"Estimated b resolution lower or equal zero!");
2310 bCovPos[0]=0; bCovPos[2]=0;
2315 posPionCandidate->GetImpactParameters(bNeg,bCovNeg);
2316 if (bCovNeg[0]<=0 || bCovNeg[2]<=0) {
2317 AliDebug(1,
"Estimated b resolution lower or equal zero!");
2318 bCovNeg[0]=0; bCovNeg[2]=0;
2321 dcaToVertexXYPos = bPos[0];
2322 dcaToVertexZPos = bPos[1];
2323 dcaToVertexXYNeg = bNeg[0];
2324 dcaToVertexZNeg = bNeg[1];
2346 delete virtualPhoton;
2356 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2357 Double_t mcProdVtxX = primVtxMC->GetX();
2358 Double_t mcProdVtxY = primVtxMC->GetY();
2359 Double_t mcProdVtxZ = primVtxMC->GetZ();
2364 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
2365 if (!particle)
continue;
2367 Int_t isMCFromMBHeader = -1;
2380 if(particle->GetMother(0) >-1){
2381 if (
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==111){
2382 if (
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1){
2383 if (
fMCEvent->Particle((
fMCEvent->Particle(particle->GetMother(0)))->GetMother(0))->GetPdgCode() == 221 ||
2384 fMCEvent->Particle((
fMCEvent->Particle(particle->GetMother(0)))->GetMother(0))->GetPdgCode() == 223 ){
2385 if (
fMCEvent->Particle(particle->GetMother(0))->GetNDaughters()==3 )
2395 if(particle->GetMother(0) >-1){
2396 if (
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==111){
2397 if (
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1){
2398 if (
fMCEvent->Particle((
fMCEvent->Particle(particle->GetMother(0)))->GetMother(0))->GetPdgCode() == 221 ||
2399 fMCEvent->Particle((
fMCEvent->Particle(particle->GetMother(0)))->GetMother(0))->GetPdgCode() == 223 ){
2400 if (
fMCEvent->Particle(particle->GetMother(0))->GetNDaughters()==3 )
2414 if( particle->GetPdgCode() == 211){
2416 if(particle->GetMother(0) >-1){
2417 if (
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==221 ||
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==223)
2421 if( particle->GetPdgCode() == -211){
2423 if(particle->GetMother(0) >-1){
2424 if (
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==221 ||
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==223 )
2432 Int_t labelNeutPion = -1;
2433 Int_t labelNegPion = -1;
2434 Int_t labelPosPion = -1;
2440 if (particle->Pt()>0.005){
2448 if(labelNeutPion>-1){
2449 TParticle *neutPion =
fMCEvent->Particle(labelNeutPion);
2450 if(neutPion->GetDaughter(0)>-1 && neutPion->GetDaughter(1)>-1){
2451 TParticle *gamma1 =
fMCEvent->Particle(neutPion->GetDaughter(0));
2452 TParticle *gamma2 =
fMCEvent->Particle(neutPion->GetDaughter(1));
2459 if( kDaughter0IsPrim && kDaughter1IsPrim && kNegPionIsPrim && kPosPionIsPrim &&
2469 if( kDaughter0IsPrim && kDaughter1IsPrim && kNegPionIsPrim && kPosPionIsPrim &&
2495 if (neutralPion==NULL)
continue;
2503 if (vParticle==NULL)
continue;
2507 mesoncand->
SetLabels(mesonIndex,virtualParticleIndex);
2511 if(negPionCandidatetmp==NULL){
delete mesoncand;
continue;}
2513 NegPiontmp->SetPxPyPzE(negPionCandidatetmp->Px(), negPionCandidatetmp->Py(), negPionCandidatetmp->Pz(), negPionCandidatetmp->E());
2516 if(posPionCandidatetmp==NULL){
delete NegPiontmp;
delete mesoncand;
continue;}
2518 PosPiontmp->SetPxPyPzE(posPionCandidatetmp->Px(), posPionCandidatetmp->Py(), posPionCandidatetmp->Pz(), posPionCandidatetmp->E());
2520 if(
KinematicCut(NegPiontmp, PosPiontmp, neutralPion, mesoncand)){
2529 fHistoAngleSum[
fiCut]->Fill(mesoncand->Pt(),((PosPiontmp->Angle(mesoncand->Vect()))+(NegPiontmp->Angle(PosPiontmp->Vect()))+(PosPiontmp->Angle(neutralPion->Vect()))));
2536 Pi0tmp->SetPxPyPzE(neutralPion->Px(), neutralPion->Py(), neutralPion->Pz(), neutralPion->Energy());
2589 Int_t NPi0Candidates = 0;
2596 for(
Int_t iCurrentPi0=0; iCurrentPi0<NPi0Candidates; iCurrentPi0++){
2619 if((EventPiMiMeson && EventPiPlMeson) == kFALSE)
continue;
2627 for(
UInt_t iCurrentPiPl = 0; iCurrentPiPl<EventPiPlMeson->size();iCurrentPiPl++){
2638 for(
UInt_t iCurrentPiMi = 0; iCurrentPiMi<EventPiMiMeson->size();iCurrentPiMi++){
2650 delete backPiPlPiMiCandidate;
2651 backPiPlPiMiCandidate = 0x0;
2654 delete backPiPlPiMiCandidate;
2655 backPiPlPiMiCandidate = 0x0;
2664 if(
KinematicCut(&EventPiMiGoodMeson, &EventPiPlGoodMeson,EventPiZeroGoodMeson,PiPlPiMiPiZeroBackgroundCandidate)){
2667 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
2672 if (nEventsInBGMi != nEventsInBGPl){
2679 }
else if(nEventsInBGMi==nEventsInBGPl){
2687 delete PiMiPiZerotmp;
2688 delete PiPlPiMiPiZerotmp;
2690 delete PiPlPiMiPiZeroBackgroundCandidate;
2691 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
2694 if(PiPlPiMiPiZeroBackgroundCandidate!=0x0){
2695 delete PiPlPiMiPiZeroBackgroundCandidate;
2696 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
2699 if(PiPlPiZeroBackgroundCandidate!=0x0){
2700 delete PiPlPiZeroBackgroundCandidate;
2701 PiPlPiZeroBackgroundCandidate = 0x0;
2717 for(
UInt_t iCurrentPiPl = 0; iCurrentPiPl<EventPiPlMeson->size();iCurrentPiPl++){
2734 delete backPiPlPiMiCandidate;
2735 backPiPlPiMiCandidate = 0x0;
2738 delete backPiPlPiMiCandidate;
2739 backPiPlPiMiCandidate = 0x0;
2749 if(
KinematicCut(&EventPiNegGoodMeson, &EventPiPlGoodMeson, EventPiZeroGoodMeson,PiPlPiMiPiZeroBackgroundCandidate)){
2753 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
2764 delete PiMiPiZerotmp;
2765 delete PiPlPiMiPiZerotmp;
2767 delete PiPlPiMiPiZeroBackgroundCandidate;
2768 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
2771 if(PiPlPiMiPiZeroBackgroundCandidate!=0x0){
2772 delete PiPlPiMiPiZeroBackgroundCandidate;
2773 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
2776 if(PiPlPiZeroBackgroundCandidate!=0x0){
2777 delete PiPlPiZeroBackgroundCandidate;
2778 PiPlPiZeroBackgroundCandidate = 0x0;
2794 for(
UInt_t iCurrentPiMi = 0; iCurrentPiMi<EventPiMiMeson->size();iCurrentPiMi++){
2814 delete backPiPlPiMiCandidate;
2815 backPiPlPiMiCandidate = 0x0;
2818 delete backPiPlPiMiCandidate;
2819 backPiPlPiMiCandidate = 0x0;
2829 if(
KinematicCut(&EventPiMiGoodMeson, &EventPiPlGoodMeson, EventPiZeroGoodMeson,PiPlPiMiPiZeroBackgroundCandidate)){
2833 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
2844 delete PiMiPiZerotmp;
2845 delete PiPlPiMiPiZerotmp;
2847 delete PiPlPiMiPiZeroBackgroundCandidate;
2848 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
2851 if(PiPlPiMiPiZeroBackgroundCandidate!=0x0){
2852 delete PiPlPiMiPiZeroBackgroundCandidate;
2853 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
2856 if(PiMiPiZeroBackgroundCandidate!=0x0){
2857 delete PiMiPiZeroBackgroundCandidate;
2858 PiMiPiZeroBackgroundCandidate = 0x0;
2873 if(iCurrentPiPl!=iCurrentPiPl2){
2883 delete backPiPlPiPlCandidate;
2884 backPiPlPiPlCandidate = 0x0;
2887 delete backPiPlPiPlCandidate;
2888 backPiPlPiPlCandidate = 0x0;
2898 if(
KinematicCut(&EventPiPlGoodMeson, &EventPiPlGoodMeson2, EventPiZeroGoodMeson,PiPlPiPlPiZeroBackgroundCandidate)){
2902 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
2913 delete PiPlPiZerotmp;
2914 delete PiPlPiPlPiZerotmp;
2916 delete PiPlPiPlPiZeroBackgroundCandidate;
2917 PiPlPiPlPiZeroBackgroundCandidate = 0x0;
2933 if(iCurrentPiMi!=iCurrentPiMi2){
2943 delete backPiMiPiMiCandidate;
2944 backPiMiPiMiCandidate = 0x0;
2947 delete backPiMiPiMiCandidate;
2948 backPiMiPiMiCandidate = 0x0;
2958 if(
KinematicCut(&EventPiMiGoodMeson, &EventPiMiGoodMeson2, EventPiZeroGoodMeson,PiMiPiMiPiZeroBackgroundCandidate)){
2962 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
2973 delete PiMiPiZerotmp;
2974 delete PiMiPiMiPiZerotmp;
2976 delete PiMiPiMiPiZeroBackgroundCandidate;
2977 PiMiPiMiPiZeroBackgroundCandidate = 0x0;
2993 if((omega->Pt())<=5.){
2994 if( (omega->Angle(pospion->Vect())) < ((2.78715*(TMath::Exp(-0.589934*(omega->Pt()))+0.0519574))*
fTolerance) &&
2995 (omega->Angle(negpion->Vect())) < ((5.94216*(TMath::Exp(-0.444428*(omega->Pt()))-0.0574076))*
fTolerance) &&
2996 (omega->Angle(neutpion->Vect())) < ((2.79529*(TMath::Exp(-0.565999*(omega->Pt()))+0.0413576))*
fTolerance) &&
2997 (pospion->Angle(negpion->Vect())) < ((3.14446*(TMath::Exp(-0.666433*(omega->Pt()))+0.0964309))*
fTolerance) &&
2998 (pospion->Angle(neutpion->Vect())) < ((3.08241*(TMath::Exp(-0.650657*(omega->Pt()))+0.0997539))*
fTolerance) &&
2999 (negpion->Angle(neutpion->Vect())) < ((3.18536*(TMath::Exp(-0.752847*(omega->Pt()))+0.1262780))*
fTolerance)
3004 if( (omega->Angle(pospion->Vect())) < ((0.459270*(TMath::Exp(-0.126007*(omega->Pt()))+0.100475))*
fTolerance) &&
3005 (omega->Angle(negpion->Vect())) < ((0.521250*(TMath::Exp(-0.152532*(omega->Pt()))+0.114617))*
fTolerance) &&
3006 (omega->Angle(neutpion->Vect())) < ((0.409766*(TMath::Exp(-0.108566*(omega->Pt()))+0.103594))*
fTolerance) &&
3007 (pospion->Angle(negpion->Vect())) < ((0.709206*(TMath::Exp(-0.149072*(omega->Pt()))+0.111345))*
fTolerance) &&
3008 (pospion->Angle(neutpion->Vect())) < ((0.662184*(TMath::Exp(-0.123397*(omega->Pt()))+0.104675))*
fTolerance) &&
3009 (negpion->Angle(neutpion->Vect())) < ((0.730228*(TMath::Exp(-0.120859*(omega->Pt()))+0.105522))*
fTolerance)
3024 Bool_t isSameMotherPiPlPiMiPiZero = kFALSE;
3025 Bool_t isSameMotherPiPlPiMi = kFALSE;
3026 Bool_t isSameMotherPiPlPiZero = kFALSE;
3027 Bool_t isSameMotherPiMiPiZero = kFALSE;
3028 Bool_t isNoSameMother = kFALSE;
3029 Bool_t isNoPiPiPi = kFALSE;
3033 Int_t virtualParticleMotherLabel = -1;
3039 if ( !(trueMesonFlag == 1 && pi0MCLabel != -1)){
3045 Int_t pi0MotherLabel =
fMCEvent->Particle(pi0MCLabel)->GetMother(0);
3050 Int_t posMotherLabelMC = positiveMC->GetMother(0);
3051 Int_t negMotherLabelMC = negativeMC->GetMother(0);
3054 if((TMath::Abs(negativeMC->GetPdgCode())==211) && (TMath::Abs(positiveMC->GetPdgCode())==211) && (
fMCEvent->Particle(pi0MCLabel)->GetPdgCode()==111)){
3056 if(virtualParticleMCLabel!=-1){
3058 virtualParticleMotherLabel = virtualParticleMCLabel;
3059 if(virtualParticleMotherLabel==pi0MotherLabel){
3061 if(
fMCEvent->Particle(pi0MotherLabel)->GetStatusCode()!=21) isSameMotherPiPlPiMiPiZero = kTRUE;
3064 if(
fMCEvent->Particle(virtualParticleMotherLabel)->GetStatusCode()!=21) isSameMotherPiPlPiMi = kTRUE;
3067 if(pi0MotherLabel==negMotherLabelMC && negMotherLabelMC != -1){
3069 if(
fMCEvent->Particle(negMotherLabelMC)->GetStatusCode()!=21) isSameMotherPiMiPiZero = kTRUE;
3070 }
else if(pi0MotherLabel==posMotherLabelMC && posMotherLabelMC != -1){
3072 if(
fMCEvent->Particle(posMotherLabelMC)->GetStatusCode()!=21) isSameMotherPiPlPiZero = kTRUE;
3075 isNoSameMother = kTRUE;
3084 if(isSameMotherPiPlPiMiPiZero){
3085 if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 221){
3090 PosPiontmp->SetPxPyPzE(positiveMC->Px(), positiveMC->Py(), positiveMC->Pz(), positiveMC->Energy());
3092 NegPiontmp->SetPxPyPzE(negativeMC->Px(), negativeMC->Py(), negativeMC->Pz(), negativeMC->Energy());
3093 if(!
fDoLightOutput)
fHistoTrueAngleSum[
fiCut]->Fill(mesoncand->Pt(),((PosPiontmp->Angle(mesoncand->Vect()))+(NegPiontmp->Angle(PosPiontmp->Vect()))+(PosPiontmp->Angle(TrueNeutralPionCandidate->Vect()))));
3095 delete PosPiontmp; PosPiontmp = 0x0;
3096 delete NegPiontmp; NegPiontmp = 0x0;
3099 }
else if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 223){
3105 PosPiontmp->SetPxPyPzE(positiveMC->Px(), positiveMC->Py(), positiveMC->Pz(), positiveMC->Energy());
3107 NegPiontmp->SetPxPyPzE(negativeMC->Px(), negativeMC->Py(), negativeMC->Pz(), negativeMC->Energy());
3108 if(!
fDoLightOutput)
fHistoTrueAngleSum[
fiCut]->Fill(mesoncand->Pt(),((PosPiontmp->Angle(mesoncand->Vect()))+(NegPiontmp->Angle(PosPiontmp->Vect()))+(PosPiontmp->Angle(TrueNeutralPionCandidate->Vect()))));
3122 if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 221){
3125 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 223){
3128 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 113){
3131 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 331){
3134 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 310){
3137 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 130){
3153 if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 221){
3156 }
else if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 223){
3159 }
else if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() ==-213){
3162 }
else if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 130){
3178 if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 221){
3181 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 223){
3184 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 213) {
3187 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 130) {
3250 Double_t dx = vertex->
fX - fInputEvent->GetPrimaryVertex()->GetX();
3251 Double_t dy = vertex->
fY - fInputEvent->GetPrimaryVertex()->GetY();
3252 Double_t dz = vertex->
fZ - fInputEvent->GetPrimaryVertex()->GetZ();
3262 pi0.SetPdgCode(111);
3267 Int_t signPz = particle->Pz()<0?-1:1;
3269 Double_t pz = signPz*TMath::Sqrt(TMath::Abs(pow(PdgMass,2)-pow(energy,2)+pow(px,2)+pow(py,2)));
3270 particle->SetPxPyPzE(px,py,pz,energy);
3280 if(label<0)
return kFALSE;
3281 Int_t motherLabel =
fMCEvent->Particle( label )->GetMother(0);
3282 if( motherLabel < 0 || motherLabel >=
fMCEvent->GetNumberOfTracks() )
return kFALSE;
3284 TParticle* mother =
fMCEvent->Particle( motherLabel );
3286 if( mother->GetPdgCode() != 221 )
return kFALSE;
3297 if(label<0)
return kFALSE;
3298 Int_t motherLabel =
fMCEvent->Particle( label )->GetMother(0);
3299 if( motherLabel < 0 || motherLabel >=
fMCEvent->GetNumberOfTracks() )
return kFALSE;
3301 TParticle* mother =
fMCEvent->Particle( motherLabel );
3303 if( mother->GetPdgCode() != 223 )
return kFALSE;
3314 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
3316 if( !(fMCMother->GetPdgCode() == 221 || fMCMother->GetPdgCode() == 223) )
return kFALSE;
3319 TParticle *posPion = 0x0;
3320 TParticle *negPion = 0x0;
3321 TParticle *neutPion = 0x0;
3323 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
3324 if(index<0)
continue;
3325 TParticle* temp = (TParticle*)
fMCEvent->Particle( index );
3327 switch( temp->GetPdgCode() ) {
3339 if( posPion && negPion && neutPion)
return kTRUE;
3349 if(label<0)
return kFALSE;
3350 Int_t motherLabel =
fMCEvent->Particle( label )->GetMother(0);
3351 if( motherLabel < 0 || motherLabel >=
fMCEvent->GetNumberOfTracks() )
return kFALSE;
3353 TParticle* mother =
fMCEvent->Particle( motherLabel );
3355 if( mother->GetPdgCode() != 111 )
return kFALSE;
3357 Int_t grandMotherLabel = mother->GetMother(0);
3358 if( grandMotherLabel < 0 || grandMotherLabel >=
fMCEvent->GetNumberOfTracks() )
return kFALSE;
3359 TParticle* grandmother =
fMCEvent->Particle( grandMotherLabel );
3368 if(tobechecked > -1)
3370 vector<Int_t>::iterator it;
3371 it = find (vec.begin(), vec.end(), tobechecked);
3372 if (it != vec.end())
return true;
3374 vec.push_back(tobechecked);
TParticle * GetMCParticle(AliMCEvent *mcEvent)
Float_t fSamePiPiMotherID
Float_t fSamePiPiPiMotherID
TH2F ** fHistoTruePiPlPiMiPiZeroContaminationInvMassPt
TH1F ** fHistoTrueNegPionFromNeutralMesonPt
Int_t GetMCLabelPositive() const
void CalculateMesonCandidates()
vector< Int_t > GetReconstructedPosPionIndex()
void ProcessTrueNeutralPionCandidatesPureCalo(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
Bool_t IsPiPlPiMiPiZeroDecay(TParticle *fMCMother) const
Float_t fSamePiPiMotherInvMass
void SetCaloClusterRef(Long_t ref)
void SetLabels(Int_t label1, Int_t label2, Int_t label3=0)
Double_t fNeutralPionPtMin
TList * fNeutralPionMesonCutArray
vector< Int_t > fVectorDoubleCountTruePi0s
array of histos with double counted photons, R, pT
GammaConversionVertex * GetBGEventVertex(Int_t zbin, Int_t mbin, Int_t event)
vector< Int_t > fSelectorNegPionIndex
TH2F ** fHistoTruePiPlPiZeroSameMotherFromEtaInvMassPt
TH2F ** fHistoTruePiPlPiMiSameMotherFromEtaInvMassPt
void SetCaloPhotonMCFlags(AliMCEvent *mcEvent, Bool_t enableSort)
TH1F ** fHistoMCGammaFromNeutralMesonPt
TList * fNeutralPionCandidates
good calo gammas after selection
TH2F ** fHistoTrueMotherPiPlPiMiPiZeroInvMassPt
vector< Int_t > fVectorDoubleCountTrueOmegas
vector containing labels of validated eta
TH1F ** fHistoMCPosPionsFromNeutralMesonPt
TH2F ** fHistoTrueMotherEtaPiPlPiMiPiZeroInvMassPt
TH2F ** fHistoGammaGammaInvMassPt
TH2F ** fHistoTrueMotherGammaGammaInvMassPt
TH2F ** fHistoTruePionPionFromSameMotherInvMassPt
TH2F ** fHistoTrueMotherGammaGammaFromEtaInvMassPt
TH2F ** fHistoBackInvMassPtGroup3
TH2F ** fHistoTrueAngleSum
TH2F ** fHistoAnglePiZeroPiMi
Int_t GetNumberOfPrimaryTracks()
virtual void UserExec(Option_t *)
TH1F ** fHistoTrueConvGammaPt
Float_t fSamePiPiMotherPt
TH1F ** fHistoConvGammaEta
TH2F ** fHistoTrueMotherOmegaPiPlPiMiPiZeroInvMassPt
TH2F ** fHistoTruePiMiPiZeroSameMotherFromRhoInvMassPt
TH2F ** fHistoTruePiPlPiMiPiZeroPureCombinatoricalInvMassPt
TH1I ** fHistoNGoodESDTracks
void AddMesonEvent(TList *const eventMothers, Double_t xvalue, Double_t yvalue, Double_t zvalue, Int_t multiplicity, Double_t epvalue=-100)
TH2F ** fHistoBackInvMassPtGroup4SubPi0
TH1F ** fHistoTruePosPionPt
vector< Int_t > fVectorDoubleCountTrueEtas
vector containing labels of validated pi0
void SetProductionPoint(Double_t *point)
void SetTrueMesonValue(Int_t trueMeson)
TH2F ** fHistoTruePiPlPiZeroSameMotherFromK0lInvMassPt
TH2F ** fHistoBackInvMassPtGroup1SubPi0
void ProcessTrueMesonCandidates(AliAODConversionMother *Pi0Candidate, AliAODConversionMother *TrueNeutralPionCandidate, AliAODConversionPhoton *TrueVirtualGammaCandidate)
TParticle * GetPositiveMCDaughter(AliMCEvent *mcEvent)
Bool_t IsOmegaPiPlPiMiPiZeroDaughter(Int_t label) const
TH2F ** fHistoBackInvMassPtGroup2
void SetCaloPhotonMCLabel(Int_t i, Int_t labelCaloPhoton)
TH1F ** fHistoTruePosPionFromNeutralMesonPt
TH2F ** fHistoMotherInvMassPtRejectedKinematic
TH1F ** fHistoConvGammaPt
TList * fNeutralPionSidebandCandidates
TH2F ** fHistoBackInvMassPtGroup4FixedPzPi0
virtual void Terminate(const Option_t *)
TTree ** fTreePiPiPiSameMother
TH1F ** fHistoMCNegPionsFromNeutralMesonPt
TH1F ** fHistoMCAllGammaPt
Int_t GetTrueMesonValue() const
virtual void UserCreateOutputObjects()
Float_t fSamePiPiPiMotherPt
TList * fClusterCandidates
TParticle * GetNegativeMCDaughter(AliMCEvent *mcEvent)
TH2F ** fHistoAngleOmegaPiPlPiMi
TH1F ** fHistoClusterGammaPt
TTree ** fTreePiPiSameMother
TH2F ** fHistoTruePionPionFromEtaInvMassPt
Class handling all kinds of selection cuts for Gamma Calo analysis.
TH2F ** fHistoTruePiPlPiMiSameMotherFromEtaPrimeInvMassPt
TH2F ** fHistoAngleOmegaPiPl
void ProcessTrueCaloPhotonCandidates(AliAODConversionPhoton *TruePhotonCandidate)
TH2F ** fHistoBackInvMassPtGroup4
TH2F ** fHistoBackInvMassPtGroup2SubPi0
void FixPzToMatchPDGInvMassPi0(AliAODConversionMother *particle)
Int_t GetTrackLabelNegative() const
std::vector< AliAODConversionMother * > AliGammaConversionMotherAODVector
TH1F ** fHistoMCAllNegPionsPt
TH2F ** fHistoBackInvMassPtGroup3FixedPzPi0
TH2F ** fHistoTruePiPlPiMiSameMotherFromK0sInvMassPt
void UpdateEventByEventData()
TH1I ** fHistoNEvents
vector containing labels of validated photons
TH2F ** fHistoPionPionInvMassPt
Int_t GetTrackLabelPositive() const
void ProcessCaloPhotonCandidates()
AliConversionPhotonCuts * GetConversionCuts()
TH2F ** fHistoTruePionPionFromOmegaInvMassPt
TH2F ** fHistoTruePiMiPiZeroSameMotherFromOmegaInvMassPt
Int_t GetTrackLabel(Int_t i) const
TH1F ** fHistoMCAllPosPionsPt
TH1F ** fHistoMCOmegaPiPlPiMiPiZeroPt
TH2F ** fHistoTruePiPlPiMiSameMotherFromK0lInvMassPt
TH2F ** fHistoTruePiMiPiZeroSameMotherFromEtaInvMassPt
TH2F ** fHistoMotherLikeSignBackInvMassPt
TH2F ** fHistoAnglePiPlPiZero
TH2F ** fHistoMotherLikeSignBackInvMassFixedPzPi0Pt
Class handling all kinds of selection cuts for Gamma Conversion analysis.
TProfile ** fProfileEtaShift
void ProcessNeutralPionCandidatesPureCalo()
TList * fPosPionCandidates
TH2F ** fHistoPosPionClsTPC
virtual ~AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero()
TH2F ** fHistoBackInvMassPtGroup2FixedPzPi0
TH2F ** fHistoTruePiMiPiZeroSameMotherFromK0lInvMassPt
Int_t GetMCParticleLabel(AliMCEvent *mcEvent)
TH2F ** fHistoDoubleCountTrueConvGammaRPt
array of histos with double counted omegas, invMass, pT
TH2F ** fHistoPionTPCdEdxNSigma
Bool_t IsLargestComponentElectron()
TH2F ** fHistoTruePiPlPiZeroSameMotherFromOmegaInvMassPt
Bool_t GammaIsNeutralMesonPiPlPiMiPiZeroDaughter(Int_t label) const
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Int_t GetCaloPhotonMCLabel(Int_t i)
TH2F ** fHistoBackInvMassPtGroup3SubPi0
void ProcessConversionPhotonCandidates()
TH2F ** fHistoPionTPCdEdx
TH2F ** fHistoMotherInvMassPt
TH1F ** fHistoMCConvGammaPt
void ProcessMCParticles()
Int_t GetMCLabelNegative() const
void ProcessTrueNeutralPionCandidatesPureConversions(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
Int_t GetNBGEvents() const
Bool_t fMoveParticleAccordingToVertex
TH2F ** fHistoBackInvMassPtGroup1
Int_t GetNCaloPhotonMCLabels()
TH2F ** fHistoMotherInvMassFixedPzPi0
Int_t GetZBinIndex(Double_t z) const
TH2F ** fHistoTrueMotherGammaGammaFromOmegaInvMassPt
TH1F ** fHistoClusterGammaEta
TList * GetCaloTrackMatcherHistograms()
TH2F ** fHistoBackInvMassPtGroup1FixedPzPi0
Double_t GetProductionZ() const
Double_t GetProductionX() const
TH2F ** fHistoTruePionPionInvMassPt
void ProcessNeutralPionCandidatesPureConversions()
AliGammaConversionMotherAODVector * GetBGGoodMesons(Int_t zbin, Int_t mbin, Int_t event)
void ProcessPionCandidates()
TH2F ** fHistoAngleOmegaPiZero
void ProcessNeutralPionCandidatesMixedConvCalo()
TH1F ** fHistoMCEtaPiPlPiMiPiZeroInAccPt
vector< Int_t > fVectorDoubleCountTrueConvGammas
vector containing labels of validated omega
Class handling all kinds of selection cuts for Gamma Conversion analysis.
TH2F ** fHistoDoubleCountTrueEtaInvMassPt
array of histos with double counted pi0s, invMass, pT
void SetNCaloPhotonMCLabels(Int_t nLabels)
TClonesArray * GetReconstructedGammas() const
AliPrimaryPionCuts * GetPrimaryPionCuts()
TH2F ** fHistoDoubleCountTrueOmegaInvMassPt
array of histos with double counted etas, invMass, pT
TH2F ** fHistoMotherInvMassSubPi0
TH2F ** fHistoTruePiPlPiZeroSameMotherFromRhoInvMassPt
Bool_t KinematicCut(AliAODConversionMother *negpion, AliAODConversionMother *pospion, AliAODConversionMother *neutpion, AliAODConversionMother *omega)
TClonesArray * fReaderGammas
Class handling all kinds of selection cuts for Gamma Conversion analysis.
TH2F ** fHistoAngleOmegaPiMi
Double_t GetProductionY() const
TH1F ** fHistoTrueConvGammaFromNeutralMesonPt
vector< Int_t > fSelectorPosPionIndex
AliConvEventCuts * GetEventCuts()
AliV0ReaderV1 * fV0Reader
Int_t GetMultiplicityBinIndex(Int_t mult) const
TH1F ** fHistoTrueNegPionPt
void MoveParticleAccordingToVertex(AliAODConversionMother *particle, const AliGammaConversionAODBGHandler::GammaConversionVertex *vertex)
TH2F ** fHistoSPDClusterTrackletBackground
TH2F ** fHistoTruePiPlPiMiSameMotherFromOmegaInvMassPt
TH2F ** fHistoDoubleCountTruePi0InvMassPt
void ProcessTrueConversionPhotonCandidates(AliAODConversionPhoton *)
TH1F ** fHistoTrueClusterGammaFromNeutralMesonPt
TH1F ** fHistoTrueClusterGammaPt
void ProcessTrueNeutralPionCandidatesMixedConvCalo(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
AliPrimaryPionSelector * fPionSelector
TH2F ** fHistoTruePiPlPiMiSameMotherFromRhoInvMassPt
TH2F ** fHistoMotherLikeSignBackInvMassSubPi0Pt
Bool_t IsEtaPiPlPiMiPiZeroDaughter(Int_t label) const
vector< Int_t > GetReconstructedNegPionIndex()
TList * fGoodVirtualParticles
Long_t GetCaloClusterRef() const
TH2F ** fHistoAnglePiPlPiMi
TH1F ** fHistoMCEtaPiPlPiMiPiZeroPt
void CalculateDistanceOfClossetApproachToPrimVtx(const AliVVertex *primVertex)
Bool_t CheckVectorForDoubleCount(vector< Int_t > &vec, Int_t tobechecked)
Bool_t IsLargestComponentPhoton()
TH2F ** fHistoNegPionClsTPC
AliGammaConversionAODBGHandler ** fBGHandlerPiPl
void CalculateBackground()
Double_t GetConversionRadius() const
AliGammaConversionAODBGHandler ** fBGHandlerPiMi
void ProcessTrueNeutralPionCandidatesPureConversionsAOD(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero()
TH1F ** fHistoMCOmegaPiPlPiMiPiZeroInAccPt
TList * fNegPionCandidates
Float_t fSamePiPiPiMotherInvMass