]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDtrack.h
Remove obsolete classes
[u/mrichter/AliRoot.git] / TRD / AliTRDtrack.h
CommitLineData
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
15ed8ba1 7/* $Id$ */
46d29e70 8
53c17fbf 9///////////////////////////////////////////////////////////////////////////////
10// //
11// Represents a reconstructed TRD track //
12// //
13///////////////////////////////////////////////////////////////////////////////
46d29e70 14
4d6aee34 15#ifndef ALIESDTRACK_H
6984f7c1 16#include "AliESDtrack.h"
4d6aee34 17#endif
18
19#ifndef ALIKALMANTRACK_H
15ed8ba1 20#include "AliKalmanTrack.h"
4d6aee34 21#endif
fe33d239 22
15ed8ba1 23
4d6aee34 24#ifndef ALITRDCALPID_H
25#include "Cal/AliTRDCalPID.h"
26#endif
27
28#ifndef ALITRDTRACKLET
29#include "AliTRDtracklet.h"
0906e73e 30#endif
31
15ed8ba1 32class AliTrackReference;
dab811d0 33class AliTRDcluster;
7ad19338 34class AliTRDtrack : public AliKalmanTrack {
27eaf44b 35
36 public:
69dee759 37
38 enum { kMAXCLUSTERSPERTRACK = 210 };
53c17fbf 39
69dee759 40 enum { kNdet = 540
15ed8ba1 41 , kNstacks = 90
6984f7c1 42 , kNplane = AliESDtrack::kTRDnPlanes
15ed8ba1 43 , kNcham = 5
4d6aee34 44 , kNsect = 18 };
44dbae42 45
46 enum AliTRDPIDMethod {
47 kNN = 0
69dee759 48 , kLQ = 1 };
49
50 AliTRDtrack();
51 AliTRDtrack(/*const*/ AliTRDcluster *c, Int_t index
52 , const Double_t xx[5], const Double_t cc[15]
53 , Double_t xr, Double_t alpha);
54 AliTRDtrack(const AliTRDtrack &t/*, const Bool_t owner = kTRUE*/);
55 AliTRDtrack(const AliESDtrack &t);
0906e73e 56 virtual ~AliTRDtrack();
69dee759 57 AliTRDtrack(const AliKalmanTrack &t, Double_t alpha);
58
59 void ResetClusters() { SetChi2(0.0);
60 SetNumberOfClusters(0); }
61 Int_t Compare(const TObject *o) const;
62 void AddNWrong() { fNWrong++; }
63 void IncCross() { fNCross++;
64 if (fBackupTrack)
65 fBackupTrack->IncCross(); }
66
67 Int_t GetSector() const;
68 Float_t GetClusterdQdl(Int_t i) const { return fdQdl[i]; }
69 Double_t GetdEdx() const { return fdEdx; }
70 Int_t GetNdedx() const { return fNdedx; }
71 Double_t GetPIDsignal() const { return GetdEdx(); }
72 Int_t GetClusterIndex(Int_t i) const { return fIndex[i]; }
9e9471d8 73 using AliExternalTrackParam::GetC;
69dee759 74 Double_t GetC() const { return AliExternalTrackParam
75 ::GetC(GetBz()); }
76 Double_t GetPredictedChi2(const AliTRDcluster *c
77 , Double_t h01) const;
78 AliTRDPIDMethod GetPIDMethod() const { return fPIDmethod; }
79 Float_t GetPIDsignals(Int_t iPlane
80 , Int_t iSlice) const { return fdEdxPlane[iPlane][iSlice]; }
81 Int_t GetPIDTimBin(Int_t i) const { return fTimBinPlane[i]; }
82 Double_t GetLikelihoodElectron() const { return fLhElectron; }
83 Int_t GetSeedLabel() const { return fSeedLab; }
4d6aee34 84 const Int_t *GetBackupIndexes() const { return fIndexBackup; }
85 const Int_t *GetIndexes() const { return fIndex; }
69dee759 86 Int_t GetProlongation(Double_t xk
87 , Double_t &y
88 , Double_t &z);
89 Bool_t GetStop() const { return fStopped; }
90 Int_t GetNRotate() const { return fNRotate; }
91 Int_t GetNWrong() const { return fNWrong; }
92 Int_t GetNCross() const { return fNCross; }
93 Int_t GetNExpected() const { return fNExpected; }
94 Int_t GetNLast() const { return fNLast; }
95 Int_t GetNExpectedLast() const { return fNExpectedLast; }
96 AliTRDtracklet GetTracklets(Int_t i) const { return fTracklets[i]; }
97 Float_t GetBudget(Int_t i) const { return fBudget[i]; }
98 Float_t GetChi2Last() const { return fChi2Last; }
4d6aee34 99 AliTRDtrack *GetBackupTrack() const { return fBackupTrack; }
0906e73e 100 // dummy to bridge the function in AliTRDtrackV1
101 //Int_t GetNumberOfClusters() const { printf("AliTRDtrack::GetNumberOfClusters()\n");
102 // return AliKalmanTrack::GetNumberOfClusters(); }
103 inline virtual Int_t GetNumberOfTracklets() const;
104 virtual Int_t GetTrackletIndex(Int_t plane) const { return plane>=0 && plane<6
105 ? fTrackletIndex[plane] : -1; }
106
69dee759 107
108 void SetdEdx(Double_t dedx) { fdEdx = dedx; }
109 void SetStop(Bool_t stop) { fStopped = stop; }
110 void SetPIDsignals(Float_t dedx
111 , Int_t iPlane
112 , Int_t iSlice) { fdEdxPlane[iPlane][iSlice] = dedx; }
113 void SetPIDTimBin(Int_t timbin, Int_t i) { fTimBinPlane[i] = timbin; }
114 void SetLikelihoodElectron(Float_t l) { fLhElectron = l; }
115 void SetSampledEdx(Float_t q, Int_t i);
116 void SetSampledEdx(Float_t q);
117 void SetSeedLabel(Int_t lab) { fSeedLab = lab; }
118 void SetNWrong(Int_t nwrong) { fNWrong = nwrong; }
119 void SetNCross(Int_t ncross) { fNCross = ncross; }
120 void SetNExpected(Int_t nexp) { fNExpected = nexp; }
121 void SetNLast(Int_t nlast) { fNLast = nlast; }
122 void SetNExpectedLast(Int_t nexp) { fNExpectedLast = nexp; }
123 void SetChi2Last(Float_t chi2) { fChi2Last = chi2; }
124 void SetTracklets(Int_t i, AliTRDtracklet t) { fTracklets[i] = t; }
4d6aee34 125 void SetBudget(Int_t i, Float_t budget) { fBudget[i] = budget; }
69dee759 126 void SetPIDMethod(AliTRDPIDMethod method) { fPIDmethod = method; }
127
4d6aee34 128 void SetTrackSegmentDirMom(const Int_t plane);
69dee759 129 void CookdEdx(Double_t low = 0.05, Double_t up = 0.7);
130 void CookdEdxTimBin(const Int_t tid);
131 Bool_t CookPID(Int_t &pidQuality);
4d6aee34 132 void SetCluster(AliTRDcluster * const cl
69dee759 133 , Int_t index = -1) { fClusters[(index == -1)
134 ? GetNumberOfClusters()-1
135 : index] = cl; }
136 AliTRDcluster* GetCluster(Int_t layer) const { return (layer >= 0 &&
137 layer < GetNumberOfClusters())
138 ? fClusters[layer]
139 : 0x0; }
140 Float_t GetMomentumPlane(Int_t plane) const { return (plane >= 0 &&
141 plane < kNplane)
142 ? fMom[plane]
143 : 0.0; }
144 const Double_t* GetPID() const { return fPID; }
145 Float_t GetSnpPlane(Int_t plane) const { return (plane >= 0 &&
146 plane < kNplane)
147 ? fSnp[plane]
148 : 0.0; }
149 Float_t GetTglPlane(Int_t plane) const { return (plane >= 0 &&
150 plane < kNplane)
151 ? fTgl[plane]
152 : 0.0; }
153 Float_t GetTrackLengthPlane(Int_t plane) const;
154
155 void MakeBackupTrack();
156 Bool_t PropagateTo(Double_t xr, Double_t x0 = 8.72, Double_t rho = 5.86e-3);
157 Int_t PropagateToR(Double_t xr, Double_t step);
158 Int_t PropagateToX(Double_t xr, Double_t step);
159 Bool_t Rotate(Double_t angle, Bool_t absolute = kFALSE);
160 Float_t StatusForTOF();
161 Bool_t Update(const AliTRDcluster *c, Double_t chi2, Int_t index, Double_t h01);
162 Bool_t Update(const AliTRDtracklet &tracklet, Double_t chi2, Int_t index);
163 Int_t UpdateMI(/*const */AliTRDcluster *c, Double_t chi2
164 , Int_t index, Double_t h01
165 , Int_t plane, Int_t tid = 0);
166
167 protected:
168
4d6aee34 169 AliTRDtrack &operator=(const AliTRDtrack &t);
69dee759 170
4d6aee34 171 void CookdEdxNN(Float_t *dedx);
69dee759 172 Bool_t Update(const AliCluster */*c*/, Double_t /*chi2*/, Int_t /*idx*/) { return 0; }
173 Double_t GetPredictedChi2(const AliCluster* /*c*/) const { return 0.0; }
174
fe33d239 175 protected:
6c94f330 176
69dee759 177 Int_t fSeedLab; // Track label taken from seeding
178 Float_t fdEdx; // dE/dx (truncated mean)
179 Float_t fDE; // Integrated delta energy
4d6aee34 180 Float_t fdEdxPlane[kNplane][AliTRDCalPID::kNSlicesLQ]; // dE/dx from all 6 planes in 3 slices each
69dee759 181 Int_t fTimBinPlane[kNplane]; // Time bin of Max cluster from all 6 planes
0906e73e 182 UChar_t fPIDquality; // No of planes used for PID calculation
69dee759 183 Double_t fPID[AliPID::kSPECIES]; // PID probabilities
4d6aee34 184 Float_t fMom[kNplane]; // Track momentum at chamber entrance
185 Float_t fSnp[kNplane]; // Track direction
186 Float_t fTgl[kNplane]; // Track direction
187 AliTRDcluster *fClusters[kMAXCLUSTERSPERTRACK]; // List of assigned clusters
69dee759 188 Bool_t fClusterOwner; // Indicates the track is owner of cluster
4d6aee34 189 AliTRDPIDMethod fPIDmethod; // Switch between different PID methods
69dee759 190 Bool_t fStopped; // Track stop indication
191 Int_t fIndex[kMAXCLUSTERSPERTRACK]; // Global indexes of clusters
192 Int_t fIndexBackup[kMAXCLUSTERSPERTRACK]; // Backup indexes of clusters - used in iterations
193 Float_t fdQdl[kMAXCLUSTERSPERTRACK]; // Cluster amplitudes corrected for track angles
43bfc8af 194
4d6aee34 195 Float_t fLhElectron; // Likelihood to be an electron
69dee759 196 Int_t fNWrong; // Number of wrong clusters
197 Int_t fNRotate; // Number of rotation
198 Int_t fNCross; // Number of the cross materials
199 Int_t fNExpected; // Expected number of cluster
200 Int_t fNLast; // Number of clusters in last 2 layers
201 Int_t fNExpectedLast; // Number of expected clusters on last 2 layers
202 Int_t fNdedx; // Number of clusters for dEdx measurment
203 Float_t fChi2Last; // Chi2 in the last 2 layers
4d6aee34 204 AliTRDtracklet fTracklets[6]; // Tracklets
69dee759 205 Float_t fBudget[3]; // Integrated material budget
4d6aee34 206 AliTRDtrack *fBackupTrack; //! Backup track
0906e73e 207
4d6aee34 208 Int_t fTrackletIndex[6]; // Tracklets index in the tracker list
69dee759 209
210 ClassDef(AliTRDtrack,9) // TRD reconstructed tracks
46d29e70 211
53c17fbf 212};
46d29e70 213
0906e73e 214//___________________________________________________________
215inline Int_t AliTRDtrack::GetNumberOfTracklets() const
216{
217 Int_t ntrklt = 0;
218 for(int ip=0; ip<6; ip++) if(fTrackletIndex[ip] >= 0) ntrklt++;
219 return ntrklt;
220}
221
222
46d29e70 223#endif
9e9471d8 224