AliPhysics  8d00e07 (8d00e07)
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 }
172 
173 //________________________________________________________________________
175 
176  // Initialize Cut Histograms for QA (only initialized and filled if function is called)
177 
178  TH1::AddDirectory(kFALSE);
179 
180  TString cutName = "";
181 
182  if( cutNumber==""){
183  cutName = GetCutNumber().Data();
184  }
185  else {
186  cutName = cutNumber.Data();
187  }
188 
189  if(fHistograms != NULL){
190  delete fHistograms;
191  fHistograms=NULL;
192  }
193  if(fHistograms==NULL){
194  fHistograms=new TList();
195  if(name=="")fHistograms->SetName(Form("ElectronCuts_%s",cutName.Data()));
196  else fHistograms->SetName(Form("%s_%s",name.Data(),cutName.Data()));
197  }
198 
199 
200  Int_t kDedxSignalbins = 200;
201 
202  const Int_t kDCABins=62;
203 
204  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};
205 
206  const Int_t kPtBins=110;
207  Double_t binsPtDummy[kPtBins+1];
208  const Int_t kPBins = 109;
209  Double_t binsPDummy[kPBins+1];
210  binsPtDummy[0]=0.0;
211  binsPDummy[0]=0.05;
212 
213  for(Int_t i=1;i<kPtBins+1;i++)
214  {
215  if(binsPtDummy[i-1]+0.05<1.01)
216  binsPtDummy[i]=binsPtDummy[i-1]+0.05;
217  else
218  binsPtDummy[i]=binsPtDummy[i-1]+0.1;
219 
220  }
221  for(Int_t i=1; i <kPBins+1;i++){
222 
223  if( binsPDummy[i-1]+0.05<1.01)
224  binsPDummy[i] = binsPDummy[i-1]+0.05;
225  else
226  binsPDummy[i] = binsPDummy[i-1]+0.1;
227 
228  }
229 
230 
231 
232  hCutIndex=new TH1F(Form("IsElectronSelected %s",cutName.Data()),"IsElectronSelected",10,-0.5,9.5);
233  hCutIndex->GetXaxis()->SetBinLabel(kElectronIn+1,"in");
234  hCutIndex->GetXaxis()->SetBinLabel(kNoTracks+1,"no tracks");
235  hCutIndex->GetXaxis()->SetBinLabel(kTrackCuts+1,"Track cuts");
236  hCutIndex->GetXaxis()->SetBinLabel(kdEdxCuts+1,"dEdx");
237  hCutIndex->GetXaxis()->SetBinLabel(kElectronOut+1,"out");
238  fHistograms->Add(hCutIndex);
239 
240 
241 
242  // dEdx Cuts
243  hdEdxCuts=new TH1F(Form("dEdxCuts %s",cutName.Data()),"dEdxCuts",10,-0.5,9.5);
244  hdEdxCuts->GetXaxis()->SetBinLabel(1,"in");
245  hdEdxCuts->GetXaxis()->SetBinLabel(2,"ITSelectron");
246  hdEdxCuts->GetXaxis()->SetBinLabel(3,"TPCelectron");
247  hdEdxCuts->GetXaxis()->SetBinLabel(4,"TPCpion");
248  hdEdxCuts->GetXaxis()->SetBinLabel(5,"TPCpionhighp");
249  hdEdxCuts->GetXaxis()->SetBinLabel(6,"TPCkaonlowprej");
250  hdEdxCuts->GetXaxis()->SetBinLabel(7,"TPCprotonlowprej");
251  hdEdxCuts->GetXaxis()->SetBinLabel(8,"TPCpionlowprej");
252  hdEdxCuts->GetXaxis()->SetBinLabel(9,"TOFelectron");
253  hdEdxCuts->GetXaxis()->SetBinLabel(10,"out");
254  fHistograms->Add(hdEdxCuts);
255 
256 
257 
258  TAxis *AxisBeforeITS = NULL;
259  TAxis *AxisBeforedEdx = NULL;
260  TAxis *AxisBeforeTOF = NULL;
261  TAxis *AxisBeforedEdxSignal = NULL;
262 
263  if(preCut){
264 
265 
266  hITSdEdxbefore=new TH2F(Form("Electron_ITS_before %s",cutName.Data()),"ITS dEdx electron before" ,kPBins,binsPDummy,200,-10,10);
268  AxisBeforeITS = hITSdEdxbefore->GetXaxis();
269 
270  hTPCdEdxbefore=new TH2F(Form("Electron_dEdx_before %s",cutName.Data()),"dEdx electron before" ,kPBins,binsPDummy,200,-10,10);
272  AxisBeforedEdx = hTPCdEdxbefore->GetXaxis();
273 
274  hTPCdEdxSignalbefore=new TH2F(Form("Electron_dEdxSignal_before %s",cutName.Data()),"dEdx electron signal before" ,kPBins,binsPDummy,kDedxSignalbins,0.0,200);
276  AxisBeforedEdxSignal = hTPCdEdxSignalbefore->GetXaxis();
277 
278  hTOFbefore=new TH2F(Form("Electron_TOF_before %s",cutName.Data()),"TOF electron before" ,kPBins,binsPDummy,200,-10,10);
279  fHistograms->Add(hTOFbefore);
280  AxisBeforeTOF = hTOFbefore->GetXaxis();
281 
282  hTrackDCAxyPtbefore = new TH2F(Form("hTrack_DCAxy_Pt_before %s",cutName.Data()),"DCAxy Vs Pt of tracks before",kDCABins,binsDCADummy,kPtBins,binsPtDummy);
284 
285  hTrackDCAzPtbefore = new TH2F(Form("hTrack_DCAz_Pt_before %s",cutName.Data()), "DCAz Vs Pt of tracks before",kDCABins,binsDCADummy,kPtBins,binsPtDummy);
287 
288  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);
290 
291 
292 
293  }
294 
295 
296  hITSdEdxafter=new TH2F(Form("Electron_ITS_after %s",cutName.Data()),"ITS dEdx electron after" ,kPBins,binsPDummy,200, -10,10);
298 
299  hTPCdEdxafter=new TH2F(Form("Electron_dEdx_after %s",cutName.Data()),"dEdx electron after" ,kPBins,binsPDummy,200, -10,10);
301 
302  hTPCdEdxSignalafter=new TH2F(Form("Electron_dEdxSignal_after %s",cutName.Data()),"dEdx electron signal after" ,kPBins,binsPDummy,kDedxSignalbins,0.0,200);
304 
305  hTOFafter=new TH2F(Form("Electron_TOF_after %s",cutName.Data()),"TOF electron after" ,kPBins,binsPDummy,200,-6,10);
306  fHistograms->Add(hTOFafter);
307 
308  hTrackDCAxyPtafter = new TH2F(Form("hTrack_DCAxy_Pt_after %s",cutName.Data()),"DCAxy Vs Pt of tracks after",kDCABins,binsDCADummy,kPtBins,binsPtDummy);
310 
311  hTrackDCAzPtafter = new TH2F(Form("hTrack_DCAz_Pt_after %s",cutName.Data()), "DCAz Vs Pt of tracks after",kDCABins,binsDCADummy,kPtBins,binsPtDummy);
313 
314  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);
316 
317  hTrackPosEtabeforeDedx = new TH1F(Form("hTrack_Pos_Eta_before_Dedx %s",cutName.Data()),"hTrack_Pos_Eta_before_Dedx",600,-1.5,1.5);
319 
320  hTrackNegEtabeforeDedx = new TH1F(Form("hTrack_Neg_Eta_before_Dedx %s",cutName.Data()),"hTrack_Neg_Eta_before_Dedx",600,-1.5,1.5);
322 
323  hTrackPosEtaafterDedx = new TH1F(Form("hTrack_Pos_Eta_after_Dedx %s",cutName.Data()),"hTrack_Pos_Eta_after_Dedx",600,-1.5,1.5);
325 
326  hTrackNegEtaafterDedx = new TH1F(Form("hTrack_Neg_Eta_afterDedx %s",cutName.Data()),"hTrack_Neg_Eta_after_Dedx",600,-1.5,1.5);
328 
329 
330 
331  TAxis *AxisAfter = hTPCdEdxafter->GetXaxis();
332  Int_t bins = AxisAfter->GetNbins();
333  Double_t from = AxisAfter->GetXmin();
334  Double_t to = AxisAfter->GetXmax();
335  Double_t *newBins = new Double_t[bins+1];
336  newBins[0] = from;
337  Double_t factor = TMath::Power(to/from, 1./bins);
338  for(Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1];
339  AxisAfter->Set(bins, newBins);
340  AxisAfter = hTOFafter->GetXaxis();
341  AxisAfter->Set(bins, newBins);
342  AxisAfter = hITSdEdxafter->GetXaxis();
343  AxisAfter->Set(bins,newBins);
344  AxisAfter = hTPCdEdxSignalafter->GetXaxis();
345  AxisAfter->Set(bins,newBins);
346 
347  if(preCut){
348  AxisBeforeITS->Set(bins, newBins);
349  AxisBeforedEdx->Set(bins, newBins);
350  AxisBeforedEdxSignal->Set(bins,newBins);
351  AxisBeforeTOF->Set(bins, newBins);
352 
353  }
354  delete [] newBins;
355 
356  TH1::AddDirectory(kTRUE);
357 
358  // Event Cuts and Info
359 }
360 
361 
362 //________________________________________________________________________
364 
365 // Set Pointer to AliPIDResponse
366 
367  AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
368 
369  if(man) {
370 
371  AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
372  fPIDResponse = (AliPIDResponse*)inputHandler->GetPIDResponse();
373  if(fPIDResponse)return kTRUE;
374 
375  }
376 
377  return kFALSE;
378 }
380 Bool_t AliDalitzElectronCuts::ElectronIsSelectedMC(Int_t labelParticle,AliMCEvent *mcEvent)
381 {
382  if( labelParticle < 0 || labelParticle >= mcEvent->GetNumberOfTracks() ) return kFALSE;
383  //if( mcEvent->IsPhysicalPrimary(labelParticle) == kFALSE ) return kFALSE; //Ask Ana
384 
385  TParticle* particle = mcEvent->Particle(labelParticle);
386 
387  if( TMath::Abs( particle->GetPdgCode() ) != 11 ) return kFALSE;
388 
389  if( fDoEtaCut ){
390  if( particle->Eta() > fEtaCut || particle->Eta() < -fEtaCut )
391  return kFALSE;
392  }
393 
394 
395 return kTRUE;
396 }
397 
398 
401 {
402  //Selection of Reconstructed electrons
403 
404 
405  Float_t b[2];
406  Float_t bCov[3];
407  lTrack->GetImpactParameters(b,bCov);
408 
409  if (bCov[0]<=0 || bCov[2]<=0) {
410  AliDebug(1, "Estimated b resolution lower or equal zero!");
411  bCov[0]=0; bCov[2]=0;
412  }
413 
414 
415 
416  Float_t dcaToVertexXY = b[0];
417  Float_t dcaToVertexZ = b[1];
418  Double_t clsToF = GetNFindableClustersTPC(lTrack);
419 
420  if( hTrackDCAxyPtbefore) hTrackDCAxyPtbefore->Fill(dcaToVertexXY,lTrack->Pt());
421  if( hTrackDCAzPtbefore ) hTrackDCAzPtbefore->Fill( dcaToVertexZ, lTrack->Pt());
422  if( hTrackNFindClsPtTPCbefore ) hTrackNFindClsPtTPCbefore->Fill( clsToF, lTrack->Pt());
423 
424 
425 
426  if(hCutIndex)hCutIndex->Fill(kElectronIn);
427 
428  if (lTrack == NULL){
429  if(hCutIndex)hCutIndex->Fill(kNoTracks);
430  return kFALSE;
431  }
432 
433  if ( ! lTrack->GetConstrainedParam() ){
434  return kFALSE;
435  }
436  AliVTrack * track = dynamic_cast<AliVTrack*>(lTrack);
437 
438 
439  // Track Cuts
440  if( !TrackIsSelected(lTrack) ){
441  if(hCutIndex)hCutIndex->Fill(kTrackCuts);
442  return kFALSE;
443  }
444 
445  if( lTrack->GetSign() > 0.0 ){
446 
447  if (hTrackPosEtabeforeDedx) hTrackPosEtabeforeDedx->Fill(lTrack->Eta());
448 
449  } else{
450 
451  if(hTrackNegEtabeforeDedx) hTrackNegEtabeforeDedx->Fill(lTrack->Eta());
452 
453  }
454 
455 
456  // dEdx Cuts
457  if( ! dEdxCuts( track ) ) {
458  if(hCutIndex)hCutIndex->Fill(kdEdxCuts);
459  return kFALSE;
460 
461  }
462 
463  if( lTrack->GetSign() > 0.0 ){
464 
465  if( hTrackPosEtaafterDedx) hTrackPosEtaafterDedx->Fill(lTrack->Eta());
466 
467  } else{
468 
469  if( hTrackNegEtaafterDedx) hTrackNegEtaafterDedx->Fill(lTrack->Eta());
470 
471  }
472 
473 
474 
475  //Electron passed the cuts
476  if(hCutIndex)hCutIndex->Fill(kElectronOut);
477 
478  if( hTrackDCAxyPtafter) hTrackDCAxyPtafter->Fill(dcaToVertexXY,lTrack->Pt());
479  if( hTrackDCAzPtafter ) hTrackDCAzPtafter->Fill(dcaToVertexZ,lTrack->Pt());
480  if( hTrackNFindClsPtTPCafter ) hTrackNFindClsPtTPCafter->Fill( clsToF, lTrack->Pt());
481 
482 
483  return kTRUE;
484 }
485 
488  // Track Selection for Photon Reconstruction
489 
490 
491  Double_t clsToF = GetNFindableClustersTPC(lTrack);
492 
493 
494  if( ! fesdTrackCuts->AcceptTrack(lTrack) ){
495 
496  return kFALSE;
497  }
498 
499  if( fDoEtaCut ) {
500  if( lTrack->Eta() > fEtaCut || lTrack->Eta() < -fEtaCut ) {
501  return kFALSE;
502  }
503  }
504 
505 
506  if( lTrack->Pt() < fPtMinCut || lTrack->Pt() > fPtMaxCut ) {
507 
508  return kFALSE;
509 
510  }
511 
512 
513 
514  if( clsToF < fMinClsTPCToF){
515  return kFALSE;
516  }
517 
518 
519 
520  return kTRUE;
521 }
523 Bool_t AliDalitzElectronCuts::dEdxCuts(AliVTrack *fCurrentTrack){
524 
525  // Electron Identification Cuts for Photon reconstruction
526 
527  if(!fPIDResponse){ InitPIDResponse(); }// Try to reinitialize PID Response
528  if(!fPIDResponse){ AliError("No PID Response"); return kFALSE;}// if still missing fatal error
529 
530 
531 
532  //cout<<"dEdxCuts: //////////////////////////////////////////////////////////////////////////"<<endl;
533 
534 
535 
536  Int_t cutIndex=0;
537 
538  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
539  if(hITSdEdxbefore)hITSdEdxbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasITS(fCurrentTrack, AliPID::kElectron));
540  if(hTPCdEdxbefore)hTPCdEdxbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron));
541  if(hTPCdEdxSignalbefore)hTPCdEdxSignalbefore->Fill(fCurrentTrack->P(),TMath::Abs(fCurrentTrack->GetTPCsignal()));
542 
543 
544  cutIndex++;
545 
546 
547  if( fDodEdxSigmaITSCut == kTRUE ){
548 
549 
550  if( fPIDResponse->NumberOfSigmasITS(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLineITS ||
551  fPIDResponse->NumberOfSigmasITS(fCurrentTrack,AliPID::kElectron)> fPIDnSigmaAboveElectronLineITS ){
552 
553  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
554  return kFALSE;
555  }
556 
557  }
558 
559  if(hITSdEdxafter)hITSdEdxafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasITS(fCurrentTrack, AliPID::kElectron));
560 
561 
562  cutIndex++;
563 
564 
565  if(fDodEdxSigmaTPCCut == kTRUE){
566 
567 
568  // TPC Electron Line
569  if( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLineTPC ||
570  fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLineTPC){
571 
572  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
573  return kFALSE;
574  }
575  cutIndex++;
576 
577  // TPC Pion Line
578  if( fCurrentTrack->P()>fPIDMinPnSigmaAbovePionLineTPC && fCurrentTrack->P()<fPIDMaxPnSigmaAbovePionLineTPC ){
579  if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLineTPC &&
580  fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLineTPC &&
581  fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLineTPC){
582 
583  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
584  return kFALSE;
585  }
586  }
587  cutIndex++;
588 
589  // High Pt Pion rej
590  if( fCurrentTrack->P()>fPIDMaxPnSigmaAbovePionLineTPC ){
591  if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLineTPC &&
592  fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLineTPC&&
593  fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLineTPCHighPt){
594 
595  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
596  return kFALSE;
597  }
598  }
599 
600  cutIndex++;
601  }
602 
603  else{ cutIndex+=3; }
604 
605 
606  if( fDoKaonRejectionLowP == kTRUE ){
607 
608  if( fCurrentTrack->P() < fPIDMinPKaonRejectionLowP ){
609 
610  if( TMath::Abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kKaon))<fPIDnSigmaAtLowPAroundKaonLine){
611 
612  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
613 
614  return kFALSE;
615  }
616  }
617  }
618  cutIndex++;
619 
620  if( fDoProtonRejectionLowP == kTRUE ){
621 
622  if( fCurrentTrack->P() < fPIDMinPProtonRejectionLowP ){
623  if( TMath::Abs( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kProton))<fPIDnSigmaAtLowPAroundProtonLine){
624 
625  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
626  return kFALSE;
627  }
628  }
629  }
630  cutIndex++;
631 
632  if(fDoPionRejectionLowP == kTRUE){
633  if( fCurrentTrack->P() < fPIDMinPPionRejectionLowP ){
634  if( TMath::Abs( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)) < fPIDnSigmaAtLowPAroundPionLine ){
635 
636  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
637  return kFALSE;
638  }
639  }
640  }
641  cutIndex++;
642 
643 
644  if( ( fCurrentTrack->GetStatus() & AliESDtrack::kTOFpid ) && ( !( fCurrentTrack->GetStatus() & AliESDtrack::kTOFmismatch) ) ){
645  if(hTOFbefore) hTOFbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron));
646  if(fUseTOFpid){
647  if(fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)>fTofPIDnSigmaAboveElectronLine ||
648  fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)<fTofPIDnSigmaBelowElectronLine ){
649  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
650  return kFALSE;
651  }
652  }
653  if(hTOFafter)hTOFafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron));
654  }
655  else if ( fRequireTOF == kTRUE ) {
656 
657  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
658  return kFALSE;
659  }
660  cutIndex++;
661 
662  if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
663  if(hTPCdEdxafter)hTPCdEdxafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron));
664  if(hTPCdEdxSignalafter)hTPCdEdxSignalafter->Fill(fCurrentTrack->P(),TMath::Abs(fCurrentTrack->GetTPCsignal()));
665 
666  return kTRUE;
667 }
669 
670 
671 AliVTrack *AliDalitzElectronCuts::GetTrack(AliVEvent * event, Int_t label){
672  //Returns pointer to the track with given ESD label
673  //(Important for AOD implementation, since Track array in AOD data is different
674  //from ESD array, but ESD tracklabels are stored in AOD Tracks)
675 
676  AliESDEvent * esdEvent = dynamic_cast<AliESDEvent*>(event);
677  if(esdEvent) {
678  if(label > event->GetNumberOfTracks() ) return NULL;
679  AliESDtrack * track = esdEvent->GetTrack(label);
680  return track;
681 
682  } else {
683  for(Int_t ii=0; ii<event->GetNumberOfTracks(); ii++) {
684  AliVTrack * track = dynamic_cast<AliVTrack*>(event->GetTrack(ii));
685 
686  if(track) {
687  if(track->GetID() == label) {
688  return track;
689  }
690  }
691  }
692  }
693 
694  cout << "track not found " << label << " " << event->GetNumberOfTracks() << endl;
695  return NULL;
696 }
699 
700 
701  for(Int_t i = 0;i<photons->GetEntries();i++){
702 
703  AliAODConversionPhoton *photonComp = (AliAODConversionPhoton*) photons->At(i);
704 
705  Int_t posLabel = photonComp->GetTrackLabelPositive();
706  Int_t negLabel = photonComp->GetTrackLabelNegative();
707 
708  if( (photonComp->GetConversionRadius() < fRadiusCut) && (posLabel == indexEle || negLabel == indexEle) ){
709  return kFALSE;
710  }
711  }
712 
713  return kTRUE;
714 }
715 Bool_t AliDalitzElectronCuts::MassCut(Double_t pi0CandidatePt , Double_t vphotonCandidateMass){
716 
717  if( pi0CandidatePt < fMassCutPtMin ){
718 
719  if( vphotonCandidateMass < fMassCutLowPt ){
720  return kTRUE;
721  }
722 
723  }
724  else{
725 
726  if( vphotonCandidateMass < fMassCutHighPt ){
727  return kTRUE;
728  }
729 
730  }
731 
732  return kFALSE;
733 
734 }
735 
737 
738 
739  Double_t clsToF=0;
740 
741  if( fUseCrossedRows == kFALSE ) {
742 
743  if ( !fUseCorrectedTPCClsInfo ){
744  if(lTrack->GetTPCNclsF()!=0){
745 
746  clsToF = (Double_t)lTrack->GetNcls(1)/(Double_t)lTrack->GetTPCNclsF();
747  }// Ncluster/Nfindablecluster
748  }
749  else {
750 
751  //clsToF = lTrack->GetTPCClusterInfo(2,0,GetFirstTPCRow(photon->GetConversionRadius()));
752  clsToF = lTrack->GetTPCClusterInfo(2,0); //NOTE ask friederike
753 
754  }
755  } else {
756 
757  Float_t nCrossedRowsTPC = lTrack->GetTPCCrossedRows();
758  clsToF = 1.0;
759  if ( lTrack->GetTPCNclsF()>0 ) {
760  clsToF = nCrossedRowsTPC / lTrack->GetTPCNclsF();
761  }
762  }
763 
764  return clsToF;
765 
766 }
767 
768 /*
769 Double_t AliDalitzElectronCuts::GetPsiPair( const AliESDtrack *trackPos, const AliESDtrack *trackNeg )
770 {
771 //
772 // This angle is a measure for the contribution of the opening in polar
773 // direction ??0 to the opening angle ?? Pair
774 //
775 // Ref. Measurement of photons via conversion pairs with the PHENIX experiment at RHIC
776 // Master Thesis. Thorsten Dahms. 2005
777 // https://twiki.cern.ch/twiki/pub/ALICE/GammaPhysicsPublications/tdahms_thesis.pdf
778 //
779  Double_t momPos[3];
780  Double_t momNeg[3];
781  if( trackPos->GetConstrainedPxPyPz(momPos) == 0 ) trackPos->GetPxPyPz( momPos );
782  if( trackNeg->GetConstrainedPxPyPz(momNeg) == 0 ) trackNeg->GetPxPyPz( momNeg );
783 
784  TVector3 posDaughter;
785  TVector3 negDaughter;
786 
787  posDaughter.SetXYZ( momPos[0], momPos[1], momPos[2] );
788  negDaughter.SetXYZ( momNeg[0], momNeg[1], momNeg[2] );
789 
790  Double_t deltaTheta = negDaughter.Theta() - posDaughter.Theta();
791  Double_t openingAngle = posDaughter.Angle( negDaughter ); //TMath::ACos( posDaughter.Dot(negDaughter)/(negDaughter.Mag()*posDaughter.Mag()) );
792 
793  if( openingAngle < 1e-20 ) return 0.;
794 
795  Double_t psiAngle = TMath::ASin( deltaTheta/openingAngle );
796 
797  return psiAngle;
798 }*/
799 
801 {
802 //
803 // Returns true if it is a gamma conversion according to psi pair value
804 //
805  return ( (deltaPhi > fDeltaPhiCutMin && deltaPhi < fDeltaPhiCutMax) &&
806  TMath::Abs(psiPair) < ( fPsiPairCut - fPsiPairCut/fDeltaPhiCutMax * deltaPhi ) );
807 }
808 
812 
813  if(fCutString && fCutString->GetString().Length() == kNCuts) {
814  cout << "Updating cut id in spot number " << cutID << " to " << value << endl;
815  fCutString->SetString(GetCutNumber());
816  } else {
817  cout << "fCutString not yet initialized, will not be updated" << endl;
818  return kFALSE;
819  }
820  // cout << fCutString->GetString().Data() << endl;
821  return kTRUE;
822 }
823 
826  fCutStringRead = Form("%s",analysisCutSelection.Data());
827 
828  // Initialize Cuts from a given Cut string
829 
830 // out<<"Set Cut Number: "<<analysisCutSelection.Data()<<endl;
831  AliInfo(Form("Set ElectronCuts Number: %s",analysisCutSelection.Data()));
832 
833  if(analysisCutSelection.Length()!=kNCuts) {
834  AliError(Form("Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(), kNCuts));
835  return kFALSE;
836  }
837  if(!analysisCutSelection.IsAlnum()){
838  AliError("Cut selection is not alphanumeric");
839  return kFALSE;
840  }
841 
842  TString analysisCutSelectionLowerCase = Form("%s",analysisCutSelection.Data());
843  analysisCutSelectionLowerCase.ToLower();
844  const char *cutSelection = analysisCutSelectionLowerCase.Data();
845  #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0'
846  for(Int_t ii=0;ii<kNCuts;ii++){
847  ASSIGNARRAY(ii);
848  }
849 
850 
851  // Set Individual Cuts
852  for(Int_t ii=0;ii<kNCuts;ii++){
853  if(!SetCut(cutIds(ii),fCuts[ii]))return kFALSE;
854  }
855 
856  //PrintCuts();
857 
858  return kTRUE;
859 }
863 
864  //cout << "Updating cut " << fgkCutNames[cutID] << " (" << cutID << ") to " << value << endl;
865 
866  switch (cutID) {
867 
869  if( SetMaxChi2TPCConstrainedGlobal( value ) ){
871  UpdateCutString(cutID, value);
872  return kTRUE;
873  } else return kFALSE;
874 
875  case kededxSigmaITSCut:
876  if( SetITSdEdxCutElectronLine(value)) { //NOTE SetITSdEdxCutElectronLine: To be implemented
877  fCuts[kededxSigmaITSCut] = value;
878  UpdateCutString(cutID, value);
879  return kTRUE;
880  } else return kFALSE;
881 
882  case kededxSigmaTPCCut:
883  if( SetTPCdEdxCutElectronLine(value)) { //NOTE SetITSdEdxCutElectronLine: To be implemented
884  fCuts[kededxSigmaTPCCut] = value;
885  UpdateCutString(cutID, value);
886  return kTRUE;
887  } else return kFALSE;
888 
889  case kpidedxSigmaTPCCut:
890  if( SetTPCdEdxCutPionLine(value)) { //NOTE SetITSdEdxCutPionLine: To be implemented
891  fCuts[kpidedxSigmaTPCCut] = value;
892  UpdateCutString(cutID, value);
893  return kTRUE;
894  } else return kFALSE;
895 
897  if( SetMinMomPiondEdxTPCCut(value)) {
899  UpdateCutString(cutID, value);
900  return kTRUE;
901  } else return kFALSE;
902 
904  if( SetMaxMomPiondEdxTPCCut(value)) {
906  UpdateCutString(cutID, value);
907  return kTRUE;
908  } else return kFALSE;
909 
911  if( SetLowPRejectionCuts(value) ) {
912  fCuts[kLowPRejectionSigmaCut] = value;
913  UpdateCutString(cutID, value);
914  return kTRUE;
915  } else return kFALSE;
916 
917 
918  case kTOFelectronPID:
919  if( SetTOFElectronPIDCut(value)) {
920  fCuts[kTOFelectronPID] = value;
921  UpdateCutString(cutID, value);
922  return kTRUE;
923  } else return kFALSE;
924  case kclsITSCut:
925  if( SetITSClusterCut(value) ) {
926  fCuts[kclsITSCut] = value;
927  UpdateCutString(cutID, value);
928  return kTRUE;
929  } else return kFALSE;
930  case kclsTPCCut:
931  if( SetTPCClusterCut(value)) {
932  fCuts[kclsTPCCut] = value;
933  UpdateCutString(cutID, value);
934  return kTRUE;
935  } else return kFALSE;
936 
937  case ketaCut:
938  if( SetEtaCut(value)) {
939  fCuts[ketaCut] = value;
940  UpdateCutString(cutID, value);
941  return kTRUE;
942  } else return kFALSE;
943  case kptCut:
944  if( SetPtCut(value)) {
945  fCuts[kptCut] = value;
946  UpdateCutString(cutID, value);
947  return kTRUE;
948  } else return kFALSE;
949 
950  case kDCACut:
951  if( SetDCACut(value)) {
952  fCuts[kDCACut] = value;
953  UpdateCutString(cutID, value);
954  return kTRUE;
955  } else return kFALSE;
956 
957 
958  case kPsiPair:
959  if( SetPsiPairCut(value)) {
960  fCuts[kPsiPair] = value;
961  UpdateCutString(cutID, value);
962  return kTRUE;
963  } else return kFALSE;
964 
966  if( SetRejectSharedElecGamma(value)) {
967  fCuts[kRejectSharedElecGamma] = value;
968  UpdateCutString(cutID, value);
969  return kTRUE;
970  } else return kFALSE;
971 
973  if( SetMaxChi2PerClusterTPC(value)) {
974  fCuts[kMaxChi2PerClusterTPC] = value;
975  UpdateCutString(cutID, value);
976  return kTRUE;
977  } else return kFALSE;
978 
980  if( SetMaxChi2PerClusterITS(value)) {
981  fCuts[kMaxChi2PerClusterITS] = value;
982  UpdateCutString(cutID, value);
983  return kTRUE;
984  } else return kFALSE;
985 
986  case kmassCut:
987  if( SetMassCut(value)) {
988  fCuts[kmassCut] = value;
989  UpdateCutString(cutID, value);
990  return kTRUE;
991  } else return kFALSE;
992  case kWeights:
993  if( SetDoWeights(value)) {
994  fCuts[kWeights] = value;
995  UpdateCutString(cutID, value);
996  return kTRUE;
997  } else return kFALSE;
998 
1000 
1001  if( SetUseVPhotonMCPmearing(value)) {
1002  fCuts[kuseVPhotonMCPSmearing] = value;
1003  UpdateCutString(cutID, value);
1004  return kTRUE;
1005  } else return kFALSE;
1006 
1007  case kNCuts:
1008  cout << "Error:: Cut id out of range"<< endl;
1009  return kFALSE;
1010  }
1011 
1012  cout << "Error:: Cut id " << cutID << " not recognized "<< endl;
1013  return kFALSE;
1014 
1015  //PrintCuts();
1016 
1017 }
1018 
1020 
1022  // Print out current Cut Selection
1023  for(Int_t ic = 0; ic < kNCuts; ic++) {
1024  printf("%-30s : %d \n", fgkCutNames[ic], fCuts[ic]);
1025  }
1026 
1027 }
1030 {
1031  if( !fesdTrackCuts ) {
1032 
1033  cout<<"Warning: AliESDtrackCut is not initialized "<<endl;
1034  return kFALSE;
1035  }
1036 
1037  switch( maxChi2 ){
1038 
1039  case 0: fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(1e10);
1040  break;
1041  case 1: fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(25.);
1042  break;
1043  case 2: fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(36.);
1044  break;
1045  case 3: fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(49.);
1046  break;
1047  case 4: fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(100.);
1048  break;
1049 
1050  default: cout<<"Warning: maxChi2 is not defined"<<maxChi2<<endl;
1051  return kFALSE;
1052 
1053  }
1054 
1055  return kTRUE;
1056 }
1059 { // Set Cut
1060 
1061  switch(ededxSigmaCut){
1062 
1063  case 0:
1064  fDodEdxSigmaITSCut = kFALSE;
1067  break;
1068  case 1: // -10,10
1069  fDodEdxSigmaITSCut = kTRUE;
1072  break;
1073  case 2: // -6,7
1074  fDodEdxSigmaITSCut = kTRUE;
1077  break;
1078  case 3: // -5,5
1079  fDodEdxSigmaITSCut = kTRUE;
1082  break;
1083  case 4: // -4,5
1084  fDodEdxSigmaITSCut = kTRUE;
1087  break;
1088  case 5: // -3,5
1089  fDodEdxSigmaITSCut = kTRUE;
1092  break;
1093  case 6: // -4,4
1094  fDodEdxSigmaITSCut = kTRUE;
1097  break;
1098  case 7: // -2.5,4
1099  fDodEdxSigmaITSCut = kTRUE;
1102  break;
1103  case 8: // -2,3.5
1104  fDodEdxSigmaITSCut = kTRUE;
1107  break;
1108  default:
1109  cout<<"Warning: ITSdEdxCutElectronLine not defined"<<ededxSigmaCut<<endl;
1110  return kFALSE;
1111 
1112  }
1113  return kTRUE;
1114 }
1115 
1118 { // Set Cut
1119  switch(ededxSigmaCut){
1120 
1121  case 0: fDodEdxSigmaTPCCut = kFALSE;
1124  break;
1125  case 1: // -10,10
1126  fDodEdxSigmaTPCCut = kTRUE;
1129  break;
1130  case 2: // -6,7
1131  fDodEdxSigmaTPCCut = kTRUE;
1134  break;
1135  case 3: // -5,5
1136  fDodEdxSigmaTPCCut = kTRUE;
1139  break;
1140  case 4: // -4,5
1141  fDodEdxSigmaTPCCut = kTRUE;
1144  break;
1145  case 5: // -3,5
1146  fDodEdxSigmaTPCCut = kTRUE;
1149  break;
1150  case 6: // -4,4
1151  fDodEdxSigmaTPCCut = kTRUE;
1154  break;
1155  case 7: // -2.5,4
1156  fDodEdxSigmaTPCCut = kTRUE;
1159  break;
1160  case 8: // -2,3.5
1161  fDodEdxSigmaTPCCut = kTRUE;
1164  break;
1165  default:
1166  cout<<"Warning: TPCdEdxCutElectronLine not defined"<<ededxSigmaCut<<endl;
1167  return kFALSE;
1168 
1169  }
1170  return kTRUE;
1171 }
1172 
1175 { // Set Cut
1176 
1177  switch(pidedxSigmaCut){
1178 
1179  case 0: fPIDnSigmaAbovePionLineTPC= 0;
1181  break;
1182  case 1: // -10
1183  fPIDnSigmaAbovePionLineTPC=3.0; //Update Sep-05-2013 from -10 to 3
1185  break;
1186  case 2: // 1
1187  fPIDnSigmaAbovePionLineTPC=2; //Update Sep-09-2013 from -1 to 2
1188  fPIDnSigmaAbovePionLineTPCHighPt=-1; //Update Sep-09-2013 from -10 to -1
1189  break;
1190  case 3: // 0
1191  fPIDnSigmaAbovePionLineTPC=2; //Update Sep-09-2013 from 0 to 2
1192  fPIDnSigmaAbovePionLineTPCHighPt=0; //Update Sep-09-2013 from -10 to 0
1193  break;
1194  case 4: // 1
1197  break;
1198  case 5: // 1
1201  break;
1202  case 6: // 1
1205  break;
1206  case 7:
1207  fPIDnSigmaAbovePionLineTPC = 2.0; // We need a bit less tight cut on dE/dx //Updated from 3.0 and -10 to +2.0 , +2.0
1209  break;
1210  case 8: // 1
1211  fPIDnSigmaAbovePionLineTPC = 1.5; // Updated May-16-2013 from 3.5 and -10 to +1.5, +1
1213  break;
1214  case 9: // 1
1217  break;
1218  default:
1219  cout<<"Warning: pidedxSigmaCut not defined "<<pidedxSigmaCut<<endl;
1220  return kFALSE;
1221  }
1222  return kTRUE;
1223 }
1224 
1227 { // Set Cut
1228  switch(piMomdedxSigmaCut){
1229 
1230  case 0: fPIDMinPnSigmaAbovePionLineTPC=0.;
1231  break;
1232  case 1: // 50.0 GeV
1234  break;
1235  case 2: // 20.0 GeV
1237  break;
1238  case 3: // 1.5 GeV
1240  break;
1241  case 4: // 1. GeV
1243  break;
1244  case 5: // 0.5 GeV
1246  break;
1247  case 6: // 0.4 GeV
1249  break;
1250  case 7: // 0.3 GeV
1252  break;
1253  case 8: // 0.25 GeV
1255  break;
1256  default:
1257  cout<<"Warning: piMomdedxSigmaCut not defined "<<piMomdedxSigmaCut<<endl;
1258  return kFALSE;
1259  }
1260  return kTRUE;
1261 }
1264 
1265 
1266  if( !fesdTrackCuts ) {
1267 
1268  cout<<"Warning: AliESDtrackCut is not initialized "<<endl;
1269  return kFALSE;
1270  }
1271 
1272  switch(clsITSCut){
1273 
1274  case 0: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kOff);
1275  break;
1276  case 1: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kFirst);
1277  break; //1 hit first layer of SPD
1278  case 2: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
1279  break; //1 hit in any layer of SPD
1280  case 3: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kFirst);
1281  fesdTrackCuts->SetMinNClustersITS(4);
1282  // 4 hits in total in the ITS. At least 1 hit in the first layer of SPD
1283  break;
1284  case 4: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
1285  fesdTrackCuts->SetMinNClustersITS(3);
1286  // 3 hits in total in the ITS. At least 1 hit in any layer of SPD
1287  break;
1288  case 5: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
1289  fesdTrackCuts->SetMinNClustersITS(4);
1290  // 4 hits in total in the ITS. At least 1 hit in any layer of SPD
1291  break;
1292  case 6: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
1293  fesdTrackCuts->SetMinNClustersITS(5);
1294  // 5 hits in total in the ITS. At least 1 hit in any layer of SPD
1295  break;
1296  case 7: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kOff);
1297  fesdTrackCuts->SetMinNClustersITS(4);
1298  break;
1299  case 8: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kBoth);
1300  break;
1301  case 9: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kBoth);
1302  fesdTrackCuts->SetMinNClustersITS(4);
1303  break;
1304 
1305  default:
1306  cout<<"Warning: clsITSCut not defined "<<clsITSCut<<endl;
1307  return kFALSE;
1308  }
1309 
1310 return kTRUE;
1311 }
1312 
1315 { // Set Cut
1316 
1317  //Update function for systematics 2015-10-08
1318 
1319  switch(clsTPCCut){
1320 
1321  case 0: // 0
1322  fMinClsTPC= 0.;
1323  fMinClsTPCToF = 0.;
1324  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1325  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1326  break;
1327 
1328  case 1: // 70
1329  fMinClsTPC= 70.;
1330  fMinClsTPCToF = 0.7;
1331 
1332  if( fUseCrossedRows ){
1333 
1334  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1335  fesdTrackCuts->SetMinNClustersTPC(0);
1336 
1337  } else {
1338 
1339  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1340  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1342  }
1343  break;
1344  case 2: // 80
1345  fMinClsTPC = 70.;
1346  fMinClsTPCToF = 0.9;
1347 
1348  if( fUseCrossedRows ){
1349 
1350  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1351  fesdTrackCuts->SetMinNClustersTPC(0);
1352 
1353  } else {
1354 
1355  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1356  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1358 
1359  }
1360  break;
1361  case 3: // Changed 2014-02-04 before fMinClsTPC = 50.;
1362  fMinClsTPC = 70;
1363  fMinClsTPCToF = 0.8;
1364 
1365  if( fUseCrossedRows ){
1366 
1367  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1368  fesdTrackCuts->SetMinNClustersTPC(0);
1369 
1370  } else {
1371 
1372  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1373  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1375 
1376  }
1377  //fUseCrossedRows = kTRUE;
1378  break;
1379  case 4: // 0% of findable clusters
1380  fMinClsTPC = 90;
1381  fMinClsTPCToF = 0.8;
1382 
1383  if( fUseCrossedRows ){
1384 
1385  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1386  fesdTrackCuts->SetMinNClustersTPC(0);
1387 
1388  } else {
1389 
1390  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1391  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1393 
1394  }
1395  break;
1396  case 5: // 35% of findable clusters
1397  fMinClsTPC = 70;
1398  fMinClsTPCToF = 0.35;
1399 
1400  if( fUseCrossedRows ){
1401 
1402  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1403  fesdTrackCuts->SetMinNClustersTPC(0);
1404 
1405  } else {
1406 
1407  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1408  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1410 
1411  }
1412  break;
1413  case 6: // 60% of findable clusters
1414  fMinClsTPC = 70;
1415  fMinClsTPCToF = 0.60;
1416 
1417  if( fUseCrossedRows ){
1418 
1419  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1420  fesdTrackCuts->SetMinNClustersTPC(0);
1421 
1422  } else {
1423 
1424  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1425  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1427 
1428  }
1429  break;
1430  case 7: // 60% Changed 2014-02-04 before fMinClsTPC = 0.7 fUseCorrectedTPCClsInfo = 0
1431  // Changed 2014-02-04 before fMinClsTPC = 50.;
1432  fMinClsTPC = 90;
1433  fMinClsTPCToF = 0.35;
1434 
1435  if( fUseCrossedRows ){
1436 
1437  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1438  fesdTrackCuts->SetMinNClustersTPC(0);
1439 
1440  } else {
1441 
1442  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1443  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1445 
1446  }
1447  break;
1448 
1449  case 8: fMinClsTPC = 0;
1450  fMinClsTPCToF = 0.35;
1451 
1452  if( fUseCrossedRows ){
1453 
1454  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1455  fesdTrackCuts->SetMinNClustersTPC(0);
1456 
1457  } else {
1458 
1459  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1460  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1462 
1463  }
1464  break;
1465 
1466  case 9: // 35% of findable clusters
1467  fMinClsTPC = 70;
1468  fMinClsTPCToF = 0.35;
1469 
1470  if( fUseCrossedRows ){
1471 
1472  fesdTrackCuts->SetMinNCrossedRowsTPC(fMinClsTPC);
1473  fesdTrackCuts->SetMinNClustersTPC(0);
1474 
1475  } else {
1476 
1477  fesdTrackCuts->SetMinNCrossedRowsTPC(0);
1478  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1480 
1481  }
1482  break;
1483 
1484  default:
1485  cout<<"Warning: clsTPCCut not defined "<<clsTPCCut<<endl;
1486  return kFALSE;
1487  }
1488  return kTRUE;
1489 }
1490 
1491 /*
1493 Bool_t AliDalitzElectronCuts::SetTPCClusterCut(Int_t clsTPCCut)
1494 { // Set Cut
1495  switch(clsTPCCut){
1496  case 0: // 0
1497  fMinClsTPC= 0.;
1498  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1499  break;
1500  case 1: // 70
1501  fMinClsTPC= 70.;
1502  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1503  break;
1504  case 2: // 80
1505  fMinClsTPC= 80.;
1506  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1507  break;
1508  case 3: // Changed 2014-02-04 before fMinClsTPC = 50.;
1509  fMinClsTPCToF = 0.8;
1510  fesdTrackCuts->SetMinNCrossedRowsTPC(70);
1511  fesdTrackCuts->SetMinNClustersTPC(0);
1512  fUseCrossedRows = kTRUE;
1513  break;
1514  case 4: // 0% of findable clusters
1515  fMinClsTPC= 70.;
1516  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1517  fMinClsTPCToF= 0.0;
1518  fUseCorrectedTPCClsInfo=0;
1519  break;
1520  case 5: // 35% of findable clusters
1521  fMinClsTPC = 70.;
1522  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1523  fMinClsTPCToF= 0.35;
1524  fUseCorrectedTPCClsInfo=0;
1525  break;
1526  case 6: // 60% of findable clusters
1527  fMinClsTPC= 70.;
1528  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1529  fMinClsTPCToF= 0.6;
1530  fUseCorrectedTPCClsInfo=0;
1531  break;
1532  case 7: // 60% Changed 2014-02-04 before fMinClsTPC = 0.7 fUseCorrectedTPCClsInfo = 0
1533  // Changed 2014-02-04 before fMinClsTPC = 50.;
1534  fMinClsTPCToF = 0.6;
1535  fesdTrackCuts->SetMinNCrossedRowsTPC(70);
1536  fesdTrackCuts->SetMinNClustersTPC(0);
1537  fUseCrossedRows = kTRUE;
1538  break;
1539  case 8: fMinClsTPC = 0.;
1540  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1541  fMinClsTPCToF= 0.35;
1542  fUseCorrectedTPCClsInfo=0;
1543  break;
1544  case 9: // 35% of findable clusters
1545  fMinClsTPC = 70.;
1546  fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);
1547  fMinClsTPCToF= 0.35;
1548  fUseCorrectedTPCClsInfo=1;
1549  break;
1550 
1551  default:
1552  cout<<"Warning: clsTPCCut not defined "<<clsTPCCut<<endl;
1553  return kFALSE;
1554  }
1555  return kTRUE;
1556 }*/
1557 
1560 {
1561  // Set eta Cut
1562  switch(etaCut){
1563  case 0:
1564  fEtaCut = 100.;
1565  fDoEtaCut = kFALSE;
1566  break;
1567  case 1: // 1.4
1568  fEtaCut = 1.4;
1569  fDoEtaCut = kTRUE;
1570  break;
1571  case 2: // 1.2
1572  fEtaCut = 1.2;
1573  fDoEtaCut = kTRUE;
1574  break;
1575  case 3: // 0.9
1576  fEtaCut = 0.9;
1577  fDoEtaCut = kTRUE;
1578  break;
1579  case 4: // 0.8
1580  fEtaCut = 0.8;
1581  fDoEtaCut = kTRUE;
1582  break;
1583  case 5: // 0.75
1584  fEtaCut = 0.75;
1585  fDoEtaCut = kTRUE;
1586  break;
1587  case 6: //0.6
1588  fEtaCut = 0.6; //changed from 0.4 to 0.6 2013.06.10
1589  fDoEtaCut = kTRUE;
1590  break;
1591  case 7: //0.5
1592  fEtaCut = 0.5; //changed from 0.3 to 0.5 2013.06.10
1593  fDoEtaCut = kTRUE;
1594  break;
1595  case 8: fEtaCut = 0.4;
1596  fDoEtaCut = kTRUE;
1597  break;
1598  case 9: fEtaCut = 0.65;
1599  fDoEtaCut = kTRUE;
1600  break;
1601  default:
1602  cout<<"Warning: EtaCut not defined "<<etaCut<<endl;
1603  return kFALSE;
1604  }
1605  return kTRUE;
1606 }
1607 
1610 {
1611  // Set Pt Cut
1612  //0.1GeV, 0.125 GeV, 0.15 GeV
1613 
1614  switch(ptCut){
1615 
1616  case 0: fPtMinCut = 0.075;
1617  fPtMaxCut = 9999;
1618  break;
1619  case 1: // 0.1
1620  fPtMinCut = 0.1;
1621  fPtMaxCut = 9999;
1622  break;
1623  case 2: // 0.125 GeV
1624  fPtMinCut = 0.125;
1625  fPtMaxCut = 9999;
1626  break;
1627  case 3: // 0.15 GeV
1628  fPtMinCut = 0.15;
1629  fPtMaxCut = 9999;
1630  break;
1631  // 0.5 - 0.7
1632  case 4: fPtMinCut = 0.5;
1633  fPtMaxCut = 0.7;
1634  break;
1635  case 5: // 0.175 GeV
1636  fPtMinCut = 0.175;
1637  fPtMaxCut = 9999;
1638  break;
1639  // 50 MeV
1640  case 6: fPtMinCut = 0.05;
1641  fPtMaxCut = 9999;
1642  break;
1643  default:
1644  cout<<"Warning: PtCut not defined "<<ptCut<<endl;
1645  return kFALSE;
1646  }
1647  return kTRUE;
1648 }
1649 
1650 
1653 {
1654  // Set DCA Cut
1655 
1656  if( !fesdTrackCuts ) {
1657 
1658  cout<<"Warning: AliESDtrackCut is not initialized "<<endl;
1659  return kFALSE;
1660  }
1661 
1662  switch(dcaCut){
1663 
1664  case 0: //Open cuts//
1665  fesdTrackCuts->SetMaxDCAToVertexZ(1000);
1666  fesdTrackCuts->SetMaxDCAToVertexXY(1000);
1667  break;
1668  case 1:
1669  fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01"); //Standard 2010
1670  fesdTrackCuts->SetMaxDCAToVertexZ(2);
1671  break;
1672  case 2: fesdTrackCuts->SetMaxDCAToVertexZ(2);
1673  fesdTrackCuts->SetMaxDCAToVertexXY(1);
1674  break;
1675  case 3: fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0105+0.0350/pt^1.1"); //Standard 2011
1676  fesdTrackCuts->SetMaxDCAToVertexZ(2);
1677  break;
1678  case 4: fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0525+0.175/pt^1.1");
1679  fesdTrackCuts->SetMaxDCAToVertexZ(2);
1680  break;
1681  case 5: fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
1682  fesdTrackCuts->SetMaxDCAToVertexZ(1);
1683  break;
1684  case 6: fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
1685  fesdTrackCuts->SetMaxDCAToVertexZ(5);
1686  break;
1687  case 7: fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0105+0.0350/pt^1.1"); //Standard 2011
1688  fesdTrackCuts->SetMaxDCAToVertexZ(1);
1689  break;
1690  case 8: fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0105+0.0350/pt^1.1"); //Standard 2011
1691  fesdTrackCuts->SetMaxDCAToVertexZ(5);
1692  break;
1693  default:
1694  cout<<"Warning: dcaCut not defined "<<dcaCut<<endl;
1695  return kFALSE;
1696  }
1697  return kTRUE;
1698 }
1699 
1700 
1701 
1702 
1705 { // Set Cut
1706  switch(piMaxMomdedxSigmaCut){
1707 
1708  case 0:
1710  break;
1711  case 1: // 100. GeV
1713  break;
1714  case 2: // 5. GeV
1716  break;
1717  case 3: // 4. GeV
1719  break;
1720  case 4: // 3.5 GeV
1722  break;
1723  case 5: // 3. GeV
1725  break;
1726  default:
1727  cout<<"Warning: piMaxMomdedxSigmaCut not defined "<<piMaxMomdedxSigmaCut<<endl;
1728  return kFALSE;
1729  }
1730  return kTRUE;
1731 }
1732 
1735 { // Set Cut
1736  switch(LowPRejectionSigmaCut){
1737  case 0: //
1738  fDoKaonRejectionLowP=kFALSE;
1739  fDoProtonRejectionLowP=kFALSE;
1740  fDoPionRejectionLowP=kFALSE;
1745  break;
1746  case 1: //
1747  fDoKaonRejectionLowP=kTRUE;
1748  fDoProtonRejectionLowP=kTRUE;
1749  fDoPionRejectionLowP=kTRUE;
1754  break;
1755  case 2: //
1756  fDoKaonRejectionLowP=kTRUE;
1757  fDoProtonRejectionLowP=kTRUE;
1758  fDoPionRejectionLowP=kTRUE;
1763  break;
1764  case 3: //
1765  fDoKaonRejectionLowP=kTRUE;
1766  fDoProtonRejectionLowP=kTRUE;
1767  fDoPionRejectionLowP=kTRUE;
1772  break;
1773  case 4: //
1774  fDoKaonRejectionLowP=kTRUE;
1775  fDoProtonRejectionLowP=kTRUE;
1776  fDoPionRejectionLowP=kTRUE;
1781  break;
1782  case 5: //
1783  fDoKaonRejectionLowP=kTRUE;
1784  fDoProtonRejectionLowP=kTRUE;
1785  fDoPionRejectionLowP=kTRUE;
1790  break;
1791  case 6: //
1792  fDoKaonRejectionLowP=kTRUE;
1793  fDoProtonRejectionLowP=kTRUE;
1794  fDoPionRejectionLowP=kTRUE;
1799  break;
1800  case 7: //
1801  fDoKaonRejectionLowP=kFALSE;
1802  fDoProtonRejectionLowP=kFALSE;
1803  fDoPionRejectionLowP=kTRUE;
1808  break;
1809  case 8:
1810  fDoKaonRejectionLowP=kFALSE;
1811  fDoProtonRejectionLowP=kFALSE;
1812  fDoPionRejectionLowP=kTRUE;
1817  break;
1818  default:
1819  cout<<"Warning: LowPRejectionSigmaCut not defined "<<LowPRejectionSigmaCut<<endl;
1820  return kFALSE;
1821  }
1822  return kTRUE;
1823 }
1824 
1827  // Set Cut
1828  switch(TOFelectronPID){ // RRnewTOF start //////////////////////////////////////////////////////////////////////////
1829  case 0: // no cut
1830  fRequireTOF = kFALSE;
1831  fUseTOFpid = kFALSE;
1834  break;
1835  case 1: // -7,7
1836  fRequireTOF = kFALSE;
1837  fUseTOFpid = kTRUE;
1840  break;
1841  case 2: // -5,5
1842  fRequireTOF = kFALSE;
1843  fUseTOFpid = kTRUE;
1846  break;
1847  case 3: // -3,5
1848  fRequireTOF = kFALSE;
1849  fUseTOFpid = kTRUE;
1852  break;
1853  case 4: // -2,3
1854  fRequireTOF = kFALSE;
1855  fUseTOFpid = kTRUE;
1858  break;
1859  case 5: // -3, 3 TOF mandatory
1860  fRequireTOF = kTRUE;
1861  fUseTOFpid = kTRUE;
1864  break;
1865  default:
1866  cout<<"Warning: TOFElectronCut not defined "<<TOFelectronPID<<endl;
1867  return kFALSE;
1868  }
1869  return kTRUE;
1870 }
1872 
1874 
1875 
1876  switch(psiCut) {
1877  case 0:
1878  fDoPsiPairCut = kFALSE;
1879  fPsiPairCut = 10000.; //
1880  fDeltaPhiCutMin = -1000.;
1881  fDeltaPhiCutMax = 1000.;
1882 
1883  break;
1884  case 1:
1885  fDoPsiPairCut = kTRUE;
1886  fPsiPairCut = 0.45; // Standard
1887  fDeltaPhiCutMin = 0.0;
1888  fDeltaPhiCutMax = 0.12;
1889  break;
1890  case 2:
1891  fDoPsiPairCut = kTRUE;
1892  fPsiPairCut = 0.60;
1893  fDeltaPhiCutMin = 0.0;
1894  fDeltaPhiCutMax = 0.12;
1895  break;
1896  case 3:
1897  fDoPsiPairCut = kTRUE;
1898  fPsiPairCut = 0.52;
1899  fDeltaPhiCutMin = 0.0;
1900  fDeltaPhiCutMax = 0.12;
1901  break;
1902  case 4:
1903  fDoPsiPairCut = kTRUE;
1904  fPsiPairCut = 0.30;
1905  fDeltaPhiCutMin = 0.0;
1906  fDeltaPhiCutMax = 0.12;
1907  break;
1908  case 5:
1909  fDoPsiPairCut = kTRUE;
1910  fPsiPairCut = 0.60;
1911  fDeltaPhiCutMin = 0.0;
1912  fDeltaPhiCutMax = 0.06;
1913  break;
1914  case 6:
1915  fDoPsiPairCut = kTRUE;
1916  fPsiPairCut = 0.65;
1917  fDeltaPhiCutMin = 0.0;
1918  fDeltaPhiCutMax = 0.14;
1919  break;
1920 
1921 
1922  default:
1923  cout<<"Warning: PsiPairCut not defined "<<fPsiPairCut<<endl;
1924  return kFALSE;
1925  }
1926 
1927  return kTRUE;
1928 }
1929 
1932 
1933 
1934  switch(RCut) {
1935  case 0:
1936  fDoRejectSharedElecGamma = kFALSE;
1937  fRadiusCut = 10000; //
1938  break;
1939  case 1:
1940  fDoRejectSharedElecGamma = kTRUE;
1941  fRadiusCut = 2.0; // cm
1942  break;
1943  case 2:
1944  fDoRejectSharedElecGamma = kTRUE;
1945  fRadiusCut = 3.0; // Standard
1946  break;
1947  case 3:
1948  fDoRejectSharedElecGamma = kTRUE;
1949  fRadiusCut = 4.0; //
1950  break;
1951  case 4:
1952  fDoRejectSharedElecGamma = kTRUE;
1953  fRadiusCut = 5.0; //
1954  break;
1955  case 5:
1956  fDoRejectSharedElecGamma = kTRUE;
1957  fRadiusCut = 10.0; //
1958  break;
1959  case 6:
1960  fDoRejectSharedElecGamma = kTRUE;
1961  fRadiusCut = 15.0; //
1962  break;
1963  default:
1964  cout<<"Warning: PsiPairCut not defined "<<fDoRejectSharedElecGamma<<endl;
1965  return kFALSE;
1966  }
1967 
1968  return kTRUE;
1969 }
1972 
1973  if( !fesdTrackCuts ) {
1974 
1975  cout<<"Warning: AliESDtrackCuts is not initialized "<<endl;
1976  return kFALSE;
1977  }
1978 
1979 
1980  // Set Cut
1981  switch(maxChi2){
1982 
1983  case 0: fesdTrackCuts->SetMaxChi2PerClusterTPC(1e10);
1984  break;
1985  case 1: fesdTrackCuts->SetMaxChi2PerClusterTPC(3.);
1986  break;
1987  case 2: fesdTrackCuts->SetMaxChi2PerClusterTPC(4.);
1988  break;
1989  case 3: fesdTrackCuts->SetMaxChi2PerClusterTPC(5.);
1990  break;
1991  default:
1992  cout<<"Warning: SetMaxChi2PerClusterTPC not defined "<<maxChi2<<endl;
1993  return kFALSE;
1994  }
1995  return kTRUE;
1996 }
1997 
2000 { // Set Cut
2001 
2002  if( !fesdTrackCuts ) {
2003 
2004  cout<<"Warning: AliESDtrackCuts is not initialized "<<endl;
2005  return kFALSE;
2006  }
2007 
2008  switch(maxChi2){
2009  case 0:
2010  fesdTrackCuts->SetMaxChi2PerClusterITS(1e10);
2011  break;
2012  case 1:
2013  fesdTrackCuts->SetMaxChi2PerClusterITS(25.);
2014  break;
2015  case 2:
2016  fesdTrackCuts->SetMaxChi2PerClusterITS(36.);
2017  break;
2018  case 3:
2019  fesdTrackCuts->SetMaxChi2PerClusterITS(49.);
2020  break;
2021  default:
2022  cout<<"Warning: SetMaxChi2PerClusterITS not defined "<<maxChi2<<endl;
2023  return kFALSE;
2024  }
2025  return kTRUE;
2026 }
2027 
2030 { // Set Cut
2031  switch(opc){
2032 
2033  case 0: fDoWeights = kFALSE;
2034  break;
2035  case 1: fDoWeights = kTRUE;
2036  break;
2037  default:
2038  cout<<"Warning: Weights option not defined "<<opc<<endl;
2039  return kFALSE;
2040  }
2041  return kTRUE;
2042 }
2045 { // Set Cut
2046  switch(massCut){
2047 
2048  case 0:
2049 
2050  fMassCutPtMin = -999.; //GeV
2051  fMassCutLowPt = 999.; //GeV/c^2
2052  fMassCutHighPt = 999.; //GeV/c^2
2053  fMassMinCut = -999;
2054  fDoMassCut = kFALSE;
2055  fDoMassMinCut = kFALSE;
2056  break;
2057  case 1:
2058  //fMassCut = 0.135; //GeV/c^2
2059  fMassCutPtMin = -999.; //GeV
2060  fMassCutLowPt = 0.135; //GeV/c^2
2061  fMassCutHighPt = 0.135; //GeV/c^2
2062  fMassMinCut = -999;
2063  fDoMassCut = kTRUE;
2064  fDoMassMinCut = kFALSE;
2065  break;
2066  case 2:
2067  //fMassCut = 0.100; //GeV/c^2
2068  fMassCutPtMin = -999.; //GeV
2069  fMassCutLowPt = 0.100; //GeV/c^2
2070  fMassCutHighPt = 0.100; //GeV/c^2
2071  fMassMinCut = -999;
2072  fDoMassCut = kTRUE;
2073  fDoMassMinCut = kFALSE;
2074  break;
2075  case 3:
2076  /*fMassCut = 0.075; //GeV/c^2 Changed from Feb 25
2077  fMassCutPtMin = -999.; //GeV
2078  fMassCutLowPt = 0.075; //GeV/c^2
2079  fMassCutHighPt = 0.075; //GeV/c^2
2080  fDoMassCut = kTRUE;
2081  fDoMassMinCut = kFALSE;*/
2082  fMassCutPtMin = 1.0; //GeV
2083  fMassCutLowPt = 0.015; //GeV/c^2
2084  fMassCutHighPt = 0.035; //GeV/c^2
2085  fMassMinCut = 0.002;
2086  fDoMassCut = kTRUE;
2087  fDoMassMinCut = kTRUE;
2088  break;
2089  case 4:
2090  //fMassCut = 0.050; //GeV/c^2
2091  fMassCutPtMin = -999.; //GeV
2092  fMassCutLowPt = 0.050; //GeV/c^2
2093  fMassCutHighPt = 0.050; //GeV/c^2
2094  fMassMinCut = -999;
2095  fDoMassCut = kTRUE;
2096  fDoMassMinCut = kFALSE;
2097  break;
2098  case 5:
2099 
2100  fMassCutPtMin = -999.; //GeV
2101  fMassCutLowPt = 0.035; //GeV/c^2
2102  fMassCutHighPt = 0.035; //GeV/c^2
2103  fMassMinCut = -999;
2104  fDoMassCut = kTRUE;
2105  fDoMassMinCut = kFALSE;
2106  break;
2107  case 6:
2108  fMassCutPtMin = -999.; //GeV
2109  fMassCutLowPt = 0.015; //GeV/c^2
2110  fMassCutHighPt = 0.015; //GeV/c^2
2111  fMassMinCut = -999;
2112  fDoMassCut = kTRUE;
2113  fDoMassMinCut = kFALSE;
2114  break;
2115  case 7: fMassCutPtMin = 1.0; //GeV
2116  fMassCutLowPt = 0.015; //GeV/c^2
2117  fMassCutHighPt = 0.035; //GeV/c^2
2118  fMassMinCut = -999;
2119  fDoMassCut = kTRUE;
2120  fDoMassMinCut = kFALSE;
2121  break;
2122  case 8: fMassCutPtMin = 1.0; //GeV
2123  fMassCutLowPt = 0.015; //GeV/c^2
2124  fMassCutHighPt = 0.050; //GeV/c^2
2125  fMassMinCut = -999;
2126  fDoMassCut = kTRUE;
2127  fDoMassMinCut = kFALSE;
2128  break;
2129  case 9: fMassCutPtMin = 1.0; //GeV
2130  fMassCutLowPt = 0.025; //GeV/c^2
2131  fMassCutHighPt = 0.035; //GeV/c^2
2132  fMassMinCut = -999;
2133  fDoMassCut = kTRUE;
2134  fDoMassMinCut = kFALSE;
2135  break;
2136  default:
2137  cout<<"Warning: MassCut not defined "<<massCut<<endl;
2138  return kFALSE;
2139  }
2140  return kTRUE;
2141 }
2143 {// Set Cut
2144  switch(useMCPSmearing){
2145 
2146  case 0:
2147  fUseVPhotonMCPSmearing=kFALSE;
2148  fUseElectronMCPSmearing=kFALSE;
2149  break;
2150  case 1:
2151  fUseVPhotonMCPSmearing=kTRUE;
2152  fUseElectronMCPSmearing=kFALSE;
2153  break;
2154  case 2:
2155  fUseVPhotonMCPSmearing=kFALSE;
2157  break;
2158 
2159 
2160  default: cout<<"Warning: Virtual Photon SMearing not defined "<<useMCPSmearing<<endl;
2161  return kFALSE;
2162 
2163  }
2164 
2165  return kTRUE;
2166 }
2167 
2168 
2171  // returns TString with current cut number
2172  return fCutStringRead;
2173 }
2174 
2175 
2178  //Create and return standard 2010 PbPb cuts
2179  AliDalitzElectronCuts *cuts=new AliDalitzElectronCuts("StandardCuts2010PbPb","StandardCuts2010PbPb");
2180  if(!cuts->InitializeCutsFromCutString("9069640364102")){
2181  cout<<"Warning: Initialization of Standardcuts2010PbPb failed"<<endl;}
2182  return cuts;
2183 }
2184 
2187  //Create and return standard 2010 PbPb cuts
2188  AliDalitzElectronCuts *cuts=new AliDalitzElectronCuts("StandardCuts2010pp","StandardCuts2010pp");
2189 
2190  if(!cuts->InitializeCutsFromCutString("9069640364102")){
2191  cout<<"Warning: Initialization of Standardcuts2010pp failed"<<endl;}
2192  return cuts;
2193 }
2194 
Bool_t SetMaxChi2PerClusterITS(Int_t maxChi2)
Bool_t ElectronIsSelectedMC(Int_t labelParticle, AliMCEvent *mcEvent)
Bool_t UpdateCutString(cutIds cutID, Int_t value)
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)