]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSRiemannFit.h
Using default Root containers for Root tags bigger than v4-00-01. Removing fast wrapp...
[u/mrichter/AliRoot.git] / ITS / AliITSRiemannFit.h
CommitLineData
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>
9class TTree;
10class AliITS;
11class TVector3;
8db76038 12
13class 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 :
fce126a6 64 // copy constructor (NO copy ctr. allowed)
65 AliPointtl(const AliPointtl& /*ap */) {}
66 // assignment operator (NO assignment allowed)
67 AliPointtl& operator=(const AliPointtl& /* ap */) {return *this;}
68 Int_t fLay,fLad,fDet,fTrack; // layer,ladder,detector and track
5ff6c5cc 69 Float_t fx,fy,fz,fr; // global position of point
70 Float_t fdE,fdx,fdy,fdz; // Errors
71 TLorentzVector* fOrigin; // position and momentum of
72 TLorentzVector* fMomentum; // particle at its origin
73 Int_t fCode; // Geant code of particle
fce126a6 74 Char_t *fName; // name
5ff6c5cc 75 Float_t fPt; // Pt at the origin
76 Float_t fPhi,fEta,fVertexPhi; // phi eta on layer and phi on vertex
77 };
8db76038 78 Int_t GetSize() const {return this->fSizeEvent;}
79 Int_t GetPrimaryTracks() const {return this->fPrimaryTracks;}
80 Int_t GetPoints() const {return this->fPoints;}
81 Int_t GetParticles() const {return this->fParticles;}
82 Int_t GetLayPoints(Int_t layer) const {return this->fPLay[layer-1];}
5ff6c5cc 83 AliPointtl **GetPointRecs() const {return this->fPointRecs;}
84 Float_t GetX(Int_t i) const {return this->fPointRecs[i]->GetX();}
85 Float_t GetY(Int_t i) const {return this->fPointRecs[i]->GetY();}
86 Float_t GetZ(Int_t i) const {return this->fPointRecs[i]->GetZ();}
87 Float_t GetdX(Int_t i) const {return this->fPointRecs[i]->GetdX();}
88 Float_t GetdY(Int_t i) const {return this->fPointRecs[i]->GetdY();}
89 Float_t GetdZ(Int_t i) const {return this->fPointRecs[i]->GetdZ();}
8db76038 90
088e0b8d 91 void InitPoints(Int_t ntracks,AliITS *ITS,TTree *TR,Int_t nparticles);
8db76038 92 void WritePoints(void);
93 void ReadPoints(void);
5ff6c5cc 94 static Int_t SolveCubic(Double_t a,Double_t b,Double_t c,Double_t& x1,Double_t& x2,Double_t& x3);
088e0b8d 95 Int_t FitHelix(Int_t tracknumber,Double_t Px,Double_t Py,Double_t Pz,
8db76038 96 Double_t& fd0,Double_t& fphi,Double_t& u0, Double_t& v0, Double_t& rho,
97 Double_t& omega, Double_t& z0,
98 Double_t& vpar,Double_t& chisql,Double_t& fCorrLin,Double_t& fFit,
99 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 100 Int_t FitHelix(Int_t NPoints, TVector3** fPointRecs,
101 TVector3** fPointRecErrors,Float_t& f1,
102 Float_t& f2, Float_t& f3);
103 Int_t LinearFit(Int_t npoints, TVector3 **input,
104 TVector3 **errors, Double_t omega,
105 Double_t &thu0, Double_t &thv0, Double_t &phi,TVector2 &zData, TVector3 &zError,
106 Double_t &corrLin);
107
8db76038 108 private:
fce126a6 109 // copy constructor (NO copy ctr. allowed)
110 AliITSRiemannFit(const AliITSRiemannFit& rf );
111 // assignment operator (NO assignment allowed)
112 AliITSRiemannFit& operator=(const AliITSRiemannFit& /* rf */);
113
5ff6c5cc 114 static Double_t Fitfunction(Double_t *x, Double_t* par);
115
8db76038 116 Int_t fSizeEvent; // size of array
117 Int_t fPrimaryTracks; // number of primary tracks in the event
118 Int_t fPoints; // number of Reconstructed Points in the event
119 Int_t fParticles; // number of particles in the event
120 Int_t fPLay[6]; // number of points in each layer
fce126a6 121 AliPointtl **fPointRecs; //rec points
122
8db76038 123
124 ClassDef(AliITSRiemannFit,1) // Fast fit of helices on ITS RecPoints
125 };
126#endif
127