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