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