4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 ///////////////////////////////////////////////////////////////////////////////
11 // Represents a reconstructed TRD track //
13 ///////////////////////////////////////////////////////////////////////////////
15 #include "AliKalmanTrack.h"
17 #include "AliTRDtracklet.h"
20 class AliTrackReference;
23 class AliTRDtrack : public AliKalmanTrack {
27 enum { kMAXCLUSTERSPERTRACK = 210 };
37 enum AliTRDPIDMethod {
42 AliTRDtrack(/*const*/ AliTRDcluster *c, Int_t index
43 , const Double_t xx[5], const Double_t cc[15]
44 , Double_t xr, Double_t alpha);
45 AliTRDtrack(const AliTRDtrack &t/*, const Bool_t owner = kTRUE*/);
46 AliTRDtrack(const AliESDtrack &t);
48 AliTRDtrack(const AliKalmanTrack &t, Double_t alpha);
50 void ResetClusters() { SetChi2(0.0);
51 SetNumberOfClusters(0); }
52 Int_t Compare(const TObject *o) const;
53 void AddNWrong() { fNWrong++; }
54 void IncCross() { fNCross++;
56 fBackupTrack->IncCross(); }
58 Int_t GetSector() const;
59 Float_t GetClusterdQdl(Int_t i) const { return fdQdl[i]; }
60 Double_t GetdEdx() const { return fdEdx; }
61 Int_t GetNdedx() const { return fNdedx; }
62 Double_t GetPIDsignal() const { return GetdEdx(); }
63 Int_t GetClusterIndex(Int_t i) const { return fIndex[i]; }
64 Double_t GetC() const { return AliExternalTrackParam
66 Double_t GetPredictedChi2(const AliTRDcluster *c
67 , Double_t h01) const;
68 AliTRDPIDMethod GetPIDMethod() const { return fPIDmethod; }
69 Float_t GetPIDsignals(Int_t iPlane
70 , Int_t iSlice) const { return fdEdxPlane[iPlane][iSlice]; }
71 Int_t GetPIDTimBin(Int_t i) const { return fTimBinPlane[i]; }
72 Double_t GetLikelihoodElectron() const { return fLhElectron; }
73 Int_t GetSeedLabel() const { return fSeedLab; }
74 Int_t *GetBackupIndexes() { return fIndexBackup; }
75 Int_t *GetIndexes() { return fIndex; }
76 Int_t GetProlongation(Double_t xk
79 Bool_t GetStop() const { return fStopped; }
80 Int_t GetNRotate() const { return fNRotate; }
81 Int_t GetNWrong() const { return fNWrong; }
82 Int_t GetNCross() const { return fNCross; }
83 Int_t GetNExpected() const { return fNExpected; }
84 Int_t GetNLast() const { return fNLast; }
85 Int_t GetNExpectedLast() const { return fNExpectedLast; }
86 AliTRDtracklet GetTracklets(Int_t i) const { return fTracklets[i]; }
87 Float_t GetBudget(Int_t i) const { return fBudget[i]; }
88 Float_t GetChi2Last() const { return fChi2Last; }
89 AliTRDtrack *GetBackupTrack() { return fBackupTrack; }
91 void SetdEdx(Double_t dedx) { fdEdx = dedx; }
92 void SetStop(Bool_t stop) { fStopped = stop; }
93 void SetPIDsignals(Float_t dedx
95 , Int_t iSlice) { fdEdxPlane[iPlane][iSlice] = dedx; }
96 void SetPIDTimBin(Int_t timbin, Int_t i) { fTimBinPlane[i] = timbin; }
97 void SetLikelihoodElectron(Float_t l) { fLhElectron = l; }
98 void SetSampledEdx(Float_t q, Int_t i);
99 void SetSampledEdx(Float_t q);
100 void SetSeedLabel(Int_t lab) { fSeedLab = lab; }
101 void SetNWrong(Int_t nwrong) { fNWrong = nwrong; }
102 void SetNCross(Int_t ncross) { fNCross = ncross; }
103 void SetNExpected(Int_t nexp) { fNExpected = nexp; }
104 void SetNLast(Int_t nlast) { fNLast = nlast; }
105 void SetNExpectedLast(Int_t nexp) { fNExpectedLast = nexp; }
106 void SetChi2Last(Float_t chi2) { fChi2Last = chi2; }
107 void SetTracklets(Int_t i, AliTRDtracklet t) { fTracklets[i] = t; }
108 void SetBudget(Int_t i, Float_t budget) { fBudget[i] = budget; }
109 void SetPIDMethod(AliTRDPIDMethod method) { fPIDmethod = method; }
111 void SetTrackSegmentDirMom(const Int_t plane);
112 void CookdEdx(Double_t low = 0.05, Double_t up = 0.7);
113 void CookdEdxTimBin(const Int_t tid);
114 Bool_t CookPID(Int_t &pidQuality);
115 void SetCluster(AliTRDcluster* cl
116 , Int_t index = -1) { fClusters[(index == -1)
117 ? GetNumberOfClusters()-1
119 AliTRDcluster* GetCluster(Int_t layer) const { return (layer >= 0 &&
120 layer < GetNumberOfClusters())
123 Float_t GetMomentumPlane(Int_t plane) const { return (plane >= 0 &&
127 const Double_t* GetPID() const { return fPID; }
128 Float_t GetSnpPlane(Int_t plane) const { return (plane >= 0 &&
132 Float_t GetTglPlane(Int_t plane) const { return (plane >= 0 &&
136 Float_t GetTrackLengthPlane(Int_t plane) const;
138 void MakeBackupTrack();
139 Bool_t PropagateTo(Double_t xr, Double_t x0 = 8.72, Double_t rho = 5.86e-3);
140 Int_t PropagateToR(Double_t xr, Double_t step);
141 Int_t PropagateToX(Double_t xr, Double_t step);
142 Bool_t Rotate(Double_t angle, Bool_t absolute = kFALSE);
143 Float_t StatusForTOF();
144 Bool_t Update(const AliTRDcluster *c, Double_t chi2, Int_t index, Double_t h01);
145 Bool_t Update(const AliTRDtracklet &tracklet, Double_t chi2, Int_t index);
146 Int_t UpdateMI(/*const */AliTRDcluster *c, Double_t chi2
147 , Int_t index, Double_t h01
148 , Int_t plane, Int_t tid = 0);
152 AliTRDtrack &operator=(const AliTRDtrack &t);
154 void CookdEdxNN(Float_t *dedx);
155 Double_t GetBz() const;
156 Bool_t Update(const AliCluster */*c*/, Double_t /*chi2*/, Int_t /*idx*/) { return 0; }
157 Double_t GetPredictedChi2(const AliCluster* /*c*/) const { return 0.0; }
161 Int_t fSeedLab; // Track label taken from seeding
162 Float_t fdEdx; // dE/dx (truncated mean)
163 Float_t fDE; // Integrated delta energy
164 Float_t fdEdxPlane[kNplane][kNslice]; // dE/dx from all 6 planes in 3 slices each
165 Int_t fTimBinPlane[kNplane]; // Time bin of Max cluster from all 6 planes
166 Double_t fPID[AliPID::kSPECIES]; // PID probabilities
168 Float_t fMom[kNplane]; // Track momentum at chamber entrance
169 Float_t fSnp[kNplane]; // Track direction
170 Float_t fTgl[kNplane]; // Track direction
171 AliTRDcluster *fClusters[kMAXCLUSTERSPERTRACK]; // List of assigned clusters
172 Bool_t fClusterOwner; // Indicates the track is owner of cluster
173 AliTRDPIDMethod fPIDmethod; // Switch between different PID methods
174 Bool_t fStopped; // Track stop indication
175 Int_t fIndex[kMAXCLUSTERSPERTRACK]; // Global indexes of clusters
176 Int_t fIndexBackup[kMAXCLUSTERSPERTRACK]; // Backup indexes of clusters - used in iterations
177 Float_t fdQdl[kMAXCLUSTERSPERTRACK]; // Cluster amplitudes corrected for track angles
179 Float_t fLhElectron; // Likelihood to be an electron
180 Int_t fNWrong; // Number of wrong clusters
181 Int_t fNRotate; // Number of rotation
182 Int_t fNCross; // Number of the cross materials
183 Int_t fNExpected; // Expected number of cluster
184 Int_t fNLast; // Number of clusters in last 2 layers
185 Int_t fNExpectedLast; // Number of expected clusters on last 2 layers
186 Int_t fNdedx; // Number of clusters for dEdx measurment
187 Float_t fChi2Last; // Chi2 in the last 2 layers
188 AliTRDtracklet fTracklets[6]; // Tracklets
189 Float_t fBudget[3]; // Integrated material budget
190 AliTRDtrack *fBackupTrack; //! Backup track
192 ClassDef(AliTRDtrack,9) // TRD reconstructed tracks