During simulation: fill STU region w/ non null time sums
[u/mrichter/AliRoot.git] / TPC / AliTPCpolyTrack.h
CommitLineData
1627d1c4 1#ifndef ALITPCPOLYTRACK_H
2#define ALITPCPOLYTRACK_H
3
4//-------------------------------------------------------
5// TPC Cluster Class
ae7eb9a4 6// track fitting using the polynom
7// allows bending in both direction
1627d1c4 8//
9// Origin: Marian Ivanov
10//-------------------------------------------------------
11
12#include "TObject.h"
13
14//_____________________________________________________________________________
15class AliTPCpolyTrack : public TObject {
16public:
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);
ae7eb9a4 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;
0909b376 23 void UpdateParameters(Int_t ny, Int_t nz);
1627d1c4 24 void UpdateParameters();
ae7eb9a4 25 Int_t GetN() const {return fNPoints;}
26 void GetBoundaries(Double_t &xmin, Double_t &xmax) const
27 {xmin = fMinX;xmax=fMaxX;}
37264142 28 void Refit(AliTPCpolyTrack & track, Double_t deltay, Double_t deltaz);
0909b376 29 void Refit(AliTPCpolyTrack & track, Double_t deltay, Double_t deltaz, Int_t nfirst, Int_t ny, Int_t nz);
1627d1c4 30private:
abb58ea3 31 void Fit2( Double_t &a, Double_t &b, Double_t &c);
32 void Fit1(Double_t &a, Double_t &b, Double_t &c);
1627d1c4 33 //
ae7eb9a4 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
1627d1c4 42 //
43 Double_t fSumW; // sum of the weight
44
ae7eb9a4 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
1627d1c4 55
ae7eb9a4 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
1627d1c4 61
ae7eb9a4 62 Int_t fNPoints; // No of points
1627d1c4 63
64 ClassDef(AliTPCpolyTrack,1) // Time Projection "polynomial track"
65};
66
ae7eb9a4 67void AliTPCpolyTrack::GetFitPoint(Double_t x, Double_t &y, Double_t &z) const
37264142 68{
69 y = fA+fB*x+fC*x*x;
70 z = fD+fE*x+fF*x*x;
71}
72
73
ae7eb9a4 74void AliTPCpolyTrack::GetFitDerivation(Double_t x, Double_t &y, Double_t &z) const
37264142 75{
76
77 y = fB+2.*fC*x;
78 z = fE+2.*fF*x;
79
80}
81
ae7eb9a4 82void AliTPCpolyTrack::GetFitDerivation2(Double_t &y, Double_t &z) const
0909b376 83{
84
85 y = 2.*fC;
86 z = 2.*fF;
87
88}
89
1627d1c4 90
91#endif
92
93