]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliKalmanTrack.h
dd187572ea4fdcd389455393ed765104be62cd9a
[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 //
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
27   Bool_t   IsSortable() const {return kTRUE;}
28   Int_t    GetLabel()   const {return fLab;}
29   Double_t GetChi2()    const {return fChi2;}
30   Double_t GetMass()    const {return fMass;}
31   Int_t    GetNumberOfClusters() const {return fN;}
32   virtual Int_t GetClusterIndex(Int_t) const { //reserved for AliTracker
33     Warning("GetClusterIndex(Int_t)","Method must be overloaded !\n");
34     return 0;
35   } 
36
37   virtual Int_t Compare(const TObject *) const {return 0;} 
38
39   virtual void GetExternalParameters(Double_t &/*xr*/, Double_t /*x*/[5]) const {}
40   virtual void GetExternalCovariance(Double_t /*cov*/[15]) const {}
41
42   virtual Double_t GetPredictedChi2(const AliCluster *) const {return 0.;}
43   virtual 
44     Int_t PropagateTo(Double_t /*xr*/, Double_t /*x0*/, Double_t /*rho*/) {return 0;}
45   virtual Int_t Update(const AliCluster*, Double_t /*chi2*/, UInt_t) {return 0;}
46
47   static void SetConvConst(Double_t cc) {fConvConst=cc;}
48   Double_t GetConvConst() const {return fConvConst;}
49
50   static void SetMagneticField(Double_t f) {// f - Magnetic field in T
51     fConvConst=100/0.299792458/f;
52   }
53   Double_t GetMagneticField() const {return 100/0.299792458/fConvConst;}
54
55 protected:
56   void SetChi2(Double_t chi2) {fChi2=chi2;} 
57   void SetMass(Double_t mass) {fMass=mass;}
58   void SetNumberOfClusters(Int_t n) {fN=n;} 
59
60 private: 
61   Int_t fLab;             // track label
62   Double_t fChi2;         // total chi2 value for this track
63   Double_t fMass;         // mass hypothesis
64   Int_t fN;               // number of associated clusters
65
66   static Double_t fConvConst; //conversion constant cm -> GeV/c
67
68   ClassDef(AliKalmanTrack,1)    // Reconstructed track
69 };
70
71 #endif
72
73