7 typedef double Mtx33D_t[3][3];
8 typedef double Mtx55D_t[5][5];
13 const double *Arr()
const {
return &mHH;}
14 double *Arr() {
return &mHH;}
15 const double &operator[](
int idx)
const {
return (&mHH)[idx];}
16 double &operator[](
int idx) {
return (&mHH)[idx];}
17 void Clear() { memset(
this,0,
sizeof(*
this));}
19 void Set(
const double *err);
20 void Move(
double const F[3][3]);
35 const double *Arr()
const {
return &mHH;}
36 double *Arr() {
return &mHH;}
37 operator const double* () {
return &mHH;}
38 operator double* () {
return &mHH;}
40 {
for (
int i=0;i<15;i++) {Arr()[i]*=f;}
return *
this;}
41 void Clear() { memset(
this,0,
sizeof(*
this));}
42 void Set(
const double *err);
43 void Set(
const double *errxy,
const double *errz);
44 void Move(
double const F[5][5]);
46 void Print(
const char *tit=0)
const;
60 mHL, mAL, mCL, mZL, mLL;
70 TCircle_(
const double *x,
const double *dir,
double rho);
75 void Set(
const double *x=0,
const double *dir=0,
const double rho=0);
76 virtual void Clear(
const char *opt=
"");
77 const double* Pos()
const {
return fX; }
78 double* Pos() {
return fX; }
79 const double* Dir()
const {
return fD; }
80 double* Dir() {
return fD; }
81 double Rho()
const {
return fRho;}
82 double& Rho() {
return fRho;}
83 void Nor(
double *norVec)
const;
84 void SetEmx(
const double *err=0);
85 const TCEmx_t_ *Emx()
const {
return fEmx;}
87 void GetCenter(
double center[2])
const;
88 double Path(
const double pnt[2])
const;
89 double Path(
const double pnt[2],
const double exy[3])
const;
90 double Path(
const TCircle_ &tc,
double *s2=0)
const;
91 double Move(
double step);
92 void Rot(
double angle);
93 void Rot(
double cosa,
double sina);
95 double Eval(
double step,
double *xy,
double *dir=0)
const;
96 void Show(
int nPts,
const double *Pts,
int pstep=2);
97 virtual void Print(
const char* chopt =
"")
const;
98 void SetStrait(
int strait=1) {SetBit(1,strait) ;}
99 int IsStrait() {
return TestBit(1);}
105 static void TestMtx();
108 void MoveErrs(
double l);
109 void MakeMtx (
double l,
double F[3][3]);
136 int Size()
const {
return fN;}
137 int Used()
const {
return fNuse;}
138 void Add (
double x,
double y,
const double *errs=0);
139 void Add (
double x,
double y,
double z);
140 void AddErr(
const double *errs,
double errz=0);
141 void AddErr(
double errh,
double errz=0);
142 void AddZ(
double z,
double err2z=0);
145 double FixAt(
const double vals[5],
int flag);
147 double GetZ0()
const {
return fZ0 ;}
148 double GetTanL()
const {
return fTanL ;}
149 void SetCase(
int kase=0) {fCase=kase ;}
150 int GetCase()
const {
return fKase ;}
151 double Chi2()
const {
return fChi2 ;}
152 int Ndf()
const {
return fNdf ;}
153 double Chi2Z ()
const {
return fChi2Z ;}
154 void SetNdf(
int ndf);
156 void Clear(
const char *opt =
"");
157 void Print(
const char* chopt =
"")
const;
158 const double *GetX(
int i=0)
const;
159 double *GetX(
int i=0);
162 static void Test(
int iTest=0);
163 static void TestCorr(
int kode=0);
167 double d2f(
int i,
int j);
170 double d2Rho2(
int i,
int j);
173 double d2F(
int i,
int j);
198 double fXd, fYd, fG1;
200 double fXCenter,fYCenter;
201 double fCov[6],fA,fB,fC,fH;
204 double fCorrR,fCorrB;
219 THelixTrack_(
const double *xyz,
const double *dir,
double rho);
224 void Set (
const double *xyz,
const double *dir,
double rho);
225 void Set (
double rho){ fRho = rho;}
226 void SetEmx(
const double* err2xy,
const double* err2z);
227 void SetEmx(
const double* err=0);
228 THEmx_t_ *Emx()
const {
return fEmx;}
229 void StiEmx(
double emx[21])
const;
230 void GetSpot(
const double axis[3][3],
double emx[3])
const;
235 double Move(
double step);
236 double Move(
double step,
double F[5][5]);
238 double Eval(
double step,
double *xyz,
double *dir=0,
double *rho=0)
const;
245 double Path(
double stmax,
const double *surf,
int nsurf
246 ,
double *x=0,
double *dir=0,
int nearest=0)
const;
249 double Path(
const double point[3],
double *xyz=0,
double *dir=0)
const;
251 double Dca(
const double point[3],
double *dcaErr=0)
const;
254 double Path(
double x,
double y)
const ;
256 double Dca(
double x,
double y,
double *dcaErr=0)
const ;
269 ,
double *dist=0,
double *xyz=0)
const;
272 double Dca(
const double point[3]
273 ,
double &dcaXY,
double &dcaZ,
double dcaEmx[3],
int kind=3)
const;
275 const double *GetXYZ()
const {
return fX;}
276 const double *Pos()
const {
return fX;}
277 double *Pos() {
return fX;}
278 const double *Dir()
const {
return fP;}
279 double *Dir() {
return fP;}
280 double GetRho()
const {
return fRho ;}
281 double GetCos()
const {
return fCosL;}
282 double GetSin()
const {
return fP[2];}
283 double GetTan()
const {
return fP[2]/fCosL;}
284 double GetPeriod()
const ;
285 void Rot(
double angle);
286 void Rot(
double cosa,
double sina);
288 void Show(
double len,
const THelixTrack_ *other=0)
const;
289 void Print(Option_t *opt=
"")
const;
291 static void InvertMtx(
double derivs[5][5]);
297 static void TestMtx();
299 static void TestErr();
300 static void TestTwoHlx();
301 static void TestBak();
305 void MakeMtx(
double step,
double F[5][5]);
307 double Path(
double stmin,
double stmax,
const double *surf,
int nsurf
308 ,
double *x=0,
double *dir=0,
int nearest=0)
const;
309 double PathHZ(
const double *surf,
int nsurf
310 ,
double *x=0,
double *dir=0,
int nearest=0)
const;
326 int Size()
const {
return fCircleFitter.Size();}
327 int Used()
const {
return fCircleFitter.Used();}
328 void Add (
double x,
double y,
double z);
329 void AddErr(
const double *err2xy,
double err2z);
330 void AddErr(
double errhh,
double errzz);
333 double FixAt(
const double vals[5],
int flag=1);
335 void SetCase(
int kase=0) {fCircleFitter.SetCase(kase);}
336 int GetCase()
const {
return fCircleFitter.GetCase();}
337 double Chi2()
const {
return fChi2;}
338 int Ndf()
const {
return fCircleFitter.Ndf()+fPoli1Fitter.Ndf();}
339 double Chi2XY ()
const {
return fCircleFitter.Chi2();}
340 double Chi2SZ ()
const {
return fPoli1Fitter.Chi2() ;}
341 int NdfXY ()
const {
return fCircleFitter.Ndf();}
342 int NdfSZ ()
const {
return fPoli1Fitter.Ndf() ;}
345 void Clear(
const char *opt =
"");
346 void Print(
const char* chopt =
"")
const;
349 static void Test(
int kase=0);
351 void Update(
int kase);
359 #endif // THELIXTRACK_H
void Backward()
Change direction.
double PathX(const THelixTrack_ &hlx, double *s2=0, double *dist=0, double *xyz=0) const
void GetSpot(const double axis[3][3], double emx[3]) const
double FixAt(const double vals[5], int flag)
double Path(double stmax, const double *surf, int nsurf, double *x=0, double *dir=0, int nearest=0) const
double Move(double step)
Move along helix.
void MakeMtx(double step, double F[5][5])
double Eval(double step, double *xyz, double *dir=0, double *rho=0) const
Evaluate params with given step along helix.
double Dca(const double point[3], double *dcaErr=0) const
DCA to given space point (with error matrix)