]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCtrack.h
Update with mevsim libraries.
[u/mrichter/AliRoot.git] / TPC / AliTPCtrack.h
CommitLineData
73042f01 1#ifndef ALITPCTRACK_H
2#define ALITPCTRACK_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
73042f01 6//-------------------------------------------------------
7// TPC Track Class
8//
9// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
10//-------------------------------------------------------
11
be9c5115 12/*****************************************************************************
13 * December 18, 2000 *
14 * Internal view of the TPC track parametrisation as well as the order of *
15 * track parameters are subject for possible changes ! *
16 * Use GetExternalParameters() and GetExternalCovariance() to access TPC *
17 * track information regardless of its internal representation. *
18 * This formation is now fixed in the following way: *
19 * external param0: local Y-coordinate of a track (cm) *
20 * external param1: local Z-coordinate of a track (cm) *
21 * external param2: local sine of the track momentum azimuth angle *
22 * external param3: tangent of the track momentum dip angle *
23 * external param4: 1/pt (1/(GeV/c)) *
24 *****************************************************************************/
25
b19a0509 26#include <AliKalmanTrack.h>
73042f01 27#include <TMath.h>
73042f01 28
be9c5115 29const Double_t kConversionConstant=100/0.299792458/0.2;
30
73042f01 31class AliTPCClustersArray;
32class AliTPCcluster;
33
34//_____________________________________________________________________________
b19a0509 35class AliTPCtrack : public AliKalmanTrack {
73042f01 36public:
b19a0509 37 AliTPCtrack():AliKalmanTrack(){}
38 AliTPCtrack(UInt_t index, const Double_t xx[5],
39 const Double_t cc[15], Double_t xr, Double_t alpha);
40 AliTPCtrack(const AliTPCtrack& t);
41 Int_t PropagateToVertex(
42 Double_t x0=36.66,Double_t rho=1.2e-3,Double_t pm=0.139);
43 Int_t Rotate(Double_t angle);
44 void CookLabel(AliTPCClustersArray *carray);
45 void SetdEdx(Float_t dedx) {fdEdx=dedx;}
46
be9c5115 47 Double_t GetX() const {return fX;}
48 Double_t GetAlpha() const {return fAlpha;}
49 Double_t GetdEdx() const {return fdEdx;}
50
b19a0509 51 Double_t GetY() const {return fP0;}
52 Double_t GetZ() const {return fP1;}
be9c5115 53 Double_t GetSnp() const {return fX*fP3 - fP2;}
54 Double_t Get1Pt() const {return fP3*kConversionConstant;}
b19a0509 55 Double_t GetTgl() const {return fP4;}
be9c5115 56
b19a0509 57 Double_t GetSigmaY2() const {return fC00;}
58 Double_t GetSigmaZ2() const {return fC11;}
be9c5115 59
60 Int_t Compare(const TObject *o) const;
61
62 void GetExternalParameters(Double_t& xr, Double_t x[5]) const ;
63 void GetExternalCovariance(Double_t cov[15]) const ;
64
65//******** To be removed next release !!! **************
66 Double_t GetEta() const {return fP2;}
67 Double_t GetC() const {return fP3;}
68 void GetCovariance(Double_t cc[15]) const {
69 cc[0 ]=fC00;
70 cc[1 ]=fC10; cc[2 ]=fC11;
71 cc[3 ]=fC20; cc[4 ]=fC21; cc[5 ]=fC22;
72 cc[6 ]=fC30; cc[7 ]=fC31; cc[8 ]=fC32; cc[9 ]=fC33;
73 cc[10]=fC40; cc[11]=fC41; cc[12]=fC42; cc[13]=fC43; cc[14]=fC44;
74 }
75//******************************************************
76
b19a0509 77 void GetCluster(Int_t i, Int_t &sec, Int_t &row, Int_t &ncl) const;
78
be9c5115 79 virtual Double_t GetPredictedChi2(const AliCluster *cluster) const;
b19a0509 80 Int_t PropagateTo(Double_t xr,
81 Double_t x0=28.94,Double_t rho=0.9e-3,Double_t pm=0.139);
be9c5115 82 Int_t Update(const AliCluster* c, Double_t chi2, UInt_t i);
73042f01 83
be9c5115 84private:
85 Double_t fX; // X-coordinate of this track (reference plane)
86 Double_t fAlpha; // Rotation angle the local (TPC sector)
87 // coordinate system and the global ALICE one.
73042f01 88
be9c5115 89 Double_t fdEdx; // dE/dx
73042f01 90
be9c5115 91 Double_t fP0; // Y-coordinate of a track
92 Double_t fP1; // Z-coordinate of a track
93 Double_t fP2; // C*x0
94 Double_t fP3; // track curvature
95 Double_t fP4; // tangent of the track momentum dip angle
96
97 Double_t fC00; // covariance
98 Double_t fC10, fC11; // matrix
99 Double_t fC20, fC21, fC22; // of the
100 Double_t fC30, fC31, fC32, fC33; // track
101 Double_t fC40, fC41, fC42, fC43, fC44; // parameters
102
103 UInt_t fIndex[200]; // indices of associated clusters
73042f01 104
b19a0509 105 ClassDef(AliTPCtrack,1) // Time Projection Chamber reconstructed tracks
73042f01 106};
107
73042f01 108
109inline
110void AliTPCtrack::GetCluster(Int_t i,Int_t &sec,Int_t &row,Int_t &ncl) const {
b19a0509 111 //return sector, pad row and the index of the i-th cluster of this track
73042f01 112 Int_t index=fIndex[i];
113 sec=(index&0xff000000)>>24;
114 row=(index&0x00ff0000)>>16;
115 ncl=(index&0x0000ffff)>>00;
116}
117
be9c5115 118inline
119void AliTPCtrack::GetExternalParameters(Double_t& xr, Double_t x[5]) const {
120 //---------------------------------------------------------------------
121 // This function return external TPC track representation
122 //---------------------------------------------------------------------
123 xr=fX;
124 x[0]=GetY(); x[1]=GetZ(); x[2]=GetSnp(); x[3]=GetTgl(); x[4]=Get1Pt();
125}
126
73042f01 127#endif
128
129