AliPhysics  1811c8f (1811c8f)
AliAnalysisTaskEtaToPiPlPiMiGamma.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: Friederike Bock *
5  * Version 1 *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 // Analysis task for eta->pi+ +pi- gamma (pion Dalitz decay)
17 
18 #include <vector>
19 
20 #include "TParticle.h"
21 #include "TPDGCode.h"
22 #include "TMCProcess.h"
23 #include "TDatabasePDG.h"
24 #include "TList.h"
25 #include "TChain.h"
26 #include "TDirectory.h"
27 #include "TTree.h"
28 #include "TH1.h"
29 #include "TH1F.h"
30 #include "THnSparse.h"
31 #include "TH2F.h"
32 #include "AliAnalysisManager.h"
33 #include "AliESDInputHandler.h"
34 #include "AliESDtrack.h"
35 #include "AliMCEvent.h"
36 #include "AliMCEventHandler.h"
37 #include "AliPID.h"
38 #include "AliLog.h"
39 #include "AliESDtrackCuts.h"
40 #include "AliESDpidCuts.h"
41 #include "AliMCEvent.h"
42 #include "AliESDv0.h"
43 #include "AliESDEvent.h"
44 #include "AliESDpid.h"
45 #include "AliKFParticle.h"
46 #include "AliMCEventHandler.h"
47 #include "AliKFVertex.h"
48 #include "AliTriggerAnalysis.h"
49 #include "AliCentrality.h"
50 #include "AliMultiplicity.h"
52 #include <vector>
53 
54 
56 
57 //-----------------------------------------------------------------------------------------------
59  fV0Reader(NULL),
60  fV0ReaderName("V0ReaderV1"),
61  fPionSelector(NULL),
62  fBGHandler(NULL),
63  fESDEvent(NULL),
64  fMCEvent(NULL),
65  fCutFolder(NULL),
66  fESDList(NULL),
67  fBackList(NULL),
68  fMotherList(NULL),
69  fTrueList(NULL),
70  fMCList(NULL),
71  fOutputContainer(0),
72  fReaderGammas(NULL),
73  fSelectorNegPionIndex(0),
74  fSelectorPosPionIndex(0),
75  fGoodGammas(NULL),
76  fGoodVirtualParticles(NULL),
77  fEventCutArray(NULL),
78  fGammaCutArray(NULL),
79  fPionCutArray(NULL),
80  fMesonCutArray(NULL),
81  fEventCuts(NULL),
82  fConversionCuts(NULL),
83  fHistoConvGammaPt(NULL),
84  fHistoConvGammaEta(NULL),
85  fHistoNegPionPt(NULL),
86  fHistoPosPionPt(NULL),
87  fHistoNegPionPhi(NULL),
88  fHistoPosPionPhi(NULL),
89  fHistoNegPionEta(NULL),
90  fHistoPosPionEta(NULL),
91  fHistoNegPionClsTPC(NULL),
92  fHistoPosPionClsTPC(NULL),
93  fHistoPionDCAxy(NULL),
94  fHistoPionDCAz(NULL),
95  fHistoPionTPCdEdxNSigma(NULL),
96  fHistoPionTPCdEdx(NULL),
97  fHistoPionPionInvMassPt(NULL),
98  fHistoMotherInvMassPt(NULL),
99  fTHnSparseMotherInvMassPtZM(NULL),
100  fHistoMotherBackInvMassPt(NULL),
101  fTHnSparseMotherBackInvMassPtZM(NULL),
102  fHistoMCAllGammaPt(NULL),
103  fHistoMCConvGammaPt(NULL),
104  fHistoMCAllPosPionsPt(NULL),
105  fHistoMCAllNegPionsPt(NULL),
106  fHistoMCGammaFromEtaPt(NULL),
107  fHistoMCPosPionsFromEtaPt(NULL),
108  fHistoMCNegPionsFromEtaPt(NULL),
109  fHistoMCEtaPiPlPiMiGammaPt(NULL),
110  fHistoMCEtaGGPt(NULL),
111  fHistoMCEtaDalitzPt(NULL),
112  fHistoMCEtaPiPlPiMiGammaInAccPt(NULL),
113  fHistoTrueMotherPiPlPiMiGammaInvMassPt(NULL),
114  fHistoTrueMotherGammaGammaInvMassPt(NULL),
115  fHistoTrueMotherDalitzInvMassPt(NULL),
116  fHistoTrueConvGammaPt(NULL),
117  fHistoTrueConvGammaFromEtaPt(NULL),
118  fHistoTruePosPionPt(NULL),
119  fHistoTruePosPionFromEtaPt(NULL),
120  fHistoTrueNegPionPt(NULL),
121  fHistoTrueNegPionFromEtaPt(NULL),
122  fHistoTruePionPionInvMassPt(NULL),
123  fHistoTruePionPionFromEtaInvMassPt(NULL),
124  fHistoDoubleCountTrueEtaInvMassPt(NULL),
125  fHistoDoubleCountTrueConvGammaRPt(NULL),
126  fVectorDoubleCountTrueEtas(0),
127  fVectorDoubleCountTrueConvGammas(0),
128  fHistoNEvents(NULL),
129  fHistoNGoodESDTracks(NULL),
130  fProfileEtaShift(NULL),
131  fHistoSPDClusterTrackletBackground(NULL),
132  fRandom(0),
133  fnCuts(0),
134  fiCut(0),
135  fNumberOfESDTracks(0),
136  fMoveParticleAccordingToVertex(kFALSE),
137  fIsHeavyIon(kFALSE),
138  fDoMesonAnalysis(kTRUE),
139  fDoMesonQA(kFALSE),
140  fIsFromMBHeader(kTRUE),
141  fIsMC(kFALSE),
142  fIsGammaEtaCand(kFALSE)
143 {
144 
145 }
146 
147 //-----------------------------------------------------------------------------------------------
149  AliAnalysisTaskSE(name),
150  fV0Reader(NULL),
151  fV0ReaderName("V0ReaderV1"),
152  fPionSelector(NULL),
153  fBGHandler(NULL),
154  fESDEvent(NULL),
155  fMCEvent(NULL),
156  fCutFolder(NULL),
157  fESDList(NULL),
158  fBackList(NULL),
159  fMotherList(NULL),
160  fTrueList(NULL),
161  fMCList(NULL),
162  fOutputContainer(0),
163  fReaderGammas(NULL),
164  fSelectorNegPionIndex(0),
165  fSelectorPosPionIndex(0),
166  fGoodGammas(NULL),
167  fGoodVirtualParticles(NULL),
168  fEventCutArray(NULL),
169  fGammaCutArray(NULL),
170  fPionCutArray(NULL),
171  fMesonCutArray(NULL),
172  fEventCuts(NULL),
173  fConversionCuts(NULL),
174  fHistoConvGammaPt(NULL),
175  fHistoConvGammaEta(NULL),
176  fHistoNegPionPt(NULL),
177  fHistoPosPionPt(NULL),
178  fHistoNegPionPhi(NULL),
179  fHistoPosPionPhi(NULL),
180  fHistoNegPionEta(NULL),
181  fHistoPosPionEta(NULL),
182  fHistoNegPionClsTPC(NULL),
183  fHistoPosPionClsTPC(NULL),
184  fHistoPionDCAxy(NULL),
185  fHistoPionDCAz(NULL),
186  fHistoPionTPCdEdxNSigma(NULL),
187  fHistoPionTPCdEdx(NULL),
188  fHistoPionPionInvMassPt(NULL),
189  fHistoMotherInvMassPt(NULL),
190  fTHnSparseMotherInvMassPtZM(NULL),
191  fHistoMotherBackInvMassPt(NULL),
192  fTHnSparseMotherBackInvMassPtZM(NULL),
193  fHistoMCAllGammaPt(NULL),
194  fHistoMCConvGammaPt(NULL),
195  fHistoMCAllPosPionsPt(NULL),
196  fHistoMCAllNegPionsPt(NULL),
197  fHistoMCGammaFromEtaPt(NULL),
198  fHistoMCPosPionsFromEtaPt(NULL),
199  fHistoMCNegPionsFromEtaPt(NULL),
200  fHistoMCEtaPiPlPiMiGammaPt(NULL),
201  fHistoMCEtaGGPt(NULL),
202  fHistoMCEtaDalitzPt(NULL),
203  fHistoMCEtaPiPlPiMiGammaInAccPt(NULL),
204  fHistoTrueMotherPiPlPiMiGammaInvMassPt(NULL),
205  fHistoTrueMotherGammaGammaInvMassPt(NULL),
206  fHistoTrueMotherDalitzInvMassPt(NULL),
207  fHistoTrueConvGammaPt(NULL),
208  fHistoTrueConvGammaFromEtaPt(NULL),
209  fHistoTruePosPionPt(NULL),
210  fHistoTruePosPionFromEtaPt(NULL),
211  fHistoTrueNegPionPt(NULL),
212  fHistoTrueNegPionFromEtaPt(NULL),
213  fHistoTruePionPionInvMassPt(NULL),
214  fHistoTruePionPionFromEtaInvMassPt(NULL),
215  fHistoDoubleCountTrueEtaInvMassPt(NULL),
216  fHistoDoubleCountTrueConvGammaRPt(NULL),
217  fVectorDoubleCountTrueEtas(0),
218  fVectorDoubleCountTrueConvGammas(0),
219  fHistoNEvents(NULL),
220  fHistoNGoodESDTracks(NULL),
221  fProfileEtaShift(NULL),
222  fHistoSPDClusterTrackletBackground(NULL),
223  fRandom(0),
224  fnCuts(0),
225  fiCut(0),
226  fNumberOfESDTracks(0),
227  fMoveParticleAccordingToVertex(kFALSE),
228  fIsHeavyIon(kFALSE),
229  fDoMesonAnalysis(kTRUE),
230  fDoMesonQA(kFALSE),
231  fIsFromMBHeader(kTRUE),
232  fIsMC(kFALSE),
233  fIsGammaEtaCand(kFALSE)
234 {
235  DefineOutput(1, TList::Class());
236 }
237 
238 //-----------------------------------------------------------------------------------------------
240 {
241  //
242  // virtual destructor
243  //
244  cout<<"Destructor"<<endl;
245  if(fGoodGammas){
246  delete fGoodGammas;
247  fGoodGammas = 0x0;
248  }
250  delete fGoodVirtualParticles;
251  fGoodGammas = 0x0;
252  }
253  if(fBGHandler){
254  delete[] fBGHandler;
255  fBGHandler = 0x0;
256  }
257 }
258 //___________________________________________________________
260 
261  const Int_t nDim = 4;
262  Int_t nBins[nDim] = {450,250,7,4};
263  Double_t xMin[nDim] = {0.3,0, 0,0};
264  Double_t xMax[nDim] = {0.75,25,7,4};
265 
266  fTHnSparseMotherInvMassPtZM = new THnSparseF*[fnCuts];
267  fTHnSparseMotherBackInvMassPtZM = new THnSparseF*[fnCuts];
268 
270  for(Int_t iCut = 0; iCut<fnCuts;iCut++){
271 
272  TString cutstringEvent = ((AliConvEventCuts*)fEventCutArray->At(iCut))->GetCutNumber();
273  TString cutstringPion = ((AliPrimaryPionCuts*)fPionCutArray->At(iCut))->GetCutNumber();
274  TString cutstringMeson = ((AliConversionMesonCuts*)fMesonCutArray->At(iCut))->GetCutNumber();
275  TString cutstringGamma = ((AliConversionPhotonCuts*)fGammaCutArray->At(iCut))->GetCutNumber();
276 
277  Int_t collisionSystem = atoi((TString)(((AliConvEventCuts*)fEventCutArray->At(iCut))->GetCutNumber())(0,1));
278  Int_t centMin = atoi((TString)(((AliConvEventCuts*)fEventCutArray->At(iCut))->GetCutNumber())(1,1));
279  Int_t centMax = atoi((TString)(((AliConvEventCuts*)fEventCutArray->At(iCut))->GetCutNumber())(2,1));
280 
281  if(collisionSystem == 1 || collisionSystem == 2 ||
282  collisionSystem == 5 || collisionSystem == 8 ||
283  collisionSystem == 9){
284  centMin = centMin*10;
285  centMax = centMax*10;
286  }
287  else if(collisionSystem == 3 || collisionSystem == 6){
288  centMin = centMin*5;
289  centMax = centMax*5;
290  }
291  else if(collisionSystem == 4 || collisionSystem == 7){
292  centMin = ((centMin*5)+45);
293  centMax = ((centMax*5)+45);
294  }
295 
296 
297  fBackList[iCut] = new TList();
298  fBackList[iCut]->SetName(Form("%s_%s_%s_%s Back histograms",cutstringEvent.Data(),cutstringGamma.Data(),cutstringPion.Data(),cutstringMeson.Data()));
299  fBackList[iCut]->SetOwner(kTRUE);
300  fCutFolder[iCut]->Add(fBackList[iCut]);
301 
302  fTHnSparseMotherBackInvMassPtZM[iCut] = new THnSparseF("Back_Back_InvMass_Pt_z_m","Back_Back_InvMass_Pt_z_m",nDim,nBins,xMin,xMax);
303  fBackList[iCut]->Add(fTHnSparseMotherBackInvMassPtZM[iCut]);
304 
305  fMotherList[iCut] = new TList();
306  fMotherList[iCut]->SetName(Form("%s_%s_%s_%s Mother histograms",cutstringEvent.Data(),cutstringGamma.Data(),cutstringPion.Data(),cutstringMeson.Data()));
307  fMotherList[iCut]->SetOwner(kTRUE);
308  fCutFolder[iCut]->Add(fMotherList[iCut]);
309 
310  fTHnSparseMotherInvMassPtZM[iCut] = new THnSparseF("Back_Mother_InvMass_Pt_z_m","Back_Mother_InvMass_Pt_z_m",nDim,nBins,xMin,xMax);
311  fMotherList[iCut]->Add(fTHnSparseMotherInvMassPtZM[iCut]);
312 
313 
314  fBGHandler[iCut] = new AliGammaConversionAODBGHandler( collisionSystem,centMin,centMax,
315  ((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->GetNumberOfBGEvents(),
316  ((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->UseTrackMultiplicity(),
317  0,8,5);
318 
319  }
320 }
321 
322 //______________________________________________________________________
324 {
325  //
326  // Create ouput objects
327  //
328 
329  // Create the output container
330  if(fOutputContainer != NULL){
331  delete fOutputContainer;
332  fOutputContainer = NULL;
333  }
334  if(fOutputContainer == NULL){
335  fOutputContainer = new TList();
336  fOutputContainer->SetOwner(kTRUE);
337  }
338 
339  fGoodGammas = new TList();
340 
342  fGoodVirtualParticles->SetOwner(kTRUE);
343 
344  fCutFolder = new TList*[fnCuts];
345  fESDList = new TList*[fnCuts];
346  fBackList = new TList*[fnCuts];
347  fMotherList = new TList*[fnCuts];
348  fHistoNEvents = new TH1I*[fnCuts];
350  fProfileEtaShift = new TProfile*[fnCuts];
352  fHistoConvGammaPt = new TH1F*[fnCuts];
353  fHistoConvGammaEta = new TH1F*[fnCuts];
354  fHistoNegPionPt = new TH1F*[fnCuts];
355  fHistoPosPionPt = new TH1F*[fnCuts];
356  fHistoNegPionPhi = new TH1F*[fnCuts];
357  fHistoPosPionPhi = new TH1F*[fnCuts];
358 
359  if( fDoMesonQA ) {
360  fHistoNegPionEta = new TH1F*[fnCuts];
361  fHistoPosPionEta = new TH1F*[fnCuts];
364  fHistoPionDCAxy = new TH2F*[fnCuts];
365  fHistoPionDCAz = new TH2F*[fnCuts];
367  fHistoPionTPCdEdx = new TH2F*[fnCuts];
369 
370  }
371 
374 
375  for(Int_t iCut = 0; iCut<fnCuts;iCut++){
376  TString cutstringEvent = ((AliConvEventCuts*)fEventCutArray->At(iCut))->GetCutNumber();
377  TString cutstringPion = ((AliPrimaryPionCuts*)fPionCutArray->At(iCut))->GetCutNumber();
378  TString cutstringMeson = ((AliConversionMesonCuts*)fMesonCutArray->At(iCut))->GetCutNumber();
379  TString cutstringGamma = ((AliConversionPhotonCuts*)fGammaCutArray->At(iCut))->GetCutNumber();
380 
381  fCutFolder[iCut] = new TList();
382  fCutFolder[iCut]->SetName(Form("Cut Number %s_%s_%s_%s",cutstringEvent.Data(),cutstringGamma.Data(),cutstringPion.Data(),cutstringMeson.Data()));
383  fCutFolder[iCut]->SetOwner(kTRUE);
384  fOutputContainer->Add(fCutFolder[iCut]);
385 
386  fESDList[iCut] = new TList();
387  fESDList[iCut]->SetName(Form("%s_%s_%s_%s ESD histograms",cutstringEvent.Data(),cutstringGamma.Data(),cutstringPion.Data(),cutstringMeson.Data()));
388  fESDList[iCut]->SetOwner(kTRUE);
389 
390  fHistoNEvents[iCut] = new TH1I("NEvents","NEvents",14,-0.5,13.5);
391  fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(1,"Accepted");
392  fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,"Centrality");
393  fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,"Miss. MC or inc. ev.");
394  fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,"Trigger");
395  fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(5,"Vertex Z");
396  fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,"Cont. Vertex");
397  fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,"Pile-Up");
398  fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(8,"no SDD");
399  fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(9,"no V0AND");
400  fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,"EMCAL problems");
401  fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,"SPD hits vs tracklet");
402  fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,"Out-of-Bunch pileup Past-Future");
403  fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,"Pileup V0M-TPCout Tracks");
404  fESDList[iCut]->Add(fHistoNEvents[iCut]);
405 
406  if(fIsHeavyIon) fHistoNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",3000,0,3000);
407  else fHistoNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",200,0,200);
408  fESDList[iCut]->Add(fHistoNGoodESDTracks[iCut]);
409 
410  fProfileEtaShift[iCut] = new TProfile("Eta Shift","Eta Shift",1, -0.5,0.5);
411  fESDList[iCut]->Add(fProfileEtaShift[iCut]);
412  fHistoSPDClusterTrackletBackground[iCut] = new TH2F("SPD tracklets vs SPD clusters","SPD tracklets vs SPD clusters",100,0,200,250,0,1000);
414  fHistoConvGammaPt[iCut] = new TH1F("ESD_ConvGamma_Pt","ESD_ConvGamma_Pt",250,0,25);
415  fESDList[iCut]->Add(fHistoConvGammaPt[iCut]);
416  fHistoConvGammaEta[iCut] = new TH1F("ESD_ConvGamma_Eta","ESD_ConvGamma_Eta",600,-1.5,1.5);
417  fESDList[iCut]->Add(fHistoConvGammaEta[iCut]);
418  fHistoNegPionPt[iCut] = new TH1F("ESD_PrimaryNegPions_Pt","ESD_PrimaryNegPions_Pt",1000,0,25);
419  fESDList[iCut]->Add(fHistoNegPionPt[iCut]);
420  fHistoPosPionPt[iCut] = new TH1F("ESD_PrimaryPosPions_Pt","ESD_PrimaryPosPions_Pt",1000,0,25);
421  fESDList[iCut]->Add(fHistoPosPionPt[iCut]);
422  fHistoNegPionPhi[iCut] = new TH1F("ESD_PrimaryNegPions_Phi","ESD_PrimaryNegPions_Phi",360,0,2*TMath::Pi());
423  fESDList[iCut]->Add(fHistoNegPionPhi[iCut]);
424  fHistoPosPionPhi[iCut] = new TH1F("ESD_PrimaryPosPions_Phi","ESD_PrimaryPosPions_Phi",360,0,2*TMath::Pi());
425  fESDList[iCut]->Add(fHistoPosPionPhi[iCut]);
426 
427  if ( fDoMesonQA ) {
428  fHistoNegPionEta[iCut] = new TH1F("ESD_PrimaryNegPions_Eta","ESD_PrimaryNegPions_Eta",600,-1.5,1.5);
429  fESDList[iCut]->Add(fHistoNegPionEta[iCut]);
430  fHistoPosPionEta[iCut] = new TH1F("ESD_PrimaryPosPions_Eta","ESD_PrimaryPosPions_Eta",600,-1.5,1.5);
431  fESDList[iCut]->Add(fHistoPosPionEta[iCut]);
432  fHistoNegPionClsTPC[iCut] = new TH2F("ESD_PrimaryNegPions_ClsTPC","ESD_PrimaryNegPions_ClsTPC",100,0,1,400,0.,10.);
433  fESDList[iCut]->Add(fHistoNegPionClsTPC[iCut]);
434  fHistoPosPionClsTPC[iCut] = new TH2F("ESD_PrimaryPosPions_ClsTPC","ESD_PrimaryPosPions_ClsTPC",100,0,1,400,0.,10.);
435  fESDList[iCut]->Add(fHistoPosPionClsTPC[iCut]);
436  fHistoPionDCAxy[iCut] = new TH2F("ESD_PrimaryPions_DCAxy","ESD_PrimaryPions_DCAxy",800,-4.0,4.0,400,0.,10.);
437  fESDList[iCut]->Add(fHistoPionDCAxy[iCut]);
438  fHistoPionDCAz[iCut] = new TH2F("ESD_PrimaryPions_DCAz","ESD_PrimaryPions_DCAz",800,-4.0,4.0,400,0.,10.);
439  fESDList[iCut]->Add(fHistoPionDCAz[iCut]);
440  fHistoPionTPCdEdxNSigma[iCut] = new TH2F("ESD_PrimaryPions_TPCdEdx","ESD_PrimaryPions_TPCdEdx",150,0.05,20,400,-10,10);
441  fESDList[iCut]->Add(fHistoPionTPCdEdxNSigma[iCut]);
442  fHistoPionTPCdEdx[iCut] =new TH2F("ESD_PrimaryPions_TPCdEdxSignal","ESD_PrimaryPions_TPCdEdxSignal" ,150,0.05,20.0,800,0.0,200);
443  fESDList[iCut]->Add(fHistoPionTPCdEdx[iCut]);
444  fHistoPionPionInvMassPt[iCut] = new TH2F("ESD_PiPlusPiNeg_InvMassPt","ESD_PiPlusPiNeg_InvMassPt",2000,0.,2.,200,0.,20.);
445  fESDList[iCut]->Add(fHistoPionPionInvMassPt[iCut]);
446  }
447 
448  fHistoMotherInvMassPt[iCut] = new TH2F("ESD_Mother_InvMass_Pt","ESD_Mother_InvMass_Pt",450,0.3,0.75,250,0,25);
449  fESDList[iCut]->Add(fHistoMotherInvMassPt[iCut]);
450  fHistoMotherBackInvMassPt[iCut] = new TH2F("ESD_Background_InvMass_Pt","ESD_Background_InvMass_Pt",450,0.3,0.75,250,0,25);
451  fESDList[iCut]->Add(fHistoMotherBackInvMassPt[iCut]);
452 
453  if ( fDoMesonQA ) {
454  TAxis *AxisAfter = fHistoPionTPCdEdxNSigma[iCut]->GetXaxis();
455  Int_t bins = AxisAfter->GetNbins();
456  Double_t from = AxisAfter->GetXmin();
457  Double_t to = AxisAfter->GetXmax();
458  Double_t *newBins = new Double_t[bins+1];
459  newBins[0] = from;
460  Double_t factor = TMath::Power(to/from, 1./bins);
461  for(Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1];
462 
463  AxisAfter->Set(bins, newBins);
464  AxisAfter = fHistoPionTPCdEdx[iCut]->GetXaxis();
465  AxisAfter->Set(bins, newBins);
466 
467  delete [] newBins;
468  }
469 
470  fCutFolder[iCut]->Add(fESDList[iCut]);
471 
472  }
473 
474  if( fIsMC ){
475  // MC Histogramms
476  fMCList = new TList*[fnCuts];
477  // True Histogramms
478  fTrueList = new TList*[fnCuts];
479  fHistoTrueConvGammaPt = new TH1F*[fnCuts];
482  fHistoTruePosPionPt = new TH1F*[fnCuts];
483  fHistoTrueNegPionPt = new TH1F*[fnCuts];
484  fHistoTruePosPionFromEtaPt = new TH1F*[fnCuts];
485  fHistoTrueNegPionFromEtaPt = new TH1F*[fnCuts];
486 
487 
488  fHistoMCAllGammaPt = new TH1F*[fnCuts];
489  fHistoMCConvGammaPt = new TH1F*[fnCuts];
490  fHistoMCAllPosPionsPt = new TH1F*[fnCuts];
491  fHistoMCAllNegPionsPt = new TH1F*[fnCuts];
492  fHistoMCGammaFromEtaPt = new TH1F*[fnCuts];
493  fHistoMCPosPionsFromEtaPt = new TH1F*[fnCuts];
494  fHistoMCNegPionsFromEtaPt = new TH1F*[fnCuts];
495 
496 // hMCPi0DalitzGammaPt = new TH1F*[fnCuts];
497 // hMCPi0DalitzElectronPt = new TH1F*[fnCuts];
498 // hMCPi0DalitzPositronPt = new TH1F*[fnCuts];
499 
500  fHistoMCEtaPiPlPiMiGammaPt = new TH1F*[fnCuts];
501  fHistoMCEtaDalitzPt = new TH1F*[fnCuts];
502  fHistoMCEtaGGPt = new TH1F*[fnCuts];
504 //
509 
510  if (fDoMesonQA){
513  }
514 
515  for(Int_t iCut = 0; iCut<fnCuts;iCut++){
516  TString cutstringEvent = ((AliConvEventCuts*)fEventCutArray->At(iCut))->GetCutNumber();
517  TString cutstringPion = ((AliPrimaryPionCuts*)fPionCutArray->At(iCut))->GetCutNumber();
518  TString cutstringMeson = ((AliConversionMesonCuts*)fMesonCutArray->At(iCut))->GetCutNumber();
519  TString cutstringGamma = ((AliConversionPhotonCuts*)fGammaCutArray->At(iCut))->GetCutNumber();
520 
521  fMCList[iCut] = new TList();
522  fMCList[iCut]->SetName(Form("%s_%s_%s_%s MC histograms",cutstringEvent.Data(),cutstringGamma.Data(),cutstringPion.Data(),cutstringMeson.Data()));
523  fMCList[iCut]->SetOwner(kTRUE);
524  fCutFolder[iCut]->Add(fMCList[iCut]);
525 
526  fHistoMCAllGammaPt[iCut] = new TH1F("MC_AllGamma_Pt","MC_AllGamma_Pt",250,0,25);
527  fMCList[iCut]->Add(fHistoMCAllGammaPt[iCut]);
528  fHistoMCConvGammaPt[iCut] = new TH1F("MC_ConvGamma_Pt","MC_ConvGamma_Pt",250,0,25);
529  fMCList[iCut]->Add(fHistoMCConvGammaPt[iCut]);
530  fHistoMCAllPosPionsPt[iCut] = new TH1F("MC_AllPosPions_Pt","MC_AllPosPions_Pt",1000,0,25);
531  fMCList[iCut]->Add(fHistoMCAllPosPionsPt[iCut]);
532  fHistoMCAllNegPionsPt[iCut] = new TH1F("MC_AllNegPions_Pt","MC_AllNegPions_Pt",1000,0,25);
533  fMCList[iCut]->Add(fHistoMCAllNegPionsPt[iCut]);
534  fHistoMCGammaFromEtaPt[iCut] = new TH1F("MC_GammaFromEta_Pt","MC_GammaFromEta_Pt",250,0,25);
535  fMCList[iCut]->Add(fHistoMCGammaFromEtaPt[iCut]);
536  fHistoMCPosPionsFromEtaPt[iCut] = new TH1F("MC_PosPionsFromEta_Pt","MC_PosPionsFromEta_Pt",1000,0,25);
537  fMCList[iCut]->Add(fHistoMCPosPionsFromEtaPt[iCut]);
538  fHistoMCNegPionsFromEtaPt[iCut] = new TH1F("MC_NegPionsFromEta_Pt","MC_NegPionsFromEta_Pt",1000,0,25);
539  fMCList[iCut]->Add(fHistoMCNegPionsFromEtaPt[iCut]);
540 
541  fHistoMCEtaPiPlPiMiGammaPt[iCut] = new TH1F("MC_Eta_Pt","MC_Eta_Pt",250,0,25);
542  fHistoMCEtaPiPlPiMiGammaPt[iCut]->Sumw2();
543  fMCList[iCut]->Add(fHistoMCEtaPiPlPiMiGammaPt[iCut]);
544 
545  fHistoMCEtaDalitzPt[iCut] = new TH1F("MC_Eta_Dalitz_Pt","MC_Eta_Pt",250,0,25);
546  fHistoMCEtaDalitzPt[iCut]->Sumw2();
547  fMCList[iCut]->Add(fHistoMCEtaDalitzPt[iCut]);
548 
549  fHistoMCEtaGGPt[iCut] = new TH1F("MC_Eta_GG_Pt","MC_Eta_GG_Pt",250,0,25);
550  fHistoMCEtaGGPt[iCut]->Sumw2();
551  fMCList[iCut]->Add(fHistoMCEtaGGPt[iCut]);
552 
553  fHistoMCEtaPiPlPiMiGammaInAccPt[iCut] = new TH1F("MC_EtaInAcc_Pt","MC_EtaInAcc_Pt",250,0,25);
554  fHistoMCEtaPiPlPiMiGammaInAccPt[iCut]->Sumw2();
555  fMCList[iCut]->Add(fHistoMCEtaPiPlPiMiGammaInAccPt[iCut]);
556 
557  fTrueList[iCut] = new TList();
558  fTrueList[iCut]->SetName(Form("%s_%s_%s_%s True histograms",cutstringEvent.Data(),cutstringGamma.Data(),cutstringPion.Data(),cutstringMeson.Data()));
559  fTrueList[iCut]->SetOwner(kTRUE);
560  fCutFolder[iCut]->Add(fTrueList[iCut]);
561 
562  fHistoTrueConvGammaPt[iCut] = new TH1F("ESD_TrueConvGamma_Pt","ESD_TrueConvGamma_Pt",250,0,25);
563  fTrueList[iCut]->Add(fHistoTrueConvGammaPt[iCut]);
564  fHistoDoubleCountTrueConvGammaRPt[iCut] = new TH2F("ESD_TrueDoubleCountConvGamma_R_Pt","ESD_TrueDoubleCountConvGamma_R_Pt",800,0,200,300,0,30);
566  fHistoTrueConvGammaFromEtaPt[iCut] = new TH1F("ESD_TrueConvGammaFromEta_Pt","ESD_TrueConvGammaFromEta_Pt",250,0,25);
567  fTrueList[iCut]->Add(fHistoTrueConvGammaFromEtaPt[iCut]);
568 
569  fHistoTruePosPionPt[iCut] = new TH1F("ESD_TruePosPion_Pt","ESD_TruePosPion_Pt",1000,0,25);
570  fTrueList[iCut]->Add(fHistoTruePosPionPt[iCut]);
571  fHistoTrueNegPionPt[iCut] = new TH1F("ESD_TrueNegPion_Pt","ESD_TrueNegPion_Pt",1000,0,25);
572  fTrueList[iCut]->Add(fHistoTrueNegPionPt[iCut]);
573 
574  fHistoTrueNegPionFromEtaPt[iCut] = new TH1F("ESD_TrueNegPionFromEta_Pt","ESD_TrueNegPionFromEta_Pt",1000,0,25);
575  fTrueList[iCut]->Add(fHistoTrueNegPionFromEtaPt[iCut]);
576  fHistoTruePosPionFromEtaPt[iCut] = new TH1F("ESD_TruePosPionFromEta_Pt","ESD_TruePosPionFromEta_Pt",1000,0,25);
577  fTrueList[iCut]->Add(fHistoTruePosPionFromEtaPt[iCut]);
578 
579  fHistoDoubleCountTrueEtaInvMassPt[iCut] = new TH2F("ESD_TrueDoubleCountEta_InvMass_Pt","ESD_TrueDoubleCountEta_InvMass_Pt",800,0,0.8,300,0,30);
581 
582  fHistoTrueMotherPiPlPiMiGammaInvMassPt[iCut] = new TH2F("ESD_TrueMotherPiPlPiMiGamma_InvMass_Pt","ESD_TrueMotherPiPlPiMiGamma_InvMass_Pt",450,0.3,0.75,250,0,25);
585 
586  fHistoTrueMotherGammaGammaInvMassPt[iCut] = new TH2F("ESD_TrueMotherGG_InvMass_Pt","ESD_TrueMotherGG_InvMass_Pt",450,0.3,0.75,250,0,25);
589 
590  fHistoTrueMotherDalitzInvMassPt[iCut] = new TH2F("ESD_TrueMotherDalitz_InvMass_Pt","ESD_TrueMotherDalitz_InvMass_Pt",450,0.3,0.75,250,0,25);
591  fHistoTrueMotherDalitzInvMassPt[iCut]->Sumw2();
592  fTrueList[iCut]->Add(fHistoTrueMotherDalitzInvMassPt[iCut]);
593 
594  if (fDoMesonQA){
595  fHistoTruePionPionInvMassPt[iCut] = new TH2F("ESD_TruePiPlusPiNeg_InvMassPt","ESD_TruePiPlusPiNeg_InvMassPt",2000,0.,2.,200,0.,20.);
596  fTrueList[iCut]->Add(fHistoTruePionPionInvMassPt[iCut]);
597  fHistoTruePionPionFromEtaInvMassPt[iCut] = new TH2F("ESD_TruePiPlusPiNegFromEta_InvMassPt","ESD_TruePiPlusPiNegFromEta_InvMassPt",2000,0.,2.,200,0.,20.);
599  }
600  }
601  }
602 
605 
606  InitBack(); // Init Background Handler
607 
608  fV0Reader=(AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()->GetTask(fV0ReaderName.Data());
609  if(!fV0Reader){printf("Error: No V0 Reader");return;} // GetV0Reader
610 
611  if(fV0Reader)
613  if(((AliConversionPhotonCuts*)fV0Reader->GetConversionCuts())->GetCutHistograms())
614  fOutputContainer->Add(((AliConversionPhotonCuts*)fV0Reader->GetConversionCuts())->GetCutHistograms());
615 
616 
617 
618  fPionSelector=(AliPrimaryPionSelector*)AliAnalysisManager::GetAnalysisManager()->GetTask("PionSelector");
619  if(!fPionSelector){printf("Error: No PionSelector");return;} // GetV0Reader
620 
621  if( fPionSelector ){
622  if ( ((AliPrimaryPionCuts*)fPionSelector->GetPrimaryPionCuts())->GetCutHistograms() ){
623  fOutputContainer->Add( ((AliPrimaryPionCuts*)fPionSelector->GetPrimaryPionCuts())->GetCutHistograms() );
624  }
625  }
626 
627  for(Int_t iCut = 0; iCut<fnCuts;iCut++){
628  if( fPionCutArray ){
629  if( ((AliPrimaryPionCuts*)fPionCutArray->At(iCut))->GetCutHistograms() ) {
630  fCutFolder[iCut]->Add( ((AliPrimaryPionCuts*)fPionCutArray->At(iCut))->GetCutHistograms() );
631  }
632  }
633  if( fMesonCutArray ) {
634  if( ((AliConversionMesonCuts*)fMesonCutArray->At(iCut))->GetCutHistograms() ) {
635  fCutFolder[iCut]->Add( ((AliConversionMesonCuts*)fMesonCutArray->At(iCut))->GetCutHistograms());
636  }
637  }
638  if( fGammaCutArray ) {
639  if( ((AliConversionPhotonCuts*)fGammaCutArray->At(iCut))->GetCutHistograms() ) {
640  fCutFolder[iCut]->Add( ((AliConversionPhotonCuts*)fGammaCutArray->At(iCut))->GetCutHistograms() );
641  }
642  }
643  }
644 
645  PostData(1, fOutputContainer);
646 
647 }
648 
649 //______________________________________________________________________
651 
652  //
653  // Execute analysis for current event
654  //
655 
656  fV0Reader=(AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()->GetTask(fV0ReaderName.Data());
657  if(!fV0Reader){printf("Error: No V0 Reader");return;} // GetV0Reader
658 
659  Int_t eventQuality = ((AliConvEventCuts*)fV0Reader->GetEventCuts())->GetEventQuality();
660  if(InputEvent()->IsIncompleteDAQ()==kTRUE) eventQuality = 2; // incomplete event
661  if(eventQuality == 2 || eventQuality == 3){// Event Not Accepted due to MC event missing or wrong trigger for V0ReaderV1 or because it is incomplete
662  for(Int_t iCut = 0; iCut<fnCuts; iCut++){
663  fHistoNEvents[iCut]->Fill(eventQuality);
664  }
665  return;
666  }
667 
668  fPionSelector=(AliPrimaryPionSelector*)AliAnalysisManager::GetAnalysisManager()->GetTask("PionSelector");
669  if(!fPionSelector){printf("Error: No PionSelector");return;} // GetV0Reader
670 
671  if(fIsMC) fMCEvent = MCEvent();
672  fESDEvent = (AliESDEvent*)InputEvent();
673  fReaderGammas = fV0Reader->GetReconstructedGammas(); // Gammas from default Cut
674  fSelectorNegPionIndex = fPionSelector->GetReconstructedNegPionIndex(); // Electrons from default Cut
675  fSelectorPosPionIndex = fPionSelector->GetReconstructedPosPionIndex(); // Positrons from default Cut
676 
678  //AddTaskContainers(); //Add conatiner
679 
680  for(Int_t iCut = 0; iCut<fnCuts; iCut++){
681  fiCut = iCut;
682  Int_t eventNotAccepted = ((AliConvEventCuts*)fEventCutArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon,kFALSE);
683 
684  if(eventNotAccepted){
685  // cout << "event rejected due to wrong trigger: " <<eventNotAccepted << endl;
686  fHistoNEvents[iCut]->Fill(eventNotAccepted); // Check Centrality, PileUp, SDD and V0AND --> Not Accepted => eventQuality = 1
687  continue;
688  }
689 
690  if(eventQuality != 0){// Event Not Accepted
691  // cout << "event rejected due to: " <<eventQuality << endl;
692  fHistoNEvents[iCut]->Fill(eventQuality);
693  continue;
694  }
695 
696  fHistoNEvents[iCut]->Fill(eventQuality);
698  fHistoSPDClusterTrackletBackground[iCut]->Fill(fInputEvent->GetMultiplicity()->GetNumberOfTracklets(),(fInputEvent->GetNumberOfITSClusters(0)+fInputEvent->GetNumberOfITSClusters(1)));
699 
700  if(fMCEvent){ // Process MC Particle
701  if(((AliConvEventCuts*)fEventCutArray->At(iCut))->GetSignalRejection() != 0){
702  ((AliConvEventCuts*)fEventCutArray->At(iCut))->GetNotRejectedParticles(((AliConvEventCuts*)fEventCutArray->At(iCut))->GetSignalRejection(),
703  ((AliConvEventCuts*)fEventCutArray->At(iCut))->GetAcceptedHeader(),
704  fMCEvent);
705  }
707  }
708 
709  fIsGammaEtaCand =kFALSE;
710 // cout << "new event" << endl;
711  ProcessPhotonCandidates(); // Process this cuts gammas
712  ProcessPionCandidates(); // Process this cuts gammas
713 
714 
718 
721 
722  fGoodGammas->Clear(); // delete this cuts good gammas
723  fGoodVirtualParticles->Clear(); // delete this cuts good gammas
724  }
725 
726  fSelectorNegPionIndex.clear();
727  fSelectorPosPionIndex.clear();
728 
729  PostData( 1, fOutputContainer );
730 }
731 
733  for(Int_t iCut = 0; iCut<fnCuts;iCut++){
734  if (((AliConvEventCuts*)fEventCutArray->At(iCut))->GetPeriodEnum() == AliConvEventCuts::kNoPeriod && ((AliConvEventCuts*)fV0Reader->GetEventCuts())->GetPeriodEnum() != AliConvEventCuts::kNoPeriod){
735  ((AliConvEventCuts*)fEventCutArray->At(iCut))->SetPeriodEnumExplicit(((AliConvEventCuts*)fV0Reader->GetEventCuts())->GetPeriodEnum());
736  } else if (((AliConvEventCuts*)fEventCutArray->At(iCut))->GetPeriodEnum() == AliConvEventCuts::kNoPeriod ){
737  ((AliConvEventCuts*)fEventCutArray->At(iCut))->SetPeriodEnum(fV0Reader->GetPeriodName());
738  }
739 
740  if( !((AliConvEventCuts*)fEventCutArray->At(iCut))->GetDoEtaShift() ){
741  fProfileEtaShift[iCut]->Fill(0.,0.);
742  continue; // No Eta Shift requested, continue
743  }
744  if( ((AliConvEventCuts*)fEventCutArray->At(iCut))->GetEtaShift() == 0.0){ // Eta Shift requested but not set, get shift automatically
745  ((AliConvEventCuts*)fEventCutArray->At(iCut))->GetCorrectEtaShiftFromPeriod();
746  ((AliConvEventCuts*)fEventCutArray->At(iCut))->DoEtaShift(kFALSE); // Eta Shift Set, make sure that it is called only once
747  ((AliPrimaryPionCuts*)fPionCutArray->At(iCut))->SetEtaShift( ((AliConvEventCuts*)fEventCutArray->At(iCut))->GetEtaShift() );
748  fProfileEtaShift[iCut]->Fill(0.,(((AliConvEventCuts*)fEventCutArray->At(iCut))->GetEtaShift()));
749  continue;
750  } else {
751  printf(" Eta t PiPlusPiMinus Gamma Task %s :: Eta Shift Manually Set to %f \n\n",
752  (((AliConvEventCuts*)fEventCutArray->At(iCut))->GetCutNumber()).Data(),((AliConvEventCuts*)fEventCutArray->At(iCut))->GetEtaShift());
753  ((AliConvEventCuts*)fEventCutArray->At(iCut))->DoEtaShift(kFALSE); // Eta Shift Set, make sure that it is called only once
754  ((AliPrimaryPionCuts*)fPionCutArray->At(iCut))->SetEtaShift( ((AliConvEventCuts*)fEventCutArray->At(iCut))->GetEtaShift() );
755  fProfileEtaShift[iCut]->Fill(0.,(((AliConvEventCuts*)fEventCutArray->At(iCut))->GetEtaShift()));
756  }
757  }
758  return kTRUE;
759 }
760 
761 
764 }
765 
766 //________________________________________________________________________
768  Int_t nV0 = 0;
769  TList *GoodGammasStepOne = new TList();
770  TList *GoodGammasStepTwo = new TList();
771  // Loop over Photon Candidates allocated by ReaderV1
772 
773  for(Int_t i = 0; i < fReaderGammas->GetEntriesFast(); i++){
774  AliAODConversionPhoton* PhotonCandidate = (AliAODConversionPhoton*) fReaderGammas->At(i);
775  if(!PhotonCandidate) continue;
776 
777  fIsFromMBHeader = kTRUE;
778 
779  if( fMCEvent && ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetSignalRejection() != 0 ){
780  Int_t isPosFromMBHeader
781  = ((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(PhotonCandidate->GetMCLabelPositive(), fMCEvent, fInputEvent);
782  if(isPosFromMBHeader == 0 && ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetSignalRejection() != 3) continue;
783  Int_t isNegFromMBHeader
784  = ((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(PhotonCandidate->GetMCLabelNegative(), fMCEvent,fInputEvent);
785  if(isNegFromMBHeader == 0 && ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetSignalRejection() != 3) continue;
786  if( (isNegFromMBHeader+isPosFromMBHeader) != 4) fIsFromMBHeader = kFALSE;
787  }
788 
789  if(!((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->PhotonIsSelected(PhotonCandidate,fESDEvent)) continue;
790 
791  if(!((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->UseElecSharingCut() &&
792  !((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->UseToCloseV0sCut()){ // if no post reader loop is required add to events good gammas
793 
794  fGoodGammas->Add(PhotonCandidate);
795 
796  if(fIsFromMBHeader){
797  fHistoConvGammaPt[fiCut]->Fill(PhotonCandidate->Pt());
798  fHistoConvGammaEta[fiCut]->Fill(PhotonCandidate->Eta());
799  }
800 
801  if(fMCEvent){
802  ProcessTruePhotonCandidates(PhotonCandidate);
803  }
804  } else if(((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->UseElecSharingCut()){ // if Shared Electron cut is enabled, Fill array, add to step one
805  ((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->FillElectonLabelArray(PhotonCandidate,nV0);
806  nV0++;
807  GoodGammasStepOne->Add(PhotonCandidate);
808  } else if(!((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->UseElecSharingCut() &&
809  ((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->UseToCloseV0sCut()){ // shared electron is disabled, step one not needed -> step two
810  GoodGammasStepTwo->Add(PhotonCandidate);
811  }
812  }
813 
814 
815  if(((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->UseElecSharingCut()){
816  for(Int_t i = 0;i<GoodGammasStepOne->GetEntries();i++){
817  AliAODConversionPhoton *PhotonCandidate= (AliAODConversionPhoton*) GoodGammasStepOne->At(i);
818  if(!PhotonCandidate) continue;
819  fIsFromMBHeader = kTRUE;
820  if(fMCEvent && ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetSignalRejection() != 0){
821  Int_t isPosFromMBHeader
822  = ((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(PhotonCandidate->GetMCLabelPositive(), fMCEvent,fInputEvent);
823  Int_t isNegFromMBHeader
824  = ((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(PhotonCandidate->GetMCLabelNegative(), fMCEvent,fInputEvent);
825  if( (isNegFromMBHeader+isPosFromMBHeader) != 4) fIsFromMBHeader = kFALSE;
826  }
827  if(!((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->RejectSharedElectronV0s(PhotonCandidate,i,GoodGammasStepOne->GetEntries())) continue;
828  if(!((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->UseToCloseV0sCut()){ // To Colse v0s cut diabled, step two not needed
829  fGoodGammas->Add(PhotonCandidate);
830  if(fIsFromMBHeader){
831  fHistoConvGammaPt[fiCut]->Fill(PhotonCandidate->Pt());
832  fHistoConvGammaEta[fiCut]->Fill(PhotonCandidate->Eta());
833  }
834  if(fMCEvent){
835  ProcessTruePhotonCandidates(PhotonCandidate);
836  }
837  }
838  else GoodGammasStepTwo->Add(PhotonCandidate); // Close v0s cut enabled -> add to list two
839  }
840  }
841  if(((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->UseToCloseV0sCut()){
842  for(Int_t i = 0;i<GoodGammasStepTwo->GetEntries();i++){
843  AliAODConversionPhoton* PhotonCandidate = (AliAODConversionPhoton*) GoodGammasStepTwo->At(i);
844  if(!PhotonCandidate) continue;
845 
846  if(fMCEvent && ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetSignalRejection() != 0){
847  Int_t isPosFromMBHeader
848  = ((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(PhotonCandidate->GetMCLabelPositive(), fMCEvent,fInputEvent);
849  Int_t isNegFromMBHeader
850  = ((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(PhotonCandidate->GetMCLabelNegative(), fMCEvent,fInputEvent);
851  if( (isNegFromMBHeader+isPosFromMBHeader) != 4) fIsFromMBHeader = kFALSE;
852  }
853 
854  if(!((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->RejectToCloseV0s(PhotonCandidate,GoodGammasStepTwo,i)) continue;
855  fGoodGammas->Add(PhotonCandidate); // Add gamma to current cut TList
856 
857  if(fIsFromMBHeader){
858  fHistoConvGammaPt[fiCut]->Fill(PhotonCandidate->Pt()); // Differences to old V0Reader in p_t due to conversion KF->TLorentzVector
859  fHistoConvGammaEta[fiCut]->Fill(PhotonCandidate->Eta());
860  }
861 
862  if(fMCEvent){
863  ProcessTruePhotonCandidates(PhotonCandidate);
864  }
865  }
866  }
867 
868  delete GoodGammasStepOne;
869  GoodGammasStepOne = 0x0;
870  delete GoodGammasStepTwo;
871  GoodGammasStepTwo = 0x0;
872 }
873 
874 //________________________________________________________________________
876 {
877  // Process True Photons
878  TParticle *posDaughter = TruePhotonCandidate->GetPositiveMCDaughter(fMCEvent);
879  TParticle *negDaughter = TruePhotonCandidate->GetNegativeMCDaughter(fMCEvent);
880 
881  const AliVVertex* primVtxMC = fMCEvent->GetPrimaryVertex();
882  Double_t mcProdVtxX = primVtxMC->GetX();
883  Double_t mcProdVtxY = primVtxMC->GetY();
884  Double_t mcProdVtxZ = primVtxMC->GetZ();
885 
886 
887  if(posDaughter == NULL || negDaughter == NULL) return; // One particle does not exist
888  if(posDaughter->GetMother(0) != negDaughter->GetMother(0)){ // Not Same Mother == Combinatorial Bck
889  return;
890  }
891 
892  else if (posDaughter->GetMother(0) == -1){
893  return;
894  }
895 
896  if(TMath::Abs(posDaughter->GetPdgCode())!=11 || TMath::Abs(negDaughter->GetPdgCode())!=11) return; //One Particle is not electron
897  if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode()) return; // Same Charge
898  if(posDaughter->GetUniqueID() != 5 || negDaughter->GetUniqueID() !=5) return;// check if the daughters come from a conversion
899 
900  TParticle *Photon = TruePhotonCandidate->GetMCParticle(fMCEvent);
901  if(Photon->GetPdgCode() != 22) return; // Mother is no Photon
902 
903  // True Photon
904 
905  if (CheckVectorForDoubleCount(fVectorDoubleCountTrueConvGammas,posDaughter->GetMother(0))) fHistoDoubleCountTrueConvGammaRPt[fiCut]->Fill(TruePhotonCandidate->GetConversionRadius(),TruePhotonCandidate->Pt());
906 
907  Int_t labelGamma = TruePhotonCandidate->GetMCParticleLabel(fMCEvent);
908  Bool_t gammaIsPrimary = ((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsConversionPrimaryESD( fMCEvent, labelGamma, mcProdVtxX, mcProdVtxY, mcProdVtxZ);
909  if( gammaIsPrimary ){
910  if( fIsFromMBHeader ){
911  fHistoTrueConvGammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
912  }
913  }
914 
915  if( IsEtaPiPlPiMiGammaDaughter(labelGamma) == kTRUE ) {
916  if( gammaIsPrimary ) {
917  if( fIsFromMBHeader ){
918  fHistoTrueConvGammaFromEtaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
919 
920 // TParticle * gammaMC = (TParticle*)fMCEvent->Particle(labelGamma);
921 // Int_t gammaMotherLabel=gammaMC->GetFirstMother();
922 // for(Int_t index= ((TParticle*)fMCEvent->Particle(gammaMotherLabel))->GetFirstDaughter();index<= ((TParticle*)fMCEvent->Particle(gammaMotherLabel))->GetLastDaughter();index++){
923 // TParticle* temp = (TParticle*)fMCEvent->Particle( index );
924 // switch( temp->GetPdgCode() ) {
925 // case 211:
926 // cout << "pi- " << index << "\t" << temp->Pt() << "\t" << temp->Eta() << endl;
927 // break;
928 // case -211:
929 // cout << "pi+ " << index << "\t" << temp->Pt() << "\t" << temp->Eta() << endl;
930 // break;
931 // case ::kGamma:
932 // cout << "gamma " << index << "\t" << temp->Pt()<< "\t" << temp->Eta() << endl;
933 // break;
934 // }
935 // }
936  fIsGammaEtaCand = kTRUE;
937  }
938  }
939  }
940 }
941 
942 //________________________________________________________________________
944 
945  Double_t magField = fInputEvent->GetMagneticField();
946  if( magField < 0.0 ){
947  magField = 1.0;
948  } else {
949  magField = -1.0;
950  }
951 
952  vector<Int_t> lGoodNegPionIndexPrev(0);
953  vector<Int_t> lGoodPosPionIndexPrev(0);
954 
955  for(ULong_t i = 0; i < fSelectorNegPionIndex.size(); i++){
956  AliESDtrack* negPionCandidate = fESDEvent->GetTrack(fSelectorNegPionIndex[i]);
957  if(! ((AliPrimaryPionCuts*)fPionCutArray->At(fiCut))->PionIsSelected(negPionCandidate) ) continue;
958  lGoodNegPionIndexPrev.push_back( fSelectorNegPionIndex[i] );
959  fHistoNegPionPt[fiCut]->Fill(negPionCandidate->Pt());
960  fHistoNegPionPhi[fiCut]->Fill(negPionCandidate->Phi());
961  if( fMCEvent ) {
962  const AliVVertex* primVtxMC = fMCEvent->GetPrimaryVertex();
963  Double_t mcProdVtxX = primVtxMC->GetX();
964  Double_t mcProdVtxY = primVtxMC->GetY();
965  Double_t mcProdVtxZ = primVtxMC->GetZ();
966 
967  Int_t labelNegPion = TMath::Abs( negPionCandidate->GetLabel() );
968  Bool_t negPionIsPrimary = ((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsConversionPrimaryESD( fMCEvent, labelNegPion, mcProdVtxX, mcProdVtxY, mcProdVtxZ);
969  if( negPionIsPrimary ){
970  TParticle* negPion = fMCEvent->Particle(labelNegPion);
971  if( negPion->GetPdgCode() == -211 ){
972  fHistoTrueNegPionPt[fiCut]->Fill(negPionCandidate->Pt()); //primary negPion
973  if( IsEtaPiPlPiMiGammaDaughter(labelNegPion) == kTRUE ) {
974  fHistoTrueNegPionFromEtaPt[fiCut]->Fill(negPionCandidate->Pt());
975 // if (fIsGammaEtaCand) cout << "pi- rec" << labelNegPion << "\t" << negPionCandidate->Pt()<< endl;
976  }
977  }
978  }
979  }
980  }
981 
982  for(ULong_t i = 0; i < fSelectorPosPionIndex.size(); i++){
983  AliESDtrack* posPionCandidate = fESDEvent->GetTrack( fSelectorPosPionIndex[i] );
984  if(! ((AliPrimaryPionCuts*)fPionCutArray->At(fiCut))->PionIsSelected(posPionCandidate) ) continue;
985  lGoodPosPionIndexPrev.push_back( fSelectorPosPionIndex[i] );
986  fHistoPosPionPt[fiCut]->Fill( posPionCandidate->Pt() );
987  fHistoPosPionPhi[fiCut]->Fill( posPionCandidate->Phi() );
988 
989  if( fMCEvent ) {
990  const AliVVertex* primVtxMC = fMCEvent->GetPrimaryVertex();
991  Double_t mcProdVtxX = primVtxMC->GetX();
992  Double_t mcProdVtxY = primVtxMC->GetY();
993  Double_t mcProdVtxZ = primVtxMC->GetZ();
994 
995  Int_t labelPosPion = TMath::Abs( posPionCandidate->GetLabel() );
996  Bool_t posPionIsPrimary = ((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsConversionPrimaryESD( fMCEvent, labelPosPion, mcProdVtxX, mcProdVtxY, mcProdVtxZ);
997  if( posPionIsPrimary ) {
998  TParticle* posPion = fMCEvent->Particle(labelPosPion);
999  if( posPion->GetPdgCode() == 211 ){
1000  fHistoTruePosPionPt[fiCut]->Fill(posPionCandidate->Pt());
1001  if( IsEtaPiPlPiMiGammaDaughter(labelPosPion) == kTRUE ) {
1002  fHistoTruePosPionFromEtaPt[fiCut]->Fill(posPionCandidate->Pt());
1003 // if (fIsGammaEtaCand) cout << "pi+ rec" << labelPosPion << "\t" << posPionCandidate->Pt()<< endl;
1004  }
1005  }
1006  }
1007  }
1008  }
1009 
1010 
1011  for(ULong_t i = 0; i < lGoodNegPionIndexPrev.size(); i++){
1012 
1013  AliESDtrack *negPionCandidate = fESDEvent->GetTrack(lGoodNegPionIndexPrev[i]);
1014  AliKFParticle negPionCandidateKF( *negPionCandidate->GetConstrainedParam(), 211 );
1015 
1016  for(ULong_t j = 0; j < lGoodPosPionIndexPrev.size(); j++){
1017 
1018  AliESDtrack *posPionCandidate = fESDEvent->GetTrack(lGoodPosPionIndexPrev[j]);
1019  AliKFParticle posPionCandidateKF( *posPionCandidate->GetConstrainedParam(), 211 );
1020 
1021  AliKFConversionPhoton* virtualPhoton = NULL;
1022  virtualPhoton = new AliKFConversionPhoton(negPionCandidateKF,posPionCandidateKF);
1023  AliKFVertex primaryVertexImproved(*fInputEvent->GetPrimaryVertex());
1024 // primaryVertexImproved+=*virtualPhoton;
1025  virtualPhoton->SetProductionVertex(primaryVertexImproved);
1026  virtualPhoton->SetTrackLabels( lGoodPosPionIndexPrev[j], lGoodNegPionIndexPrev[i]);
1027 
1028 
1029  if( fMCEvent ) {
1030  Int_t labeln=TMath::Abs(negPionCandidate->GetLabel());
1031  Int_t labelp=TMath::Abs(posPionCandidate->GetLabel());
1032  TParticle *fNegativeMCParticle = fMCEvent->Particle(labeln);
1033  TParticle *fPositiveMCParticle = fMCEvent->Particle(labelp);
1034 
1035  if( fPositiveMCParticle && fNegativeMCParticle) {
1036  virtualPhoton->SetMCLabelPositive(labelp);
1037  virtualPhoton->SetMCLabelNegative(labeln);
1038  }
1039  }
1040 
1041  AliAODConversionPhoton *vParticle = new AliAODConversionPhoton(virtualPhoton); //To Apply PsiPairCut
1042  if (((AliPrimaryPionCuts*)fPionCutArray->At(fiCut))->DoMassCut()){
1043  if (vParticle->GetMass() < ((AliPrimaryPionCuts*)fPionCutArray->At(fiCut))->GetMassCut()){
1044  fGoodVirtualParticles->Add( vParticle );
1045  }
1046  } else {
1047  fGoodVirtualParticles->Add( vParticle );
1048  }
1049  delete virtualPhoton;
1050  virtualPhoton=NULL;
1051 
1052  }
1053  }
1054 }
1055 
1056 //_____________________________________________________________________________
1058 
1059  // Loop over all primary MC particle
1060 
1061  const AliVVertex* primVtxMC = fMCEvent->GetPrimaryVertex();
1062  Double_t mcProdVtxX = primVtxMC->GetX();
1063  Double_t mcProdVtxY = primVtxMC->GetY();
1064  Double_t mcProdVtxZ = primVtxMC->GetZ();
1065 
1066 
1067  for(Int_t i = 0; i < fMCEvent->GetNumberOfTracks(); i++) {
1068  if (((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsConversionPrimaryESD( fMCEvent, i, mcProdVtxX, mcProdVtxY, mcProdVtxZ)){
1069  TParticle* particle = (TParticle *)fMCEvent->Particle(i);
1070  if (!particle) continue;
1071 
1072  Int_t isMCFromMBHeader = -1;
1073  if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetSignalRejection() != 0){
1074  isMCFromMBHeader
1075  = ((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(i, fMCEvent, fInputEvent);
1076  if(isMCFromMBHeader == 0 && ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetSignalRejection() != 3) continue;
1077  }
1078 
1079  if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(i, fMCEvent,fInputEvent)){
1080 
1081  if(((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->PhotonIsSelectedMC(particle,fMCEvent,kFALSE)){
1082  fHistoMCAllGammaPt[fiCut]->Fill(particle->Pt()); // All MC Gamma
1083  if(particle->GetMother(0) >-1){
1084  if (fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==221 && fMCEvent->Particle(particle->GetMother(0))->GetNDaughters()==3 ) fHistoMCGammaFromEtaPt[fiCut]->Fill(particle->Pt()); // All pos from eta
1085  }
1086  }
1087 
1088  if(((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->PhotonIsSelectedMC(particle,fMCEvent,kTRUE)){
1089  fHistoMCConvGammaPt[fiCut]->Fill(particle->Pt());
1090  } // Converted MC Gamma
1091 
1092  if(((AliPrimaryPionCuts*)fPionCutArray->At(fiCut))->PionIsSelectedMC(i,fMCEvent)){
1093  if( particle->GetPdgCode() == 211){
1094  fHistoMCAllPosPionsPt[fiCut]->Fill(particle->Pt()); // All pos pions
1095  if(particle->GetMother(0) >-1){
1096  if (fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==221) fHistoMCPosPionsFromEtaPt[fiCut]->Fill(particle->Pt()); // All pos from eta
1097  }
1098  }
1099  if( particle->GetPdgCode() == -211){
1100  fHistoMCAllNegPionsPt[fiCut]->Fill(particle->Pt()); // All neg pions
1101  if(particle->GetMother(0) >-1){
1102  if (fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==221) fHistoMCNegPionsFromEtaPt[fiCut]->Fill(particle->Pt()); // All pos from eta
1103  }
1104  }
1105  }
1106 
1107  // \eta -> \gamma \gamma
1108 
1109  if(((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->MesonIsSelectedMC( particle,fMCEvent,((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetEtaShift() ) ){
1110  Float_t weighted= 1;
1111  if( ((AliPrimaryPionCuts*) fPionCutArray->At(fiCut))->DoWeights() ) {
1112  if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(i, fMCEvent, fInputEvent)){
1113  if (particle->Pt()>0.005){
1114  weighted= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(i, fMCEvent,fInputEvent);
1115  }
1116  }
1117  }
1118  if(particle->GetPdgCode() == 221)fHistoMCEtaGGPt[fiCut]->Fill( particle->Pt() , weighted); // All MC Eta GG decay
1119  }
1120 
1121  // \eta -> e+ e- \gamma
1122  Int_t labelgamma = -1;
1123  Int_t labelelectron = -1;
1124  Int_t labelpositron = -1;
1125 
1126  if( ((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->MesonIsSelectedMCDalitz(particle,fMCEvent,labelelectron,labelpositron,labelgamma,((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetEtaShift())){
1127  Float_t weighted= 1;
1128  if( ((AliPrimaryPionCuts*) fPionCutArray->At(fiCut))->DoWeights() ) {
1129  if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(i, fMCEvent,fInputEvent)){
1130  if (particle->Pt()>0.005){
1131  weighted= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(i, fMCEvent,fInputEvent);
1132  }
1133  }
1134  }
1135  if(particle->GetPdgCode() == 221)fHistoMCEtaDalitzPt[fiCut]->Fill(particle->Pt(), weighted); // All MC Eta
1136  }
1137 
1138 
1139  // \eta -> pi+ pi- \gamma
1140  Int_t labelGamma3Body = -1;
1141  Int_t labelNegPion = -1;
1142  Int_t labelPosPion = -1;
1143 
1144  if( ((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->MesonIsSelectedMCEtaPiPlPiMiGamma(particle,fMCEvent,labelNegPion,labelPosPion,labelGamma3Body,((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetEtaShift())){
1145  Float_t weighted= 1;
1146  if( ((AliPrimaryPionCuts*) fPionCutArray->At(fiCut))->DoWeights() ) {
1147  if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(i, fMCEvent,fInputEvent)){
1148  if (particle->Pt()>0.005){
1149  weighted= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(i, fMCEvent,fInputEvent);
1150  }
1151  }
1152  }
1153  if(particle->GetPdgCode() == 221)fHistoMCEtaPiPlPiMiGammaPt[fiCut]->Fill(particle->Pt(), weighted); // All MC Eta
1154 
1155  TParticle *gamma = fMCEvent->Particle(labelGamma3Body);
1156  Bool_t gammaIsPrimary = ((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsConversionPrimaryESD( fMCEvent, labelGamma3Body, mcProdVtxX, mcProdVtxY, mcProdVtxZ);
1157  Bool_t negPionIsPrimary = ((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsConversionPrimaryESD( fMCEvent, labelNegPion, mcProdVtxX, mcProdVtxY, mcProdVtxZ);
1158  Bool_t posPionIsPrimary = ((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsConversionPrimaryESD( fMCEvent, labelPosPion, mcProdVtxX, mcProdVtxY, mcProdVtxZ);
1159 
1160  if( gammaIsPrimary && negPionIsPrimary && posPionIsPrimary &&
1161  ((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->PhotonIsSelectedMC(gamma,fMCEvent,kFALSE) &&
1162  ((AliPrimaryPionCuts*)fPionCutArray->At(fiCut))->PionIsSelectedMC(labelNegPion,fMCEvent) &&
1163  ((AliPrimaryPionCuts*)fPionCutArray->At(fiCut))->PionIsSelectedMC(labelPosPion,fMCEvent) ) {
1164  if(particle->GetPdgCode() == 221)fHistoMCEtaPiPlPiMiGammaInAccPt[fiCut]->Fill(particle->Pt(), weighted ); // MC EtaDalitz with gamma and e+e- in acc
1165  }
1166  }
1167  }
1168  }
1169  }
1170 }
1171 
1172 
1173 //________________________________________________________________________
1175 
1176  // Conversion Gammas
1177  if( fGoodGammas->GetEntries() > 0 && fGoodVirtualParticles->GetEntries() > 0 ){
1178 
1179  vector<Bool_t> lGoodVirtualParticle(fGoodVirtualParticles->GetEntries(), kFALSE);
1180 
1181  for(Int_t GammaIndex=0; GammaIndex<fGoodGammas->GetEntries(); GammaIndex++){
1182 
1183  AliAODConversionPhoton *gamma=dynamic_cast<AliAODConversionPhoton*>(fGoodGammas->At(GammaIndex));
1184  if (gamma==NULL) continue;
1185  for(Int_t virtualParticleIndex=0;virtualParticleIndex<fGoodVirtualParticles->GetEntries();virtualParticleIndex++){
1186 
1187  AliAODConversionPhoton *vParticle=dynamic_cast<AliAODConversionPhoton*>(fGoodVirtualParticles->At(virtualParticleIndex));
1188  if (vParticle==NULL) continue;
1189  //Check for same Electron ID
1190  if(gamma->GetTrackLabelPositive() == vParticle->GetTrackLabelPositive() ||
1191  gamma->GetTrackLabelNegative() == vParticle->GetTrackLabelNegative() ||
1192  gamma->GetTrackLabelNegative() == vParticle->GetTrackLabelPositive() ||
1193  gamma->GetTrackLabelPositive() == vParticle->GetTrackLabelNegative() ) continue;
1194 
1195  AliAODConversionMother *etacand = new AliAODConversionMother(gamma,vParticle);
1196  etacand->SetLabels(GammaIndex,virtualParticleIndex);
1197 
1198 // if(fMCEvent){
1199 // AliESDtrack *posPionVParticle = fESDEvent->GetTrack( vParticle->GetTrackLabelNegative() );
1200 // AliESDtrack *negPionVParticle = fESDEvent->GetTrack( vParticle->GetTrackLabelPositive() );
1201 //
1202 // Int_t labeln=TMath::Abs(negPionVParticle->GetLabel());
1203 // Int_t labelp=TMath::Abs(posPionVParticle->GetLabel());
1204 //
1205 // cout << labeln << "\t" << labelp << endl;
1206 // }
1207 
1208  if( ( ((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->MesonIsSelected(etacand,kTRUE,((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetEtaShift())) ){
1209 
1210 // cout<< "Meson Accepted "<<endl;
1211 
1212  Int_t zbin= fBGHandler[fiCut]->GetZBinIndex(fESDEvent->GetPrimaryVertex()->GetZ());
1213  Int_t mbin = 0;
1214  if( ((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->UseTrackMultiplicity()){
1216  } else {
1217  mbin = fBGHandler[fiCut]->GetMultiplicityBinIndex(fGoodGammas->GetEntries());
1218  }
1219 
1220  AliESDtrack *posPionVParticle = 0;
1221  AliESDtrack *negPionVParticle = 0;
1222 
1223  Double_t clsToFPos = -1.0;
1224  Double_t clsToFNeg = -1.0;
1225 
1226  Float_t dcaToVertexXYPos = -1.0;
1227  Float_t dcaToVertexZPos = -1.0;
1228  Float_t dcaToVertexXYNeg = -1.0;
1229  Float_t dcaToVertexZNeg = -1.0;
1230 
1231 
1232  if ( fDoMesonQA ) {
1233 
1234  fHistoPionPionInvMassPt[fiCut]->Fill( vParticle->GetMass(),vParticle->Pt());
1235 
1236  posPionVParticle = fESDEvent->GetTrack( vParticle->GetTrackLabelPositive() );
1237  negPionVParticle = fESDEvent->GetTrack( vParticle->GetTrackLabelNegative() );
1238  clsToFPos = ((AliPrimaryPionCuts*)fPionCutArray->At(fiCut))->GetNFindableClustersTPC(posPionVParticle);
1239  clsToFNeg = ((AliPrimaryPionCuts*)fPionCutArray->At(fiCut))->GetNFindableClustersTPC(negPionVParticle);
1240 
1241  Float_t bPos[2];
1242  Float_t bCovPos[3];
1243  posPionVParticle->GetImpactParameters(bPos,bCovPos);
1244  if (bCovPos[0]<=0 || bCovPos[2]<=0) {
1245  AliDebug(1, "Estimated b resolution lower or equal zero!");
1246  bCovPos[0]=0; bCovPos[2]=0;
1247  }
1248 
1249  Float_t bNeg[2];
1250  Float_t bCovNeg[3];
1251  posPionVParticle->GetImpactParameters(bNeg,bCovNeg);
1252  if (bCovNeg[0]<=0 || bCovNeg[2]<=0) {
1253  AliDebug(1, "Estimated b resolution lower or equal zero!");
1254  bCovNeg[0]=0; bCovNeg[2]=0;
1255  }
1256 
1257  dcaToVertexXYPos = bPos[0];
1258  dcaToVertexZPos = bPos[1];
1259  dcaToVertexXYNeg = bNeg[0];
1260  dcaToVertexZNeg = bNeg[1];
1261  }
1262 
1263  fHistoMotherInvMassPt[fiCut]->Fill(etacand->M(),etacand->Pt());
1264  Double_t sparesFill[4] = {etacand->M(),etacand->Pt(),(Double_t)zbin,(Double_t)mbin};
1265  fTHnSparseMotherInvMassPtZM[fiCut]->Fill(sparesFill,1);
1266 
1267  if ( fDoMesonQA ) {
1268  if( lGoodVirtualParticle[virtualParticleIndex] == kFALSE ) {
1269 
1270  fHistoNegPionEta[fiCut]->Fill( negPionVParticle->Eta() );
1271  fHistoPosPionEta[fiCut]->Fill( posPionVParticle->Eta() );
1272 
1273  fHistoNegPionClsTPC[fiCut]->Fill(clsToFNeg,negPionVParticle->Pt());
1274  fHistoPosPionClsTPC[fiCut]->Fill(clsToFPos,posPionVParticle->Pt());
1275 
1276  fHistoPionDCAxy[fiCut]->Fill( dcaToVertexXYNeg, negPionVParticle->Pt() );
1277  fHistoPionDCAz[fiCut]->Fill( dcaToVertexZNeg, negPionVParticle->Pt() );
1278  fHistoPionDCAxy[fiCut]->Fill( dcaToVertexXYPos, posPionVParticle->Pt() );
1279  fHistoPionDCAz[fiCut]->Fill( dcaToVertexZPos, posPionVParticle->Pt() );
1280 
1281  fHistoPionTPCdEdxNSigma[fiCut]->Fill( posPionVParticle->P(),((AliPrimaryPionCuts*)fPionCutArray->At(fiCut))->GetPIDResponse()->NumberOfSigmasTPC(posPionVParticle, AliPID::kPion) );
1282  fHistoPionTPCdEdxNSigma[fiCut]->Fill( negPionVParticle->P(),((AliPrimaryPionCuts*)fPionCutArray->At(fiCut))->GetPIDResponse()->NumberOfSigmasTPC(negPionVParticle, AliPID::kPion) );
1283 
1284  fHistoPionTPCdEdx[fiCut]->Fill( posPionVParticle->P(), TMath::Abs(posPionVParticle->GetTPCsignal()));
1285  fHistoPionTPCdEdx[fiCut]->Fill( negPionVParticle->P(), TMath::Abs(negPionVParticle->GetTPCsignal()));
1286 
1287  lGoodVirtualParticle[virtualParticleIndex] = kTRUE;
1288 
1289  }
1290  }
1291 
1292 
1293  if(fMCEvent){
1294  ProcessTrueMesonCandidates(etacand,gamma,vParticle);
1295  }
1296  }
1297  delete etacand;
1298  etacand=0x0;
1299  }
1300  }
1301  }
1302 }
1303 
1304 //________________________________________________________________________
1306 
1307  Int_t zbin= fBGHandler[fiCut]->GetZBinIndex(fESDEvent->GetPrimaryVertex()->GetZ());
1308  Int_t mbin = 0;
1309 
1310 
1311  if(((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->UseTrackMultiplicity()){
1313  } else {
1314  mbin = fBGHandler[fiCut]->GetMultiplicityBinIndex(fGoodGammas->GetEntries());
1315  }
1316 
1317  Int_t method = 1;
1319  if( ((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->UseTrackMultiplicity() ) {
1320  for(Int_t nEventsInBG=0;nEventsInBG<fBGHandler[fiCut]->GetNBGEvents();nEventsInBG++){
1321  AliGammaConversionAODVector *previousEventV0s = fBGHandler[fiCut]->GetBGGoodV0s(zbin,mbin,nEventsInBG);
1322  if(fMoveParticleAccordingToVertex == kTRUE && method == 1){
1323  bgEventVertex = fBGHandler[fiCut]->GetBGEventVertex(zbin,mbin,nEventsInBG);
1324  }
1325 
1326  for(Int_t iCurrent=0;iCurrent<fGoodVirtualParticles->GetEntries();iCurrent++){
1327  AliAODConversionPhoton currentEventGoodV0 = *(AliAODConversionPhoton*)(fGoodVirtualParticles->At(iCurrent));
1328 
1329  for(UInt_t iPrevious=0;iPrevious<previousEventV0s->size();iPrevious++){
1330  AliAODConversionPhoton previousGoodV0 = (AliAODConversionPhoton)(*(previousEventV0s->at(iPrevious)));
1331 
1332  if(fMoveParticleAccordingToVertex == kTRUE && method == 1 ){
1333  MoveParticleAccordingToVertex(&previousGoodV0,bgEventVertex);
1334  }
1335 
1336  AliAODConversionMother *backgroundCandidate = new AliAODConversionMother(&currentEventGoodV0,&previousGoodV0);
1337 
1338 
1339  if( ( ((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->MesonIsSelected(backgroundCandidate,kFALSE, ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetEtaShift()))){
1340  fHistoMotherBackInvMassPt[fiCut]->Fill(backgroundCandidate->M(),backgroundCandidate->Pt());
1341  Double_t sparesFill[4] = {backgroundCandidate->M(),backgroundCandidate->Pt(),(Double_t)zbin,(Double_t)mbin};
1342  fTHnSparseMotherBackInvMassPtZM[fiCut]->Fill(sparesFill,1);
1343  }
1344  delete backgroundCandidate;
1345  backgroundCandidate = 0x0;
1346  }
1347  }
1348  }
1349  } else {
1350  for(Int_t nEventsInBG=0;nEventsInBG <fBGHandler[fiCut]->GetNBGEvents();nEventsInBG++){
1351  AliGammaConversionAODVector *previousEventV0s = fBGHandler[fiCut]->GetBGGoodV0s(zbin,mbin,nEventsInBG);
1352  if(previousEventV0s){
1353  if(fMoveParticleAccordingToVertex == kTRUE && method == 1){
1354  bgEventVertex = fBGHandler[fiCut]->GetBGEventVertex(zbin,mbin,nEventsInBG);
1355  }
1356  for(Int_t iCurrent=0;iCurrent<fGoodVirtualParticles->GetEntries();iCurrent++){
1357 
1358  AliAODConversionPhoton currentEventGoodV0 = *(AliAODConversionPhoton*)(fGoodVirtualParticles->At(iCurrent));
1359 
1360  for(UInt_t iPrevious=0;iPrevious<previousEventV0s->size();iPrevious++){
1361 
1362  AliAODConversionPhoton previousGoodV0 = (AliAODConversionPhoton)(*(previousEventV0s->at(iPrevious)));
1363 
1364  if(fMoveParticleAccordingToVertex == kTRUE && method ==1){
1365  MoveParticleAccordingToVertex(&previousGoodV0,bgEventVertex);
1366  }
1367 
1368  AliAODConversionMother *backgroundCandidate = new AliAODConversionMother(&currentEventGoodV0,&previousGoodV0);
1369 
1370  if((((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->MesonIsSelected(backgroundCandidate,kFALSE,((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetEtaShift()))){
1371  fHistoMotherBackInvMassPt[fiCut]->Fill(backgroundCandidate->M(),backgroundCandidate->Pt());
1372  Double_t sparesFill[4] = {backgroundCandidate->M(),backgroundCandidate->Pt(),(Double_t)zbin,(Double_t)mbin};
1373  fTHnSparseMotherBackInvMassPtZM[fiCut]->Fill(sparesFill,1);
1374  }
1375  delete backgroundCandidate;
1376  backgroundCandidate = 0x0;
1377  }
1378  }
1379  }
1380  }
1381  }
1382 }
1383 
1384 //______________________________________________________________________
1386 
1387  // Process True Mesons
1388 
1389  if( TrueGammaCandidate->GetV0Index()<fESDEvent->GetNumberOfV0s() ){
1390 
1391  Bool_t isTrueEta = kFALSE;
1392  Int_t gammaMCLabel = TrueGammaCandidate->GetMCParticleLabel(fMCEvent);
1393  Int_t gammaMotherLabel = -1;
1394 // Bool_t gammaEtaCand = kFALSE;
1395 
1396  if(gammaMCLabel != -1){ // Gamma is Combinatorial; MC Particles don't belong to the same Mother
1397  // Daughters Gamma 0
1398  TParticle * negativeMC = (TParticle*)TrueGammaCandidate->GetNegativeMCDaughter(fMCEvent);
1399  TParticle * positiveMC = (TParticle*)TrueGammaCandidate->GetPositiveMCDaughter(fMCEvent);
1400  TParticle * gammaMC = (TParticle*)fMCEvent->Particle(gammaMCLabel);
1401 
1402  if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){ // Electrons ...
1403  if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){ // ... From Conversion ...
1404  if(gammaMC->GetPdgCode() == 22){ // ... with Gamma Mother
1405  gammaMotherLabel=gammaMC->GetFirstMother();
1406 // if( ((TParticle*)fMCEvent->Particle(gammaMotherLabel))->GetNDaughters() == 3 && ((TParticle*)fMCEvent->Particle(gammaMotherLabel))->GetPdgCode() == 221 ) gammaEtaCand = kTRUE;
1407  }
1408  }
1409  }
1410 
1411 
1412  }
1413 
1414  Int_t virtualParticleMCLabel = TrueVirtualParticleCandidate->GetMCParticleLabel(fMCEvent);
1415  Int_t virtualParticleMotherLabel = -1;
1416 
1417  Bool_t isPiPiDecay = kFALSE;
1418  Bool_t isDalitz = kFALSE;
1419  Bool_t isRealGamma = kFALSE;
1420 
1421  if (fDoMesonQA){
1422  TParticle * negativeMC = (TParticle*)TrueVirtualParticleCandidate->GetNegativeMCDaughter(fMCEvent);
1423  TParticle * positiveMC = (TParticle*)TrueVirtualParticleCandidate->GetPositiveMCDaughter(fMCEvent);
1424 // if (gammaEtaCand){
1425 // cout << "neg Part: label - " << TrueVirtualParticleCandidate->GetMCLabelNegative() <<" pdg-code - " << negativeMC->GetPdgCode() << endl;
1426 // cout << "pos Part: label - " << TrueVirtualParticleCandidate->GetMCLabelPositive() <<" pdg-code - " << positiveMC->GetPdgCode() << endl;
1427 // }
1428  if(TMath::Abs(negativeMC->GetPdgCode())==211 && TMath::Abs(positiveMC->GetPdgCode())==211){ // Pions ...
1429  fHistoTruePionPionInvMassPt[fiCut]->Fill(TrueVirtualParticleCandidate->GetMass(),TrueVirtualParticleCandidate->Pt());
1430  }
1431  }
1432 
1433  if(virtualParticleMCLabel != -1){ // if virtualParticleMCLabel==-1 particles don't have same mother
1434  TParticle * negativeMC = (TParticle*)TrueVirtualParticleCandidate->GetNegativeMCDaughter(fMCEvent);
1435  TParticle * positiveMC = (TParticle*)TrueVirtualParticleCandidate->GetPositiveMCDaughter(fMCEvent);
1436  TParticle * virtualParticleMotherMC = (TParticle*)fMCEvent->Particle(virtualParticleMCLabel);
1437 // cout << "pdg code same mother - " << virtualParticleMotherMC->GetPdgCode() << endl;
1438 
1439  if(TMath::Abs(negativeMC->GetPdgCode())==211 && TMath::Abs(positiveMC->GetPdgCode())==211){ // Pions ...
1440  virtualParticleMotherLabel=virtualParticleMCLabel;
1441  isPiPiDecay=kTRUE;
1442  } else if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){ // Electrons ...
1443  if( virtualParticleMotherMC->GetPdgCode() != 22 ){
1444  virtualParticleMotherLabel=virtualParticleMCLabel;
1445  isDalitz = kTRUE;
1446  } else if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){ // ... From Conversion ...
1447  virtualParticleMotherLabel=virtualParticleMotherMC->GetFirstMother();
1448  isRealGamma = kTRUE; //no virtual gamma
1449  }
1450  }
1451  }
1452 
1453  if(gammaMotherLabel >= 0 && ( gammaMotherLabel == virtualParticleMotherLabel) ){
1454  if(((TParticle*)fMCEvent->Particle(virtualParticleMotherLabel))->GetPdgCode() == 221){
1455  isTrueEta=kTRUE;
1456  if (CheckVectorForDoubleCount(fVectorDoubleCountTrueEtas,gammaMotherLabel)) fHistoDoubleCountTrueEtaInvMassPt[fiCut]->Fill(EtaCandidate->M(),EtaCandidate->Pt());
1457  }
1458  }
1459 
1460  if( isTrueEta ){ // True Eta
1461  if ( isPiPiDecay) { //real eta -> Pi+ Pi- Gamma
1462  Float_t weighted= 1;
1463  if( ((AliPrimaryPionCuts*) fPionCutArray->At(fiCut))->DoWeights() ) {
1464  if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(gammaMotherLabel, fMCEvent,fInputEvent)){
1465  if (((TParticle*)fMCEvent->Particle(gammaMotherLabel))->Pt()>0.005){
1466  weighted= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(gammaMotherLabel,fMCEvent,fInputEvent);
1467  }
1468  }
1469  }
1470  fHistoTruePionPionFromEtaInvMassPt[fiCut]->Fill(TrueVirtualParticleCandidate->GetMass(),TrueVirtualParticleCandidate->Pt());
1471  fHistoTrueMotherPiPlPiMiGammaInvMassPt[fiCut]->Fill(EtaCandidate->M(),EtaCandidate->Pt(),weighted);
1472  } else if ( isRealGamma ){
1473  Float_t weighted= 1;
1474  if( ((AliPrimaryPionCuts*) fPionCutArray->At(fiCut))->DoWeights() ) {
1475  if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(gammaMotherLabel, fMCEvent,fInputEvent)){
1476  if (((TParticle*)fMCEvent->Particle(gammaMotherLabel))->Pt()>0.005){
1477  weighted= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(gammaMotherLabel,fMCEvent,fInputEvent);
1478  }
1479  }
1480  }
1481 
1482  fHistoTrueMotherGammaGammaInvMassPt[fiCut]->Fill(EtaCandidate->M(),EtaCandidate->Pt(),weighted);
1483  } else if (isDalitz) {
1484  Float_t weighted= 1;
1485  if( ((AliPrimaryPionCuts*) fPionCutArray->At(fiCut))->DoWeights() ) {
1486  if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(gammaMotherLabel, fMCEvent,fInputEvent)){
1487  if (((TParticle*)fMCEvent->Particle(gammaMotherLabel))->Pt()>0.005){
1488  weighted= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(gammaMotherLabel,fMCEvent,fInputEvent);
1489  }
1490  }
1491  }
1492  fHistoTrueMotherDalitzInvMassPt[fiCut]->Fill(EtaCandidate->M(),EtaCandidate->Pt(),weighted);
1493  }
1494  }
1495  }
1496 }
1497 
1498 
1499 //________________________________________________________________________
1501  //see header file for documentation
1502 
1503  Int_t method = 1;
1504  if( method == 1 ) {
1505  if(fGoodGammas->GetEntries() >0 ){
1506  if(((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->UseTrackMultiplicity()){
1507  fBGHandler[fiCut]->AddEvent(fGoodGammas,fInputEvent->GetPrimaryVertex()->GetX(),fInputEvent->GetPrimaryVertex()->GetY(),fInputEvent->GetPrimaryVertex()->GetZ(),fV0Reader->GetNumberOfPrimaryTracks(),0);
1508  } else{ // means we use #V0s for multiplicity
1509  fBGHandler[fiCut]->AddEvent(fGoodGammas,fInputEvent->GetPrimaryVertex()->GetX(),fInputEvent->GetPrimaryVertex()->GetY(),fInputEvent->GetPrimaryVertex()->GetZ(),fGoodGammas->GetEntries(),0);
1510  }
1511  }
1512  } else if ( method == 2 ){
1513  if(fGoodVirtualParticles->GetEntries() > 0 ){
1514  if(((AliConversionMesonCuts*)fMesonCutArray->At(fiCut))->UseTrackMultiplicity()){
1515  fBGHandler[fiCut]->AddEvent(fGoodVirtualParticles,fInputEvent->GetPrimaryVertex()->GetX(),fInputEvent->GetPrimaryVertex()->GetY(),fInputEvent->GetPrimaryVertex()->GetZ(),fV0Reader->GetNumberOfPrimaryTracks(),0);
1516  } else{ // means we use #V0s for multiplicity
1517  fBGHandler[fiCut]->AddEvent(fGoodVirtualParticles,fInputEvent->GetPrimaryVertex()->GetX(),fInputEvent->GetPrimaryVertex()->GetY(),fInputEvent->GetPrimaryVertex()->GetZ(),fGoodVirtualParticles->GetEntries(),0);
1518  }
1519  }
1520  }
1521 }
1522 
1523 //________________________________________________________________________
1525  //see header file for documentation
1526 
1527  Double_t dx = vertex->fX - fInputEvent->GetPrimaryVertex()->GetX();
1528  Double_t dy = vertex->fY - fInputEvent->GetPrimaryVertex()->GetY();
1529  Double_t dz = vertex->fZ - fInputEvent->GetPrimaryVertex()->GetZ();
1530 
1531  Double_t movedPlace[3] = {particle->GetConversionX() - dx,particle->GetConversionY() - dy,particle->GetConversionZ() - dz};
1532  particle->SetConversionPoint(movedPlace);
1533 }
1534 
1535 //_____________________________________________________________________________________
1537 //
1538 // Returns true if the particle comes from eta -> pi+ pi- gamma
1539 //
1540  Int_t motherLabel = fMCEvent->Particle( label )->GetMother(0);
1541  if( motherLabel < 0 || motherLabel >= fMCEvent->GetNumberOfTracks() ) return kFALSE;
1542 
1543  TParticle* mother = fMCEvent->Particle( motherLabel );
1544  if( mother->GetPdgCode() != 221 ) return kFALSE;
1545  if( IsPiPlPiMiGammaDecay( mother ) ) return kTRUE;
1546  return kFALSE;
1547 }
1548 
1549 //_____________________________________________________________________________
1551 {
1552 
1553  if( fMCMother->GetNDaughters() != 3 ) return kFALSE;
1554  if( fMCMother->GetPdgCode() != 221 ) return kFALSE;
1555 
1556 
1557  TParticle *posPion = 0x0;
1558  TParticle *negPion = 0x0;
1559  TParticle *gamma = 0x0;
1560 
1561  for(Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
1562  TParticle* temp = (TParticle*)fMCEvent->Particle( index );
1563 
1564  switch( temp->GetPdgCode() ) {
1565  case 211:
1566  posPion = temp;
1567  break;
1568  case -211:
1569  negPion = temp;
1570  break;
1571  case ::kGamma:
1572  gamma = temp;
1573  break;
1574  }
1575  }
1576 
1577  if( posPion && negPion && gamma) return kTRUE;
1578 
1579  return kFALSE;
1580 }
1581 
1582 //_________________________________________________________________________________
1584 {
1585  if(tobechecked > -1)
1586  {
1587  vector<Int_t>::iterator it;
1588  it = find (vec.begin(), vec.end(), tobechecked);
1589  if (it != vec.end()) return true;
1590  else{
1591  vec.push_back(tobechecked);
1592  return false;
1593  }
1594  }
1595  return false;
1596 }
TParticle * GetMCParticle(AliMCEvent *mcEvent)
vector< Int_t > GetReconstructedPosPionIndex()
void SetLabels(Int_t label1, Int_t label2, Int_t label3=0)
double Double_t
Definition: External.C:58
GammaConversionVertex * GetBGEventVertex(Int_t zbin, Int_t mbin, Int_t event)
Definition: External.C:236
void SetConversionPoint(Double_t convpoint[3])
void MoveParticleAccordingToVertex(AliAODConversionPhoton *particle, const AliGammaConversionAODBGHandler::GammaConversionVertex *vertex)
Int_t GetNumberOfPrimaryTracks()
TString GetPeriodName()
TParticle * GetPositiveMCDaughter(AliMCEvent *mcEvent)
TH1I ** fHistoNEvents
vector containing labels of validated photons
TH2F ** fHistoDoubleCountTrueConvGammaRPt
array of histos with double counted etas, invMass, pT
TParticle * GetNegativeMCDaughter(AliMCEvent *mcEvent)
void ProcessTrueMesonCandidates(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate, AliAODConversionPhoton *TrueVirtualGammaCandidate)
std::vector< AliAODConversionPhoton * > AliGammaConversionAODVector
int Int_t
Definition: External.C:63
Definition: External.C:204
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
void AddEvent(TList *const eventGammas, Double_t xvalue, Double_t yvalue, Double_t zvalue, Int_t multiplicity, Double_t epvalue=-100)
Bool_t CheckVectorForDoubleCount(vector< Int_t > &vec, Int_t tobechecked)
Int_t method
AliConversionPhotonCuts * GetConversionCuts()
Definition: AliV0ReaderV1.h:89
void ProcessTruePhotonCandidates(AliAODConversionPhoton *)
Class handling all kinds of selection cuts for Gamma Conversion analysis.
unsigned long ULong_t
Definition: External.C:38
Int_t GetMCParticleLabel(AliMCEvent *mcEvent)
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)
Double_t centMax
AliGammaConversionAODBGHandler ** fBGHandler
AliGammaConversionAODVector * GetBGGoodV0s(Int_t zbin, Int_t mbin, Int_t event)
Class handling all kinds of selection cuts for Gamma Conversion analysis.
TClonesArray * GetReconstructedGammas() const
Definition: AliV0ReaderV1.h:85
AliPrimaryPionCuts * GetPrimaryPionCuts()
Bool_t IsPiPlPiMiGammaDecay(TParticle *fMCMother) const
Class handling all kinds of selection cuts for Gamma Conversion analysis.
AliConvEventCuts * GetEventCuts()
Definition: AliV0ReaderV1.h:90
vector< Int_t > fVectorDoubleCountTrueEtas
array of histos with double counted photons, R, pT
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
vector< Int_t > GetReconstructedNegPionIndex()
vector< Int_t > fVectorDoubleCountTrueConvGammas
vector containing labels of validated eta
Double_t GetConversionRadius() const
Double_t centMin