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