]>
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) | |
8 | ||
9 | #ifndef ALIFLOWTRACKCUTS_H | |
10 | #define ALIFLOWTRACKCUTS_H | |
11 | ||
12 | #include "AliFlowTrackSimpleCuts.h" | |
13 | #include "AliESDtrackCuts.h" | |
14 | #include "TMCProcess.h" | |
1ff4bda1 | 15 | #include "AliESDtrack.h" |
daf66719 | 16 | |
2948ac5a | 17 | class TObjArray; |
daf66719 | 18 | class AliVParticle; |
19 | class AliMCParticle; | |
20 | class AliFlowTrack; | |
21 | class AliMCEvent; | |
22 | class AliVEvent; | |
12b2b8bc | 23 | class AliMultiplicity; |
daf66719 | 24 | |
25 | class AliFlowTrackCuts : public AliFlowTrackSimpleCuts { | |
26 | ||
27 | public: | |
28 | AliFlowTrackCuts(); | |
29 | AliFlowTrackCuts(const AliFlowTrackCuts& someCuts); | |
30 | AliFlowTrackCuts& operator=(const AliFlowTrackCuts& someCuts); | |
31 | virtual ~AliFlowTrackCuts(); | |
32 | ||
33 | static AliFlowTrackCuts* GetStandardTPCOnlyTrackCuts(); | |
34 | static AliFlowTrackCuts* GetStandardITSTPCTrackCuts2009(Bool_t selPrimaries=kTRUE); | |
35 | ||
12b2b8bc | 36 | enum trackParameterType { kMC, kGlobal, kESD_TPConly, kESD_SPDtracklet }; |
d0471ea0 | 37 | enum trackParameterMix { kPure, kTrackWithMCkine, kTrackWithMCPID, kTrackWithMCpt, kTrackWithPtFromFirstMother }; |
daf66719 | 38 | |
39 | //setters (interface to AliESDtrackCuts) | |
40 | void SetMinNClustersTPC( Int_t a ) {fAliESDtrackCuts->SetMinNClustersTPC(a);} | |
41 | void SetMinNClustersITS( Int_t a ) {fAliESDtrackCuts->SetMinNClustersITS(a);} | |
42 | void SetClusterRequirementITS( AliESDtrackCuts::Detector det, | |
43 | AliESDtrackCuts::ITSClusterRequirement req = AliESDtrackCuts::kOff ) | |
44 | { fAliESDtrackCuts->SetClusterRequirementITS(det,req); } | |
2948ac5a | 45 | void SetMaxChi2PerClusterTPC( Float_t a ) {fMaxChi2PerClusterTPC=a;fCutChi2PerClusterTPC=kTRUE;} |
46 | void SetMinChi2PerClusterTPC( Float_t a ) {fMinChi2PerClusterTPC=a;fCutChi2PerClusterTPC=kTRUE;} | |
daf66719 | 47 | void SetMaxChi2PerClusterITS( Float_t a ) {fAliESDtrackCuts->SetMaxChi2PerClusterITS(a);} |
48 | void SetRequireTPCRefit( Bool_t a ) {fAliESDtrackCuts->SetRequireTPCRefit(a);} | |
49 | void SetRequireTPCStandAlone( Bool_t a) {fAliESDtrackCuts->SetRequireTPCStandAlone(a);} | |
50 | void SetRequireITSRefit( Bool_t a ) {fAliESDtrackCuts->SetRequireITSRefit(a);} | |
51 | void SetRequireITSStandAlone( Bool_t a) {fAliESDtrackCuts->SetRequireITSStandAlone(a);} | |
52 | void SetAcceptKinkDaughters( Bool_t a ) {fAliESDtrackCuts->SetAcceptKinkDaughters(a);} | |
53 | void SetMaxDCAToVertexZ( Float_t a ) {fAliESDtrackCuts->SetMaxDCAToVertexZ(a);} | |
54 | void SetMaxDCAToVertexXY( Float_t a ) {fAliESDtrackCuts->SetMaxDCAToVertexXY(a);} | |
55 | void SetMaxDCAToVertexXYPtDep( const char* a ) {fAliESDtrackCuts->SetMaxDCAToVertexXYPtDep(a);} | |
56 | void SetRequireSigmaToVertex(Bool_t a) {fAliESDtrackCuts->SetRequireSigmaToVertex(a);} | |
57 | void SetMaxNsigmaToVertex(Float_t sigma=1e10) { fAliESDtrackCuts->SetMaxNsigmaToVertex(sigma); } | |
58 | void SetDCAToVertex2D( Bool_t a ) {fAliESDtrackCuts->SetDCAToVertex2D(a);} | |
59 | void SetEtaRange( Float_t r1, Float_t r2 ) { SetEtaMin(r1); SetEtaMax(r2); } | |
60 | void SetPtRange( Float_t r1, Float_t r2 ) { SetPtMin(r1); SetPtMax(r2); } | |
127a5825 | 61 | void SetRequireCharge( Bool_t r ) {fRequireCharge=r;} |
62 | void SetFakesAreOK( Bool_t b ) {fFakesAreOK=b;} | |
9a0783cc | 63 | void SetSPDtrackletDeltaPhiMax( Double_t m ) {fSPDtrackletDeltaPhiMax=m; fCutSPDtrackletDeltaPhi=kTRUE;} |
64 | void SetSPDtrackletDeltaPhiMin( Double_t m ) {fSPDtrackletDeltaPhiMin=m; fCutSPDtrackletDeltaPhi=kTRUE;} | |
1ff4bda1 | 65 | void SetIgnoreSignInPID( Bool_t b ) {fIgnoreSignInPID=b;} |
66 | void SetIgnoreTPCzRange( Double_t min, Double_t max ) | |
67 | { fIgnoreTPCzRange=kTRUE; fIgnoreTPCzRangeMin=min; fIgnoreTPCzRangeMax=max; } | |
daf66719 | 68 | |
69 | Int_t GetMinNClustersTPC() const {return fAliESDtrackCuts->GetMinNClusterTPC();} | |
70 | Int_t GetMinNClustersITS() const {return fAliESDtrackCuts->GetMinNClustersITS();} | |
71 | AliESDtrackCuts::ITSClusterRequirement GetClusterRequirementITS( AliESDtrackCuts::Detector det ) const | |
72 | { return fAliESDtrackCuts->GetClusterRequirementITS(det); } | |
73 | Float_t GetMaxChi2PerClusterTPC() const {return fAliESDtrackCuts->GetMaxChi2PerClusterTPC();} | |
74 | Float_t GetMaxChi2PerClusterITS() const {return fAliESDtrackCuts->GetMaxChi2PerClusterITS();} | |
75 | Bool_t GetRequireTPCRefit() const {return fAliESDtrackCuts->GetRequireTPCRefit();} | |
76 | Bool_t GetRequireTPCStandAlone() const {return fAliESDtrackCuts->GetRequireTPCStandAlone();} | |
77 | Bool_t GetRequireITSRefit() const {return fAliESDtrackCuts->GetRequireITSRefit();} | |
78 | Bool_t GetRequireITSStandAlone() const {return fAliESDtrackCuts->GetRequireITSStandAlone();} | |
79 | Bool_t GetAcceptKinkDaughters() const {return fAliESDtrackCuts->GetAcceptKinkDaughters();} | |
80 | Float_t GetMaxDCAToVertexZ() const {return fAliESDtrackCuts->GetMaxDCAToVertexZ();} | |
81 | Float_t GetMaxDCAToVertexXY() const {return fAliESDtrackCuts->GetMaxDCAToVertexXY();} | |
82 | const char* GetMaxDCAToVertexXYPtDep() const {return fAliESDtrackCuts->GetMaxDCAToVertexXYPtDep();} | |
83 | Bool_t GetRequireSigmaToVertex() const {return fAliESDtrackCuts->GetRequireSigmaToVertex();} | |
84 | Float_t GetMaxNsigmaToVertex() const {return fAliESDtrackCuts->GetMaxNsigmaToVertex(); } | |
85 | Bool_t GetDCAToVertex2D() const {return fAliESDtrackCuts->GetDCAToVertex2D();} | |
86 | void GetEtaRange( Float_t& r1, Float_t& r2 ) const { r1=GetEtaMin(); r2=GetEtaMax(); } | |
87 | void GetPtRange( Float_t& r1, Float_t& r2 ) const { r1=GetPtMin(); r2=GetPtMax(); } | |
957517fa | 88 | Bool_t GetRequireCharge() const {return fRequireCharge;} |
9a0783cc | 89 | Bool_t GetFakesAreOK() const {return fFakesAreOK;} |
90 | Double_t GetSPDtrackletDeltaPhiMax() const {return fSPDtrackletDeltaPhiMax;} | |
91 | Double_t GetSPDtrackletDeltaPhiMin() const {return fSPDtrackletDeltaPhiMin;} | |
daf66719 | 92 | |
924b02b0 | 93 | void SetQA(const char* dirname); |
2948ac5a | 94 | TObjArray* GetQA() const {return fQA;} |
924b02b0 | 95 | |
daf66719 | 96 | //MC stuff |
1ff4bda1 | 97 | void SetCutMC( Bool_t b=kTRUE ) {fCutMC=b;} |
98 | void SetMCprocessType( TMCProcess t ) { fMCprocessType = t; fCutMCprocessType=kTRUE; fCutMC=kTRUE;} | |
99 | void SetMCisPrimary( Bool_t b ) { fMCisPrimary=b; fCutMCisPrimary=kTRUE; fCutMC=kTRUE;} | |
100 | void SetMCPID( Int_t pid ) { fMCPID=pid; fCutMCPID=kTRUE; fCutMC=kTRUE; } | |
daf66719 | 101 | TMCProcess GetMCprocessType() const { return fMCprocessType; } |
daf66719 | 102 | Bool_t GetMCisPrimary() const {return fMCisPrimary;} |
1ff4bda1 | 103 | Int_t GetMCPID() const {return fMCPID;} |
daf66719 | 104 | |
105 | void SetParamType(trackParameterType paramType) {fParamType=paramType;} | |
106 | trackParameterType GetParamType() const {return fParamType;} | |
12b2b8bc | 107 | static const char* GetParamTypeName(trackParameterType type); |
daf66719 | 108 | void SetParamMix(trackParameterMix paramMix) {fParamMix=paramMix;} |
109 | trackParameterMix GetParamMix() const {return fParamMix;} | |
110 | ||
9a0783cc | 111 | virtual Bool_t IsSelected(TObject* obj, Int_t id=-666); |
1ff4bda1 | 112 | virtual Bool_t IsSelectedMCtruth(TObject* obj, Int_t id=-666); |
127a5825 | 113 | AliVParticle* GetTrack() const {return fTrack;} |
114 | AliMCParticle* GetMCparticle() const {return fMCparticle;} | |
daf66719 | 115 | AliFlowTrack* MakeFlowTrack() const; |
127a5825 | 116 | Bool_t IsPhysicalPrimary() const; |
9a0783cc | 117 | static Bool_t IsPhysicalPrimary(AliMCEvent* p, Int_t label); |
daf66719 | 118 | |
119 | void SetMCevent(AliMCEvent* mcEvent) {fMCevent=mcEvent;} | |
120 | AliMCEvent* GetMCevent() const {return fMCevent;} | |
9a0783cc | 121 | void SetEvent(AliVEvent* event) {fEvent=event;} |
122 | AliVEvent* GetEvent() const {return fEvent;} | |
123 | Int_t GetNumberOfInputObjects() const; | |
124 | TObject* GetInputObject(Int_t i); | |
daf66719 | 125 | |
126 | protected: | |
127 | Bool_t PassesCuts(AliVParticle* track); | |
128 | Bool_t PassesCuts(AliFlowTrackSimple* track); | |
12b2b8bc | 129 | Bool_t PassesCuts(AliMultiplicity* track, Int_t id); |
130 | Bool_t PassesMCcuts(); | |
1ff4bda1 | 131 | Bool_t PassesMCcuts(AliMCEvent* mcevent, Int_t label); |
daf66719 | 132 | void HandleESDtrack(AliESDtrack* track); |
133 | void HandleVParticle(AliVParticle* track); | |
924b02b0 | 134 | void DefineHistograms(); |
daf66719 | 135 | |
9a0783cc | 136 | //the cuts |
daf66719 | 137 | AliESDtrackCuts* fAliESDtrackCuts; //alianalysis cuts |
2948ac5a | 138 | TObjArray* fQA; //qa histograms go here |
1ff4bda1 | 139 | Bool_t fCutMC; //do we cut on MC? |
daf66719 | 140 | Bool_t fCutMCprocessType; //do we cut on mc process type? |
141 | TMCProcess fMCprocessType; //mc process type | |
142 | Bool_t fCutMCPID; //cut on MC pid? | |
143 | Int_t fMCPID; //MC PID | |
4cbcbead | 144 | Bool_t fIgnoreSignInPID; //when PID cut is set, pass also the antiparticle |
daf66719 | 145 | Bool_t fCutMCisPrimary; //do we cut on primaryness? |
146 | Bool_t fMCisPrimary; //is MC primary | |
127a5825 | 147 | Bool_t fRequireCharge; //is charged? |
148 | Bool_t fFakesAreOK; //are fakes (negative labels) ok? | |
9a0783cc | 149 | Bool_t fCutSPDtrackletDeltaPhi; //are we cutting on the trcklet deltaphi? |
150 | Double_t fSPDtrackletDeltaPhiMax; //maximal deltaphi for tracklets | |
151 | Double_t fSPDtrackletDeltaPhiMin; //minimal deltaphi for tracklets | |
1ff4bda1 | 152 | Bool_t fIgnoreTPCzRange; //ignore tracks going close to central membrane |
153 | Double_t fIgnoreTPCzRangeMax; //max z to ignore | |
154 | Double_t fIgnoreTPCzRangeMin; //min z to ignore | |
2948ac5a | 155 | Bool_t fCutChi2PerClusterTPC; //cut on tpc chi2 |
156 | Float_t fMaxChi2PerClusterTPC; //max chi2 tpc/cluster | |
157 | Float_t fMinChi2PerClusterTPC; //min chi2 tpc/cluster | |
daf66719 | 158 | |
159 | trackParameterType fParamType; //parameter type tu cut on | |
160 | trackParameterMix fParamMix; //parameter mixing | |
daf66719 | 161 | AliVParticle* fTrack; //!the track to apply cuts on |
12b2b8bc | 162 | Double_t fTrackPhi; //!track phi |
163 | Double_t fTrackEta; //!track eta | |
164 | Double_t fTrackWeight; //!track weight | |
127a5825 | 165 | Int_t fTrackLabel; //!track label, or its absolute value if FakesAreOK |
957517fa | 166 | AliMCEvent* fMCevent; //!mc event |
daf66719 | 167 | AliMCParticle* fMCparticle; //!mc particle |
9a0783cc | 168 | AliVEvent* fEvent; //!placeholder for current event |
1ff4bda1 | 169 | AliESDtrack fTPCtrack; //!placeholder for TPC only track to avoid new/delete on every track |
daf66719 | 170 | |
4cbcbead | 171 | ClassDef(AliFlowTrackCuts,3) |
daf66719 | 172 | }; |
173 | ||
174 | #endif | |
175 | ||
176 |