]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliRieman.h
Added AddTrackParams() method for convenience + some comments
[u/mrichter/AliRoot.git] / STEER / AliRieman.h
1 #ifndef ALIRIEMAN_H
2 #define ALIRIEMAN_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5 /* $Id$ */
6 // Class for global helix fit of a track
7 // Author: M.Ivanov
8 // This class uses decomposition of the chi2 based on the fact that
9 // one can rotate the coordinate system and provide xi >> yi for each
10 // space point
11
12
13 #include <TMatrixDSymfwd.h>
14
15 class AliRieman : public TObject{
16  public:
17   AliRieman();
18   AliRieman(Int_t capacity);
19   AliRieman(const AliRieman &rieman);
20   ~AliRieman();
21   void Reset();
22   void AddPoint(Double_t x, Double_t y, Double_t z, Double_t sy, Double_t sz);
23   Int_t GetN() const {return fN;}
24   Int_t GetCapacity() const {return fCapacity;}
25   Double_t * GetX()  const {return fX;}
26   Double_t * GetY()  const {return fY;}
27   Double_t * GetZ()  const {return fZ;}
28   Double_t * GetSy() const {return fSy;}
29   Double_t * GetSz() const {return fSz;}
30   void Update();
31   void UpdatePol();
32   Double_t*  GetParam(){return fParams;}
33   const TMatrixDSym &  GetCovariance() const {return *fCovar;}
34   Double_t GetC() const;
35   Double_t GetYat(Double_t x) const;
36   Double_t GetZat(Double_t x) const; 
37   Double_t GetDYat(Double_t x) const;
38   Double_t GetDZat(Double_t x) const;
39   Bool_t   GetXYZat(Double_t r, Double_t alpha, Float_t *xyz) const;
40   //
41   Bool_t   IsValid(){ return fConv;}
42   Double_t GetChi2Y() const { return fChi2Y;}
43   Double_t GetChi2Z() const { return fChi2Z;}
44   Double_t GetChi2() const  { return fChi2; }
45   Double_t CalcChi2Y() const;  
46   Double_t CalcChi2Z() const;
47   Double_t CalcChi2() const;
48   AliRieman * MakeResiduals() const;
49   Double_t    GetErrY(Double_t x) const; 
50   Double_t    GetErrZ(Double_t x) const;
51   Bool_t GetExternalParameters(Double_t xref, Double_t *params, Double_t * covar);
52   //
53  protected:
54   void          UpdateCovariancePol();  // update covariance for error estimates
55   // public:
56   Int_t         fCapacity;  // capacity
57   Int_t         fN;         // numebr of points
58   Double_t      *fX;         //[fN] x coordinate
59   Double_t      *fY;         //[fN] y coordinate
60   Double_t      *fZ;         //[fN] z coordinate
61   Double_t      *fSy;        //[fN] sigma y coordinate
62   Double_t      *fSz;        //[fN] sigma z coordinate
63   Double_t      fParams[6]; //Parameters
64   TMatrixDSym  *fCovar;     //Covariance
65   TMatrixDSym  *fCovarPolY; // covariance matrix for parabola fit in xy - used for error estimation
66   TMatrixDSym  *fCovarPolZ; // covariance matrix for parabola fit in xy - used for error estimation
67   Double_t      fSumXY[9];  //sums for XY part
68   Double_t      fSumXZ[9];  //sums for XZ part
69   Double_t      fSumPolY[5]; //sums of polynoms X with weight Z
70   Double_t      fSumPolZ[5]; //sums of polynoms X with weight Z
71   Double_t      fSumZZ;     //sums of Z2 
72   Double_t      fChi2;      //sums of chi2
73   Double_t      fChi2Y;     //sums of chi2 for y coord
74   Double_t      fChi2Z;     //sums of chi2 foz z coord 
75   Bool_t        fConv;      // indicates convergation
76  protected:  
77  private:
78   AliRieman& operator=(const AliRieman &rieman);
79   ClassDef(AliRieman,2)  // Fast fit of helices on ITS RecPoints
80 };
81
82
83
84 #endif