]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliBarrelTrack.h
Moving lib*.pkg
[u/mrichter/AliRoot.git] / STEER / AliBarrelTrack.h
1 #ifndef AliBarrelTrack_H
2 #define AliBarrelTrack_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 //
10 // General class for barrel tracks
11 // This class contains all the information
12 // to describe the tracks detected by the barre detectors (ITS, TPC, TRD, TOF)
13 //
14
15 #include "TObject.h"
16 #include "TMath.h"
17
18 class AliBarrelTrack : public TObject {
19
20 public:
21   
22   AliBarrelTrack();
23   ~AliBarrelTrack() {}
24   
25   // Setters
26
27   void SetLabel(Int_t label); 
28   void SetX(Double_t x, Double_t alpha);
29   void SetRefPlane(Int_t nRefPlane, Int_t isIn);
30   void SetNClusters(Int_t nClusters, Double_t chi2);
31   void SetTime(Double_t time[5], Double_t length);
32   void SetStateVector(Double_t vec[5]);             // external parameters
33   void SetCovarianceMatrix(Double_t vec[15]);       // external parameters
34  
35   void SetNWrongClusters(Int_t n) {fNWrong = n;}
36   void SetNRotate(Int_t n) {fNRotate = n;}
37
38   void SetMass(Double_t mass) {fMass = mass;}
39   void SetdEdX(Double_t dEdX) {fdEdX = dEdX;}
40
41   // Getters
42
43   // standard
44   Int_t GetLabel() const {return fLabel;}
45   Int_t GetNClusters() const {return fNClusters;}
46   Int_t GetNWrongClusters() const {return fNWrong;}
47   Int_t GetNRotate() const {return fNRotate;}
48   
49   Int_t GetRefPlane() const {return fRefPlane;}
50
51   Double_t GetX() const {return fX;}
52   Double_t Y() const {return fY;}
53   Double_t Z() const {return fZ;}
54
55   Double_t GetMass() const {return fMass;}
56
57   // track oriented variables
58   Double_t Pt() const {return (f1Pt==0)? 0 : 1./f1Pt;}
59   Double_t TgLambda() const {return fTgLambda;}
60   Double_t Eta() const {return -TMath::Log(TMath::Tan(0.25 *TMath::Pi()-0.5*Lambda()));}
61   Double_t Phi() const {return TMath::ASin(fSnPhi);}
62   
63
64   // uncertainties
65   Double_t DeltaY() const {return TMath::Sqrt(fCy);}
66   Double_t DeltaZ() const {return TMath::Sqrt(fCz);}
67   Double_t DeltaTgLambda() const {return TMath::Sqrt(fCtg);}
68   Double_t DeltaSnPhi() const {return TMath::Sqrt(fCphi);}
69   Double_t DeltaPt() const {return Pt() - 1./(Pt() + TMath::Sqrt(fCpt));}
70
71
72   // reference oriented variables
73   Double_t Px() const {return TMath::Cos(Phi()+fAlpha) * Pt();}
74   Double_t Py() const {return TMath::Sin(Phi()+fAlpha) * Pt();}
75   Double_t Pz() const {return fTgLambda*Pt();}
76   Double_t P()  const {return Pt()*(fTgLambda+1);}
77
78   Double_t Lambda() const {return TMath::ATan(fTgLambda);}
79   
80 protected:
81
82   Int_t fLabel;          // kine tree index
83
84   Int_t fRefPlane;       // id of the reference plane
85   Int_t fIsIn;           // direction
86
87   Double_t fX;           // Kalman Time
88   Double_t fAlpha;       // sector angle
89
90   // state vector
91   Double_t fZ;          // Z in global cs
92   Double_t fY;          // Y in local cs corresponds to r-phi
93   Double_t fTgLambda;   // Tangent of the dip angle
94   Double_t fSnPhi;      // Sin 
95   Double_t f1Pt;        // inverse of momentum
96
97
98   // covariance matrix
99   Double_t fCz;   // z element of covariance matrix
100   Double_t fCy;   // y element of covariance matrix
101   Double_t fCtg;  // tangent element of covariance matrix
102   Double_t fCphi; // phi element of covariance matrix
103   Double_t fCpt;  // pt element of covariance matrix
104
105     
106   // track time/length  
107   Double_t fTimeHypothesis[5];    // time for all hypoptheses
108   Double_t fLength;               // track length
109
110   // performance info
111   Int_t fNClusters;         // Number of clusters 
112   Int_t fNWrong;            // Number of wrong clusters
113   Double_t fChi2;           // Chi 2
114   Int_t fNRotate;           // number of rotations / sector crossing
115  
116   Double_t fMass;           // mass hypothesis
117   Double_t fdEdX;           // dE/dX
118
119   ClassDef(AliBarrelTrack,1)
120 };
121
122
123 #endif