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