]>
Commit | Line | Data |
---|---|---|
daf66719 | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. */ |
2 | /* See cxx source for full Copyright notice */ | |
3 | /* $Id$ */ | |
4 | ||
5 | // AliFlowTrackESDCuts: | |
6 | // A cut class for ESD, AOD and MC particles for the flow framework | |
7 | // author: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch) | |
86a97121 | 8 | // mods: Redmer A. Bertens (rbertens@cern.ch) |
daf66719 | 9 | |
10 | #ifndef ALIFLOWTRACKCUTS_H | |
11 | #define ALIFLOWTRACKCUTS_H | |
12 | ||
32b846cd | 13 | #include <TMatrix.h> |
499fe731 | 14 | #include <TList.h> |
daf66719 | 15 | #include "AliFlowTrackSimpleCuts.h" |
cc0afcfc | 16 | #include "AliFlowTrackSimple.h" |
daf66719 | 17 | #include "AliESDtrackCuts.h" |
18 | #include "TMCProcess.h" | |
1ff4bda1 | 19 | #include "AliESDtrack.h" |
2e5052c5 | 20 | #include "AliMuonTrackCuts.h" // XZhang 20120604 |
32b846cd | 21 | #include "AliPID.h" |
aab6527a | 22 | #include "AliESDpid.h" |
67006c99 | 23 | #include "TCutG.h" |
24 | ||
daf66719 | 25 | |
499fe731 | 26 | class TBrowser; |
84b44ed4 | 27 | class TArrayD; |
daf66719 | 28 | class AliVParticle; |
29 | class AliMCParticle; | |
30 | class AliFlowTrack; | |
31 | class AliMCEvent; | |
68e9b988 | 32 | class AliInputEventHandler; |
daf66719 | 33 | class AliVEvent; |
12b2b8bc | 34 | class AliMultiplicity; |
2e5052c5 | 35 | class AliAODTracklets; // XZhang 20120615 |
42655d16 | 36 | class AliAODTrack; |
37 | class AliESDtrack; | |
d148af7e | 38 | class AliESDPmdTrack; |
cc0afcfc | 39 | class AliFlowBayesianPID; |
8fa6a5fa MK |
40 | class AliESDkink; |
41 | class AliESDv0; | |
42 | class AliESDVZERO; | |
043e9010 | 43 | class AliPIDResponse; |
daf66719 | 44 | |
45 | class AliFlowTrackCuts : public AliFlowTrackSimpleCuts { | |
46 | ||
47 | public: | |
48 | AliFlowTrackCuts(); | |
441ea1cf | 49 | AliFlowTrackCuts(const char* name); |
daf66719 | 50 | AliFlowTrackCuts(const AliFlowTrackCuts& someCuts); |
51 | AliFlowTrackCuts& operator=(const AliFlowTrackCuts& someCuts); | |
52 | virtual ~AliFlowTrackCuts(); | |
53 | ||
6c9a4feb | 54 | static AliFlowTrackCuts* GetAODTrackCutsForFilterBit(UInt_t bit = 1, TString suffix = ""); |
1a80f9f6 | 55 | static AliFlowTrackCuts* GetStandardTPCStandaloneTrackCuts(); |
56 | static AliFlowTrackCuts* GetStandardTPCStandaloneTrackCuts2010(); | |
a0241c3a | 57 | static AliFlowTrackCuts* GetStandardGlobalTrackCuts2010(); |
daf66719 | 58 | static AliFlowTrackCuts* GetStandardITSTPCTrackCuts2009(Bool_t selPrimaries=kTRUE); |
1a80f9f6 | 59 | static AliFlowTrackCuts* GetStandardVZEROOnlyTrackCuts(); |
54dd223b | 60 | static AliFlowTrackCuts* GetStandardVZEROOnlyTrackCuts2010(); |
61 | static AliFlowTrackCuts* GetStandardVZEROOnlyTrackCuts2011(); | |
84714904 | 62 | static AliFlowTrackCuts* GetStandardMuonTrackCuts(Bool_t isMC=kFALSE, Int_t passN=2); // XZhang 20120604 |
daf66719 | 63 | |
a0241c3a | 64 | Int_t Count(AliVEvent* event=NULL); |
65 | ||
2b1eaa10 | 66 | enum trackParameterType { kMC, |
67 | kGlobal, | |
1a80f9f6 | 68 | kTPCstandalone, |
69 | kSPDtracklet, | |
22289738 | 70 | kPMD, |
dd294bb6 | 71 | kV0, //neutral reconstructed v0 particle |
8fa6a5fa MK |
72 | kVZERO, //forward VZERO detector |
73 | kMUON, // XZhang 20120604 | |
7d7bf930 | 74 | kKink, |
6c9a4feb | 75 | kAODFilterBit, |
76 | kUserA, // reserved for custom cuts | |
77 | kUserB // reserved for custom cuts | |
2b1eaa10 | 78 | }; |
79 | enum trackParameterMix { kPure, | |
80 | kTrackWithMCkine, | |
81 | kTrackWithMCPID, | |
82 | kTrackWithMCpt, | |
d79d61fb | 83 | kTrackWithPtFromFirstMother, |
8fa6a5fa MK |
84 | kTrackWithTPCInnerParams, |
85 | kTrackWithTPCstandalone | |
2b1eaa10 | 86 | }; |
87 | enum PIDsource { | |
88 | kTPCpid, // default TPC pid (via GetTPCpid) | |
89 | kTOFpid, // default TOF pid (via GetTOFpid) | |
90 | kTOFbayesian, // TOF bayesian pid (F.Noferini) | |
91 | kTOFbeta, // asymmetric cuts of TOF beta signal | |
1a80f9f6 | 92 | kTPCdedx, // asymmetric cuts of TPC dedx signal |
93 | kTOFbetaSimple, //simple TOF only cut | |
8eca5d19 | 94 | kTPCbayesian, //bayesian cutTPC |
d0ce6147 | 95 | kTPCNuclei, // added by Natasha for Nuclei |
67006c99 | 96 | kTPCTOFNsigma, // simple cut on combined tpc tof nsigma |
97 | kTPCTOFNsigmaPuritybased // purity>0.7 cut on combined tpc tof nsigma | |
8eca5d19 | 98 | }; |
daf66719 | 99 | |
100 | //setters (interface to AliESDtrackCuts) | |
67006c99 | 101 | Int_t MaxSharedITSClusterCuts(Int_t maxITSclusterShared, AliESDtrack* track); |
102 | Double_t MaxChi2perITSClusterCuts(Double_t maxITSChi2, AliESDtrack* track); | |
103 | ||
104 | void SetMaxSharedITSCluster(Int_t b){fMaxITSclusterShared = b;} | |
105 | void SetMaxChi2perITSCluster(Double_t b){fMaxITSChi2 = b;} | |
106 | ||
42655d16 | 107 | void SetMinNClustersTPC( Int_t a ) {fCutNClustersTPC=kTRUE; fNClustersTPCMin=a;} |
108 | void SetMinNClustersITS( Int_t a ) {fCutNClustersITS=kTRUE; fNClustersITSMin=a;} | |
daf66719 | 109 | void SetClusterRequirementITS( AliESDtrackCuts::Detector det, |
110 | AliESDtrackCuts::ITSClusterRequirement req = AliESDtrackCuts::kOff ) | |
441ea1cf | 111 | { InitESDcuts(); fAliESDtrackCuts->SetClusterRequirementITS(det,req); } |
2948ac5a | 112 | void SetMaxChi2PerClusterTPC( Float_t a ) {fMaxChi2PerClusterTPC=a;fCutChi2PerClusterTPC=kTRUE;} |
113 | void SetMinChi2PerClusterTPC( Float_t a ) {fMinChi2PerClusterTPC=a;fCutChi2PerClusterTPC=kTRUE;} | |
441ea1cf | 114 | void SetMaxChi2PerClusterITS( Float_t a ) {InitESDcuts(); fAliESDtrackCuts->SetMaxChi2PerClusterITS(a);} |
115 | void SetRequireTPCRefit( Bool_t a ) {InitESDcuts(); fAliESDtrackCuts->SetRequireTPCRefit(a);} | |
116 | void SetRequireTPCStandAlone( Bool_t a) {InitESDcuts(); fAliESDtrackCuts->SetRequireTPCStandAlone(a);} | |
117 | void SetRequireITSRefit( Bool_t a ) {InitESDcuts(); fAliESDtrackCuts->SetRequireITSRefit(a);} | |
118 | void SetRequireITSStandAlone( Bool_t a) {InitESDcuts(); fAliESDtrackCuts->SetRequireITSStandAlone(a);} | |
119 | void SetAcceptKinkDaughters( Bool_t a ) {InitESDcuts(); fAliESDtrackCuts->SetAcceptKinkDaughters(a);} | |
a63303bd | 120 | void SetMaxDCAToVertexZ( Float_t a ) {InitESDcuts(); fAliESDtrackCuts->SetMaxDCAToVertexZ(a);fCutDCAToVertexZ=kTRUE;} |
121 | void SetMaxDCAToVertexXY( Float_t a ) {InitESDcuts(); fAliESDtrackCuts->SetMaxDCAToVertexXY(a);fCutDCAToVertexXY=kTRUE;} | |
441ea1cf | 122 | void SetMaxDCAToVertexXYPtDep( const char* a ) {InitESDcuts(); fAliESDtrackCuts->SetMaxDCAToVertexXYPtDep(a);} |
123 | void SetRequireSigmaToVertex(Bool_t a) {InitESDcuts(); fAliESDtrackCuts->SetRequireSigmaToVertex(a);} | |
124 | void SetMaxNsigmaToVertex(Float_t sigma=1e10) {InitESDcuts(); fAliESDtrackCuts->SetMaxNsigmaToVertex(sigma); } | |
125 | void SetDCAToVertex2D( Bool_t a ) {InitESDcuts(); fAliESDtrackCuts->SetDCAToVertex2D(a);} | |
daf66719 | 126 | void SetEtaRange( Float_t r1, Float_t r2 ) { SetEtaMin(r1); SetEtaMax(r2); } |
127 | void SetPtRange( Float_t r1, Float_t r2 ) { SetPtMin(r1); SetPtMax(r2); } | |
127a5825 | 128 | void SetRequireCharge( Bool_t r ) {fRequireCharge=r;} |
129 | void SetFakesAreOK( Bool_t b ) {fFakesAreOK=b;} | |
9a0783cc | 130 | void SetSPDtrackletDeltaPhiMax( Double_t m ) {fSPDtrackletDeltaPhiMax=m; fCutSPDtrackletDeltaPhi=kTRUE;} |
131 | void SetSPDtrackletDeltaPhiMin( Double_t m ) {fSPDtrackletDeltaPhiMin=m; fCutSPDtrackletDeltaPhi=kTRUE;} | |
1ff4bda1 | 132 | void SetIgnoreTPCzRange( Double_t min, Double_t max ) |
5ba02b32 | 133 | { fIgnoreTPCzRange=kTRUE; fIgnoreTPCzRangeMin=min; fIgnoreTPCzRangeMax=max; } |
134 | void SetAODfilterBit( UInt_t a ) {fAODFilterBit = a; fUseAODFilterBit = kTRUE;} | |
2b1eaa10 | 135 | void SetMinimalTPCdedx(Double_t d=10.) {fMinimalTPCdedx=d; fCutMinimalTPCdedx=kTRUE;} |
1a80f9f6 | 136 | void SetPmdDetPlane(Int_t pmdDet){fCutPmdDet=kTRUE; fPmdDet = pmdDet; } |
137 | void SetPmdAdc(Float_t pmdAdc){fCutPmdAdc=kTRUE; fPmdAdc = pmdAdc; } | |
138 | void SetPmdNcell(Float_t pmdNcell) {fCutPmdNcell=kTRUE; fPmdNcell = pmdNcell; } | |
9126fd0c | 139 | void SetPriors(Float_t centr = 0); // set my favourite priors for Bayesian PID (requested if Bayesian PID is used) |
daf66719 | 140 | |
84714904 | 141 | AliMuonTrackCuts *GetMuonTrackCuts() { InitMuonCuts(); return fMuonTrackCuts; } // XZhang 20121014 |
142 | void SetStandardMuonTrackCuts() { InitMuonCuts(); fMuonTrackCuts->SetDefaultFilterMask(); return; } // XZhang 20120604 | |
143 | void SetIsMuonMC(Bool_t isMC) { InitMuonCuts(); fMuonTrackCuts->SetIsMC(isMC); return; } // XZhang 20120604 | |
144 | void SetMuonPassNumber(Int_t passN) { InitMuonCuts(); fMuonTrackCuts->SetPassNumber(passN); return; } // XZhang 20121013 | |
145 | void SetRunsMuon(const AliInputEventHandler* eventHandler) { if (fMuonTrackCuts) fMuonTrackCuts->SetRun(eventHandler); } // XZhang 20120604 | |
2e5052c5 | 146 | |
8fa6a5fa MK |
147 | void SetForceTPCstandalone(Bool_t b) {fForceTPCstandalone=b;} |
148 | ||
149 | //Kinks | |
150 | void SetMinKinkAngle(Double_t a) {fMinKinkAngle=a;} | |
151 | void SetMinKinkRadius(Double_t r) {fMinKinkRadius=r;} | |
152 | void SetMaxKinkRAdius(Double_t r) {fMaxKinkRadius=r;} | |
153 | void SetMinKinkQt(Double_t m) {fMinKinkQt=m;} | |
154 | void SetMaxKinkQt(Double_t m) {fMaxKinkQt=m;} | |
155 | void SetMaxKinkInvMassKmu(Double_t m) {fMaxKinkInvMassKmu=m;} | |
156 | void SetMinKinkInvMassKmu(Double_t m) {fMinKinkInvMassKmu=m;} | |
157 | ||
8fa6a5fa MK |
158 | Double_t GetMinKinkAngle() const {return fMinKinkAngle;} |
159 | Double_t GetMinKinkRadius() const {return fMinKinkRadius;} | |
160 | Double_t GetMaxKinkRadius() const {return fMaxKinkRadius;} | |
161 | Double_t GetMinKinkQt() const {return fMinKinkQt;} | |
162 | Double_t GetMaxKinkQt() const {return fMaxKinkQt;} | |
163 | Double_t GetMaxKinkInvMassKmu() const {return fMaxKinkInvMassKmu;} | |
164 | Double_t GetMinKinkInvMassKmu() const {return fMinKinkInvMassKmu;} | |
165 | ||
441ea1cf | 166 | Int_t GetMinNClustersTPC() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetMinNClusterTPC();} |
167 | Int_t GetMinNClustersITS() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetMinNClustersITS();} | |
daf66719 | 168 | AliESDtrackCuts::ITSClusterRequirement GetClusterRequirementITS( AliESDtrackCuts::Detector det ) const |
441ea1cf | 169 | {if (!fAliESDtrackCuts) return AliESDtrackCuts::kOff; return fAliESDtrackCuts->GetClusterRequirementITS(det); } |
170 | Float_t GetMaxChi2PerClusterTPC() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetMaxChi2PerClusterTPC();} | |
171 | Float_t GetMaxChi2PerClusterITS() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetMaxChi2PerClusterITS();} | |
172 | Bool_t GetRequireTPCRefit() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetRequireTPCRefit();} | |
173 | Bool_t GetRequireTPCStandAlone() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetRequireTPCStandAlone();} | |
174 | Bool_t GetRequireITSRefit() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetRequireITSRefit();} | |
175 | Bool_t GetRequireITSStandAlone() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetRequireITSStandAlone();} | |
176 | Bool_t GetAcceptKinkDaughters() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetAcceptKinkDaughters();} | |
177 | Float_t GetMaxDCAToVertexZ() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetMaxDCAToVertexZ();} | |
178 | Float_t GetMaxDCAToVertexXY() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetMaxDCAToVertexXY();} | |
179 | const char* GetMaxDCAToVertexXYPtDep() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetMaxDCAToVertexXYPtDep();} | |
180 | Bool_t GetRequireSigmaToVertex() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetRequireSigmaToVertex();} | |
181 | Float_t GetMaxNsigmaToVertex() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetMaxNsigmaToVertex(); } | |
182 | Bool_t GetDCAToVertex2D() const {if (!fAliESDtrackCuts) return 0; return fAliESDtrackCuts->GetDCAToVertex2D();} | |
daf66719 | 183 | void GetEtaRange( Float_t& r1, Float_t& r2 ) const { r1=GetEtaMin(); r2=GetEtaMax(); } |
184 | void GetPtRange( Float_t& r1, Float_t& r2 ) const { r1=GetPtMin(); r2=GetPtMax(); } | |
957517fa | 185 | Bool_t GetRequireCharge() const {return fRequireCharge;} |
9a0783cc | 186 | Bool_t GetFakesAreOK() const {return fFakesAreOK;} |
187 | Double_t GetSPDtrackletDeltaPhiMax() const {return fSPDtrackletDeltaPhiMax;} | |
188 | Double_t GetSPDtrackletDeltaPhiMin() const {return fSPDtrackletDeltaPhiMin;} | |
5ba02b32 | 189 | UInt_t GetAODFilterBit() const {if (!fUseAODFilterBit) return 0; return fAODFilterBit;} |
2b1eaa10 | 190 | Double_t GetMinimalTPCdedx() const {return fMinimalTPCdedx;} |
1a80f9f6 | 191 | Int_t GetPmdDetPlane()const {return fPmdDet; } |
192 | Float_t GetPmdAdc()const {return fPmdAdc;} | |
499fe731 | 193 | Float_t GetPmdNcell() const {return fPmdNcell; } |
a22c1eb1 | 194 | Float_t GetBeta(const AliVTrack* t, Bool_t QAmode = kFALSE); |
3c67c769 | 195 | Float_t Getdedx(const AliESDtrack* t) const; |
8b649d8c | 196 | Float_t GetBayesianProb() const {return fProbBayes;}; |
75afd48c | 197 | AliFlowBayesianPID* GetBayesianResponse() const {return fBayesianResponse;} |
62f2ea04 | 198 | |
8fa6a5fa MK |
199 | Bool_t GetForceTPCstandalone() const {return fForceTPCstandalone;} |
200 | ||
a14b8f3c | 201 | void SetQA(Bool_t b=kTRUE) {if (b) DefineHistograms();} |
499fe731 | 202 | TList* GetQA() const {return fQA;} |
203 | TH1* QAbefore(Int_t i) {return static_cast<TH1*>(static_cast<TList*>(fQA->At(0))->At(i));} | |
204 | TH1* QAafter(Int_t i) {return static_cast<TH1*>(static_cast<TList*>(fQA->At(1))->At(i));} | |
924b02b0 | 205 | |
daf66719 | 206 | //MC stuff |
b9cf8f8e | 207 | void SetIgnoreSignInMCPID( Bool_t b=kTRUE ) {fIgnoreSignInMCPID=b;} |
aab6527a | 208 | void SetCutMC( Bool_t b=kTRUE ); |
f21bdf48 | 209 | void SetCutMChasTrackReferences(Bool_t b=kTRUE) {fCutMChasTrackReferences=b;} |
aab6527a | 210 | void SetMCprocessType( TMCProcess t ) { fMCprocessType = t; fCutMCprocessType=kTRUE; SetCutMC();} |
b9cf8f8e | 211 | void SetMCisPrimary( Bool_t b=kTRUE ) { fMCisPrimary=b; fCutMCisPrimary=kTRUE; SetCutMC();} |
aab6527a | 212 | void SetMCPID( Int_t pid ) { fMCPID=pid; fCutMCPID=kTRUE; SetCutMC(); } |
2ed97fda | 213 | void SetMCfirstMotherPID( Int_t pid ) { fMCfirstMotherPID=pid; fCutMCfirstMotherPID=kTRUE; SetCutMC(); } |
daf66719 | 214 | TMCProcess GetMCprocessType() const { return fMCprocessType; } |
daf66719 | 215 | Bool_t GetMCisPrimary() const {return fMCisPrimary;} |
1ff4bda1 | 216 | Int_t GetMCPID() const {return fMCPID;} |
a14b8f3c | 217 | void SetRequireTransportBitForPrimaries(Bool_t b) {fRequireTransportBitForPrimaries=b; SetCutMC();} |
daf66719 | 218 | |
219 | void SetParamType(trackParameterType paramType) {fParamType=paramType;} | |
220 | trackParameterType GetParamType() const {return fParamType;} | |
12b2b8bc | 221 | static const char* GetParamTypeName(trackParameterType type); |
daf66719 | 222 | void SetParamMix(trackParameterMix paramMix) {fParamMix=paramMix;} |
223 | trackParameterMix GetParamMix() const {return fParamMix;} | |
224 | ||
c27333c2 | 225 | virtual Bool_t IsSelected(TObject* obj, Int_t id=-666); |
1ff4bda1 | 226 | virtual Bool_t IsSelectedMCtruth(TObject* obj, Int_t id=-666); |
127a5825 | 227 | AliVParticle* GetTrack() const {return fTrack;} |
228 | AliMCParticle* GetMCparticle() const {return fMCparticle;} | |
8fa6a5fa | 229 | //AliFlowTrack* MakeFlowTrack() const; |
7d27a354 | 230 | Bool_t FillFlowTrack(AliFlowTrack* track) const; |
dd294bb6 | 231 | //FillFlowTrackV0(TObjArray* trackCollection, Int_t trackIndex) const |
8fa6a5fa | 232 | AliFlowTrack* FillFlowTrack(TObjArray* trackCollection, Int_t trackIndex) const; |
127a5825 | 233 | Bool_t IsPhysicalPrimary() const; |
441ea1cf | 234 | static Bool_t IsPhysicalPrimary(AliMCEvent* p, Int_t label, Bool_t requiretransported=kTRUE); |
daf66719 | 235 | |
236 | void SetMCevent(AliMCEvent* mcEvent) {fMCevent=mcEvent;} | |
237 | AliMCEvent* GetMCevent() const {return fMCevent;} | |
aab6527a | 238 | void SetEvent(AliVEvent* event, AliMCEvent* mcEvent=NULL); |
9a0783cc | 239 | AliVEvent* GetEvent() const {return fEvent;} |
240 | Int_t GetNumberOfInputObjects() const; | |
241 | TObject* GetInputObject(Int_t i); | |
a1c43d26 | 242 | void Clear(Option_t* option=""); |
8fa6a5fa | 243 | void ClearTrack(Option_t* option=""); |
daf66719 | 244 | |
1a80f9f6 | 245 | Double_t GetPmdEta(Float_t xPos, Float_t yPos, Float_t zPos); |
246 | Double_t GetPmdPhi(Float_t xPos, Float_t yPos); | |
247 | ||
32b846cd | 248 | //PID |
2b1eaa10 | 249 | void SetPID(AliPID::EParticleType pid, PIDsource s=kTOFpid, Double_t prob=0.9) |
250 | {fParticleID=pid; fPIDsource=s; fParticleProbability=prob; fCutPID=kTRUE; InitPIDcuts();} | |
67006c99 | 251 | void SetTPCTOFNsigmaPIDCutContours(Bool_t b,Double_t cMin,Double_t cMax){fUseTPCTOFNsigmaCutContours = b; fCentralityPercentileMin=cMin; fCentralityPercentileMax=cMax;} |
3c67c769 | 252 | AliPID::EParticleType GetParticleID() const {return fParticleID;} |
253 | Bool_t GetCutPID() const {return fCutPID;} | |
254 | void SetTPCpidCuts(const TMatrixF* mat) {fTPCpidCuts=new TMatrixF(*mat);} | |
255 | void SetTOFpidCuts(const TMatrixF* mat) {fTOFpidCuts=new TMatrixF(*mat);} | |
2b1eaa10 | 256 | static const char* PIDsourceName(PIDsource s); |
aab6527a | 257 | AliESDpid& GetESDpid() {return fESDpid;} |
875ee12a | 258 | void SetAllowTOFmismatchFlag(Bool_t b=kTRUE) {fAllowTOFmismatchFlag=b;} |
259 | Bool_t GetAllowTOFmismatchFlag() const {return fAllowTOFmismatchFlag;} | |
260 | void SetRequireStrictTOFTPCagreement(Bool_t b=kTRUE) {fRequireStrictTOFTPCagreement=b;} | |
261 | Bool_t GetRequireStrictTOFTPCagreement() const {return fRequireStrictTOFTPCagreement;} | |
0b14d0f4 | 262 | void SetRejectElectronsWithTPCpid(Bool_t b=kTRUE) {fCutRejectElectronsWithTPCpid=b;} |
92b507bb | 263 | void SetLinearizeVZEROresponse( Bool_t b=kTRUE ) {fLinearizeVZEROresponse=b;} |
32b846cd | 264 | |
1a80f9f6 | 265 | //these should maybe be protected |
cac040c5 MK |
266 | Bool_t PassesCuts(AliVParticle* track); |
267 | Bool_t PassesESDcuts(AliESDtrack* track); | |
60875c3c | 268 | Bool_t PassesAODcuts(const AliAODTrack* track, Bool_t passFid=kTRUE); |
3c67c769 | 269 | Bool_t PassesPMDcuts(const AliESDPmdTrack* track); |
c27333c2 | 270 | Bool_t PassesVZEROcuts(Int_t id); |
1a80f9f6 | 271 | Bool_t PassesCuts(const AliFlowTrackSimple* track); |
272 | Bool_t PassesCuts(const AliMultiplicity* track, Int_t id); | |
2e5052c5 | 273 | Bool_t PassesCuts(const AliAODTracklets* track, Int_t id); // XZhang 20120615 |
8fa6a5fa MK |
274 | Bool_t PassesCuts(const AliESDkink* kink); |
275 | Bool_t PassesCuts(const AliESDv0* v0); | |
12b2b8bc | 276 | Bool_t PassesMCcuts(); |
1ff4bda1 | 277 | Bool_t PassesMCcuts(AliMCEvent* mcevent, Int_t label); |
1a80f9f6 | 278 | Bool_t PassesTPCdedxCut(const AliESDtrack* track); |
cd62a2a8 | 279 | Bool_t PassesTPCbayesianCut(const AliESDtrack* track); |
1a80f9f6 | 280 | Bool_t PassesTPCpidCut(const AliESDtrack* track) const; |
3c67c769 | 281 | Bool_t PassesTOFbetaCut(const AliESDtrack* track); |
282 | Bool_t PassesTOFbetaSimpleCut(const AliESDtrack* track); | |
283 | Bool_t PassesTOFpidCut(const AliESDtrack* track) const; | |
284 | Bool_t PassesESDpidCut(const AliESDtrack* track); | |
0d16f553 | 285 | Bool_t PassesAODpidCut(const AliAODTrack* track); |
2e5052c5 | 286 | Bool_t PassesMuonCuts(AliVParticle* track); // XZhang 20120604 |
0d16f553 | 287 | Bool_t PassesTPCbayesianCut(const AliAODTrack* track); |
288 | Bool_t PassesTOFbayesianCut(const AliAODTrack* track); | |
289 | Bool_t PassesTOFbetaCut(const AliAODTrack* track); | |
1a80f9f6 | 290 | |
499fe731 | 291 | void Browse(TBrowser* b); |
292 | Long64_t Merge(TCollection* list); | |
67006c99 | 293 | void GetTPCTOFPIDContours(); |
86a97121 | 294 | //gain equalization and recentering |
c27333c2 MK |
295 | void SetVZEROgainEqualisation(TH1* g) {fVZEROgainEqualization=g;} |
296 | void SetVZEROApol(Int_t ring, Float_t f) {fVZEROApol[ring]=f;} | |
297 | void SetVZEROCpol(Int_t ring, Float_t f) {fVZEROCpol[ring]=f;} | |
86a97121 | 298 | // set the flag for recentering (which is done in AliFlowEvent) |
299 | void SetApplyRecentering(Bool_t r) { fApplyRecentering = r; } | |
300 | Bool_t GetApplyRecentering() const { return fApplyRecentering;} | |
c27333c2 MK |
301 | void SetVZEROgainEqualizationPerRing(Bool_t s) {fVZEROgainEqualizationPerRing = s;} |
302 | Bool_t GetVZEROgainEqualizationPerRing() const {return fVZEROgainEqualizationPerRing;} | |
86a97121 | 303 | // exclude vzero rings: 0 through 7 can be excluded by calling this setter multiple times |
304 | // 0 corresponds to segment ID 0 through 7, etc | |
305 | // disabled vzero rings get weight 0 | |
306 | void SetUseVZERORing(Int_t i, Bool_t u) { | |
307 | fUseVZERORing[i] = u; | |
c27333c2 | 308 | fVZEROgainEqualizationPerRing = kTRUE; // must be true for this option |
86a97121 | 309 | } |
310 | Bool_t GetUseVZERORing(Int_t i) const {return fUseVZERORing[i];} | |
84b44ed4 | 311 | void SetChi2A(TArrayD* Chi2A) {fChi2A = Chi2A;} // chi vs cent for vzero A ep_2 |
312 | void SetChi3A(TArrayD* Chi3A) {fChi3A = Chi3A;} | |
313 | void SetChi2C(TArrayD* Chi2C) {fChi2C = Chi2C;} | |
314 | void SetChi3C(TArrayD* Chi3C) {fChi3C = Chi3C;} | |
315 | ||
316 | TArrayD* GetChi2A() {return fChi2A;} // chi vs cent for vzero A ep_2 | |
317 | TArrayD* GetChi3A() {return fChi3A;} | |
318 | TArrayD* GetChi2C() {return fChi2C;} | |
319 | TArrayD* GetChi3C() {return fChi3C;} | |
499fe731 | 320 | |
043e9010 | 321 | void SetNumberOfSigmas(Float_t val) {fNsigmaCut2 = val*val;}; |
322 | Float_t GetNumberOfSigmas() const {return TMath::Sqrt(fNsigmaCut2);}; | |
323 | ||
1a80f9f6 | 324 | protected: |
8fa6a5fa MK |
325 | //AliFlowTrack* MakeFlowTrackSPDtracklet() const; |
326 | //AliFlowTrack* MakeFlowTrackPMDtrack() const; | |
327 | //AliFlowTrack* MakeFlowTrackVZERO() const; | |
328 | //AliFlowTrack* MakeFlowTrackVParticle() const; | |
7d27a354 | 329 | Bool_t FillFlowTrackVParticle(AliFlowTrack* t) const; |
330 | Bool_t FillFlowTrackGeneric(AliFlowTrack* t) const; | |
8fa6a5fa | 331 | AliFlowTrack* FillFlowTrackKink(TObjArray* trackCollection, Int_t trackIndex) const; |
c27333c2 | 332 | AliFlowTrack* FillFlowTrackVZERO(TObjArray* trackCollection, Int_t trackIndex) const; |
8fa6a5fa MK |
333 | AliFlowTrack* FillFlowTrackGeneric(TObjArray* trackCollection, Int_t trackIndex) const; |
334 | AliFlowTrack* FillFlowTrackVParticle(TObjArray* trackCollection, Int_t trackIndex) const; | |
daf66719 | 335 | void HandleESDtrack(AliESDtrack* track); |
336 | void HandleVParticle(AliVParticle* track); | |
924b02b0 | 337 | void DefineHistograms(); |
32b846cd | 338 | void InitPIDcuts(); |
7288f660 | 339 | void InitESDcuts() {if (!fAliESDtrackCuts) {fAliESDtrackCuts=new AliESDtrackCuts();}} |
2e5052c5 | 340 | void InitMuonCuts() { if (!fMuonTrackCuts) fMuonTrackCuts =new AliMuonTrackCuts("StdMuCuts","StdMuCuts"); return; } // XZhang 20120604 |
3abf7ecc | 341 | // part added by F. Noferini |
cd62a2a8 | 342 | Bool_t PassesTOFbayesianCut(const AliESDtrack* track); |
8eca5d19 | 343 | Bool_t PassesNucleiSelection(const AliESDtrack* track); // added by Natasha |
d0ce6147 | 344 | Bool_t PassesTPCTOFNsigmaCut(const AliAODTrack* track); |
345 | Bool_t PassesTPCTOFNsigmaCut(const AliESDtrack* track); | |
67006c99 | 346 | Bool_t PassesTPCTOFNsigmaCutPuritybased(const AliAODTrack* track); |
0d16f553 | 347 | Bool_t TPCTOFagree(const AliVTrack *track); |
3abf7ecc | 348 | // end part added by F. Noferini |
67006c99 | 349 | |
9a0783cc | 350 | //the cuts |
daf66719 | 351 | AliESDtrackCuts* fAliESDtrackCuts; //alianalysis cuts |
2e5052c5 | 352 | AliMuonTrackCuts* fMuonTrackCuts; // muon selection cuts // XZhang 20120604 |
499fe731 | 353 | TList* fQA; //qa histograms go here |
1ff4bda1 | 354 | Bool_t fCutMC; //do we cut on MC? |
f21bdf48 | 355 | Bool_t fCutMChasTrackReferences; //did we leave a trace in the detector? |
daf66719 | 356 | Bool_t fCutMCprocessType; //do we cut on mc process type? |
357 | TMCProcess fMCprocessType; //mc process type | |
358 | Bool_t fCutMCPID; //cut on MC pid? | |
359 | Int_t fMCPID; //MC PID | |
2ed97fda | 360 | Bool_t fCutMCfirstMotherPID; //cut on PID of first mother? |
361 | Int_t fMCfirstMotherPID; //PID of the first mother of track | |
a14b8f3c | 362 | Bool_t fIgnoreSignInMCPID; //when MC PID cut is set, pass also the antiparticle |
daf66719 | 363 | Bool_t fCutMCisPrimary; //do we cut on primaryness? |
441ea1cf | 364 | Bool_t fRequireTransportBitForPrimaries; //require the transport bit to be set for primaries |
daf66719 | 365 | Bool_t fMCisPrimary; //is MC primary |
127a5825 | 366 | Bool_t fRequireCharge; //is charged? |
367 | Bool_t fFakesAreOK; //are fakes (negative labels) ok? | |
9a0783cc | 368 | Bool_t fCutSPDtrackletDeltaPhi; //are we cutting on the trcklet deltaphi? |
369 | Double_t fSPDtrackletDeltaPhiMax; //maximal deltaphi for tracklets | |
370 | Double_t fSPDtrackletDeltaPhiMin; //minimal deltaphi for tracklets | |
1ff4bda1 | 371 | Bool_t fIgnoreTPCzRange; //ignore tracks going close to central membrane |
372 | Double_t fIgnoreTPCzRangeMax; //max z to ignore | |
373 | Double_t fIgnoreTPCzRangeMin; //min z to ignore | |
2948ac5a | 374 | Bool_t fCutChi2PerClusterTPC; //cut on tpc chi2 |
375 | Float_t fMaxChi2PerClusterTPC; //max chi2 tpc/cluster | |
376 | Float_t fMinChi2PerClusterTPC; //min chi2 tpc/cluster | |
32b846cd | 377 | Bool_t fCutNClustersTPC; //cut on clusters? |
378 | Int_t fNClustersTPCMax; //max tpc ncls | |
379 | Int_t fNClustersTPCMin; //min tpc clusters | |
42655d16 | 380 | Bool_t fCutNClustersITS; //cut on clusters? |
381 | Int_t fNClustersITSMax; //max tpc ncls | |
382 | Int_t fNClustersITSMin; //min tpc clusters | |
5ba02b32 | 383 | Bool_t fUseAODFilterBit; //use AOD filter bit selection? |
384 | UInt_t fAODFilterBit; //AOD filter bit to select | |
a63303bd | 385 | Bool_t fCutDCAToVertexXY; //dca xy cut |
386 | Bool_t fCutDCAToVertexZ; //dca z cut | |
2b1eaa10 | 387 | Bool_t fCutMinimalTPCdedx; //cut on minimal dedx in TPC to reject noise tracks |
388 | Double_t fMinimalTPCdedx; //value for minimal TPC dedx | |
92b507bb | 389 | Bool_t fLinearizeVZEROresponse; //linearize VZERO response using AliESDUtil |
1a80f9f6 | 390 | |
67006c99 | 391 | Int_t fCentralityPercentileMin; //centrality min |
392 | Int_t fCentralityPercentileMax; //centrality max | |
393 | ||
1a80f9f6 | 394 | Bool_t fCutPmdDet; //cut on PMD detector plane |
395 | Int_t fPmdDet; // value of PMD detector plane | |
396 | Bool_t fCutPmdAdc; //cut on cluster ADC | |
397 | Float_t fPmdAdc; //value of cluster ADC | |
398 | Bool_t fCutPmdNcell; //cut on cluster ncell | |
399 | Float_t fPmdNcell; //value of cluster ncell | |
8fa6a5fa | 400 | |
8fa6a5fa MK |
401 | Double_t fMinKinkAngle; //max kink angle |
402 | Double_t fMinKinkRadius; //min kink radius | |
403 | Double_t fMaxKinkRadius; //max kink radius | |
404 | Double_t fMinKinkQt; //min kink qt | |
405 | Double_t fMaxKinkQt; //max kink qt | |
406 | Double_t fMinKinkInvMassKmu; //max kink inv mass | |
407 | Double_t fMaxKinkInvMassKmu; //max kink inv mass | |
408 | Bool_t fForceTPCstandalone; //use TPC parameters when applying cuts on the kink mother | |
409 | Bool_t fRequireKinkDaughters; //well, the name says it all | |
1a80f9f6 | 410 | |
daf66719 | 411 | trackParameterType fParamType; //parameter type tu cut on |
412 | trackParameterMix fParamMix; //parameter mixing | |
8fa6a5fa MK |
413 | |
414 | AliESDkink* fKink; //!placeholder for the current kink | |
415 | AliESDv0* fV0; //!placeholder for the current V0 | |
daf66719 | 416 | AliVParticle* fTrack; //!the track to apply cuts on |
8fa6a5fa MK |
417 | Double_t fTrackMass; //!mass of the particle |
418 | Double_t fTrackPt; //!track pt | |
12b2b8bc | 419 | Double_t fTrackPhi; //!track phi |
420 | Double_t fTrackEta; //!track eta | |
421 | Double_t fTrackWeight; //!track weight | |
127a5825 | 422 | Int_t fTrackLabel; //!track label, or its absolute value if FakesAreOK |
957517fa | 423 | AliMCEvent* fMCevent; //!mc event |
daf66719 | 424 | AliMCParticle* fMCparticle; //!mc particle |
9a0783cc | 425 | AliVEvent* fEvent; //!placeholder for current event |
1ff4bda1 | 426 | AliESDtrack fTPCtrack; //!placeholder for TPC only track to avoid new/delete on every track |
daf66719 | 427 | |
32b846cd | 428 | //PID |
aab6527a | 429 | AliESDpid fESDpid; //pid obj |
b147dd2f | 430 | AliFlowBayesianPID *fBayesianResponse; //! Baysian response with all the TOF tuning (using fESDpid) |
32b846cd | 431 | PIDsource fPIDsource; //pid source |
432 | TMatrixF* fTPCpidCuts; //tpc pid cuts | |
433 | TMatrixF* fTOFpidCuts; //tof pid cuts | |
2b1eaa10 | 434 | AliPID::EParticleType fParticleID; //alipid |
435 | Double_t fParticleProbability; //desired prob for a particle type | |
875ee12a | 436 | Bool_t fAllowTOFmismatchFlag; //allow TOFmismatch flag=1 in ESD |
437 | Bool_t fRequireStrictTOFTPCagreement; //require stricter than TOFmismatch flag TOF-TPC agreement | |
0b14d0f4 | 438 | Bool_t fCutRejectElectronsWithTPCpid; //reject electrons with TPC pid |
67006c99 | 439 | Bool_t fUseTPCTOFNsigmaCutContours; // Flag to use purity based TPC-TOF nsigma cuts |
32b846cd | 440 | |
3abf7ecc | 441 | // part added by F. Noferini |
1a80f9f6 | 442 | static const Int_t fgkPIDptBin = 20; // pT bins for priors |
443 | Float_t fC[fgkPIDptBin][5],fBinLimitPID[fgkPIDptBin]; // pt bin limit and priors | |
8b649d8c | 444 | Float_t fProbBayes; // bayesian probability |
9126fd0c | 445 | Float_t fCurrCentr; // current centrality used for set the priors |
92b507bb | 446 | // end part added by F. Noferini |
86a97121 | 447 | |
448 | //gain equalization and recentering for vzero | |
c27333c2 | 449 | TH1* fVZEROgainEqualization; //! equalization histo |
86a97121 | 450 | Bool_t fApplyRecentering; // apply recentering of q-sub vectors in AliFlowEvent ? |
c27333c2 MK |
451 | Bool_t fVZEROgainEqualizationPerRing; // per ring vzero gain calibration |
452 | Float_t fVZEROApol[4]; //! calibration info per ring | |
453 | Float_t fVZEROCpol[4]; //! calibration info per ring | |
86a97121 | 454 | Bool_t fUseVZERORing[8]; // kTRUE means the ring is included |
8fa6a5fa | 455 | static const Int_t fgkNumberOfVZEROtracks=64; //number of VZERO channels |
84b44ed4 | 456 | TArrayD* fChi2A; // chi vs cent for vzero A ep_2 |
457 | TArrayD* fChi2C; // chi vs cent for vzero C ep_2 | |
458 | TArrayD* fChi3A; // chi vs cent for vzero A ep_3 | |
459 | TArrayD* fChi3C; // chi vs cent for vzero C ep_3 | |
1a80f9f6 | 460 | |
043e9010 | 461 | AliPIDResponse *fPIDResponse; //! Pid reponse to manage Nsigma cuts |
462 | Float_t fNsigmaCut2; // Number of sigma^2 (cut value) for TPC+TOF nsigma cut | |
67006c99 | 463 | |
464 | ||
465 | //TPC TOF nsigma Purity based cut contours | |
466 | TFile *fContoursFile; //! contours file | |
467 | TDirectory *fCutContourList; //! contour list | |
468 | ||
469 | Int_t fMaxITSclusterShared; | |
470 | Double_t fMaxITSChi2; | |
471 | ||
472 | ||
473 | TCutG *fCutContour[50]; //! TCutG contours | |
474 | //TCutG *fCutContour_kaon[50]; //! TCutG contours | |
475 | //TCutG *fCutContour_proton[50]; //! TCutG contours | |
476 | TGraph *fCutGraph[50]; //! graphs | |
477 | //TGraph *fCutGraph_kaon[50]; //! graphs | |
478 | //TGraph *fCutGraph_proton[50]; //! graphs | |
479 | ||
480 | ||
043e9010 | 481 | |
84b44ed4 | 482 | ClassDef(AliFlowTrackCuts,15) |
daf66719 | 483 | }; |
484 | ||
485 | #endif | |
486 | ||
9126fd0c | 487 | |
2281e7c5 | 488 |