]>
Commit | Line | Data |
---|---|---|
8db76038 | 1 | #ifndef ALIITSRIEMANNFIT_H |
2 | #define ALIITSRIEMANNFIT_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
5ff6c5cc | 8 | #include<TLorentzVector.h> |
9 | class TTree; | |
10 | class AliITS; | |
11 | class TVector3; | |
8db76038 | 12 | |
13 | class AliITSRiemannFit : public TObject{ | |
14 | public: | |
15 | AliITSRiemannFit(); | |
16 | AliITSRiemannFit(Int_t size,Int_t ntracks); | |
17 | ~AliITSRiemannFit(); | |
5ff6c5cc | 18 | class AliPointtl { |
19 | public : | |
20 | AliPointtl(); | |
21 | // getters | |
22 | Int_t GetLay() const {return fLay;} | |
23 | Int_t GetLad() const {return fLad;} | |
24 | Int_t GetDet() const {return fDet;} | |
25 | Int_t GetTrack() const {return fTrack;} | |
26 | Float_t GetX() const {return fx;} | |
27 | Float_t GetY() const {return fy;} | |
28 | Float_t GetZ() const {return fz;} | |
29 | Float_t GetR() const {return fr;} | |
30 | Float_t GetdE() const {return fdE;} | |
31 | Float_t GetdX() const {return fdx;} | |
32 | Float_t GetdY() const {return fdy;} | |
33 | Float_t GetdZ() const {return fdz;} | |
34 | TLorentzVector* GetOrigin() const {return fOrigin;} | |
35 | TLorentzVector* GetMomentum() const {return fMomentum;} | |
36 | Int_t GetCode() const {return fCode;} | |
37 | Char_t* GetName() {return fName;} | |
38 | Float_t GetPt() const {return fPt;} | |
39 | Float_t GetPhi() const {return fPhi;} | |
40 | Float_t GetEta() const {return fEta;} | |
41 | Float_t GetVertexPhi() const {return fVertexPhi;} | |
42 | //setters | |
43 | void SetLay(Int_t l=0) { fLay = l;} | |
44 | void SetLad(Int_t l=0) { fLad = l;} | |
45 | void SetDet(Int_t d=0) { fDet = d;} | |
46 | void SetTrack(Int_t t=0) { fTrack = t;} | |
47 | void SetX(Float_t x=0) { fx = x;} | |
48 | void SetY(Float_t y=0) { fy = y;} | |
49 | void SetZ(Float_t z=0) { fz = z;} | |
50 | void SetR(Float_t r=0) { fr = r;} | |
51 | void SetdE(Float_t de=0) { fdE = de;} | |
52 | void SetdX(Float_t dx=0) { fdx = dx;} | |
53 | void SetdY(Float_t dy=0) { fdy = dy;} | |
54 | void SetdZ(Float_t dz=0) { fdz = dz;} | |
55 | void SetOrigin(TLorentzVector *ori=0) { fOrigin = ori;} | |
56 | void SetMomentum(TLorentzVector *mo=0) { fMomentum = mo;} | |
57 | void SetCode(Int_t c=0) { fCode = c;} | |
58 | void SetName(Char_t *n=0) { fName = n;} | |
59 | void SetPt(Float_t pt=0) { fPt = pt;} | |
60 | void SetPhi(Float_t phi=0) { fPhi = phi;} | |
61 | void SetEta(Float_t eta=0) { fEta = eta;} | |
62 | void SetVertexPhi(Float_t vert=0) { fVertexPhi = vert;} | |
63 | private : | |
64 | Int_t fLay,fLad,fDet,fTrack; | |
65 | Float_t fx,fy,fz,fr; // global position of point | |
66 | Float_t fdE,fdx,fdy,fdz; // Errors | |
67 | TLorentzVector* fOrigin; // position and momentum of | |
68 | TLorentzVector* fMomentum; // particle at its origin | |
69 | Int_t fCode; // Geant code of particle | |
70 | Char_t *fName; | |
71 | Float_t fPt; // Pt at the origin | |
72 | Float_t fPhi,fEta,fVertexPhi; // phi eta on layer and phi on vertex | |
73 | }; | |
8db76038 | 74 | Int_t GetSize() const {return this->fSizeEvent;} |
75 | Int_t GetPrimaryTracks() const {return this->fPrimaryTracks;} | |
76 | Int_t GetPoints() const {return this->fPoints;} | |
77 | Int_t GetParticles() const {return this->fParticles;} | |
78 | Int_t GetLayPoints(Int_t layer) const {return this->fPLay[layer-1];} | |
5ff6c5cc | 79 | AliPointtl **GetPointRecs() const {return this->fPointRecs;} |
80 | Float_t GetX(Int_t i) const {return this->fPointRecs[i]->GetX();} | |
81 | Float_t GetY(Int_t i) const {return this->fPointRecs[i]->GetY();} | |
82 | Float_t GetZ(Int_t i) const {return this->fPointRecs[i]->GetZ();} | |
83 | Float_t GetdX(Int_t i) const {return this->fPointRecs[i]->GetdX();} | |
84 | Float_t GetdY(Int_t i) const {return this->fPointRecs[i]->GetdY();} | |
85 | Float_t GetdZ(Int_t i) const {return this->fPointRecs[i]->GetdZ();} | |
8db76038 | 86 | |
088e0b8d | 87 | void InitPoints(Int_t ntracks,AliITS *ITS,TTree *TR,Int_t nparticles); |
8db76038 | 88 | void WritePoints(void); |
89 | void ReadPoints(void); | |
5ff6c5cc | 90 | static Int_t SolveCubic(Double_t a,Double_t b,Double_t c,Double_t& x1,Double_t& x2,Double_t& x3); |
088e0b8d | 91 | Int_t FitHelix(Int_t tracknumber,Double_t Px,Double_t Py,Double_t Pz, |
8db76038 | 92 | Double_t& fd0,Double_t& fphi,Double_t& u0, Double_t& v0, Double_t& rho, |
93 | Double_t& omega, Double_t& z0, | |
94 | Double_t& vpar,Double_t& chisql,Double_t& fCorrLin,Double_t& fFit, | |
95 | Int_t first=1,Int_t second=1,Int_t third=1,Int_t fourth=1,Int_t fifth=1,Int_t sixth=1); | |
5ff6c5cc | 96 | Int_t FitHelix(Int_t NPoints, TVector3** fPointRecs, |
97 | TVector3** fPointRecErrors,Float_t& f1, | |
98 | Float_t& f2, Float_t& f3); | |
99 | Int_t LinearFit(Int_t npoints, TVector3 **input, | |
100 | TVector3 **errors, Double_t omega, | |
101 | Double_t &thu0, Double_t &thv0, Double_t &phi,TVector2 &zData, TVector3 &zError, | |
102 | Double_t &corrLin); | |
103 | ||
8db76038 | 104 | private: |
5ff6c5cc | 105 | static Double_t Fitfunction(Double_t *x, Double_t* par); |
106 | ||
8db76038 | 107 | Int_t fSizeEvent; // size of array |
108 | Int_t fPrimaryTracks; // number of primary tracks in the event | |
109 | Int_t fPoints; // number of Reconstructed Points in the event | |
110 | Int_t fParticles; // number of particles in the event | |
111 | Int_t fPLay[6]; // number of points in each layer | |
5ff6c5cc | 112 | AliPointtl **fPointRecs; |
8db76038 | 113 | // |
114 | // test erase | |
115 | /* Point_tl **fspdi,**fspdo; // This are for the first two layers and vertex analysis */ | |
116 | ||
117 | ClassDef(AliITSRiemannFit,1) // Fast fit of helices on ITS RecPoints | |
118 | }; | |
119 | #endif | |
120 |