1 #ifndef ALIDIELECTRONPID_H
2 #define ALIDIELECTRONPID_H
4 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 //#############################################################
11 //# Class AliDielectronPID #
14 //# Anton Andronic, GSI / A.Andronic@gsi.de #
15 //# Ionut C. Arsene, GSI / I.C.Arsene@gsi.de #
16 //# Julian Book, Uni Ffm / Julian.Book@cern.ch #
17 //# Frederick Kramer, Uni Ffm, / Frederick.Kramer@cern.ch #
18 //# Magnus Mager, CERN / Magnus.Mager@cern.ch #
19 //# WooJin J. Park, GSI / W.J.Park@gsi.de #
20 //# Jens Wiechula, Uni HD / Jens.Wiechula@cern.ch #
22 //#############################################################
25 #include <AliAODTrack.h>
26 #include <AliAODPid.h>
28 #include <AliAnalysisCuts.h>
37 class AliDielectronPID : public AliAnalysisCuts {
39 enum DetType {kITS, kTPC, kTRD, kTOF};
40 enum PIDbitTupe {kIgnore=0, kRequire, kIfAvailable};
43 AliDielectronPID(const char*name, const char* title);
45 virtual ~AliDielectronPID();
47 void AddCut(DetType det, AliPID::EParticleType type, Double_t nSigmaLow, Double_t nSigmaUp=-99999.,
48 Double_t pMin=0, Double_t pMax=0, Bool_t exclude=kFALSE, UInt_t pidBitType=AliDielectronPID::kRequire);
50 void AddCut(DetType det, AliPID::EParticleType type, Double_t nSigmaLow, TF1 * const funUp,
51 Double_t pMin=0, Double_t pMax=0, Bool_t exclude=kFALSE, UInt_t pidBitType=AliDielectronPID::kRequire);
53 void AddCut(DetType det, AliPID::EParticleType type, TF1 * const funLow, Double_t nSigmaUp,
54 Double_t pMin=0, Double_t pMax=0, Bool_t exclude=kFALSE, UInt_t pidBitType=AliDielectronPID::kRequire);
56 void AddCut(DetType det, AliPID::EParticleType type, TF1 * const funLow, TF1 * const funUp,
57 Double_t pMin=0, Double_t pMax=0, Bool_t exclude=kFALSE, UInt_t pidBitType=AliDielectronPID::kRequire);
59 void SetDefaults(Int_t def);
62 //Analysis cuts interface
64 virtual Bool_t IsSelected(TObject* track);
65 virtual Bool_t IsSelected(TList* /* list */ ) {return kFALSE;}
67 static void SetCorrGraph(TGraph * const gr) { fgFitCorr=gr; }
68 static void SetCorrVal(Double_t run);
69 static Double_t GetCorrVal() { return fgCorr; }
70 static TGraph *GetCorrGraph() { return fgFitCorr; }
75 DetType fDetType[kNmaxPID]; //detector type of nsigma cut
76 AliPID::EParticleType fPartType[kNmaxPID]; //particle type
77 Float_t fNsigmaLow[kNmaxPID]; //lower nsigma bound
78 Float_t fNsigmaUp[kNmaxPID]; //upper nsigma bound
79 Double_t fPmin[kNmaxPID]; //lower momentum
80 Double_t fPmax[kNmaxPID]; //upper momentum
81 Bool_t fExclude[kNmaxPID]; //use as exclusion band
82 TF1 *fFunUpperCut[kNmaxPID];//use function as upper cut
83 TF1 *fFunLowerCut[kNmaxPID];//use function as lower cut
84 UChar_t fNcuts; //number of cuts
85 UChar_t fRequirePIDbit[kNmaxPID]; //How to make use of the pid bit (see)
87 AliESDpid *fESDpid; //! esd pid object
88 AliAODpidUtil *fAODpidUtil; //! AOD pid object
90 static TGraph *fgFitCorr; //spline fit object to correct the nsigma deviation in the TPC electron band
91 static Double_t fgCorr; //!correction value for current run. Set if fgFitCorr is set and SetCorrVal(run)
94 Bool_t IsSelectedITS(AliVTrack * const part, Int_t icut);
95 Bool_t IsSelectedTPC(AliVTrack * const part, Int_t icut);
96 Bool_t IsSelectedTRD(AliVTrack * const part, Int_t icut);
97 Bool_t IsSelectedTOF(AliVTrack * const part, Int_t icut);
99 AliDielectronPID(const AliDielectronPID &c);
100 AliDielectronPID &operator=(const AliDielectronPID &c);
102 ClassDef(AliDielectronPID,3) // Dielectron PID