1 #ifndef ALITRACKFITTER_H
2 #define ALITRACKFITTER_H
4 /*************************************************************************
5 * AliTrackFitter: base class for the fast track fitters *
9 *************************************************************************/
12 #include <TMatrixDSymfwd.h>
14 #include "AliTrackPointArray.h"
15 #include "AliAlignObj.h"
19 class AliTrackFitter : public TObject {
24 AliTrackFitter(AliTrackPointArray *array, Bool_t owner = kTRUE);
25 AliTrackFitter(const AliTrackFitter &fitter);
26 AliTrackFitter& operator= (const AliTrackFitter& fitter);
27 virtual ~AliTrackFitter();
30 virtual void SetTrackPointArray(AliTrackPointArray *array, Bool_t owner = kTRUE);
31 virtual Bool_t Fit(const TArrayI *volIds,const TArrayI *volIdsFit = 0x0,
32 AliAlignObj::ELayerID layerRangeMin = AliAlignObj::kFirstLayer,
33 AliAlignObj::ELayerID layerRangeMax = AliAlignObj::kLastLayer);
34 virtual Bool_t AddPoint(const AliTrackPoint *p) = 0;
35 virtual Bool_t Update() = 0;
36 virtual Bool_t GetPCA(const AliTrackPoint &pIn, AliTrackPoint &pOut) const = 0;
38 Bool_t FindVolId(const TArrayI *array, UShort_t volid) const;
40 void SetMinNPoints(Int_t n) { fMinNPoints = n;}
42 const Float_t* GetX() const {return fPoints->GetX();}
43 const Float_t* GetY() const {return fPoints->GetY();}
44 const Float_t* GetZ() const {return fPoints->GetZ();}
45 const Double_t* GetParam() const {return &fParams[0];}
46 const TMatrixDSym & GetCovariance() const {return *fCov;}
47 Float_t GetChi2() const {return fChi2;}
48 Int_t GetNdf() const {return fNdf;}
49 Int_t GetMinNPoints() const {return fMinNPoints;}
50 Float_t GetNormChi2() const { return (fNdf != 0) ? fChi2/fNdf : 0; }
51 void GetTrackResiduals(AliTrackPointArray*& pVolId, AliTrackPointArray*& pTrack) const
52 { pVolId = fPVolId; pTrack = fPTrack; }
56 Double_t fParams[6]; // Track parameters
57 TMatrixDSym *fCov; // Track cov matrix
58 AliTrackPointArray *fPoints; // Pointer to the array with track space points
59 AliTrackPointArray *fPVolId; // Pointer to the array with space-points in volId
60 AliTrackPointArray *fPTrack; // Pointer to the array with track extrapolation points in volId
61 Float_t fChi2; // Chi squared of the fit
62 Int_t fNdf; // Number of degrees of freedom
63 Int_t fMinNPoints; // Minimum allowed number of points
64 Bool_t fIsOwner; // Is the object owner of the space points array
68 ClassDef(AliTrackFitter,1) // Abstract class of fast track fitters