BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Helix Class Reference

Helix parameter class. More...

#include <Helix.h>

Public Member Functions

 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
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)
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
 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
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)
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
 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
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)
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

Static Public Attributes

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

Protected Attributes

IBesMagFieldSvcm_pmgnIMF
double m_bField
double m_alpha

Detailed Description

Helix parameter class.

Definition at line 51 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrackUtil/Helix.h.

Constructor & Destructor Documentation

◆ Helix() [1/9]

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

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

Definition at line 43 of file Reconstruction/TrackUtil/src/Helix.cxx.

45 : // m_bField(-10.0),
46 // m_alpha(-333.564095),
47 m_pivot( pivot )
48 , m_a( a )
49 , m_matrixValid( true )
50 , m_Ea( Ea ) {
51 StatusCode scmgn = Gaudi::svcLocator()->service( "MagneticFieldSvc", m_pmgnIMF );
52 if ( scmgn != StatusCode::SUCCESS )
53 { std::cout << "Unable to open Magnetic field service" << std::endl; }
54 m_bField = -10000 * ( m_pmgnIMF->getReferField() );
55 m_alpha = 10000. / 2.99792458 / m_bField;
56 // m_alpha = 10000. / 2.99792458 / m_bField;
57 // m_alpha = 333.564095;
58 updateCache();
59}
virtual double getReferField()=0

Referenced by Helix(), Helix(), Helix(), and operator=().

◆ Helix() [2/9]

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

Constructor without error matrix.

Definition at line 61 of file Reconstruction/TrackUtil/src/Helix.cxx.

63 : // m_bField(-10.0),
64 // m_alpha(-333.564095),
65 m_pivot( pivot )
66 , m_a( a )
67 , m_matrixValid( false )
68 , m_Ea( HepSymMatrix( 5, 0 ) ) {
69 StatusCode scmgn = Gaudi::svcLocator()->service( "MagneticFieldSvc", m_pmgnIMF );
70 if ( scmgn != StatusCode::SUCCESS )
71 {
72 // log << MSG::ERROR << "Unable to open Magnetic field service"<<endmsg;
73 std::cout << "Unable to open Magnetic field service" << std::endl;
74 }
75 m_bField = -10000 * ( m_pmgnIMF->getReferField() );
76 m_alpha = 10000. / 2.99792458 / m_bField;
77 // m_alpha = 333.564095;
78 // cout<<"MdcFastTrakAlg:: bField,alpha: "<<m_bField<<" , "<<m_alpha<<endl;
79 updateCache();
80}

◆ Helix() [3/9]

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

Constructor with position, momentum, and charge.

Definition at line 82 of file Reconstruction/TrackUtil/src/Helix.cxx.

84 : // m_bField(-10.0),
85 // m_alpha(-333.564095),
86 m_pivot( position )
87 , m_a( HepVector( 5, 0 ) )
88 , m_matrixValid( false )
89 , m_Ea( HepSymMatrix( 5, 0 ) ) {
90 StatusCode scmgn = Gaudi::svcLocator()->service( "MagneticFieldSvc", m_pmgnIMF );
91 if ( scmgn != StatusCode::SUCCESS )
92 {
93 // log << MSG::ERROR << "Unable to open Magnetic field service"<<endmsg;
94 std::cout << "Unable to open Magnetic field service" << std::endl;
95 }
96 m_bField = -10000 * ( m_pmgnIMF->getReferField() );
97 m_alpha = 10000. / 2.99792458 / m_bField;
98
99 m_a[0] = 0.;
100 m_a[1] = fmod( atan2( -momentum.x(), momentum.y() ) + M_PI4, M_PI2 );
101 m_a[3] = 0.;
102 double perp( momentum.perp() );
103 if ( perp != 0.0 )
104 {
105 m_a[2] = charge / perp;
106 m_a[4] = momentum.z() / perp;
107 }
108 else
109 {
110 m_a[2] = charge * ( DBL_MAX );
111 if ( momentum.z() >= 0 ) { m_a[4] = ( DBL_MAX ); }
112 else { m_a[4] = -( DBL_MAX ); }
113 }
114 // m_alpha = 333.564095;
115 updateCache();
116}
const double M_PI2
const double M_PI4
**********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() [1/3]

Helix::~Helix ( )
virtual

Destructor.

Definition at line 118 of file Reconstruction/TrackUtil/src/Helix.cxx.

118{}

Referenced by ~Helix().

◆ Helix() [4/9]

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

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

◆ Helix() [5/9]

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

Constructor without error matrix.

◆ Helix() [6/9]

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() [7/9]

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

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

◆ Helix() [8/9]

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

Constructor without error matrix.

◆ Helix() [9/9]

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

Constructor with position, momentum, and charge.

◆ ~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 221 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrackUtil/Helix.h.

221 {
222 m_a = i;
223 updateCache();
224 return m_a;
225}

◆ 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.

◆ bFieldZ() [1/6]

double Helix::bFieldZ ( double a)
inline

sets/returns z componet of the magnetic field.

Definition at line 229 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrackUtil/Helix.h.

229 {
230 m_bField = a;
231 m_alpha = 10000. / 2.99792458 / m_bField;
232 updateCache();
233 return m_bField;
234}
const HepVector & a(void) const
returns helix parameters.

Referenced by bFieldZ(), and bFieldZ().

◆ 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 236 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrackUtil/Helix.h.

236{ return m_bField; }

◆ 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 240 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrackUtil/Helix.h.

240{ return m_cp; }

Referenced by cosPhi0().

◆ 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 121 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrackUtil/Helix.h.

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

◆ cosTheta() [2/3]

double Helix::cosTheta ( void ) const
inline

Definition at line 121 of file InstallArea/x86_64-el9-gcc13-opt/include/TrackUtil/Helix.h.

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

◆ cosTheta() [3/3]

double Helix::cosTheta ( void ) const
inline

Definition at line 121 of file Reconstruction/TrackUtil/include/TrackUtil/Helix.h.

121{ 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 550 of file Reconstruction/TrackUtil/src/Helix.cxx.

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

Referenced by del4MDelA(), and 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 597 of file Reconstruction/TrackUtil/src/Helix.cxx.

597 {
598 //
599 // Calculate Jacobian (@4mx/@a)
600 // Vector a is helix parameters and phi is internal parameter.
601 // Vector 4xm is 4 momentum and position.
602 //
603
604 HepMatrix d4MXDA( 7, 5, 0 );
605
606 const double& dr = m_ac[0];
607 const double& phi0 = m_ac[1];
608 const double& cpa = m_ac[2];
609 const double& dz = m_ac[3];
610 const double& tnl = m_ac[4];
611
612 double cosf0phi = cos( phi0 + phi );
613 double sinf0phi = sin( phi0 + phi );
614
615 double rho;
616 if ( cpa != 0. ) rho = 1. / cpa;
617 else rho = ( DBL_MAX );
618
619 double charge = 1.;
620 if ( cpa < 0. ) charge = -1.;
621
622 double E = sqrt( rho * rho * ( 1. + tnl * tnl ) + mass * mass );
623
624 d4MXDA[0][1] = -fabs( rho ) * cosf0phi;
625 d4MXDA[0][2] = charge * rho * rho * sinf0phi;
626
627 d4MXDA[1][1] = -fabs( rho ) * sinf0phi;
628 d4MXDA[1][2] = -charge * rho * rho * cosf0phi;
629
630 d4MXDA[2][2] = -charge * rho * rho * tnl;
631 d4MXDA[2][4] = fabs( rho );
632
633 if ( cpa != 0.0 && E != 0.0 )
634 {
635 d4MXDA[3][2] = ( -1. - tnl * tnl ) / ( cpa * cpa * cpa * E );
636 d4MXDA[3][4] = tnl / ( cpa * cpa * E );
637 }
638 else
639 {
640 d4MXDA[3][2] = ( DBL_MAX );
641 d4MXDA[3][4] = ( DBL_MAX );
642 }
643
644 d4MXDA[4][0] = m_cp;
645 d4MXDA[4][1] = -dr * m_sp + m_r * ( -m_sp + sinf0phi );
646 if ( cpa != 0.0 ) { d4MXDA[4][2] = -( m_r / cpa ) * ( m_cp - cosf0phi ); }
647 else { d4MXDA[4][2] = ( DBL_MAX ); }
648
649 d4MXDA[5][0] = m_sp;
650 d4MXDA[5][1] = dr * m_cp + m_r * ( m_cp - cosf0phi );
651 if ( cpa != 0.0 )
652 {
653 d4MXDA[5][2] = -( m_r / cpa ) * ( m_sp - sinf0phi );
654
655 d4MXDA[6][2] = ( m_r / cpa ) * tnl * phi;
656 }
657 else
658 {
659 d4MXDA[5][2] = ( DBL_MAX );
660
661 d4MXDA[6][2] = ( DBL_MAX );
662 }
663
664 d4MXDA[6][3] = 1.;
665 d4MXDA[6][4] = -m_r * phi;
666
667 return d4MXDA;
668}
double dr(void) const
returns an element of parameters.

Referenced by del4MXDelA(), and 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 418 of file Reconstruction/TrackUtil/src/Helix.cxx.

418 {
419 //
420 // Calculate Jacobian (@ap/@a)
421 // Vector ap is new helix parameters and a is old helix parameters.
422 //
423
424 HepMatrix dApDA( 5, 5, 0 );
425
426 const double& dr = m_ac[0];
427 const double& phi0 = m_ac[1];
428 const double& cpa = m_ac[2];
429 const double& dz = m_ac[3];
430 const double& tnl = m_ac[4];
431
432 double drp = ap[0];
433 double phi0p = ap[1];
434 double cpap = ap[2];
435 double dzp = ap[3];
436 double tnlp = ap[4];
437
438 double rdr = m_r + dr;
439 double rdrpr;
440 if ( ( m_r + drp ) != 0.0 ) { rdrpr = 1. / ( m_r + drp ); }
441 else { rdrpr = ( DBL_MAX ); }
442 // double csfd = cos(phi0)*cos(phi0p) + sin(phi0)*sin(phi0p);
443 // double snfd = cos(phi0)*sin(phi0p) - sin(phi0)*cos(phi0p);
444 double csfd = cos( phi0p - phi0 );
445 double snfd = sin( phi0p - phi0 );
446 double phid = fmod( phi0p - phi0 + M_PI8, M_PI2 );
447 if ( phid > M_PI ) phid = phid - M_PI2;
448
449 dApDA[0][0] = csfd;
450 dApDA[0][1] = rdr * snfd;
451 if ( cpa != 0.0 ) { dApDA[0][2] = ( m_r / cpa ) * ( 1.0 - csfd ); }
452 else { dApDA[0][2] = ( DBL_MAX ); }
453
454 dApDA[1][0] = -rdrpr * snfd;
455 dApDA[1][1] = rdr * rdrpr * csfd;
456 if ( cpa != 0.0 ) { dApDA[1][2] = ( m_r / cpa ) * rdrpr * snfd; }
457 else { dApDA[1][2] = ( DBL_MAX ); }
458
459 dApDA[2][2] = 1.0;
460
461 dApDA[3][0] = m_r * rdrpr * tnl * snfd;
462 dApDA[3][1] = m_r * tnl * ( 1.0 - rdr * rdrpr * csfd );
463 if ( cpa != 0.0 ) { dApDA[3][2] = ( m_r / cpa ) * tnl * ( phid - m_r * rdrpr * snfd ); }
464 else { dApDA[3][2] = ( DBL_MAX ); }
465 dApDA[3][3] = 1.0;
466 dApDA[3][4] = -m_r * phid;
467
468 dApDA[4][4] = 1.0;
469
470 return dApDA;
471}
const double M_PI8
#define M_PI
Definition TConstant.h:4

Referenced by delApDelA(), and 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 515 of file Reconstruction/TrackUtil/src/Helix.cxx.

515 {
516 //
517 // Calculate Jacobian (@m/@a)
518 // Vector a is helix parameters and phi is internal parameter.
519 // Vector m is momentum.
520 //
521
522 HepMatrix dMDA( 3, 5, 0 );
523
524 const double& phi0 = m_ac[1];
525 const double& cpa = m_ac[2];
526 const double& tnl = m_ac[4];
527
528 double cosf0phi = cos( phi0 + phi );
529 double sinf0phi = sin( phi0 + phi );
530
531 double rho;
532 if ( cpa != 0. ) rho = 1. / cpa;
533 else rho = ( DBL_MAX );
534
535 double charge = 1.;
536 if ( cpa < 0. ) charge = -1.;
537
538 dMDA[0][1] = -fabs( rho ) * cosf0phi;
539 dMDA[0][2] = charge * rho * rho * sinf0phi;
540
541 dMDA[1][1] = -fabs( rho ) * sinf0phi;
542 dMDA[1][2] = -charge * rho * rho * cosf0phi;
543
544 dMDA[2][2] = -charge * rho * rho * tnl;
545 dMDA[2][4] = fabs( rho );
546
547 return dMDA;
548}

Referenced by delMDelA(), and 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 473 of file Reconstruction/TrackUtil/src/Helix.cxx.

473 {
474 //
475 // Calculate Jacobian (@x/@a)
476 // Vector a is helix parameters and phi is internal parameter
477 // which specifys the point to be calculated for Ex(phi).
478 //
479
480 HepMatrix dXDA( 3, 5, 0 );
481
482 const double& dr = m_ac[0];
483 const double& phi0 = m_ac[1];
484 const double& cpa = m_ac[2];
485 const double& dz = m_ac[3];
486 const double& tnl = m_ac[4];
487
488 double cosf0phi = cos( phi0 + phi );
489 double sinf0phi = sin( phi0 + phi );
490
491 dXDA[0][0] = m_cp;
492 dXDA[0][1] = -dr * m_sp + m_r * ( -m_sp + sinf0phi );
493 if ( cpa != 0.0 ) { dXDA[0][2] = -( m_r / cpa ) * ( m_cp - cosf0phi ); }
494 else { dXDA[0][2] = ( DBL_MAX ); }
495 // dXDA[0][3] = 0.0;
496 // dXDA[0][4] = 0.0;
497
498 dXDA[1][0] = m_sp;
499 dXDA[1][1] = dr * m_cp + m_r * ( m_cp - cosf0phi );
500 if ( cpa != 0.0 ) { dXDA[1][2] = -( m_r / cpa ) * ( m_sp - sinf0phi ); }
501 else { dXDA[1][2] = ( DBL_MAX ); }
502 // dXDA[1][3] = 0.0;
503 // dXDA[1][4] = 0.0;
504
505 // dXDA[2][0] = 0.0;
506 // dXDA[2][1] = 0.0;
507 if ( cpa != 0.0 ) { dXDA[2][2] = ( m_r / cpa ) * tnl * phi; }
508 else { dXDA[2][2] = ( DBL_MAX ); }
509 dXDA[2][3] = 1.0;
510 dXDA[2][4] = -m_r * phi;
511
512 return dXDA;
513}

Referenced by delXDelA(), 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 203 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrackUtil/Helix.h.

203{ return momentum( phi ).unit(); }

Referenced by direction(), Emc_helix::Emc_Get(), 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.

◆ dr() [1/3]

double Helix::dr ( void ) const
inline

returns an element of parameters.

Definition at line 205 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrackUtil/Helix.h.

205{ return m_ac[0]; }

Referenced by del4MXDelA(), delApDelA(), delXDelA(), dr(), and pivot().

◆ 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]

double Helix::dz ( void ) const
inline

◆ 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 227 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrackUtil/Helix.h.

227{ return m_Ea = i; }

◆ 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

◆ Ea() [5/6]

const HepSymMatrix & Helix::Ea ( void ) const

returns error matrix.

◆ Ea() [6/6]

const HepSymMatrix & Helix::Ea ( void ) const

returns error matrix.

◆ 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 670 of file Reconstruction/TrackUtil/src/Helix.cxx.

670 {
671 m_matrixValid = false;
672 m_Ea *= 0.;
673}

Referenced by EsTimeAlg::execute(), and ignoreErrorMatrix().

◆ 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.

◆ kappa() [1/3]

double Helix::kappa ( void ) const
inline

Definition at line 209 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrackUtil/Helix.h.

209{ return m_ac[2]; }

Referenced by kappa(), pivot(), and TRunge::SetFlightLength().

◆ 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 213 of file Reconstruction/TrackUtil/src/Helix.cxx.

213 {
214 //
215 // Calculate momentum.
216 //
217 // Pt = | 1/kappa | (GeV/c)
218 //
219 // Px = -Pt * sin(phi0 + phi)
220 // Py = Pt * cos(phi0 + phi)
221 // Pz = Pt * tan(lambda)
222 //
223 // E = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass )
224
225 double pt = fabs( m_pt );
226 double px = -pt * sin( m_ac[1] + phi );
227 double py = pt * cos( m_ac[1] + phi );
228 double pz = pt * m_ac[4];
229 double E = sqrt( pt * pt * ( 1. + m_ac[4] * m_ac[4] ) + mass * mass );
230
231 return HepLorentzVector( px, py, pz, E );
232}
NTuple::Item< double > m_pt

◆ 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 258 of file Reconstruction/TrackUtil/src/Helix.cxx.

259 {
260 //
261 // Calculate momentum.
262 //
263 // Pt = | 1/kappa | (GeV/c)
264 //
265 // Px = -Pt * sin(phi0 + phi)
266 // Py = Pt * cos(phi0 + phi)
267 // Pz = Pt * tan(lambda)
268 //
269 // E = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass )
270
271 double pt = fabs( m_pt );
272 double px = -pt * sin( m_ac[1] + phi );
273 double py = pt * cos( m_ac[1] + phi );
274 double pz = pt * m_ac[4];
275 double E = sqrt( pt * pt * ( 1. + m_ac[4] * m_ac[4] ) + mass * mass );
276
277 x.setX( m_pivot.x() + m_ac[0] * m_cp + m_r * ( m_cp - cos( m_ac[1] + phi ) ) );
278 x.setY( m_pivot.y() + m_ac[0] * m_sp + m_r * ( m_sp - sin( m_ac[1] + phi ) ) );
279 x.setZ( m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi );
280
281 if ( m_matrixValid ) Emx = m_Ea.similarity( del4MXDelA( phi, mass ) );
282 else Emx = m_Ea;
283
284 return HepLorentzVector( px, py, pz, E );
285}
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 234 of file Reconstruction/TrackUtil/src/Helix.cxx.

234 {
235 //
236 // Calculate momentum.
237 //
238 // Pt = | 1/kappa | (GeV/c)
239 //
240 // Px = -Pt * sin(phi0 + phi)
241 // Py = Pt * cos(phi0 + phi)
242 // Pz = Pt * tan(lambda)
243 //
244 // E = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass )
245
246 double pt = fabs( m_pt );
247 double px = -pt * sin( m_ac[1] + phi );
248 double py = pt * cos( m_ac[1] + phi );
249 double pz = pt * m_ac[4];
250 double E = sqrt( pt * pt * ( 1. + m_ac[4] * m_ac[4] ) + mass * mass );
251
252 if ( m_matrixValid ) Em = m_Ea.similarity( del4MDelA( phi, mass ) );
253 else Em = m_Ea;
254
255 return HepLorentzVector( px, py, pz, E );
256}
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 191 of file Reconstruction/TrackUtil/src/Helix.cxx.

191 {
192 //
193 // Calculate momentum.
194 //
195 // Pt = | 1/kappa | (GeV/c)
196 //
197 // Px = -Pt * sin(phi0 + phi)
198 // Py = Pt * cos(phi0 + phi)
199 // Pz = Pt * tan(lambda)
200 //
201
202 double pt = fabs( m_pt );
203 double px = -pt * sin( m_ac[1] + phi );
204 double py = pt * cos( m_ac[1] + phi );
205 double pz = pt * m_ac[4];
206
207 if ( m_matrixValid ) Em = m_Ea.similarity( delMDelA( phi ) );
208 else Em = m_Ea;
209
210 return Hep3Vector( px, py, pz );
211}
HepMatrix delMDelA(double phi) const

◆ 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 172 of file Reconstruction/TrackUtil/src/Helix.cxx.

172 {
173 //
174 // Calculate momentum.
175 //
176 // Pt = | 1/kappa | (GeV/c)
177 //
178 // Px = -Pt * sin(phi0 + phi)
179 // Py = Pt * cos(phi0 + phi)
180 // Pz = Pt * tan(lambda)
181 //
182
183 double pt = fabs( m_pt );
184 double px = -pt * sin( m_ac[1] + phi );
185 double py = pt * cos( m_ac[1] + phi );
186 double pz = pt * m_ac[4];
187
188 return Hep3Vector( px, py, pz );
189}

Referenced by EsTimeAlg::execute(), Helix(), momentum(), momentum(), momentum(), momentum(), and momentum().

◆ 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 360 of file Reconstruction/TrackUtil/src/Helix.cxx.

360 {
361 if ( this == &i ) return *this;
362
363 m_bField = i.m_bField;
364 m_alpha = i.m_alpha;
365 m_pivot = i.m_pivot;
366 m_a = i.m_a;
367 m_Ea = i.m_Ea;
368 m_matrixValid = i.m_matrixValid;
369
370 m_center = i.m_center;
371 m_cp = i.m_cp;
372 m_sp = i.m_sp;
373 m_pt = i.m_pt;
374 m_r = i.m_r;
375 m_ac[0] = i.m_ac[0];
376 m_ac[1] = i.m_ac[1];
377 m_ac[2] = i.m_ac[2];
378 m_ac[3] = i.m_ac[3];
379 m_ac[4] = i.m_ac[4];
380
381 return *this;
382}

Referenced by operator=().

◆ operator=() [2/3]

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

Copy operator.

◆ operator=() [3/3]

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

Copy operator.

◆ phi0() [1/3]

double Helix::phi0 ( void ) const
inline

◆ 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 287 of file Reconstruction/TrackUtil/src/Helix.cxx.

287 {
288 const double& dr = m_ac[0];
289 const double& phi0 = m_ac[1];
290 const double& kappa = m_ac[2];
291 const double& dz = m_ac[3];
292 const double& tanl = m_ac[4];
293
294 double rdr = dr + m_r;
295 double phi = fmod( phi0 + M_PI4, M_PI2 );
296 double csf0 = cos( phi );
297 double snf0 = ( 1. - csf0 ) * ( 1. + csf0 );
298 snf0 = sqrt( ( snf0 > 0. ) ? snf0 : 0. );
299 if ( phi > M_PI ) snf0 = -snf0;
300
301 double xc = m_pivot.x() + rdr * csf0;
302 double yc = m_pivot.y() + rdr * snf0;
303 double csf, snf;
304 if ( m_r != 0.0 )
305 {
306 csf = ( xc - newPivot.x() ) / m_r;
307 snf = ( yc - newPivot.y() ) / m_r;
308 double anrm = sqrt( csf * csf + snf * snf );
309 if ( anrm != 0.0 )
310 {
311 csf /= anrm;
312 snf /= anrm;
313 phi = atan2( snf, csf );
314 }
315 else
316 {
317 csf = 1.0;
318 snf = 0.0;
319 phi = 0.0;
320 }
321 }
322 else
323 {
324 csf = 1.0;
325 snf = 0.0;
326 phi = 0.0;
327 }
328 double phid = fmod( phi - phi0 + M_PI8, M_PI2 );
329 if ( phid > M_PI ) phid = phid - M_PI2;
330 double drp = ( m_pivot.x() + dr * csf0 + m_r * ( csf0 - csf ) - newPivot.x() ) * csf +
331 ( m_pivot.y() + dr * snf0 + m_r * ( snf0 - snf ) - newPivot.y() ) * snf;
332 double dzp = m_pivot.z() + dz - m_r * tanl * phid - newPivot.z();
333
334 HepVector ap( 5 );
335 ap[0] = drp;
336 ap[1] = fmod( phi + M_PI4, M_PI2 );
337 ap[2] = kappa;
338 ap[3] = dzp;
339 ap[4] = tanl;
340
341 // if (m_matrixValid) m_Ea.assign(delApDelA(ap) * m_Ea * delApDelA(ap).T());
342 if ( m_matrixValid ) m_Ea = m_Ea.similarity( delApDelA( ap ) );
343
344 m_a = ap;
345 m_pivot = newPivot;
346
347 //...Are these needed?...iw...
348 updateCache();
349 return m_pivot;
350}
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

Definition at line 120 of file InstallArea/x86_64-el9-gcc13-opt/include/TrackUtil/Helix.h.

120{ return m_pt; }

◆ pt() [3/3]

double Helix::pt ( void ) const
inline

Definition at line 120 of file Reconstruction/TrackUtil/include/TrackUtil/Helix.h.

120{ 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 352 of file Reconstruction/TrackUtil/src/Helix.cxx.

352 {
353 m_pivot = pivot;
354 m_a = a;
355 m_Ea = Ea;
356 m_matrixValid = true;
357 updateCache();
358}

Referenced by MdcUtilitySvc::getHelixOfMcParticle(), and set().

◆ 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 238 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrackUtil/Helix.h.

238{ return m_sp; }

Referenced by sinPhi0().

◆ sinPhi0() [2/3]

double Helix::sinPhi0 ( void ) const

◆ sinPhi0() [3/3]

double Helix::sinPhi0 ( void ) const

◆ tanl() [1/3]

double Helix::tanl ( void ) const
inline

◆ 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 136 of file Reconstruction/TrackUtil/src/Helix.cxx.

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

◆ 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 152 of file Reconstruction/TrackUtil/src/Helix.cxx.

152 {
153 double x = m_pivot.x() + m_ac[0] * m_cp + m_r * ( m_cp - cos( m_ac[1] + phi ) );
154 double y = m_pivot.y() + m_ac[0] * m_sp + m_r * ( m_sp - sin( m_ac[1] + phi ) );
155 double z = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi;
156
157 //
158 // Calculate position error matrix.
159 // Ex(phi) = (@x/@a)(Ea)(@x/@a)^T, phi is deflection angle to specify the
160 // point to be calcualted.
161 //
162 // HepMatrix dXDA(3, 5, 0);
163 // dXDA = delXDelA(phi);
164 // Ex.assign(dXDA * m_Ea * dXDA.T());
165
166 if ( m_matrixValid ) Ex = m_Ea.similarity( delXDelA( phi ) );
167 else Ex = m_Ea;
168
169 return HepPoint3D( x, y, z );
170}
HepGeom::Point3D< double > HepPoint3D
HepMatrix delXDelA(double phi) const

◆ 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 120 of file Reconstruction/TrackUtil/src/Helix.cxx.

120 {
121 //
122 // Calculate position (x,y,z) along helix.
123 //
124 // x = x0 + dr * cos(phi0) + (alpha / kappa) * (cos(phi0) - cos(phi0+phi))
125 // y = y0 + dr * sin(phi0) + (alpha / kappa) * (sin(phi0) - sin(phi0+phi))
126 // z = z0 + dz - (alpha / kappa) * tan(lambda) * phi
127 //
128
129 double x = m_pivot.x() + m_ac[0] * m_cp + m_r * ( m_cp - cos( m_ac[1] + phi ) );
130 double y = m_pivot.y() + m_ac[0] * m_sp + m_r * ( m_sp - sin( m_ac[1] + phi ) );
131 double z = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi;
132
133 return HepPoint3D( x, y, z );
134}

Referenced by EsTimeAlg::execute(), RkFitCylinder::intersect(), RkFitCylinder::intersect(), momentum(), TRunge::SetFlightLength(), TofFz_helix::TofFz_Get(), x(), x(), 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

const double Helix::ConstantAlpha = 333.564095
static

Constant alpha for uniform field.

Definition at line 167 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrackUtil/Helix.h.

Referenced by del4MXDelA().

◆ m_alpha

double Helix::m_alpha
protected

◆ m_bField

double Helix::m_bField
protected

◆ m_pmgnIMF

IBesMagFieldSvc * Helix::m_pmgnIMF
protected

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