New version of alignment framework.
[u/mrichter/AliRoot.git] / STEER / AliTrackFitter.h
CommitLineData
98937d93 1#ifndef ALITRACKFITTER_H
2#define ALITRACKFITTER_H
3
4/*************************************************************************
5 * AliTrackFitter: base class for the fast track fitters *
6 * *
7 * *
8 * *
9 *************************************************************************/
10
e8d02863 11#include <TObject.h>
12#include <TMatrixDSymfwd.h>
98937d93 13
14#include "AliTrackPointArray.h"
15#include "AliAlignObj.h"
16
98937d93 17
18class 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);
46ae650f 30 virtual Bool_t Fit(UShort_t volId,UShort_t volIdFit = 0,
98937d93 31 AliAlignObj::ELayerID layerRangeMin = AliAlignObj::kFirstLayer,
32 AliAlignObj::ELayerID layerRangeMax = AliAlignObj::kLastLayer) = 0;
33 virtual Bool_t GetPCA(const AliTrackPoint &pIn, AliTrackPoint &pOut) const = 0;
34
35 const Float_t* GetX() const {return fPoints->GetX();}
36 const Float_t* GetY() const {return fPoints->GetY();}
37 const Float_t* GetZ() const {return fPoints->GetZ();}
38 const Double_t* GetParam() const {return &fParams[0];}
39 const TMatrixDSym & GetCovariance() const {return *fCov;}
46ae650f 40 Float_t GetChi2() const {return fChi2;}
41 Int_t GetNdf() const {return fNdf;}
42 Float_t GetNormChi2() const { return (fNdf != 0) ? fChi2/fNdf : 0; }
43 void GetTrackResiduals(AliTrackPointArray*& pVolId, AliTrackPointArray*& pTrack) const
44 { pVolId = fPVolId; pTrack = fPTrack; }
98937d93 45
46 protected:
47
48 Double_t fParams[6]; // Track parameters
46ae650f 49 TMatrixDSym *fCov; // Track cov matrix
98937d93 50 AliTrackPointArray *fPoints; // Pointer to the array with track space points
46ae650f 51 AliTrackPointArray *fPVolId; // Pointer to the array with space-points in volId
52 AliTrackPointArray *fPTrack; // Pointer to the array with track extrapolation points in volId
53 Float_t fChi2; // Chi squared of the fit
54 Int_t fNdf; // Number of degrees of freedom
98937d93 55 Bool_t fIsOwner; // Is the object owner of the space points array
56
57 private:
58
59 ClassDef(AliTrackFitter,1) // Abstract class of fast track fitters
60
61};
62
63#endif