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

#include <HelixTraj.h>

Inheritance diagram for HelixTraj:

Public Types

enum  ParIndex {
  d0Index = 0 , phi0Index , omegaIndex , z0Index ,
  tanDipIndex , d0Index = 0 , phi0Index , omegaIndex ,
  z0Index , tanDipIndex , d0Index = 0 , phi0Index ,
  omegaIndex , z0Index , tanDipIndex
}
enum  { NHLXPRM = 5 }
enum  ParIndex {
  d0Index = 0 , phi0Index , omegaIndex , z0Index ,
  tanDipIndex , d0Index = 0 , phi0Index , omegaIndex ,
  z0Index , tanDipIndex , d0Index = 0 , phi0Index ,
  omegaIndex , z0Index , tanDipIndex
}
enum  { NHLXPRM = 5 }
enum  ParIndex {
  d0Index = 0 , phi0Index , omegaIndex , z0Index ,
  tanDipIndex , d0Index = 0 , phi0Index , omegaIndex ,
  z0Index , tanDipIndex , d0Index = 0 , phi0Index ,
  omegaIndex , z0Index , tanDipIndex
}
enum  { NHLXPRM = 5 }

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Member Enumeration Documentation

◆ anonymous enum

◆ anonymous enum

anonymous enum
Enumerator
NHLXPRM 

Definition at line 30 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/HelixTraj.h.

30{ NHLXPRM = 5 };

◆ anonymous enum

anonymous enum
Enumerator
NHLXPRM 

Definition at line 30 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/HelixTraj.h.

30{ NHLXPRM = 5 };

◆ ParIndex [1/3]

◆ ParIndex [2/3]

Enumerator
d0Index 
phi0Index 
omegaIndex 
z0Index 
tanDipIndex 
d0Index 
phi0Index 
omegaIndex 
z0Index 
tanDipIndex 
d0Index 
phi0Index 
omegaIndex 
z0Index 
tanDipIndex 

Definition at line 29 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/HelixTraj.h.

◆ ParIndex [3/3]

Enumerator
d0Index 
phi0Index 
omegaIndex 
z0Index 
tanDipIndex 
d0Index 
phi0Index 
omegaIndex 
z0Index 
tanDipIndex 
d0Index 
phi0Index 
omegaIndex 
z0Index 
tanDipIndex 

Definition at line 29 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/HelixTraj.h.

Constructor & Destructor Documentation

◆ HelixTraj() [1/12]

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

Definition at line 28 of file HelixTraj.cxx.

30 : TrkSimpTraj( pvec, pcov, lowlim, hilim, refpoint ) {
31 // Make sure the dimensions of the input matrix and vector are correct
32
33 if ( pvec.num_row() != NHLXPRM || pcov.num_row() != NHLXPRM )
34 {
35 std::cout << "ErrMsg(fatal) "
36 << "HelixTraj: incorrect constructor vector/matrix dimension" << std::endl;
37 ::abort();
38 }
39
40 if ( omega() == 0.0 ) parameters()->parameter()[omegaIndex] = 1.e-9;
41}
TrkSimpTraj(const HepVector &params, const HepSymMatrix &cov, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)

Referenced by clone(), HelixTraj(), and operator=().

◆ HelixTraj() [2/12]

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

Definition at line 43 of file HelixTraj.cxx.

45 : TrkSimpTraj( inpar.params(), inpar.covariance(), lowlim, hilim, refpoint ) {
46 if ( omega() == 0.0 ) parameters()->parameter()[omegaIndex] = 1.e-9;
47}

◆ HelixTraj() [3/12]

HelixTraj::HelixTraj ( const TrkParams & inpar,
double lowlim = -99999.,
double hilim = 99999.,
const HepPoint3D & refpoint = _theOrigin )

Definition at line 49 of file HelixTraj.cxx.

51 : TrkSimpTraj( inpar, lowlim, hilim, refpoint ) {
52 assert( inpar.parameter().num_row() == NHLXPRM );
53 if ( omega() == 0.0 ) parameters()->parameter()[omegaIndex] = 1.e-9;
54}

◆ HelixTraj() [4/12]

◆ ~HelixTraj() [1/3]

HelixTraj::~HelixTraj ( )
virtual

Definition at line 72 of file HelixTraj.cxx.

72{}

◆ HelixTraj() [5/12]

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

◆ HelixTraj() [6/12]

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

◆ HelixTraj() [7/12]

HelixTraj::HelixTraj ( const TrkParams & ,
double lowlim = -99999.,
double hilim = 99999.,
const HepPoint3D & refpoint = _theOrigin )

◆ HelixTraj() [8/12]

HelixTraj::HelixTraj ( const HelixTraj & )

◆ ~HelixTraj() [2/3]

virtual HelixTraj::~HelixTraj ( )
virtual

◆ HelixTraj() [9/12]

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

◆ HelixTraj() [10/12]

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

◆ HelixTraj() [11/12]

HelixTraj::HelixTraj ( const TrkParams & ,
double lowlim = -99999.,
double hilim = 99999.,
const HepPoint3D & refpoint = _theOrigin )

◆ HelixTraj() [12/12]

HelixTraj::HelixTraj ( const HelixTraj & )

◆ ~HelixTraj() [3/3]

virtual HelixTraj::~HelixTraj ( )
virtual

Member Function Documentation

◆ clone() [1/3]

HelixTraj * HelixTraj::clone ( ) const
virtual

Implements TrkSimpTraj.

Definition at line 60 of file HelixTraj.cxx.

60{ return new HelixTraj( *this ); }
HelixTraj(const HepVector &, const HepSymMatrix &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
Definition HelixTraj.cxx:28

◆ clone() [2/3]

HelixTraj * HelixTraj::clone ( ) const
virtual

Implements TrkSimpTraj.

◆ clone() [3/3]

HelixTraj * HelixTraj::clone ( ) const
virtual

Implements TrkSimpTraj.

◆ curvature() [1/3]

double HelixTraj::curvature ( double fltLen) const
virtual

Implements Trajectory.

Definition at line 458 of file HelixTraj.cxx.

458 {
459 // Compute the curvature as the magnitude of the 2nd derivative
460 // of the position function with respect to the 3-d flight distance
461 //
462 double cosd = cosDip();
463 // return sqr(cosd)*fabs(omega());
464 return ( cosd * cosd ) * fabs( omega() );
465}

◆ curvature() [2/3]

double HelixTraj::curvature ( double fltLen) const
virtual

Implements Trajectory.

◆ curvature() [3/3]

double HelixTraj::curvature ( double fltLen) const
virtual

Implements Trajectory.

◆ d0() [1/3]

double HelixTraj::d0 ( ) const
inline

◆ d0() [2/3]

double HelixTraj::d0 ( ) const
inline

◆ d0() [3/3]

double HelixTraj::d0 ( ) const
inline

◆ delDirect() [1/3]

Hep3Vector HelixTraj::delDirect ( double fltLen) const
virtual

Implements Trajectory.

Definition at line 102 of file HelixTraj.cxx.

102 {
103 double ang = angle( fltLen );
104 double cDip = cosDip();
105 double delX = -omega() * cDip * cDip * sin( ang );
106 double delY = omega() * cDip * cDip * cos( ang );
107 return Hep3Vector( delX, delY, 0.0 );
108}

◆ delDirect() [2/3]

virtual Hep3Vector HelixTraj::delDirect ( double ) const
virtual

Implements Trajectory.

◆ delDirect() [3/3]

virtual Hep3Vector HelixTraj::delDirect ( double ) const
virtual

Implements Trajectory.

◆ derivDeflect() [1/3]

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

Implements TrkKalDeriv.

Definition at line 329 of file HelixTraj.cxx.

329 {
330 //
331 // This function computes the column matrix of derrivatives for the change
332 // in parameters for a change in the direction of a track at a point along
333 // its flight, holding the momentum and position constant. The effects for
334 // changes in 2 perpendicular directions (theta1 = dip and
335 // theta2 = phi*cos(dip)) can sometimes be added, as scattering in these
336 // are uncorrelated.
337 //
338 HepMatrix ddflct( NHLXPRM, 1 );
339 //
340 // Compute some common things
341 //
342 double omeg = omega();
343 double tand = tanDip();
344 double arcl = arc( fltlen );
345 double dx = cos( arcl );
346 double dy = sin( arcl );
347 double cosd = cosDip();
348 double darc = omeg * d0();
349 //
350 // Go through the parameters
351 //
352 switch ( idirect )
353 {
354 case theta1:
355 ddflct( omegaIndex + 1, 1 ) = omeg * tand;
356 // ddflct(tanDipIndex+1,1) = 1.0/sqr(cosd);
357 ddflct( tanDipIndex + 1, 1 ) = 1.0 / ( cosd * cosd );
358 ddflct( d0Index + 1, 1 ) = ( 1 - dx ) * tand / omeg;
359 ddflct( phi0Index + 1, 1 ) = -dy * tand / ( 1 + darc );
360 // ddflct(z0Index+1,1) = - translen(fltlen) - sqr(tand)*dy/(omeg*(1+darc));
361 ddflct( z0Index + 1, 1 ) =
362 -translen( fltlen ) - ( tand * tand ) * dy / ( omeg * ( 1 + darc ) );
363 break;
364 case theta2:
365 ddflct( omegaIndex + 1, 1 ) = 0;
366 ddflct( tanDipIndex + 1, 1 ) = 0;
367 ddflct( d0Index + 1, 1 ) = -dy / ( cosd * omeg );
368 ddflct( phi0Index + 1, 1 ) = dx / ( cosd * ( 1 + darc ) );
369 ddflct( z0Index + 1, 1 ) = -tand * ( 1 - dx / ( 1 + darc ) ) / ( cosd * omeg );
370 break;
371 }
372
373 return ddflct;
374}

◆ derivDeflect() [2/3]

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

Implements TrkKalDeriv.

◆ derivDeflect() [3/3]

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

Implements TrkKalDeriv.

◆ derivDisplace() [1/3]

HepMatrix HelixTraj::derivDisplace ( double fltlen,
deflectDirection idir ) const
virtual

Implements TrkKalDeriv.

Definition at line 376 of file HelixTraj.cxx.

376 {
377 //
378 // This function computes the column matrix of derrivatives for the change
379 // in parameters for a change in the position of a track at a point along
380 // its flight, holding the momentum and direction constant. The effects for
381 // changes in 2 perpendicular directions 'theta1' = (-sin(l)cos(p),-sin(l)sin(p),cos(l)) and
382 // 'theta2' = (-sin(p),cos(p),0). These are by definition orthogonal and uncorrelated.
383 // these displacements are correlated with the angular change above
384 //
385 HepMatrix ddflct( NHLXPRM, 1 );
386 //
387 // Compute some common things
388 //
389 double omeg = omega();
390 double tand = tanDip();
391 double arcl = arc( fltlen );
392 double dx = cos( arcl );
393 double dy = sin( arcl );
394 double cosd = cosDip();
395 double sind = sinDip();
396 double darc_1 = 1.0 + omeg * d0();
397 //
398 // Go through the parameters
399 //
400 switch ( idirect )
401 {
402 case theta1:
403 ddflct( omegaIndex + 1, 1 ) = 0.0;
404 ddflct( tanDipIndex + 1, 1 ) = 0.0;
405 ddflct( d0Index + 1, 1 ) = -sind * dy;
406 ddflct( phi0Index + 1, 1 ) = sind * dx * omeg / darc_1;
407 ddflct( z0Index + 1, 1 ) = sind * tand * dx / darc_1 + cosd;
408 break;
409 case theta2:
410 ddflct( omegaIndex + 1, 1 ) = 0;
411 ddflct( tanDipIndex + 1, 1 ) = 0;
412 ddflct( d0Index + 1, 1 ) = dx;
413 ddflct( phi0Index + 1, 1 ) = dy * omeg / darc_1;
414 ddflct( z0Index + 1, 1 ) = tand * dy / darc_1;
415 break;
416 }
417
418 return ddflct;
419}

◆ derivDisplace() [2/3]

HepMatrix HelixTraj::derivDisplace ( double fltlen,
deflectDirection idir ) const
virtual

Implements TrkKalDeriv.

◆ derivDisplace() [3/3]

HepMatrix HelixTraj::derivDisplace ( double fltlen,
deflectDirection idir ) const
virtual

Implements TrkKalDeriv.

◆ derivPFract() [1/3]

HepMatrix HelixTraj::derivPFract ( double fltlen) const
virtual

Implements TrkKalDeriv.

Definition at line 421 of file HelixTraj.cxx.

421 {
422 //
423 // This function computes the column matrix of derrivatives for the change
424 // in parameters from a (fractional) change in the track momentum,
425 // holding the direction and position constant. The momentum change can
426 // come from energy loss or bfield inhomogeneities.
427 //
428 // For a helix, dp/P = -domega/omega,
429 // dParam/d(domega/omega) = -omega*dParam/ddomega
430 //
431 HepMatrix dmomfrac( NHLXPRM, 1 );
432 //
433 // Compute some common things
434
435 double omeg = omega();
436 double tand = tanDip();
437 double tranl = translen( fltlen );
438 double arcl = tranl * omeg;
439 double dx = cos( arcl );
440 double dy = sin( arcl );
441 double darc = omeg * d0();
442
443 // Go through the parameters
444 // omega
445 dmomfrac( omegaIndex + 1, 1 ) = -omeg;
446 // tanDip
447 dmomfrac( tanDipIndex + 1, 1 ) = 0.0;
448 // d0
449 dmomfrac( d0Index + 1, 1 ) = -( 1 - dx ) / omeg;
450 // phi0
451 dmomfrac( phi0Index + 1, 1 ) = dy / ( 1 + darc );
452 // z0
453 dmomfrac( z0Index + 1, 1 ) = -tand * ( tranl - dy / ( ( 1 + darc ) * omeg ) );
454 //
455 return dmomfrac;
456}

◆ derivPFract() [2/3]

HepMatrix HelixTraj::derivPFract ( double fltlen) const
virtual

Implements TrkKalDeriv.

◆ derivPFract() [3/3]

HepMatrix HelixTraj::derivPFract ( double fltlen) const
virtual

Implements TrkKalDeriv.

◆ direction() [1/3]

Hep3Vector HelixTraj::direction ( double fltLen) const
virtual

Implements Trajectory.

Definition at line 93 of file HelixTraj.cxx.

93 {
94 // Angle formed by tangent vector after
95 // being rotated 'arclength' around orbit.
96 double alpha = angle( f );
97 // Construct 3-D tangent vector of unit magnitude.
98 double cDip = cosDip();
99 return Hep3Vector( cos( alpha ) * cDip, sin( alpha ) * cDip, cDip * tanDip() );
100}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
double alpha

◆ direction() [2/3]

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

Implements Trajectory.

◆ direction() [3/3]

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

Implements Trajectory.

◆ distTo1stError() [1/3]

double HelixTraj::distTo1stError ( double s,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

Definition at line 110 of file HelixTraj.cxx.

110 {
111 // return sqrt(2.*tol/fabs(omega())*(1.+sqr(tanDip())));
112 return sqrt( 2. * tol / fabs( omega() ) * ( 1. + tanDip() * tanDip() ) );
113}

◆ distTo1stError() [2/3]

virtual double HelixTraj::distTo1stError ( double s,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

◆ distTo1stError() [3/3]

virtual double HelixTraj::distTo1stError ( double s,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

◆ distTo2ndError() [1/3]

double HelixTraj::distTo2ndError ( double s,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

Definition at line 115 of file HelixTraj.cxx.

115 {
116 // return sqrt(1.+sqr(tanDip()))*cbrt(6.*tol/sqr(omega()));
117 return sqrt( 1. + tanDip() * tanDip() ) * cbrt( 6. * tol / omega() * omega() );
118}

◆ distTo2ndError() [2/3]

virtual double HelixTraj::distTo2ndError ( double s,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

◆ distTo2ndError() [3/3]

virtual double HelixTraj::distTo2ndError ( double s,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

◆ getDFInfo() [1/3]

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

Implements TrkDifTraj.

Definition at line 245 of file HelixTraj.cxx.

246 {
247 // Provides difNum version of information for calculation of derivatives.
248 // All arithmetic operations have been replaced by +=, etc. versions
249 // for speed.
250
251 // Create difNumber versions of parameters
252 DifNumber phi0Df( phi0(), phi0Index + 1, NHLXPRM );
253 DifNumber d0Df( d0(), d0Index + 1, NHLXPRM );
254 DifNumber z0Df( z0(), z0Index + 1, NHLXPRM );
255 DifNumber tanDipDf( tanDip(), tanDipIndex + 1, NHLXPRM );
256 DifNumber omegaDf( omega(), omegaIndex + 1, NHLXPRM );
257 phi0Df.setIndepPar( parameters() );
258 d0Df.setIndepPar( parameters() );
259 z0Df.setIndepPar( parameters() );
260 tanDipDf.setIndepPar( parameters() );
261 omegaDf.setIndepPar( parameters() );
262 DifNumber dipDf = atan( tanDipDf );
263
264 static DifNumber cDip;
265 dipDf.cosAndSin( cDip, dir.z );
266 static DifNumber sinPhi0, cosPhi0;
267 phi0Df.cosAndSin( cosPhi0, sinPhi0 );
268
269 bool lref = ( referencePoint().x() != 0. || referencePoint().y() != 0. ||
270 referencePoint().z() != 0. );
271
272 DifNumber alphaDf = cDip;
273 alphaDf *= omegaDf;
274 alphaDf *= flt;
275 alphaDf += phi0Df;
276
277 // This is not the prettiest line imaginable for this operation:
278 alphaDf.mod( -Constants::pi, Constants::pi );
279 // DifNumber sinAlpha, cosAlpha;
280 alphaDf.cosAndSin( dir.x, dir.y );
281
282 // DifNumber x = (sinAlpha - sinPhi0) / omegaDf - d0Df * sinPhi0 + px;
283 // DifNumber y = -(cosAlpha - cosPhi0) / omegaDf + d0Df * cosPhi0 + py;
284
285 pos.x = dir.y;
286 pos.x -= sinPhi0;
287 pos.x /= omegaDf;
288 DifNumber temp = d0Df;
289 temp *= sinPhi0;
290 pos.x -= temp;
291
292 pos.y = cosPhi0;
293 pos.y -= dir.x;
294 pos.y /= omegaDf;
295 temp = d0Df;
296 temp *= cosPhi0;
297 pos.y += temp;
298
299 pos.z = flt;
300 pos.z *= dir.z;
301 pos.z += z0Df;
302
303 if ( lref )
304 {
305 DifNumber px( referencePoint().x() );
306 DifNumber py( referencePoint().y() );
307 DifNumber pz( referencePoint().z() );
308 pos.x += px;
309 pos.y += py;
310 pos.z += pz;
311 }
312
313 delDir.x = -omegaDf;
314 delDir.x *= cDip;
315 delDir.x *= cDip;
316 delDir.x *= dir.y;
317
318 delDir.y = omegaDf;
319 delDir.y *= cDip;
320 delDir.y *= cDip;
321 delDir.y *= dir.x;
322
323 delDir.z = 0.;
324
325 dir.x *= cDip;
326 dir.y *= cDip;
327}
Double_t x[10]
DifNumber & mod(double lo, double hi)
void cosAndSin(DifNumber &c, DifNumber &s) const
double phi0() const

◆ getDFInfo() [2/3]

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

Implements TrkDifTraj.

◆ getDFInfo() [3/3]

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

Implements TrkDifTraj.

◆ getDFInfo2() [1/3]

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

Reimplemented from TrkDifTraj.

Definition at line 173 of file HelixTraj.cxx.

173 {
174 // Provides difNum version of information for calculation of derivatives.
175 // All arithmetic operations have been replaced by +=, etc. versions
176 // for speed.
177
178 // Create difNumber versions of parameters
179 DifNumber phi0Df( phi0(), phi0Index + 1, NHLXPRM );
180 phi0Df.setIndepPar( parameters() );
181 DifNumber d0Df( d0(), d0Index + 1, NHLXPRM );
182 d0Df.setIndepPar( parameters() );
183 DifNumber z0Df( z0(), z0Index + 1, NHLXPRM );
184 z0Df.setIndepPar( parameters() );
185 DifNumber tanDipDf( tanDip(), tanDipIndex + 1, NHLXPRM );
186 tanDipDf.setIndepPar( parameters() );
187 DifNumber omegaDf( omega(), omegaIndex + 1, NHLXPRM );
188 omegaDf.setIndepPar( parameters() );
189
190 DifNumber dipDf = atan( tanDipDf );
191
192 static DifNumber cDip;
193 dipDf.cosAndSin( cDip, dir.z );
194 static DifNumber sinPhi0, cosPhi0;
195 phi0Df.cosAndSin( cosPhi0, sinPhi0 );
196
197 bool lref = ( referencePoint().x() != 0. || referencePoint().y() != 0. ||
198 referencePoint().z() != 0. );
199
200 DifNumber alphaDf = cDip;
201 alphaDf *= omegaDf;
202 alphaDf *= flt;
203 alphaDf += phi0Df;
204
205 // This is not the prettiest line imaginable for this operation:
206 alphaDf.mod( -Constants::pi, Constants::pi );
207 // DifNumber sinAlpha, cosAlpha;
208 alphaDf.cosAndSin( dir.x, dir.y );
209
210 // DifNumber x = (sinAlpha - sinPhi0) / omegaDf - d0Df * sinPhi0 + px;
211 // DifNumber y = -(cosAlpha - cosPhi0) / omegaDf + d0Df * cosPhi0 + py;
212
213 pos.x = dir.y;
214 pos.x -= sinPhi0;
215 pos.x /= omegaDf;
216 DifNumber temp = d0Df;
217 temp *= sinPhi0;
218 pos.x -= temp;
219
220 pos.y = cosPhi0;
221 pos.y -= dir.x;
222 pos.y /= omegaDf;
223 temp = d0Df;
224 temp *= cosPhi0;
225 pos.y += temp;
226
227 pos.z = flt;
228 pos.z *= dir.z;
229 pos.z += z0Df;
230
231 if ( lref )
232 {
233 DifNumber px( referencePoint().x() );
234 DifNumber py( referencePoint().y() );
235 DifNumber pz( referencePoint().z() );
236 pos.x += px;
237 pos.y += py;
238 pos.z += pz;
239 }
240
241 dir.x *= cDip;
242 dir.y *= cDip;
243}

◆ getDFInfo2() [2/3]

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

Reimplemented from TrkDifTraj.

◆ getDFInfo2() [3/3]

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

Reimplemented from TrkDifTraj.

◆ getInfo() [1/6]

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

Implements Trajectory.

Definition at line 120 of file HelixTraj.cxx.

121 {
122 // double ang = angle(fltLen);
123 double cDip = cosDip();
124 double sDip = tanDip() * cDip;
125 double phi00 = parameters()->parameter()[phi0Index]; // Don't normalize
126 double ang = phi00 + cDip * fltLen * omega();
127 double cang = cos( ang );
128 double sang = sin( ang );
129 double sphi0 = sin( phi00 );
130 double cphi0 = cos( phi00 );
131
132 double xt = ( sang - sphi0 ) / omega() - d0() * sphi0 + referencePoint().x();
133 double yt = -( cang - cphi0 ) / omega() + d0() * cphi0 + referencePoint().y();
134 double zt = z0() + fltLen * sDip + referencePoint().z();
135 pos.setX( xt );
136 pos.setY( yt );
137 pos.setZ( zt );
138
139 dir.setX( cang * cDip );
140 dir.setY( sang * cDip );
141 dir.setZ( sDip );
142
143 double delX = -omega() * cDip * cDip * sang;
144 double delY = omega() * cDip * cDip * cang;
145 delDir.setX( delX );
146 delDir.setY( delY );
147 delDir.setZ( 0.0 );
148}

◆ getInfo() [2/6]

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

Implements Trajectory.

◆ getInfo() [3/6]

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

Implements Trajectory.

◆ getInfo() [4/6]

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

Implements Trajectory.

Definition at line 150 of file HelixTraj.cxx.

150 {
151 // double ang = angle(fltLen);
152 double cDip = cosDip();
153 double sDip = tanDip() * cDip;
154 double phi00 = parameters()->parameter()[phi0Index]; // Don't normalize
155 double ang = phi00 + cDip * fltLen * omega();
156 double cang = cos( ang );
157 double sang = sin( ang );
158 double sphi0 = sin( phi00 );
159 double cphi0 = cos( phi00 );
160
161 double xt = ( sang - sphi0 ) / omega() - d0() * sphi0 + referencePoint().x();
162 double yt = -( cang - cphi0 ) / omega() + d0() * cphi0 + referencePoint().y();
163 double zt = z0() + fltLen * sDip + referencePoint().z();
164 pos.setX( xt );
165 pos.setY( yt );
166 pos.setZ( zt );
167
168 dir.setX( cang * cDip );
169 dir.setY( sang * cDip );
170 dir.setZ( sDip );
171}

◆ getInfo() [5/6]

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

Implements Trajectory.

◆ getInfo() [6/6]

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

Implements Trajectory.

◆ invertParams() [1/3]

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

Implements TrkSimpTraj.

Definition at line 544 of file HelixTraj.cxx.

544 {
545 // Inverts parameters and returns true if the parameter inversion
546 // requires a change in sign of elements in the covariance matrix
547
548 for ( unsigned iparam = 0; iparam < NHLXPRM; iparam++ )
549 {
550 switch ( iparam )
551 {
552 case d0Index: // changes sign
553 case omegaIndex: // changes sign
554 case tanDipIndex: // changes sign
555 params->parameter()[iparam] *= -1.0;
556 flags[iparam] = true;
557 break;
558 case phi0Index: // changes by pi, but covariance matrix shouldn't change
559 params->parameter()[iparam] = BesAngle( params->parameter()[iparam] + Constants::pi );
560 flags[iparam] = false;
561 break;
562 case z0Index: // nochange
563 flags[iparam] = false;
564 }
565 }
566 return;
567}

◆ invertParams() [2/3]

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

Implements TrkSimpTraj.

◆ invertParams() [3/3]

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

Implements TrkSimpTraj.

◆ nPar() [1/3]

int HelixTraj::nPar ( ) const
inlinevirtual

Reimplemented from TrkSimpTraj.

Definition at line 70 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkBase/HelixTraj.h.

70{ return NHLXPRM; }

◆ nPar() [2/3]

int HelixTraj::nPar ( ) const
inlinevirtual

Reimplemented from TrkSimpTraj.

Definition at line 70 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/HelixTraj.h.

70{ return NHLXPRM; }

◆ nPar() [3/3]

int HelixTraj::nPar ( ) const
inlinevirtual

Reimplemented from TrkSimpTraj.

Definition at line 70 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/HelixTraj.h.

70{ return NHLXPRM; }

◆ omega() [1/3]

◆ omega() [2/3]

double HelixTraj::omega ( ) const
inline

◆ omega() [3/3]

double HelixTraj::omega ( ) const
inline

◆ operator=() [1/3]

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

Definition at line 62 of file HelixTraj.cxx.

62 {
63 if ( &h != this )
64 {
66 _dtparams = *( h.parameters() );
68 }
69 return *this;
70}
Trajectory & operator=(const Trajectory &)

◆ operator=() [2/3]

HelixTraj & HelixTraj::operator= ( const HelixTraj & )

◆ operator=() [3/3]

HelixTraj & HelixTraj::operator= ( const HelixTraj & )

◆ paramFunction() [1/3]

TranslateParams HelixTraj::paramFunction ( ) const
inlinevirtual

Implements TrkSimpTraj.

Definition at line 64 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkBase/HelixTraj.h.

64{ return HelixTraj::paramFunc; }

◆ paramFunction() [2/3]

TranslateParams HelixTraj::paramFunction ( ) const
inlinevirtual

Implements TrkSimpTraj.

Definition at line 64 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/HelixTraj.h.

64{ return HelixTraj::paramFunc; }

◆ paramFunction() [3/3]

TranslateParams HelixTraj::paramFunction ( ) const
inlinevirtual

Implements TrkSimpTraj.

Definition at line 64 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/HelixTraj.h.

64{ return HelixTraj::paramFunc; }

◆ phi0() [1/3]

double HelixTraj::phi0 ( ) const

Definition at line 467 of file HelixTraj.cxx.

467 {
468 return BesAngle( parameters()->parameter()[phi0Index] ).rad();
469}

Referenced by getDFInfo(), and getDFInfo2().

◆ phi0() [2/3]

double HelixTraj::phi0 ( ) const

◆ phi0() [3/3]

double HelixTraj::phi0 ( ) const

◆ position() [1/3]

HepPoint3D HelixTraj::position ( double fltLen) const
virtual

Implements Trajectory.

Definition at line 78 of file HelixTraj.cxx.

78 {
79 double cDip = cosDip();
80 double sDip = tanDip() * cDip;
81 double phi00 = parameters()->parameter()[phi0Index]; // Don't normalize
82 double ang = phi00 + cDip * f * omega();
83 double cang = cos( ang );
84 double sang = sin( ang );
85 double sphi0 = sin( phi00 );
86 double cphi0 = cos( phi00 );
87
88 return HepPoint3D( ( sang - sphi0 ) / omega() - d0() * sphi0 + referencePoint().x(),
89 -( cang - cphi0 ) / omega() + d0() * cphi0 + referencePoint().y(),
90 z0() + f * sDip + referencePoint().z() );
91}

◆ position() [2/3]

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

Implements Trajectory.

◆ position() [3/3]

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

Implements Trajectory.

◆ print() [1/3]

virtual void HelixTraj::print ( std::ostream & os) const
virtual

Reimplemented from TrkSimpTraj.

◆ print() [2/3]

virtual void HelixTraj::print ( std::ostream & os) const
virtual

Reimplemented from TrkSimpTraj.

◆ print() [3/3]

virtual void HelixTraj::print ( std::ostream & os) const
virtual

Reimplemented from TrkSimpTraj.

◆ printAll() [1/3]

virtual void HelixTraj::printAll ( std::ostream & os) const
virtual

Reimplemented from TrkSimpTraj.

◆ printAll() [2/3]

virtual void HelixTraj::printAll ( std::ostream & os) const
virtual

Reimplemented from TrkSimpTraj.

◆ printAll() [3/3]

virtual void HelixTraj::printAll ( std::ostream & os) const
virtual

Reimplemented from TrkSimpTraj.

◆ tanDip() [1/3]

◆ tanDip() [2/3]

double HelixTraj::tanDip ( ) const
inline

◆ tanDip() [3/3]

double HelixTraj::tanDip ( ) const
inline

◆ visitAccept() [1/3]

void HelixTraj::visitAccept ( TrkVisitor * vis) const
virtual

Implements TrkSimpTraj.

Definition at line 539 of file HelixTraj.cxx.

539 {
540 // Visitor access--just use the Visitor class member function
541 vis->trkVisitHelixTraj( this );
542}
virtual void trkVisitHelixTraj(const HelixTraj *)=0

◆ visitAccept() [2/3]

virtual void HelixTraj::visitAccept ( TrkVisitor * vis) const
virtual

Implements TrkSimpTraj.

◆ visitAccept() [3/3]

virtual void HelixTraj::visitAccept ( TrkVisitor * vis) const
virtual

Implements TrkSimpTraj.

◆ z0() [1/3]

double HelixTraj::z0 ( ) const
inline

◆ z0() [2/3]

double HelixTraj::z0 ( ) const
inline

◆ z0() [3/3]

double HelixTraj::z0 ( ) const
inline

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