5c700d6af4b15ec24e603a0fa23efb25f9148f2f
[u/mrichter/AliRoot.git] / STEER / AliTrackFitter.h
1 #ifndef ALITRACKFITTER_H
2 #define ALITRACKFITTER_H
3
4 /*************************************************************************
5  * AliTrackFitter: base class for the fast track fitters                 *
6  *                                                                       *
7  *                                                                       *
8  *                                                                       *
9  *************************************************************************/
10
11 #include <TObject.h>
12 #include <TMatrixDSymfwd.h>
13
14 #include "AliTrackPointArray.h"
15 #include "AliAlignObj.h"
16
17
18 class AliTrackFitter : public TObject {
19
20  public:
21
22   AliTrackFitter();
23   AliTrackFitter(AliTrackPointArray *array, Bool_t owner = kTRUE);
24   AliTrackFitter(const AliTrackFitter &fitter);
25   AliTrackFitter& operator= (const AliTrackFitter& fitter);
26   virtual ~AliTrackFitter();
27
28   virtual void   Reset();
29   virtual void   SetTrackPointArray(AliTrackPointArray *array, Bool_t owner = kTRUE);
30   virtual Bool_t Fit(UShort_t volId,
31                      AliTrackPointArray *pVolId, AliTrackPointArray *pTrack,
32                      AliAlignObj::ELayerID layerRangeMin = AliAlignObj::kFirstLayer,
33                      AliAlignObj::ELayerID layerRangeMax = AliAlignObj::kLastLayer) = 0;
34   virtual Bool_t GetPCA(const AliTrackPoint &pIn, AliTrackPoint &pOut) const = 0;
35
36   const Float_t* GetX() const {return fPoints->GetX();}
37   const Float_t* GetY() const {return fPoints->GetY();}
38   const Float_t* GetZ() const {return fPoints->GetZ();}
39   const Double_t* GetParam() const {return &fParams[0];}
40   const TMatrixDSym &  GetCovariance() const {return *fCov;}
41
42  protected:
43
44   Double_t      fParams[6];    // Track parameters
45   TMatrixDSym   *fCov;         // Track cov matrix
46   AliTrackPointArray *fPoints; // Pointer to the array with track space points
47   Bool_t  fIsOwner;            // Is the object owner of the space points array
48
49  private:
50
51   ClassDef(AliTrackFitter,1) // Abstract class of fast track fitters
52
53 };
54
55 #endif