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

Helix parameter class. More...

#include <Helix.h>

+ Inheritance diagram for Helix:

Public Member Functions

 Helix ()
 
 Helix (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
 Constructor with pivot, helix parameter a, and its error matrix.
 
 Helix (const HepPoint3D &pivot, const HepVector &a)
 Constructor without error matrix.
 
 Helix (const HepPoint3D &position, const Hep3Vector &momentum, double charge)
 Constructor with position, momentum, and charge.
 
 Helix (const Helix &i)
 
virtual ~Helix ()
 Destructor.
 
const HepPoint3Dcenter (void) const
 returns position of helix center(z = 0.);
 
const HepPoint3Dpivot (void) const
 returns pivot position.
 
double radius (void) const
 returns radious of helix.
 
HepPoint3D x (double dPhi=0.) const
 returns position after rotating angle dPhi in phi direction.
 
double * x (double dPhi, double p[3]) const
 
HepPoint3D x (double dPhi, HepSymMatrix &Ex) const
 returns position and convariance matrix(Ex) after rotation.
 
Hep3Vector direction (double dPhi=0.) const
 returns direction vector after rotating angle dPhi in phi direction.
 
Hep3Vector momentum (double dPhi=0.) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
Hep3Vector momentum (double dPhi, HepSymMatrix &Em) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass, HepSymMatrix &Em) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass, HepPoint3D &x, HepSymMatrix &Emx) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
double dr (void) const
 returns an element of parameters.
 
double phi0 (void) const
 
double kappa (void) const
 
double dz (void) const
 
double tanl (void) const
 
double curv (void) const
 
double sinPhi0 (void) const
 
double cosPhi0 (void) const
 
double alpha (void) const
 
const HepVector & a (void) const
 returns helix parameters.
 
const HepSymMatrix & Ea (void) const
 returns error matrix.
 
double pt (void) const
 
double cosTheta (void) const
 
const HepVector & a (const HepVector &newA)
 sets helix parameters.
 
const HepSymMatrix & Ea (const HepSymMatrix &newdA)
 sets helix paramters and error matrix.
 
const HepPoint3Dpivot (const HepPoint3D &newPivot)
 sets pivot position.
 
void set (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
 sets helix pivot position, parameters, and error matrix.
 
void ignoreErrorMatrix (void)
 unsets error matrix. Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix.
 
double bFieldZ (double)
 sets/returns z componet of the magnetic field.
 
double bFieldZ (void) const
 
Helixoperator= (const Helix &)
 Copy operator.
 
HepMatrix delApDelA (const HepVector &ap) const
 
HepMatrix delXDelA (double phi) const
 
HepMatrix delMDelA (double phi) const
 
HepMatrix del4MDelA (double phi, double mass) const
 
HepMatrix del4MXDelA (double phi, double mass) const
 
double IntersectCylinder (double r) const
 
double flightArc (HepPoint3D &hit) const
 
double flightArc (double r) const
 
double flightLength (HepPoint3D &hit) const
 
double dPhi (HepPoint3D &hit) const
 
 Helix (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
 Constructor with pivot, helix parameter a, and its error matrix.
 
 Helix (const HepPoint3D &pivot, const HepVector &a)
 Constructor without error matrix.
 
 Helix (const HepPoint3D &position, const Hep3Vector &momentum, double charge)
 Constructor with position, momentum, and charge.
 
virtual ~Helix ()
 Destructor.
 
const HepPoint3Dcenter (void) const
 returns position of helix center(z = 0.);
 
const HepPoint3Dpivot (void) const
 returns pivot position.
 
double radius (void) const
 returns radious of helix.
 
HepPoint3D x (double dPhi=0.) const
 returns position after rotating angle dPhi in phi direction.
 
double * x (double dPhi, double p[3]) const
 
HepPoint3D x (double dPhi, HepSymMatrix &Ex) const
 returns position and convariance matrix(Ex) after rotation.
 
Hep3Vector direction (double dPhi=0.) const
 returns direction vector after rotating angle dPhi in phi direction.
 
Hep3Vector momentum (double dPhi=0.) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
Hep3Vector momentum (double dPhi, HepSymMatrix &Em) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass, HepSymMatrix &Em) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass, HepPoint3D &x, HepSymMatrix &Emx) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
double dr (void) const
 returns an element of parameters.
 
double phi0 (void) const
 
double kappa (void) const
 
double dz (void) const
 
double tanl (void) const
 
double curv (void) const
 
double sinPhi0 (void) const
 
double cosPhi0 (void) const
 
double alpha (void) const
 
const HepVector & a (void) const
 returns helix parameters.
 
const HepSymMatrix & Ea (void) const
 returns error matrix.
 
double pt (void) const
 
double cosTheta (void) const
 
const HepVector & a (const HepVector &newA)
 sets helix parameters.
 
const HepSymMatrix & Ea (const HepSymMatrix &newdA)
 sets helix paramters and error matrix.
 
const HepPoint3Dpivot (const HepPoint3D &newPivot)
 sets pivot position.
 
void set (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
 sets helix pivot position, parameters, and error matrix.
 
void ignoreErrorMatrix (void)
 unsets error matrix. Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix.
 
double bFieldZ (double)
 sets/returns z componet of the magnetic field.
 
double bFieldZ (void) const
 
Helixoperator= (const Helix &)
 Copy operator.
 
HepMatrix delApDelA (const HepVector &ap) const
 
HepMatrix delXDelA (double phi) const
 
HepMatrix delMDelA (double phi) const
 
HepMatrix del4MDelA (double phi, double mass) const
 
HepMatrix del4MXDelA (double phi, double mass) const
 
double IntersectCylinder (double r) const
 
 Helix ()
 
 Helix (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
 Constructor with pivot, helix parameter a, and its error matrix.
 
 Helix (const HepPoint3D &pivot, const HepVector &a)
 Constructor without error matrix.
 
 Helix (const HepPoint3D &position, const Hep3Vector &momentum, double charge)
 Constructor with position, momentum, and charge.
 
 Helix (const Helix &i)
 
virtual ~Helix ()
 Destructor.
 
const HepPoint3Dcenter (void) const
 returns position of helix center(z = 0.);
 
const HepPoint3Dpivot (void) const
 returns pivot position.
 
double radius (void) const
 returns radious of helix.
 
HepPoint3D x (double dPhi=0.) const
 returns position after rotating angle dPhi in phi direction.
 
double * x (double dPhi, double p[3]) const
 
HepPoint3D x (double dPhi, HepSymMatrix &Ex) const
 returns position and convariance matrix(Ex) after rotation.
 
Hep3Vector direction (double dPhi=0.) const
 returns direction vector after rotating angle dPhi in phi direction.
 
Hep3Vector momentum (double dPhi=0.) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
Hep3Vector momentum (double dPhi, HepSymMatrix &Em) const
 returns momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass, HepSymMatrix &Em) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
HepLorentzVector momentum (double dPhi, double mass, HepPoint3D &x, HepSymMatrix &Emx) const
 returns 4momentum vector after rotating angle dPhi in phi direction.
 
double dr (void) const
 returns an element of parameters.
 
double phi0 (void) const
 
double kappa (void) const
 
double dz (void) const
 
double tanl (void) const
 
double curv (void) const
 
double sinPhi0 (void) const
 
double cosPhi0 (void) const
 
double alpha (void) const
 
const HepVector & a (void) const
 returns helix parameters.
 
const HepSymMatrix & Ea (void) const
 returns error matrix.
 
double pt (void) const
 
double cosTheta (void) const
 
const HepVector & a (const HepVector &newA)
 sets helix parameters.
 
const HepSymMatrix & Ea (const HepSymMatrix &newdA)
 sets helix paramters and error matrix.
 
const HepPoint3Dpivot (const HepPoint3D &newPivot)
 sets pivot position.
 
void set (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
 sets helix pivot position, parameters, and error matrix.
 
void ignoreErrorMatrix (void)
 unsets error matrix. Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix.
 
double bFieldZ (double)
 sets/returns z componet of the magnetic field.
 
double bFieldZ (void) const
 
Helixoperator= (const Helix &)
 Copy operator.
 
HepMatrix delApDelA (const HepVector &ap) const
 
HepMatrix delXDelA (double phi) const
 
HepMatrix delMDelA (double phi) const
 
HepMatrix del4MDelA (double phi, double mass) const
 
HepMatrix del4MXDelA (double phi, double mass) const
 
double IntersectCylinder (double r) const
 
double flightArc (HepPoint3D &hit) const
 
double flightArc (double r) const
 
double flightLength (HepPoint3D &hit) const
 
double dPhi (HepPoint3D &hit) const
 

Static Public Attributes

static const double ConstantAlpha = 333.564095
 Constant alpha for uniform field.
 

Protected Attributes

IMagneticFieldSvcm_pmgnIMF
 
double m_bField
 
double m_alpha
 

Detailed Description

Helix parameter class.

Definition at line 53 of file InstallArea/include/TrackUtil/TrackUtil/Helix.h.

Constructor & Destructor Documentation

◆ Helix() [1/13]

Helix::Helix ( )

Definition at line 47 of file Reconstruction/TrackUtil/TrackUtil-00-00-12/src/Helix.cxx.

48: m_matrixValid(true)
49{
50 StatusCode scmgn = Gaudi::svcLocator()->service("MagneticFieldSvc",m_pmgnIMF);
51 if(scmgn!=StatusCode::SUCCESS) {
52 std::cout<< "Unable to open Magnetic field service"<<std::endl;
53 }
54 m_bField = -10000*(m_pmgnIMF->getReferField());//zhangr 2012-09-06 for MagnField
55 //m_bField = 10000*(m_pmgnIMF->getReferField());
56 m_alpha = 10000. / 2.99792458 / m_bField;
57
58 HepPoint3D pivot(0,0,0);
59 HepVector a(5,0);
60 HepSymMatrix Ea(5,0);
61 m_pivot = pivot;
62 m_a = a;
63 m_Ea = Ea;
64 updateCache();
65}
const HepSymMatrix & Ea(void) const
returns error matrix.
const HepVector & a(void) const
returns helix parameters.
const HepPoint3D & pivot(void) const
returns pivot position.
virtual double getReferField()=0

◆ Helix() [2/13]

Helix::Helix ( const HepPoint3D pivot,
const HepVector &  a,
const HepSymMatrix &  Ea 
)

Constructor with pivot, helix parameter a, and its error matrix.

Definition at line 47 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

50 : //m_bField(-10.0),
51 //m_alpha(-333.564095),
52 m_pivot(pivot),
53 m_a(a),
54 m_matrixValid(true),
55 m_Ea(Ea) {
56 StatusCode scmgn = Gaudi::svcLocator()->service("MagneticFieldSvc",m_pmgnIMF);
57 if(scmgn!=StatusCode::SUCCESS) {
58 std::cout<< "Unable to open Magnetic field service"<<std::endl;
59 }
60 m_bField = -10000*(m_pmgnIMF->getReferField());//zhangr 2012-09-06 for MagnField
61 //m_bField = 10000*(m_pmgnIMF->getReferField());
62 m_alpha = 10000. / 2.99792458 / m_bField;
63 // m_alpha = 10000. / 2.99792458 / m_bField;
64 // m_alpha = 333.564095;
65 updateCache();
66}

◆ Helix() [3/13]

Helix::Helix ( const HepPoint3D pivot,
const HepVector &  a 
)

Constructor without error matrix.

Definition at line 68 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

70 : //m_bField(-10.0),
71 //m_alpha(-333.564095),
72 m_pivot(pivot),
73 m_a(a),
74 m_matrixValid(false),
75 m_Ea(HepSymMatrix(5,0)) {
76 StatusCode scmgn = Gaudi::svcLocator()->service("MagneticFieldSvc",m_pmgnIMF);
77 if(scmgn!=StatusCode::SUCCESS) {
78 // log << MSG::ERROR << "Unable to open Magnetic field service"<<endreq;
79 std::cout<< "Unable to open Magnetic field service"<<std::endl;
80 }
81 m_bField = -10000*(m_pmgnIMF->getReferField());//zhangr 2012-09-06 for MagnField
82 //m_bField = 10000*(m_pmgnIMF->getReferField());
83 m_alpha = 10000. / 2.99792458 / m_bField;
84 // m_alpha = 333.564095;
85 //cout<<"MdcFastTrakAlg:: bField,alpha: "<<m_bField<<" , "<<m_alpha<<endl;
86 updateCache();
87}

◆ Helix() [4/13]

Helix::Helix ( const HepPoint3D position,
const Hep3Vector &  momentum,
double  charge 
)

Constructor with position, momentum, and charge.

Definition at line 89 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

92 : //m_bField(-10.0),
93 //m_alpha(-333.564095),
94 m_pivot(position),
95 m_a(HepVector(5,0)),
96 m_matrixValid(false),
97 m_Ea(HepSymMatrix(5,0)) {
98 StatusCode scmgn = Gaudi::svcLocator()->service("MagneticFieldSvc",m_pmgnIMF);
99 if(scmgn!=StatusCode::SUCCESS) {
100 // log << MSG::ERROR << "Unable to open Magnetic field service"<<endreq;
101 std::cout<< "Unable to open Magnetic field service"<<std::endl;
102 }
103 m_bField = -10000*(m_pmgnIMF->getReferField());//zhangr 2012-09-06 for MagnField
104 //m_bField = 10000*(m_pmgnIMF->getReferField());
105 m_alpha = 10000. / 2.99792458 / m_bField;
106
107 m_a[0] = 0.;
108 m_a[1] = fmod(atan2(- momentum.x(), momentum.y())
109 + M_PI4, M_PI2);
110 m_a[3] = 0.;
111 double perp(momentum.perp());
112 if (perp != 0.0) {
113 m_a[2] = charge / perp;
114 m_a[4] = momentum.z() / perp;
115 }
116 else {
117 m_a[2] = charge * (DBL_MAX);
118 if (momentum.z() >= 0) {
119 m_a[4] = (DBL_MAX);
120 } else {
121 m_a[4] = -(DBL_MAX);
122 }
123 }
124 // m_alpha = 333.564095;
125 updateCache();
126}
**********INTEGER nmxhep !maximum number of particles DOUBLE PRECISION vhep INTEGER jdahep COMMON hepevt $ !serial number $ !number of particles $ !status code $ !particle ident KF $ !parent particles $ !childreen particles $ !four momentum

◆ Helix() [5/13]

Helix::Helix ( const Helix i)

Definition at line 427 of file Reconstruction/TrackUtil/TrackUtil-00-00-12/src/Helix.cxx.

428{
429 m_bField = i.m_bField;
430 m_alpha = i.m_alpha;
431 m_pivot = i.m_pivot;
432 m_a = i.m_a;
433 m_Ea = i.m_Ea;
434 m_matrixValid = i.m_matrixValid;
435
436 m_center = i.m_center;
437 m_cp = i.m_cp;
438 m_sp = i.m_sp;
439 m_pt = i.m_pt;
440 m_r = i.m_r;
441 m_ac[0] = i.m_ac[0];
442 m_ac[1] = i.m_ac[1];
443 m_ac[2] = i.m_ac[2];
444 m_ac[3] = i.m_ac[3];
445 m_ac[4] = i.m_ac[4];
446}

◆ ~Helix() [1/3]

Helix::~Helix ( )
virtual

Destructor.

Definition at line 128 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

128 {
129}

◆ Helix() [6/13]

Helix::Helix ( const HepPoint3D pivot,
const HepVector &  a,
const HepSymMatrix &  Ea 
)

Constructor with pivot, helix parameter a, and its error matrix.

◆ Helix() [7/13]

Helix::Helix ( const HepPoint3D pivot,
const HepVector &  a 
)

Constructor without error matrix.

◆ Helix() [8/13]

Helix::Helix ( const HepPoint3D position,
const Hep3Vector &  momentum,
double  charge 
)

Constructor with position, momentum, and charge.

◆ ~Helix() [2/3]

virtual Helix::~Helix ( )
virtual

Destructor.

◆ Helix() [9/13]

Helix::Helix ( )

◆ Helix() [10/13]

Helix::Helix ( const HepPoint3D pivot,
const HepVector &  a,
const HepSymMatrix &  Ea 
)

Constructor with pivot, helix parameter a, and its error matrix.

◆ Helix() [11/13]

Helix::Helix ( const HepPoint3D pivot,
const HepVector &  a 
)

Constructor without error matrix.

◆ Helix() [12/13]

Helix::Helix ( const HepPoint3D position,
const Hep3Vector &  momentum,
double  charge 
)

Constructor with position, momentum, and charge.

◆ Helix() [13/13]

Helix::Helix ( const Helix i)

◆ ~Helix() [3/3]

virtual Helix::~Helix ( )
virtual

Destructor.

Member Function Documentation

◆ a() [1/6]

const HepVector & Helix::a ( const HepVector &  newA)
inline

sets helix parameters.

Definition at line 284 of file InstallArea/include/TrackUtil/TrackUtil/Helix.h.

284 {
285 m_a = i;
286 updateCache();
287 return m_a;
288}

◆ a() [2/6]

const HepVector & Helix::a ( const HepVector &  newA)

sets helix parameters.

◆ a() [3/6]

const HepVector & Helix::a ( const HepVector &  newA)

sets helix parameters.

◆ a() [4/6]

◆ a() [5/6]

const HepVector & Helix::a ( void  ) const

returns helix parameters.

◆ a() [6/6]

const HepVector & Helix::a ( void  ) const

returns helix parameters.

◆ alpha() [1/3]

double Helix::alpha ( void  ) const
inline

◆ alpha() [2/3]

double Helix::alpha ( void  ) const

◆ alpha() [3/3]

double Helix::alpha ( void  ) const

◆ bFieldZ() [1/6]

double Helix::bFieldZ ( double  a)
inline

sets/returns z componet of the magnetic field.

Definition at line 298 of file InstallArea/include/TrackUtil/TrackUtil/Helix.h.

298 {
299 m_bField = a;
300 m_alpha = 10000. / 2.99792458 / m_bField;
301 updateCache();
302 return m_bField;
303}

◆ bFieldZ() [2/6]

double Helix::bFieldZ ( double  )

sets/returns z componet of the magnetic field.

◆ bFieldZ() [3/6]

double Helix::bFieldZ ( double  )

sets/returns z componet of the magnetic field.

◆ bFieldZ() [4/6]

double Helix::bFieldZ ( void  ) const
inline

Definition at line 315 of file InstallArea/include/TrackUtil/TrackUtil/Helix.h.

315 {
316 return m_bField;
317}

Referenced by HoughTrack::HoughTrack().

◆ bFieldZ() [5/6]

double Helix::bFieldZ ( void  ) const

◆ bFieldZ() [6/6]

double Helix::bFieldZ ( void  ) const

◆ center() [1/3]

◆ center() [2/3]

const HepPoint3D & Helix::center ( void  ) const

returns position of helix center(z = 0.);

◆ center() [3/3]

const HepPoint3D & Helix::center ( void  ) const

returns position of helix center(z = 0.);

◆ cosPhi0() [1/3]

double Helix::cosPhi0 ( void  ) const
inline

Definition at line 327 of file InstallArea/include/TrackUtil/TrackUtil/Helix.h.

327 {
328 return m_cp;
329}

◆ cosPhi0() [2/3]

double Helix::cosPhi0 ( void  ) const

◆ cosPhi0() [3/3]

double Helix::cosPhi0 ( void  ) const

◆ cosTheta() [1/3]

double Helix::cosTheta ( void  ) const
inline

Definition at line 130 of file InstallArea/include/TrackUtil/TrackUtil/Helix.h.

130{ return m_a[4]/sqrt(1.+ m_a[4]*m_a[4]); }

◆ cosTheta() [2/3]

double Helix::cosTheta ( void  ) const
inline

Definition at line 127 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/TrackUtil/Helix.h.

127{ return m_a[4]/sqrt(1.+ m_a[4]*m_a[4]); }

◆ cosTheta() [3/3]

double Helix::cosTheta ( void  ) const
inline

Definition at line 130 of file Reconstruction/TrackUtil/TrackUtil-00-00-12/TrackUtil/Helix.h.

130{ return m_a[4]/sqrt(1.+ m_a[4]*m_a[4]); }

◆ curv() [1/3]

double Helix::curv ( void  ) const
inline

◆ curv() [2/3]

double Helix::curv ( void  ) const

◆ curv() [3/3]

double Helix::curv ( void  ) const

◆ del4MDelA() [1/3]

HepMatrix Helix::del4MDelA ( double  phi,
double  mass 
) const

Definition at line 600 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

600 {
601 //
602 // Calculate Jacobian (@4m/@a)
603 // Vector a is helix parameters and phi is internal parameter.
604 // Vector 4m is 4 momentum.
605 //
606
607 HepMatrix d4MDA(4,5,0);
608
609 double phi0 = m_ac[1];
610 double cpa = m_ac[2];
611 double tnl = m_ac[4];
612
613 double cosf0phi = cos(phi0+phi);
614 double sinf0phi = sin(phi0+phi);
615
616 double rho;
617 if(cpa != 0.)rho = 1./cpa;
618 else rho = (DBL_MAX);
619
620 double charge = 1.;
621 if(cpa < 0.)charge = -1.;
622
623 double E = sqrt(rho*rho*(1.+tnl*tnl)+mass*mass);
624
625 d4MDA[0][1] = -fabs(rho)*cosf0phi;
626 d4MDA[0][2] = charge*rho*rho*sinf0phi;
627
628 d4MDA[1][1] = -fabs(rho)*sinf0phi;
629 d4MDA[1][2] = -charge*rho*rho*cosf0phi;
630
631 d4MDA[2][2] = -charge*rho*rho*tnl;
632 d4MDA[2][4] = fabs(rho);
633
634 if (cpa != 0.0 && E != 0.0) {
635 d4MDA[3][2] = (-1.-tnl*tnl)/(cpa*cpa*cpa*E);
636 d4MDA[3][4] = tnl/(cpa*cpa*E);
637 } else {
638 d4MDA[3][2] = (DBL_MAX);
639 d4MDA[3][4] = (DBL_MAX);
640 }
641 return d4MDA;
642}
double mass
double sin(const BesAngle a)
double cos(const BesAngle a)

Referenced by momentum().

◆ del4MDelA() [2/3]

HepMatrix Helix::del4MDelA ( double  phi,
double  mass 
) const

◆ del4MDelA() [3/3]

HepMatrix Helix::del4MDelA ( double  phi,
double  mass 
) const

◆ del4MXDelA() [1/3]

HepMatrix Helix::del4MXDelA ( double  phi,
double  mass 
) const

Definition at line 646 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

646 {
647 //
648 // Calculate Jacobian (@4mx/@a)
649 // Vector a is helix parameters and phi is internal parameter.
650 // Vector 4xm is 4 momentum and position.
651 //
652
653 HepMatrix d4MXDA(7,5,0);
654
655 const double & dr = m_ac[0];
656 const double & phi0 = m_ac[1];
657 const double & cpa = m_ac[2];
658 const double & dz = m_ac[3];
659 const double & tnl = m_ac[4];
660
661 double cosf0phi = cos(phi0+phi);
662 double sinf0phi = sin(phi0+phi);
663
664 double rho;
665 if(cpa != 0.)rho = 1./cpa;
666 else rho = (DBL_MAX);
667
668 double charge = 1.;
669 if(cpa < 0.)charge = -1.;
670
671 double E = sqrt(rho * rho * (1. + tnl * tnl) + mass * mass);
672
673 d4MXDA[0][1] = - fabs(rho) * cosf0phi;
674 d4MXDA[0][2] = charge * rho * rho * sinf0phi;
675
676 d4MXDA[1][1] = - fabs(rho) * sinf0phi;
677 d4MXDA[1][2] = - charge * rho * rho * cosf0phi;
678
679 d4MXDA[2][2] = - charge * rho * rho * tnl;
680 d4MXDA[2][4] = fabs(rho);
681
682 if (cpa != 0.0 && E != 0.0) {
683 d4MXDA[3][2] = (- 1. - tnl * tnl) / (cpa * cpa * cpa * E);
684 d4MXDA[3][4] = tnl / (cpa * cpa * E);
685 } else {
686 d4MXDA[3][2] = (DBL_MAX);
687 d4MXDA[3][4] = (DBL_MAX);
688 }
689
690 d4MXDA[4][0] = m_cp;
691 d4MXDA[4][1] = - dr * m_sp + m_r * (- m_sp + sinf0phi);
692 if (cpa != 0.0) {
693 d4MXDA[4][2] = - (m_r / cpa) * (m_cp - cosf0phi);
694 } else {
695 d4MXDA[4][2] = (DBL_MAX);
696 }
697
698 d4MXDA[5][0] = m_sp;
699 d4MXDA[5][1] = dr * m_cp + m_r * (m_cp - cosf0phi);
700 if (cpa != 0.0) {
701 d4MXDA[5][2] = - (m_r / cpa) * (m_sp - sinf0phi);
702
703 d4MXDA[6][2] = (m_r / cpa) * tnl * phi;
704 } else {
705 d4MXDA[5][2] = (DBL_MAX);
706
707 d4MXDA[6][2] = (DBL_MAX);
708 }
709
710 d4MXDA[6][3] = 1.;
711 d4MXDA[6][4] = - m_r * phi;
712
713 return d4MXDA;
714}
double dr(void) const
returns an element of parameters.

Referenced by momentum().

◆ del4MXDelA() [2/3]

HepMatrix Helix::del4MXDelA ( double  phi,
double  mass 
) const

◆ del4MXDelA() [3/3]

HepMatrix Helix::del4MXDelA ( double  phi,
double  mass 
) const

◆ delApDelA() [1/3]

HepMatrix Helix::delApDelA ( const HepVector &  ap) const

Definition at line 441 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

441 {
442 //
443 // Calculate Jacobian (@ap/@a)
444 // Vector ap is new helix parameters and a is old helix parameters.
445 //
446
447 HepMatrix dApDA(5,5,0);
448
449 const double & dr = m_ac[0];
450 const double & phi0 = m_ac[1];
451 const double & cpa = m_ac[2];
452 const double & dz = m_ac[3];
453 const double & tnl = m_ac[4];
454
455 double drp = ap[0];
456 double phi0p = ap[1];
457 double cpap = ap[2];
458 double dzp = ap[3];
459 double tnlp = ap[4];
460
461 double rdr = m_r + dr;
462 double rdrpr;
463 if ((m_r + drp) != 0.0) {
464 rdrpr = 1. / (m_r + drp);
465 } else {
466 rdrpr = (DBL_MAX);
467 }
468 // double csfd = cos(phi0)*cos(phi0p) + sin(phi0)*sin(phi0p);
469 // double snfd = cos(phi0)*sin(phi0p) - sin(phi0)*cos(phi0p);
470 double csfd = cos(phi0p - phi0);
471 double snfd = sin(phi0p - phi0);
472 double phid = fmod(phi0p - phi0 + M_PI8, M_PI2);
473 if (phid > M_PI) phid = phid - M_PI2;
474
475 dApDA[0][0] = csfd;
476 dApDA[0][1] = rdr*snfd;
477 if(cpa!=0.0) {
478 dApDA[0][2] = (m_r/cpa)*( 1.0 - csfd );
479 } else {
480 dApDA[0][2] = (DBL_MAX);
481 }
482
483 dApDA[1][0] = - rdrpr*snfd;
484 dApDA[1][1] = rdr*rdrpr*csfd;
485 if(cpa!=0.0) {
486 dApDA[1][2] = (m_r/cpa)*rdrpr*snfd;
487 } else {
488 dApDA[1][2] = (DBL_MAX);
489 }
490
491 dApDA[2][2] = 1.0;
492
493 dApDA[3][0] = m_r*rdrpr*tnl*snfd;
494 dApDA[3][1] = m_r*tnl*(1.0 - rdr*rdrpr*csfd);
495 if(cpa!=0.0) {
496 dApDA[3][2] = (m_r/cpa)*tnl*(phid - m_r*rdrpr*snfd);
497 } else {
498 dApDA[3][2] = (DBL_MAX);
499 }
500 dApDA[3][3] = 1.0;
501 dApDA[3][4] = - m_r*phid;
502
503 dApDA[4][4] = 1.0;
504
505 return dApDA;
506}
#define M_PI
Definition: TConstant.h:4

Referenced by pivot().

◆ delApDelA() [2/3]

HepMatrix Helix::delApDelA ( const HepVector &  ap) const

◆ delApDelA() [3/3]

HepMatrix Helix::delApDelA ( const HepVector &  ap) const

◆ delMDelA() [1/3]

HepMatrix Helix::delMDelA ( double  phi) const

Definition at line 563 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

563 {
564 //
565 // Calculate Jacobian (@m/@a)
566 // Vector a is helix parameters and phi is internal parameter.
567 // Vector m is momentum.
568 //
569
570 HepMatrix dMDA(3,5,0);
571
572 const double & phi0 = m_ac[1];
573 const double & cpa = m_ac[2];
574 const double & tnl = m_ac[4];
575
576 double cosf0phi = cos(phi0+phi);
577 double sinf0phi = sin(phi0+phi);
578
579 double rho;
580 if(cpa != 0.)rho = 1./cpa;
581 else rho = (DBL_MAX);
582
583 double charge = 1.;
584 if(cpa < 0.)charge = -1.;
585
586 dMDA[0][1] = -fabs(rho)*cosf0phi;
587 dMDA[0][2] = charge*rho*rho*sinf0phi;
588
589 dMDA[1][1] = -fabs(rho)*sinf0phi;
590 dMDA[1][2] = -charge*rho*rho*cosf0phi;
591
592 dMDA[2][2] = -charge*rho*rho*tnl;
593 dMDA[2][4] = fabs(rho);
594
595 return dMDA;
596}

Referenced by momentum().

◆ delMDelA() [2/3]

HepMatrix Helix::delMDelA ( double  phi) const

◆ delMDelA() [3/3]

HepMatrix Helix::delMDelA ( double  phi) const

◆ delXDelA() [1/3]

HepMatrix Helix::delXDelA ( double  phi) const

Definition at line 509 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

509 {
510 //
511 // Calculate Jacobian (@x/@a)
512 // Vector a is helix parameters and phi is internal parameter
513 // which specifys the point to be calculated for Ex(phi).
514 //
515
516 HepMatrix dXDA(3,5,0);
517
518 const double & dr = m_ac[0];
519 const double & phi0 = m_ac[1];
520 const double & cpa = m_ac[2];
521 const double & dz = m_ac[3];
522 const double & tnl = m_ac[4];
523
524 double cosf0phi = cos(phi0 + phi);
525 double sinf0phi = sin(phi0 + phi);
526
527 dXDA[0][0] = m_cp;
528 dXDA[0][1] = - dr * m_sp + m_r * (- m_sp + sinf0phi);
529 if(cpa!=0.0) {
530 dXDA[0][2] = - (m_r / cpa) * (m_cp - cosf0phi);
531 } else {
532 dXDA[0][2] = (DBL_MAX);
533 }
534 // dXDA[0][3] = 0.0;
535 // dXDA[0][4] = 0.0;
536
537 dXDA[1][0] = m_sp;
538 dXDA[1][1] = dr * m_cp + m_r * (m_cp - cosf0phi);
539 if(cpa!=0.0) {
540 dXDA[1][2] = - (m_r / cpa) * (m_sp - sinf0phi);
541 } else {
542 dXDA[1][2] = (DBL_MAX);
543 }
544 // dXDA[1][3] = 0.0;
545 // dXDA[1][4] = 0.0;
546
547 // dXDA[2][0] = 0.0;
548 // dXDA[2][1] = 0.0;
549 if(cpa!=0.0) {
550 dXDA[2][2] = (m_r / cpa) * tnl * phi;
551 } else {
552 dXDA[2][2] = (DBL_MAX);
553 }
554 dXDA[2][3] = 1.0;
555 dXDA[2][4] = - m_r * phi;
556
557 return dXDA;
558}

Referenced by CgemHitOnTrack::getFitStuff(), and x().

◆ delXDelA() [2/3]

HepMatrix Helix::delXDelA ( double  phi) const

◆ delXDelA() [3/3]

HepMatrix Helix::delXDelA ( double  phi) const

◆ direction() [1/3]

Hep3Vector Helix::direction ( double  dPhi = 0.) const
inline

returns direction vector after rotating angle dPhi in phi direction.

Definition at line 230 of file InstallArea/include/TrackUtil/TrackUtil/Helix.h.

230 {
231 return momentum(phi).unit();
232}

Referenced by Emc_helix::Emc_Get(), CgemHitOnTrack::getFitStuff(), and TofFz_helix::TofFz_Get().

◆ direction() [2/3]

Hep3Vector Helix::direction ( double  dPhi = 0.) const

returns direction vector after rotating angle dPhi in phi direction.

◆ direction() [3/3]

Hep3Vector Helix::direction ( double  dPhi = 0.) const

returns direction vector after rotating angle dPhi in phi direction.

◆ dPhi() [1/2]

double Helix::dPhi ( HepPoint3D hit) const

Definition at line 835 of file Reconstruction/TrackUtil/TrackUtil-00-00-12/src/Helix.cxx.

836{
837 double isClockWise = m_r/fabs(m_r);
838 double x_cw = center().x()-hit.x();
839 double y_cw = center().y()-hit.y();
840 x_cw = isClockWise*x_cw;
841 y_cw = isClockWise*y_cw;
842 double phi_cw = atan2(y_cw,x_cw);
843 double dphi = phi_cw-phi0();
844 if(isClockWise>0)
845 {
846 while(dphi>0) dphi-=2*M_PI;
847 while(dphi<-2*M_PI) dphi+=2*M_PI;
848 }
849 else {
850 while(dphi<0) dphi+=2*M_PI;
851 while(dphi>2*M_PI) dphi-=2*M_PI;
852 }
853 return dphi;
854}
const HepPoint3D & center(void) const
returns position of helix center(z = 0.);

Referenced by IntersectCylinder().

◆ dPhi() [2/2]

double Helix::dPhi ( HepPoint3D hit) const

◆ dr() [1/3]

double Helix::dr ( void  ) const
inline

◆ dr() [2/3]

double Helix::dr ( void  ) const

returns an element of parameters.

◆ dr() [3/3]

double Helix::dr ( void  ) const

returns an element of parameters.

◆ dz() [1/3]

◆ dz() [2/3]

double Helix::dz ( void  ) const

◆ dz() [3/3]

double Helix::dz ( void  ) const

◆ Ea() [1/6]

const HepSymMatrix & Helix::Ea ( const HepSymMatrix &  newdA)
inline

sets helix paramters and error matrix.

Definition at line 292 of file InstallArea/include/TrackUtil/TrackUtil/Helix.h.

292 {
293 return m_Ea = i;
294}

◆ Ea() [2/6]

const HepSymMatrix & Helix::Ea ( const HepSymMatrix &  newdA)

sets helix paramters and error matrix.

◆ Ea() [3/6]

const HepSymMatrix & Helix::Ea ( const HepSymMatrix &  newdA)

sets helix paramters and error matrix.

◆ Ea() [4/6]

const HepSymMatrix & Helix::Ea ( void  ) const
inline

returns error matrix.

Definition at line 278 of file InstallArea/include/TrackUtil/TrackUtil/Helix.h.

278 {
279 return m_Ea;
280}

Referenced by TTrack::fit2D(), Helix(), HelixHasNan(), HoughTrack::HoughTrack(), TRunge::pivot(), PositiveDefinite(), and HoughTrack::update().

◆ Ea() [5/6]

const HepSymMatrix & Helix::Ea ( void  ) const

returns error matrix.

◆ Ea() [6/6]

const HepSymMatrix & Helix::Ea ( void  ) const

returns error matrix.

◆ flightArc() [1/4]

double Helix::flightArc ( double  r) const

Definition at line 804 of file Reconstruction/TrackUtil/TrackUtil-00-00-12/src/Helix.cxx.

805{
806 double phi_turn = IntersectCylinder(r);
807 double arcLength = m_r*phi_turn;
808 arcLength = fabs(arcLength);
809 return arcLength;
810}

◆ flightArc() [2/4]

double Helix::flightArc ( double  r) const

◆ flightArc() [3/4]

double Helix::flightArc ( HepPoint3D hit) const

Definition at line 780 of file Reconstruction/TrackUtil/TrackUtil-00-00-12/src/Helix.cxx.

781{
782 /*
783 double rc = center().perp();
784 //double l = center().perp(hit);
785 double l = sqrt( (center().x()-hit.x()) * (center().x()-hit.x()) + (center().y()-hit.y()) * (center().y()-hit.y()) );
786 double rHit = hit.perp();
787 double cosPhi = (rc*rc + l * l - rHit * rHit) / (2 * rc * l);
788 //double cosPhi = (m_rad * m_rad + l * l - r * r) / (2 * m_rad * l);
789 if(cosPhi < -1 || cosPhi > 1) return 0;
790 double dPhi = acos(cosPhi);// [0, pi)
791 //double phiTrkFlt = IntersectCylinder(rHit);
792 //double arcLength = rc*dPhi;
793 double xHit = hit.getHitPoint().x();
794 double yHit = hit.getHitPoint().y();
795 double xCenter = center().x();
796 double yCenter = center().y();
797 double leftOrRight = xHit*yCenter - xCenter*yHit;
798 */
799 double dphi = dPhi(hit);
800 double arcLength = fabs(m_r*dphi);
801 return arcLength;
802}

Referenced by HoughTrack::calculateZ_S(), HoughTrack::fitHelix(), flightLength(), HoughHit::residual(), and HoughHit::updateVHit().

◆ flightArc() [4/4]

double Helix::flightArc ( HepPoint3D hit) const

◆ flightLength() [1/2]

double Helix::flightLength ( HepPoint3D hit) const

Definition at line 812 of file Reconstruction/TrackUtil/TrackUtil-00-00-12/src/Helix.cxx.

813{
814 /*
815 double rc = center().perp();
816 //double l = center().perp(hit);
817 double l = sqrt( (center().x()-hit.x()) * (center().x()-hit.x()) + (center().y()-hit.y()) * (center().y()-hit.y()) );
818 double rHit = hit.perp();
819 double cosPhi = (rc*rc + l * l - rHit * rHit) / (2 * rc * l);
820 //double cosPhi = (m_rad * m_rad + l * l - r * r) / (2 * m_rad * l);
821 if(cosPhi < -1 || cosPhi > 1) return 0;
822 double dPhi = acos(cosPhi);
823 //double dPhi = center().phi() - acos(cosPhi) - phi0();
824 //double phiTrkFlt = IntersectCylinder(rHit);
825 double arcLength = rc*dPhi;
826 */
827
828 double arcLength = flightArc(hit);
829
830 double cosLambda = 1/sqrt(1+m_ac[4]*m_ac[4]);
831 double flightLength = arcLength/cosLambda;
832 return flightLength;
833}
double flightLength(HepPoint3D &hit) const

Referenced by HoughTrack::fitCircle(), flightLength(), and HoughHit::residual().

◆ flightLength() [2/2]

double Helix::flightLength ( HepPoint3D hit) const

◆ ignoreErrorMatrix() [1/3]

void Helix::ignoreErrorMatrix ( void  )

unsets error matrix. Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix.

Definition at line 717 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

717 {
718 m_matrixValid = false;
719 m_Ea *= 0.;
720}

Referenced by EsTimeAlg::execute().

◆ ignoreErrorMatrix() [2/3]

void Helix::ignoreErrorMatrix ( void  )

unsets error matrix. Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix.

◆ ignoreErrorMatrix() [3/3]

void Helix::ignoreErrorMatrix ( void  )

unsets error matrix. Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix.

◆ IntersectCylinder() [1/3]

double Helix::IntersectCylinder ( double  r) const

Definition at line 722 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

723{
724 double m_rad = radius();
725 double l = center().perp();
726
727 double cosPhi = (m_rad * m_rad + l * l - r * r) / (2 * m_rad * l);
728
729 if(cosPhi < -1 || cosPhi > 1) return 0;
730
731 double dPhi = center().phi() - acos(cosPhi) - phi0();
732
733 if(dPhi < -M_PI) dPhi += 2 * M_PI;
734
735 return dPhi;
736}
double radius(void) const
returns radious of helix.

Referenced by HoughTrack::driftDistRes(), flightArc(), CgemHitOnTrack::getFitStuff(), and HoughHit::residual().

◆ IntersectCylinder() [2/3]

double Helix::IntersectCylinder ( double  r) const

◆ IntersectCylinder() [3/3]

double Helix::IntersectCylinder ( double  r) const

◆ kappa() [1/3]

◆ kappa() [2/3]

double Helix::kappa ( void  ) const

◆ kappa() [3/3]

double Helix::kappa ( void  ) const

◆ momentum() [1/15]

HepLorentzVector Helix::momentum ( double  dPhi,
double  mass 
) const

returns 4momentum vector after rotating angle dPhi in phi direction.

Definition at line 230 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

230 {
231 //
232 // Calculate momentum.
233 //
234 // Pt = | 1/kappa | (GeV/c)
235 //
236 // Px = -Pt * sin(phi0 + phi)
237 // Py = Pt * cos(phi0 + phi)
238 // Pz = Pt * tan(lambda)
239 //
240 // E = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass )
241
242 double pt = fabs(m_pt);
243 double px = - pt * sin(m_ac[1] + phi);
244 double py = pt * cos(m_ac[1] + phi);
245 double pz = pt * m_ac[4];
246 double E = sqrt(pt*pt*(1.+m_ac[4]*m_ac[4])+mass*mass);
247
248 return HepLorentzVector(px, py, pz, E);
249}

◆ momentum() [2/15]

HepLorentzVector Helix::momentum ( double  dPhi,
double  mass 
) const

returns 4momentum vector after rotating angle dPhi in phi direction.

◆ momentum() [3/15]

HepLorentzVector Helix::momentum ( double  dPhi,
double  mass 
) const

returns 4momentum vector after rotating angle dPhi in phi direction.

◆ momentum() [4/15]

HepLorentzVector Helix::momentum ( double  dPhi,
double  mass,
HepPoint3D x,
HepSymMatrix &  Emx 
) const

returns 4momentum vector after rotating angle dPhi in phi direction.

Definition at line 278 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

281 {
282 //
283 // Calculate momentum.
284 //
285 // Pt = | 1/kappa | (GeV/c)
286 //
287 // Px = -Pt * sin(phi0 + phi)
288 // Py = Pt * cos(phi0 + phi)
289 // Pz = Pt * tan(lambda)
290 //
291 // E = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass )
292
293 double pt = fabs(m_pt);
294 double px = - pt * sin(m_ac[1] + phi);
295 double py = pt * cos(m_ac[1] + phi);
296 double pz = pt * m_ac[4];
297 double E = sqrt(pt * pt * (1. + m_ac[4] * m_ac[4]) + mass * mass);
298
299 x.setX(m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] + phi)));
300 x.setY(m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] + phi)));
301 x.setZ(m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi);
302
303 if (m_matrixValid) Emx = m_Ea.similarity(del4MXDelA(phi,mass));
304 else Emx = m_Ea;
305
306 return HepLorentzVector(px, py, pz, E);
307}
Double_t x[10]
HepMatrix del4MXDelA(double phi, double mass) const

◆ momentum() [5/15]

HepLorentzVector Helix::momentum ( double  dPhi,
double  mass,
HepPoint3D x,
HepSymMatrix &  Emx 
) const

returns 4momentum vector after rotating angle dPhi in phi direction.

◆ momentum() [6/15]

HepLorentzVector Helix::momentum ( double  dPhi,
double  mass,
HepPoint3D x,
HepSymMatrix &  Emx 
) const

returns 4momentum vector after rotating angle dPhi in phi direction.

◆ momentum() [7/15]

HepLorentzVector Helix::momentum ( double  dPhi,
double  mass,
HepSymMatrix &  Em 
) const

returns 4momentum vector after rotating angle dPhi in phi direction.

Definition at line 253 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

253 {
254 //
255 // Calculate momentum.
256 //
257 // Pt = | 1/kappa | (GeV/c)
258 //
259 // Px = -Pt * sin(phi0 + phi)
260 // Py = Pt * cos(phi0 + phi)
261 // Pz = Pt * tan(lambda)
262 //
263 // E = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass )
264
265 double pt = fabs(m_pt);
266 double px = - pt * sin(m_ac[1] + phi);
267 double py = pt * cos(m_ac[1] + phi);
268 double pz = pt * m_ac[4];
269 double E = sqrt(pt*pt*(1.+m_ac[4]*m_ac[4])+mass*mass);
270
271 if (m_matrixValid) Em = m_Ea.similarity(del4MDelA(phi,mass));
272 else Em = m_Ea;
273
274 return HepLorentzVector(px, py, pz, E);
275}
HepMatrix del4MDelA(double phi, double mass) const

◆ momentum() [8/15]

HepLorentzVector Helix::momentum ( double  dPhi,
double  mass,
HepSymMatrix &  Em 
) const

returns 4momentum vector after rotating angle dPhi in phi direction.

◆ momentum() [9/15]

HepLorentzVector Helix::momentum ( double  dPhi,
double  mass,
HepSymMatrix &  Em 
) const

returns 4momentum vector after rotating angle dPhi in phi direction.

◆ momentum() [10/15]

Hep3Vector Helix::momentum ( double  dPhi,
HepSymMatrix &  Em 
) const

returns momentum vector after rotating angle dPhi in phi direction.

Definition at line 207 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

207 {
208 //
209 // Calculate momentum.
210 //
211 // Pt = | 1/kappa | (GeV/c)
212 //
213 // Px = -Pt * sin(phi0 + phi)
214 // Py = Pt * cos(phi0 + phi)
215 // Pz = Pt * tan(lambda)
216 //
217
218 double pt = fabs(m_pt);
219 double px = - pt * sin(m_ac[1] + phi);
220 double py = pt * cos(m_ac[1] + phi);
221 double pz = pt * m_ac[4];
222
223 if (m_matrixValid) Em = m_Ea.similarity(delMDelA(phi));
224 else Em = m_Ea;
225
226 return Hep3Vector(px, py, pz);
227}

◆ momentum() [11/15]

Hep3Vector Helix::momentum ( double  dPhi,
HepSymMatrix &  Em 
) const

returns momentum vector after rotating angle dPhi in phi direction.

◆ momentum() [12/15]

Hep3Vector Helix::momentum ( double  dPhi,
HepSymMatrix &  Em 
) const

returns momentum vector after rotating angle dPhi in phi direction.

◆ momentum() [13/15]

Hep3Vector Helix::momentum ( double  dPhi = 0.) const

returns momentum vector after rotating angle dPhi in phi direction.

Definition at line 187 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

187 {
188 //
189 // Calculate momentum.
190 //
191 // Pt = | 1/kappa | (GeV/c)
192 //
193 // Px = -Pt * sin(phi0 + phi)
194 // Py = Pt * cos(phi0 + phi)
195 // Pz = Pt * tan(lambda)
196 //
197
198 double pt = fabs(m_pt);
199 double px = - pt * sin(m_ac[1] + phi);
200 double py = pt * cos(m_ac[1] + phi);
201 double pz = pt * m_ac[4];
202
203 return Hep3Vector(px, py, pz);
204}

Referenced by EsTimeAlg::execute(), and TTrack::p().

◆ momentum() [14/15]

Hep3Vector Helix::momentum ( double  dPhi = 0.) const

returns momentum vector after rotating angle dPhi in phi direction.

◆ momentum() [15/15]

Hep3Vector Helix::momentum ( double  dPhi = 0.) const

returns momentum vector after rotating angle dPhi in phi direction.

◆ operator=() [1/3]

Helix & Helix::operator= ( const Helix i)

Copy operator.

Definition at line 383 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

383 {
384 if (this == & i) return * this;
385
386 m_bField = i.m_bField;
387 m_alpha = i.m_alpha;
388 m_pivot = i.m_pivot;
389 m_a = i.m_a;
390 m_Ea = i.m_Ea;
391 m_matrixValid = i.m_matrixValid;
392
393 m_center = i.m_center;
394 m_cp = i.m_cp;
395 m_sp = i.m_sp;
396 m_pt = i.m_pt;
397 m_r = i.m_r;
398 m_ac[0] = i.m_ac[0];
399 m_ac[1] = i.m_ac[1];
400 m_ac[2] = i.m_ac[2];
401 m_ac[3] = i.m_ac[3];
402 m_ac[4] = i.m_ac[4];
403
404 return * this;
405}

Referenced by HoughTrack::operator=().

◆ operator=() [2/3]

Helix & Helix::operator= ( const Helix )

Copy operator.

◆ operator=() [3/3]

Helix & Helix::operator= ( const Helix )

Copy operator.

◆ phi0() [1/3]

◆ phi0() [2/3]

double Helix::phi0 ( void  ) const

◆ phi0() [3/3]

double Helix::phi0 ( void  ) const

◆ pivot() [1/6]

const HepPoint3D & Helix::pivot ( const HepPoint3D newPivot)

sets pivot position.

Definition at line 311 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

311 {
312 const double & dr = m_ac[0];
313 const double & phi0 = m_ac[1];
314 const double & kappa = m_ac[2];
315 const double & dz = m_ac[3];
316 const double & tanl = m_ac[4];
317
318 double rdr = dr + m_r;
319 double phi = fmod(phi0 + M_PI4, M_PI2);
320 double csf0 = cos(phi);
321 double snf0 = (1. - csf0) * (1. + csf0);
322 snf0 = sqrt((snf0 > 0.) ? snf0 : 0.);
323 if(phi > M_PI) snf0 = - snf0;
324
325 double xc = m_pivot.x() + rdr * csf0;
326 double yc = m_pivot.y() + rdr * snf0;
327 double csf, snf;
328 if(m_r != 0.0) {
329 csf = (xc - newPivot.x()) / m_r;
330 snf = (yc - newPivot.y()) / m_r;
331 double anrm = sqrt(csf * csf + snf * snf);
332 if(anrm != 0.0) {
333 csf /= anrm;
334 snf /= anrm;
335 phi = atan2(snf, csf);
336 } else {
337 csf = 1.0;
338 snf = 0.0;
339 phi = 0.0;
340 }
341 } else {
342 csf = 1.0;
343 snf = 0.0;
344 phi = 0.0;
345 }
346 double phid = fmod(phi - phi0 + M_PI8, M_PI2);
347 if(phid > M_PI) phid = phid - M_PI2;
348 double drp = (m_pivot.x() + dr * csf0 + m_r * (csf0 - csf) - newPivot.x())
349 * csf
350 + (m_pivot.y() + dr * snf0 + m_r * (snf0 - snf) - newPivot.y()) * snf;
351 double dzp = m_pivot.z() + dz - m_r * tanl * phid - newPivot.z();
352
353 HepVector ap(5);
354 ap[0] = drp;
355 ap[1] = fmod(phi + M_PI4, M_PI2);
356 ap[2] = kappa;
357 ap[3] = dzp;
358 ap[4] = tanl;
359
360 // if (m_matrixValid) m_Ea.assign(delApDelA(ap) * m_Ea * delApDelA(ap).T());
361 if (m_matrixValid) m_Ea = m_Ea.similarity(delApDelA(ap));
362
363 m_a = ap;
364 m_pivot = newPivot;
365
366 //...Are these needed?...iw...
367 updateCache();
368 return m_pivot;
369}
HepMatrix delApDelA(const HepVector &ap) const

◆ pivot() [2/6]

const HepPoint3D & Helix::pivot ( const HepPoint3D newPivot)

sets pivot position.

◆ pivot() [3/6]

const HepPoint3D & Helix::pivot ( const HepPoint3D newPivot)

sets pivot position.

◆ pivot() [4/6]

◆ pivot() [5/6]

const HepPoint3D & Helix::pivot ( void  ) const

returns pivot position.

◆ pivot() [6/6]

const HepPoint3D & Helix::pivot ( void  ) const

returns pivot position.

◆ pt() [1/3]

double Helix::pt ( void  ) const
inline

◆ pt() [2/3]

double Helix::pt ( void  ) const
inline

◆ pt() [3/3]

double Helix::pt ( void  ) const
inline

Definition at line 129 of file Reconstruction/TrackUtil/TrackUtil-00-00-12/TrackUtil/Helix.h.

129{ return m_pt; }

◆ radius() [1/3]

◆ radius() [2/3]

double Helix::radius ( void  ) const

returns radious of helix.

◆ radius() [3/3]

double Helix::radius ( void  ) const

returns radious of helix.

◆ set() [1/3]

void Helix::set ( const HepPoint3D pivot,
const HepVector &  a,
const HepSymMatrix &  Ea 
)

sets helix pivot position, parameters, and error matrix.

Definition at line 372 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

374 {
375 m_pivot = pivot;
376 m_a = a;
377 m_Ea = Ea;
378 m_matrixValid = true;
379 updateCache();
380}

Referenced by HoughTrack::HoughTrack(), and HoughTrack::update().

◆ set() [2/3]

void Helix::set ( const HepPoint3D pivot,
const HepVector &  a,
const HepSymMatrix &  Ea 
)

sets helix pivot position, parameters, and error matrix.

◆ set() [3/3]

void Helix::set ( const HepPoint3D pivot,
const HepVector &  a,
const HepSymMatrix &  Ea 
)

sets helix pivot position, parameters, and error matrix.

◆ sinPhi0() [1/3]

double Helix::sinPhi0 ( void  ) const
inline

Definition at line 321 of file InstallArea/include/TrackUtil/TrackUtil/Helix.h.

321 {
322 return m_sp;
323}

◆ sinPhi0() [2/3]

double Helix::sinPhi0 ( void  ) const

◆ sinPhi0() [3/3]

double Helix::sinPhi0 ( void  ) const

◆ tanl() [1/3]

◆ tanl() [2/3]

double Helix::tanl ( void  ) const

◆ tanl() [3/3]

double Helix::tanl ( void  ) const

◆ x() [1/9]

double * Helix::x ( double  dPhi,
double  p[3] 
) const

Definition at line 149 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

149 {
150 //
151 // Calculate position (x,y,z) along helix.
152 //
153 // x = x0 + dr * cos(phi0) + (alpha / kappa) * (cos(phi0) - cos(phi0+phi))
154 // y = y0 + dr * sin(phi0) + (alpha / kappa) * (sin(phi0) - sin(phi0+phi))
155 // z = z0 + dz - (alpha / kappa) * tan(lambda) * phi
156 //
157
158 p[0] = m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] + phi));
159 p[1] = m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] + phi));
160 p[2] = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi;
161
162 return p;
163}

◆ x() [2/9]

double * Helix::x ( double  dPhi,
double  p[3] 
) const

◆ x() [3/9]

double * Helix::x ( double  dPhi,
double  p[3] 
) const

◆ x() [4/9]

HepPoint3D Helix::x ( double  dPhi,
HepSymMatrix &  Ex 
) const

returns position and convariance matrix(Ex) after rotation.

Definition at line 166 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

166 {
167 double x = m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] +phi));
168 double y = m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] +phi));
169 double z = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi;
170
171 //
172 // Calculate position error matrix.
173 // Ex(phi) = (@x/@a)(Ea)(@x/@a)^T, phi is deflection angle to specify the
174 // point to be calcualted.
175 //
176 // HepMatrix dXDA(3, 5, 0);
177 // dXDA = delXDelA(phi);
178 // Ex.assign(dXDA * m_Ea * dXDA.T());
179
180 if (m_matrixValid) Ex = m_Ea.similarity(delXDelA(phi));
181 else Ex = m_Ea;
182
183 return HepPoint3D(x, y, z);
184}
HepGeom::Point3D< double > HepPoint3D
Definition: Gam4pikp.cxx:37
HepPoint3D x(double dPhi=0.) const
returns position after rotating angle dPhi in phi direction.

◆ x() [5/9]

HepPoint3D Helix::x ( double  dPhi,
HepSymMatrix &  Ex 
) const

returns position and convariance matrix(Ex) after rotation.

◆ x() [6/9]

HepPoint3D Helix::x ( double  dPhi,
HepSymMatrix &  Ex 
) const

returns position and convariance matrix(Ex) after rotation.

◆ x() [7/9]

HepPoint3D Helix::x ( double  dPhi = 0.) const

returns position after rotating angle dPhi in phi direction.

Definition at line 132 of file Reconstruction/TrackUtil/bak_TrackUtil-00-00-11/src/Helix.cxx.

132 {
133 //
134 // Calculate position (x,y,z) along helix.
135 //
136 // x = x0 + dr * cos(phi0) + (alpha / kappa) * (cos(phi0) - cos(phi0+phi))
137 // y = y0 + dr * sin(phi0) + (alpha / kappa) * (sin(phi0) - sin(phi0+phi))
138 // z = z0 + dz - (alpha / kappa) * tan(lambda) * phi
139 //
140
141 double x = m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] +phi));
142 double y = m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] +phi));
143 double z = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi;
144
145 return HepPoint3D(x, y, z);
146}

Referenced by TTrack::approach(), TTrack::approach2D(), HoughTrack::driftDistRes(), EsTimeAlg::execute(), TTrack::fit2D(), CgemHitOnTrack::getFitStuff(), TTrack::HelCyl(), RkFitCylinder::intersect(), HoughHit::residual(), TRunge::SetFlightLength(), TofFz_helix::TofFz_Get(), and x().

◆ x() [8/9]

HepPoint3D Helix::x ( double  dPhi = 0.) const

returns position after rotating angle dPhi in phi direction.

◆ x() [9/9]

HepPoint3D Helix::x ( double  dPhi = 0.) const

returns position after rotating angle dPhi in phi direction.

Member Data Documentation

◆ ConstantAlpha

static const double Helix::ConstantAlpha = 333.564095
static

Constant alpha for uniform field.

Definition at line 180 of file InstallArea/include/TrackUtil/TrackUtil/Helix.h.

Referenced by dPhi(), and IntersectCylinder().

◆ m_alpha

◆ m_bField

double Helix::m_bField
protected

◆ m_pmgnIMF

IMagneticFieldSvc * Helix::m_pmgnIMF
protected

Definition at line 171 of file InstallArea/include/TrackUtil/TrackUtil/Helix.h.

Referenced by dPhi(), Helix(), and IntersectCylinder().


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