]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/STEER/AliTrackFitter.h
MFT clean-up (Antonio)
[u/mrichter/AliRoot.git] / STEER / STEER / AliTrackFitter.h
1 #ifndef ALITRACKFITTER_H
2 #define ALITRACKFITTER_H
3
4 /*************************************************************************
5  * AliTrackFitter: base class for the fast track fitters                 *
6  *                                                                       *
7  * Supposed to be used for alignment framework                           *
8  * More information is available in 
9  * http://agenda.cern.ch/askArchive.php?base=agenda&categ=a057717&id=a057717s1t6/transparencies  
10  * Author: C.Cheskov                                                     *
11  *                                                                       *
12  *                                                                       *
13  *************************************************************************/
14
15 #include <TObject.h>
16 #include <TMatrixDSymfwd.h>
17
18 #include "AliTrackPointArray.h"
19 #include "AliAlignObj.h"
20
21 class TArrayI;
22
23 class AliTrackFitter : public TObject {
24
25  public:
26
27   AliTrackFitter();
28   AliTrackFitter(AliTrackPointArray *array, Bool_t owner = kTRUE);
29   AliTrackFitter(const AliTrackFitter &fitter);
30   AliTrackFitter& operator= (const AliTrackFitter& fitter);
31   virtual ~AliTrackFitter();
32
33   virtual void   Reset();
34   virtual void   SetTrackPointArray(AliTrackPointArray *array, Bool_t owner = kTRUE);
35   virtual Bool_t Fit(const TArrayI *volIds,const TArrayI *volIdsFit = 0x0,
36                      AliGeomManager::ELayerID layerRangeMin = AliGeomManager::kFirstLayer,
37                      AliGeomManager::ELayerID layerRangeMax = AliGeomManager::kLastLayer);
38
39   virtual Bool_t Begin(Int_t, Int_t) = 0;
40   virtual Bool_t AddPoint(const AliTrackPoint *p) = 0;
41   virtual Bool_t Update() = 0;
42
43   virtual Bool_t GetPCA(const AliTrackPoint &pIn, AliTrackPoint &pOut) const = 0;
44
45   Bool_t         FindVolId(const TArrayI *array, UShort_t volid) const;
46
47   void           SetMinNPoints(Int_t n) { fMinNPoints = n;}
48
49   const Float_t* GetX() const {return fPoints->GetX();}
50   const Float_t* GetY() const {return fPoints->GetY();}
51   const Float_t* GetZ() const {return fPoints->GetZ();}
52   const Double_t* GetParam() const {return &fParams[0];}
53   const TMatrixDSym &  GetCovariance() const {return *fCov;}
54   Float_t        GetChi2() const {return fChi2;}
55   Int_t          GetNdf()  const {return fNdf;}
56   Int_t          GetMinNPoints()  const {return fMinNPoints;}
57   Float_t        GetNormChi2() const { return (fNdf != 0) ? fChi2/fNdf : 0; }
58   void           GetTrackResiduals(AliTrackPointArray*& pVolId, AliTrackPointArray*& pTrack) const
59     { pVolId = fPVolId; pTrack = fPTrack; }
60
61  protected:
62
63   Double_t      fParams[6];    // Track parameters
64   TMatrixDSym  *fCov;          // Track cov matrix
65   AliTrackPointArray *fPoints; // Pointer to the array with track space points
66   AliTrackPointArray *fPVolId; // Pointer to the array with space-points in volId
67   AliTrackPointArray *fPTrack; // Pointer to the array with track extrapolation points in volId
68   Float_t       fChi2;         // Chi squared of the fit
69   Int_t         fNdf;          // Number of degrees of freedom
70   Int_t         fMinNPoints;   // Minimum allowed number of points
71   Bool_t  fIsOwner;            // Is the object owner of the space points array
72
73  private:
74
75   ClassDef(AliTrackFitter,1) // Abstract class of fast track fitters
76
77 };
78
79 #endif