]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCpolyTrack.h
Adding stream level and debug streamer to the base class
[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:
31 void Fit2(Double_t fSumY, Double_t fSumYX, Double_t fSumYX2,
32 Double_t fSumX, Double_t fSumX2, Double_t fSumX3,
33 Double_t fSumX4, Double_t fSumW, Double_t &a, Double_t &b, Double_t &c);
34 void Fit1(Double_t fSumY, Double_t fSumYX,
35 Double_t fSumX, Double_t fSumX2,
36 Double_t fSumW, Double_t &a, Double_t &b, Double_t &c);
37 //
ae7eb9a4 38 Double_t fA; // parameter
39 Double_t fB; // parameter
40 Double_t fC; // parameter
41 Double_t fD; // parameter
42 Double_t fE; // parameter
43 Double_t fF; // parameter
44 Double_t fMaxX; // X range
45 Double_t fMinX; // X range
1627d1c4 46 //
47 Double_t fSumW; // sum of the weight
48
ae7eb9a4 49 Double_t fSumX; // weighted summ of X
50 Double_t fSumX2; // weighted summ of X**2
51 Double_t fSumX3; // weighted summ of X**3
52 Double_t fSumX4; // weighted summ of X**4
53 Double_t fSumY; // as X
54 Double_t fSumYX; // summ of X*Y
55 Double_t fSumYX2; // summ of X**2*Y
56 Double_t fSumZ; // summ of Z
57 Double_t fSumZX; // summ of Z*X
58 Double_t fSumZX2; // summ of Z*X**2
1627d1c4 59
ae7eb9a4 60 Double_t fX[200]; // array of coordinates
61 Double_t fY[200]; // array of coordinates
62 Double_t fSY[200]; // array of coordinates
63 Double_t fZ[200]; // array of coordinates
64 Double_t fSZ[200]; // array of coordinates
1627d1c4 65
ae7eb9a4 66 Int_t fNPoints; // No of points
1627d1c4 67
68 ClassDef(AliTPCpolyTrack,1) // Time Projection "polynomial track"
69};
70
ae7eb9a4 71void AliTPCpolyTrack::GetFitPoint(Double_t x, Double_t &y, Double_t &z) const
37264142 72{
73 y = fA+fB*x+fC*x*x;
74 z = fD+fE*x+fF*x*x;
75}
76
77
ae7eb9a4 78void AliTPCpolyTrack::GetFitDerivation(Double_t x, Double_t &y, Double_t &z) const
37264142 79{
80
81 y = fB+2.*fC*x;
82 z = fE+2.*fF*x;
83
84}
85
ae7eb9a4 86void AliTPCpolyTrack::GetFitDerivation2(Double_t &y, Double_t &z) const
0909b376 87{
88
89 y = 2.*fC;
90 z = 2.*fF;
91
92}
93
1627d1c4 94
95#endif
96
97