]>
Commit | Line | Data |
---|---|---|
46d29e70 | 1 | #ifndef ALITRDTRACK_H |
b3a5a838 | 2 | #define ALITRDTRACK_H |
46d29e70 | 3 | |
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
b3a5a838 | 5 | * See cxx source for full Copyright notice */ |
46d29e70 | 6 | |
5443e65e | 7 | #include <AliKalmanTrack.h> |
b3a5a838 | 8 | #include <TMath.h> |
46d29e70 | 9 | |
9c9d2487 | 10 | #include "AliBarrelTrack.h" |
11 | #include "AliTRDgeometry.h" | |
12 | #include "TVector2.h" | |
13 | ||
46d29e70 | 14 | class AliTRDcluster; |
b3a5a838 | 15 | class AliTPCtrack; |
5443e65e | 16 | |
17 | const unsigned kMAX_CLUSTERS_PER_TRACK=210; | |
46d29e70 | 18 | |
5443e65e | 19 | class AliTRDtrack : public AliKalmanTrack { |
46d29e70 | 20 | |
21 | // Represents reconstructed TRD track | |
22 | ||
46d29e70 | 23 | public: |
24 | ||
5443e65e | 25 | AliTRDtrack():AliKalmanTrack(){} |
a819a5f7 | 26 | AliTRDtrack(const AliTRDcluster *c, UInt_t index, const Double_t xx[5], |
46d29e70 | 27 | const Double_t cc[15], Double_t xr, Double_t alpha); |
28 | AliTRDtrack(const AliTRDtrack& t); | |
5443e65e | 29 | AliTRDtrack(const AliKalmanTrack& t, Double_t alpha); |
46d29e70 | 30 | |
a819a5f7 | 31 | Int_t Compare(const TObject *o) const; |
32 | void CookdEdx(Double_t low=0.05, Double_t up=0.70); | |
46d29e70 | 33 | |
34 | Double_t GetAlpha() const {return fAlpha;} | |
9c9d2487 | 35 | Int_t GetSector() const { |
36 | //if (fabs(fAlpha) < AliTRDgeometry::GetAlpha()/2) return 0; | |
37 | return Int_t(TVector2::Phi_0_2pi(fAlpha)/AliTRDgeometry::GetAlpha())%AliTRDgeometry::kNsect;} | |
38 | ||
46d29e70 | 39 | Double_t GetC() const {return fC;} |
40 | Int_t GetClusterIndex(Int_t i) const {return fIndex[i];} | |
a819a5f7 | 41 | Float_t GetClusterdQdl(Int_t i) const {return fdQdl[i];} |
5443e65e | 42 | |
46d29e70 | 43 | void GetCovariance(Double_t cov[15]) const; |
c5507f6d | 44 | Double_t GetdEdx() const {return fdEdx;} |
46d29e70 | 45 | Double_t GetEta() const {return fE;} |
5443e65e | 46 | |
47 | void GetExternalCovariance(Double_t cov[15]) const ; | |
48 | void GetExternalParameters(Double_t& xr, Double_t x[5]) const ; | |
49 | ||
50 | Double_t GetLikelihoodElectron() const { return fLhElectron; }; | |
51 | ||
b8dc2353 | 52 | Double_t Get1Pt() const {return (1e-9*TMath::Abs(fC)/fC + fC)*GetConvConst(); } |
46d29e70 | 53 | Double_t GetP() const { |
54 | return TMath::Abs(GetPt())*sqrt(1.+GetTgl()*GetTgl()); | |
55 | } | |
fd621f36 | 56 | Double_t GetPredictedChi2(const AliTRDcluster*, Double_t h01) const ; |
5443e65e | 57 | Double_t GetPt() const {return 1./Get1Pt();} |
46d29e70 | 58 | void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const ; |
5443e65e | 59 | void GetGlobalXYZ(Double_t &x, Double_t &y, Double_t &z) const ; |
60 | Int_t GetSeedLabel() const { return fSeedLab; } | |
46d29e70 | 61 | Double_t GetSigmaC2() const {return fCcc;} |
62 | Double_t GetSigmaTgl2() const {return fCtt;} | |
63 | Double_t GetSigmaY2() const {return fCyy;} | |
64 | Double_t GetSigmaZ2() const {return fCzz;} | |
5443e65e | 65 | Double_t GetSnp() const {return fX*fC - fE;} |
66 | Double_t GetTgl() const {return fT;} | |
67 | Double_t GetX() const {return fX;} | |
68 | Double_t GetY() const {return fY;} | |
69 | Double_t GetZ() const {return fZ;} | |
46d29e70 | 70 | |
b3a5a838 | 71 | Int_t PropagateTo(Double_t xr, Double_t x0=8.72, Double_t rho=5.86e-3); |
5443e65e | 72 | void ResetCovariance(); |
46d29e70 | 73 | Int_t Rotate(Double_t angle); |
74 | ||
46d29e70 | 75 | void SetdEdx(Float_t dedx) {fdEdx=dedx;} |
5443e65e | 76 | void SetLikelihoodElectron(Float_t l) { fLhElectron = l; }; |
77 | ||
78 | void SetSampledEdx(Float_t q, Int_t i) { | |
79 | Double_t s=GetSnp(), t=GetTgl(); | |
80 | q*= TMath::Sqrt((1-s*s)/(1+t*t)); | |
81 | fdQdl[i]=q; | |
82 | } | |
83 | ||
84 | void SetSeedLabel(Int_t lab) { fSeedLab=lab; } | |
85 | ||
fd621f36 | 86 | Int_t Update(const AliTRDcluster* c, Double_t chi2, UInt_t i, |
b8dc2353 | 87 | Double_t h01); |
fd621f36 | 88 | |
9c9d2487 | 89 | // |
90 | void GetBarrelTrack(AliBarrelTrack *track); | |
91 | void AddNWrong() {fNWrong++;} | |
92 | ||
93 | Int_t GetNWrong() const {return fNWrong;} | |
94 | Int_t GetNRotate() const {return fNRotate;} | |
95 | // | |
96 | ||
97 | ||
bbf92647 | 98 | protected: |
99 | ||
5443e65e | 100 | Int_t fSeedLab; // track label taken from seeding |
bbf92647 | 101 | Float_t fdEdx; // dE/dx |
102 | ||
103 | Double_t fAlpha; // rotation angle | |
104 | Double_t fX; // running local X-coordinate of the track (time bin) | |
105 | ||
b8dc2353 | 106 | |
107 | Double_t fY; // Y-coordinate of the track | |
108 | Double_t fZ; // Z-coordinate of the track | |
109 | Double_t fE; // C*x0 | |
110 | Double_t fT; // tangent of the track momentum dip angle | |
111 | Double_t fC; // track curvature | |
bbf92647 | 112 | |
113 | Double_t fCyy; // covariance | |
114 | Double_t fCzy, fCzz; // matrix | |
b3a5a838 | 115 | Double_t fCey, fCez, fCee; // of the |
116 | Double_t fCty, fCtz, fCte, fCtt; // track | |
117 | Double_t fCcy, fCcz, fCce, fCct, fCcc; // parameters | |
b8dc2353 | 118 | |
5443e65e | 119 | UInt_t fIndex[kMAX_CLUSTERS_PER_TRACK]; // global indexes of clusters |
120 | Float_t fdQdl[kMAX_CLUSTERS_PER_TRACK]; // cluster amplitudes corrected | |
121 | // for track angles | |
b8dc2353 | 122 | |
a819a5f7 | 123 | Float_t fLhElectron; // Likelihood to be an electron |
9c9d2487 | 124 | Int_t fNWrong; // number of wrong clusters |
125 | Int_t fNRotate; | |
bbf92647 | 126 | |
a819a5f7 | 127 | ClassDef(AliTRDtrack,2) // TRD reconstructed tracks |
a2b90f83 | 128 | |
46d29e70 | 129 | }; |
130 | ||
131 | ||
46d29e70 | 132 | #endif |