]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCtrack.h
Maximal number of good tracks increased to 20000.
[u/mrichter/AliRoot.git] / TPC / AliTPCtrack.h
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
6 //-------------------------------------------------------
7 //                    TPC Track Class
8 //
9 //   Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch 
10 //-------------------------------------------------------
11
12 #include <AliKalmanTrack.h>
13 #include <TMath.h>
14
15 class AliTPCClustersArray;
16 class AliTPCcluster;
17
18 //_____________________________________________________________________________
19 class AliTPCtrack : public AliKalmanTrack {
20 public:
21   AliTPCtrack():AliKalmanTrack(){}
22   AliTPCtrack(UInt_t index, const Double_t xx[5], 
23               const Double_t cc[15], Double_t xr, Double_t alpha); 
24   AliTPCtrack(const AliTPCtrack& t);
25   Int_t PropagateToVertex(
26                     Double_t x0=36.66,Double_t rho=1.2e-3,Double_t pm=0.139);
27   Int_t Rotate(Double_t angle);
28   void CookLabel(AliTPCClustersArray *carray);
29   void SetdEdx(Float_t dedx) {fdEdx=dedx;}
30
31   Float_t GetdEdx() const {return fdEdx;}
32   Double_t GetX()   const {return fX;}
33   Double_t GetY()   const {return fP0;}
34   Double_t GetZ()   const {return fP1;}
35   Double_t GetEta() const {return fP2;}
36   Double_t GetC()   const {return fP3;}
37   Double_t GetTgl() const {return fP4;}
38   Double_t GetSigmaY2() const {return fC00;}
39   Double_t GetSigmaZ2() const {return fC11;}
40   Double_t GetSigmaC2() const {return fC33;}
41   Double_t GetAlpha()   const {return fAlpha;}
42   void GetCluster(Int_t i, Int_t &sec, Int_t &row, Int_t &ncl) const;
43
44   Double_t GetPt() const {return 0.299792458*0.2/GetC()/100;}
45   Double_t GetP()  const {return TMath::Abs(GetPt())*
46     TMath::Sqrt(1.+GetTgl()*GetTgl());}
47   void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const;
48   Int_t PropagateTo(Double_t xr,
49                     Double_t x0=28.94,Double_t rho=0.9e-3,Double_t pm=0.139);
50   void Update(const AliCluster* c, Double_t chi2, UInt_t i);
51
52 protected: 
53   UInt_t fIndex[200];       // indices of associated clusters 
54
55   Float_t fdEdx;            // dE/dx 
56
57   Double_t fAlpha;          // rotation angle
58   Double_t fX;              // X-coordinate of this track (reference plane)
59
60   ClassDef(AliTPCtrack,1)   // Time Projection Chamber reconstructed tracks
61 };
62
63
64 inline 
65 void AliTPCtrack::GetCluster(Int_t i,Int_t &sec,Int_t &row,Int_t &ncl) const {
66   //return sector, pad row and the index of the i-th cluster of this track 
67   Int_t index=fIndex[i];
68   sec=(index&0xff000000)>>24; 
69   row=(index&0x00ff0000)>>16; 
70   ncl=(index&0x0000ffff)>>00;
71 }
72
73 #endif
74
75