1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Authors: Svein Lindal, Daniel Lohner *
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 **************************************************************************/
16 ////////////////////////////////////////////////
17 //---------------------------------------------
18 // Class handling all kinds of selection cuts for
19 // Gamma Conversion analysis
20 //---------------------------------------------
21 ////////////////////////////////////////////////
23 #include "AliConversionCuts.h"
25 #include "AliKFVertex.h"
26 #include "AliAODTrack.h"
27 #include "AliESDtrack.h"
28 #include "AliAnalysisManager.h"
29 #include "AliInputEventHandler.h"
30 #include "AliMCEventHandler.h"
31 #include "AliAODHandler.h"
32 #include "AliPIDResponse.h"
36 #include "AliAODConversionMother.h"
37 #include "TObjString.h"
38 #include "AliAODEvent.h"
39 #include "AliESDEvent.h"
40 #include "AliCentrality.h"
43 #include "AliGenCocktailEventHeader.h"
44 #include "AliGenDPMjetEventHeader.h"
45 #include "AliGenPythiaEventHeader.h"
46 #include "AliGenHijingEventHeader.h"
47 #include "AliTriggerAnalysis.h"
48 #include "AliV0ReaderV1.h"
54 ClassImp(AliConversionCuts)
57 const char* AliConversionCuts::fgkCutNames[AliConversionCuts::kNCuts] = {
73 "piMaxMomdedxSigmaCut",
74 "LowPRejectionSigmaCut",
79 "DoPhotonAsymmetryCut",
80 "CosinePointingAngle",
86 //________________________________________________________________________
87 AliConversionCuts::AliConversionCuts(const char *name,const char *title) :
88 AliAnalysisCuts(name,title),
104 fLineCutZRSlopeMin(0.),
105 fLineCutZValueMin(0),
106 fChi2CutConversion(1000),
107 fPIDProbabilityCutNegativeParticle(0),
108 fPIDProbabilityCutPositiveParticle(0),
109 fDodEdxSigmaCut(kTRUE),
110 fDoTOFsigmaCut(kFALSE),
111 fPIDTRDEfficiency(1),
113 fPIDnSigmaAboveElectronLine(100),
114 fPIDnSigmaBelowElectronLine(-100),
115 fTofPIDnSigmaAboveElectronLine(100),
116 fTofPIDnSigmaBelowElectronLine(-100),
117 fPIDnSigmaAbovePionLine(0),
118 fPIDnSigmaAbovePionLineHighPt(-100),
119 fPIDMinPnSigmaAbovePionLine(0),
120 fPIDMaxPnSigmaAbovePionLine(0),
121 fDoKaonRejectionLowP(kFALSE),
122 fDoProtonRejectionLowP(kFALSE),
123 fDoPionRejectionLowP(kFALSE),
124 fPIDnSigmaAtLowPAroundKaonLine(0),
125 fPIDnSigmaAtLowPAroundProtonLine(0),
126 fPIDnSigmaAtLowPAroundPionLine(0),
127 fPIDMinPKaonRejectionLowP(1.5),
128 fPIDMinPProtonRejectionLowP(2),
129 fPIDMinPPionRejectionLowP(0),
130 fDoQtGammaSelection(kTRUE),
131 fDoHighPtQtGammaSelection(kFALSE),
139 fUseEtaMinCut(kFALSE),
140 fUseOnFlyV0Finder(kTRUE),
141 fDoPhotonAsymmetryCut(kTRUE),
142 fMinPPhotonAsymmetryCut(100.),
143 fMinPhotonAsymmetry(0.),
145 fDetectorCentrality(0),
146 fModCentralityClass(0),
150 fUseCorrectedTPCClsInfo(kFALSE),
152 fMultiplicityMethod(0),
154 fRemovePileUp(kFALSE),
155 fOpeningAngle(0.005),
157 fCosPAngleCut(10000),
158 fDoToCloseV0sCut(kFALSE),
159 fRejectExtraSignals(0),
161 fDoSharedElecCut(kFALSE),
162 fOfflineTriggerMask(0),
166 fElectronArraySize(500),
167 fElectronLabelArray(NULL),
168 fConversionPointXArray(0.0),
169 fConversionPointYArray(0.0),
170 fConversionPointZArray(0.0),
172 fNotRejectedStart(NULL),
173 fNotRejectedEnd(NULL),
174 fGeneratorNames(NULL),
181 hTPCdEdxbefore(NULL),
183 hTPCdEdxSigbefore(NULL),
184 hTPCdEdxSigafter(NULL),
190 hInvMassbefore(NULL),
191 hArmenterosbefore(NULL),
193 hArmenterosafter(NULL),
194 hAcceptanceCuts(NULL),
200 hTriggerClassSelected(NULL)
204 for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=0;}
205 fCutString=new TObjString((GetCutNumber()).Data());
207 fElectronLabelArray = new Int_t[fElectronArraySize];
208 fUtils = new AliAnalysisUtils();
209 //if you do not want to apply the cut on the distance between the SPD and TRK vertex:
210 //fUtils->SetCutOnZVertexSPD(kFALSE);
215 //________________________________________________________________________
216 AliConversionCuts::AliConversionCuts(const AliConversionCuts &ref) :
217 AliAnalysisCuts(ref),
219 fHeaderList(ref.fHeaderList),
221 fEventQuality(ref.fEventQuality),
224 fEtaCut(ref.fEtaCut),
225 fEtaCutMin(ref.fEtaCutMin),
227 fSinglePtCut(ref.fSinglePtCut),
229 fMinClsTPC(ref.fMinClsTPC),
230 fMinClsTPCToF(ref.fMinClsTPCToF),
231 fLineCutZRSlope(ref.fLineCutZRSlope),
232 fLineCutZValue(ref.fLineCutZValue),
233 fLineCutZRSlopeMin(ref.fLineCutZRSlopeMin),
234 fLineCutZValueMin(ref.fLineCutZValueMin),
235 fChi2CutConversion(ref.fChi2CutConversion),
236 fPIDProbabilityCutNegativeParticle(ref.fPIDProbabilityCutNegativeParticle),
237 fPIDProbabilityCutPositiveParticle(ref.fPIDProbabilityCutPositiveParticle),
238 fDodEdxSigmaCut(ref. fDodEdxSigmaCut),
239 fDoTOFsigmaCut(ref.fDoTOFsigmaCut),
240 fPIDTRDEfficiency(ref.fPIDTRDEfficiency),
241 fDoTRDPID(ref.fDoTRDPID),
242 fPIDnSigmaAboveElectronLine(ref.fPIDnSigmaAboveElectronLine),
243 fPIDnSigmaBelowElectronLine(ref.fPIDnSigmaBelowElectronLine),
244 fTofPIDnSigmaAboveElectronLine(ref.fTofPIDnSigmaAboveElectronLine),
245 fTofPIDnSigmaBelowElectronLine(ref.fTofPIDnSigmaBelowElectronLine),
246 fPIDnSigmaAbovePionLine(ref.fPIDnSigmaAbovePionLine),
247 fPIDnSigmaAbovePionLineHighPt(ref.fPIDnSigmaAbovePionLineHighPt),
248 fPIDMinPnSigmaAbovePionLine(ref.fPIDMinPnSigmaAbovePionLine),
249 fPIDMaxPnSigmaAbovePionLine(ref.fPIDMaxPnSigmaAbovePionLine),
250 fDoKaonRejectionLowP(ref.fDoKaonRejectionLowP),
251 fDoProtonRejectionLowP(ref.fDoProtonRejectionLowP),
252 fDoPionRejectionLowP(ref.fDoPionRejectionLowP),
253 fPIDnSigmaAtLowPAroundKaonLine(ref.fPIDnSigmaAtLowPAroundKaonLine),
254 fPIDnSigmaAtLowPAroundProtonLine(ref.fPIDnSigmaAtLowPAroundProtonLine),
255 fPIDnSigmaAtLowPAroundPionLine(ref.fPIDnSigmaAtLowPAroundPionLine),
256 fPIDMinPKaonRejectionLowP(ref.fPIDMinPKaonRejectionLowP),
257 fPIDMinPProtonRejectionLowP(ref.fPIDMinPProtonRejectionLowP),
258 fPIDMinPPionRejectionLowP(ref.fPIDMinPPionRejectionLowP),
259 fDoQtGammaSelection(ref.fDoQtGammaSelection),
260 fDoHighPtQtGammaSelection(ref.fDoHighPtQtGammaSelection),
262 fHighPtQtMax(ref.fHighPtQtMax),
263 fPtBorderForQt(ref.fPtBorderForQt),
264 fXVertexCut(ref.fXVertexCut),
265 fYVertexCut(ref.fYVertexCut),
266 fZVertexCut(ref.fZVertexCut),
267 fNSigmaMass(ref.fNSigmaMass),
268 fUseEtaMinCut(ref.fUseEtaMinCut),
269 fUseOnFlyV0Finder(ref.fUseOnFlyV0Finder),
270 fDoPhotonAsymmetryCut(ref.fDoPhotonAsymmetryCut),
271 fMinPPhotonAsymmetryCut(ref.fMinPPhotonAsymmetryCut),
272 fMinPhotonAsymmetry(ref.fMinPhotonAsymmetry),
273 fIsHeavyIon(ref.fIsHeavyIon),
274 fDetectorCentrality(ref.fDetectorCentrality),
275 fModCentralityClass(ref.fModCentralityClass),
276 fMaxVertexZ(ref.fMaxVertexZ),
277 fCentralityMin(ref.fCentralityMin),
278 fCentralityMax(ref.fCentralityMax),
279 fUseCorrectedTPCClsInfo(ref.fUseCorrectedTPCClsInfo),
280 fUseTOFpid(ref.fUseTOFpid),
281 fMultiplicityMethod(ref.fMultiplicityMethod),
282 fSpecialTrigger(ref.fSpecialTrigger),
283 fRemovePileUp(ref.fRemovePileUp),
284 fOpeningAngle(ref.fOpeningAngle),
285 fPsiPairCut(ref.fPsiPairCut),
286 fCosPAngleCut(ref.fCosPAngleCut),
287 fDoToCloseV0sCut(ref.fDoToCloseV0sCut),
288 fRejectExtraSignals(ref.fRejectExtraSignals),
289 fminV0Dist(ref.fminV0Dist),
290 fDoSharedElecCut(ref.fDoSharedElecCut),
291 fOfflineTriggerMask(ref.fOfflineTriggerMask),
292 fHasV0AND(ref.fHasV0AND),
293 fIsSDDFired(ref.fIsSDDFired),
294 fRandom(ref.fRandom),
295 fElectronArraySize(ref.fElectronArraySize),
296 fElectronLabelArray(NULL),
297 fConversionPointXArray(ref.fConversionPointXArray),
298 fConversionPointYArray(ref.fConversionPointYArray),
299 fConversionPointZArray(ref.fConversionPointZArray),
300 fnHeaders(ref.fnHeaders),
301 fNotRejectedStart(NULL),
302 fNotRejectedEnd(NULL),
303 fGeneratorNames(ref.fGeneratorNames),
306 fEtaShift(ref.fEtaShift),
307 fDoEtaShift(ref.fDoEtaShift),
308 fForceEtaShift(ref.fForceEtaShift),
310 hTPCdEdxbefore(NULL),
312 hTPCdEdxSigbefore(NULL),
313 hTPCdEdxSigafter(NULL),
319 hInvMassbefore(NULL),
320 hArmenterosbefore(NULL),
322 hArmenterosafter(NULL),
323 hAcceptanceCuts(NULL),
329 hTriggerClassSelected(NULL)
332 for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=ref.fCuts[jj];}
333 fCutString=new TObjString((GetCutNumber()).Data());
334 fElectronLabelArray = new Int_t[fElectronArraySize];
335 fUtils = new AliAnalysisUtils();
336 // dont copy histograms (if you like histograms, call InitCutHistograms())
341 //________________________________________________________________________
342 AliConversionCuts::~AliConversionCuts() {
344 //Deleting fHistograms leads to seg fault it it's added to output collection of a task
346 // delete fHistograms;
347 // fHistograms = NULL;
348 if(fCutString != NULL){
352 if(fElectronLabelArray){
353 delete fElectronLabelArray;
354 fElectronLabelArray = NULL;
356 if(fNotRejectedStart){
357 delete[] fNotRejectedStart;
358 fNotRejectedStart = NULL;
361 delete[] fNotRejectedEnd;
362 fNotRejectedEnd = NULL;
365 delete[] fGeneratorNames;
366 fGeneratorNames = NULL;
375 //________________________________________________________________________
376 void AliConversionCuts::InitCutHistograms(TString name, Bool_t preCut){
378 // Initialize Cut Histograms for QA (only initialized and filled if function is called)
380 if(fHistograms != NULL){
384 if(fHistograms==NULL){
385 fHistograms=new TList();
386 if(name=="")fHistograms->SetName(Form("ConvCuts_%s",GetCutNumber().Data()));
387 else fHistograms->SetName(Form("%s_%s",name.Data(),GetCutNumber().Data()));
391 hCutIndex=new TH1F(Form("IsPhotonSelected %s",GetCutNumber().Data()),"IsPhotonSelected",10,-0.5,9.5);
392 hCutIndex->GetXaxis()->SetBinLabel(kPhotonIn+1,"in");
393 hCutIndex->GetXaxis()->SetBinLabel(kOnFly+1,"onfly");
394 hCutIndex->GetXaxis()->SetBinLabel(kNoTracks+1,"no tracks");
395 hCutIndex->GetXaxis()->SetBinLabel(kdEdxCuts+1,"dEdx");
396 hCutIndex->GetXaxis()->SetBinLabel(kTrackCuts+1,"Track cuts");
397 hCutIndex->GetXaxis()->SetBinLabel(kConvPointFail+1,"ConvPoint fail");
398 hCutIndex->GetXaxis()->SetBinLabel(kPhotonCuts+1,"PhotonCuts");
399 hCutIndex->GetXaxis()->SetBinLabel(kPhotonOut+1,"out");
400 fHistograms->Add(hCutIndex);
403 hTrackCuts=new TH1F(Form("TrackCuts %s",GetCutNumber().Data()),"TrackCuts",9,-0.5,8.5);
404 hTrackCuts->GetXaxis()->SetBinLabel(1,"in");
405 hTrackCuts->GetXaxis()->SetBinLabel(2,"likesign");
406 hTrackCuts->GetXaxis()->SetBinLabel(3,"ntpccl");
407 hTrackCuts->GetXaxis()->SetBinLabel(4,"acceptance");
408 hTrackCuts->GetXaxis()->SetBinLabel(5,"singlept");
409 hTrackCuts->GetXaxis()->SetBinLabel(6,"TPCrefit");
410 hTrackCuts->GetXaxis()->SetBinLabel(7,"kink");
411 hTrackCuts->GetXaxis()->SetBinLabel(8,"out");
412 fHistograms->Add(hTrackCuts);
415 hPhotonCuts=new TH1F(Form("PhotonCuts %s",GetCutNumber().Data()),"PhotonCuts",12,-0.5,11.5);
416 hPhotonCuts->GetXaxis()->SetBinLabel(1,"in");
417 hPhotonCuts->GetXaxis()->SetBinLabel(2,"qtcut");
418 hPhotonCuts->GetXaxis()->SetBinLabel(3,"chi2");
419 hPhotonCuts->GetXaxis()->SetBinLabel(4,"acceptance");
420 hPhotonCuts->GetXaxis()->SetBinLabel(5,"asymmetry");
421 hPhotonCuts->GetXaxis()->SetBinLabel(6,"pidprob");
422 hPhotonCuts->GetXaxis()->SetBinLabel(7,"cortpcclinfo");
423 hPhotonCuts->GetXaxis()->SetBinLabel(8,"PsiPair");
424 hPhotonCuts->GetXaxis()->SetBinLabel(9,"CosPAngle");
425 hPhotonCuts->GetXaxis()->SetBinLabel(10,"out");
426 fHistograms->Add(hPhotonCuts);
429 hInvMassbefore=new TH1F(Form("InvMass_before %s",GetCutNumber().Data()),"InvMass_before",1000,0,0.3);
430 fHistograms->Add(hInvMassbefore);
431 hArmenterosbefore=new TH2F(Form("Armenteros_before %s",GetCutNumber().Data()),"Armenteros_before",200,-1,1,1000,0,1.);
432 fHistograms->Add(hArmenterosbefore);
434 hInvMassafter=new TH1F(Form("InvMass_after %s",GetCutNumber().Data()),"InvMass_after",1000,0,0.3);
435 fHistograms->Add(hInvMassafter);
436 hArmenterosafter=new TH2F(Form("Armenteros_after %s",GetCutNumber().Data()),"Armenteros_after",200,-1,1,250,0,0.25);
437 fHistograms->Add(hArmenterosafter);
439 hAcceptanceCuts=new TH1F(Form("PhotonAcceptanceCuts %s",GetCutNumber().Data()),"PhotonAcceptanceCuts",10,-0.5,9.5);
440 hAcceptanceCuts->GetXaxis()->SetBinLabel(1,"in");
441 hAcceptanceCuts->GetXaxis()->SetBinLabel(2,"maxR");
442 hAcceptanceCuts->GetXaxis()->SetBinLabel(3,"minR");
443 hAcceptanceCuts->GetXaxis()->SetBinLabel(4,"line");
444 hAcceptanceCuts->GetXaxis()->SetBinLabel(5,"maxZ");
445 hAcceptanceCuts->GetXaxis()->SetBinLabel(6,"eta");
446 hAcceptanceCuts->GetXaxis()->SetBinLabel(7,"minpt");
447 hAcceptanceCuts->GetXaxis()->SetBinLabel(8,"out");
448 fHistograms->Add(hAcceptanceCuts);
451 hdEdxCuts=new TH1F(Form("dEdxCuts %s",GetCutNumber().Data()),"dEdxCuts",10,-0.5,9.5);
452 hdEdxCuts->GetXaxis()->SetBinLabel(1,"in");
453 hdEdxCuts->GetXaxis()->SetBinLabel(2,"TPCelectron");
454 hdEdxCuts->GetXaxis()->SetBinLabel(3,"TPCpion");
455 hdEdxCuts->GetXaxis()->SetBinLabel(4,"TPCpionhighp");
456 hdEdxCuts->GetXaxis()->SetBinLabel(5,"TPCkaonlowprej");
457 hdEdxCuts->GetXaxis()->SetBinLabel(6,"TPCprotonlowprej");
458 hdEdxCuts->GetXaxis()->SetBinLabel(7,"TPCpionlowprej");
459 hdEdxCuts->GetXaxis()->SetBinLabel(8,"TOFelectron");
460 hdEdxCuts->GetXaxis()->SetBinLabel(9,"TRDelectron");
461 hdEdxCuts->GetXaxis()->SetBinLabel(10,"out");
462 fHistograms->Add(hdEdxCuts);
464 TAxis *AxisBeforedEdx = NULL;
465 TAxis *AxisBeforedEdxSig = NULL;
466 TAxis *AxisBeforeTOF = NULL;
467 TAxis *AxisBeforeTOFSig = NULL;
469 hTPCdEdxbefore=new TH2F(Form("Gamma_dEdx_before %s",GetCutNumber().Data()),"dEdx Gamma before" ,150,0.03,20,800,0,200);
470 fHistograms->Add(hTPCdEdxbefore);
471 AxisBeforedEdx = hTPCdEdxbefore->GetXaxis();
472 hTPCdEdxSigbefore=new TH2F(Form("Gamma_dEdxSig_before %s",GetCutNumber().Data()),"dEdx Sigma Gamma before" ,150,0.03,20,400,-10,10);
473 fHistograms->Add(hTPCdEdxSigbefore);
474 AxisBeforedEdxSig = hTPCdEdxSigbefore->GetXaxis();
476 hTOFbefore=new TH2F(Form("Gamma_TOF_before %s",GetCutNumber().Data()),"TOF Gamma before" ,150,0.03,20,11000,-1000,10000);
477 fHistograms->Add(hTOFbefore);
478 AxisBeforeTOF = hTOFbefore->GetXaxis();
479 hTOFSigbefore=new TH2F(Form("Gamma_TOFSig_before %s",GetCutNumber().Data()),"TOF Sigma Gamma before" ,150,0.03,20,400,-6,10);
480 fHistograms->Add(hTOFSigbefore);
481 AxisBeforeTOFSig = hTOFSigbefore->GetXaxis();
484 hTPCdEdxSigafter=new TH2F(Form("Gamma_dEdxSig_after %s",GetCutNumber().Data()),"dEdx Sigma Gamma after" ,150,0.03,20,400, -10,10);
485 fHistograms->Add(hTPCdEdxSigafter);
487 hTPCdEdxafter=new TH2F(Form("Gamma_dEdx_after %s",GetCutNumber().Data()),"dEdx Gamma after" ,150,0.03,20,800,0,200);
488 fHistograms->Add(hTPCdEdxafter);
490 hTOFSigafter=new TH2F(Form("Gamma_TOFSig_after %s",GetCutNumber().Data()),"TOF Sigma Gamma after" ,150,0.03,20,400,-6,10);
491 fHistograms->Add(hTOFSigafter);
493 TAxis *AxisAfter = hTPCdEdxSigafter->GetXaxis();
494 Int_t bins = AxisAfter->GetNbins();
495 Double_t from = AxisAfter->GetXmin();
496 Double_t to = AxisAfter->GetXmax();
497 Double_t *newBins = new Double_t[bins+1];
499 Double_t factor = TMath::Power(to/from, 1./bins);
500 for(Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1];
501 AxisAfter->Set(bins, newBins);
502 AxisAfter = hTOFSigafter->GetXaxis();
503 AxisAfter->Set(bins, newBins);
504 AxisAfter = hTPCdEdxafter->GetXaxis();
505 AxisAfter->Set(bins, newBins);
507 AxisBeforedEdx->Set(bins, newBins);
508 AxisBeforeTOF->Set(bins, newBins);
509 AxisBeforedEdxSig->Set(bins, newBins);
510 AxisBeforeTOFSig->Set(bins, newBins);
514 // Event Cuts and Info
516 hV0EventCuts=new TH1F(Form("ESD_EventCuts %s",GetCutNumber().Data()),"Event Cuts",7,-0.5,6.5);
517 hV0EventCuts->GetXaxis()->SetBinLabel(1,"in");
518 hV0EventCuts->GetXaxis()->SetBinLabel(2,"OfflineTrigger");
519 hV0EventCuts->GetXaxis()->SetBinLabel(3,"nvtxcontr");
520 hV0EventCuts->GetXaxis()->SetBinLabel(4,"VertexZ");
521 hV0EventCuts->GetXaxis()->SetBinLabel(5,"pileup");
522 hV0EventCuts->GetXaxis()->SetBinLabel(6,"centrsel");
523 hV0EventCuts->GetXaxis()->SetBinLabel(7,"out");
524 fHistograms->Add(hV0EventCuts);
526 hCentrality=new TH1F(Form("Centrality %s",GetCutNumber().Data()),"Centrality",100,0,100);
527 fHistograms->Add(hCentrality);
528 hVertexZ=new TH1F(Form("VertexZ %s",GetCutNumber().Data()),"VertexZ",1000,-50,50);
529 fHistograms->Add(hVertexZ);
531 hTriggerClass= new TH1F(Form("OfflineTrigger %s",GetCutNumber().Data()),"OfflineTrigger",35,-0.5,34.5);
532 hTriggerClass->GetXaxis()->SetBinLabel( 1,"kMB");
533 hTriggerClass->GetXaxis()->SetBinLabel( 2,"kINT7");
534 hTriggerClass->GetXaxis()->SetBinLabel( 3,"kMUON");
535 hTriggerClass->GetXaxis()->SetBinLabel( 4,"kHighMult");
536 hTriggerClass->GetXaxis()->SetBinLabel( 5,"kKEMC1");
537 hTriggerClass->GetXaxis()->SetBinLabel( 6,"kCINT5");
538 hTriggerClass->GetXaxis()->SetBinLabel( 7,"kCMUS5/kMUSPB");
539 hTriggerClass->GetXaxis()->SetBinLabel( 8,"kMUSH7/kMUSHPB");
540 hTriggerClass->GetXaxis()->SetBinLabel( 9,"kMUL7/kMuonLikePB");
541 hTriggerClass->GetXaxis()->SetBinLabel(10,"kMUU7/kMuonUnlikePB");
542 hTriggerClass->GetXaxis()->SetBinLabel(11,"kEMC7/kEMC8");
543 hTriggerClass->GetXaxis()->SetBinLabel(12,"kMUS7");
544 hTriggerClass->GetXaxis()->SetBinLabel(13,"kPHI1");
545 hTriggerClass->GetXaxis()->SetBinLabel(14,"kPHI7/kPHI8/kPHOSPb");
546 hTriggerClass->GetXaxis()->SetBinLabel(15,"kEMCEJE");
547 hTriggerClass->GetXaxis()->SetBinLabel(16,"kEMCEGA");
548 hTriggerClass->GetXaxis()->SetBinLabel(17,"kCentral");
549 hTriggerClass->GetXaxis()->SetBinLabel(18,"kSemiCentral");
550 hTriggerClass->GetXaxis()->SetBinLabel(19,"kDG5");
551 hTriggerClass->GetXaxis()->SetBinLabel(20,"kZED");
552 hTriggerClass->GetXaxis()->SetBinLabel(21,"kSPI7/kSPI");
553 hTriggerClass->GetXaxis()->SetBinLabel(22,"kINT8");
554 hTriggerClass->GetXaxis()->SetBinLabel(23,"kMuonSingleLowPt8");
555 hTriggerClass->GetXaxis()->SetBinLabel(24,"kMuonSingleHighPt8");
556 hTriggerClass->GetXaxis()->SetBinLabel(25,"kMuonLikeLowPt8");
557 hTriggerClass->GetXaxis()->SetBinLabel(26,"kMuonUnlikeLowPt8");
558 hTriggerClass->GetXaxis()->SetBinLabel(27,"kMuonUnlikeLowPt0");
559 hTriggerClass->GetXaxis()->SetBinLabel(28,"kUserDefined");
560 hTriggerClass->GetXaxis()->SetBinLabel(29,"kTRD");
561 hTriggerClass->GetXaxis()->SetBinLabel(30,"kFastOnly");
562 hTriggerClass->GetXaxis()->SetBinLabel(31,"kAnyINT");
563 hTriggerClass->GetXaxis()->SetBinLabel(32,"kAny");
564 hTriggerClass->GetXaxis()->SetBinLabel(33,"V0AND");
565 hTriggerClass->GetXaxis()->SetBinLabel(34,"NOT kFastOnly");
566 hTriggerClass->GetXaxis()->SetBinLabel(35,"failed Physics Selection");
567 fHistograms->Add(hTriggerClass);
569 hTriggerClassSelected= new TH1F(Form("OfflineTriggerSelected %s",GetCutNumber().Data()),"OfflineTriggerSelected",34,-0.5,33.5);
570 hTriggerClassSelected->GetXaxis()->SetBinLabel( 1,"kMB");
571 hTriggerClassSelected->GetXaxis()->SetBinLabel( 2,"kINT7");
572 hTriggerClassSelected->GetXaxis()->SetBinLabel( 3,"kMUON");
573 hTriggerClassSelected->GetXaxis()->SetBinLabel( 4,"kHighMult");
574 hTriggerClassSelected->GetXaxis()->SetBinLabel( 5,"kKEMC1");
575 hTriggerClassSelected->GetXaxis()->SetBinLabel( 6,"kCINT5");
576 hTriggerClassSelected->GetXaxis()->SetBinLabel( 7,"kCMUS5/kMUSPB");
577 hTriggerClassSelected->GetXaxis()->SetBinLabel( 8,"kMUSH7/kMUSHPB");
578 hTriggerClassSelected->GetXaxis()->SetBinLabel( 9,"kMUL7/kMuonLikePB");
579 hTriggerClassSelected->GetXaxis()->SetBinLabel(10,"kMUU7/kMuonUnlikePB");
580 hTriggerClassSelected->GetXaxis()->SetBinLabel(11,"kEMC7/kEMC8");
581 hTriggerClassSelected->GetXaxis()->SetBinLabel(12,"kMUS7");
582 hTriggerClassSelected->GetXaxis()->SetBinLabel(13,"kPHI1");
583 hTriggerClassSelected->GetXaxis()->SetBinLabel(14,"kPHI7/kPHI8/kPHOSPb");
584 hTriggerClassSelected->GetXaxis()->SetBinLabel(15,"kEMCEJE");
585 hTriggerClassSelected->GetXaxis()->SetBinLabel(16,"kEMCEGA");
586 hTriggerClassSelected->GetXaxis()->SetBinLabel(17,"kCentral");
587 hTriggerClassSelected->GetXaxis()->SetBinLabel(18,"kSemiCentral");
588 hTriggerClassSelected->GetXaxis()->SetBinLabel(19,"kDG5");
589 hTriggerClassSelected->GetXaxis()->SetBinLabel(20,"kZED");
590 hTriggerClassSelected->GetXaxis()->SetBinLabel(21,"kSPI7/kSPI");
591 hTriggerClassSelected->GetXaxis()->SetBinLabel(22,"kINT8");
592 hTriggerClassSelected->GetXaxis()->SetBinLabel(23,"kMuonSingleLowPt8");
593 hTriggerClassSelected->GetXaxis()->SetBinLabel(24,"kMuonSingleHighPt8");
594 hTriggerClassSelected->GetXaxis()->SetBinLabel(25,"kMuonLikeLowPt8");
595 hTriggerClassSelected->GetXaxis()->SetBinLabel(26,"kMuonUnlikeLowPt8");
596 hTriggerClassSelected->GetXaxis()->SetBinLabel(27,"kMuonUnlikeLowPt0");
597 hTriggerClassSelected->GetXaxis()->SetBinLabel(28,"kUserDefined");
598 hTriggerClassSelected->GetXaxis()->SetBinLabel(29,"kTRD");
599 hTriggerClassSelected->GetXaxis()->SetBinLabel(30,"kFastOnly");
600 hTriggerClassSelected->GetXaxis()->SetBinLabel(31,"kAnyINT");
601 hTriggerClassSelected->GetXaxis()->SetBinLabel(32,"kAny");
602 hTriggerClassSelected->GetXaxis()->SetBinLabel(33,"V0AND");
603 hTriggerClassSelected->GetXaxis()->SetBinLabel(34,"NOT kFastOnly");
604 fHistograms->Add(hTriggerClassSelected);
608 //________________________________________________________________________
609 Bool_t AliConversionCuts::InitPIDResponse(){
610 // Set Pointer to AliPIDResponse
612 AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
614 AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
615 fPIDResponse = (AliPIDResponse*)inputHandler->GetPIDResponse();
616 if(fPIDResponse)return kTRUE;
623 ///________________________________________________________________________
624 Bool_t AliConversionCuts::EventIsSelected(AliVEvent *fInputEvent, AliVEvent *fMCEvent){
625 // Process Event Selection
628 if(hV0EventCuts)hV0EventCuts->Fill(cutindex);
631 // Check for MC event
633 // Check if MC event is correctly loaded
634 AliMCEventHandler* mcHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
639 if (!mcHandler->InitOk() ){
643 if (!mcHandler->TreeK() ){
647 if (!mcHandler->TreeTR() ) {
654 if(!IsTriggerSelected()){
655 if(hV0EventCuts)hV0EventCuts->Fill(cutindex);
661 if(fInputEvent->IsA()==AliESDEvent::Class()){
662 AliTriggerAnalysis fTriggerAnalysis;// = new AliTriggerAnalysis;
663 fHasV0AND = fTriggerAnalysis.IsOfflineTriggerFired((AliESDEvent*)fInputEvent, AliTriggerAnalysis::kV0AND);
664 if(fHasV0AND&&hTriggerClass)hTriggerClass->Fill(32);
667 // Number of Contributors Cut
668 if(GetNumberOfContributorsVtx(fInputEvent)<=0) {
669 if(hV0EventCuts)hV0EventCuts->Fill(cutindex);
675 // Z Vertex Position Cut
676 if(!VertexZCut(fInputEvent)){
677 if(hV0EventCuts)hV0EventCuts->Fill(cutindex);
686 if(fInputEvent->IsPileupFromSPD(3,0.8,3.,2.,5.)){
687 if(hV0EventCuts)hV0EventCuts->Fill(cutindex);
694 // Centrality Selection
695 if(!IsCentralitySelected(fInputEvent,fMCEvent)){
696 if(hV0EventCuts)hV0EventCuts->Fill(cutindex);
702 // Fill Event Histograms
703 if(hV0EventCuts)hV0EventCuts->Fill(cutindex);
704 if(hVertexZ)hVertexZ->Fill(fInputEvent->GetPrimaryVertex()->GetZ());
705 if(hCentrality)hCentrality->Fill(GetCentrality(fInputEvent));
711 ///________________________________________________________________________
712 Bool_t AliConversionCuts::PhotonIsSelectedMC(TParticle *particle,AliStack *fMCStack,Bool_t checkForConvertedGamma){
713 // MonteCarlo Photon Selection
715 if(!fMCStack)return kFALSE;
717 if (particle->GetPdgCode() == 22){
720 if( particle->Eta() > (fEtaCut + fEtaShift) || particle->Eta() < (-fEtaCut + fEtaShift) )
723 if( particle->Eta() < (fEtaCutMin + fEtaShift) && particle->Eta() > (-fEtaCutMin + fEtaShift) )
727 if(particle->GetMother(0) >-1 && fMCStack->Particle(particle->GetMother(0))->GetPdgCode() == 22){
728 return kFALSE; // no photon as mothers!
731 if(particle->GetMother(0) >= fMCStack->GetNprimary()){
732 return kFALSE; // the gamma has a mother, and it is not a primary particle
735 if(!checkForConvertedGamma) return kTRUE; // return in case of accepted gamma
737 // looking for conversion gammas (electron + positron from pairbuilding (= 5) )
738 TParticle* ePos = NULL;
739 TParticle* eNeg = NULL;
741 if(particle->GetNDaughters() >= 2){
742 for(Int_t daughterIndex=particle->GetFirstDaughter();daughterIndex<=particle->GetLastDaughter();daughterIndex++){
743 TParticle *tmpDaughter = fMCStack->Particle(daughterIndex);
744 if(tmpDaughter->GetUniqueID() == 5){
745 if(tmpDaughter->GetPdgCode() == 11){
747 } else if(tmpDaughter->GetPdgCode() == -11){
754 if(ePos == NULL || eNeg == NULL){ // means we do not have two daughters from pair production
758 if(ePos->Pt()<fSinglePtCut || eNeg->Pt()<fSinglePtCut){
759 return kFALSE; // no reconstruction below the Pt cut
762 if( ePos->Eta() > (fEtaCut + fEtaShift) || ePos->Eta() < (-fEtaCut + fEtaShift) ||
763 eNeg->Eta() > (fEtaCut + fEtaShift) || eNeg->Eta() < (-fEtaCut + fEtaShift) )
766 if(fEtaCutMin > -0.1){
767 if( (ePos->Eta() < (fEtaCutMin + fEtaShift) && ePos->Eta() > (-fEtaCutMin + fEtaShift)) ||
768 (eNeg->Eta() < (fEtaCutMin + fEtaShift) && eNeg->Eta() > (-fEtaCutMin + fEtaShift)) )
773 return kFALSE; // cuts on distance from collision point
776 if(abs(ePos->Vz()) > fMaxZ){
777 return kFALSE; // outside material
779 if(abs(eNeg->Vz()) > fMaxZ){
780 return kFALSE; // outside material
783 if( ePos->R() <= ((abs(ePos->Vz()) * fLineCutZRSlope) - fLineCutZValue)){
784 return kFALSE; // line cut to exclude regions where we do not reconstruct
785 } else if ( fEtaCutMin != -0.1 && ePos->R() >= ((abs(ePos->Vz()) * fLineCutZRSlopeMin) - fLineCutZValueMin)){
789 if( eNeg->R() <= ((abs(eNeg->Vz()) * fLineCutZRSlope) - fLineCutZValue)){
790 return kFALSE; // line cut to exclude regions where we do not reconstruct
791 } else if ( fEtaCutMin != -0.1 && eNeg->R() >= ((abs(eNeg->Vz()) * fLineCutZRSlopeMin) - fLineCutZValueMin)){
796 //if(AcceptanceCut(particle,ePos,eNeg))return kTRUE;
802 ///________________________________________________________________________
803 Bool_t AliConversionCuts::PhotonCuts(AliConversionPhotonBase *photon,AliVEvent *event)
804 { // Specific Photon Cuts
807 if(hPhotonCuts)hPhotonCuts->Fill(cutIndex);
810 // Fill Histos before Cuts
811 if(hInvMassbefore)hInvMassbefore->Fill(photon->GetMass());
813 if(hArmenterosbefore)hArmenterosbefore->Fill(photon->GetArmenterosAlpha(),photon->GetArmenterosQt());
815 // Gamma selection based on QT from Armenteros
816 if(fDoQtGammaSelection == kTRUE){
817 if(!ArmenterosQtCut(photon)){
818 if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //1
825 if(photon->GetChi2perNDF() > fChi2CutConversion || photon->GetChi2perNDF() <=0){
827 if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //2
833 // Reconstruction Acceptance Cuts
834 if(!AcceptanceCuts(photon)){
835 if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //3
841 if(fDoPhotonAsymmetryCut == kTRUE){
842 if(!AsymmetryCut(photon,event)){
843 if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //4
848 //Check the pid probability
850 if(!PIDProbabilityCut(photon, event)) {
851 if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //5
856 if(!CorrectedTPCClusterCut(photon, event)) {
857 if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //6
863 if(!PsiPairCut(photon)) {
864 if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //7
869 if(!CosinePAngleCut(photon, event)) {
870 if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //8
875 if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //9
878 if(hInvMassafter)hInvMassafter->Fill(photon->GetMass());
879 if(hArmenterosafter)hArmenterosafter->Fill(photon->GetArmenterosAlpha(),photon->GetArmenterosQt());
886 ///________________________________________________________________________
887 Bool_t AliConversionCuts::CorrectedTPCClusterCut(AliConversionPhotonBase *photon, AliVEvent * event)
888 { //Cut on corrected TPC Cluster Info
890 AliVTrack * negTrack = GetTrack(event, photon->GetTrackLabelNegative());
891 AliVTrack * posTrack = GetTrack(event, photon->GetTrackLabelPositive());
893 if(!negTrack||!posTrack)return kFALSE;
895 Double_t negclsToF=0;
897 if (!fUseCorrectedTPCClsInfo ){
898 if(negTrack->GetTPCNclsF()!=0){
899 negclsToF = (Double_t)negTrack->GetNcls(1)/(Double_t)negTrack->GetTPCNclsF();}// Ncluster/Nfindablecluster
902 negclsToF = negTrack->GetTPCClusterInfo(2,0,GetFirstTPCRow(photon->GetConversionRadius()));
905 Double_t posclsToF = 0.;
906 if (!fUseCorrectedTPCClsInfo ){
907 if(posTrack->GetTPCNclsF()!=0){
908 posclsToF = (Double_t)posTrack->GetNcls(1)/(Double_t)posTrack->GetTPCNclsF();
911 posclsToF = posTrack->GetTPCClusterInfo(2,0,GetFirstTPCRow(photon->GetConversionRadius()));
914 if( negclsToF < fMinClsTPCToF || posclsToF < fMinClsTPCToF ){
921 ///________________________________________________________________________
922 Bool_t AliConversionCuts::PhotonIsSelected(AliConversionPhotonBase *photon, AliVEvent * event)
924 //Selection of Reconstructed Photons
926 FillPhotonCutIndex(kPhotonIn);
928 if(event->IsA()==AliESDEvent::Class()) {
929 if(!SelectV0Finder( ( ((AliESDEvent*)event)->GetV0(photon->GetV0Index())) ) ){
930 FillPhotonCutIndex(kOnFly);
934 // else if(event->IsA()==AliAODEvent::Class()) {
935 // if(!SelectV0Finder( ( ((AliAODEvent*)event)->GetV0(photon->GetV0Index())) ) ){
936 // FillPhotonCutIndex(kOnFly);
942 AliVTrack * negTrack = GetTrack(event, photon->GetTrackLabelNegative());
943 AliVTrack * posTrack = GetTrack(event, photon->GetTrackLabelPositive());
945 if(!negTrack || !posTrack) {
946 FillPhotonCutIndex(kNoTracks);
951 if(!dEdxCuts(negTrack) || !dEdxCuts(posTrack)) {
952 FillPhotonCutIndex(kdEdxCuts);
957 if(!TracksAreSelected(negTrack, posTrack)){
958 FillPhotonCutIndex(kTrackCuts);
963 if(!PhotonCuts(photon,event)){
964 FillPhotonCutIndex(kPhotonCuts);
968 // Photon passed cuts
969 FillPhotonCutIndex(kPhotonOut);
973 ///________________________________________________________________________
974 Bool_t AliConversionCuts::ArmenterosQtCut(AliConversionPhotonBase *photon)
975 { // Armenteros Qt Cut
977 if(fDoHighPtQtGammaSelection){
978 if(photon->GetPhotonPt() < fPtBorderForQt){
979 if(photon->GetArmenterosQt()>fQtMax){
983 if(photon->GetArmenterosQt()>fHighPtQtMax){
989 if(photon->GetArmenterosQt()>fQtMax){
997 ///________________________________________________________________________
998 Bool_t AliConversionCuts::AcceptanceCuts(AliConversionPhotonBase *photon) {
999 // Exclude certain areas for photon reconstruction
1002 if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex);
1005 if(photon->GetConversionRadius()>fMaxR){ // cuts on distance from collision point
1006 if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex);
1011 if(photon->GetConversionRadius()<fMinR){ // cuts on distance from collision point
1012 if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex);
1017 if(photon->GetConversionRadius() <= ((abs(photon->GetConversionZ())*fLineCutZRSlope)-fLineCutZValue)){
1018 if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex);
1021 else if (fUseEtaMinCut && photon->GetConversionRadius() >= ((abs(photon->GetConversionZ())*fLineCutZRSlopeMin)-fLineCutZValueMin )){
1022 if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex);
1027 if(abs(photon->GetConversionZ()) > fMaxZ ){ // cuts out regions where we do not reconstruct
1028 if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex);
1034 if( photon->GetPhotonEta() > (fEtaCut + fEtaShift) || photon->GetPhotonEta() < (-fEtaCut + fEtaShift) ){
1035 if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex);
1038 if(fEtaCutMin>-0.1){
1039 if( photon->GetPhotonEta() < (fEtaCutMin + fEtaShift) && photon->GetPhotonEta() > (-fEtaCutMin + fEtaShift) ){
1040 if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex);
1046 if(photon->GetPhotonPt()<fPtCut){
1047 if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex);
1052 if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex);
1058 ///________________________________________________________________________
1059 Bool_t AliConversionCuts::SpecificTrackCuts(AliAODTrack * negTrack, AliAODTrack * posTrack,Int_t &cutIndex) {
1060 // Track Cuts which require AOD/ESD specific implementation
1062 if( !negTrack->IsOn(AliESDtrack::kTPCrefit) || !posTrack->IsOn(AliESDtrack::kTPCrefit) ) {
1063 if(hTrackCuts)hTrackCuts->Fill(cutIndex);
1068 AliAODVertex * NegVtxType=negTrack->GetProdVertex();
1069 AliAODVertex * PosVtxType=posTrack->GetProdVertex();
1070 if((NegVtxType->GetType())==AliAODVertex::kKink || (PosVtxType->GetType())==AliAODVertex::kKink) {
1071 if(hTrackCuts)hTrackCuts->Fill(cutIndex);
1079 ///________________________________________________________________________
1080 Bool_t AliConversionCuts::SpecificTrackCuts(AliESDtrack * negTrack, AliESDtrack * posTrack,Int_t &cutIndex) {
1081 // Track Cuts which require AOD/ESD specific implementation
1083 if( !negTrack->IsOn(AliESDtrack::kTPCrefit) || !posTrack->IsOn(AliESDtrack::kTPCrefit) ) {
1084 if(hTrackCuts)hTrackCuts->Fill(cutIndex);
1089 if(negTrack->GetKinkIndex(0) > 0 || posTrack->GetKinkIndex(0) > 0 ) {
1090 if(hTrackCuts)hTrackCuts->Fill(cutIndex);
1098 ///________________________________________________________________________
1099 Bool_t AliConversionCuts::TracksAreSelected(AliVTrack * negTrack, AliVTrack * posTrack) {
1100 // Track Selection for Photon Reconstruction
1103 if(hTrackCuts)hTrackCuts->Fill(cutIndex);
1107 if(negTrack->Charge() == posTrack->Charge()) {
1108 if(hTrackCuts)hTrackCuts->Fill(cutIndex);
1113 // Number of TPC Clusters
1114 if( negTrack->GetNcls(1) < fMinClsTPC || posTrack->GetNcls(1) < fMinClsTPC ) {
1115 if(hTrackCuts)hTrackCuts->Fill(cutIndex);
1121 if( posTrack->Eta() > (fEtaCut + fEtaShift) || posTrack->Eta() < (-fEtaCut + fEtaShift) ||
1122 negTrack->Eta() > (fEtaCut + fEtaShift) || negTrack->Eta() < (-fEtaCut + fEtaShift) ){
1123 if(hTrackCuts)hTrackCuts->Fill(cutIndex);
1126 if(fEtaCutMin>-0.1){
1127 if( (posTrack->Eta() < (fEtaCutMin + fEtaShift) && posTrack->Eta() > (-fEtaCutMin + fEtaShift)) ||
1128 (negTrack->Eta() < (fEtaCutMin + fEtaShift) && negTrack->Eta() > (-fEtaCutMin + fEtaShift)) ){
1129 if(hTrackCuts)hTrackCuts->Fill(cutIndex);
1136 if( negTrack->Pt()< fSinglePtCut || posTrack->Pt()< fSinglePtCut){
1137 if(hTrackCuts)hTrackCuts->Fill(cutIndex);
1142 // AOD ESD specific cuts
1143 Bool_t passCuts = kTRUE;
1145 if(negTrack->IsA()==AliAODTrack::Class()) {
1146 passCuts = passCuts * SpecificTrackCuts(static_cast<AliAODTrack*>(negTrack), static_cast<AliAODTrack*>(posTrack),cutIndex);
1148 passCuts = passCuts * SpecificTrackCuts(static_cast<AliESDtrack*>(negTrack), static_cast<AliESDtrack*>(posTrack),cutIndex);
1152 if(hTrackCuts)hTrackCuts->Fill(cutIndex);
1157 if(hTrackCuts)hTrackCuts->Fill(cutIndex);
1163 ///________________________________________________________________________
1164 Bool_t AliConversionCuts::dEdxCuts(AliVTrack *fCurrentTrack){
1165 // Electron Identification Cuts for Photon reconstruction
1167 if(!fPIDResponse){InitPIDResponse();}// Try to reinitialize PID Response
1168 if(!fPIDResponse){AliError("No PID Response"); return kTRUE;}// if still missing fatal error
1171 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
1172 if(hTPCdEdxSigbefore)hTPCdEdxSigbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron));
1173 if(hTPCdEdxbefore)hTPCdEdxbefore->Fill(fCurrentTrack->P(),fCurrentTrack->GetTPCsignal());
1177 if(fDodEdxSigmaCut == kTRUE){
1178 // TPC Electron Line
1179 if( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLine ||
1180 fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine){
1182 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
1188 if( fCurrentTrack->P()>fPIDMinPnSigmaAbovePionLine && fCurrentTrack->P()<fPIDMaxPnSigmaAbovePionLine ){
1189 if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine &&
1190 fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine&&
1191 fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLine){
1193 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
1200 if( fCurrentTrack->P()>fPIDMaxPnSigmaAbovePionLine ){
1201 if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine &&
1202 fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine &&
1203 fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLineHighPt){
1205 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
1213 if(fDoKaonRejectionLowP == kTRUE){
1214 if(fCurrentTrack->P()<fPIDMinPKaonRejectionLowP ){
1215 if( abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kKaon))<fPIDnSigmaAtLowPAroundKaonLine){
1217 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
1224 if(fDoProtonRejectionLowP == kTRUE){
1225 if( fCurrentTrack->P()<fPIDMinPProtonRejectionLowP ){
1226 if( abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kProton))<fPIDnSigmaAtLowPAroundProtonLine){
1228 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
1235 if(fDoPionRejectionLowP == kTRUE){
1236 if( fCurrentTrack->P()<fPIDMinPPionRejectionLowP ){
1237 if( abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion))<fPIDnSigmaAtLowPAroundPionLine){
1239 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
1247 // cout<<"Start"<<endl;
1248 // AliPIDResponse::EDetPidStatus status=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTOF,fCurrentTrack);
1250 // if( ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) && ( (status & AliVTrack::kTIME) == AliVTrack::kTIME ))
1251 // {cout<<"TOF DA"<<endl;}
1252 // if(status == AliPIDResponse::kDetPidOk){
1253 // Float_t probMis = fPIDResponse->GetTOFMismatchProbability(fCurrentTrack);
1254 // cout<<"--> "<<probMis<<endl;
1255 // if(probMis > 0.01){
1260 if((fCurrentTrack->GetStatus() & AliESDtrack::kTOFpid) && !(fCurrentTrack->GetStatus() & AliESDtrack::kTOFmismatch)){
1262 Double_t t0 = fPIDResponse->GetTOFResponse().GetStartTime(fCurrentTrack->P());
1264 fCurrentTrack->GetIntegratedTimes(times);
1265 Double_t TOFsignal = fCurrentTrack->GetTOFsignal();
1266 Double_t dT = TOFsignal - t0 - times[0];
1267 hTOFbefore->Fill(fCurrentTrack->P(),dT);
1269 if(hTOFSigbefore) hTOFSigbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron));
1271 if(fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)>fTofPIDnSigmaAboveElectronLine ||
1272 fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)<fTofPIDnSigmaBelowElectronLine ){
1273 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
1277 if(hTOFSigafter)hTOFSigafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron));
1283 if(!fPIDResponse->IdentifiedAsElectronTRD(fCurrentTrack,fPIDTRDEfficiency)){
1284 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
1290 if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
1291 if(hTPCdEdxSigafter)hTPCdEdxSigafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron));
1292 if(hTPCdEdxafter)hTPCdEdxafter->Fill(fCurrentTrack->P(),fCurrentTrack->GetTPCsignal());
1296 ///________________________________________________________________________
1297 Bool_t AliConversionCuts::AsymmetryCut(AliConversionPhotonBase * photon,AliVEvent *event) {
1298 // Cut on Energy Assymetry
1300 for(Int_t ii=0;ii<2;ii++){
1302 AliVTrack *track=GetTrack(event,photon->GetTrackLabel(ii));
1304 if( track->P() > fMinPPhotonAsymmetryCut ){
1305 Double_t trackNegAsy=0;
1306 if (photon->GetPhotonP()!=0.){
1307 trackNegAsy= track->P()/photon->GetPhotonP();
1310 if( trackNegAsy<fMinPhotonAsymmetry ||trackNegAsy>(1.- fMinPhotonAsymmetry)){
1319 ///________________________________________________________________________
1320 AliVTrack *AliConversionCuts::GetTrack(AliVEvent * event, Int_t label){
1321 //Returns pointer to the track with given ESD label
1322 //(Important for AOD implementation, since Track array in AOD data is different
1323 //from ESD array, but ESD tracklabels are stored in AOD Tracks)
1325 AliESDEvent * esdEvent = dynamic_cast<AliESDEvent*>(event);
1327 if(label > event->GetNumberOfTracks() ) return NULL;
1328 AliESDtrack * track = esdEvent->GetTrack(label);
1332 for(Int_t ii=0; ii<event->GetNumberOfTracks(); ii++) {
1333 AliVTrack * track = dynamic_cast<AliVTrack*>(event->GetTrack(ii));
1336 if(track->GetID() == label) {
1343 //AliDebug(5,(Form("track not found %d %d",label,event->GetNumberOfTracks()));
1347 ///________________________________________________________________________
1348 AliESDtrack *AliConversionCuts::GetESDTrack(AliESDEvent * event, Int_t label){
1349 //Returns pointer to the track with given ESD label
1350 //(Important for AOD implementation, since Track array in AOD data is different
1351 //from ESD array, but ESD tracklabels are stored in AOD Tracks)
1354 if(label > event->GetNumberOfTracks() ) return NULL;
1355 AliESDtrack * track = event->GetTrack(label);
1358 //AliDebug(5,(Form("track not found %d %d",label,event->GetNumberOfTracks()));
1364 ///________________________________________________________________________
1365 Bool_t AliConversionCuts::PIDProbabilityCut(AliConversionPhotonBase *photon, AliVEvent * event){
1366 // Cut on Electron Probability for Photon Reconstruction
1368 AliESDEvent * esdEvent = dynamic_cast<AliESDEvent*>(event);
1372 Bool_t iResult=kFALSE;
1374 Double_t *posProbArray = new Double_t[AliPID::kSPECIES];
1375 Double_t *negProbArray = new Double_t[AliPID::kSPECIES];
1377 AliESDtrack* negTrack = esdEvent->GetTrack(photon->GetTrackLabelNegative());
1378 AliESDtrack* posTrack = esdEvent->GetTrack(photon->GetTrackLabelPositive());
1380 if(negProbArray && posProbArray){
1382 negTrack->GetTPCpid(negProbArray);
1383 posTrack->GetTPCpid(posProbArray);
1385 if(negProbArray[AliPID::kElectron]>=fPIDProbabilityCutNegativeParticle && posProbArray[AliPID::kElectron]>=fPIDProbabilityCutPositiveParticle){
1390 delete [] posProbArray;
1391 delete [] negProbArray;
1395 ///Not possible for AODs
1405 ///________________________________________________________________________
1406 Bool_t AliConversionCuts::AcceptanceCut(TParticle *particle, TParticle * ePos,TParticle* eNeg){
1407 // MC Acceptance Cuts
1408 //(Certain areas were excluded for photon reconstruction)
1410 if(particle->R()>fMaxR){
1413 if(ePos->R()>fMaxR){
1417 if(ePos->R()<fMinR){
1421 if( ePos->R() <= ((abs(ePos->Vz())*fLineCutZRSlope)-fLineCutZValue)){
1424 else if (fUseEtaMinCut && ePos->R() >= ((abs(ePos->Vz())*fLineCutZRSlopeMin)-fLineCutZValueMin )){
1428 if(abs(eNeg->Vz()) > fMaxZ ){ // cuts out regions where we do not reconstruct
1432 if(eNeg->Vz()!=ePos->Vz()||eNeg->R()!=ePos->R()){
1436 if(abs(ePos->Vz()) > fMaxZ ){ // cuts out regions where we do not reconstruct
1441 if( particle->Eta() > (fEtaCut + fEtaShift) || particle->Eta() < (-fEtaCut + fEtaShift) ){
1444 if( ePos->Eta() > (fEtaCut + fEtaShift) || ePos->Eta() < (-fEtaCut + fEtaShift) ){
1447 if( eNeg->Eta() > (fEtaCut + fEtaShift) || eNeg->Eta() < (-fEtaCut + fEtaShift) ){
1450 if(fEtaCutMin>-0.1){
1451 if( particle->Eta() < (fEtaCutMin + fEtaShift) && particle->Eta() > (-fEtaCutMin + fEtaShift) ){
1454 if( ePos->Eta() < (fEtaCutMin + fEtaShift) && ePos->Eta() > (-fEtaCutMin + fEtaShift) ){
1457 if( eNeg->Eta() < (fEtaCutMin + fEtaShift) && eNeg->Eta() > (-fEtaCutMin + fEtaShift) ){
1462 if( ePos->Pt()< fSinglePtCut || eNeg->Pt()< fSinglePtCut){
1466 if(particle->Pt()<fPtCut){
1472 ///________________________________________________________________________
1473 Bool_t AliConversionCuts::UpdateCutString() {
1474 ///Update the cut string (if it has been created yet)
1476 if(fCutString && fCutString->GetString().Length() == kNCuts) {
1477 fCutString->SetString(GetCutNumber());
1484 ///________________________________________________________________________
1485 Bool_t AliConversionCuts::InitializeCutsFromCutString(const TString analysisCutSelection ) {
1486 // Initialize Cuts from a given Cut string
1488 AliInfo(Form("Set Photoncut Number: %s",analysisCutSelection.Data()));
1489 if(analysisCutSelection.Length()!=kNCuts) {
1490 AliError(Form("Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(), kNCuts));
1493 if(!analysisCutSelection.IsDigit()){
1494 AliError("Cut selection contains characters");
1498 const char *cutSelection = analysisCutSelection.Data();
1499 #define ASSIGNARRAY(i) fCuts[i] = cutSelection[i] - '0'
1500 for(Int_t ii=0;ii<kNCuts;ii++){
1504 // Set Individual Cuts
1505 for(Int_t ii=0;ii<kNCuts;ii++){
1506 if(!SetCut(cutIds(ii),fCuts[ii]))return kFALSE;
1511 // Set StandardTriggers
1513 if(fIsHeavyIon)SelectCollisionCandidates(AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral);
1514 else SelectCollisionCandidates(AliVEvent::kMB);
1518 ///________________________________________________________________________
1519 Bool_t AliConversionCuts::SetCut(cutIds cutID, const Int_t value) {
1520 ///Set individual cut ID
1525 if( SetV0Finder(value)) {
1526 fCuts[kv0FinderType] = value;
1529 } else return kFALSE;
1531 case kededxSigmaCut:
1532 if( SetTPCdEdxCutElectronLine(value)) {
1533 fCuts[kededxSigmaCut] = value;
1536 } else return kFALSE;
1538 case kpidedxSigmaCut:
1539 if( SetTPCdEdxCutPionLine(value)) {
1540 fCuts[kpidedxSigmaCut] = value;
1543 } else return kFALSE;
1545 case kpiMomdedxSigmaCut:
1546 if( SetMinMomPiondEdxCut(value)) {
1547 fCuts[kpiMomdedxSigmaCut] = value;
1550 } else return kFALSE;
1553 if( SetChi2GammaCut(value)) {
1554 fCuts[kchi2GammaCut] = value;
1557 } else return kFALSE;
1560 if( SetSinglePtCut(value)) {
1561 fCuts[ksinglePtCut] = value;
1564 } else return kFALSE;
1567 if( SetTPCClusterCut(value)) {
1568 fCuts[kclsTPCCut] = value;
1571 } else return kFALSE;
1574 if( SetEtaCut(value)) {
1575 fCuts[ketaCut] = value;
1578 } else return kFALSE;
1580 case kLowPRejectionSigmaCut:
1581 if( SetLowPRejectionCuts(value)) {
1582 fCuts[kLowPRejectionSigmaCut] = value;
1585 } else return kFALSE;
1588 if( SetQtMaxCut(value)) {
1589 fCuts[kQtMaxCut] = value;
1592 } else return kFALSE;
1594 case kpiMaxMomdedxSigmaCut:
1595 if( SetMaxMomPiondEdxCut(value)) {
1596 fCuts[kpiMaxMomdedxSigmaCut] = value;
1599 } else return kFALSE;
1602 if( SetRCut(value)) {
1603 fCuts[kRCut] = value;
1606 } else return kFALSE;
1609 if( SetRemovePileUp(value)) {
1610 fCuts[kremovePileUp] = value;
1613 } else return kFALSE;
1616 if( SetSelectSpecialTrigger(value)) {
1617 fCuts[kselectV0AND] = value;
1620 } else return kFALSE;
1622 case kmultiplicityMethod:
1623 if( SetMultiplicityMethod(value)) {
1624 fCuts[kmultiplicityMethod] = value;
1627 } else return kFALSE;
1630 if( SetIsHeavyIon(value)) {
1631 fCuts[kisHeavyIon] = value;
1634 } else return kFALSE;
1636 case kCentralityMin:
1637 if( SetCentralityMin(value)) {
1638 fCuts[kCentralityMin] = value;
1641 } else return kFALSE;
1643 case kCentralityMax:
1644 if( SetCentralityMax(value)) {
1645 fCuts[kCentralityMax] = value;
1648 } else return kFALSE;
1650 case kTOFelectronPID:
1651 if( SetTOFElectronPIDCut(value)) {
1652 fCuts[kTOFelectronPID] = value;
1655 } else return kFALSE;
1657 case kdoPhotonAsymmetryCut:
1658 if( SetPhotonAsymmetryCut(value)) {
1659 fCuts[kdoPhotonAsymmetryCut] = value;
1662 } else return kFALSE;
1665 if( SetPsiPairCut(value)) {
1666 fCuts[kPsiPair] = value;
1669 } else return kFALSE;
1672 if( SetCosPAngleCut(value)) {
1673 fCuts[kCosPAngle] = value;
1676 } else return kFALSE;
1680 if( SetSharedElectronCut(value)) {
1681 fCuts[kElecShare] = value;
1684 } else return kFALSE;
1687 if( SetToCloseV0sCut(value)) {
1688 fCuts[kToCloseV0s] = value;
1691 } else return kFALSE;
1694 if( SetRejectExtraSignalsCut(value)) {
1695 fCuts[kExtraSignals] = value;
1698 } else return kFALSE;
1701 AliError("Cut id out of range");
1705 AliError("Cut id %d not recognized");
1710 ///________________________________________________________________________
1711 void AliConversionCuts::PrintCuts() {
1712 // Print out current Cut Selection
1713 for(Int_t ic = 0; ic < kNCuts; ic++) {
1714 printf("%-30s : %d \n", fgkCutNames[ic], fCuts[ic]);
1717 ///________________________________________________________________________
1718 Bool_t AliConversionCuts::SetIsHeavyIon(Int_t isHeavyIon)
1726 fDetectorCentrality=0;
1730 fDetectorCentrality=1;
1732 case 3: //allows to select centrality 0-45% in steps of 5% for V0 Multiplicity
1734 fDetectorCentrality=0;
1735 fModCentralityClass=1;
1737 case 4: //allows to select centrality 45-90% in steps of 5% for V0 Multiplicity
1739 fDetectorCentrality=0;
1740 fModCentralityClass=2;
1742 case 5: //strict cut on v0 tracks for MC
1744 fDetectorCentrality=0;
1745 fModCentralityClass=3;
1747 case 6: //allows to select centrality 0-45% in steps of 5% for V0 Multiplicity
1748 //strict cut on v0 tracks for MC
1750 fDetectorCentrality=0;
1751 fModCentralityClass=4;
1753 case 7: //allows to select centrality 45-90% in steps of 5% for V0 Multiplicity
1754 //strict cut on v0 tracks for MC
1756 fDetectorCentrality=0;
1757 fModCentralityClass=5;
1761 fDetectorCentrality=0;
1765 fDetectorCentrality=1;
1768 AliError(Form("SetHeavyIon not defined %d",isHeavyIon));
1774 //___________________________________________________________________
1775 Bool_t AliConversionCuts::SetCentralityMin(Int_t minCentrality)
1778 if(minCentrality<0||minCentrality>9){
1779 AliError(Form("minCentrality not defined %d",minCentrality));
1783 fCentralityMin=minCentrality;
1786 //___________________________________________________________________
1787 Bool_t AliConversionCuts::SetCentralityMax(Int_t maxCentrality)
1790 if(maxCentrality<0||maxCentrality>9){
1791 AliError(Form("maxCentrality not defined %d",maxCentrality));
1794 fCentralityMax=maxCentrality;
1797 ///________________________________________________________________________
1798 Int_t AliConversionCuts::SetSelectSpecialTrigger(Int_t selectSpecialTrigger)
1801 switch(selectSpecialTrigger){
1803 fSpecialTrigger=0; // dont care
1806 fSpecialTrigger=1; // V0AND
1809 fSpecialTrigger=2; // with SDD requested
1812 fSpecialTrigger=3; // V0AND plus with SDD requested
1816 AliError("Warning: Special Trigger Not known");
1821 ///________________________________________________________________________
1822 Bool_t AliConversionCuts::SetMultiplicityMethod(Int_t multiplicityMethod)
1825 fMultiplicityMethod=multiplicityMethod;
1827 // 0 Photon Multiplicity
1828 // 1 TPC Track multiplicity
1834 ///________________________________________________________________________
1835 Bool_t AliConversionCuts::SetRemovePileUp(Int_t removePileUp)
1837 switch(removePileUp){
1839 fRemovePileUp=kFALSE;
1842 fRemovePileUp=kTRUE;
1845 AliError("RemovePileUpCut not defined");
1850 ///________________________________________________________________________
1851 Bool_t AliConversionCuts::SetRejectExtraSignalsCut(Int_t extraSignal) {
1853 switch(extraSignal){
1855 fRejectExtraSignals = 0;
1856 break; // No Rejection
1858 fRejectExtraSignals = 1;
1859 break; // MinBias Header
1861 fRejectExtraSignals = 2;
1862 break; // User String Array
1864 fRejectExtraSignals = 3;
1865 break; // Rejection for Gamma Correction only
1867 AliError(Form("Extra Signal Rejection not defined %d",extraSignal));
1872 ///________________________________________________________________________
1873 Bool_t AliConversionCuts::SetV0Finder(Int_t v0FinderType)
1875 switch (v0FinderType){
1876 case 0: // on fly V0 finder
1877 fUseOnFlyV0Finder=kTRUE;
1879 case 1: // offline V0 finder
1880 fUseOnFlyV0Finder=kFALSE;
1883 AliError(Form(" v0FinderType not defined %d",v0FinderType));
1888 ///________________________________________________________________________
1889 Bool_t AliConversionCuts::SetEtaCut(Int_t etaCut)
1892 //Set Standard LineCutZValues
1893 fLineCutZValueMin = -2;
1894 fLineCutZValue = 7.;
1899 fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
1901 fLineCutZRSlopeMin = 0.;
1905 fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
1907 fLineCutZRSlopeMin = 0.;
1911 fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
1913 fLineCutZRSlopeMin = 0.;
1917 fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
1919 fLineCutZRSlopeMin = 0.;
1923 fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
1925 fLineCutZRSlopeMin = 0.;
1929 fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
1931 fLineCutZRSlopeMin = 0.;
1935 fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
1937 fLineCutZRSlopeMin = 0.;
1941 fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
1943 fLineCutZRSlopeMin = 0.;
1945 // case 8: // 0.1 - 0.8
1947 // fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
1948 // fEtaCutMin = 0.1;
1949 // fLineCutZRSlopeMin = tan(2*atan(exp(-fEtaCutMin)));
1953 fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
1955 fLineCutZRSlopeMin = 0.;
1959 fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
1961 fLineCutZRSlopeMin = 0.;
1964 AliError(Form(" EtaCut not defined %d",etaCut));
1969 ///________________________________________________________________________
1970 Bool_t AliConversionCuts::SetRCut(Int_t RCut){
1993 // High purity cuts for PbPb (remove first layers of material)
2016 AliError("RCut not defined");
2021 ///________________________________________________________________________
2022 Bool_t AliConversionCuts::SetSinglePtCut(Int_t singlePtCut)
2024 switch(singlePtCut){
2025 case 0: // 0.050 GeV
2026 fSinglePtCut = 0.050;
2028 case 1: // 0.100 GeV
2029 fSinglePtCut = 0.100;
2031 case 2: // 0.150 GeV
2032 fSinglePtCut = 0.150;
2034 case 3: // 0.200 GeV
2035 fSinglePtCut = 0.200;
2037 case 4: // 0.075 GeV
2038 fSinglePtCut = 0.075;
2040 case 5: // 0.125 GeV
2041 fSinglePtCut = 0.125;
2044 fSinglePtCut = 0.040;
2050 AliError(Form("singlePtCut not defined %d",singlePtCut));
2055 ///________________________________________________________________________
2056 Bool_t AliConversionCuts::SetTPCClusterCut(Int_t clsTPCCut)
2071 case 4: // 60% of findable clusters
2073 fUseCorrectedTPCClsInfo=0;
2075 case 5: // 0% of findable clusters
2077 fUseCorrectedTPCClsInfo=1;
2079 case 6: // 70% of findable clusters
2081 fUseCorrectedTPCClsInfo=1;
2083 case 7: // 0% of findable clusters
2084 fMinClsTPCToF= 0.35;
2085 fUseCorrectedTPCClsInfo=0;
2088 fMinClsTPCToF= 0.35;
2089 fUseCorrectedTPCClsInfo=1;
2093 fUseCorrectedTPCClsInfo=1;
2096 AliError(Form("Warning: clsTPCCut not defined %d",clsTPCCut));
2101 ///________________________________________________________________________
2102 Bool_t AliConversionCuts::SetTPCdEdxCutElectronLine(Int_t ededxSigmaCut)
2104 switch(ededxSigmaCut){
2106 fPIDnSigmaBelowElectronLine=-10;
2107 fPIDnSigmaAboveElectronLine=10;
2110 fPIDnSigmaBelowElectronLine=-5;
2111 fPIDnSigmaAboveElectronLine=5;
2114 fPIDnSigmaBelowElectronLine=-3;
2115 fPIDnSigmaAboveElectronLine=5;
2118 fPIDnSigmaBelowElectronLine=-4;
2119 fPIDnSigmaAboveElectronLine=5;
2122 fPIDnSigmaBelowElectronLine=-6;
2123 fPIDnSigmaAboveElectronLine=7;
2126 fPIDnSigmaBelowElectronLine=-4;
2127 fPIDnSigmaAboveElectronLine=4;
2130 fPIDnSigmaBelowElectronLine=-2.5;
2131 fPIDnSigmaAboveElectronLine=4;
2134 fPIDnSigmaBelowElectronLine=-2;
2135 fPIDnSigmaAboveElectronLine=3.5;
2138 AliError("TPCdEdxCutElectronLine not defined");
2144 ///________________________________________________________________________
2145 Bool_t AliConversionCuts::SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut)
2148 switch(pidedxSigmaCut){
2150 fPIDnSigmaAbovePionLine=-10;
2151 fPIDnSigmaAbovePionLineHighPt=-10;
2154 fPIDnSigmaAbovePionLine=0;
2155 fPIDnSigmaAbovePionLineHighPt=-10;
2158 fPIDnSigmaAbovePionLine=1;
2159 fPIDnSigmaAbovePionLineHighPt=-10;
2162 fPIDnSigmaAbovePionLine=2.5;
2163 fPIDnSigmaAbovePionLineHighPt=-10;
2166 fPIDnSigmaAbovePionLine=0.5;
2167 fPIDnSigmaAbovePionLineHighPt=-10;
2170 fPIDnSigmaAbovePionLine=2.;
2171 fPIDnSigmaAbovePionLineHighPt=-10;
2174 fPIDnSigmaAbovePionLine=2.;
2175 fPIDnSigmaAbovePionLineHighPt=0.5;
2178 fPIDnSigmaAbovePionLine=3.5;
2179 fPIDnSigmaAbovePionLineHighPt=-10;
2182 fPIDnSigmaAbovePionLine=2.;
2183 fPIDnSigmaAbovePionLineHighPt=1.;
2186 fPIDnSigmaAbovePionLine=3.0; // We need a bit less tight cut on dE/dx
2187 fPIDnSigmaAbovePionLineHighPt=-10;
2190 AliError(Form("Warning: pidedxSigmaCut not defined %d",pidedxSigmaCut));
2195 ///________________________________________________________________________
2196 Bool_t AliConversionCuts::SetMinMomPiondEdxCut(Int_t piMomdedxSigmaCut)
2198 switch(piMomdedxSigmaCut){
2200 fPIDMinPnSigmaAbovePionLine=0.5;
2203 fPIDMinPnSigmaAbovePionLine=1.;
2206 fPIDMinPnSigmaAbovePionLine=1.5;
2209 fPIDMinPnSigmaAbovePionLine=20.;
2212 fPIDMinPnSigmaAbovePionLine=50.;
2215 fPIDMinPnSigmaAbovePionLine=0.3;
2218 fPIDMinPnSigmaAbovePionLine=0.25;
2221 fPIDMinPnSigmaAbovePionLine=0.4;
2224 fPIDMinPnSigmaAbovePionLine=0.2;
2227 AliError(Form("piMomdedxSigmaCut not defined %d",piMomdedxSigmaCut));
2232 ///________________________________________________________________________
2233 Bool_t AliConversionCuts::SetMaxMomPiondEdxCut(Int_t piMaxMomdedxSigmaCut)
2235 switch(piMaxMomdedxSigmaCut){
2237 fPIDMaxPnSigmaAbovePionLine=100.;
2240 fPIDMaxPnSigmaAbovePionLine=5.;
2243 fPIDMaxPnSigmaAbovePionLine=4.;
2246 fPIDMaxPnSigmaAbovePionLine=3.5;
2249 fPIDMaxPnSigmaAbovePionLine=3.;
2252 fPIDMaxPnSigmaAbovePionLine=7.;
2255 AliError(Form("piMaxMomdedxSigmaCut not defined %d",piMaxMomdedxSigmaCut));
2260 ///________________________________________________________________________
2261 Bool_t AliConversionCuts::SetLowPRejectionCuts(Int_t LowPRejectionSigmaCut)
2263 switch(LowPRejectionSigmaCut){
2265 fPIDnSigmaAtLowPAroundKaonLine=0;
2266 fPIDnSigmaAtLowPAroundProtonLine=0;
2267 fPIDnSigmaAtLowPAroundPionLine=0;
2268 fDoKaonRejectionLowP = kFALSE;
2269 fDoProtonRejectionLowP = kFALSE;
2270 fDoPionRejectionLowP = kFALSE;
2271 fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine;
2274 fPIDnSigmaAtLowPAroundKaonLine=0.5;
2275 fPIDnSigmaAtLowPAroundProtonLine=0.5;
2276 fPIDnSigmaAtLowPAroundPionLine=0.5;
2277 fDoKaonRejectionLowP = kTRUE;
2278 fDoProtonRejectionLowP = kTRUE;
2279 fDoPionRejectionLowP = kTRUE;
2280 fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine;
2283 fPIDnSigmaAtLowPAroundKaonLine=1;
2284 fPIDnSigmaAtLowPAroundProtonLine=1;
2285 fPIDnSigmaAtLowPAroundPionLine=1;
2286 fDoKaonRejectionLowP = kTRUE;
2287 fDoProtonRejectionLowP = kTRUE;
2288 fDoPionRejectionLowP = kTRUE;
2289 fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine;
2292 fPIDnSigmaAtLowPAroundKaonLine=2.;
2293 fPIDnSigmaAtLowPAroundProtonLine=2.;
2294 fPIDnSigmaAtLowPAroundPionLine=2.;
2295 fDoKaonRejectionLowP = kTRUE;
2296 fDoProtonRejectionLowP = kTRUE;
2297 fDoPionRejectionLowP = kTRUE;
2298 fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine;
2301 fPIDnSigmaAtLowPAroundKaonLine=0.;
2302 fPIDnSigmaAtLowPAroundProtonLine=0.;
2303 fPIDnSigmaAtLowPAroundPionLine=1;
2304 fDoKaonRejectionLowP = kFALSE;
2305 fDoProtonRejectionLowP = kFALSE;
2306 fDoPionRejectionLowP = kTRUE;
2307 fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine;
2310 fPIDnSigmaAtLowPAroundKaonLine=0.;
2311 fPIDnSigmaAtLowPAroundProtonLine=0.;
2312 fPIDnSigmaAtLowPAroundPionLine=1.5;
2313 fDoKaonRejectionLowP = kFALSE;
2314 fDoProtonRejectionLowP = kFALSE;
2315 fDoPionRejectionLowP = kTRUE;
2316 fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine;
2319 fPIDnSigmaAtLowPAroundKaonLine=0.;
2320 fPIDnSigmaAtLowPAroundProtonLine=0.;
2321 fPIDnSigmaAtLowPAroundPionLine=2.;
2322 fDoKaonRejectionLowP = kFALSE;
2323 fDoProtonRejectionLowP = kFALSE;
2324 fDoPionRejectionLowP = kTRUE;
2325 fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine;
2328 fPIDnSigmaAtLowPAroundKaonLine=0.;
2329 fPIDnSigmaAtLowPAroundProtonLine=0.;
2330 fPIDnSigmaAtLowPAroundPionLine=0.5;
2331 fDoKaonRejectionLowP = kFALSE;
2332 fDoProtonRejectionLowP = kFALSE;
2333 fDoPionRejectionLowP = kTRUE;
2334 fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine;
2337 AliError(Form("LowPRejectionSigmaCut not defined %d",LowPRejectionSigmaCut));
2342 ///________________________________________________________________________
2343 Bool_t AliConversionCuts::SetTOFElectronPIDCut(Int_t TOFelectronPID){
2345 switch(TOFelectronPID){
2347 fUseTOFpid = kFALSE;
2348 fTofPIDnSigmaBelowElectronLine=-100;
2349 fTofPIDnSigmaAboveElectronLine=100;
2353 fTofPIDnSigmaBelowElectronLine=-7;
2354 fTofPIDnSigmaAboveElectronLine=7;
2358 fTofPIDnSigmaBelowElectronLine=-5;
2359 fTofPIDnSigmaAboveElectronLine=5;
2363 fTofPIDnSigmaBelowElectronLine=-3;
2364 fTofPIDnSigmaAboveElectronLine=5;
2368 fTofPIDnSigmaBelowElectronLine=-2;
2369 fTofPIDnSigmaAboveElectronLine=3;
2373 fTofPIDnSigmaBelowElectronLine=-3;
2374 fTofPIDnSigmaAboveElectronLine=3;
2377 AliError(Form("TOFElectronCut not defined %d",TOFelectronPID));
2382 ///________________________________________________________________________
2383 Bool_t AliConversionCuts::SetQtMaxCut(Int_t QtMaxCut)
2388 fDoQtGammaSelection=kFALSE;
2389 fDoHighPtQtGammaSelection=kFALSE;
2391 fPtBorderForQt=100.;
2395 fDoHighPtQtGammaSelection=kFALSE;
2397 fPtBorderForQt=100.;
2401 fDoHighPtQtGammaSelection=kFALSE;
2403 fPtBorderForQt=100.;
2407 fDoHighPtQtGammaSelection=kFALSE;
2409 fPtBorderForQt=100.;
2413 fDoHighPtQtGammaSelection=kFALSE;
2415 fPtBorderForQt=100.;
2419 fDoHighPtQtGammaSelection=kFALSE;
2421 fPtBorderForQt=100.;
2425 fDoHighPtQtGammaSelection=kTRUE;
2431 fDoHighPtQtGammaSelection=kFALSE;
2433 fPtBorderForQt=100.;
2436 AliError(Form("Warning: QtMaxCut not defined %d",QtMaxCut));
2441 ///________________________________________________________________________
2442 Bool_t AliConversionCuts::SetChi2GammaCut(Int_t chi2GammaCut)
2445 switch(chi2GammaCut){
2447 fChi2CutConversion = 100.;
2450 fChi2CutConversion = 50.;
2453 fChi2CutConversion = 30.;
2456 fChi2CutConversion = 200.;
2459 fChi2CutConversion = 500.;
2462 fChi2CutConversion = 100000.;
2465 fChi2CutConversion = 5.;
2468 fChi2CutConversion = 10.;
2471 fChi2CutConversion = 20.;
2474 fChi2CutConversion = 15.;
2477 AliError(Form("Warning: Chi2GammaCut not defined %d",chi2GammaCut));
2482 ///________________________________________________________________________
2483 Bool_t AliConversionCuts::SetPsiPairCut(Int_t psiCut) {
2487 fPsiPairCut = 10000; //
2490 fPsiPairCut = 0.1; //
2493 fPsiPairCut = 0.05; // Standard
2496 fPsiPairCut = 0.035; //
2499 fPsiPairCut = 0.15; //
2502 fPsiPairCut = 0.2; //
2505 fPsiPairCut = 0.03; //
2508 fPsiPairCut = 0.025; //
2511 fPsiPairCut = 0.01; //
2514 fPsiPairCut = 0.5; //
2517 AliError(Form("PsiPairCut not defined %d",psiCut));
2523 ///________________________________________________________________________
2524 Bool_t AliConversionCuts::SetPhotonAsymmetryCut(Int_t doPhotonAsymmetryCut){
2526 switch(doPhotonAsymmetryCut){
2528 fDoPhotonAsymmetryCut=0;
2529 fMinPPhotonAsymmetryCut=100.;
2530 fMinPhotonAsymmetry=0.;
2533 fDoPhotonAsymmetryCut=1;
2534 fMinPPhotonAsymmetryCut=3.5;
2535 fMinPhotonAsymmetry=0.04;
2538 fDoPhotonAsymmetryCut=1;
2539 fMinPPhotonAsymmetryCut=3.5;
2540 fMinPhotonAsymmetry=0.06;
2543 AliError(Form("PhotonAsymmetryCut not defined %d",doPhotonAsymmetryCut));
2546 fCuts[kdoPhotonAsymmetryCut]=doPhotonAsymmetryCut;
2549 ///________________________________________________________________________
2550 Bool_t AliConversionCuts::SetCosPAngleCut(Int_t cosCut) {
2554 fCosPAngleCut = TMath::Pi(); // -1
2557 fCosPAngleCut = 0.1; // 0.99500
2560 fCosPAngleCut = 0.05; // 0.99875
2563 fCosPAngleCut = 0.025; // 0.99969
2566 fCosPAngleCut = 0.01; // 0.99995
2569 fCosPAngleCut = 0.2; // 0.98007
2572 fCosPAngleCut = 0.5; // 0.87758
2575 fCosPAngleCut = 0.075; // 0.73169
2578 AliError(Form("Cosine Pointing Angle cut not defined %d",cosCut));
2584 ///________________________________________________________________________
2585 Bool_t AliConversionCuts::SetSharedElectronCut(Int_t sharedElec) {
2589 fDoSharedElecCut = kFALSE;
2592 fDoSharedElecCut = kTRUE;
2595 AliError(Form("Shared Electron Cut not defined %d",sharedElec));
2601 ///________________________________________________________________________
2602 Bool_t AliConversionCuts::SetToCloseV0sCut(Int_t toClose) {
2606 fDoToCloseV0sCut = kFALSE;
2610 fDoToCloseV0sCut = kTRUE;
2614 fDoToCloseV0sCut = kTRUE;
2618 fDoToCloseV0sCut = kTRUE;
2622 AliError(Form("Shared Electron Cut not defined %d",toClose));
2627 ///________________________________________________________________________
2628 Bool_t AliConversionCuts::SetTRDElectronCut(Int_t TRDElectronCut)
2630 switch(TRDElectronCut){
2636 fPIDTRDEfficiency=0.1;
2640 fPIDTRDEfficiency=0.8;
2644 fPIDTRDEfficiency=0.9;
2647 AliError(Form("TRDElectronCut not defined %d",TRDElectronCut));
2653 //-------------------------------------------------------------
2654 Double_t AliConversionCuts::GetCentrality(AliVEvent *event)
2655 { // Get Event Centrality
2657 AliESDEvent *esdEvent=dynamic_cast<AliESDEvent*>(event);
2659 AliCentrality *fESDCentrality=(AliCentrality*)esdEvent->GetCentrality();
2661 if(fDetectorCentrality==0){
2662 if (fIsHeavyIon==2){
2663 return fESDCentrality->GetCentralityPercentile("V0A"); // default for pPb
2666 return fESDCentrality->GetCentralityPercentile("V0M"); // default
2669 if(fDetectorCentrality==1){
2670 return fESDCentrality->GetCentralityPercentile("CL1");
2674 AliAODEvent *aodEvent=dynamic_cast<AliAODEvent*>(event);
2676 if(aodEvent->GetHeader()){return aodEvent->GetHeader()->GetCentrality();}
2681 //-------------------------------------------------------------
2682 Bool_t AliConversionCuts::IsCentralitySelected(AliVEvent *event, AliVEvent *fMCEvent)
2683 { // Centrality Selection
2684 if(!fIsHeavyIon)return kTRUE;
2686 if(fCentralityMin == 0 && fCentralityMax == 0) return kTRUE;//0-100%
2687 if(fCentralityMin >= fCentralityMax) return kTRUE;//0-100%
2689 Double_t centrality=GetCentrality(event);
2690 if(centrality<0)return kFALSE;
2692 Int_t centralityC=0;
2693 if (fModCentralityClass == 0){
2694 centralityC= Int_t(centrality/10);
2695 if(centralityC >= fCentralityMin && centralityC < fCentralityMax)
2699 else if (fModCentralityClass ==1){
2700 centralityC= Int_t(centrality);
2701 if(centralityC >= fCentralityMin*5 && centralityC < fCentralityMax*5){
2703 } else return kFALSE;
2705 else if (fModCentralityClass ==2){
2706 centralityC= Int_t(centrality);
2707 if(centralityC >= ((fCentralityMin*5)+45) && centralityC < ((fCentralityMax*5)+45))
2712 // Use strict V0 amplitude cut for MC centrality
2713 Float_t nv0amplitude = event->GetVZEROData()->GetMTotV0A()+event->GetVZEROData()->GetMTotV0C();
2714 Float_t V0Amplitude10[10] = {9999999.0,13670,9345,6209,3944,2352,1272,611,255, 83};
2715 // 0 10 20 30 40 50 60 70 80 90%
2716 Float_t V0Amplitude5a[10] = {9999999.0,16612,13670,11290,9345,7650,6209,4984,3944,3074};
2717 // 0 5 10 15 20 25 30 35 40 45%
2718 Float_t V0Amplitude5b[10] = {3074,2352,1725,1272,899,611,402,255,152,83};
2719 // 45 50 55 60 65 70 75 80 85 90%
2721 if (fModCentralityClass == 3){
2723 if(nv0amplitude > V0Amplitude10[fCentralityMax] && nv0amplitude <= V0Amplitude10[fCentralityMin])
2728 centralityC= Int_t(centrality/10);
2729 if(centralityC >= fCentralityMin && centralityC < fCentralityMax)
2734 else if (fModCentralityClass ==4){
2736 if(nv0amplitude > V0Amplitude5a[fCentralityMax] && nv0amplitude <= V0Amplitude5a[fCentralityMin])
2741 centralityC= Int_t(centrality);
2742 if(centralityC >= fCentralityMin*5 && centralityC < fCentralityMax*5){
2744 } else return kFALSE;
2747 else if (fModCentralityClass ==5){
2749 if(nv0amplitude > V0Amplitude5b[fCentralityMax] && nv0amplitude <= V0Amplitude5b[fCentralityMin])
2754 centralityC= Int_t(centrality);
2755 if(centralityC >= ((fCentralityMin*5)+45) && centralityC < ((fCentralityMax*5)+45))
2763 ///________________________________________________________________________
2764 Bool_t AliConversionCuts::VertexZCut(AliVEvent *event){
2765 // Cut on z position of primary vertex
2766 Double_t fVertexZ=event->GetPrimaryVertex()->GetZ();
2768 if(abs(fVertexZ)>fMaxVertexZ)return kFALSE;
2770 if (fIsHeavyIon == 2){
2771 if(fUtils->IsFirstEventInChunk(event)) return kFALSE;
2772 if(!fUtils->IsVertexSelected2013pA(event)) return kFALSE;
2778 ///________________________________________________________________________
2780 Int_t AliConversionCuts::GetNumberOfContributorsVtx(AliVEvent *event){
2781 // returns number of contributors to the vertex
2783 AliESDEvent *fESDEvent=dynamic_cast<AliESDEvent*>(event);
2785 if (fESDEvent->GetPrimaryVertex() != NULL){
2786 if(fESDEvent->GetPrimaryVertex()->GetNContributors()>0) {
2787 return fESDEvent->GetPrimaryVertex()->GetNContributors();
2791 if(fESDEvent->GetPrimaryVertexSPD() !=NULL){
2792 if(fESDEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2793 return fESDEvent->GetPrimaryVertexSPD()->GetNContributors();
2795 AliWarning(Form("Number of contributors from bad vertex type:: %s",fESDEvent->GetPrimaryVertex()->GetName()));
2801 AliAODEvent *fAODEvent=dynamic_cast<AliAODEvent*>(event);
2803 if (fAODEvent->GetPrimaryVertex() != NULL){
2804 if(fAODEvent->GetPrimaryVertex()->GetNContributors()>0) {
2805 return fAODEvent->GetPrimaryVertex()->GetNContributors();
2808 if(fAODEvent->GetPrimaryVertexSPD() !=NULL){
2809 if(fAODEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2810 return fAODEvent->GetPrimaryVertexSPD()->GetNContributors();
2812 AliWarning(Form("Number of contributors from bad vertex type:: %s",fAODEvent->GetPrimaryVertex()->GetName()));
2821 ///________________________________________________________________________
2823 Bool_t AliConversionCuts::IsTriggerSelected()
2826 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
2828 UInt_t isSelected = AliVEvent::kAny;
2829 if (fInputHandler==NULL) return kFALSE;
2830 if( fInputHandler->GetEventSelection()) {
2831 // Get the actual offline trigger mask for the event and AND it with the
2832 // requested mask. If no mask requested select by default the event.
2833 if (fOfflineTriggerMask)
2834 isSelected = fOfflineTriggerMask & fInputHandler->IsEventSelected();
2836 fIsSDDFired = !(fInputHandler->IsEventSelected() & AliVEvent::kFastOnly);
2840 if (fIsSDDFired) hTriggerClass->Fill(33);
2841 if (fInputHandler->IsEventSelected() & AliVEvent::kMB)hTriggerClass->Fill(0);
2842 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7)hTriggerClass->Fill(1);
2843 if (fInputHandler->IsEventSelected() & AliVEvent::kMUON)hTriggerClass->Fill(2);
2844 if (fInputHandler->IsEventSelected() & AliVEvent::kHighMult)hTriggerClass->Fill(3);
2845 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC1)hTriggerClass->Fill(4);
2846 if (fInputHandler->IsEventSelected() & AliVEvent::kCINT5)hTriggerClass->Fill(5);
2847 if (fInputHandler->IsEventSelected() & AliVEvent::kCMUS5)hTriggerClass->Fill(6);
2848 if (fInputHandler->IsEventSelected() & AliVEvent::kMUSPB)hTriggerClass->Fill(6);
2849 if (fInputHandler->IsEventSelected() & AliVEvent::kMUSH7)hTriggerClass->Fill(7);
2850 if (fInputHandler->IsEventSelected() & AliVEvent::kMUSHPB)hTriggerClass->Fill(7);
2851 if (fInputHandler->IsEventSelected() & AliVEvent::kMUL7)hTriggerClass->Fill(8);
2852 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikePB)hTriggerClass->Fill(8);
2853 if (fInputHandler->IsEventSelected() & AliVEvent::kMUU7)hTriggerClass->Fill(9);
2854 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikePB)hTriggerClass->Fill(9);
2855 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7)hTriggerClass->Fill(10);
2856 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC8)hTriggerClass->Fill(10);
2857 if (fInputHandler->IsEventSelected() & AliVEvent::kMUS7)hTriggerClass->Fill(11);
2858 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI1)hTriggerClass->Fill(12);
2859 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI7)hTriggerClass->Fill(13);
2860 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI8)hTriggerClass->Fill(13);
2861 if (fInputHandler->IsEventSelected() & AliVEvent::kPHOSPb)hTriggerClass->Fill(13);
2862 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE)hTriggerClass->Fill(14);
2863 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA)hTriggerClass->Fill(15);
2864 if (fInputHandler->IsEventSelected() & AliVEvent::kCentral)hTriggerClass->Fill(16);
2865 if (fInputHandler->IsEventSelected() & AliVEvent::kSemiCentral)hTriggerClass->Fill(17);
2866 if (fInputHandler->IsEventSelected() & AliVEvent::kDG5)hTriggerClass->Fill(18);
2867 if (fInputHandler->IsEventSelected() & AliVEvent::kZED)hTriggerClass->Fill(19);
2868 if (fInputHandler->IsEventSelected() & AliVEvent::kSPI7)hTriggerClass->Fill(20);
2869 if (fInputHandler->IsEventSelected() & AliVEvent::kSPI)hTriggerClass->Fill(20);
2870 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8)hTriggerClass->Fill(21);
2871 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)hTriggerClass->Fill(22);
2872 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)hTriggerClass->Fill(23);
2873 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikeLowPt8)hTriggerClass->Fill(24);
2874 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)hTriggerClass->Fill(25);
2875 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)hTriggerClass->Fill(26);
2876 if (fInputHandler->IsEventSelected() & AliVEvent::kUserDefined)hTriggerClass->Fill(27);
2877 if (fInputHandler->IsEventSelected() & AliVEvent::kTRD)hTriggerClass->Fill(28);
2878 if (fInputHandler->IsEventSelected() & AliVEvent::kFastOnly)hTriggerClass->Fill(29);
2879 if (fInputHandler->IsEventSelected() & AliVEvent::kAnyINT)hTriggerClass->Fill(30);
2880 if (fInputHandler->IsEventSelected() & AliVEvent::kAny)hTriggerClass->Fill(31);
2881 if (!fInputHandler->IsEventSelected()) hTriggerClass->Fill(34);
2884 if(hTriggerClassSelected && isSelected){
2885 if (!fIsSDDFired) hTriggerClassSelected->Fill(33);
2886 if (fInputHandler->IsEventSelected() & AliVEvent::kMB)hTriggerClassSelected->Fill(0);
2887 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7)hTriggerClassSelected->Fill(1);
2888 if (fInputHandler->IsEventSelected() & AliVEvent::kMUON)hTriggerClassSelected->Fill(2);
2889 if (fInputHandler->IsEventSelected() & AliVEvent::kHighMult)hTriggerClassSelected->Fill(3);
2890 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC1)hTriggerClassSelected->Fill(4);
2891 if (fInputHandler->IsEventSelected() & AliVEvent::kCINT5)hTriggerClassSelected->Fill(5);
2892 if (fInputHandler->IsEventSelected() & AliVEvent::kCMUS5)hTriggerClassSelected->Fill(6);
2893 if (fInputHandler->IsEventSelected() & AliVEvent::kMUSPB)hTriggerClassSelected->Fill(6);
2894 if (fInputHandler->IsEventSelected() & AliVEvent::kMUSH7)hTriggerClassSelected->Fill(7);
2895 if (fInputHandler->IsEventSelected() & AliVEvent::kMUSHPB)hTriggerClassSelected->Fill(7);
2896 if (fInputHandler->IsEventSelected() & AliVEvent::kMUL7)hTriggerClassSelected->Fill(8);
2897 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikePB)hTriggerClassSelected->Fill(8);
2898 if (fInputHandler->IsEventSelected() & AliVEvent::kMUU7)hTriggerClassSelected->Fill(9);
2899 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikePB)hTriggerClassSelected->Fill(9);
2900 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7)hTriggerClassSelected->Fill(10);
2901 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC8)hTriggerClassSelected->Fill(10);
2902 if (fInputHandler->IsEventSelected() & AliVEvent::kMUS7)hTriggerClassSelected->Fill(11);
2903 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI1)hTriggerClassSelected->Fill(12);
2904 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI7)hTriggerClassSelected->Fill(13);
2905 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI8)hTriggerClassSelected->Fill(13);
2906 if (fInputHandler->IsEventSelected() & AliVEvent::kPHOSPb)hTriggerClassSelected->Fill(13);
2907 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE)hTriggerClassSelected->Fill(14);
2908 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA)hTriggerClassSelected->Fill(15);
2909 if (fInputHandler->IsEventSelected() & AliVEvent::kCentral)hTriggerClassSelected->Fill(16);
2910 if (fInputHandler->IsEventSelected() & AliVEvent::kSemiCentral)hTriggerClassSelected->Fill(17);
2911 if (fInputHandler->IsEventSelected() & AliVEvent::kDG5)hTriggerClassSelected->Fill(18);
2912 if (fInputHandler->IsEventSelected() & AliVEvent::kZED)hTriggerClassSelected->Fill(19);
2913 if (fInputHandler->IsEventSelected() & AliVEvent::kSPI7)hTriggerClassSelected->Fill(20);
2914 if (fInputHandler->IsEventSelected() & AliVEvent::kSPI)hTriggerClassSelected->Fill(20);
2915 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8)hTriggerClassSelected->Fill(21);
2916 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)hTriggerClassSelected->Fill(22);
2917 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)hTriggerClassSelected->Fill(23);
2918 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikeLowPt8)hTriggerClassSelected->Fill(24);
2919 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)hTriggerClassSelected->Fill(25);
2920 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)hTriggerClassSelected->Fill(26);
2921 if (fInputHandler->IsEventSelected() & AliVEvent::kUserDefined)hTriggerClassSelected->Fill(27);
2922 if (fInputHandler->IsEventSelected() & AliVEvent::kTRD)hTriggerClassSelected->Fill(28);
2923 if (fInputHandler->IsEventSelected() & AliVEvent::kFastOnly)hTriggerClassSelected->Fill(29);
2924 if (fInputHandler->IsEventSelected() & AliVEvent::kAnyINT)hTriggerClassSelected->Fill(30);
2925 if (fInputHandler->IsEventSelected() & AliVEvent::kAny)hTriggerClassSelected->Fill(31);
2928 if(!isSelected)return kFALSE;
2934 ///________________________________________________________________________
2935 Int_t AliConversionCuts::GetFirstTPCRow(Double_t radius){
2936 // Get first TPC row
2937 Int_t firstTPCRow = 0;
2938 Double_t radiusI = 84.8;
2939 Double_t radiusO = 134.6;
2940 Double_t radiusOB = 198.;
2941 Double_t rSizeI = 0.75;
2942 Double_t rSizeO = 1.;
2943 Double_t rSizeOB = 1.5;
2947 if(radius <= radiusI){
2950 if(radius>radiusI && radius<=radiusO){
2951 firstTPCRow = (Int_t)((radius-radiusI)/rSizeI);
2953 if(radius>radiusO && radius<=radiusOB){
2954 firstTPCRow = (Int_t)(nClsI+(radius-radiusO)/rSizeO);
2957 if(radius>radiusOB){
2958 firstTPCRow =(Int_t)(nClsIO+(radius-radiusOB)/rSizeOB);
2964 Bool_t AliConversionCuts::CosinePAngleCut(const AliConversionPhotonBase * photon, AliVEvent * event) const {
2965 ///Check if passes cosine of pointing angle cut
2966 if(GetCosineOfPointingAngle(photon, event) < (TMath::Cos(fCosPAngleCut))){
2972 Double_t AliConversionCuts::GetCosineOfPointingAngle( const AliConversionPhotonBase * photon, AliVEvent * event) const{
2973 // calculates the pointing angle of the recalculated V0
2975 Double_t momV0[3] = {0,0,0};
2976 if(event->IsA()==AliESDEvent::Class()){
2977 AliESDEvent *esdEvent = dynamic_cast<AliESDEvent*>(event);
2978 if(!esdEvent) return -999;
2979 AliESDv0 *v0 = esdEvent->GetV0(photon->GetV0Index());
2980 if(!v0) return -999;
2981 v0->GetPxPyPz(momV0[0],momV0[1],momV0[2]);
2983 if(event->IsA()==AliAODEvent::Class()){
2984 momV0[0] = photon->GetPx();
2985 momV0[1] = photon->GetPy();
2986 momV0[2] = photon->GetPz();
2989 //Double_t momV0[3] = { photon->GetPx(), photon->GetPy(), photon->GetPz() }; //momentum of the V0
2990 Double_t PosV0[3] = { photon->GetConversionX() - event->GetPrimaryVertex()->GetX(),
2991 photon->GetConversionY() - event->GetPrimaryVertex()->GetY(),
2992 photon->GetConversionZ() - event->GetPrimaryVertex()->GetZ() }; //Recalculated V0 Position vector
2994 Double_t momV02 = momV0[0]*momV0[0] + momV0[1]*momV0[1] + momV0[2]*momV0[2];
2995 Double_t PosV02 = PosV0[0]*PosV0[0] + PosV0[1]*PosV0[1] + PosV0[2]*PosV0[2];
2998 Double_t cosinePointingAngle = -999;
2999 if(momV02*PosV02 > 0.0)
3000 cosinePointingAngle = (PosV0[0]*momV0[0] + PosV0[1]*momV0[1] + PosV0[2]*momV0[2] ) / TMath::Sqrt(momV02 * PosV02);
3002 return cosinePointingAngle;
3005 ///________________________________________________________________________
3006 Bool_t AliConversionCuts::PsiPairCut(const AliConversionPhotonBase * photon) const {
3008 if(photon->GetPsiPair() > fPsiPairCut){
3014 ///________________________________________________________________________
3015 TString AliConversionCuts::GetCutNumber(){
3016 // returns TString with current cut number
3018 for(Int_t ii=0;ii<kNCuts;ii++){
3019 a.Append(Form("%d",fCuts[ii]));
3024 ///________________________________________________________________________
3025 void AliConversionCuts::FillElectonLabelArray(AliAODConversionPhoton* photon, Int_t nV0){
3027 Int_t posLabel = photon->GetTrackLabelPositive();
3028 Int_t negLabel = photon->GetTrackLabelNegative();
3030 fElectronLabelArray[nV0*2] = posLabel;
3031 fElectronLabelArray[(nV0*2)+1] = negLabel;
3033 ///________________________________________________________________________
3034 Bool_t AliConversionCuts::RejectSharedElectronV0s(AliAODConversionPhoton* photon, Int_t nV0, Int_t nV0s){
3036 Int_t posLabel = photon->GetTrackLabelPositive();
3037 Int_t negLabel = photon->GetTrackLabelNegative();
3039 for(Int_t i = 0; i<nV0s*2;i++){
3040 if(i==nV0*2) continue;
3041 if(i==(nV0*2)+1) continue;
3042 if(fElectronLabelArray[i] == posLabel){
3044 if(fElectronLabelArray[i] == negLabel){
3050 ///________________________________________________________________________
3051 Bool_t AliConversionCuts::RejectToCloseV0s(AliAODConversionPhoton* photon, TList *photons, Int_t nV0){
3054 Double_t posX = photon->GetConversionX();
3055 Double_t posY = photon->GetConversionY();
3056 Double_t posZ = photon->GetConversionZ();
3058 for(Int_t i = 0;i<photons->GetEntries();i++){
3059 if(nV0 == i) continue;
3060 AliAODConversionPhoton *photonComp = (AliAODConversionPhoton*) photons->At(i);
3061 Double_t posCompX = photonComp->GetConversionX();
3062 Double_t posCompY = photonComp->GetConversionY();
3063 Double_t posCompZ = photonComp->GetConversionZ();
3065 Double_t dist = pow((posX - posCompX),2)+pow((posY - posCompY),2)+pow((posZ - posCompZ),2);
3067 if(dist < fminV0Dist*fminV0Dist){
3068 if(photon->GetChi2perNDF() < photonComp->GetChi2perNDF()) return kTRUE;
3076 ///________________________________________________________________________
3077 void AliConversionCuts::GetNotRejectedParticles(Int_t rejection, TList *HeaderList, AliMCEvent *MCEvent){
3079 if(fNotRejectedStart){
3080 delete[] fNotRejectedStart;
3081 fNotRejectedStart = NULL;
3083 if(fNotRejectedEnd){
3084 delete[] fNotRejectedEnd;
3085 fNotRejectedEnd = NULL;
3087 if(fGeneratorNames){
3088 delete[] fGeneratorNames;
3089 fGeneratorNames = NULL;
3092 if(rejection == 0) return; // No Rejection
3093 AliGenCocktailEventHeader *cHeader = dynamic_cast<AliGenCocktailEventHeader*>(MCEvent->GenEventHeader());
3095 TList *genHeaders = cHeader->GetHeaders();
3096 AliGenEventHeader* gh = 0;
3098 if(rejection == 1 || rejection == 3) fnHeaders = 1; // MinBiasHeader
3099 if(rejection == 2){ // TList of Headers Names
3100 for(Int_t i = 0; i<genHeaders->GetEntries();i++){
3101 gh = (AliGenEventHeader*)genHeaders->At(i);
3102 TString GeneratorName = gh->GetName();
3103 for(Int_t j = 0; j<HeaderList->GetEntries();j++){
3104 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3105 if(GeneratorName.CompareTo(GeneratorInList) == 0){
3113 fNotRejectedStart = new Int_t[fnHeaders];
3114 fNotRejectedEnd = new Int_t[fnHeaders];
3115 fGeneratorNames = new TString[fnHeaders];
3117 if(rejection == 1 || rejection == 3){
3118 fNotRejectedStart[0] = 0;
3119 fNotRejectedEnd[0] = ((AliGenEventHeader*)genHeaders->At(0))->NProduced()-1;
3120 fGeneratorNames[0] = ((AliGenEventHeader*)genHeaders->At(0))->GetName();
3124 Int_t firstindex = 0;
3125 Int_t lastindex = -1;
3127 for(Int_t i = 0; i<genHeaders->GetEntries();i++){
3128 gh = (AliGenEventHeader*)genHeaders->At(i);
3129 TString GeneratorName = gh->GetName();
3130 lastindex = lastindex + gh->NProduced();
3131 for(Int_t j = 0; j<HeaderList->GetEntries();j++){
3132 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3133 if(GeneratorName.CompareTo(GeneratorInList) == 0){
3134 fNotRejectedStart[nummer] = firstindex;
3135 fNotRejectedEnd[nummer] = lastindex;
3136 fGeneratorNames[nummer] = GeneratorName;
3137 // cout << "Number of particles produced for: " << i << "\t" << GeneratorName.Data() << "\t" << lastindex-firstindex+1 << endl;
3142 firstindex = firstindex + gh->NProduced();
3144 } else { // No Cocktail Header Found
3145 fNotRejectedStart = new Int_t[1];
3146 fNotRejectedEnd = new Int_t[1];
3149 fNotRejectedStart[0] = 0;
3150 fNotRejectedEnd[0] = MCEvent->Stack()->GetNprimary()-1;
3151 // if(rejection == 2){
3152 fGeneratorNames = new TString[1];
3153 fGeneratorNames[0] = "NoCocktailGeneratorFound";
3156 AliGenPythiaEventHeader *mcHeaderPythia = dynamic_cast<AliGenPythiaEventHeader*>(MCEvent->GenEventHeader());
3157 if (mcHeaderPythia) fGeneratorNames[0] = "NoCocktailGeneratorFound_Pythia";
3158 AliGenDPMjetEventHeader *mcHeaderPhojet = dynamic_cast<AliGenDPMjetEventHeader*>(MCEvent->GenEventHeader());
3159 if (mcHeaderPhojet) fGeneratorNames[0] = "NoCocktailGeneratorFound_Phojet";
3160 AliGenHijingEventHeader *mcHeaderHijing = dynamic_cast<AliGenHijingEventHeader*>(MCEvent->GenEventHeader());
3161 if (mcHeaderHijing) fGeneratorNames[0] = "NoCocktailGeneratorFound_Hijing";
3163 SetRejectExtraSignalsCut(0);
3167 //_________________________________________________________________________
3168 Int_t AliConversionCuts::IsParticleFromBGEvent(Int_t index, AliStack *MCStack){
3170 // Not Accepted == kFALSE == 0
3171 // Accepted == kTRUE == 1
3172 // FirstHeader == kTRUE == 3
3174 if(index < 0) return 0; // No Particle
3177 if( index >= MCStack->GetNprimary()){ // Secondary Particle
3178 if( ((TParticle*)MCStack->Particle(index))->GetMother(0) < 0) return 1; // Secondary Particle without Mother??
3179 return IsParticleFromBGEvent(((TParticle*)MCStack->Particle(index))->GetMother(0),MCStack);
3181 for(Int_t i = 0;i<fnHeaders;i++){
3182 if(index >= fNotRejectedStart[i] && index <= fNotRejectedEnd[i]){
3184 if(i == 0) accepted = 2; // MB Header
3190 //_________________________________________________________________________
3191 Int_t AliConversionCuts::IsEventAcceptedByConversionCut(AliConversionCuts *ReaderCuts, AliVEvent *InputEvent, AliMCEvent *MCEvent, Bool_t isHeavyIon){
3193 if(isHeavyIon && !(IsCentralitySelected(InputEvent,MCEvent)))
3194 return 1; // Check Centrality --> Not Accepted => eventQuality = 1
3196 if(!isHeavyIon && GetIsFromPileup()){
3197 if(InputEvent->IsPileupFromSPD(3,0.8,3.,2.,5.)){
3198 return 6; // Check Pileup --> Not Accepted => eventQuality = 6
3202 Bool_t hasV0And = ReaderCuts->HasV0AND();
3203 Bool_t isSDDFired = ReaderCuts->IsSDDFired();
3204 if( (IsSpecialTrigger() == 2 || IsSpecialTrigger() == 3) && !isSDDFired && !MCEvent)
3205 return 7; // With SDD requested but no fired
3207 if( (IsSpecialTrigger() == 1 || IsSpecialTrigger() == 3) && !hasV0And)
3208 return 8; // V0AND requested but no fired
3214 Float_t AliConversionCuts::GetWeightForMeson(TString period, Int_t index, AliStack *MCStack){
3215 if (!(period.CompareTo("LHC12f1a") == 0 || period.CompareTo("LHC12f1b") == 0 || period.CompareTo("LHC12i3") == 0 )) return 1.;
3218 for (Int_t i = 0; i < fnHeaders; i++){
3219 if (index >= fNotRejectedStart[i] && index < fNotRejectedEnd[i]+1){
3220 // cout << fGeneratorNames[i].Data() << endl;
3221 if (fGeneratorNames[i].CompareTo("Pythia") == 0){
3223 } else if (fGeneratorNames[i].CompareTo("DPMJET") == 0){
3225 } else if (fGeneratorNames[i].CompareTo("HIJING") == 0){
3227 } else if (fGeneratorNames[i].CompareTo("BOX") == 0){
3229 } else if (fGeneratorNames[i].CompareTo("PARAM") == 0){
3231 } else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound") == 0){
3233 } else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound_Pythia") == 0){
3235 } else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound_Phojet") == 0){
3237 } else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound_Hijing") == 0){
3240 // cout << "resulting kCaseGen :" << kCaseGen << endl;
3244 Double_t mesonPt = ((TParticle*)MCStack->Particle(index))->Pt();
3246 Double_t mesonMass = ((TParticle*)MCStack->Particle(index))->GetCalcMass();
3247 Float_t functionResult = 1.;
3249 Float_t dNdyMC = 2.1462;
3250 Float_t nMC = 7.06055;
3251 Float_t tMC = 0.12533;
3252 if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 111){
3256 } else if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 221){
3261 functionResult = dNdyMC / ( 2 * TMath::Pi())*(nMC-1.)*(nMC-2.) / (nMC*tMC*(nMC*tMC+mesonMass*(nMC-2.))) * TMath::Power(1.+(TMath::Sqrt(mesonPt*mesonPt+mesonMass*mesonMass)-mesonMass)/(nMC*tMC), -nMC);
3262 } else if (kCaseGen == 2){
3263 Float_t dNdyMC = 2.35978;
3264 Float_t nMC = 6.81795;
3265 Float_t tMC = 0.11492;
3266 if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 111){
3270 } else if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 221){
3275 functionResult = dNdyMC / ( 2 * TMath::Pi())*(nMC-1.)*(nMC-2.) / (nMC*tMC*(nMC*tMC+mesonMass*(nMC-2.))) * TMath::Power(1.+(TMath::Sqrt(mesonPt*mesonPt+mesonMass*mesonMass)-mesonMass)/(nMC*tMC), -nMC);
3276 } else if (kCaseGen == 4){
3277 // functionResult = 1./sqrt(1.-mesonMass*mesonMass/((mesonMass*mesonMass+mesonPt*mesonPt)*cosh(mesonY)*cosh(mesonY)));
3278 Float_t a = 0.23437;
3280 Float_t c = -1430.5863;
3281 Float_t d = -0.6966624;
3282 Float_t e = 252.3742;
3283 if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 111){
3289 } else if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 221){
3296 functionResult = a*TMath::Power(mesonPt,-1.*(b+c/(TMath::Power(mesonPt,d)+e)))*1./mesonPt *1./1.6 *1./(2.* TMath::Pi());
3299 Float_t dNdyData = 2.2328;
3300 Float_t nData = 7.1473;
3301 Float_t tData = 0.1346;
3302 if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 111){
3306 } else if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 221){
3307 dNdyData = 0.38992; //be careful this fit is not optimal, eta in data still has problems
3311 Float_t tsallisData = dNdyData / ( 2 * TMath::Pi())*(nData-1.)*(nData-2.) / (nData*tData*(nData*tData+mesonMass*(nData-2.))) * TMath::Power(1.+(TMath::Sqrt(mesonPt*mesonPt+mesonMass*mesonMass)-mesonMass)/(nData*tData), -nData);
3312 // cout << "tsallisData/functionResult: " << tsallisData/functionResult << endl;
3313 return tsallisData/functionResult;
3317 ///________________________________________________________________________
3318 AliConversionCuts* AliConversionCuts::GetStandardCuts2010PbPb(){
3319 //Create and return standard 2010 PbPb cuts
3320 AliConversionCuts *cuts=new AliConversionCuts("StandardCuts2010PbPb","StandardCuts2010PbPb");
3321 if(!cuts->InitializeCutsFromCutString("1000002042092970023220000")){
3322 cout<<"Warning: Initialization of Standardcuts2010PbPb failed"<<endl;}
3326 ///________________________________________________________________________
3327 AliConversionCuts* AliConversionCuts::GetStandardCuts2010pp(){
3328 //Create and return standard 2010 PbPb cuts
3329 AliConversionCuts *cuts=new AliConversionCuts("StandardCuts2010pp","StandardCuts2010pp");
3330 if(!cuts->InitializeCutsFromCutString("0000011002093663003800000")){
3331 cout<<"Warning: Initialization of Standardcuts2010pp failed"<<endl;}