CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkCircleTraj Class Reference

#include <TrkCircleTraj.h>

+ Inheritance diagram for TrkCircleTraj:

Public Member Functions

 TrkCircleTraj (const HepVector &, const HepSymMatrix &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 
 TrkCircleTraj (const TrkExchangePar &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 
 TrkCircleTraj (const TrkCircleTraj &)
 
TrkCircleTrajclone () const
 
 ~TrkCircleTraj ()
 
TrkCircleTrajoperator= (const TrkCircleTraj &)
 
virtual HepPoint3D position (double fltLen) const
 
virtual Hep3Vector direction (double fltLen) const
 
virtual Hep3Vector delDirect (double) const
 
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
 
virtual void getInfo (double fltLen, HepPoint3D &, Hep3Vector &dir, Hep3Vector &delDir) const
 
virtual void getDFInfo (double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
 
virtual void getDFInfo2 (double fltLen, DifPoint &pos, DifVector &dir) const
 
virtual double curvature (double fltLen) const
 
virtual double distTo1stError (double flt, double tol, int pathDir) const
 
virtual double distTo2ndError (double flt, double tol, int pathDir) const
 
HepMatrix derivDeflect (double fltlen, deflectDirection) const
 
HepMatrix derivDisplace (double fltlen, deflectDirection) const
 
HepMatrix derivPFract (double fltlen) const
 
TranslateParams paramFunction () const
 
void invertParams (TrkParams *params, std::vector< bool > &flags) const
 
int nPar () const
 
virtual void visitAccept (TrkVisitor *vis) const
 
double d0 () const
 
double phi0 () const
 
double omega () const
 
 TrkCircleTraj (const HepVector &, const HepSymMatrix &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 
 TrkCircleTraj (const TrkExchangePar &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 
 TrkCircleTraj (const TrkCircleTraj &)
 
TrkCircleTrajclone () const
 
 ~TrkCircleTraj ()
 
TrkCircleTrajoperator= (const TrkCircleTraj &)
 
virtual HepPoint3D position (double fltLen) const
 
virtual Hep3Vector direction (double fltLen) const
 
virtual Hep3Vector delDirect (double) const
 
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
 
virtual void getInfo (double fltLen, HepPoint3D &, Hep3Vector &dir, Hep3Vector &delDir) const
 
virtual void getDFInfo (double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
 
virtual void getDFInfo2 (double fltLen, DifPoint &pos, DifVector &dir) const
 
virtual double curvature (double fltLen) const
 
virtual double distTo1stError (double flt, double tol, int pathDir) const
 
virtual double distTo2ndError (double flt, double tol, int pathDir) const
 
HepMatrix derivDeflect (double fltlen, deflectDirection) const
 
HepMatrix derivDisplace (double fltlen, deflectDirection) const
 
HepMatrix derivPFract (double fltlen) const
 
TranslateParams paramFunction () const
 
void invertParams (TrkParams *params, std::vector< bool > &flags) const
 
int nPar () const
 
virtual void visitAccept (TrkVisitor *vis) const
 
double d0 () const
 
double phi0 () const
 
double omega () const
 
 TrkCircleTraj (const HepVector &, const HepSymMatrix &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 
 TrkCircleTraj (const TrkExchangePar &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 
 TrkCircleTraj (const TrkCircleTraj &)
 
TrkCircleTrajclone () const
 
 ~TrkCircleTraj ()
 
TrkCircleTrajoperator= (const TrkCircleTraj &)
 
virtual HepPoint3D position (double fltLen) const
 
virtual Hep3Vector direction (double fltLen) const
 
virtual Hep3Vector delDirect (double) const
 
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
 
virtual void getInfo (double fltLen, HepPoint3D &, Hep3Vector &dir, Hep3Vector &delDir) const
 
virtual void getDFInfo (double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
 
virtual void getDFInfo2 (double fltLen, DifPoint &pos, DifVector &dir) const
 
virtual double curvature (double fltLen) const
 
virtual double distTo1stError (double flt, double tol, int pathDir) const
 
virtual double distTo2ndError (double flt, double tol, int pathDir) const
 
HepMatrix derivDeflect (double fltlen, deflectDirection) const
 
HepMatrix derivDisplace (double fltlen, deflectDirection) const
 
HepMatrix derivPFract (double fltlen) const
 
TranslateParams paramFunction () const
 
void invertParams (TrkParams *params, std::vector< bool > &flags) const
 
int nPar () const
 
virtual void visitAccept (TrkVisitor *vis) const
 
double d0 () const
 
double phi0 () const
 
double omega () const
 
- Public Member Functions inherited from TrkSimpTraj
 TrkSimpTraj (const HepVector &params, const HepSymMatrix &cov, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
 
 TrkSimpTraj (const TrkParams &params, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
 
virtual ~TrkSimpTraj ()
 
virtual TrkSimpTrajclone () const =0
 
TrkParamsparameters ()
 
const TrkParamsparameters () const
 
virtual const TrkSimpTrajlocalTrajectory (double fltLen, double &localFlt) const
 
const HepPoint3DreferencePoint () const
 
virtual void print (std::ostream &os) const
 
virtual void printAll (std::ostream &os) const
 
virtual int nPar () const
 
void changePoint (const HepPoint3D &newpoint, double &fltlen)
 
void setPoint (const HepPoint3D &newpoint)
 
TrkSimpTrajinvert ()
 
virtual void invertParams (TrkParams *newparams, std::vector< bool > &flags) const =0
 
virtual TranslateParams paramFunction () const =0
 
virtual void visitAccept (TrkVisitor *vis) const =0
 
bool operator== (const TrkSimpTraj &) const
 
 TrkSimpTraj (const HepVector &params, const HepSymMatrix &cov, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
 
 TrkSimpTraj (const TrkParams &params, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
 
virtual ~TrkSimpTraj ()
 
virtual TrkSimpTrajclone () const =0
 
TrkParamsparameters ()
 
const TrkParamsparameters () const
 
virtual const TrkSimpTrajlocalTrajectory (double fltLen, double &localFlt) const
 
const HepPoint3DreferencePoint () const
 
virtual void print (std::ostream &os) const
 
virtual void printAll (std::ostream &os) const
 
virtual int nPar () const
 
void changePoint (const HepPoint3D &newpoint, double &fltlen)
 
void setPoint (const HepPoint3D &newpoint)
 
TrkSimpTrajinvert ()
 
virtual void invertParams (TrkParams *newparams, std::vector< bool > &flags) const =0
 
virtual TranslateParams paramFunction () const =0
 
virtual void visitAccept (TrkVisitor *vis) const =0
 
bool operator== (const TrkSimpTraj &) const
 
- Public Member Functions inherited from TrkDifTraj
 TrkDifTraj (const double lowlim=-99999., const double hilim=99999.)
 
virtual ~TrkDifTraj ()
 
virtual void getDFInfo (double fltLen, DifPoint &pos, DifVector &direction, DifVector &delDirect) const =0
 
virtual void getDFInfo2 (double fltLen, DifPoint &pos, DifVector &direction) const
 
virtual const TrkSimpTrajlocalTrajectory (double fltLen, double &localFlt) const =0
 
 TrkDifTraj (const double lowlim=-99999., const double hilim=99999.)
 
virtual ~TrkDifTraj ()
 
virtual void getDFInfo (double fltLen, DifPoint &pos, DifVector &direction, DifVector &delDirect) const =0
 
virtual void getDFInfo2 (double fltLen, DifPoint &pos, DifVector &direction) const
 
virtual const TrkSimpTrajlocalTrajectory (double fltLen, double &localFlt) const =0
 
- Public Member Functions inherited from Trajectory
 Trajectory (double lowlim, double hilim)
 
virtual ~Trajectory ()
 
virtual HepPoint3D position (double) const =0
 
virtual Hep3Vector direction (double) const =0
 
virtual Hep3Vector delDirect (double) const =0
 
virtual double curvature (double) const =0
 
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &direction) const =0
 
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &direction, Hep3Vector &delDirect) const =0
 
double distTo0thError (double s, double tol, int pathDir) const
 
virtual double distTo1stError (double s, double tol, int pathDir) const =0
 
virtual double distTo2ndError (double s, double tol, int pathDir) const =0
 
virtual Trajectoryclone () const =0
 
bool validFlightDistance (double f, double tolerance=0.0) const
 
virtual void setFlightRange (double newrange[2])
 
double lowRange () const
 
double hiRange () const
 
double range () const
 
virtual void print (std::ostream &os) const
 
virtual void printAll (std::ostream &os) const
 
 Trajectory (double lowlim, double hilim)
 
virtual ~Trajectory ()
 
virtual HepPoint3D position (double) const =0
 
virtual Hep3Vector direction (double) const =0
 
virtual Hep3Vector delDirect (double) const =0
 
virtual double curvature (double) const =0
 
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &direction) const =0
 
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &direction, Hep3Vector &delDirect) const =0
 
double distTo0thError (double s, double tol, int pathDir) const
 
virtual double distTo1stError (double s, double tol, int pathDir) const =0
 
virtual double distTo2ndError (double s, double tol, int pathDir) const =0
 
virtual Trajectoryclone () const =0
 
bool validFlightDistance (double f, double tolerance=0.0) const
 
virtual void setFlightRange (double newrange[2])
 
double lowRange () const
 
double hiRange () const
 
double range () const
 
virtual void print (std::ostream &os) const
 
virtual void printAll (std::ostream &os) const
 
virtual HepMatrix derivDeflect (double fltlen, deflectDirection idir) const =0
 
virtual HepMatrix derivDisplace (double fltlen, deflectDirection idir) const =0
 
virtual HepMatrix derivPFract (double fltlen) const =0
 
virtual HepMatrix derivDeflect (double fltlen, deflectDirection idir) const =0
 
virtual HepMatrix derivDisplace (double fltlen, deflectDirection idir) const =0
 
virtual HepMatrix derivPFract (double fltlen) const =0
 

Static Public Member Functions

static int d0Index ()
 
static int phi0Index ()
 
static int omegaIndex ()
 
static int nCirPrm ()
 
static int d0Index ()
 
static int phi0Index ()
 
static int omegaIndex ()
 
static int nCirPrm ()
 
static int d0Index ()
 
static int phi0Index ()
 
static int omegaIndex ()
 
static int nCirPrm ()
 

Additional Inherited Members

- Static Public Attributes inherited from TrkSimpTraj
static HepPoint3D _theOrigin
 
- Protected Member Functions inherited from Trajectory
Trajectoryoperator= (const Trajectory &)
 
Trajectoryoperator= (const Trajectory &)
 
- Protected Attributes inherited from TrkSimpTraj
TrkParams _dtparams
 
HepPoint3D _refpoint
 
- Protected Attributes inherited from Trajectory
double flightrange [2]
 

Detailed Description

Constructor & Destructor Documentation

◆ TrkCircleTraj() [1/9]

TrkCircleTraj::TrkCircleTraj ( const HepVector &  pvec,
const HepSymMatrix &  pcov,
double  lowlim = -99999.,
double  hilim = 99999.,
const HepPoint3D refpoint = _theOrigin 
)

Definition at line 32 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

33 :
34 TrkSimpTraj(pvec, pcov, lowlim,hilim,refpoint)
35//-----------------------------------------------------------------
36{
37 // Make sure the dimensions of the input matrix and vector are correct
38 if( pvec.num_row() != nCirPrm() ||
39 pcov.num_row() != nCirPrm() ){
40 std::cout<<"ErrMsg(fatal)" <<
41 "CircleTraj: incorrect constructor vector/matrix dimension" << std::endl;
42 }
43
44 if (omega() == 0.0) parameters()->parameter()[omegaIndex()] = 1.e-9;
45}

◆ TrkCircleTraj() [2/9]

TrkCircleTraj::TrkCircleTraj ( const TrkExchangePar inpar,
double  lowlim = -99999.,
double  hilim = 99999.,
const HepPoint3D refpoint = _theOrigin 
)

Definition at line 49 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

50 :
51 TrkSimpTraj(inpar.params(), inpar.covariance(), lowlim,hilim,refpoint) {
52//-----------------------------------------------------------------
53
54 if (omega() == 0.0) parameters()->parameter()[omegaIndex()] = 1.e-9;
55}

◆ TrkCircleTraj() [3/9]

TrkCircleTraj::TrkCircleTraj ( const TrkCircleTraj h)

◆ ~TrkCircleTraj() [1/3]

TrkCircleTraj::~TrkCircleTraj ( )

Definition at line 81 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

82{
83}

◆ TrkCircleTraj() [4/9]

TrkCircleTraj::TrkCircleTraj ( const HepVector &  ,
const HepSymMatrix &  ,
double  lowlim = -99999.,
double  hilim = 99999.,
const HepPoint3D refpoint = _theOrigin 
)

◆ TrkCircleTraj() [5/9]

TrkCircleTraj::TrkCircleTraj ( const TrkExchangePar ,
double  lowlim = -99999.,
double  hilim = 99999.,
const HepPoint3D refpoint = _theOrigin 
)

◆ TrkCircleTraj() [6/9]

TrkCircleTraj::TrkCircleTraj ( const TrkCircleTraj )

◆ ~TrkCircleTraj() [2/3]

TrkCircleTraj::~TrkCircleTraj ( )

◆ TrkCircleTraj() [7/9]

TrkCircleTraj::TrkCircleTraj ( const HepVector &  ,
const HepSymMatrix &  ,
double  lowlim = -99999.,
double  hilim = 99999.,
const HepPoint3D refpoint = _theOrigin 
)

◆ TrkCircleTraj() [8/9]

TrkCircleTraj::TrkCircleTraj ( const TrkExchangePar ,
double  lowlim = -99999.,
double  hilim = 99999.,
const HepPoint3D refpoint = _theOrigin 
)

◆ TrkCircleTraj() [9/9]

TrkCircleTraj::TrkCircleTraj ( const TrkCircleTraj )

◆ ~TrkCircleTraj() [3/3]

TrkCircleTraj::~TrkCircleTraj ( )

Member Function Documentation

◆ clone() [1/3]

TrkCircleTraj * TrkCircleTraj::clone ( ) const
virtual

◆ clone() [2/3]

TrkCircleTraj * TrkCircleTraj::clone ( ) const
virtual

Implements TrkSimpTraj.

◆ clone() [3/3]

TrkCircleTraj * TrkCircleTraj::clone ( ) const
virtual

Implements TrkSimpTraj.

◆ curvature() [1/3]

double TrkCircleTraj::curvature ( double  fltLen) const
virtual

Implements Trajectory.

Definition at line 421 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

422{
423// Compute the curvature as the magnitude of the 2nd derrivative
424// of the position function with respect to the 3-d flight distance
425
426 return fabs(omega());
427}

◆ curvature() [2/3]

virtual double TrkCircleTraj::curvature ( double  fltLen) const
virtual

Implements Trajectory.

◆ curvature() [3/3]

virtual double TrkCircleTraj::curvature ( double  fltLen) const
virtual

Implements Trajectory.

◆ d0() [1/3]

◆ d0() [2/3]

double TrkCircleTraj::d0 ( ) const
inline

◆ d0() [3/3]

double TrkCircleTraj::d0 ( ) const
inline

◆ d0Index() [1/3]

static int TrkCircleTraj::d0Index ( )
inlinestatic

◆ d0Index() [2/3]

static int TrkCircleTraj::d0Index ( )
inlinestatic

◆ d0Index() [3/3]

static int TrkCircleTraj::d0Index ( )
inlinestatic

◆ delDirect() [1/3]

Hep3Vector TrkCircleTraj::delDirect ( double  fltLen) const
virtual

Implements Trajectory.

Definition at line 123 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

124{
125 double delX = -omega() * sin(angle(fltLen));
126 double delY = omega() * cos(angle(fltLen));
127 return Hep3Vector(delX, delY, 0.0);
128}
double sin(const BesAngle a)
double cos(const BesAngle a)

◆ delDirect() [2/3]

virtual Hep3Vector TrkCircleTraj::delDirect ( double  ) const
virtual

Implements Trajectory.

◆ delDirect() [3/3]

virtual Hep3Vector TrkCircleTraj::delDirect ( double  ) const
virtual

Implements Trajectory.

◆ derivDeflect() [1/3]

HepMatrix TrkCircleTraj::derivDeflect ( double  fltlen,
deflectDirection  idirect 
) const
virtual

Implements TrkKalDeriv.

Definition at line 322 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

323{
324// This function computes the column matrix of derivatives for the change
325// in parameters for a change in the direction of a track at a point along
326// its flight, holding the momentum and position constant. The effects for
327// changes in 2 perpendicular directions (theta1 = dip and
328// theta2 = phi*cos(dip)) can sometimes be added, as scattering in these
329// are uncorrelated.
330
331 HepMatrix ddflct(nCirPrm(),1,0); // initialize with zeros
332
333// Compute some common things
334
335 double omeg = omega();
336 double arcl = arc(fltlen);
337 double dx = cos(arcl);
338 double dy = sin(arcl);
339 double darc = omeg*d0();
340
341// Go through the parameters
342
343 switch (idirect) {
344 case theta1:
345 break;
346 case theta2:
347 ddflct[d0Index()][0] = -dy/(omeg);
348 ddflct[phi0Index()][0] = dx/(1+darc);
349 }
350
351 return ddflct;
352}

◆ derivDeflect() [2/3]

HepMatrix TrkCircleTraj::derivDeflect ( double  fltlen,
deflectDirection   
) const
virtual

Implements TrkKalDeriv.

◆ derivDeflect() [3/3]

HepMatrix TrkCircleTraj::derivDeflect ( double  fltlen,
deflectDirection   
) const
virtual

Implements TrkKalDeriv.

◆ derivDisplace() [1/3]

HepMatrix TrkCircleTraj::derivDisplace ( double  fltlen,
deflectDirection  idirect 
) const
virtual

Implements TrkKalDeriv.

Definition at line 355 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

356{
357// This function computes the column matrix of derivatives for the change
358// in parameters for a change in the position of a track at a point along
359// its flight, holding the momentum and direction constant. The effects for
360// changes in 2 perpendicular directions (theta1 = dip and
361// theta2 = phi*cos(dip)) can sometimes be added, as scattering in these
362// are uncorrelated.
363
364 HepMatrix ddflct(nCirPrm(),1,0); // initialize with zeros
365
366// Compute some common things
367
368 double omeg = omega();
369 double arcl = arc(fltlen);
370 double dx = cos(arcl);
371 double dy = sin(arcl);
372 double darc = omeg*d0();
373
374// Go through the parameters
375
376 switch (idirect) {
377 case theta1:
378 break;
379 case theta2:
380 ddflct[d0Index()][0] = dx;
381 ddflct[phi0Index()][0] = dy*omeg/(1+darc);
382 }
383
384 return ddflct;
385}

◆ derivDisplace() [2/3]

HepMatrix TrkCircleTraj::derivDisplace ( double  fltlen,
deflectDirection   
) const
virtual

Implements TrkKalDeriv.

◆ derivDisplace() [3/3]

HepMatrix TrkCircleTraj::derivDisplace ( double  fltlen,
deflectDirection   
) const
virtual

Implements TrkKalDeriv.

◆ derivPFract() [1/3]

HepMatrix TrkCircleTraj::derivPFract ( double  fltlen) const
virtual

Implements TrkKalDeriv.

Definition at line 388 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

389{
390//
391// This function computes the column matrix of derrivatives for the change
392// in parameters from a (fractional) change in the track momentum,
393// holding the direction and position constant. The momentum change can
394// come from energy loss or bfield inhomogeneities.
395//
396// For a helix, dp/P = -domega/omega,
397// dParam/d(domega/omega) = omega*dParam/ddomega
398
399 HepMatrix dmomfrac(nCirPrm(),1);
400
401// Compute some common things
402
403 double omeg = omega();
404 double arcl = arc(fltlen);
405 double dx = cos(arcl);
406 double dy = sin(arcl);
407 double darc = omeg*d0();
408
409// Go through the parameters
410// omega
411 dmomfrac[omegaIndex()][0] = -omeg;
412// d0
413 dmomfrac[d0Index()][0] = -(1-dx)/omeg;
414// phi0
415 dmomfrac[phi0Index()][0] = dy/(1+darc);
416
417 return dmomfrac;
418}

◆ derivPFract() [2/3]

HepMatrix TrkCircleTraj::derivPFract ( double  fltlen) const
virtual

Implements TrkKalDeriv.

◆ derivPFract() [3/3]

HepMatrix TrkCircleTraj::derivPFract ( double  fltlen) const
virtual

Implements TrkKalDeriv.

◆ direction() [1/3]

Hep3Vector TrkCircleTraj::direction ( double  fltLen) const
virtual

Implements Trajectory.

Definition at line 111 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

112{
113 // Angle formed by tangent vector after
114 // being rotated 'arclength' around orbit.
115 double alpha = angle( f );
116 // Construct 3-D tangent vector of unit magnitude.
117 return Hep3Vector ( cos(alpha),
118 sin(alpha),
119 0.0);
120}
const double alpha

◆ direction() [2/3]

virtual Hep3Vector TrkCircleTraj::direction ( double  fltLen) const
virtual

Implements Trajectory.

◆ direction() [3/3]

virtual Hep3Vector TrkCircleTraj::direction ( double  fltLen) const
virtual

Implements Trajectory.

◆ distTo1stError() [1/3]

double TrkCircleTraj::distTo1stError ( double  flt,
double  tol,
int  pathDir 
) const
virtual

Implements Trajectory.

Definition at line 131 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

132{
133 double arg = 2. * tol / fabs(omega());
134 assert (arg >= 0.);
135 return sqrt(arg);
136}
double arg(const EvtComplex &c)
Definition: EvtComplex.hh:227

◆ distTo1stError() [2/3]

virtual double TrkCircleTraj::distTo1stError ( double  flt,
double  tol,
int  pathDir 
) const
virtual

Implements Trajectory.

◆ distTo1stError() [3/3]

virtual double TrkCircleTraj::distTo1stError ( double  flt,
double  tol,
int  pathDir 
) const
virtual

Implements Trajectory.

◆ distTo2ndError() [1/3]

double TrkCircleTraj::distTo2ndError ( double  flt,
double  tol,
int  pathDir 
) const
virtual

Implements Trajectory.

Definition at line 139 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

140{
141 //return pow(6.*tol / sqr(omega()), 0.33333333);//yzhang changed sqr
142 return pow(6.*tol / (omega()*omega()), 0.33333333);
143}

◆ distTo2ndError() [2/3]

virtual double TrkCircleTraj::distTo2ndError ( double  flt,
double  tol,
int  pathDir 
) const
virtual

Implements Trajectory.

◆ distTo2ndError() [3/3]

virtual double TrkCircleTraj::distTo2ndError ( double  flt,
double  tol,
int  pathDir 
) const
virtual

Implements Trajectory.

◆ getDFInfo() [1/3]

void TrkCircleTraj::getDFInfo ( double  fltLen,
DifPoint pos,
DifVector dir,
DifVector delDir 
) const
virtual

Implements TrkDifTraj.

Definition at line 253 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

255{
256 //Provides difNum version of information for calculation of derivatives.
257
258 // Create difNumber versions of parameters
259 DifNumber phi0Df(phi0(), phi0Index()+1, nCirPrm());
260 DifNumber d0Df(d0(), d0Index()+1, nCirPrm());
261 DifNumber omegaDf(omega(), omegaIndex()+1, nCirPrm());
262 phi0Df.setIndepPar( parameters() );
263 d0Df.setIndepPar( parameters() );
264 omegaDf.setIndepPar( parameters() );
265
266 DifNumber sinPhi0, cosPhi0;
267 phi0Df.cosAndSin(cosPhi0, sinPhi0);
268
269 DifNumber alphaDf = omegaDf;
270 alphaDf *= flt;
271 alphaDf += phi0Df;
272
273 // This is not the prettiest line imaginable for this operation:
275 DifNumber sinAlpha, cosAlpha;
276 alphaDf.cosAndSin(cosAlpha, sinAlpha);
277
278 // DifNumber x = (sinAlpha - sinPhi0) / omegaDf - d0Df * sinPhi0 + px;
279 // DifNumber y = -(cosAlpha - cosPhi0) / omegaDf + d0Df * cosPhi0 + py;
280
281 DifNumber x = sinAlpha;
282 x -= sinPhi0;
283 x /= omegaDf;
284 x -= (d0Df * sinPhi0);
285
286 DifNumber y = -cosAlpha;
287 y += cosPhi0;
288 y /= omegaDf;
289 y += (d0Df * cosPhi0);
290
291
292 static DifNumber zNull(0.);
293
294 pos.x = x;
295 pos.y = y;
296 pos.z = zNull;
297
298 bool lref = (referencePoint().x() != 0. || referencePoint().y() != 0. ||
299 referencePoint().z() != 0.);
300 if (lref) {
301 DifNumber px(referencePoint().x());
302 DifNumber py(referencePoint().y());
303 DifNumber pz(referencePoint().z());
304 pos.x += px;
305 pos.y += py;
306 pos.z += pz;
307 }
308
309 dir.x = cosAlpha;
310 dir.y = sinAlpha;
311 dir.z = 0.;
312
313 delDir.x = -omegaDf;
314 delDir.x *= sinAlpha;
315
316 delDir.y = omegaDf;
317 delDir.y *= cosAlpha;
318
319 delDir.z = 0.;
320}
Double_t x[10]
DifNumber & mod(double lo, double hi)
void cosAndSin(DifNumber &c, DifNumber &s) const

◆ getDFInfo() [2/3]

virtual void TrkCircleTraj::getDFInfo ( double  fltLen,
DifPoint ,
DifVector dir,
DifVector delDir 
) const
virtual

Implements TrkDifTraj.

◆ getDFInfo() [3/3]

virtual void TrkCircleTraj::getDFInfo ( double  fltLen,
DifPoint ,
DifVector dir,
DifVector delDir 
) const
virtual

Implements TrkDifTraj.

◆ getDFInfo2() [1/3]

void TrkCircleTraj::getDFInfo2 ( double  fltLen,
DifPoint pos,
DifVector dir 
) const
virtual

Reimplemented from TrkDifTraj.

Definition at line 191 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

193{
194 //Provides difNum version of information for calculation of derivatives.
195
196 // Create difNumber versions of parameters
197 DifNumber phi0Df(phi0(), phi0Index()+1, nCirPrm());
198 DifNumber d0Df(d0(), d0Index()+1, nCirPrm());
199 DifNumber omegaDf(omega(), omegaIndex()+1, nCirPrm());
200 phi0Df.setIndepPar( parameters() );
201 d0Df.setIndepPar( parameters() );
202 omegaDf.setIndepPar( parameters() );
203
204 DifNumber sinPhi0, cosPhi0;
205 phi0Df.cosAndSin(cosPhi0, sinPhi0);
206
207 DifNumber alphaDf = omegaDf;
208 alphaDf *= fltLen;
209 alphaDf += phi0Df;
210
211 // This is not the prettiest line imaginable for this operation:
213 DifNumber sinAlpha, cosAlpha;
214 alphaDf.cosAndSin(cosAlpha, sinAlpha);
215
216 // DifNumber x = (sinAlpha - sinPhi0) / omegaDf - d0Df * sinPhi0 + px;
217 // DifNumber y = -(cosAlpha - cosPhi0) / omegaDf + d0Df * cosPhi0 + py;
218
219 DifNumber x = sinAlpha;
220 x -= sinPhi0;
221 x /= omegaDf;
222 x -= (d0Df * sinPhi0);
223
224 DifNumber y = -cosAlpha;
225 y += cosPhi0;
226 y /= omegaDf;
227 y += (d0Df * cosPhi0);
228
229
230 static DifNumber zNull(0.);
231
232 pos.x = x;
233 pos.y = y;
234 pos.z = zNull;
235
236 bool lref = (referencePoint().x() != 0. || referencePoint().y() != 0. ||
237 referencePoint().z() != 0.);
238 if (lref) {
239 DifNumber px(referencePoint().x());
240 DifNumber py(referencePoint().y());
241 DifNumber pz(referencePoint().z());
242 pos.x += px;
243 pos.y += py;
244 pos.z += pz;
245 }
246
247 dir.x = cosAlpha;
248 dir.y = sinAlpha;
249 dir.z = 0.;
250}

◆ getDFInfo2() [2/3]

virtual void TrkCircleTraj::getDFInfo2 ( double  fltLen,
DifPoint pos,
DifVector dir 
) const
virtual

Reimplemented from TrkDifTraj.

◆ getDFInfo2() [3/3]

virtual void TrkCircleTraj::getDFInfo2 ( double  fltLen,
DifPoint pos,
DifVector dir 
) const
virtual

Reimplemented from TrkDifTraj.

◆ getInfo() [1/6]

void TrkCircleTraj::getInfo ( double  fltLen,
HepPoint3D pos,
Hep3Vector &  dir,
Hep3Vector &  delDir 
) const
virtual

Implements Trajectory.

Definition at line 146 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

148{
149 double sphi0 = sin(phi0());
150 double cphi0 = cos(phi0());
151 double ang = angle(flt);
152 double cang = cos(ang);
153 double sang = sin(ang);
154 double xt = (sang-sphi0)/omega() - d0()*sphi0 + referencePoint().x();
155 double yt = -(cang-cphi0)/omega() + d0()*cphi0 + referencePoint().y();
156
157 pos.setX(xt);
158 pos.setY(yt);
159 pos.setZ(referencePoint().z());
160
161 dir.setX(cang);
162 dir.setY(sang);
163 dir.setZ(0.0);
164
165 delDir.setX(-omega()*sang);
166 delDir.setY( omega()*cang);
167 delDir.setZ(0.);
168}

◆ getInfo() [2/6]

virtual void TrkCircleTraj::getInfo ( double  fltLen,
HepPoint3D ,
Hep3Vector &  dir,
Hep3Vector &  delDir 
) const
virtual

Implements Trajectory.

◆ getInfo() [3/6]

virtual void TrkCircleTraj::getInfo ( double  fltLen,
HepPoint3D ,
Hep3Vector &  dir,
Hep3Vector &  delDir 
) const
virtual

Implements Trajectory.

◆ getInfo() [4/6]

void TrkCircleTraj::getInfo ( double  fltLen,
HepPoint3D pos,
Hep3Vector &  dir 
) const
virtual

Implements Trajectory.

Definition at line 171 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

172{
173 double sphi0 = sin(phi0());
174 double cphi0 = cos(phi0());
175 double ang = angle(fltLen);
176 double cang = cos(ang);
177 double sang = sin(ang);
178 double xt = (sang-sphi0)/omega() - d0()*sphi0 + referencePoint().x();
179 double yt = -(cang-cphi0)/omega() + d0()*cphi0 + referencePoint().y();
180
181 pos.setX(xt);
182 pos.setY(yt);
183 pos.setZ(referencePoint().z());
184
185 dir.setX(cang);
186 dir.setY(sang);
187 dir.setZ(0.0);
188}

◆ getInfo() [5/6]

virtual void TrkCircleTraj::getInfo ( double  fltLen,
HepPoint3D pos,
Hep3Vector &  dir 
) const
virtual

Implements Trajectory.

◆ getInfo() [6/6]

virtual void TrkCircleTraj::getInfo ( double  fltLen,
HepPoint3D pos,
Hep3Vector &  dir 
) const
virtual

Implements Trajectory.

◆ invertParams() [1/3]

void TrkCircleTraj::invertParams ( TrkParams params,
std::vector< bool > &  flags 
) const
virtual

Implements TrkSimpTraj.

Definition at line 495 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

496{
497 // Inverts parameters and returns true if the parameter inversion
498 // requires a change in sign of elements in the covariance matrix
499
500 for (unsigned iparam = 0; iparam < NCIRPAR; iparam++) {
501 switch ( iparam ) {
502 case d0Ind: // changes sign
503 case omegaInd: // changes sign
504 params->parameter()[iparam] *= -1.0;
505 flags[iparam] = true;
506 break;
507 case phi0Ind: // changes by pi, but covariance matrix shouldn't change
508 params->parameter()[iparam] =
509 BesAngle(params->parameter()[iparam] + Constants::pi);
510 flags[iparam] = false;
511 }
512 }
513}

◆ invertParams() [2/3]

void TrkCircleTraj::invertParams ( TrkParams params,
std::vector< bool > &  flags 
) const
virtual

Implements TrkSimpTraj.

◆ invertParams() [3/3]

void TrkCircleTraj::invertParams ( TrkParams params,
std::vector< bool > &  flags 
) const
virtual

Implements TrkSimpTraj.

◆ nCirPrm() [1/3]

static int TrkCircleTraj::nCirPrm ( )
inlinestatic

◆ nCirPrm() [2/3]

static int TrkCircleTraj::nCirPrm ( )
inlinestatic

◆ nCirPrm() [3/3]

static int TrkCircleTraj::nCirPrm ( )
inlinestatic

◆ nPar() [1/3]

int TrkCircleTraj::nPar ( ) const
inlinevirtual

Reimplemented from TrkSimpTraj.

Definition at line 69 of file InstallArea/include/TrkFitter/TrkFitter/TrkCircleTraj.h.

69{return NCIRPAR;}

◆ nPar() [2/3]

int TrkCircleTraj::nPar ( ) const
inlinevirtual

Reimplemented from TrkSimpTraj.

Definition at line 69 of file Reconstruction/MdcPatRec/TrkFitter/bak_TrkFitter-00-01-12/TrkFitter/TrkCircleTraj.h.

69{return NCIRPAR;}

◆ nPar() [3/3]

int TrkCircleTraj::nPar ( ) const
inlinevirtual

Reimplemented from TrkSimpTraj.

Definition at line 69 of file Reconstruction/MdcPatRec/TrkFitter/TrkFitter-00-01-13/TrkFitter/TrkCircleTraj.h.

69{return NCIRPAR;}

◆ omega() [1/3]

◆ omega() [2/3]

double TrkCircleTraj::omega ( ) const
inline

◆ omega() [3/3]

double TrkCircleTraj::omega ( ) const
inline

◆ omegaIndex() [1/3]

static int TrkCircleTraj::omegaIndex ( )
inlinestatic

Definition at line 84 of file InstallArea/include/TrkFitter/TrkFitter/TrkCircleTraj.h.

84{return omegaInd;}

Referenced by derivPFract(), getDFInfo(), getDFInfo2(), omega(), and TrkCircleTraj().

◆ omegaIndex() [2/3]

static int TrkCircleTraj::omegaIndex ( )
inlinestatic

◆ omegaIndex() [3/3]

static int TrkCircleTraj::omegaIndex ( )
inlinestatic

◆ operator=() [1/3]

TrkCircleTraj & TrkCircleTraj::operator= ( const TrkCircleTraj h)

Definition at line 71 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

72{
73 if( &h != this ){
75 _dtparams = *(h.parameters());
77 }
78 return *this;
79}
Trajectory & operator=(const Trajectory &)
Definition: Trajectory.cxx:86

◆ operator=() [2/3]

TrkCircleTraj & TrkCircleTraj::operator= ( const TrkCircleTraj )

◆ operator=() [3/3]

TrkCircleTraj & TrkCircleTraj::operator= ( const TrkCircleTraj )

◆ paramFunction() [1/3]

TranslateParams TrkCircleTraj::paramFunction ( ) const
inlinevirtual

Implements TrkSimpTraj.

Definition at line 64 of file InstallArea/include/TrkFitter/TrkFitter/TrkCircleTraj.h.

64{ return TrkCircleTraj::paramFunc; }

◆ paramFunction() [2/3]

TranslateParams TrkCircleTraj::paramFunction ( ) const
inlinevirtual

Implements TrkSimpTraj.

Definition at line 64 of file Reconstruction/MdcPatRec/TrkFitter/bak_TrkFitter-00-01-12/TrkFitter/TrkCircleTraj.h.

64{ return TrkCircleTraj::paramFunc; }

◆ paramFunction() [3/3]

TranslateParams TrkCircleTraj::paramFunction ( ) const
inlinevirtual

Implements TrkSimpTraj.

Definition at line 64 of file Reconstruction/MdcPatRec/TrkFitter/TrkFitter-00-01-13/TrkFitter/TrkCircleTraj.h.

64{ return TrkCircleTraj::paramFunc; }

◆ phi0() [1/3]

double TrkCircleTraj::phi0 ( ) const

Definition at line 430 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

431{
432 return BesAngle(parameters()->parameter()[phi0Index()]).rad();
433}

Referenced by getDFInfo(), getDFInfo2(), getInfo(), TrkCircleRep::helix(), and position().

◆ phi0() [2/3]

double TrkCircleTraj::phi0 ( ) const

◆ phi0() [3/3]

double TrkCircleTraj::phi0 ( ) const

◆ phi0Index() [1/3]

static int TrkCircleTraj::phi0Index ( )
inlinestatic

◆ phi0Index() [2/3]

static int TrkCircleTraj::phi0Index ( )
inlinestatic

◆ phi0Index() [3/3]

static int TrkCircleTraj::phi0Index ( )
inlinestatic

◆ position() [1/3]

HepPoint3D TrkCircleTraj::position ( double  fltLen) const
virtual

Implements Trajectory.

Definition at line 100 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

101{
102 double sphi0 = sin(phi0());
103 double cphi0 = cos(phi0());
104 double ang = angle(f);
105 double xt = ( sin(ang)-sphi0)/omega() - d0()*sphi0 + referencePoint().x();
106 double yt = -(cos(ang)-cphi0)/omega() + d0()*cphi0 + referencePoint().y();
107 return HepPoint3D(xt, yt, referencePoint().z());
108}

◆ position() [2/3]

virtual HepPoint3D TrkCircleTraj::position ( double  fltLen) const
virtual

Implements Trajectory.

◆ position() [3/3]

virtual HepPoint3D TrkCircleTraj::position ( double  fltLen) const
virtual

Implements Trajectory.

◆ visitAccept() [1/3]

void TrkCircleTraj::visitAccept ( TrkVisitor vis) const
virtual

Implements TrkSimpTraj.

Definition at line 522 of file bak_TrkFitter-00-01-12/src/TrkCircleTraj.cxx.

523{
524// Visitor access--just use the TrkVisitor class member function
525 vis->trkVisitCircleTraj(this);
526}
virtual void trkVisitCircleTraj(const TrkCircleTraj *)=0

◆ visitAccept() [2/3]

virtual void TrkCircleTraj::visitAccept ( TrkVisitor vis) const
virtual

Implements TrkSimpTraj.

◆ visitAccept() [3/3]

virtual void TrkCircleTraj::visitAccept ( TrkVisitor vis) const
virtual

Implements TrkSimpTraj.


The documentation for this class was generated from the following files: