]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoESDTrackCut.h
Changes to the AliFemto code for DEtaDPhi angular analysis. Adding Nsigma values...
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / AliFemtoUser / AliFemtoESDTrackCut.h
1 ///////////////////////////////////////////////////////////////////////////
2 //                                                                       //
3 // AliFemtoESDTrackCut: A basic track cut that used information from     //
4 // ALICE ESD to accept or reject the track.                             ////////////////////////////////////////////////
5 #include "AliESDtrackCuts.h"
6
7 #ifndef ALIFEMTOESDTRACKCUT_H
8 #define ALIFEMTOESDTRACKCUT_H
9
10 //#ifndef StMaker_H
11 //#include "StMaker.h"
12 //#endif
13
14 #include "AliESDtrackCuts.h" //for enum with ITS layers
15 #include "AliFemtoTrackCut.h"
16
17
18 class AliFemtoESDTrackCut : public AliFemtoTrackCut
19 {
20   public:
21
22   enum PIDMethodType {knSigma=0, kContour=1};
23   typedef enum PIDMethodType ReadPIDMethodType;
24
25   AliFemtoESDTrackCut();
26   virtual ~AliFemtoESDTrackCut();
27
28   virtual bool Pass(const AliFemtoTrack* aTrack);
29
30   virtual AliFemtoString Report();
31   virtual TList *ListSettings();
32   virtual AliFemtoParticleType Type(){return hbtTrack;}
33
34   void SetPt(const float& lo, const float& hi);
35   void SetRapidity(const float& lo, const float& hi);
36   void SetEta(const float& lo, const float& hi);
37   void SetCharge(const int& ch);
38   void SetPidProbElectron(const float& lo, const float& hi);
39   void SetPidProbPion(const float& lo, const float& hi);
40   void SetPidProbKaon(const float& lo, const float& hi);
41   void SetPidProbProton(const float& lo, const float& hi);
42   void SetPidProbMuon(const float& lo, const float& hi);
43   void SetLabel(const bool& flag);
44   void SetStatus(const long& w);
45   void SetminTPCclsF(const short& s);
46   void SetminTPCncls(const short& s);
47   void SetminITScls(const int& s);
48   void SetRemoveKinks(const bool& flag);
49   void SetRemoveITSFake(const bool& flag);
50   void SetMaxITSChiNdof(const float& maxchi);
51   void SetMaxTPCChiNdof(const float& maxchi);
52   void SetMaxSigmaToVertex(const float& maxsig);
53   void SetMaxImpactXY(const float& maximpxy);
54   void SetMinImpactXY(const float& minimpxy);
55   void SetMaxImpactZ(const float& maximpz);
56   void SetMaxImpactXYPtDep(const float& maxoff, const float& maxnrm, const float& maxpow);
57   void SetMostProbablePion();
58   void SetMostProbableKaon();
59   void SetMostProbableProton();
60   void SetLeastProbableProton();
61   void SetNoMostProbable();
62   void SetPIDMethod(ReadPIDMethodType newMethod);
63   void SetNsigmaTPCTOF(Bool_t);
64   void SetNsigmaTPConly(Bool_t);
65   void SetNsigma(Double_t);
66   void SetClusterRequirementITS(AliESDtrackCuts::Detector det, AliESDtrackCuts::ITSClusterRequirement req = AliESDtrackCuts::kOff);
67
68   void SetMomRangeTOFpidIs(const float& minp, const float& maxp);
69   void SetMomRangeTPCpidIs(const float& minp, const float& maxp);
70   void SetMomRangeITSpidIs(const float& minp, const float& maxp);
71   void SetElectronRejection(Bool_t);
72
73  private:   // here are the quantities I want to cut on...
74
75   int               fCharge;             // particle charge
76   float             fPt[2];              // bounds for transverse momentum
77   float             fRapidity[2];        // bounds for rapidity
78   float             fEta[2];             // bounds for pseudorapidity
79   float             fPidProbElectron[2]; // bounds for electron probability
80   float             fPidProbPion[2];     // bounds for pion probability
81   float             fPidProbKaon[2];     // bounds for kaon probability
82   float             fPidProbProton[2];   // bounds for proton probability
83   float             fPidProbMuon[2];     // bounds for muon probability
84
85   AliESDtrackCuts::ITSClusterRequirement fCutClusterRequirementITS[3];  // detailed ITS cluster requirements for (SPD, SDD, SSD) - from AliESDtrackcuts!
86   bool              fLabel;              // if true label<0 will not pass throught
87   long              fStatus;             // staus flag
88   ReadPIDMethodType fPIDMethod;          // which PID mehod to use. 0 - nsgima, 1 - contour
89   Bool_t            fNsigmaTPCTOF;       // true if squared nsigma from TPC and TOF, false if separately from TPC and TOF
90   Bool_t            fNsigmaTPConly;       // true if nsigma from TPC only
91   Double_t            fNsigma;       // number of sigmas - 3 by default
92
93   short             fminTPCclsF;         // min number of findable clusters in the TPC
94   short             fminTPCncls;         // min number of clusters in the TPC
95   int               fminITScls;          // min number of clusters assigned in the ITS
96   float             fMaxITSchiNdof;      // maximum allowed chi2/ndof for ITS clusters
97   float             fMaxTPCchiNdof;      // maximum allowed chi2/ndof for TPC clusters
98   float             fMaxSigmaToVertex;   // maximum allowed sigma to primary vertex
99   long              fNTracksPassed;      // passed tracks count
100   long              fNTracksFailed;      // failed tracks count
101   bool              fRemoveKinks;        // if true particles with any kink label will not pass
102   bool              fRemoveITSFake;      // if true particles with ITS fake flag will not pass
103   int               fMostProbable;       // this particle type is required to be most probable
104
105   float             fMaxImpactXY;        // Max XY impact parameter
106   float             fMinImpactXY;        // Max XY impact parameter
107   float             fMaxImpactZ;         // Max Z impact parameter
108
109   float             fMaxImpactXYPtOff;   // Max XY DCA Pt dependent offset
110   float             fMaxImpactXYPtNrm;   // Max XY DCA Pt dependent normalization
111   float             fMaxImpactXYPtPow;   // Max XY DCA Pt dependent power
112
113   float             fMinPforTOFpid;  // momentum from which TOF PID is requested
114   float             fMaxPforTOFpid;  // momentum till which TOF PID is requested
115   float             fMinPforTPCpid;  // momentum from which TPC PID is requested
116   float             fMaxPforTPCpid;  // momentum till which TPC PID is requested
117   float             fMinPforITSpid;  // momentum from which ITS PID is requested
118   float             fMaxPforITSpid;  // momentum till which ITS PID is requested
119   bool fElectronRejection;
120
121   float PidFractionElectron(float mom) const;
122   float PidFractionPion(float mom) const;
123   float PidFractionKaon(float mom) const;
124   float PidFractionProton(float mom) const;
125
126   bool IsPionTPCdEdx(float mom, float dEdx);
127   bool IsKaonTPCdEdx(float mom, float dEdx);
128   bool IsProtonTPCdEdx(float mom, float dEdx);
129
130   bool IsPionTOFTime(float mom, float ttof);
131   bool IsKaonTOFTime(float mom, float ttof);
132   bool IsProtonTOFTime(float mom, float ttof);
133
134   bool IsKaonTPCdEdxNSigma(float mom, float nsigma);
135   bool IsKaonTOFNSigma(float mom, float nsigma);
136   bool IsKaonNSigma(float mom, float nsigmaTPC, float nsigmaTOF);
137   bool IsPionNSigma(float mom, float nsigmaTPC, float nsigmaTOF);
138   bool IsProtonNSigma(float mom, float nsigmaTPC, float nsigmaTOF);
139   bool IsElectron(float nsigmaTPCE, float nsigmaTPCPi,float nsigmaTPCK, float nsigmaTPCP);
140
141   Bool_t CheckITSClusterRequirement(AliESDtrackCuts::ITSClusterRequirement req, Bool_t clusterL1, Bool_t clusterL2); //the same as in AliESDtrackCuts
142
143
144 #ifdef __ROOT__
145   ClassDef(AliFemtoESDTrackCut, 1)
146 #endif
147     };
148
149
150 inline void AliFemtoESDTrackCut::SetPt(const float& lo, const float& hi){fPt[0]=lo; fPt[1]=hi;}
151 inline void AliFemtoESDTrackCut::SetRapidity(const float& lo,const float& hi){fRapidity[0]=lo; fRapidity[1]=hi;}
152 inline void AliFemtoESDTrackCut::SetEta(const float& lo,const float& hi){fEta[0]=lo; fEta[1]=hi;}
153 inline void AliFemtoESDTrackCut::SetCharge(const int& ch){fCharge = ch;}
154 inline void AliFemtoESDTrackCut::SetPidProbElectron(const float& lo,const float& hi){fPidProbElectron[0]=lo; fPidProbElectron[1]=hi;}
155 inline void AliFemtoESDTrackCut::SetPidProbPion(const float& lo,const float& hi){fPidProbPion[0]=lo; fPidProbPion[1]=hi;}
156 inline void AliFemtoESDTrackCut::SetPidProbKaon(const float& lo,const float& hi){fPidProbKaon[0]=lo; fPidProbKaon[1]=hi;}
157 inline void AliFemtoESDTrackCut::SetPidProbProton
158 (const float& lo,const float& hi){fPidProbProton[0]=lo; fPidProbProton[1]=hi;}
159 inline void AliFemtoESDTrackCut::SetPidProbMuon(const float& lo,const float& hi){fPidProbMuon[0]=lo; fPidProbMuon[1]=hi;}
160 inline void AliFemtoESDTrackCut::SetLabel(const bool& flag){fLabel=flag;}
161 inline void AliFemtoESDTrackCut::SetStatus(const long& status){fStatus=status;}
162 inline void AliFemtoESDTrackCut::SetminTPCclsF(const short& minTPCclsF){fminTPCclsF=minTPCclsF;}
163 inline void AliFemtoESDTrackCut::SetminTPCncls(const short& s){fminTPCncls=s;}
164 inline void AliFemtoESDTrackCut::SetminITScls(const int& minITScls){fminITScls=minITScls;}
165 inline void AliFemtoESDTrackCut::SetMostProbablePion() { fMostProbable = 2; }
166 inline void AliFemtoESDTrackCut::SetMostProbableKaon() { fMostProbable = 3; }
167 inline void AliFemtoESDTrackCut::SetMostProbableProton() { fMostProbable = 4; }
168 inline void AliFemtoESDTrackCut::SetLeastProbableProton() { fMostProbable = 5; }
169 inline void AliFemtoESDTrackCut::SetNoMostProbable() { fMostProbable = 0; }
170 inline void AliFemtoESDTrackCut::SetMaxITSChiNdof(const float& maxchi) { fMaxITSchiNdof = maxchi; }
171 inline void AliFemtoESDTrackCut::SetMaxTPCChiNdof(const float& maxchi) { fMaxTPCchiNdof = maxchi; }
172 inline void AliFemtoESDTrackCut::SetMaxSigmaToVertex(const float& maxsig) { fMaxSigmaToVertex = maxsig; }
173 inline void AliFemtoESDTrackCut::SetMaxImpactXY(const float& maximpxy) { fMaxImpactXY = maximpxy; }
174 inline void AliFemtoESDTrackCut::SetMinImpactXY(const float& minimpxy) { fMinImpactXY = minimpxy; }
175 inline void AliFemtoESDTrackCut::SetMaxImpactXYPtDep(const float& maxoff, const float& maxnrm, const float& maxpow) { fMaxImpactXYPtOff = maxoff; fMaxImpactXYPtNrm = maxnrm; fMaxImpactXYPtPow = maxpow; }
176 inline void AliFemtoESDTrackCut::SetMaxImpactZ(const float& maximpz) { fMaxImpactZ = maximpz; }
177 inline void AliFemtoESDTrackCut::SetElectronRejection(Bool_t setE) { fElectronRejection = setE; }
178
179 #endif