]>
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 "AliTRDgeometry.h" |
11 | #include "TVector2.h" | |
12 | ||
46d29e70 | 13 | class AliTRDcluster; |
b3a5a838 | 14 | class AliTPCtrack; |
79e94bf8 | 15 | class AliESDtrack; |
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 | ||
16d9fbba | 25 | AliTRDtrack():AliKalmanTrack(){fBackupTrack=0;} |
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); |
79e94bf8 | 30 | AliTRDtrack(const AliESDtrack& t); |
16d9fbba | 31 | ~AliTRDtrack(); |
a819a5f7 | 32 | Int_t Compare(const TObject *o) const; |
33 | void CookdEdx(Double_t low=0.05, Double_t up=0.70); | |
46d29e70 | 34 | |
35 | Double_t GetAlpha() const {return fAlpha;} | |
9c9d2487 | 36 | Int_t GetSector() const { |
37 | //if (fabs(fAlpha) < AliTRDgeometry::GetAlpha()/2) return 0; | |
38 | return Int_t(TVector2::Phi_0_2pi(fAlpha)/AliTRDgeometry::GetAlpha())%AliTRDgeometry::kNsect;} | |
39 | ||
46d29e70 | 40 | Double_t GetC() const {return fC;} |
41 | Int_t GetClusterIndex(Int_t i) const {return fIndex[i];} | |
a819a5f7 | 42 | Float_t GetClusterdQdl(Int_t i) const {return fdQdl[i];} |
5443e65e | 43 | |
46d29e70 | 44 | void GetCovariance(Double_t cov[15]) const; |
c5507f6d | 45 | Double_t GetdEdx() const {return fdEdx;} |
79e94bf8 | 46 | Double_t GetPIDsignal() const {return GetdEdx();} |
eab5961e | 47 | Float_t GetPIDsignals(Int_t i) const {return fdEdxPlane[i];} |
48 | Int_t GetPIDTimBin(Int_t i) const {return fTimBinPlane[i];} | |
46d29e70 | 49 | Double_t GetEta() const {return fE;} |
5443e65e | 50 | |
51 | void GetExternalCovariance(Double_t cov[15]) const ; | |
52 | void GetExternalParameters(Double_t& xr, Double_t x[5]) const ; | |
53 | ||
54 | Double_t GetLikelihoodElectron() const { return fLhElectron; }; | |
55 | ||
b8dc2353 | 56 | Double_t Get1Pt() const {return (1e-9*TMath::Abs(fC)/fC + fC)*GetConvConst(); } |
46d29e70 | 57 | Double_t GetP() const { |
58 | return TMath::Abs(GetPt())*sqrt(1.+GetTgl()*GetTgl()); | |
59 | } | |
fd621f36 | 60 | Double_t GetPredictedChi2(const AliTRDcluster*, Double_t h01) const ; |
5443e65e | 61 | Double_t GetPt() const {return 1./Get1Pt();} |
46d29e70 | 62 | void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const ; |
5443e65e | 63 | void GetGlobalXYZ(Double_t &x, Double_t &y, Double_t &z) const ; |
64 | Int_t GetSeedLabel() const { return fSeedLab; } | |
46d29e70 | 65 | Double_t GetSigmaC2() const {return fCcc;} |
66 | Double_t GetSigmaTgl2() const {return fCtt;} | |
67 | Double_t GetSigmaY2() const {return fCyy;} | |
68 | Double_t GetSigmaZ2() const {return fCzz;} | |
5443e65e | 69 | Double_t GetSnp() const {return fX*fC - fE;} |
70 | Double_t GetTgl() const {return fT;} | |
71 | Double_t GetX() const {return fX;} | |
72 | Double_t GetY() const {return fY;} | |
73 | Double_t GetZ() const {return fZ;} | |
46e2d86c | 74 | UInt_t * GetBackupIndexes() {return fIndexBackup;} |
75 | UInt_t * GetIndexes() {return fIndex;} | |
76 | ||
46d29e70 | 77 | |
3c625a9b | 78 | Double_t GetYat(Double_t xk) const { |
1e9bb598 | 79 | //----------------------------------------------------------------- |
80 | // This function calculates the Y-coordinate of a track at the plane x=xk. | |
81 | // Needed for matching with the TOF (I.Belikov) | |
82 | //----------------------------------------------------------------- | |
83 | Double_t c1=fC*fX - fE, r1=TMath::Sqrt(1.- c1*c1); | |
84 | Double_t c2=fC*xk - fE, r2=TMath::Sqrt(1.- c2*c2); | |
85 | return fY + (xk-fX)*(c1+c2)/(r1+r2); | |
86 | } | |
3c625a9b | 87 | void SetStop(Bool_t stop) {fStopped=stop;} |
88 | Bool_t GetStop() const {return fStopped;} | |
1e9bb598 | 89 | |
b3a5a838 | 90 | Int_t PropagateTo(Double_t xr, Double_t x0=8.72, Double_t rho=5.86e-3); |
5443e65e | 91 | void ResetCovariance(); |
46e2d86c | 92 | void ResetCovariance(Float_t mult); |
1e9bb598 | 93 | void ResetClusters() { SetChi2(0.); SetNumberOfClusters(0); } |
46d29e70 | 94 | Int_t Rotate(Double_t angle); |
95 | ||
46d29e70 | 96 | void SetdEdx(Float_t dedx) {fdEdx=dedx;} |
eab5961e | 97 | void SetPIDsignals(Float_t dedx, Int_t i) {fdEdxPlane[i]=dedx;} |
98 | void SetPIDTimBin(Int_t timbin, Int_t i) {fTimBinPlane[i]=timbin;} | |
5443e65e | 99 | void SetLikelihoodElectron(Float_t l) { fLhElectron = l; }; |
100 | ||
101 | void SetSampledEdx(Float_t q, Int_t i) { | |
102 | Double_t s=GetSnp(), t=GetTgl(); | |
103 | q*= TMath::Sqrt((1-s*s)/(1+t*t)); | |
104 | fdQdl[i]=q; | |
105 | } | |
106 | ||
107 | void SetSeedLabel(Int_t lab) { fSeedLab=lab; } | |
108 | ||
fd621f36 | 109 | Int_t Update(const AliTRDcluster* c, Double_t chi2, UInt_t i, |
b8dc2353 | 110 | Double_t h01); |
46e2d86c | 111 | Int_t UpdateMI(const AliTRDcluster* c, Double_t chi2, UInt_t i, |
3c625a9b | 112 | Double_t h01, Int_t plane); |
fd621f36 | 113 | |
9c9d2487 | 114 | // |
9c9d2487 | 115 | void AddNWrong() {fNWrong++;} |
116 | ||
117 | Int_t GetNWrong() const {return fNWrong;} | |
118 | Int_t GetNRotate() const {return fNRotate;} | |
16d9fbba | 119 | Int_t GetNCross() const {return fNCross;} |
120 | void IncCross() {fNCross++;} | |
121 | AliTRDtrack * GetBackupTrack(){return fBackupTrack;} | |
122 | void MakeBackupTrack(); | |
9c9d2487 | 123 | // |
124 | ||
125 | ||
bbf92647 | 126 | protected: |
127 | ||
5443e65e | 128 | Int_t fSeedLab; // track label taken from seeding |
bbf92647 | 129 | Float_t fdEdx; // dE/dx |
eab5961e | 130 | Float_t fdEdxPlane[kNPlane]; // dE/dx from all 6 planes |
131 | Int_t fTimBinPlane[kNPlane]; // time bin of Max cluster from all 6 planes | |
bbf92647 | 132 | |
133 | Double_t fAlpha; // rotation angle | |
134 | Double_t fX; // running local X-coordinate of the track (time bin) | |
3c625a9b | 135 | Bool_t fStopped; // track stop indication |
b8dc2353 | 136 | |
137 | Double_t fY; // Y-coordinate of the track | |
138 | Double_t fZ; // Z-coordinate of the track | |
139 | Double_t fE; // C*x0 | |
140 | Double_t fT; // tangent of the track momentum dip angle | |
141 | Double_t fC; // track curvature | |
bbf92647 | 142 | |
143 | Double_t fCyy; // covariance | |
144 | Double_t fCzy, fCzz; // matrix | |
b3a5a838 | 145 | Double_t fCey, fCez, fCee; // of the |
146 | Double_t fCty, fCtz, fCte, fCtt; // track | |
147 | Double_t fCcy, fCcz, fCce, fCct, fCcc; // parameters | |
b8dc2353 | 148 | |
5443e65e | 149 | UInt_t fIndex[kMAX_CLUSTERS_PER_TRACK]; // global indexes of clusters |
46e2d86c | 150 | UInt_t fIndexBackup[kMAX_CLUSTERS_PER_TRACK]; //backup indexes of clusters - used in iterations |
5443e65e | 151 | Float_t fdQdl[kMAX_CLUSTERS_PER_TRACK]; // cluster amplitudes corrected |
152 | // for track angles | |
b8dc2353 | 153 | |
a819a5f7 | 154 | Float_t fLhElectron; // Likelihood to be an electron |
9c9d2487 | 155 | Int_t fNWrong; // number of wrong clusters |
16d9fbba | 156 | Int_t fNRotate; // number of rotation |
157 | Int_t fNCross; // number of the cross materials | |
158 | AliTRDtrack * fBackupTrack; //! backup track | |
a819a5f7 | 159 | ClassDef(AliTRDtrack,2) // TRD reconstructed tracks |
a2b90f83 | 160 | |
46d29e70 | 161 | }; |
162 | ||
163 | ||
46d29e70 | 164 | #endif |