]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliKalmanTrack.h
track matching macros from Alberto
[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 "AliExternalTrackParam.h"
16 #include "AliLog.h"
17 #include "AliPID.h"
18
19 class AliCluster;
20
21 class AliKalmanTrack : public AliExternalTrackParam {
22 public:
23   AliKalmanTrack();
24   AliKalmanTrack(const AliKalmanTrack &t);
25   virtual ~AliKalmanTrack(){};
26
27   void SetLabel(Int_t lab) {fLab=lab;}
28
29   virtual Double_t GetPredictedChi2(const AliCluster *c) const = 0;
30   virtual Bool_t PropagateTo(Double_t xr, Double_t x0, Double_t rho) = 0;
31   virtual Bool_t Update(const AliCluster* c, Double_t chi2, Int_t index) = 0;
32
33   Bool_t   IsSortable() const {return kTRUE;}
34   Int_t    GetLabel()   const {return fLab;}
35   Double_t GetChi2()    const {return fChi2;}
36   Double_t GetMass()    const {return fMass;}
37   Int_t    GetNumberOfClusters() const {return fN;}
38   virtual Int_t GetClusterIndex(Int_t) const { //reserved for AliTracker
39     AliWarning("Method must be overloaded !\n");
40     return 0;
41   } 
42   virtual Double_t GetPIDsignal() const {
43     AliWarning("Method must be overloaded !\n");
44     return 0.;
45   }
46
47   virtual Int_t Compare(const TObject *) const {return 0;} 
48
49   void GetExternalParameters(Double_t &xr,Double_t p[5]) const {
50     xr=GetX();
51     for (Int_t i=0; i<5; i++) p[i]=GetParameter()[i];
52   }
53   void GetExternalCovariance(Double_t cov[15]) const {
54     for (Int_t i=0; i<15; i++) cov[i]=GetCovariance()[i];
55   }
56
57   static 
58   Double_t MeanMaterialBudget(Double_t *start,Double_t *end,Double_t *mparam);
59
60   // Time integration (S.Radomski@gsi.de)
61   void StartTimeIntegral();
62   void SetIntegratedLength(Double_t l) {fIntegratedLength=l;}
63   void SetIntegratedTimes(const Double_t *times);
64
65   Bool_t IsStartedTimeIntegral() const {return fStartTimeIntegral;}
66   void AddTimeStep(Double_t length);
67   void GetIntegratedTimes(Double_t *times) const;
68   Double_t GetIntegratedTime(Int_t pdg) const;
69   Double_t GetIntegratedLength() const {return fIntegratedLength;}
70
71   void SetNumberOfClusters(Int_t n) {fN=n;} 
72
73   void SetFakeRatio(Float_t ratio) {fFakeRatio=ratio;}
74   Float_t  GetFakeRatio()   const {return fFakeRatio;}
75   void SetMass(Double_t mass) {fMass=mass;}
76
77 protected:
78   void SetChi2(Double_t chi2) {fChi2=chi2;} 
79
80   Int_t fLab;             // track label
81   Float_t fFakeRatio;     // fake ratio
82   Double_t fChi2;         // total chi2 value for this track
83   Double_t fMass;         // mass hypothesis
84   Int_t fN;               // number of associated clusters
85
86 private:
87   // variables for time integration (S.Radomski@gsi.de)
88   Bool_t  fStartTimeIntegral;       // indicator wether integrate time
89   Double_t fIntegratedTime[AliPID::kSPECIES];       // integrated time
90   Double_t fIntegratedLength;        // integrated length
91   
92   ClassDef(AliKalmanTrack,6)    // Reconstructed track
93 };
94
95 #endif
96
97