]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliKalmanTrack.h
Bug corrected
[u/mrichter/AliRoot.git] / STEER / AliKalmanTrack.h
1 #ifndef ALIKALMANTRACK_H
2 #define ALIKALMANTRACK_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 //                          Class AliKalmanTrack
11 //      fixed the interface for the derived reconstructed track classes 
12 //            Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch 
13 //-------------------------------------------------------------------------
14
15 #include <TObject.h>
16
17 class AliCluster;
18
19 class AliKalmanTrack : public TObject {
20 public:
21   AliKalmanTrack();
22   AliKalmanTrack(const AliKalmanTrack &t);
23
24   virtual ~AliKalmanTrack(){};
25   void SetLabel(Int_t lab) {fLab=lab;}
26   void SetFakeRatio(Float_t ratio) {fFakeRatio=ratio;}
27
28   Bool_t   IsSortable() const {return kTRUE;}
29   Int_t    GetLabel()   const {return fLab;}
30   Float_t    GetFakeRatio()   const {return fFakeRatio;}
31   Double_t GetChi2()    const {return fChi2;}
32   Double_t GetMass()    const {return fMass;}
33   Int_t    GetNumberOfClusters() const {return fN;}
34   virtual Int_t GetClusterIndex(Int_t) const { //reserved for AliTracker
35     Warning("GetClusterIndex(Int_t)","Method must be overloaded !\n");
36     return 0;
37   } 
38   virtual Double_t GetPIDsignal() const {
39     Warning("GetPIDsignal()","Method must be overloaded !\n");
40     return 0.;
41   }
42
43   virtual Double_t GetDCA(const AliKalmanTrack *p,Double_t &xthis,Double_t &xp) const; 
44   virtual 
45   Double_t PropagateToDCA(AliKalmanTrack *p, Double_t d=0., Double_t x0=0.); 
46   virtual Double_t GetAlpha() const {
47     Warning("GetAlpha()","Method must be overloaded !\n");
48     return 0.;
49   }
50   virtual Double_t GetSigmaY2() const {
51     Warning("GetSigmaY2()","Method must be overloaded !\n");
52     return 0.;
53   }
54   virtual Double_t GetSigmaZ2() const {
55     Warning("GetSigmaZ2()","Method must be overloaded !\n");
56     return 0.;
57   }
58
59   virtual Int_t Compare(const TObject *) const {return 0;} 
60
61   virtual void GetExternalParameters(Double_t &/*xr*/, Double_t /*x*/[5]) const {}
62   virtual void GetExternalCovariance(Double_t /*cov*/[15]) const {}
63
64   virtual Double_t GetX() const;
65   virtual Double_t GetdEdx() const;
66
67   virtual Double_t GetY() const;
68   virtual Double_t GetZ() const;
69   virtual Double_t GetSnp() const;
70   virtual Double_t GetTgl() const;
71   virtual Double_t Get1Pt() const;
72
73   virtual Double_t Phi() const;
74   virtual Double_t SigmaPhi() const;
75   virtual Double_t Theta() const;
76   virtual Double_t SigmaTheta() const;
77   virtual Double_t Eta() const;
78   virtual Double_t Px() const;
79   virtual Double_t Py() const;
80   virtual Double_t Pz() const;
81   virtual Double_t Pt() const;
82   virtual Double_t SigmaPt() const;
83   virtual Double_t P() const;
84
85   virtual Double_t GetPredictedChi2(const AliCluster *) const {return 0.;}
86   virtual Int_t 
87   PropagateTo(Double_t /*xr*/, Double_t /*x0*/, Double_t /*rho*/) {return 0;}
88   virtual Int_t PropagateToVertex(Double_t /*d*/=0., Double_t /*x0*/=0.) 
89     {return 0;}
90   virtual Int_t 
91   Update(const AliCluster*, Double_t /*chi2*/, UInt_t) {return 0;}
92
93   static void SetConvConst(Double_t cc) {fgConvConst=cc;}
94   static Double_t GetConvConst() {return fgConvConst;}
95
96   static void SetMagneticField(Double_t f) {// f - Magnetic field in T
97     fgConvConst=100/0.299792458/f;
98   }
99   Double_t GetMagneticField() const {return 100/0.299792458/fgConvConst;}
100
101   // Time integration (S.Radomski@gsi.de)
102   void   StartTimeIntegral();
103   void SetIntegratedLength(Double_t l) {fIntegratedLength=l;}
104   void SetIntegratedTimes(const Double_t *times);
105
106   Bool_t IsStartedTimeIntegral() const {return fStartTimeIntegral;}
107   void     AddTimeStep(Double_t length);
108   void GetIntegratedTimes(Double_t *times) const;
109   Double_t GetIntegratedTime(Int_t pdg) const;
110   Double_t GetIntegratedLength() const {return fIntegratedLength;}
111   void PrintTime() const;
112
113 protected:
114   void SetChi2(Double_t chi2) {fChi2=chi2;} 
115   void SetMass(Double_t mass) {fMass=mass;}
116   void SetNumberOfClusters(Int_t n) {fN=n;} 
117
118   Int_t fLab;             // track label
119   Float_t fFakeRatio;     // fake ratio
120   Double_t fChi2;         // total chi2 value for this track
121   Double_t fMass;         // mass hypothesis
122   Int_t fN;               // number of associated clusters
123  private:
124   static Double_t fgConvConst; //conversion constant cm -> GeV/c
125
126   // variables for time integration (S.Radomski@gsi.de)
127   static const Int_t fgkTypes = 5;  // Number of track types (e,mu,pi,k,p)
128   Bool_t  fStartTimeIntegral;       // indicator wether integrate time
129   Double_t fIntegratedTime[5];       // integrated time
130   Double_t fIntegratedLength;        // integrated length
131   
132   ClassDef(AliKalmanTrack,3)    // Reconstructed track
133 };
134
135 #endif
136
137