AliPhysics  41af4b0 (41af4b0)
AliDalitzElectronCuts.cxx
Go to the documentation of this file.
1 
2 /**************************************************************************
3  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * *
5  * Authors: Svein Lindal, Daniel Lohner *
6  * Version 1.0 *
7  * *
8  * Permission to use, copy, modify and distribute this software and its *
9  * documentation strictly for non-commercial purposes is hereby granted *
10  * without fee, provided that the above copyright notice appears in all *
11  * copies and that both the copyright notice and this permission notice *
12  * appear in the supporting documentation. The authors make no claims *
13  * about the suitability of this software for any purpose. It is *
14  * provided "as is" without express or implied warranty. *
15  **************************************************************************/
16 
18 //---------------------------------------------
19 // Class handling all kinds of selection cuts for
20 // Gamma Conversion analysis
21 //---------------------------------------------
23 
24 
25 #include "AliDalitzElectronCuts.h"
26 #include "AliAODConversionPhoton.h"
27 #include "AliKFVertex.h"
28 #include "AliAODTrack.h"
29 #include "AliESDtrack.h"
30 #include "AliAnalysisManager.h"
31 #include "AliInputEventHandler.h"
32 #include "AliMCEventHandler.h"
33 #include "AliAODHandler.h"
34 #include "AliPIDResponse.h"
35 #include "TH1.h"
36 #include "TH2.h"
37 #include "AliMCEvent.h"
38 #include "TObjString.h"
39 #include "AliAODEvent.h"
40 #include "AliESDEvent.h"
41 #include "TList.h"
42 class iostream;
43 
44 using namespace std;
45 
46 ClassImp(AliDalitzElectronCuts)
47 
48 
49 const char* AliDalitzElectronCuts::fgkCutNames[AliDalitzElectronCuts::kNCuts] = {
50  "MaxChi2TPCConstrainedGlobal",
51  "ededxSigmaITSCut",
52  "ededxSigmaTPCCut",
53  "pidedxSigmaTPCCut",
54  "piMinMomdedxSigmaTPCCut",
55  "piMaxMomdedxSigmaTPCCut",
56  "LowPRejectionSigmaCut",
57  "kTOFelectronPID",
58  "clsITSCut",
59  "clsTPCCut",
60  "EtaCut",
61  "PsiPair",
62  "RejectSharedElecGamma",
63  "MaxChi2PerClusterTPC",
64  "MaxChi2PerClusterITS",
65  "PtCut",
66  "DCAcut",
67  "MassCut",
68  "Weights",
69  "VPhotonMCPSmearing"
70 };
71 
72 //________________________________________________________________________
73 AliDalitzElectronCuts::AliDalitzElectronCuts(const char *name,const char *title) : AliAnalysisCuts(name,title),
74  fHistograms(NULL),
75  fPIDResponse(NULL),
76  fesdTrackCuts(NULL),
77  fEtaCut(0.9),
78  fDoEtaCut(kFALSE),
79  fPtMinCut(0.0),
80  fPtMaxCut(9999),
81  fRadiusCut(1000.0),
82  fPsiPairCut(0.45),
83  fDeltaPhiCutMin(0.),
84  fDeltaPhiCutMax(0.12),
85  fMinClsTPC(0), // minimum clusters in the TPC
86  fMinClsTPCToF(0), // minimum clusters to findable clusters
87  fDodEdxSigmaITSCut(kFALSE),
88  fDodEdxSigmaTPCCut(kTRUE),
89  fDoTOFsigmaCut(kFALSE), // RRnewTOF
90  fDoRejectSharedElecGamma(kFALSE),
91  fDoPsiPairCut(kFALSE),
92  fPIDnSigmaAboveElectronLineITS(100),
93  fPIDnSigmaBelowElectronLineITS(-100),
94  fPIDnSigmaAboveElectronLineTPC(100),
95  fPIDnSigmaBelowElectronLineTPC(-100),
96  fPIDnSigmaAbovePionLineTPC(0),
97  fPIDnSigmaAbovePionLineTPCHighPt(-100),
98  fTofPIDnSigmaAboveElectronLine(100), // RRnewTOF
99  fTofPIDnSigmaBelowElectronLine(-100), // RRnewTOF
100  fPIDMinPnSigmaAbovePionLineTPC(0),
101  fPIDMaxPnSigmaAbovePionLineTPC(0),
102  fDoKaonRejectionLowP(kFALSE),
103  fDoProtonRejectionLowP(kFALSE),
104  fDoPionRejectionLowP(kFALSE),
105  fPIDnSigmaAtLowPAroundKaonLine(0),
106  fPIDnSigmaAtLowPAroundProtonLine(0),
107  fPIDnSigmaAtLowPAroundPionLine(0),
108  fPIDMinPKaonRejectionLowP(1.5),
109  fPIDMinPProtonRejectionLowP(2.0),
110  fPIDMinPPionRejectionLowP(0.5),
111  fUseCorrectedTPCClsInfo(kFALSE),
112  fUseCrossedRows(kFALSE),
113  fUseTOFpid(kFALSE),
114  fRequireTOF(kFALSE),
115  fDoMassCut(kFALSE),
116  fDoMassMinCut(kFALSE),
117  fMassCutLowPt(999.),
118  fMassCutHighPt(999.),
119  fMassCutPtMin(-100.0),
120  fMassMinCut(-999.),
121  fDoWeights(kFALSE),
122  fUseVPhotonMCPSmearing(kFALSE),
123  fUseElectronMCPSmearing(kFALSE),
124  fCutString(NULL),
125  fCutStringRead(""),
126  hCutIndex(NULL),
127  hdEdxCuts(NULL),
128  hITSdEdxbefore(NULL),
129  hITSdEdxafter(NULL),
130  hTPCdEdxbefore(NULL),
131  hTPCdEdxafter(NULL),
132  hTPCdEdxSignalbefore(NULL),
133  hTPCdEdxSignalafter(NULL),
134  hTOFbefore(NULL),
135  hTOFafter(NULL),
136  hTrackDCAxyPtbefore(NULL),
137  hTrackDCAxyPtafter(NULL),
138  hTrackDCAzPtbefore(NULL),
139  hTrackDCAzPtafter(NULL),
140  hTrackNFindClsPtTPCbefore(NULL),
141  hTrackNFindClsPtTPCafter(NULL),
142  hTrackPosEtabeforeDedx(NULL),
143  hTrackNegEtabeforeDedx(NULL),
144  hTrackPosEtaafterDedx(NULL),
145  hTrackNegEtaafterDedx(NULL)
146  {
147  InitPIDResponse();
148  for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=0;}
149  fCutString=new TObjString((GetCutNumber()).Data());
150 
151  //fesdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts");
152  // Using standard function for setting Cuts
153  Bool_t selectPrimaries=kFALSE;
154  fesdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(selectPrimaries);
155 }
156 
157 //________________________________________________________________________
159  // Destructor
160  //Deleting fHistograms leads to seg fault it it's added to output collection of a task
161  // if(fHistograms)
162  // delete fHistograms;
163  // fHistograms = NULL;
164 
165  if(fCutString != NULL){
166  delete fCutString;
167  fCutString = NULL;
168  }
169 }
170 
171 //________________________________________________________________________
173 
174  // Initialize Cut Histograms for QA (only initialized and filled if function is called)
175  TH1::AddDirectory(kFALSE);
176  TString cutName = "";
177  if( cutNumber==""){
178  cutName = GetCutNumber().Data();
179  } else {
180  cutName = cutNumber.Data();
181  }
182 
183  if(fHistograms != NULL){
184  delete fHistograms;
185  fHistograms=NULL;
186  }
187  if(fHistograms==NULL){
188  fHistograms=new TList();
189  if(name=="")fHistograms->SetName(Form("ElectronCuts_%s",cutName.Data()));
190  else fHistograms->SetName(Form("%s_%s",name.Data(),cutName.Data()));
191  }
192 
193  Int_t kDedxSignalbins = 200;
194  const Int_t kDCABins=62;
195 
196  Double_t binsDCADummy[63]={-3.0, -2.7, -2.4, -2.1, -1.8, -1.5, -1.2, -0.9, -0.6, -0.3, -0.25, -0.2, -0.19, -0.18, -0.17, -0.16, -0.15, -0.14, -0.13, -0.12, -0.11, -0.10, -0.09, -0.08, -0.07, -0.06, -0.05, -0.04, -0.03, -0.02, -0.01, 0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.25, 0.3, 0.6, 0.9, 1.2, 1.5, 1.8, 2.1, 2.4, 2.7, 3.0};
197 
198  const Int_t kPtBins=110;
199  Double_t binsPtDummy[kPtBins+1];
200  const Int_t kPBins = 109;
201  Double_t binsPDummy[kPBins+1];
202  binsPtDummy[0]=0.0;
203  binsPDummy[0]=0.05;
204 
205  for(Int_t i=1;i<kPtBins+1;i++){
206  if(binsPtDummy[i-1]+0.05<1.01)
207  binsPtDummy[i]=binsPtDummy[i-1]+0.05;
208  else
209  binsPtDummy[i]=binsPtDummy[i-1]+0.1;
210  }
211  for(Int_t i=1; i <kPBins+1;i++){
212  if( binsPDummy[i-1]+0.05<1.01)
213  binsPDummy[i] = binsPDummy[i-1]+0.05;
214  else
215  binsPDummy[i] = binsPDummy[i-1]+0.1;
216  }
217 
218  hCutIndex=new TH1F(Form("IsElectronSelected %s",cutName.Data()),"IsElectronSelected",10,-0.5,9.5);
219  hCutIndex->GetXaxis()->SetBinLabel(kElectronIn+1,"in");
220  hCutIndex->GetXaxis()->SetBinLabel(kNoTracks+1,"no tracks");
221  hCutIndex->GetXaxis()->SetBinLabel(kTrackCuts+1,"Track cuts");
222  hCutIndex->GetXaxis()->SetBinLabel(kdEdxCuts+1,"dEdx");
223  hCutIndex->GetXaxis()->SetBinLabel(kElectronOut+1,"out");
224  fHistograms->Add(hCutIndex);
225 
226  // dEdx Cuts
227  hdEdxCuts=new TH1F(Form("dEdxCuts %s",cutName.Data()),"dEdxCuts",10,-0.5,9.5);
228  hdEdxCuts->GetXaxis()->SetBinLabel(1,"in");
229  hdEdxCuts->GetXaxis()->SetBinLabel(2,"ITSelectron");
230  hdEdxCuts->GetXaxis()->SetBinLabel(3,"TPCelectron");
231  hdEdxCuts->GetXaxis()->SetBinLabel(4,"TPCpion");
232  hdEdxCuts->GetXaxis()->SetBinLabel(5,"TPCpionhighp");
233  hdEdxCuts->GetXaxis()->SetBinLabel(6,"TPCkaonlowprej");
234  hdEdxCuts->GetXaxis()->SetBinLabel(7,"TPCprotonlowprej");
235  hdEdxCuts->GetXaxis()->SetBinLabel(8,"TPCpionlowprej");
236  hdEdxCuts->GetXaxis()->SetBinLabel(9,"TOFelectron");
237  hdEdxCuts->GetXaxis()->SetBinLabel(10,"out");
238  fHistograms->Add(hdEdxCuts);
239 
240  TAxis *AxisBeforeITS = NULL;
241  TAxis *AxisBeforedEdx = NULL;
242  TAxis *AxisBeforeTOF = NULL;
243  TAxis *AxisBeforedEdxSignal = NULL;
244 
245  if(preCut){
246  hITSdEdxbefore=new TH2F(Form("Electron_ITS_before %s",cutName.Data()),"ITS dEdx electron before" ,kPBins,binsPDummy,200,-10,10);
248  AxisBeforeITS = hITSdEdxbefore->GetXaxis();
249 
250  hTPCdEdxbefore=new TH2F(Form("Electron_dEdx_before %s",cutName.Data()),"dEdx electron before" ,kPBins,binsPDummy,200,-10,10);
252  AxisBeforedEdx = hTPCdEdxbefore->GetXaxis();
253 
254  hTPCdEdxSignalbefore=new TH2F(Form("Electron_dEdxSignal_before %s",cutName.Data()),"dEdx electron signal before" ,kPBins,binsPDummy,kDedxSignalbins,0.0,200);
256  AxisBeforedEdxSignal = hTPCdEdxSignalbefore->GetXaxis();
257 
258  hTOFbefore=new TH2F(Form("Electron_TOF_before %s",cutName.Data()),"TOF electron before" ,kPBins,binsPDummy,200,-10,10);
259  fHistograms->Add(hTOFbefore);
260  AxisBeforeTOF = hTOFbefore->GetXaxis();
261 
262  hTrackDCAxyPtbefore = new TH2F(Form("hTrack_DCAxy_Pt_before %s",cutName.Data()),"DCAxy Vs Pt of tracks before",kDCABins,binsDCADummy,kPtBins,binsPtDummy);
264 
265  hTrackDCAzPtbefore = new TH2F(Form("hTrack_DCAz_Pt_before %s",cutName.Data()), "DCAz Vs Pt of tracks before",kDCABins,binsDCADummy,kPtBins,binsPtDummy);
267 
268  hTrackNFindClsPtTPCbefore = new TH2F(Form("hTrack_NFindCls_Pt_TPC_before %s",cutName.Data()),"Track: N Findable Cls TPC Vs Pt before",60,0,1.5,kPtBins,binsPtDummy);
270  }
271 
272  hITSdEdxafter=new TH2F(Form("Electron_ITS_after %s",cutName.Data()),"ITS dEdx electron after" ,kPBins,binsPDummy,200, -10,10);
274 
275  hTPCdEdxafter=new TH2F(Form("Electron_dEdx_after %s",cutName.Data()),"dEdx electron after" ,kPBins,binsPDummy,200, -10,10);
277 
278  hTPCdEdxSignalafter=new TH2F(Form("Electron_dEdxSignal_after %s",cutName.Data()),"dEdx electron signal after" ,kPBins,binsPDummy,kDedxSignalbins,0.0,200);
280 
281  hTOFafter=new TH2F(Form("Electron_TOF_after %s",cutName.Data()),"TOF electron after" ,kPBins,binsPDummy,200,-6,10);
282  fHistograms->Add(hTOFafter);
283 
284  hTrackDCAxyPtafter = new TH2F(Form("hTrack_DCAxy_Pt_after %s",cutName.Data()),"DCAxy Vs Pt of tracks after",kDCABins,binsDCADummy,kPtBins,binsPtDummy);
286 
287  hTrackDCAzPtafter = new TH2F(Form("hTrack_DCAz_Pt_after %s",cutName.Data()), "DCAz Vs Pt of tracks after",kDCABins,binsDCADummy,kPtBins,binsPtDummy);
289 
290  hTrackNFindClsPtTPCafter = new TH2F(Form("hTrack_NFindCls_Pt_TPC_after %s",cutName.Data()),"Track: N Findable Cls TPC Vs Pt after",60,0,1.5,kPtBins,binsPtDummy);
292 
293  hTrackPosEtabeforeDedx = new TH1F(Form("hTrack_Pos_Eta_before_Dedx %s",cutName.Data()),"hTrack_Pos_Eta_before_Dedx",600,-1.5,1.5);
295 
296  hTrackNegEtabeforeDedx = new TH1F(Form("hTrack_Neg_Eta_before_Dedx %s",cutName.Data()),"hTrack_Neg_Eta_before_Dedx",600,-1.5,1.5);
298 
299  hTrackPosEtaafterDedx = new TH1F(Form("hTrack_Pos_Eta_after_Dedx %s",cutName.Data()),"hTrack_Pos_Eta_after_Dedx",600,-1.5,1.5);
301 
302  hTrackNegEtaafterDedx = new TH1F(Form("hTrack_Neg_Eta_afterDedx %s",cutName.Data()),"hTrack_Neg_Eta_after_Dedx",600,-1.5,1.5);
304 
305  TAxis *AxisAfter = hTPCdEdxafter->GetXaxis();
306  Int_t bins = AxisAfter->GetNbins();
307  Double_t from = AxisAfter->GetXmin();
308  Double_t to = AxisAfter->GetXmax();
309  Double_t *newBins = new Double_t[bins+1];
310  newBins[0] = from;
311  Double_t factor = TMath::Power(to/from, 1./bins);
312  for(Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1];
313  AxisAfter->Set(bins, newBins);
314  AxisAfter = hTOFafter->GetXaxis();
315  AxisAfter->Set(bins, newBins);
316  AxisAfter = hITSdEdxafter->GetXaxis();
317  AxisAfter->Set(bins,newBins);
318  AxisAfter = hTPCdEdxSignalafter->GetXaxis();
319  AxisAfter->Set(bins,newBins);
320 
321  if(preCut){
322  AxisBeforeITS->Set(bins, newBins);
323  AxisBeforedEdx->Set(bins, newBins);
324  AxisBeforedEdxSignal->Set(bins,newBins);
325  AxisBeforeTOF->Set(bins, newBins);
326  }
327  delete [] newBins;
328 
329  TH1::AddDirectory(kTRUE);
330 
331  // Event Cuts and Info
332 }
333 
334 
335 //________________________________________________________________________
337 
338  // Set Pointer to AliPIDResponse
339  AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
340  if(man) {
341  AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
342  fPIDResponse = (AliPIDResponse*)inputHandler->GetPIDResponse();
343  if(fPIDResponse)return kTRUE;
344 
345  }
346 
347  return kFALSE;
348 }
350 Bool_t AliDalitzElectronCuts::ElectronIsSelectedMC(Int_t labelParticle,AliMCEvent *mcEvent)
351 {
352  if( labelParticle < 0 || labelParticle >= mcEvent->GetNumberOfTracks() ) return kFALSE;
353  //if( mcEvent->IsPhysicalPrimary(labelParticle) == kFALSE ) return kFALSE; //Ask Ana
354 
355  TParticle* particle = mcEvent->Particle(labelParticle);
356 
357  if( TMath::Abs( particle->GetPdgCode() ) != 11 ) return kFALSE;
358 
359  if( fDoEtaCut ){
360  if( particle->Eta() > fEtaCut || particle->Eta() < -fEtaCut )
361  return kFALSE;
362  }
363 
364  return kTRUE;
365 }
366 
367 
370 {
371  //Selection of Reconstructed electrons
372  Float_t b[2];
373  Float_t bCov[3];
374  lTrack->GetImpactParameters(b,bCov);
375 
376  if (bCov[0]<=0 || bCov[2]<=0) {
377  AliDebug(1, "Estimated b resolution lower or equal zero!");
378  bCov[0]=0; bCov[2]=0;
379  }
380 
381  Float_t dcaToVertexXY = b[0];
382  Float_t dcaToVertexZ = b[1];
383  Double_t clsToF = GetNFindableClustersTPC(lTrack);
384 
385  if( hTrackDCAxyPtbefore) hTrackDCAxyPtbefore->Fill(dcaToVertexXY,lTrack->Pt());
386  if( hTrackDCAzPtbefore ) hTrackDCAzPtbefore->Fill( dcaToVertexZ, lTrack->Pt());
387  if( hTrackNFindClsPtTPCbefore ) hTrackNFindClsPtTPCbefore->Fill( clsToF, lTrack->Pt());
388 
389  if(hCutIndex)hCutIndex->Fill(kElectronIn);
390  if (lTrack == NULL){
391  if(hCutIndex)hCutIndex->Fill(kNoTracks);
392  return kFALSE;
393  }
394 
395  if ( ! lTrack->GetConstrainedParam() ){
396  return kFALSE;
397  }
398  AliVTrack * track = dynamic_cast<AliVTrack*>(lTrack);
399 
400  // Track Cuts
401  if( !TrackIsSelected(lTrack) ){
402  if(hCutIndex)hCutIndex->Fill(kTrackCuts);
403  return kFALSE;
404  }
405 
406  if( lTrack->GetSign() > 0.0 ){
407  if (hTrackPosEtabeforeDedx) hTrackPosEtabeforeDedx->Fill(lTrack->Eta());
408  } else{
409  if(hTrackNegEtabeforeDedx) hTrackNegEtabeforeDedx->Fill(lTrack->Eta());
410 
411  }
412 
413  // dEdx Cuts
414  if( ! dEdxCuts( track ) ) {
415  if(hCutIndex)hCutIndex->Fill(kdEdxCuts);
416  return kFALSE;
417  }
418 
419  if( lTrack->GetSign() > 0.0 ){
420  if( hTrackPosEtaafterDedx) hTrackPosEtaafterDedx->Fill(lTrack->Eta());
421  } else{
422  if( hTrackNegEtaafterDedx) hTrackNegEtaafterDedx->Fill(lTrack->Eta());
423  }
424 
425  //Electron passed the cuts
426  if(hCutIndex)hCutIndex->Fill(kElectronOut);
427 
428  if( hTrackDCAxyPtafter) hTrackDCAxyPtafter->Fill(dcaToVertexXY,lTrack->Pt());
429  if( hTrackDCAzPtafter ) hTrackDCAzPtafter->Fill(dcaToVertexZ,lTrack->Pt());
430  if( hTrackNFindClsPtTPCafter ) hTrackNFindClsPtTPCafter->Fill( clsToF, lTrack->Pt());
431 
432 
433  return kTRUE;
434 }
435 
438  // Track Selection for Photon Reconstruction
439  Double_t clsToF = GetNFindableClustersTPC(lTrack);
440  if( ! fesdTrackCuts->AcceptTrack(lTrack) ){
441  return kFALSE;
442  }
443 
444  if( fDoEtaCut ) {
445  if( lTrack->Eta() > fEtaCut || lTrack->Eta() < -fEtaCut ) {
446  return kFALSE;
447  }
448  }
449 
450  if( lTrack->Pt() < fPtMinCut || lTrack->Pt() > fPtMaxCut ) {
451  return kFALSE;
452  }
453 
454  if( clsToF < fMinClsTPCToF){
455  return kFALSE;
456  }
457  return kTRUE;
458 }
460 Bool_t AliDalitzElectronCuts::dEdxCuts(AliVTrack *fCurrentTrack){
461 
462  // Electron Identification Cuts for Photon reconstruction
463  if(!fPIDResponse){ InitPIDResponse(); }// Try to reinitialize PID Response
464  if(!fPIDResponse){ AliError("No PID Response"); return kFALSE;}// if still missing fatal error
465 
466  //cout<<"dEdxCuts: //////////////////////////////////////////////////////////////////////////"<<endl;
467  Int_t cutIndex=0;
468  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
469  if(hITSdEdxbefore)hITSdEdxbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasITS(fCurrentTrack, AliPID::kElectron));
470  if(hTPCdEdxbefore)hTPCdEdxbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron));
471  if(hTPCdEdxSignalbefore)hTPCdEdxSignalbefore->Fill(fCurrentTrack->P(),TMath::Abs(fCurrentTrack->GetTPCsignal()));
472  cutIndex++;
473 
474  if( fDodEdxSigmaITSCut == kTRUE ){
475  if( fPIDResponse->NumberOfSigmasITS(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLineITS ||
476  fPIDResponse->NumberOfSigmasITS(fCurrentTrack,AliPID::kElectron)> fPIDnSigmaAboveElectronLineITS ){
477  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
478  return kFALSE;
479  }
480  }
481 
482  if(hITSdEdxafter)hITSdEdxafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasITS(fCurrentTrack, AliPID::kElectron));
483  cutIndex++;
484 
485  if(fDodEdxSigmaTPCCut == kTRUE){
486  // TPC Electron Line
487  if( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLineTPC ||
488  fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLineTPC){
489  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
490  return kFALSE;
491  }
492  cutIndex++;
493 
494  // TPC Pion Line
495  if( fCurrentTrack->P()>fPIDMinPnSigmaAbovePionLineTPC && fCurrentTrack->P()<fPIDMaxPnSigmaAbovePionLineTPC ){
496  if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLineTPC &&
497  fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLineTPC &&
498  fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLineTPC){
499  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
500  return kFALSE;
501  }
502  }
503  cutIndex++;
504 
505  // High Pt Pion rej
506  if( fCurrentTrack->P()>fPIDMaxPnSigmaAbovePionLineTPC ){
507  if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLineTPC &&
508  fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLineTPC&&
509  fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLineTPCHighPt){
510  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
511  return kFALSE;
512  }
513  }
514  cutIndex++;
515  } else{ cutIndex+=3; }
516 
517 
518  if( fDoKaonRejectionLowP == kTRUE ){
519  if( fCurrentTrack->P() < fPIDMinPKaonRejectionLowP ){
520  if( TMath::Abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kKaon))<fPIDnSigmaAtLowPAroundKaonLine){
521  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
522  return kFALSE;
523  }
524  }
525  }
526  cutIndex++;
527 
528  if( fDoProtonRejectionLowP == kTRUE ){
529  if( fCurrentTrack->P() < fPIDMinPProtonRejectionLowP ){
530  if( TMath::Abs( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kProton))<fPIDnSigmaAtLowPAroundProtonLine){
531  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
532  return kFALSE;
533  }
534  }
535  }
536  cutIndex++;
537 
538  if(fDoPionRejectionLowP == kTRUE){
539  if( fCurrentTrack->P() < fPIDMinPPionRejectionLowP ){
540  if( TMath::Abs( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)) < fPIDnSigmaAtLowPAroundPionLine ){
541  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
542  return kFALSE;
543  }
544  }
545  }
546  cutIndex++;
547 
548 
549  if( ( fCurrentTrack->GetStatus() & AliESDtrack::kTOFpid ) && ( !( fCurrentTrack->GetStatus() & AliESDtrack::kTOFmismatch) ) ){
550  if(hTOFbefore) hTOFbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron));
551  if(fUseTOFpid){
552  if(fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)>fTofPIDnSigmaAboveElectronLine ||
553  fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)<fTofPIDnSigmaBelowElectronLine ){
554  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
555  return kFALSE;
556  }
557  }
558  if(hTOFafter)hTOFafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron));
559  } else if ( fRequireTOF == kTRUE ) {
560  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
561  return kFALSE;
562  }
563  cutIndex++;
564 
565  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
566  if(hTPCdEdxafter)hTPCdEdxafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron));
567  if(hTPCdEdxSignalafter)hTPCdEdxSignalafter->Fill(fCurrentTrack->P(),TMath::Abs(fCurrentTrack->GetTPCsignal()));
568 
569  return kTRUE;
570 }
571 
573 
574 
575 AliVTrack *AliDalitzElectronCuts::GetTrack(AliVEvent * event, Int_t label){
576  //Returns pointer to the track with given ESD label
577  //(Important for AOD implementation, since Track array in AOD data is different
578  //from ESD array, but ESD tracklabels are stored in AOD Tracks)
579 
580  AliESDEvent * esdEvent = dynamic_cast<AliESDEvent*>(event);
581  if(esdEvent) {
582  if(label > event->GetNumberOfTracks() ) return NULL;
583  AliESDtrack * track = esdEvent->GetTrack(label);
584  return track;
585  } else {
586  for(Int_t ii=0; ii<event->GetNumberOfTracks(); ii++) {
587  AliVTrack * track = dynamic_cast<AliVTrack*>(event->GetTrack(ii));
588  if(track) {
589  if(track->GetID() == label) {
590  return track;
591  }
592  }
593  }
594  }
595 
596  cout << "track not found " << label << " " << event->GetNumberOfTracks() << endl;
597  return NULL;
598 }
601  for(Int_t i = 0;i<photons->GetEntries();i++){
602 
603  AliAODConversionPhoton *photonComp = (AliAODConversionPhoton*) photons->At(i);
604  Int_t posLabel = photonComp->GetTrackLabelPositive();
605  Int_t negLabel = photonComp->GetTrackLabelNegative();
606 
607  if( (photonComp->GetConversionRadius() < fRadiusCut) && (posLabel == indexEle || negLabel == indexEle) ){
608  return kFALSE;
609  }
610  }
611 
612  return kTRUE;
613 }
614 
615 Bool_t AliDalitzElectronCuts::MassCut(Double_t pi0CandidatePt , Double_t vphotonCandidateMass){
616 
617  if( pi0CandidatePt < fMassCutPtMin ){
618  if( vphotonCandidateMass < fMassCutLowPt ){
619  return kTRUE;
620  }
621  } else {
622  if( vphotonCandidateMass < fMassCutHighPt ){
623  return kTRUE;
624  }
625  }
626  return kFALSE;
627 }
628 
630  Double_t clsToF=0;
631  if( fUseCrossedRows == kFALSE ) {
632  if ( !fUseCorrectedTPCClsInfo ){
633  if(lTrack->GetTPCNclsF()!=0){
634  clsToF = (Double_t)lTrack->GetNcls(1)/(Double_t)lTrack->GetTPCNclsF();
635  }// Ncluster/Nfindablecluster
636  } else {
637  //clsToF = lTrack->GetTPCClusterInfo(2,0,GetFirstTPCRow(photon->GetConversionRadius()));
638  clsToF = lTrack->GetTPCClusterInfo(2,0); //NOTE ask friederike
639  }
640  } else {
641  Float_t nCrossedRowsTPC = lTrack->GetTPCCrossedRows();
642  clsToF = 1.0;
643  if ( lTrack->GetTPCNclsF()>0 ) {
644  clsToF = nCrossedRowsTPC / lTrack->GetTPCNclsF();
645  }
646  }
647  return clsToF;
648 }
649 
650 
652 {
653 //
654 // Returns true if it is a gamma conversion according to psi pair value
655 //
656  return ( (deltaPhi > fDeltaPhiCutMin && deltaPhi < fDeltaPhiCutMax) &&
657  TMath::Abs(psiPair) < ( fPsiPairCut - fPsiPairCut/fDeltaPhiCutMax * deltaPhi ) );
658 }
659 
663  if(fCutString && fCutString->GetString().Length() == kNCuts) {
664  fCutString->SetString(GetCutNumber());
665  } else {
666  return kFALSE;
667  }
668  return kTRUE;
669 }
670 
673  fCutStringRead = Form("%s",analysisCutSelection.Data());
674 
675  // Initialize Cuts from a given Cut string
676 
677 // out<<"Set Cut Number: "<<analysisCutSelection.Data()<<endl;
678  AliInfo(Form("Set ElectronCuts Number: %s",analysisCutSelection.Data()));
679 
680  if(analysisCutSelection.Length()!=kNCuts) {
681  AliError(Form("Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(), kNCuts));
682  return kFALSE;
683  }
684  if(!analysisCutSelection.IsAlnum()){
685  AliError("Cut selection is not alphanumeric");
686  return kFALSE;
687  }
688 
689  TString analysisCutSelectionLowerCase = Form("%s",analysisCutSelection.Data());
690  analysisCutSelectionLowerCase.ToLower();
691  const char *cutSelection = analysisCutSelectionLowerCase.Data();
692  #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0'
693  for(Int_t ii=0;ii<kNCuts;ii++){
694  ASSIGNARRAY(ii);
695  }
696 
697 
698  // Set Individual Cuts
699  for(Int_t ii=0;ii<kNCuts;ii++){
700  if(!SetCut(cutIds(ii),fCuts[ii]))return kFALSE;
701  }
702 
703  //PrintCuts();
704  return kTRUE;
705 }
709 
710  cout << "Updating cut " << fgkCutNames[cutID] << " (" << cutID << ") to " << value << endl;
711  switch (cutID) {
713  if( SetMaxChi2TPCConstrainedGlobal( value ) ){
715  UpdateCutString();
716  return kTRUE;
717  } else return kFALSE;
718 
719  case kededxSigmaITSCut:
720  if( SetITSdEdxCutElectronLine(value)) { //NOTE SetITSdEdxCutElectronLine: To be implemented
721  fCuts[kededxSigmaITSCut] = value;
722  UpdateCutString();
723  return kTRUE;
724  } else return kFALSE;
725 
726  case kededxSigmaTPCCut:
727  if( SetTPCdEdxCutElectronLine(value)) { //NOTE SetITSdEdxCutElectronLine: To be implemented
728  fCuts[kededxSigmaTPCCut] = value;
729  UpdateCutString();
730  return kTRUE;
731  } else return kFALSE;
732 
733  case kpidedxSigmaTPCCut:
734  if( SetTPCdEdxCutPionLine(value)) { //NOTE SetITSdEdxCutPionLine: To be implemented
735  fCuts[kpidedxSigmaTPCCut] = value;
736  UpdateCutString();
737  return kTRUE;
738  } else return kFALSE;
739 
741  if( SetMinMomPiondEdxTPCCut(value)) {
743  UpdateCutString();
744  return kTRUE;
745  } else return kFALSE;
746 
748  if( SetMaxMomPiondEdxTPCCut(value)) {
750  UpdateCutString();
751  return kTRUE;
752  } else return kFALSE;
753 
755  if( SetLowPRejectionCuts(value) ) {
756  fCuts[kLowPRejectionSigmaCut] = value;
757  UpdateCutString();
758  return kTRUE;
759  } else return kFALSE;
760 
761 
762  case kTOFelectronPID:
763  if( SetTOFElectronPIDCut(value)) {
764  fCuts[kTOFelectronPID] = value;
765  UpdateCutString();
766  return kTRUE;
767  } else return kFALSE;
768  case kclsITSCut:
769  if( SetITSClusterCut(value) ) {
770  fCuts[kclsITSCut] = value;
771  UpdateCutString();
772  return kTRUE;
773  } else return kFALSE;
774  case kclsTPCCut:
775  if( SetTPCClusterCut(value)) {
776  fCuts[kclsTPCCut] = value;
777  UpdateCutString();
778  return kTRUE;
779  } else return kFALSE;
780 
781  case ketaCut:
782  if( SetEtaCut(value)) {
783  fCuts[ketaCut] = value;
784  UpdateCutString();
785  return kTRUE;
786  } else return kFALSE;
787  case kptCut:
788  if( SetPtCut(value)) {
789  fCuts[kptCut] = value;
790  UpdateCutString();
791  return kTRUE;
792  } else return kFALSE;
793 
794  case kDCACut:
795  if( SetDCACut(value)) {
796  fCuts[kDCACut] = value;
797  UpdateCutString();
798  return kTRUE;
799  } else return kFALSE;
800 
801 
802  case kPsiPair:
803  if( SetPsiPairCut(value)) {
804  fCuts[kPsiPair] = value;
805  UpdateCutString();
806  return kTRUE;
807  } else return kFALSE;
808 
810  if( SetRejectSharedElecGamma(value)) {
811  fCuts[kRejectSharedElecGamma] = value;
812  UpdateCutString();
813  return kTRUE;
814  } else return kFALSE;
815 
817  if( SetMaxChi2PerClusterTPC(value)) {
818  fCuts[kMaxChi2PerClusterTPC] = value;
819  UpdateCutString();
820  return kTRUE;
821  } else return kFALSE;
822 
824  if( SetMaxChi2PerClusterITS(value)) {
825  fCuts[kMaxChi2PerClusterITS] = value;
826  UpdateCutString();
827  return kTRUE;
828  } else return kFALSE;
829 
830  case kmassCut:
831  if( SetMassCut(value)) {
832  fCuts[kmassCut] = value;
833  UpdateCutString();
834  return kTRUE;
835  } else return kFALSE;
836  case kWeights:
837  if( SetDoWeights(value)) {
838  fCuts[kWeights] = value;
839  UpdateCutString();
840  return kTRUE;
841  } else return kFALSE;
842 
844  if( SetUseVPhotonMCPmearing(value)) {
845  fCuts[kuseVPhotonMCPSmearing] = value;
846  UpdateCutString();
847  return kTRUE;
848  } else return kFALSE;
849 
850  case kNCuts:
851  cout << "Error:: Cut id out of range"<< endl;
852  return kFALSE;
853  }
854 
855  cout << "Error:: Cut id " << cutID << " not recognized "<< endl;
856  return kFALSE;
857 
858  //PrintCuts();
859 
860 }
861 
863 
865  // Print out current Cut Selection
866  for(Int_t ic = 0; ic < kNCuts; ic++) {
867  printf("%-30s : %d \n", fgkCutNames[ic], fCuts[ic]);
868  }
869 
870 }
873 {
874  if( !fesdTrackCuts ) {
875  cout<<"Warning: AliESDtrackCut is not initialized "<<endl;
876  return kFALSE;
877  }
878 
879  switch( maxChi2 ){
880  case 0: fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(1e10);
881  break;
882  case 1: fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(25.);
883  break;
884  case 2: fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(36.);
885  break;
886  case 3: fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(49.);
887  break;
888  case 4: fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(100.);
889  break;
890  default: cout<<"Warning: maxChi2 is not defined"<<maxChi2<<endl;
891  return kFALSE;
892  }
893 
894  return kTRUE;
895 }
898  // Set Cut
899  switch(ededxSigmaCut){
900  case 0:
901  fDodEdxSigmaITSCut = kFALSE;
904  break;
905  case 1: // -10,10
906  fDodEdxSigmaITSCut = kTRUE;
909  break;
910  case 2: // -6,7
911  fDodEdxSigmaITSCut = kTRUE;
914  break;
915  case 3: // -5,5
916  fDodEdxSigmaITSCut = kTRUE;
919  break;
920  case 4: // -4,5
921  fDodEdxSigmaITSCut = kTRUE;
924  break;
925  case 5: // -3,5
926  fDodEdxSigmaITSCut = kTRUE;
929  break;
930  case 6: // -4,4
931  fDodEdxSigmaITSCut = kTRUE;
934  break;
935  case 7: // -2.5,4
936  fDodEdxSigmaITSCut = kTRUE;
939  break;
940  case 8: // -2,3.5
941  fDodEdxSigmaITSCut = kTRUE;
944  break;
945  default:
946  cout<<"Warning: ITSdEdxCutElectronLine not defined"<<ededxSigmaCut<<endl;
947  return kFALSE;
948  }
949  return kTRUE;
950 }
951 
954  // Set Cut
955  switch(ededxSigmaCut){
956  case 0: fDodEdxSigmaTPCCut = kFALSE;
959  break;
960  case 1: // -10,10
961  fDodEdxSigmaTPCCut = kTRUE;
964  break;
965  case 2: // -6,7
966  fDodEdxSigmaTPCCut = kTRUE;
969  break;
970  case 3: // -5,5
971  fDodEdxSigmaTPCCut = kTRUE;
974  break;
975  case 4: // -4,5
976  fDodEdxSigmaTPCCut = kTRUE;
979  break;
980  case 5: // -3,5
981  fDodEdxSigmaTPCCut = kTRUE;
984  break;
985  case 6: // -4,4
986  fDodEdxSigmaTPCCut = kTRUE;
989  break;
990  case 7: // -2.5,4
991  fDodEdxSigmaTPCCut = kTRUE;
994  break;
995  case 8: // -2,3.5
996  fDodEdxSigmaTPCCut = kTRUE;
999  break;
1000  case 9: // -3,4
1001  fDodEdxSigmaTPCCut = kTRUE;
1004  break;
1005  default:
1006  cout<<"Warning: TPCdEdxCutElectronLine not defined"<<ededxSigmaCut<<endl;
1007  return kFALSE;
1008  }
1009  return kTRUE;
1010 }
1011 
1014  // Set Cut
1015  switch(pidedxSigmaCut){
1016  case 0: fPIDnSigmaAbovePionLineTPC= 0;
1018  break;
1019  case 1: // -10
1020  fPIDnSigmaAbovePionLineTPC=3.0; //Update Sep-05-2013 from -10 to 3
1022  break;
1023  case 2: // 1
1024  fPIDnSigmaAbovePionLineTPC=2; //Update Sep-09-2013 from -1 to 2
1025  fPIDnSigmaAbovePionLineTPCHighPt=-1; //Update Sep-09-2013 from -10 to -1
1026  break;
1027  case 3: // 0
1028  fPIDnSigmaAbovePionLineTPC=2; //Update Sep-09-2013 from 0 to 2
1029  fPIDnSigmaAbovePionLineTPCHighPt=0; //Update Sep-09-2013 from -10 to 0
1030  break;
1031  case 4: // 1
1034  break;
1035  case 5: // 1
1038  break;
1039  case 6: // 1
1042  break;
1043  case 7:
1044  fPIDnSigmaAbovePionLineTPC = 2.0; // We need a bit less tight cut on dE/dx //Updated from 3.0 and -10 to +2.0 , +2.0
1046  break;
1047  case 8: // 1
1048  fPIDnSigmaAbovePionLineTPC = 1.5; // Updated May-16-2013 from 3.5 and -10 to +1.5, +1
1050  break;
1051  case 9: // 1
1054  break;
1055  default:
1056  cout<<"Warning: pidedxSigmaCut not defined "<<pidedxSigmaCut<<endl;
1057  return kFALSE;
1058  }
1059  return kTRUE;
1060 }
1061 
1064 { // Set Cut
1065  switch(piMomdedxSigmaCut){
1066  case 0: fPIDMinPnSigmaAbovePionLineTPC=0.;
1067  break;
1068  case 1: // 50.0 GeV
1070  break;
1071  case 2: // 20.0 GeV
1073  break;
1074  case 3: // 1.5 GeV
1076  break;
1077  case 4: // 1. GeV
1079  break;
1080  case 5: // 0.5 GeV
1082  break;
1083  case 6: // 0.4 GeV
1085  break;
1086  case 7: // 0.3 GeV
1088  break;
1089  case 8: // 0.25 GeV
1091  break;
1092  default:
1093  cout<<"Warning: piMomdedxSigmaCut not defined "<<piMomdedxSigmaCut<<endl;
1094  return kFALSE;
1095  }
1096  return kTRUE;
1097 }
1100 
1101  if( !fesdTrackCuts ) {
1102  cout<<"Warning: AliESDtrackCut is not initialized "<<endl;
1103  return kFALSE;
1104  }
1105 
1106  switch(clsITSCut){
1107  case 0:
1108  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kOff);
1109  break;
1110  case 1:
1111  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kFirst);
1112  break; //1 hit first layer of SPD
1113  case 2:
1114  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
1115  break; //1 hit in any layer of SPD
1116  case 3:
1117  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kFirst);
1118  fesdTrackCuts->SetMinNClustersITS(4);
1119  // 4 hits in total in the ITS. At least 1 hit in the first layer of SPD
1120  break;
1121  case 4:
1122  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
1123  fesdTrackCuts->SetMinNClustersITS(3);
1124  // 3 hits in total in the ITS. At least 1 hit in any layer of SPD
1125  break;
1126  case 5:
1127  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
1128  fesdTrackCuts->SetMinNClustersITS(4);
1129  // 4 hits in total in the ITS. At least 1 hit in any layer of SPD
1130  break;
1131  case 6:
1132  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
1133  fesdTrackCuts->SetMinNClustersITS(5);
1134  // 5 hits in total in the ITS. At least 1 hit in any layer of SPD
1135  break;
1136  case 7:
1137  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kOff);
1138  fesdTrackCuts->SetMinNClustersITS(4);
1139  break;
1140  case 8:
1141  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kBoth);
1142  break;
1143  case 9: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kBoth);
1144  fesdTrackCuts->SetMinNClustersITS(4);
1145  break;
1146 
1147  default:
1148  cout<<"Warning: clsITSCut not defined "<<clsITSCut<<endl;
1149  return kFALSE;
1150  }
1151 
1152  return kTRUE;
1153 }
1154 
1157 { // Set Cut
1158 
1159  //Update function for systematics 2015-10-08
1160  switch(clsTPCCut){
1161  case 0: // 0
1162  fMinClsTPC= 0.;
1163  fMinClsTPCToF = 0.;
1164  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1165  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1166  break;
1167 
1168  case 1: // 70
1169  fMinClsTPC= 70.;
1170  fMinClsTPCToF = 0.7;
1171  if( fUseCrossedRows ){
1172  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1173  fesdTrackCuts->SetMinNClustersTPC(0);
1174  } else {
1175  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1176  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1178  }
1179  break;
1180  case 2: // 80
1181  fMinClsTPC = 70.;
1182  fMinClsTPCToF = 0.9;
1183  if( fUseCrossedRows ){
1184  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1185  fesdTrackCuts->SetMinNClustersTPC(0);
1186  } else {
1187  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1188  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1190  }
1191  break;
1192  case 3: // Changed 2014-02-04 before fMinClsTPC = 50.;
1193  fMinClsTPC = 70;
1194  fMinClsTPCToF = 0.8;
1195  if( fUseCrossedRows ){
1196  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1197  fesdTrackCuts->SetMinNClustersTPC(0);
1198  } else {
1199  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1200  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1202  }
1203  //fUseCrossedRows = kTRUE;
1204  break;
1205  case 4: // 0% of findable clusters
1206  fMinClsTPC = 90;
1207  fMinClsTPCToF = 0.8;
1208  if( fUseCrossedRows ){
1209  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1210  fesdTrackCuts->SetMinNClustersTPC(0);
1211  } else {
1212  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1213  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1215  }
1216  break;
1217  case 5: // 35% of findable clusters
1218  fMinClsTPC = 70;
1219  fMinClsTPCToF = 0.35;
1220  if( fUseCrossedRows ){
1221  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1222  fesdTrackCuts->SetMinNClustersTPC(0);
1223  } else {
1224  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1225  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1227  }
1228  break;
1229  case 6: // 60% of findable clusters
1230  fMinClsTPC = 70;
1231  fMinClsTPCToF = 0.60;
1232  if( fUseCrossedRows ){
1233  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1234  fesdTrackCuts->SetMinNClustersTPC(0);
1235  } else {
1236  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1237  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1239  }
1240  break;
1241  case 7: // 60% Changed 2014-02-04 before fMinClsTPC = 0.7 fUseCorrectedTPCClsInfo = 0
1242  // Changed 2014-02-04 before fMinClsTPC = 50.;
1243  fMinClsTPC = 90;
1244  fMinClsTPCToF = 0.35;
1245  if( fUseCrossedRows ){
1246  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1247  fesdTrackCuts->SetMinNClustersTPC(0);
1248  } else {
1249  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1250  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1252  }
1253  break;
1254 
1255  case 8: fMinClsTPC = 0;
1256  fMinClsTPCToF = 0.35;
1257  if( fUseCrossedRows ){
1258  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1259  fesdTrackCuts->SetMinNClustersTPC(0);
1260  } else {
1261  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1262  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1264  }
1265  break;
1266 
1267  case 9: // 35% of findable clusters
1268  fMinClsTPC = 70;
1269  fMinClsTPCToF = 0.35;
1270  if( fUseCrossedRows ){
1271  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1272  fesdTrackCuts->SetMinNClustersTPC(0);
1273  } else {
1274  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1275  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1277  }
1278  break;
1279 
1280  default:
1281  cout<<"Warning: clsTPCCut not defined "<<clsTPCCut<<endl;
1282  return kFALSE;
1283  }
1284  return kTRUE;
1285 }
1286 
1289 {
1290  // Set eta Cut
1291  switch(etaCut){
1292  case 0:
1293  fEtaCut = 100.;
1294  fDoEtaCut = kFALSE;
1295  break;
1296  case 1: // 1.4
1297  fEtaCut = 1.4;
1298  fDoEtaCut = kTRUE;
1299  break;
1300  case 2: // 1.2
1301  fEtaCut = 1.2;
1302  fDoEtaCut = kTRUE;
1303  break;
1304  case 3: // 0.9
1305  fEtaCut = 0.9;
1306  fDoEtaCut = kTRUE;
1307  break;
1308  case 4: // 0.8
1309  fEtaCut = 0.8;
1310  fDoEtaCut = kTRUE;
1311  break;
1312  case 5: // 0.75
1313  fEtaCut = 0.75;
1314  fDoEtaCut = kTRUE;
1315  break;
1316  case 6: //0.6
1317  fEtaCut = 0.6; //changed from 0.4 to 0.6 2013.06.10
1318  fDoEtaCut = kTRUE;
1319  break;
1320  case 7: //0.5
1321  fEtaCut = 0.5; //changed from 0.3 to 0.5 2013.06.10
1322  fDoEtaCut = kTRUE;
1323  break;
1324  case 8: fEtaCut = 0.4;
1325  fDoEtaCut = kTRUE;
1326  break;
1327  case 9: fEtaCut = 0.65;
1328  fDoEtaCut = kTRUE;
1329  break;
1330  default:
1331  cout<<"Warning: EtaCut not defined "<<etaCut<<endl;
1332  return kFALSE;
1333  }
1334  return kTRUE;
1335 }
1336 
1339 {
1340  // Set Pt Cut
1341  //0.1GeV, 0.125 GeV, 0.15 GeV
1342  switch(ptCut){
1343  case 0: fPtMinCut = 0.075;
1344  fPtMaxCut = 9999;
1345  break;
1346  case 1: // 0.1
1347  fPtMinCut = 0.1;
1348  fPtMaxCut = 9999;
1349  break;
1350  case 2: // 0.125 GeV
1351  fPtMinCut = 0.125;
1352  fPtMaxCut = 9999;
1353  break;
1354  case 3: // 0.15 GeV
1355  fPtMinCut = 0.15;
1356  fPtMaxCut = 9999;
1357  break;
1358  // 0.5 - 0.7
1359  case 4:
1360  fPtMinCut = 0.5;
1361  fPtMaxCut = 0.7;
1362  break;
1363  case 5: // 0.175 GeV
1364  fPtMinCut = 0.175;
1365  fPtMaxCut = 9999;
1366  break;
1367  // 50 MeV
1368  case 6:
1369  fPtMinCut = 0.05;
1370  fPtMaxCut = 9999;
1371  break;
1372  default:
1373  cout<<"Warning: PtCut not defined "<<ptCut<<endl;
1374  return kFALSE;
1375  }
1376  return kTRUE;
1377 }
1378 
1379 
1382 {
1383  // Set DCA Cut
1384  if( !fesdTrackCuts ) {
1385  cout<<"Warning: AliESDtrackCut is not initialized "<<endl;
1386  return kFALSE;
1387  }
1388 
1389  switch(dcaCut){
1390 
1391  case 0: //Open cuts//
1392  fesdTrackCuts->SetMaxDCAToVertexZ(1000);
1393  fesdTrackCuts->SetMaxDCAToVertexXY(1000);
1394  break;
1395  case 1:
1396  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01"); //Standard 2010
1397  fesdTrackCuts->SetMaxDCAToVertexZ(2);
1398  break;
1399  case 2:
1400  fesdTrackCuts->SetMaxDCAToVertexZ(2);
1401  fesdTrackCuts->SetMaxDCAToVertexXY(1);
1402  break;
1403  case 3:
1404  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0105+0.0350/pt^1.1"); //Standard 2011
1405  fesdTrackCuts->SetMaxDCAToVertexZ(2);
1406  break;
1407  case 4:
1408  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0525+0.175/pt^1.1");
1409  fesdTrackCuts->SetMaxDCAToVertexZ(2);
1410  break;
1411  case 5:
1412  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
1413  fesdTrackCuts->SetMaxDCAToVertexZ(1);
1414  break;
1415  case 6:
1416  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
1417  fesdTrackCuts->SetMaxDCAToVertexZ(5);
1418  break;
1419  case 7:
1420  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0105+0.0350/pt^1.1"); //Standard 2011
1421  fesdTrackCuts->SetMaxDCAToVertexZ(1);
1422  break;
1423  case 8:
1424  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0105+0.0350/pt^1.1"); //Standard 2011
1425  fesdTrackCuts->SetMaxDCAToVertexZ(5);
1426  break;
1427  default:
1428  cout<<"Warning: dcaCut not defined "<<dcaCut<<endl;
1429  return kFALSE;
1430  }
1431  return kTRUE;
1432 }
1433 
1436 { // Set Cut
1437  switch(piMaxMomdedxSigmaCut){
1438  case 0:
1440  break;
1441  case 1: // 100. GeV
1443  break;
1444  case 2: // 5. GeV
1446  break;
1447  case 3: // 4. GeV
1449  break;
1450  case 4: // 3.5 GeV
1452  break;
1453  case 5: // 3. GeV
1455  break;
1456  default:
1457  cout<<"Warning: piMaxMomdedxSigmaCut not defined "<<piMaxMomdedxSigmaCut<<endl;
1458  return kFALSE;
1459  }
1460  return kTRUE;
1461 }
1462 
1465 { // Set Cut
1466  switch(LowPRejectionSigmaCut){
1467  case 0: //
1468  fDoKaonRejectionLowP=kFALSE;
1469  fDoProtonRejectionLowP=kFALSE;
1470  fDoPionRejectionLowP=kFALSE;
1475  break;
1476  case 1: //
1477  fDoKaonRejectionLowP=kTRUE;
1478  fDoProtonRejectionLowP=kTRUE;
1479  fDoPionRejectionLowP=kTRUE;
1484  break;
1485  case 2: //
1486  fDoKaonRejectionLowP=kTRUE;
1487  fDoProtonRejectionLowP=kTRUE;
1488  fDoPionRejectionLowP=kTRUE;
1493  break;
1494  case 3: //
1495  fDoKaonRejectionLowP=kTRUE;
1496  fDoProtonRejectionLowP=kTRUE;
1497  fDoPionRejectionLowP=kTRUE;
1502  break;
1503  case 4: //
1504  fDoKaonRejectionLowP=kTRUE;
1505  fDoProtonRejectionLowP=kTRUE;
1506  fDoPionRejectionLowP=kTRUE;
1511  break;
1512  case 5: //
1513  fDoKaonRejectionLowP=kTRUE;
1514  fDoProtonRejectionLowP=kTRUE;
1515  fDoPionRejectionLowP=kTRUE;
1520  break;
1521  case 6: //
1522  fDoKaonRejectionLowP=kTRUE;
1523  fDoProtonRejectionLowP=kTRUE;
1524  fDoPionRejectionLowP=kTRUE;
1529  break;
1530  case 7: //
1531  fDoKaonRejectionLowP=kFALSE;
1532  fDoProtonRejectionLowP=kFALSE;
1533  fDoPionRejectionLowP=kTRUE;
1538  break;
1539  case 8:
1540  fDoKaonRejectionLowP=kFALSE;
1541  fDoProtonRejectionLowP=kFALSE;
1542  fDoPionRejectionLowP=kTRUE;
1547  break;
1548  default:
1549  cout<<"Warning: LowPRejectionSigmaCut not defined "<<LowPRejectionSigmaCut<<endl;
1550  return kFALSE;
1551  }
1552  return kTRUE;
1553 }
1554 
1557  // Set Cut
1558  switch(TOFelectronPID){ // RRnewTOF start //////////////////////////////////////////////////////////////////////////
1559  case 0: // no cut
1560  fRequireTOF = kFALSE;
1561  fUseTOFpid = kFALSE;
1564  break;
1565  case 1: // -7,7
1566  fRequireTOF = kFALSE;
1567  fUseTOFpid = kTRUE;
1570  break;
1571  case 2: // -5,5
1572  fRequireTOF = kFALSE;
1573  fUseTOFpid = kTRUE;
1576  break;
1577  case 3: // -3,5
1578  fRequireTOF = kFALSE;
1579  fUseTOFpid = kTRUE;
1582  break;
1583  case 4: // -2,3
1584  fRequireTOF = kFALSE;
1585  fUseTOFpid = kTRUE;
1588  break;
1589  case 5: // -3, 3 TOF mandatory
1590  fRequireTOF = kTRUE;
1591  fUseTOFpid = kTRUE;
1594  break;
1595  default:
1596  cout<<"Warning: TOFElectronCut not defined "<<TOFelectronPID<<endl;
1597  return kFALSE;
1598  }
1599  return kTRUE;
1600 }
1602 
1604  switch(psiCut) {
1605  case 0:
1606  fDoPsiPairCut = kFALSE;
1607  fPsiPairCut = 10000.; //
1608  fDeltaPhiCutMin = -1000.;
1609  fDeltaPhiCutMax = 1000.;
1610  break;
1611  case 1:
1612  fDoPsiPairCut = kTRUE;
1613  fPsiPairCut = 0.45; // Standard
1614  fDeltaPhiCutMin = 0.0;
1615  fDeltaPhiCutMax = 0.12;
1616  break;
1617  case 2:
1618  fDoPsiPairCut = kTRUE;
1619  fPsiPairCut = 0.60;
1620  fDeltaPhiCutMin = 0.0;
1621  fDeltaPhiCutMax = 0.12;
1622  break;
1623  case 3:
1624  fDoPsiPairCut = kTRUE;
1625  fPsiPairCut = 0.52;
1626  fDeltaPhiCutMin = 0.0;
1627  fDeltaPhiCutMax = 0.12;
1628  break;
1629  case 4:
1630  fDoPsiPairCut = kTRUE;
1631  fPsiPairCut = 0.30;
1632  fDeltaPhiCutMin = 0.0;
1633  fDeltaPhiCutMax = 0.12;
1634  break;
1635  case 5:
1636  fDoPsiPairCut = kTRUE;
1637  fPsiPairCut = 0.60;
1638  fDeltaPhiCutMin = 0.0;
1639  fDeltaPhiCutMax = 0.06;
1640  break;
1641  case 6:
1642  fDoPsiPairCut = kTRUE;
1643  fPsiPairCut = 0.65;
1644  fDeltaPhiCutMin = 0.0;
1645  fDeltaPhiCutMax = 0.14;
1646  break;
1647  default:
1648  cout<<"Warning: PsiPairCut not defined "<<fPsiPairCut<<endl;
1649  return kFALSE;
1650  }
1651  return kTRUE;
1652 }
1653 
1656  switch(RCut) {
1657  case 0:
1658  fDoRejectSharedElecGamma = kFALSE;
1659  fRadiusCut = 10000; //
1660  break;
1661  case 1:
1662  fDoRejectSharedElecGamma = kTRUE;
1663  fRadiusCut = 2.0; // cm
1664  break;
1665  case 2:
1666  fDoRejectSharedElecGamma = kTRUE;
1667  fRadiusCut = 3.0; // Standard
1668  break;
1669  case 3:
1670  fDoRejectSharedElecGamma = kTRUE;
1671  fRadiusCut = 4.0; //
1672  break;
1673  case 4:
1674  fDoRejectSharedElecGamma = kTRUE;
1675  fRadiusCut = 5.0; //
1676  break;
1677  case 5:
1678  fDoRejectSharedElecGamma = kTRUE;
1679  fRadiusCut = 10.0; //
1680  break;
1681  case 6:
1682  fDoRejectSharedElecGamma = kTRUE;
1683  fRadiusCut = 15.0; //
1684  break;
1685  default:
1686  cout<<"Warning: PsiPairCut not defined "<<fDoRejectSharedElecGamma<<endl;
1687  return kFALSE;
1688  }
1689  return kTRUE;
1690 }
1693 
1694  if( !fesdTrackCuts ) {
1695  cout<<"Warning: AliESDtrackCuts is not initialized "<<endl;
1696  return kFALSE;
1697  }
1698 
1699  // Set Cut
1700  switch(maxChi2){
1701  case 0:
1702  fesdTrackCuts->SetMaxChi2PerClusterTPC(1e10);
1703  break;
1704  case 1:
1705  fesdTrackCuts->SetMaxChi2PerClusterTPC(3.);
1706  break;
1707  case 2:
1708  fesdTrackCuts->SetMaxChi2PerClusterTPC(4.);
1709  break;
1710  case 3:
1711  fesdTrackCuts->SetMaxChi2PerClusterTPC(5.);
1712  break;
1713  default:
1714  cout<<"Warning: SetMaxChi2PerClusterTPC not defined "<<maxChi2<<endl;
1715  return kFALSE;
1716  }
1717  return kTRUE;
1718 }
1719 
1722 { // Set Cut
1723  if( !fesdTrackCuts ) {
1724  cout<<"Warning: AliESDtrackCuts is not initialized "<<endl;
1725  return kFALSE;
1726  }
1727 
1728  switch(maxChi2){
1729  case 0:
1730  fesdTrackCuts->SetMaxChi2PerClusterITS(1e10);
1731  break;
1732  case 1:
1733  fesdTrackCuts->SetMaxChi2PerClusterITS(25.);
1734  break;
1735  case 2:
1736  fesdTrackCuts->SetMaxChi2PerClusterITS(36.);
1737  break;
1738  case 3:
1739  fesdTrackCuts->SetMaxChi2PerClusterITS(49.);
1740  break;
1741  default:
1742  cout<<"Warning: SetMaxChi2PerClusterITS not defined "<<maxChi2<<endl;
1743  return kFALSE;
1744  }
1745  return kTRUE;
1746 }
1747 
1750 { // Set Cut
1751  switch(opc){
1752  case 0:
1753  fDoWeights = kFALSE;
1754  break;
1755  case 1:
1756  fDoWeights = kTRUE;
1757  break;
1758  default:
1759  cout<<"Warning: Weights option not defined "<<opc<<endl;
1760  return kFALSE;
1761  }
1762  return kTRUE;
1763 }
1766 { // Set Cut
1767  switch(massCut){
1768  case 0:
1769  fMassCutPtMin = -999.; //GeV
1770  fMassCutLowPt = 999.; //GeV/c^2
1771  fMassCutHighPt = 999.; //GeV/c^2
1772  fMassMinCut = -999;
1773  fDoMassCut = kFALSE;
1774  fDoMassMinCut = kFALSE;
1775  break;
1776  case 1:
1777  //fMassCut = 0.135; //GeV/c^2
1778  fMassCutPtMin = -999.; //GeV
1779  fMassCutLowPt = 0.135; //GeV/c^2
1780  fMassCutHighPt = 0.135; //GeV/c^2
1781  fMassMinCut = -999;
1782  fDoMassCut = kTRUE;
1783  fDoMassMinCut = kFALSE;
1784  break;
1785  case 2:
1786  //fMassCut = 0.100; //GeV/c^2
1787  fMassCutPtMin = -999.; //GeV
1788  fMassCutLowPt = 0.100; //GeV/c^2
1789  fMassCutHighPt = 0.100; //GeV/c^2
1790  fMassMinCut = -999;
1791  fDoMassCut = kTRUE;
1792  fDoMassMinCut = kFALSE;
1793  break;
1794  case 3:
1795  fMassCutPtMin = 1.0; //GeV
1796  fMassCutLowPt = 0.015; //GeV/c^2
1797  fMassCutHighPt = 0.035; //GeV/c^2
1798  fMassMinCut = 0.002;
1799  fDoMassCut = kTRUE;
1800  fDoMassMinCut = kTRUE;
1801  break;
1802  case 4:
1803  //fMassCut = 0.050; //GeV/c^2
1804  fMassCutPtMin = -999.; //GeV
1805  fMassCutLowPt = 0.050; //GeV/c^2
1806  fMassCutHighPt = 0.050; //GeV/c^2
1807  fMassMinCut = -999;
1808  fDoMassCut = kTRUE;
1809  fDoMassMinCut = kFALSE;
1810  break;
1811  case 5:
1812  fMassCutPtMin = -999.; //GeV
1813  fMassCutLowPt = 0.035; //GeV/c^2
1814  fMassCutHighPt = 0.035; //GeV/c^2
1815  fMassMinCut = -999;
1816  fDoMassCut = kTRUE;
1817  fDoMassMinCut = kFALSE;
1818  break;
1819  case 6:
1820  fMassCutPtMin = -999.; //GeV
1821  fMassCutLowPt = 0.015; //GeV/c^2
1822  fMassCutHighPt = 0.015; //GeV/c^2
1823  fMassMinCut = -999;
1824  fDoMassCut = kTRUE;
1825  fDoMassMinCut = kFALSE;
1826  break;
1827  case 7:
1828  fMassCutPtMin = 1.0; //GeV
1829  fMassCutLowPt = 0.015; //GeV/c^2
1830  fMassCutHighPt = 0.035; //GeV/c^2
1831  fMassMinCut = -999;
1832  fDoMassCut = kTRUE;
1833  fDoMassMinCut = kFALSE;
1834  break;
1835  case 8:
1836  fMassCutPtMin = 1.0; //GeV
1837  fMassCutLowPt = 0.015; //GeV/c^2
1838  fMassCutHighPt = 0.050; //GeV/c^2
1839  fMassMinCut = -999;
1840  fDoMassCut = kTRUE;
1841  fDoMassMinCut = kFALSE;
1842  break;
1843  case 9:
1844  fMassCutPtMin = 1.0; //GeV
1845  fMassCutLowPt = 0.025; //GeV/c^2
1846  fMassCutHighPt = 0.035; //GeV/c^2
1847  fMassMinCut = -999;
1848  fDoMassCut = kTRUE;
1849  fDoMassMinCut = kFALSE;
1850  break;
1851  case 10:
1852  fMassCutPtMin = 1.0; //GeV
1853  fMassCutLowPt = 0.02; //GeV/c^2
1854  fMassCutHighPt = 0.03; //GeV/c^2
1855  fMassMinCut = -999;
1856  fDoMassCut = kTRUE;
1857  fDoMassMinCut = kFALSE;
1858  break;
1859  case 11:
1860  fMassCutPtMin = 1.0; //GeV
1861  fMassCutLowPt = 0.027; //GeV/c^2
1862  fMassCutHighPt = 0.054; //GeV/c^2
1863  fMassMinCut = -999;
1864  fDoMassCut = kTRUE;
1865  fDoMassMinCut = kFALSE;
1866  break;
1867  case 12:
1868  fMassCutPtMin = 1.0; //GeV
1869  fMassCutLowPt = 0.02; //GeV/c^2
1870  fMassCutHighPt = 0.02; //GeV/c^2
1871  fMassMinCut = -999;
1872  fDoMassCut = kTRUE;
1873  fDoMassMinCut = kFALSE;
1874  break;
1875 
1876  default:
1877  cout<<"Warning: MassCut not defined "<<massCut<<endl;
1878  return kFALSE;
1879  }
1880  return kTRUE;
1881 }
1883 {// Set Cut
1884  switch(useMCPSmearing){
1885  case 0:
1886  fUseVPhotonMCPSmearing=kFALSE;
1887  fUseElectronMCPSmearing=kFALSE;
1888  break;
1889  case 1:
1890  fUseVPhotonMCPSmearing=kTRUE;
1891  fUseElectronMCPSmearing=kFALSE;
1892  break;
1893  case 2:
1894  fUseVPhotonMCPSmearing=kFALSE;
1896  break;
1897  default: cout<<"Warning: Virtual Photon SMearing not defined "<<useMCPSmearing<<endl;
1898  return kFALSE;
1899 
1900  }
1901  return kTRUE;
1902 }
1903 
1904 
1907  // returns TString with current cut number
1908  return fCutStringRead;
1909 }
1910 
1911 
1914  //Create and return standard 2010 PbPb cuts
1915  AliDalitzElectronCuts *cuts=new AliDalitzElectronCuts("StandardCuts2010PbPb","StandardCuts2010PbPb");
1916  if(!cuts->InitializeCutsFromCutString("9069640364102")){
1917  cout<<"Warning: Initialization of Standardcuts2010PbPb failed"<<endl;}
1918  return cuts;
1919 }
1920 
1923  //Create and return standard 2010 PbPb cuts
1924  AliDalitzElectronCuts *cuts=new AliDalitzElectronCuts("StandardCuts2010pp","StandardCuts2010pp");
1925 
1926  if(!cuts->InitializeCutsFromCutString("9069640364102")){
1927  cout<<"Warning: Initialization of Standardcuts2010pp failed"<<endl;}
1928  return cuts;
1929 }
1930 
Bool_t SetMaxChi2PerClusterITS(Int_t maxChi2)
Bool_t ElectronIsSelectedMC(Int_t labelParticle, AliMCEvent *mcEvent)
static AliDalitzElectronCuts * GetStandardCuts2010pp()
Bool_t SetLowPRejectionCuts(Int_t LowPRejectionSigmaCut)
double Double_t
Definition: External.C:58
Bool_t SetDCACut(Int_t dcaCut)
Bool_t MassCut(Double_t pi0CandidatePt, Double_t vphotonCandidateMass)
Bool_t SetPtCut(Int_t ptCut)
Definition: External.C:236
const char * title
Definition: MakeQAPdf.C:27
Bool_t SetRejectSharedElecGamma(Int_t RCut)
#define ASSIGNARRAY(i)
Bool_t SetTPCClusterCut(Int_t clsTPCCut)
Bool_t RejectSharedElecGamma(TList *photons, Int_t indexEle)
AliESDtrackCuts * fesdTrackCuts
Bool_t SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut)
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
Bool_t SetUseVPhotonMCPmearing(Int_t useMCPSmearing)
Bool_t SetMaxMomPiondEdxTPCCut(Int_t piMomdedxSigmaCut)
Bool_t SetMaxChi2TPCConstrainedGlobal(Int_t maxChi2)
Bool_t SetTPCdEdxCutElectronLine(Int_t ededxSigmaCut)
Bool_t SetITSdEdxCutElectronLine(Int_t ededxSigmaCut)
AliDalitzElectronCuts(const char *name="ElectronCuts", const char *title="Electron Cuts")
Bool_t SetEtaCut(Int_t etaCut)
static AliVTrack * GetTrack(AliVEvent *event, Int_t label)
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)
Bool_t dEdxCuts(AliVTrack *track)
Cut functions.
Bool_t ElectronIsSelected(AliESDtrack *lTrack)
Double_t GetNFindableClustersTPC(AliESDtrack *lTrack)
Bool_t SetMaxChi2PerClusterTPC(Int_t maxChi2)
static const char * fgkCutNames[kNCuts]
Bool_t IsFromGammaConversion(Double_t psiPair, Double_t deltaPhi)
Bool_t SetITSClusterCut(Int_t clsITSCut)
Bool_t SetMassCut(Int_t massCut)
static AliDalitzElectronCuts * GetStandardCuts2010PbPb()
bool Bool_t
Definition: External.C:53
Bool_t TrackIsSelected(AliESDtrack *lTrack)
Bool_t SetCut(cutIds cutID, Int_t cut)
Bool_t InitializeCutsFromCutString(const TString analysisCutSelection)
Bool_t SetMinMomPiondEdxTPCCut(Int_t piMomdedxSigmaCut)
Bool_t SetPsiPairCut(Int_t psiCut)
void InitCutHistograms(TString name="", Bool_t preCut=kTRUE, TString cutName="")
Double_t GetConversionRadius() const
Bool_t SetTOFElectronPIDCut(Int_t TOFelectronPID)