New class for linear reasiduals minimization based on root TLinearFitter. Possibility...
[u/mrichter/AliRoot.git] / STEER / AliTrackResidualsLinear.h
1 #ifndef ALITRACKRESIDUALSLINEAR_H
2 #define ALITRACKRESIDUALSLINEAR_H
3
4 //************************************************************************
5 // AliTrackResidualsLinear: derived class (from AliTrackResiduals) which   *
6 // implements a simple linear minimization of the track residuals chi2.  *
7 // The minimization relies on the fact that the alignment parameters     *
8 // (angles and translations) are small.                                  *
9 //                                                                       *
10 //                                                                       *
11 //************************************************************************
12
13 #include "AliAlignObj.h"
14 #include "AliTrackResiduals.h"
15 class TLinearFitter;
16
17 class AliTrackResidualsLinear : public AliTrackResiduals {
18
19  public:
20   AliTrackResidualsLinear();
21   AliTrackResidualsLinear(Int_t ntracks);
22   AliTrackResidualsLinear(const AliTrackResidualsLinear &res);
23   AliTrackResidualsLinear& operator= (const AliTrackResidualsLinear& res);
24   virtual ~AliTrackResidualsLinear();
25   Bool_t Minimize();
26   void   SetRobust(Float_t fraction){fFraction=fraction;}
27   void   FixParameter(Int_t par, Float_t value) {fBFixed[par]=kTRUE; fFixed[par]= value;}
28   void   ReleaseParameter(Int_t par) {fBFixed[par]=kFALSE;}
29  protected:
30   Bool_t Update();
31   void   AddPoints(AliTrackPoint &p, AliTrackPoint &pprime);
32   TLinearFitter *fFitter;           // !Linear fitter
33   Float_t fFraction;                // fraction of points for robust fitter if less 0 - no robust fitter invoked
34   Float_t fParams[6];               // resulting parameters 
35   Float_t fFixed[6];                // the fixed values of parameters 
36   Float_t fBFixed[6];               // the flag for fixing parameter
37   Double_t fChi2Orig;               // original chi2 
38   ClassDef(AliTrackResidualsLinear,1)
39
40 };
41
42 #endif