Gain calibration per chamber:
[u/mrichter/AliRoot.git] / STEER / AOD / AliAODTrack.h
CommitLineData
df9db588 1#ifndef AliAODTrack_H
2#define AliAODTrack_H
3/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//-------------------------------------------------------------------------
4f6e22bd 9// AOD track implementation of AliVTrack
df9db588 10// Author: Markus Oldenburg, CERN
11//-------------------------------------------------------------------------
12
13#include <TRef.h>
507ed024 14#include <TBits.h>
df9db588 15
4f6e22bd 16#include "AliVTrack.h"
df9db588 17#include "AliAODVertex.h"
5d62ce04 18#include "AliAODRedCov.h"
7be1db84 19#include "AliAODPid.h"
c8fe2783 20
df9db588 21
6dc40b1c 22class AliVVertex;
af48efa8 23class AliTPCdEdxInfo;
6dc40b1c 24
4f6e22bd 25class AliAODTrack : public AliVTrack {
df9db588 26
27 public:
28
1912763f 29 enum AODTrk_t {kUndef = -1,
30 kPrimary,
31 kSecondary,
32 kOrphan};
df9db588 33
34 enum AODTrkBits_t {
dc825b15 35 kIsDCA=BIT(14), // set if fPosition is the DCA and not the position of the first point
1912763f 36 kUsedForVtxFit=BIT(15), // set if this track was used to fit the vertex it is attached to
ed47dd92 37 kUsedForPrimVtxFit=BIT(16), // set if this track was used to fit the primary vertex
9e3e4265 38 kIsTPCConstrained=BIT(17), // set if this track is a SA TPC track constrained to the SPD vertex, needs to be skipped in any track loop to avoid double counting
39 kIsHybridTPCCG=BIT(18), // set if this track can be used as a hybrid track i.e. Gbobal tracks with certain slecetion plus the TPC constrained tracks that did not pass the selection
40 kIsGlobalConstrained=BIT(19), // set if this track is a global track constrained to the vertex, needs to be skipped in any track loop to avoid double counting
41 kIsHybridGCG=BIT(20)// set if this track can be used as a hybrid track i.e. tracks with certain slecetion plus the global constraint tracks that did not pass the selection
df9db588 42 };
43
0e31a30a 44
45 enum AODTrkFilterBits_t {
ba54e4d4 46 kTrkTPCOnly = BIT(0), // Standard TPC only tracks
47 kTrkITSsa = BIT(1), // ITS standalone
48 kTrkITSConstrained = BIT(2), // Pixel OR necessary for the electrons
49 kTrkElectronsPID = BIT(3), // PID for the electrons
50 kTrkGlobalNoDCA = BIT(4), // standard cuts with very loose DCA
51 kTrkGlobal = BIT(5), // standard cuts with tight DCA cut
52 kTrkGlobalSDD = BIT(6), // standard cuts with tight DCA but with requiring the first SDD cluster instead of an SPD cluster tracks selected by this cut are exclusive to those selected by the previous cut
53 kTrkTPCOnlyConstrained = BIT(7) // TPC only tracks: TPConly information constrained to SPD vertex in the filter below
0e31a30a 54 };
55
56
4697e4fb 57 enum AODTrkPID_t {
1912763f 58 kElectron = 0,
59 kMuon = 1,
60 kPion = 2,
61 kKaon = 3,
62 kProton = 4,
4697e4fb 63 kDeuteron = 5,
64 kTriton = 6,
65 kHelium3 = 7,
66 kAlpha = 8,
67 kUnknown = 9,
68 kMostProbable = -1
69 };
df9db588 70
71 AliAODTrack();
02153d58 72 AliAODTrack(Short_t id,
df9db588 73 Int_t label,
74 Double_t p[3],
75 Bool_t cartesian,
76 Double_t x[3],
77 Bool_t dca,
78 Double_t covMatrix[21],
79 Short_t q,
80 UChar_t itsClusMap,
81 Double_t pid[10],
82 AliAODVertex *prodVertex,
1912763f 83 Bool_t usedForVtxFit,
dc825b15 84 Bool_t usedForPrimVtxFit,
ec40c484 85 AODTrk_t ttype=kUndef,
862ce351 86 UInt_t selectInfo=0,
87 Float_t chi2perNDF = -999.);
df9db588 88
02153d58 89 AliAODTrack(Short_t id,
df9db588 90 Int_t label,
91 Float_t p[3],
92 Bool_t cartesian,
93 Float_t x[3],
94 Bool_t dca,
95 Float_t covMatrix[21],
96 Short_t q,
97 UChar_t itsClusMap,
98 Float_t pid[10],
99 AliAODVertex *prodVertex,
1912763f 100 Bool_t usedForVtxFit,
dc825b15 101 Bool_t usedForPrimVtxFit,
ec40c484 102 AODTrk_t ttype=kUndef,
862ce351 103 UInt_t selectInfo=0,
104 Float_t chi2perNDF = -999.);
df9db588 105
106 virtual ~AliAODTrack();
107 AliAODTrack(const AliAODTrack& trk);
108 AliAODTrack& operator=(const AliAODTrack& trk);
109
110 // kinematics
16b65f2a 111 virtual Double_t OneOverPt() const { return (fMomentum[0] != 0.) ? 1./fMomentum[0] : -999.; }
df9db588 112 virtual Double_t Phi() const { return fMomentum[1]; }
113 virtual Double_t Theta() const { return fMomentum[2]; }
114
16b65f2a 115 virtual Double_t Px() const { return fMomentum[0] * TMath::Cos(fMomentum[1]); }
116 virtual Double_t Py() const { return fMomentum[0] * TMath::Sin(fMomentum[1]); }
117 virtual Double_t Pz() const { return fMomentum[0] / TMath::Tan(fMomentum[2]); }
118 virtual Double_t Pt() const { return fMomentum[0]; }
df9db588 119 virtual Double_t P() const { return TMath::Sqrt(Pt()*Pt()+Pz()*Pz()); }
c683ddc2 120 virtual Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
121
122 virtual Double_t Xv() const { return GetProdVertex() ? GetProdVertex()->GetX() : -999.; }
123 virtual Double_t Yv() const { return GetProdVertex() ? GetProdVertex()->GetY() : -999.; }
124 virtual Double_t Zv() const { return GetProdVertex() ? GetProdVertex()->GetZ() : -999.; }
125 virtual Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; }
126
c4460410 127 Double_t Chi2perNDF() const { return fChi2perNDF; }
0914b519 128 UShort_t GetTPCNcls() const {
5d8eaff6 129 UShort_t cl = fTPCFitMap.CountBits();
8e0bb2ab 130 if(cl==0)cl = fTPCClusterMap.CountBits();// backward compatibility
0914b519 131 return cl;
132 }
4697e4fb 133
134 virtual Double_t M() const { return M(GetMostProbablePID()); }
135 Double_t M(AODTrkPID_t pid) const;
136 virtual Double_t E() const { return E(GetMostProbablePID()); }
137 Double_t E(AODTrkPID_t pid) const;
138 Double_t E(Double_t m) const { return TMath::Sqrt(P()*P() + m*m); }
139 virtual Double_t Y() const { return Y(GetMostProbablePID()); }
140 Double_t Y(AODTrkPID_t pid) const;
141 Double_t Y(Double_t m) const;
df9db588 142
143 virtual Double_t Eta() const { return -TMath::Log(TMath::Tan(0.5 * fMomentum[2])); }
df9db588 144
145 virtual Short_t Charge() const {return fCharge; }
146
6dc40b1c 147 virtual Bool_t PropagateToDCA(const AliVVertex *vtx,
148 Double_t b, Double_t maxd, Double_t dz[2], Double_t covar[3]);
149
df9db588 150 // PID
151 virtual const Double_t *PID() const { return fPID; }
4697e4fb 152 AODTrkPID_t GetMostProbablePID() const;
153 void ConvertAliPIDtoAODPID();
e68fa179 154 void SetDetPID(AliAODPid *aodpid) {fDetPid = aodpid;}
df9db588 155
156 template <class T> void GetPID(T *pid) const {
157 for(Int_t i=0; i<10; ++i) pid[i]=fPID[i];}
158
159 template <class T> void SetPID(const T *pid) {
160 if(pid) for(Int_t i=0; i<10; ++i) fPID[i]=pid[i];
f12d42ce 161 else {for(Int_t i=0; i<10; fPID[i++]=0.) ; fPID[AliAODTrack::kUnknown]=1.;}}
df9db588 162
6efb741f 163 Bool_t IsOn(Int_t mask) const {return (fFlags&mask)>0;}
164 ULong_t GetStatus() const { return GetFlags(); }
165 ULong_t GetFlags() const { return fFlags; }
166
4f6e22bd 167 Int_t GetID() const { return (Int_t)fID; }
02153d58 168 Int_t GetLabel() const { return fLabel; }
169 Char_t GetType() const { return fType;}
862ce351 170 Bool_t IsPrimaryCandidate() const;
02153d58 171 Bool_t GetUsedForVtxFit() const { return TestBit(kUsedForVtxFit); }
172 Bool_t GetUsedForPrimVtxFit() const { return TestBit(kUsedForPrimVtxFit); }
9e3e4265 173
174 Bool_t IsHybridGlobalConstrainedGlobal() const { return TestBit(kIsHybridGCG); }
175 Bool_t IsHybridTPCConstrainedGlobal() const { return TestBit(kIsHybridTPCCG); }
176 Bool_t IsTPCOnly() const { return IsTPCConstrained(); } // obsolete bad naming
177 Bool_t IsTPCConstrained() const { return TestBit(kIsTPCConstrained); }
178 Bool_t IsGlobalConstrained() const { return TestBit(kIsGlobalConstrained); }
76e6ee6a 179 //
1cecd6e3 180 Int_t GetTOFBunchCrossing(Double_t b=0, Bool_t tpcPIDonly=kFALSE) const;
76e6ee6a 181 //
df9db588 182 template <class T> void GetP(T *p) const {
183 p[0]=fMomentum[0]; p[1]=fMomentum[1]; p[2]=fMomentum[2];}
184
c8fe2783 185// template <class T> void GetPxPyPz(T *p) const {
186// p[0] = Px(); p[1] = Py(); p[2] = Pz();}
187 Bool_t GetPxPyPz(Double_t *p) const;
df9db588 188
189 template <class T> Bool_t GetPosition(T *x) const {
190 x[0]=fPosition[0]; x[1]=fPosition[1]; x[2]=fPosition[2];
191 return TestBit(kIsDCA);}
192
193 template <class T> void SetCovMatrix(const T *covMatrix) {
5d62ce04 194 if(!fCovMatrix) fCovMatrix=new AliAODRedCov<6>();
df9db588 195 fCovMatrix->SetCovMatrix(covMatrix);}
196
197 template <class T> Bool_t GetCovMatrix(T *covMatrix) const {
198 if(!fCovMatrix) return kFALSE;
199 fCovMatrix->GetCovMatrix(covMatrix); return kTRUE;}
200
892be05f 201 Bool_t GetXYZ(Double_t *p) const {
202 return GetPosition(p); }
086400fc 203
204 Bool_t GetXYZAt(Double_t x, Double_t b, Double_t *r) const;
205
4f6e22bd 206 Bool_t GetCovarianceXYZPxPyPz(Double_t cv[21]) const {
207 return GetCovMatrix(cv);}
208
df9db588 209 void RemoveCovMatrix() {delete fCovMatrix; fCovMatrix=NULL;}
210
6c954176 211 Double_t XAtDCA() const { return fPositionAtDCA[0]; }
212 Double_t YAtDCA() const { return fPositionAtDCA[1]; }
213 Double_t ZAtDCA() const {
214 if (IsMuonTrack()) return fPosition[2];
215 else if (TestBit(kIsDCA)) return fPosition[1];
216 else return -999.; }
217 Bool_t XYZAtDCA(Double_t x[3]) const { x[0] = XAtDCA(); x[1] = YAtDCA(); x[2] = ZAtDCA(); return kTRUE; }
218
219 Double_t DCA() const {
220 if (IsMuonTrack()) return TMath::Sqrt(XAtDCA()*XAtDCA() + YAtDCA()*YAtDCA());
221 else if (TestBit(kIsDCA)) return fPosition[0];
222 else return -999.; }
223
224 Double_t PxAtDCA() const { return fMomentumAtDCA[0]; }
225 Double_t PyAtDCA() const { return fMomentumAtDCA[1]; }
226 Double_t PzAtDCA() const { return fMomentumAtDCA[2]; }
227 Double_t PAtDCA() const { return TMath::Sqrt(PxAtDCA()*PxAtDCA() + PyAtDCA()*PyAtDCA() + PzAtDCA()*PzAtDCA()); }
228 Bool_t PxPyPzAtDCA(Double_t p[3]) const { p[0] = PxAtDCA(); p[1] = PyAtDCA(); p[2] = PzAtDCA(); return kTRUE; }
229
f43586f0 230 Double_t GetRAtAbsorberEnd() const { return fRAtAbsorberEnd; }
231
6c954176 232 UChar_t GetITSClusterMap() const { return (UChar_t)(fITSMuonClusterMap&0xff); }
6dc40b1c 233 Int_t GetITSNcls() const;
234 Bool_t HasPointOnITSLayer(Int_t i) const { return TESTBIT(GetITSClusterMap(),i); }
6c954176 235 UShort_t GetHitsPatternInTrigCh() const { return (UShort_t)((fITSMuonClusterMap&0xff00)>>8); }
236 UInt_t GetMUONClusterMap() const { return (fITSMuonClusterMap&0x3ff0000)>>16; }
237 UInt_t GetITSMUONClusterMap() const { return fITSMuonClusterMap; }
238
8a1418dc 239 Bool_t TestFilterBit(UInt_t filterBit) const {return (Bool_t) ((filterBit & fFilterMap) != 0);}
6db112a4 240 Bool_t TestFilterMask(UInt_t filterMask) const {return (Bool_t) ((filterMask & fFilterMap) == filterMask);}
e4b91233 241 void SetFilterMap(UInt_t i){fFilterMap = i;}
681b1d8b 242 UInt_t GetFilterMap() const {return fFilterMap;}
df9db588 243
507ed024 244 const TBits& GetTPCClusterMap() const {return fTPCClusterMap;}
086400fc 245 const TBits* GetTPCClusterMapPtr() const {return &fTPCClusterMap;}
bcabd0e4 246 const TBits& GetTPCFitMap() const {return fTPCFitMap;}
25f906db 247 Float_t GetTPCClusterInfo(Int_t nNeighbours=3, Int_t type=0, Int_t row0=0, Int_t row1=159, Int_t /*type*/=0) const;
9006fe9c 248
507ed024 249 const TBits& GetTPCSharedMap() const {return fTPCSharedMap;}
250 void SetTPCClusterMap(const TBits amap) {fTPCClusterMap = amap;}
251 void SetTPCSharedMap(const TBits amap) {fTPCSharedMap = amap;}
bcabd0e4 252 void SetTPCFitMap(const TBits amap) {fTPCFitMap = amap;}
3c01c166 253 void SetTPCPointsF(UShort_t findable){fTPCnclsF = findable;}
254
255 UShort_t GetTPCNclsF() const { return fTPCnclsF;}
256
a7d9ab9e 257 // Calorimeter Cluster
258 Int_t GetEMCALcluster() const {return fCaloIndex;}
259 void SetEMCALcluster(Int_t index) {fCaloIndex=index;}
260 Bool_t IsEMCAL() const {return fFlags&kEMCALmatch;}
261
ed15417e 262 Double_t GetTrackPhiOnEMCal() const {return fTrackPhiOnEMCal;}
263 Double_t GetTrackEtaOnEMCal() const {return fTrackEtaOnEMCal;}
264 void SetTrackPhiEtaOnEMCal(Double_t phi,Double_t eta) {fTrackPhiOnEMCal=phi;fTrackEtaOnEMCal=eta;}
265
a7d9ab9e 266 Int_t GetPHOScluster() const {return fCaloIndex;}
267 void SetPHOScluster(Int_t index) {fCaloIndex=index;}
268 Bool_t IsPHOS() const {return fFlags&kPHOSmatch;}
269
9006fe9c 270 //pid signal interface
271 Double_t GetITSsignal() const { return fDetPid?fDetPid->GetITSsignal():0.; }
272 Double_t GetTPCsignal() const { return fDetPid?fDetPid->GetTPCsignal():0.; }
273 UShort_t GetTPCsignalN() const { return fDetPid?fDetPid->GetTPCsignalN():0; }
de26d2c7 274 virtual AliTPCdEdxInfo* GetTPCdEdxInfo() const {return fDetPid?fDetPid->GetTPCdEdxInfo():0;}
9006fe9c 275 Double_t GetTPCmomentum() const { return fDetPid?fDetPid->GetTPCmomentum():0.; }
5839d3e1 276 Double_t GetTOFsignal() const { return fDetPid?fDetPid->GetTOFsignal():0.; }
277 Double_t GetHMPIDsignal() const { return fDetPid?fDetPid->GetHMPIDsignal():0.; }
278
ea235c90 279 void GetIntegratedTimes(Double_t *times) const {if (fDetPid) fDetPid->GetIntegratedTimes(times); }
fd21ec8d 280 Double_t GetTRDslice(Int_t plane, Int_t slice) const;
ea235c90 281 Double_t GetTRDmomentum(Int_t plane, Double_t */*sp*/=0x0) const;
59a8e853 282 UChar_t GetTRDncls(Int_t layer = -1) const;
99e9d5ec 283 UChar_t GetTRDntrackletsPID() const;
ea235c90 284 void GetHMPIDpid(Double_t *p) const { if (fDetPid) fDetPid->GetHMPIDprobs(p); }
fd21ec8d 285
9006fe9c 286
7be1db84 287 AliAODPid *GetDetPid() const { return fDetPid; }
df9db588 288 AliAODVertex *GetProdVertex() const { return (AliAODVertex*)fProdVertex.GetObject(); }
289
290 // print
291 void Print(const Option_t *opt = "") const;
292
293 // setters
6efb741f 294 void SetFlags(ULong_t flags) { fFlags = flags; }
295 void SetStatus(ULong_t flags) { fFlags|=flags; }
296 void ResetStatus(ULong_t flags) { fFlags&=~flags; }
297
02153d58 298 void SetID(Short_t id) { fID = id; }
6efb741f 299 void SetLabel(Int_t label) { fLabel = label; }
df9db588 300
14b34be5 301 template <class T> void SetPosition(const T *x, Bool_t isDCA = kFALSE);
df9db588 302 void SetDCA(Double_t d, Double_t z);
1912763f 303 void SetUsedForVtxFit(Bool_t used = kTRUE) { used ? SetBit(kUsedForVtxFit) : ResetBit(kUsedForVtxFit); }
dc825b15 304 void SetUsedForPrimVtxFit(Bool_t used = kTRUE) { used ? SetBit(kUsedForPrimVtxFit) : ResetBit(kUsedForPrimVtxFit); }
9e3e4265 305
306 void SetIsTPCOnly(Bool_t b = kTRUE) { SetIsTPCConstrained(b); }// obsolete bad naming
041743e4 307
9e3e4265 308 void SetIsTPCConstrained(Bool_t b = kTRUE) { b ? SetBit(kIsTPCConstrained) : ResetBit(kIsTPCConstrained); }
041743e4 309 void SetIsHybridTPCConstrainedGlobal(Bool_t hybrid = kTRUE) { hybrid ? SetBit(kIsHybridTPCCG) : ResetBit(kIsHybridTPCCG); }
310
9e3e4265 311 void SetIsGlobalConstrained(Bool_t b = kTRUE) { b ? SetBit(kIsGlobalConstrained) : ResetBit(kIsGlobalConstrained); }
312 void SetIsHybridGlobalConstrainedGlobal(Bool_t hybrid = kTRUE) { hybrid ? SetBit(kIsHybridGCG) : ResetBit(kIsHybridGCG); }
313
314
df9db588 315
f4ad422f 316 void SetOneOverPt(Double_t oneOverPt) { fMomentum[0] = 1. / oneOverPt; }
16b65f2a 317 void SetPt(Double_t pt) { fMomentum[0] = pt; };
14b34be5 318 void SetPhi(Double_t phi) { fMomentum[1] = phi; }
319 void SetTheta(Double_t theta) { fMomentum[2] = theta; }
320 template <class T> void SetP(const T *p, Bool_t cartesian = kTRUE);
df9db588 321 void SetP() {fMomentum[0]=fMomentum[1]=fMomentum[2]=-999.;}
322
6c954176 323 void SetXYAtDCA(Double_t x, Double_t y) {fPositionAtDCA[0] = x; fPositionAtDCA[1] = y;}
324 void SetPxPyPzAtDCA(Double_t pX, Double_t pY, Double_t pZ) {fMomentumAtDCA[0] = pX; fMomentumAtDCA[1] = pY; fMomentumAtDCA[2] = pZ;}
325
f43586f0 326 void SetRAtAbsorberEnd(Double_t r) { fRAtAbsorberEnd = r; }
327
14b34be5 328 void SetCharge(Short_t q) { fCharge = q; }
1912763f 329 void SetChi2perNDF(Double_t chi2perNDF) { fChi2perNDF = chi2perNDF; }
df9db588 330
6c954176 331 void SetITSClusterMap(UChar_t itsClusMap) { fITSMuonClusterMap = (fITSMuonClusterMap&0xffffff00)|(((UInt_t)itsClusMap)&0xff); }
332 void SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh) { fITSMuonClusterMap = (fITSMuonClusterMap&0xffff00ff)|((((UInt_t)hitsPatternInTrigCh)&0xff)<<8); }
333 void SetMuonClusterMap(UInt_t muonClusMap) { fITSMuonClusterMap = (fITSMuonClusterMap&0xfc00ffff)|((muonClusMap&0x3ff)<<16); }
334 void SetITSMuonClusterMap(UInt_t itsMuonClusMap) { fITSMuonClusterMap = itsMuonClusMap; }
0a2dcc83 335 void SetMUONtrigHitsMapTrg(UInt_t muonTrigHitsMap) { fMUONtrigHitsMapTrg = muonTrigHitsMap; }
336 UInt_t GetMUONTrigHitsMapTrg() { return fMUONtrigHitsMapTrg; }
337 void SetMUONtrigHitsMapTrk(UInt_t muonTrigHitsMap) { fMUONtrigHitsMapTrk = muonTrigHitsMap; }
338 UInt_t GetMUONTrigHitsMapTrk() { return fMUONtrigHitsMapTrk; }
df9db588 339
8a1418dc 340 Int_t GetMatchTrigger() const {return fITSMuonClusterMap>>30;}
e1c744ca 341 // 0 Muon track does not match trigger
342 // 1 Muon track match but does not pass pt cut
343 // 2 Muon track match Low pt cut
344 // 3 Muon track match High pt cut
345 void SetMatchTrigger(Int_t MatchTrigger);
2200238e 346 Bool_t MatchTrigger() const { return (GetMatchTrigger()>0); } // Muon track matches trigger track
347 Bool_t MatchTriggerLowPt() const { return (GetMatchTrigger()>1); } // Muon track matches trigger track and passes Low pt cut
348 Bool_t MatchTriggerHighPt() const { return (GetMatchTrigger()>2); } // Muon track matches trigger track and passes High pt cut
349 Bool_t MatchTriggerDigits() const; // Muon track matches trigger digits
8a1418dc 350 Double_t GetChi2MatchTrigger() const { return fChi2MatchTrigger;}
6c954176 351 void SetChi2MatchTrigger(Double_t Chi2MatchTrigger) {fChi2MatchTrigger = Chi2MatchTrigger; }
2200238e 352 Bool_t HitsMuonChamber(Int_t MuonChamber, Int_t cathode = -1) const; // Check if track hits Muon chambers
6c954176 353 Bool_t IsMuonTrack() const { return (GetMUONClusterMap()>0) ? kTRUE : kFALSE; }
5c15a68b 354
355 void Connected(Bool_t flag) {flag ? SETBIT(fITSMuonClusterMap,26) : CLRBIT(fITSMuonClusterMap,26);}
356 Bool_t IsConnected() const {return TESTBIT(fITSMuonClusterMap,26);}
e1c744ca 357
c683ddc2 358 void SetProdVertex(TObject *vertex) { fProdVertex = vertex; }
359 void SetType(AODTrk_t ttype) { fType=ttype; }
360
6dc40b1c 361
362
6a8e543a 363 // Dummy
364 Int_t PdgCode() const {return 0;}
365
df9db588 366 private :
367
368 // Momentum & position
1912763f 369 Double32_t fMomentum[3]; // momemtum stored in pt, phi, theta
370 Double32_t fPosition[3]; // position of first point on track or dca
6c954176 371
372 Double32_t fMomentumAtDCA[3]; // momentum (px,py,pz) at DCA
373 Double32_t fPositionAtDCA[2]; // trasverse position (x,y) at DCA
374
f43586f0 375 Double32_t fRAtAbsorberEnd; // transverse position r at the end of the muon absorber
376
862ce351 377 Double32_t fChi2perNDF; // chi2/NDF of momentum fit
9333290e 378 Double32_t fChi2MatchTrigger; // chi2 of trigger/track matching
379 Double32_t fPID[10]; // [0.,1.,8] pointer to PID object
df9db588 380
6efb741f 381 ULong_t fFlags; // reconstruction status flags
1912763f 382 Int_t fLabel; // track label, points back to MC track
df9db588 383
6c954176 384 UInt_t fITSMuonClusterMap; // map of ITS and muon clusters, one bit per layer
385 // (ITS: bit 1-8, muon trigger: bit 9-16, muon tracker: bit 17-26, muon match trigger: bit 31-32)
0a2dcc83 386 UInt_t fMUONtrigHitsMapTrg; // Muon trigger hits map from trigger
387 UInt_t fMUONtrigHitsMapTrk; // Muon trigger hits map from tracker track extrapolation
9333290e 388 UInt_t fFilterMap; // filter information, one bit per set of cuts
df9db588 389
bcabd0e4 390 TBits fTPCFitMap; // Map of clusters, one bit per padrow; if has a cluster on given padrow which is used in the fit
507ed024 391 TBits fTPCClusterMap; // Map of clusters, one bit per padrow; 1 if has a cluster on given padrow
392 TBits fTPCSharedMap; // Map of clusters, one bit per padrow; 1 if has a shared cluster on given padrow
bcabd0e4 393
3c01c166 394 UShort_t fTPCnclsF; // findable clusters
507ed024 395
02153d58 396 Short_t fID; // unique track ID, points back to the ESD track
397
1912763f 398 Char_t fCharge; // particle charge
1912763f 399 Char_t fType; // Track Type
a7d9ab9e 400
401 Int_t fCaloIndex; // index of associated EMCAL/PHOS cluster (AliAODCaloCluster)
402
507ed024 403
9333290e 404 AliAODRedCov<6> *fCovMatrix; // covariance matrix (x, y, z, px, py, pz)
7be1db84 405 AliAODPid *fDetPid; // more detailed or detector specific pid information
9333290e 406 TRef fProdVertex; // vertex of origin
df9db588 407
ed15417e 408 Double_t fTrackPhiOnEMCal; // phi of track after being propagated to 430cm
409 Double_t fTrackEtaOnEMCal; // eta of track after being propagated to 430cm
410
411 ClassDef(AliAODTrack, 16);
df9db588 412};
413
862ce351 414inline Bool_t AliAODTrack::IsPrimaryCandidate() const
415{
416 // True of track passes primary particle selection (independent of type)
417 //
418 if (fFilterMap) {
419 return kTRUE;
420 } else {
421 return kFALSE;
422 }
423}
424
6dc40b1c 425inline Int_t AliAODTrack::GetITSNcls() const
426{
427 // Number of points in ITS
428 Int_t n=0;
429 for(Int_t i=0;i<6;i++) if(HasPointOnITSLayer(i)) n++;
430 return n;
431}
432
df9db588 433#endif