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