]>
Commit | Line | Data |
---|---|---|
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 | ||
cc345ce3 | 17 | class TArrayI; |
98937d93 | 18 | |
19 | class AliTrackFitter : public TObject { | |
20 | ||
21 | public: | |
22 | ||
23 | AliTrackFitter(); | |
24 | AliTrackFitter(AliTrackPointArray *array, Bool_t owner = kTRUE); | |
25 | AliTrackFitter(const AliTrackFitter &fitter); | |
26 | AliTrackFitter& operator= (const AliTrackFitter& fitter); | |
27 | virtual ~AliTrackFitter(); | |
28 | ||
29 | virtual void Reset(); | |
30 | virtual void SetTrackPointArray(AliTrackPointArray *array, Bool_t owner = kTRUE); | |
cc345ce3 | 31 | virtual Bool_t Fit(const TArrayI *volIds,const TArrayI *volIdsFit = 0x0, |
25be1e5c | 32 | AliGeomManager::ELayerID layerRangeMin = AliGeomManager::kFirstLayer, |
33 | AliGeomManager::ELayerID layerRangeMax = AliGeomManager::kLastLayer); | |
57c8a1c2 | 34 | |
35 | virtual Bool_t Begin(Int_t, Int_t) = 0; | |
9c4c8863 | 36 | virtual Bool_t AddPoint(const AliTrackPoint *p) = 0; |
37 | virtual Bool_t Update() = 0; | |
57c8a1c2 | 38 | |
98937d93 | 39 | virtual Bool_t GetPCA(const AliTrackPoint &pIn, AliTrackPoint &pOut) const = 0; |
40 | ||
cc345ce3 | 41 | Bool_t FindVolId(const TArrayI *array, UShort_t volid) const; |
42 | ||
43 | void SetMinNPoints(Int_t n) { fMinNPoints = n;} | |
44 | ||
98937d93 | 45 | const Float_t* GetX() const {return fPoints->GetX();} |
46 | const Float_t* GetY() const {return fPoints->GetY();} | |
47 | const Float_t* GetZ() const {return fPoints->GetZ();} | |
48 | const Double_t* GetParam() const {return &fParams[0];} | |
49 | const TMatrixDSym & GetCovariance() const {return *fCov;} | |
46ae650f | 50 | Float_t GetChi2() const {return fChi2;} |
51 | Int_t GetNdf() const {return fNdf;} | |
cc345ce3 | 52 | Int_t GetMinNPoints() const {return fMinNPoints;} |
46ae650f | 53 | Float_t GetNormChi2() const { return (fNdf != 0) ? fChi2/fNdf : 0; } |
54 | void GetTrackResiduals(AliTrackPointArray*& pVolId, AliTrackPointArray*& pTrack) const | |
55 | { pVolId = fPVolId; pTrack = fPTrack; } | |
98937d93 | 56 | |
57 | protected: | |
58 | ||
59 | Double_t fParams[6]; // Track parameters | |
46ae650f | 60 | TMatrixDSym *fCov; // Track cov matrix |
98937d93 | 61 | AliTrackPointArray *fPoints; // Pointer to the array with track space points |
46ae650f | 62 | AliTrackPointArray *fPVolId; // Pointer to the array with space-points in volId |
63 | AliTrackPointArray *fPTrack; // Pointer to the array with track extrapolation points in volId | |
64 | Float_t fChi2; // Chi squared of the fit | |
65 | Int_t fNdf; // Number of degrees of freedom | |
cc345ce3 | 66 | Int_t fMinNPoints; // Minimum allowed number of points |
98937d93 | 67 | Bool_t fIsOwner; // Is the object owner of the space points array |
68 | ||
69 | private: | |
70 | ||
71 | ClassDef(AliTrackFitter,1) // Abstract class of fast track fitters | |
72 | ||
73 | }; | |
74 | ||
75 | #endif |