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