1 ///////////////////////////////////////////////////////////////////////////
3 // AliFemtoESDTrackCut: A basic track cut that used information from //
4 // ALICE ESD to accept or reject the track. //
5 // Enables the selection on charge, transverse momentum, rapidity, //
6 // pid probabilities, number of ITS and TPC clusters //
7 // Author: Marek Chojnacki (WUT), mchojnacki@knf.pw.edu.pl //
9 ///////////////////////////////////////////////////////////////////////////
11 #ifndef ALIFEMTOESDTRACKCUT_H
12 #define ALIFEMTOESDTRACKCUT_H
15 //#include "StMaker.h"
18 #include "AliFemtoTrackCut.h"
20 class AliFemtoESDTrackCut : public AliFemtoTrackCut
24 enum PIDMethodType {knSigma=0, kContour=1};
25 typedef enum PIDMethodType ReadPIDMethodType;
27 AliFemtoESDTrackCut();
28 virtual ~AliFemtoESDTrackCut();
30 virtual bool Pass(const AliFemtoTrack* aTrack);
32 virtual AliFemtoString Report();
33 virtual TList *ListSettings();
34 virtual AliFemtoParticleType Type(){return hbtTrack;}
36 void SetPt(const float& lo, const float& hi);
37 void SetRapidity(const float& lo, const float& hi);
38 void SetEta(const float& lo, const float& hi);
39 void SetCharge(const int& ch);
40 void SetPidProbElectron(const float& lo, const float& hi);
41 void SetPidProbPion(const float& lo, const float& hi);
42 void SetPidProbKaon(const float& lo, const float& hi);
43 void SetPidProbProton(const float& lo, const float& hi);
44 void SetPidProbMuon(const float& lo, const float& hi);
45 void SetLabel(const bool& flag);
46 void SetStatus(const long& w);
47 void SetminTPCclsF(const short& s);
48 void SetminTPCncls(const short& s);
49 void SetminITScls(const int& s);
50 void SetRemoveKinks(const bool& flag);
51 void SetRemoveITSFake(const bool& flag);
52 void SetMaxITSChiNdof(const float& maxchi);
53 void SetMaxTPCChiNdof(const float& maxchi);
54 void SetMaxSigmaToVertex(const float& maxsig);
55 void SetMaxImpactXY(const float& maximpxy);
56 void SetMaxImpactZ(const float& maximpz);
57 void SetMaxImpactXYPtDep(const float& maxoff, const float& maxnrm, const float& maxpow);
58 void SetMostProbablePion();
59 void SetMostProbableKaon();
60 void SetMostProbableProton();
61 void SetNoMostProbable();
62 void SetPIDMethod(ReadPIDMethodType newMethod);
64 void SetMomRangeTOFpidIs(const float& minp, const float& maxp);
65 void SetMomRangeTPCpidIs(const float& minp, const float& maxp);
66 void SetMomRangeITSpidIs(const float& minp, const float& maxp);
68 private: // here are the quantities I want to cut on...
70 int fCharge; // particle charge
71 float fPt[2]; // bounds for transverse momentum
72 float fRapidity[2]; // bounds for rapidity
73 float fEta[2]; // bounds for pseudorapidity
74 float fPidProbElectron[2]; // bounds for electron probability
75 float fPidProbPion[2]; // bounds for pion probability
76 float fPidProbKaon[2]; // bounds for kaon probability
77 float fPidProbProton[2]; // bounds for proton probability
78 float fPidProbMuon[2]; // bounds for muon probability
79 bool fLabel; // if true label<0 will not pass throught
80 long fStatus; // staus flag
81 ReadPIDMethodType fPIDMethod; // which PID mehod to use. 0 - nsgima, 1 - contour
83 short fminTPCclsF; // min number of findable clusters in the TPC
84 short fminTPCncls; // min number of clusters in the TPC
85 int fminITScls; // min number of clusters assigned in the ITS
86 float fMaxITSchiNdof; // maximum allowed chi2/ndof for ITS clusters
87 float fMaxTPCchiNdof; // maximum allowed chi2/ndof for TPC clusters
88 float fMaxSigmaToVertex; // maximum allowed sigma to primary vertex
89 long fNTracksPassed; // passed tracks count
90 long fNTracksFailed; // failed tracks count
91 bool fRemoveKinks; // if true particles with any kink label will not pass
92 bool fRemoveITSFake; // if true particles with ITS fake flag will not pass
93 int fMostProbable; // this particle type is required to be most probable
95 float fMaxImpactXY; // Max XY impact parameter
96 float fMaxImpactZ; // Max Z impact parameter
98 float fMaxImpactXYPtOff; // Max XY DCA Pt dependent offset
99 float fMaxImpactXYPtNrm; // Max XY DCA Pt dependent normalization
100 float fMaxImpactXYPtPow; // Max XY DCA Pt dependent power
102 float fMinPforTOFpid; // momentum from which TOF PID is requested
103 float fMaxPforTOFpid; // momentum till which TOF PID is requested
104 float fMinPforTPCpid; // momentum from which TPC PID is requested
105 float fMaxPforTPCpid; // momentum till which TPC PID is requested
106 float fMinPforITSpid; // momentum from which ITS PID is requested
107 float fMaxPforITSpid; // momentum till which ITS PID is requested
109 float PidFractionElectron(float mom) const;
110 float PidFractionPion(float mom) const;
111 float PidFractionKaon(float mom) const;
112 float PidFractionProton(float mom) const;
114 bool IsPionTPCdEdx(float mom, float dEdx);
115 bool IsKaonTPCdEdx(float mom, float dEdx);
116 bool IsProtonTPCdEdx(float mom, float dEdx);
118 bool IsPionTOFTime(float mom, float ttof);
119 bool IsKaonTOFTime(float mom, float ttof);
120 bool IsProtonTOFTime(float mom, float ttof);
122 bool IsKaonTPCdEdxNSigma(float mom, float nsigma);
123 bool IsKaonTOFNSigma(float mom, float nsigma);
124 bool IsKaonNSigma(float mom, float nsigmaTPC, float nsigmaTOF);
125 bool IsPionNSigma(float mom, float nsigmaTPC, float nsigmaTOF);
126 bool IsProtonNSigma(float mom, float nsigmaTPC, float nsigmaTOF);
129 ClassDef(AliFemtoESDTrackCut, 1)
134 inline void AliFemtoESDTrackCut::SetPt(const float& lo, const float& hi){fPt[0]=lo; fPt[1]=hi;}
135 inline void AliFemtoESDTrackCut::SetRapidity(const float& lo,const float& hi){fRapidity[0]=lo; fRapidity[1]=hi;}
136 inline void AliFemtoESDTrackCut::SetEta(const float& lo,const float& hi){fEta[0]=lo; fEta[1]=hi;}
137 inline void AliFemtoESDTrackCut::SetCharge(const int& ch){fCharge = ch;}
138 inline void AliFemtoESDTrackCut::SetPidProbElectron(const float& lo,const float& hi){fPidProbElectron[0]=lo; fPidProbElectron[1]=hi;}
139 inline void AliFemtoESDTrackCut::SetPidProbPion(const float& lo,const float& hi){fPidProbPion[0]=lo; fPidProbPion[1]=hi;}
140 inline void AliFemtoESDTrackCut::SetPidProbKaon(const float& lo,const float& hi){fPidProbKaon[0]=lo; fPidProbKaon[1]=hi;}
141 inline void AliFemtoESDTrackCut::SetPidProbProton(const float& lo,const float& hi){fPidProbProton[0]=lo; fPidProbProton[1]=hi;}
142 inline void AliFemtoESDTrackCut::SetPidProbMuon(const float& lo,const float& hi){fPidProbMuon[0]=lo; fPidProbMuon[1]=hi;}
143 inline void AliFemtoESDTrackCut::SetLabel(const bool& flag){fLabel=flag;}
144 inline void AliFemtoESDTrackCut::SetStatus(const long& status){fStatus=status;}
145 inline void AliFemtoESDTrackCut::SetminTPCclsF(const short& minTPCclsF){fminTPCclsF=minTPCclsF;}
146 inline void AliFemtoESDTrackCut::SetminTPCncls(const short& s){fminTPCncls=s;}
147 inline void AliFemtoESDTrackCut::SetminITScls(const int& minITScls){fminITScls=minITScls;}
148 inline void AliFemtoESDTrackCut::SetMostProbablePion() { fMostProbable = 2; }
149 inline void AliFemtoESDTrackCut::SetMostProbableKaon() { fMostProbable = 3; }
150 inline void AliFemtoESDTrackCut::SetMostProbableProton() { fMostProbable = 4; }
151 inline void AliFemtoESDTrackCut::SetNoMostProbable() { fMostProbable = 0; }
152 inline void AliFemtoESDTrackCut::SetMaxITSChiNdof(const float& maxchi) { fMaxITSchiNdof = maxchi; }
153 inline void AliFemtoESDTrackCut::SetMaxTPCChiNdof(const float& maxchi) { fMaxTPCchiNdof = maxchi; }
154 inline void AliFemtoESDTrackCut::SetMaxSigmaToVertex(const float& maxsig) { fMaxSigmaToVertex = maxsig; }
155 inline void AliFemtoESDTrackCut::SetMaxImpactXY(const float& maximpxy) { fMaxImpactXY = maximpxy; }
156 inline void AliFemtoESDTrackCut::SetMaxImpactXYPtDep(const float& maxoff, const float& maxnrm, const float& maxpow) { fMaxImpactXYPtOff = maxoff; fMaxImpactXYPtNrm = maxnrm; fMaxImpactXYPtPow = maxpow; }
157 inline void AliFemtoESDTrackCut::SetMaxImpactZ(const float& maximpz) { fMaxImpactZ = maximpz; }