AliPhysics  9b6b435 (9b6b435)
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", //0
51  "ededxSigmaITSCut", //1
52  "ededxSigmaTPCCut", //2
53  "pidedxSigmaTPCCut", //3
54  "piMinMomdedxSigmaTPCCut", //4
55  "piMaxMomdedxSigmaTPCCut", //5
56  "LowPRejectionSigmaCut", //6
57  "kTOFelectronPID", //7
58  "clsITSCut", //8
59  "clsTPCCut", //9
60  "EtaCut", //10
61  "PsiPair", //11
62  "RejectSharedElecGamma", //12
63  "MaxChi2PerClusterTPC", //13
64  "MaxChi2PerClusterITS", //14
65  "PtCut", //15
66  "DCAcut", //16
67  "MassCut", //17
68  "Weights", //18
69  "VPhotonMCPSmearing" //19
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  case 10: // a
1058  break;
1059  case 11: // b
1062  break;
1063  default:
1064  cout<<"Warning: pidedxSigmaCut not defined "<<pidedxSigmaCut<<endl;
1065  return kFALSE;
1066  }
1067  return kTRUE;
1068 }
1069 
1072 { // Set Cut
1073  switch(piMomdedxSigmaCut){
1074  case 0: fPIDMinPnSigmaAbovePionLineTPC=0.;
1075  break;
1076  case 1: // 50.0 GeV
1078  break;
1079  case 2: // 20.0 GeV
1081  break;
1082  case 3: // 1.5 GeV
1084  break;
1085  case 4: // 1. GeV
1087  break;
1088  case 5: // 0.5 GeV
1090  break;
1091  case 6: // 0.4 GeV
1093  break;
1094  case 7: // 0.3 GeV
1096  break;
1097  case 8: // 0.25 GeV
1099  break;
1100  default:
1101  cout<<"Warning: piMomdedxSigmaCut not defined "<<piMomdedxSigmaCut<<endl;
1102  return kFALSE;
1103  }
1104  return kTRUE;
1105 }
1108 
1109  if( !fesdTrackCuts ) {
1110  cout<<"Warning: AliESDtrackCut is not initialized "<<endl;
1111  return kFALSE;
1112  }
1113 
1114  switch(clsITSCut){
1115  case 0:
1116  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kOff);
1117  break;
1118  case 1:
1119  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kFirst);
1120  break; //1 hit first layer of SPD
1121  case 2:
1122  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
1123  break; //1 hit in any layer of SPD
1124  case 3:
1125  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kFirst);
1126  fesdTrackCuts->SetMinNClustersITS(4);
1127  // 4 hits in total in the ITS. At least 1 hit in the first layer of SPD
1128  break;
1129  case 4:
1130  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
1131  fesdTrackCuts->SetMinNClustersITS(3);
1132  // 3 hits in total in the ITS. At least 1 hit in any layer of SPD
1133  break;
1134  case 5:
1135  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
1136  fesdTrackCuts->SetMinNClustersITS(4);
1137  // 4 hits in total in the ITS. At least 1 hit in any layer of SPD
1138  break;
1139  case 6:
1140  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
1141  fesdTrackCuts->SetMinNClustersITS(5);
1142  // 5 hits in total in the ITS. At least 1 hit in any layer of SPD
1143  break;
1144  case 7:
1145  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kOff);
1146  fesdTrackCuts->SetMinNClustersITS(4);
1147  break;
1148  case 8:
1149  fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kBoth);
1150  break;
1151  case 9: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kBoth);
1152  fesdTrackCuts->SetMinNClustersITS(4);
1153  break;
1154 
1155  default:
1156  cout<<"Warning: clsITSCut not defined "<<clsITSCut<<endl;
1157  return kFALSE;
1158  }
1159 
1160  return kTRUE;
1161 }
1162 
1165 { // Set Cut
1166 
1167  //Update function for systematics 2015-10-08
1168  switch(clsTPCCut){
1169  case 0: // 0
1170  fMinClsTPC= 0.;
1171  fMinClsTPCToF = 0.;
1172  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1173  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1174  break;
1175 
1176  case 1: // 70
1177  fMinClsTPC= 70.;
1178  fMinClsTPCToF = 0.7;
1179  if( fUseCrossedRows ){
1180  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1181  fesdTrackCuts->SetMinNClustersTPC(0);
1182  } else {
1183  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1184  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1186  }
1187  break;
1188  case 2: // 80
1189  fMinClsTPC = 70.;
1190  fMinClsTPCToF = 0.9;
1191  if( fUseCrossedRows ){
1192  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1193  fesdTrackCuts->SetMinNClustersTPC(0);
1194  } else {
1195  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1196  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1198  }
1199  break;
1200  case 3: // Changed 2014-02-04 before fMinClsTPC = 50.;
1201  fMinClsTPC = 70;
1202  fMinClsTPCToF = 0.8;
1203  if( fUseCrossedRows ){
1204  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1205  fesdTrackCuts->SetMinNClustersTPC(0);
1206  } else {
1207  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1208  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1210  }
1211  //fUseCrossedRows = kTRUE;
1212  break;
1213  case 4: // 0% of findable clusters
1214  fMinClsTPC = 90;
1215  fMinClsTPCToF = 0.8;
1216  if( fUseCrossedRows ){
1217  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1218  fesdTrackCuts->SetMinNClustersTPC(0);
1219  } else {
1220  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1221  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1223  }
1224  break;
1225  case 5: // 35% of findable clusters
1226  fMinClsTPC = 70;
1227  fMinClsTPCToF = 0.35;
1228  if( fUseCrossedRows ){
1229  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1230  fesdTrackCuts->SetMinNClustersTPC(0);
1231  } else {
1232  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1233  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1235  }
1236  break;
1237  case 6: // 60% of findable clusters
1238  fMinClsTPC = 70;
1239  fMinClsTPCToF = 0.60;
1240  if( fUseCrossedRows ){
1241  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1242  fesdTrackCuts->SetMinNClustersTPC(0);
1243  } else {
1244  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1245  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1247  }
1248  break;
1249  case 7: // 60% Changed 2014-02-04 before fMinClsTPC = 0.7 fUseCorrectedTPCClsInfo = 0
1250  // Changed 2014-02-04 before fMinClsTPC = 50.;
1251  fMinClsTPC = 90;
1252  fMinClsTPCToF = 0.35;
1253  if( fUseCrossedRows ){
1254  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1255  fesdTrackCuts->SetMinNClustersTPC(0);
1256  } else {
1257  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1258  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1260  }
1261  break;
1262 
1263  case 8: fMinClsTPC = 0;
1264  fMinClsTPCToF = 0.35;
1265  if( fUseCrossedRows ){
1266  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1267  fesdTrackCuts->SetMinNClustersTPC(0);
1268  } else {
1269  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1270  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1272  }
1273  break;
1274 
1275  case 9: // 35% of findable clusters
1276  fMinClsTPC = 70;
1277  fMinClsTPCToF = 0.35;
1278  if( fUseCrossedRows ){
1279  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1280  fesdTrackCuts->SetMinNClustersTPC(0);
1281  } else {
1282  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1283  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1285  }
1286  break;
1287 
1288  default:
1289  cout<<"Warning: clsTPCCut not defined "<<clsTPCCut<<endl;
1290  return kFALSE;
1291  }
1292  return kTRUE;
1293 }
1294 
1297 {
1298  // Set eta Cut
1299  switch(etaCut){
1300  case 0:
1301  fEtaCut = 100.;
1302  fDoEtaCut = kFALSE;
1303  break;
1304  case 1: // 1.4
1305  fEtaCut = 1.4;
1306  fDoEtaCut = kTRUE;
1307  break;
1308  case 2: // 1.2
1309  fEtaCut = 1.2;
1310  fDoEtaCut = kTRUE;
1311  break;
1312  case 3: // 0.9
1313  fEtaCut = 0.9;
1314  fDoEtaCut = kTRUE;
1315  break;
1316  case 4: // 0.8
1317  fEtaCut = 0.8;
1318  fDoEtaCut = kTRUE;
1319  break;
1320  case 5: // 0.75
1321  fEtaCut = 0.75;
1322  fDoEtaCut = kTRUE;
1323  break;
1324  case 6: //0.6
1325  fEtaCut = 0.6; //changed from 0.4 to 0.6 2013.06.10
1326  fDoEtaCut = kTRUE;
1327  break;
1328  case 7: //0.5
1329  fEtaCut = 0.5; //changed from 0.3 to 0.5 2013.06.10
1330  fDoEtaCut = kTRUE;
1331  break;
1332  case 8: fEtaCut = 0.4;
1333  fDoEtaCut = kTRUE;
1334  break;
1335  case 9: fEtaCut = 0.65;
1336  fDoEtaCut = kTRUE;
1337  break;
1338  default:
1339  cout<<"Warning: EtaCut not defined "<<etaCut<<endl;
1340  return kFALSE;
1341  }
1342  return kTRUE;
1343 }
1344 
1347 {
1348  // Set Pt Cut
1349  //0.1GeV, 0.125 GeV, 0.15 GeV
1350  switch(ptCut){
1351  case 0: fPtMinCut = 0.075;
1352  fPtMaxCut = 9999;
1353  break;
1354  case 1: // 0.1
1355  fPtMinCut = 0.1;
1356  fPtMaxCut = 9999;
1357  break;
1358  case 2: // 0.125 GeV
1359  fPtMinCut = 0.125;
1360  fPtMaxCut = 9999;
1361  break;
1362  case 3: // 0.15 GeV
1363  fPtMinCut = 0.15;
1364  fPtMaxCut = 9999;
1365  break;
1366  // 0.5 - 0.7
1367  case 4:
1368  fPtMinCut = 0.5;
1369  fPtMaxCut = 0.7;
1370  break;
1371  case 5: // 0.175 GeV
1372  fPtMinCut = 0.175;
1373  fPtMaxCut = 9999;
1374  break;
1375  // 50 MeV
1376  case 6:
1377  fPtMinCut = 0.05;
1378  fPtMaxCut = 9999;
1379  break;
1380  case 7:
1381  fPtMinCut = 0.9;
1382  fPtMaxCut = 9999;
1383  break;
1384  default:
1385  cout<<"Warning: PtCut not defined "<<ptCut<<endl;
1386  return kFALSE;
1387  }
1388  return kTRUE;
1389 }
1390 
1391 
1394 {
1395  // Set DCA Cut
1396  if( !fesdTrackCuts ) {
1397  cout<<"Warning: AliESDtrackCut is not initialized "<<endl;
1398  return kFALSE;
1399  }
1400 
1401  switch(dcaCut){
1402 
1403  case 0: //Open cuts//
1404  fesdTrackCuts->SetMaxDCAToVertexZ(1000);
1405  fesdTrackCuts->SetMaxDCAToVertexXY(1000);
1406  break;
1407  case 1:
1408  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01"); //Standard 2010
1409  fesdTrackCuts->SetMaxDCAToVertexZ(2);
1410  break;
1411  case 2:
1412  fesdTrackCuts->SetMaxDCAToVertexZ(2);
1413  fesdTrackCuts->SetMaxDCAToVertexXY(1);
1414  break;
1415  case 3:
1416  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0105+0.0350/pt^1.1"); //Standard 2011
1417  fesdTrackCuts->SetMaxDCAToVertexZ(2);
1418  break;
1419  case 4:
1420  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0525+0.175/pt^1.1");
1421  fesdTrackCuts->SetMaxDCAToVertexZ(2);
1422  break;
1423  case 5:
1424  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
1425  fesdTrackCuts->SetMaxDCAToVertexZ(1);
1426  break;
1427  case 6:
1428  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
1429  fesdTrackCuts->SetMaxDCAToVertexZ(5);
1430  break;
1431  case 7:
1432  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0105+0.0350/pt^1.1"); //Standard 2011
1433  fesdTrackCuts->SetMaxDCAToVertexZ(1);
1434  break;
1435  case 8:
1436  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0105+0.0350/pt^1.1"); //Standard 2011
1437  fesdTrackCuts->SetMaxDCAToVertexZ(5);
1438  break;
1439  default:
1440  cout<<"Warning: dcaCut not defined "<<dcaCut<<endl;
1441  return kFALSE;
1442  }
1443  return kTRUE;
1444 }
1445 
1448 { // Set Cut
1449  switch(piMaxMomdedxSigmaCut){
1450  case 0:
1452  break;
1453  case 1: // 100. GeV
1455  break;
1456  case 2: // 5. GeV
1458  break;
1459  case 3: // 4. GeV
1461  break;
1462  case 4: // 3.5 GeV
1464  break;
1465  case 5: // 3. GeV
1467  break;
1468  case 6: // 2. GeV
1470  break;
1471  default:
1472  cout<<"Warning: piMaxMomdedxSigmaCut not defined "<<piMaxMomdedxSigmaCut<<endl;
1473  return kFALSE;
1474  }
1475  return kTRUE;
1476 }
1477 
1480 { // Set Cut
1481  switch(LowPRejectionSigmaCut){
1482  case 0: //
1483  fDoKaonRejectionLowP=kFALSE;
1484  fDoProtonRejectionLowP=kFALSE;
1485  fDoPionRejectionLowP=kFALSE;
1490  break;
1491  case 1: //
1492  fDoKaonRejectionLowP=kTRUE;
1493  fDoProtonRejectionLowP=kTRUE;
1494  fDoPionRejectionLowP=kTRUE;
1499  break;
1500  case 2: //
1501  fDoKaonRejectionLowP=kTRUE;
1502  fDoProtonRejectionLowP=kTRUE;
1503  fDoPionRejectionLowP=kTRUE;
1508  break;
1509  case 3: //
1510  fDoKaonRejectionLowP=kTRUE;
1511  fDoProtonRejectionLowP=kTRUE;
1512  fDoPionRejectionLowP=kTRUE;
1517  break;
1518  case 4: //
1519  fDoKaonRejectionLowP=kTRUE;
1520  fDoProtonRejectionLowP=kTRUE;
1521  fDoPionRejectionLowP=kTRUE;
1526  break;
1527  case 5: //
1528  fDoKaonRejectionLowP=kTRUE;
1529  fDoProtonRejectionLowP=kTRUE;
1530  fDoPionRejectionLowP=kTRUE;
1535  break;
1536  case 6: //
1537  fDoKaonRejectionLowP=kTRUE;
1538  fDoProtonRejectionLowP=kTRUE;
1539  fDoPionRejectionLowP=kTRUE;
1544  break;
1545  case 7: //
1546  fDoKaonRejectionLowP=kFALSE;
1547  fDoProtonRejectionLowP=kFALSE;
1548  fDoPionRejectionLowP=kTRUE;
1553  break;
1554  case 8:
1555  fDoKaonRejectionLowP=kFALSE;
1556  fDoProtonRejectionLowP=kFALSE;
1557  fDoPionRejectionLowP=kTRUE;
1562  break;
1563  default:
1564  cout<<"Warning: LowPRejectionSigmaCut not defined "<<LowPRejectionSigmaCut<<endl;
1565  return kFALSE;
1566  }
1567  return kTRUE;
1568 }
1569 
1572  // Set Cut
1573  switch(TOFelectronPID){ // RRnewTOF start //////////////////////////////////////////////////////////////////////////
1574  case 0: // no cut
1575  fRequireTOF = kFALSE;
1576  fUseTOFpid = kFALSE;
1579  break;
1580  case 1: // -7,7
1581  fRequireTOF = kFALSE;
1582  fUseTOFpid = kTRUE;
1585  break;
1586  case 2: // -5,5
1587  fRequireTOF = kFALSE;
1588  fUseTOFpid = kTRUE;
1591  break;
1592  case 3: // -3,5
1593  fRequireTOF = kFALSE;
1594  fUseTOFpid = kTRUE;
1597  break;
1598  case 4: // -2,3
1599  fRequireTOF = kFALSE;
1600  fUseTOFpid = kTRUE;
1603  break;
1604  case 5: // -3, 3 TOF mandatory
1605  fRequireTOF = kTRUE;
1606  fUseTOFpid = kTRUE;
1609  break;
1610  default:
1611  cout<<"Warning: TOFElectronCut not defined "<<TOFelectronPID<<endl;
1612  return kFALSE;
1613  }
1614  return kTRUE;
1615 }
1617 
1619  switch(psiCut) {
1620  case 0:
1621  fDoPsiPairCut = kFALSE;
1622  fPsiPairCut = 10000.; //
1623  fDeltaPhiCutMin = -1000.;
1624  fDeltaPhiCutMax = 1000.;
1625  break;
1626  case 1:
1627  fDoPsiPairCut = kTRUE;
1628  fPsiPairCut = 0.45; // Standard
1629  fDeltaPhiCutMin = 0.0;
1630  fDeltaPhiCutMax = 0.12;
1631  break;
1632  case 2:
1633  fDoPsiPairCut = kTRUE;
1634  fPsiPairCut = 0.60;
1635  fDeltaPhiCutMin = 0.0;
1636  fDeltaPhiCutMax = 0.12;
1637  break;
1638  case 3:
1639  fDoPsiPairCut = kTRUE;
1640  fPsiPairCut = 0.52;
1641  fDeltaPhiCutMin = 0.0;
1642  fDeltaPhiCutMax = 0.12;
1643  break;
1644  case 4:
1645  fDoPsiPairCut = kTRUE;
1646  fPsiPairCut = 0.30;
1647  fDeltaPhiCutMin = 0.0;
1648  fDeltaPhiCutMax = 0.12;
1649  break;
1650  case 5:
1651  fDoPsiPairCut = kTRUE;
1652  fPsiPairCut = 0.60;
1653  fDeltaPhiCutMin = 0.0;
1654  fDeltaPhiCutMax = 0.06;
1655  break;
1656  case 6:
1657  fDoPsiPairCut = kTRUE;
1658  fPsiPairCut = 0.65;
1659  fDeltaPhiCutMin = 0.0;
1660  fDeltaPhiCutMax = 0.14;
1661  break;
1662  default:
1663  cout<<"Warning: PsiPairCut not defined "<<fPsiPairCut<<endl;
1664  return kFALSE;
1665  }
1666  return kTRUE;
1667 }
1668 
1671  switch(RCut) {
1672  case 0:
1673  fDoRejectSharedElecGamma = kFALSE;
1674  fRadiusCut = 10000; //
1675  break;
1676  case 1:
1677  fDoRejectSharedElecGamma = kTRUE;
1678  fRadiusCut = 2.0; // cm
1679  break;
1680  case 2:
1681  fDoRejectSharedElecGamma = kTRUE;
1682  fRadiusCut = 3.0; // Standard
1683  break;
1684  case 3:
1685  fDoRejectSharedElecGamma = kTRUE;
1686  fRadiusCut = 4.0; //
1687  break;
1688  case 4:
1689  fDoRejectSharedElecGamma = kTRUE;
1690  fRadiusCut = 5.0; //
1691  break;
1692  case 5:
1693  fDoRejectSharedElecGamma = kTRUE;
1694  fRadiusCut = 10.0; //
1695  break;
1696  case 6:
1697  fDoRejectSharedElecGamma = kTRUE;
1698  fRadiusCut = 15.0; //
1699  break;
1700  default:
1701  cout<<"Warning: PsiPairCut not defined "<<fDoRejectSharedElecGamma<<endl;
1702  return kFALSE;
1703  }
1704  return kTRUE;
1705 }
1708 
1709  if( !fesdTrackCuts ) {
1710  cout<<"Warning: AliESDtrackCuts is not initialized "<<endl;
1711  return kFALSE;
1712  }
1713 
1714  // Set Cut
1715  switch(maxChi2){
1716  case 0:
1717  fesdTrackCuts->SetMaxChi2PerClusterTPC(1e10);
1718  break;
1719  case 1:
1720  fesdTrackCuts->SetMaxChi2PerClusterTPC(3.);
1721  break;
1722  case 2:
1723  fesdTrackCuts->SetMaxChi2PerClusterTPC(4.);
1724  break;
1725  case 3:
1726  fesdTrackCuts->SetMaxChi2PerClusterTPC(5.);
1727  break;
1728  default:
1729  cout<<"Warning: SetMaxChi2PerClusterTPC not defined "<<maxChi2<<endl;
1730  return kFALSE;
1731  }
1732  return kTRUE;
1733 }
1734 
1737 { // Set Cut
1738  if( !fesdTrackCuts ) {
1739  cout<<"Warning: AliESDtrackCuts is not initialized "<<endl;
1740  return kFALSE;
1741  }
1742 
1743  switch(maxChi2){
1744  case 0:
1745  fesdTrackCuts->SetMaxChi2PerClusterITS(1e10);
1746  break;
1747  case 1:
1748  fesdTrackCuts->SetMaxChi2PerClusterITS(25.);
1749  break;
1750  case 2:
1751  fesdTrackCuts->SetMaxChi2PerClusterITS(36.);
1752  break;
1753  case 3:
1754  fesdTrackCuts->SetMaxChi2PerClusterITS(49.);
1755  break;
1756  default:
1757  cout<<"Warning: SetMaxChi2PerClusterITS not defined "<<maxChi2<<endl;
1758  return kFALSE;
1759  }
1760  return kTRUE;
1761 }
1762 
1765 { // Set Cut
1766  switch(opc){
1767  case 0:
1768  fDoWeights = kFALSE;
1769  break;
1770  case 1:
1771  fDoWeights = kTRUE;
1772  break;
1773  default:
1774  cout<<"Warning: Weights option not defined "<<opc<<endl;
1775  return kFALSE;
1776  }
1777  return kTRUE;
1778 }
1781 { // Set Cut
1782  switch(massCut){
1783  case 0:
1784  fMassCutPtMin = -999.; //GeV
1785  fMassCutLowPt = 999.; //GeV/c^2
1786  fMassCutHighPt = 999.; //GeV/c^2
1787  fMassMinCut = -999;
1788  fDoMassCut = kFALSE;
1789  fDoMassMinCut = kFALSE;
1790  break;
1791  case 1:
1792  //fMassCut = 0.135; //GeV/c^2
1793  fMassCutPtMin = -999.; //GeV
1794  fMassCutLowPt = 0.135; //GeV/c^2
1795  fMassCutHighPt = 0.135; //GeV/c^2
1796  fMassMinCut = -999;
1797  fDoMassCut = kTRUE;
1798  fDoMassMinCut = kFALSE;
1799  break;
1800  case 2:
1801  //fMassCut = 0.100; //GeV/c^2
1802  fMassCutPtMin = -999.; //GeV
1803  fMassCutLowPt = 0.100; //GeV/c^2
1804  fMassCutHighPt = 0.100; //GeV/c^2
1805  fMassMinCut = -999;
1806  fDoMassCut = kTRUE;
1807  fDoMassMinCut = kFALSE;
1808  break;
1809  case 3:
1810  fMassCutPtMin = 1.0; //GeV
1811  fMassCutLowPt = 0.015; //GeV/c^2
1812  fMassCutHighPt = 0.035; //GeV/c^2
1813  fMassMinCut = 0.002;
1814  fDoMassCut = kTRUE;
1815  fDoMassMinCut = kTRUE;
1816  break;
1817  case 4:
1818  //fMassCut = 0.050; //GeV/c^2
1819  fMassCutPtMin = -999.; //GeV
1820  fMassCutLowPt = 0.050; //GeV/c^2
1821  fMassCutHighPt = 0.050; //GeV/c^2
1822  fMassMinCut = -999;
1823  fDoMassCut = kTRUE;
1824  fDoMassMinCut = kFALSE;
1825  break;
1826  case 5:
1827  fMassCutPtMin = -999.; //GeV
1828  fMassCutLowPt = 0.035; //GeV/c^2
1829  fMassCutHighPt = 0.035; //GeV/c^2
1830  fMassMinCut = -999;
1831  fDoMassCut = kTRUE;
1832  fDoMassMinCut = kFALSE;
1833  break;
1834  case 6:
1835  fMassCutPtMin = -999.; //GeV
1836  fMassCutLowPt = 0.015; //GeV/c^2
1837  fMassCutHighPt = 0.015; //GeV/c^2
1838  fMassMinCut = -999;
1839  fDoMassCut = kTRUE;
1840  fDoMassMinCut = kFALSE;
1841  break;
1842  case 7:
1843  fMassCutPtMin = 1.0; //GeV
1844  fMassCutLowPt = 0.015; //GeV/c^2
1845  fMassCutHighPt = 0.035; //GeV/c^2
1846  fMassMinCut = -999;
1847  fDoMassCut = kTRUE;
1848  fDoMassMinCut = kFALSE;
1849  break;
1850  case 8:
1851  fMassCutPtMin = 1.0; //GeV
1852  fMassCutLowPt = 0.015; //GeV/c^2
1853  fMassCutHighPt = 0.050; //GeV/c^2
1854  fMassMinCut = -999;
1855  fDoMassCut = kTRUE;
1856  fDoMassMinCut = kFALSE;
1857  break;
1858  case 9:
1859  fMassCutPtMin = 1.0; //GeV
1860  fMassCutLowPt = 0.025; //GeV/c^2
1861  fMassCutHighPt = 0.035; //GeV/c^2
1862  fMassMinCut = -999;
1863  fDoMassCut = kTRUE;
1864  fDoMassMinCut = kFALSE;
1865  break;
1866  case 10: //a
1867  fMassCutPtMin = 1.0; //GeV
1868  fMassCutLowPt = 0.02; //GeV/c^2
1869  fMassCutHighPt = 0.03; //GeV/c^2
1870  fMassMinCut = -999;
1871  fDoMassCut = kTRUE;
1872  fDoMassMinCut = kFALSE;
1873  break;
1874  case 11: //b
1875  fMassCutPtMin = 1.0; //GeV
1876  fMassCutLowPt = 0.027; //GeV/c^2
1877  fMassCutHighPt = 0.054; //GeV/c^2
1878  fMassMinCut = -999;
1879  fDoMassCut = kTRUE;
1880  fDoMassMinCut = kFALSE;
1881  break;
1882  case 12: //c
1883  fMassCutPtMin = 1.0; //GeV
1884  fMassCutLowPt = 0.02; //GeV/c^2
1885  fMassCutHighPt = 0.02; //GeV/c^2
1886  fMassMinCut = -999;
1887  fDoMassCut = kTRUE;
1888  fDoMassMinCut = kFALSE;
1889  break;
1890  case 13: //d
1891  fMassCutPtMin = 1.0; //GeV
1892  fMassCutLowPt = 0.04; //GeV/c^2
1893  fMassCutHighPt = 0.04; //GeV/c^2
1894  fMassMinCut = -999;
1895  fDoMassCut = kTRUE;
1896  fDoMassMinCut = kFALSE;
1897  break;
1898  case 14: //e
1899  fMassCutPtMin = 1.0; //GeV
1900  fMassCutLowPt = 0.06; //GeV/c^2
1901  fMassCutHighPt = 0.06; //GeV/c^2
1902  fMassMinCut = -999;
1903  fDoMassCut = kTRUE;
1904  fDoMassMinCut = kFALSE;
1905  break;
1906  case 15: //f
1907  fMassCutPtMin = 1.0; //GeV
1908  fMassCutLowPt = 0.08; //GeV/c^2
1909  fMassCutHighPt = 0.08; //GeV/c^2
1910  fMassMinCut = -999;
1911  fDoMassCut = kTRUE;
1912  fDoMassMinCut = kFALSE;
1913  break;
1914  case 16: //g
1915  fMassCutPtMin = 1.0; //GeV
1916  fMassCutLowPt = 0.15; //GeV/c^2
1917  fMassCutHighPt = 0.15; //GeV/c^2
1918  fMassMinCut = -999;
1919  fDoMassCut = kTRUE;
1920  fDoMassMinCut = kFALSE;
1921  break;
1922  case 17: //h
1923  fMassCutPtMin = 1.0; //GeV
1924  fMassCutLowPt = 0.2; //GeV/c^2
1925  fMassCutHighPt = 0.2; //GeV/c^2
1926  fMassMinCut = -999;
1927  fDoMassCut = kTRUE;
1928  fDoMassMinCut = kFALSE;
1929  break;
1930  default:
1931  cout<<"Warning: MassCut not defined "<<massCut<<endl;
1932  return kFALSE;
1933  }
1934  return kTRUE;
1935 }
1937 {// Set Cut
1938  switch(useMCPSmearing){
1939  case 0:
1940  fUseVPhotonMCPSmearing=kFALSE;
1941  fUseElectronMCPSmearing=kFALSE;
1942  break;
1943  case 1:
1944  fUseVPhotonMCPSmearing=kTRUE;
1945  fUseElectronMCPSmearing=kFALSE;
1946  break;
1947  case 2:
1948  fUseVPhotonMCPSmearing=kFALSE;
1950  break;
1951  default: cout<<"Warning: Virtual Photon SMearing not defined "<<useMCPSmearing<<endl;
1952  return kFALSE;
1953 
1954  }
1955  return kTRUE;
1956 }
1957 
1958 
1961  // returns TString with current cut number
1962  return fCutStringRead;
1963 }
1964 
1965 
1968  //Create and return standard 2010 PbPb cuts
1969  AliDalitzElectronCuts *cuts=new AliDalitzElectronCuts("StandardCuts2010PbPb","StandardCuts2010PbPb");
1970  if(!cuts->InitializeCutsFromCutString("9069640364102")){
1971  cout<<"Warning: Initialization of Standardcuts2010PbPb failed"<<endl;}
1972  return cuts;
1973 }
1974 
1977  //Create and return standard 2010 PbPb cuts
1978  AliDalitzElectronCuts *cuts=new AliDalitzElectronCuts("StandardCuts2010pp","StandardCuts2010pp");
1979 
1980  if(!cuts->InitializeCutsFromCutString("9069640364102")){
1981  cout<<"Warning: Initialization of Standardcuts2010pp failed"<<endl;}
1982  return cuts;
1983 }
1984 
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)