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