Line data Source code
1 : #ifndef ALITPCPOLYTRACK_H
2 : #define ALITPCPOLYTRACK_H
3 :
4 : //-------------------------------------------------------
5 : // TPC Cluster Class
6 : // track fitting using the polynom
7 : // allows bending in both direction
8 : //
9 : // Origin: Marian Ivanov
10 : //-------------------------------------------------------
11 :
12 : #include "TObject.h"
13 :
14 : //_____________________________________________________________________________
15 0 : class AliTPCpolyTrack : public TObject {
16 : public:
17 : AliTPCpolyTrack();
18 : void Reset();
19 : void AddPoint(Double_t x, Double_t y, Double_t z, Double_t sy=1, Double_t sz=1);
20 : inline void GetFitPoint(Double_t x, Double_t &y, Double_t &z) const;
21 : inline void GetFitDerivation(Double_t x, Double_t &y, Double_t &z) const;
22 : inline void GetFitDerivation2(Double_t &y, Double_t &z) const;
23 : void UpdateParameters(Int_t ny, Int_t nz);
24 : void UpdateParameters();
25 0 : Int_t GetN() const {return fNPoints;}
26 : void GetBoundaries(Double_t &xmin, Double_t &xmax) const
27 0 : {xmin = fMinX;xmax=fMaxX;}
28 : void Refit(AliTPCpolyTrack & track, Double_t deltay, Double_t deltaz);
29 : void Refit(AliTPCpolyTrack & track, Double_t deltay, Double_t deltaz, Int_t nfirst, Int_t ny, Int_t nz);
30 : private:
31 : void Fit2( Double_t &a, Double_t &b, Double_t &c);
32 : void Fit1(Double_t &a, Double_t &b, Double_t &c);
33 : //
34 : Double_t fA; // parameter
35 : Double_t fB; // parameter
36 : Double_t fC; // parameter
37 : Double_t fD; // parameter
38 : Double_t fE; // parameter
39 : Double_t fF; // parameter
40 : Double_t fMaxX; // X range
41 : Double_t fMinX; // X range
42 : //
43 : Double_t fSumW; // sum of the weight
44 :
45 : Double_t fSumX; // weighted summ of X
46 : Double_t fSumX2; // weighted summ of X**2
47 : Double_t fSumX3; // weighted summ of X**3
48 : Double_t fSumX4; // weighted summ of X**4
49 : Double_t fSumY; // as X
50 : Double_t fSumYX; // summ of X*Y
51 : Double_t fSumYX2; // summ of X**2*Y
52 : Double_t fSumZ; // summ of Z
53 : Double_t fSumZX; // summ of Z*X
54 : Double_t fSumZX2; // summ of Z*X**2
55 :
56 : Double_t fX[200]; // array of coordinates
57 : Double_t fY[200]; // array of coordinates
58 : Double_t fSY[200]; // array of coordinates
59 : Double_t fZ[200]; // array of coordinates
60 : Double_t fSZ[200]; // array of coordinates
61 :
62 : Int_t fNPoints; // No of points
63 :
64 16 : ClassDef(AliTPCpolyTrack,1) // Time Projection "polynomial track"
65 : };
66 :
67 : void AliTPCpolyTrack::GetFitPoint(Double_t x, Double_t &y, Double_t &z) const
68 : {
69 0 : y = fA+fB*x+fC*x*x;
70 0 : z = fD+fE*x+fF*x*x;
71 0 : }
72 :
73 :
74 : void AliTPCpolyTrack::GetFitDerivation(Double_t x, Double_t &y, Double_t &z) const
75 : {
76 :
77 0 : y = fB+2.*fC*x;
78 0 : z = fE+2.*fF*x;
79 :
80 0 : }
81 :
82 : void AliTPCpolyTrack::GetFitDerivation2(Double_t &y, Double_t &z) const
83 : {
84 :
85 0 : y = 2.*fC;
86 0 : z = 2.*fF;
87 :
88 0 : }
89 :
90 :
91 : #endif
92 :
93 :
|