GeneralBrokenLines V03-01-03
using EIGEN
Public Member Functions | Private Attributes | List of all members
gbl::GblSimpleHelix Class Reference

Simple helix. More...

#include <GblUtilities.h>

Public Member Functions

 GblSimpleHelix (double aRinv, double aPhi0, double aDca, double aDzds, double aZ0)
 Create simple helix. More...
 
virtual ~GblSimpleHelix ()
 
double getPhi (double aRadius) const
 Get phi (of point on circle) for given radius (to ref. point) More...
 
double getArcLengthR (double aRadius) const
 Get (2D) arc length for given radius (to ref. point) More...
 
double getArcLengthXY (double xPos, double yPos) const
 Get (2D) arc length for given point. More...
 
void moveToXY (double xPos, double yPos, double &newPhi0, double &newDca, double &newZ0) const
 Move to new reference point (X,Y) More...
 
GblHelixPrediction getPrediction (const Eigen::Vector3d &refPos, const Eigen::Vector3d &uDir, const Eigen::Vector3d &vDir) const
 Get prediction. More...
 

Private Attributes

const double rinv
 curvature (1/Radius) More...
 
const double phi0
 azimuth at PCA (point of closest approach to origin in XY plane, defines arc-length S=0) More...
 
const double dca
 distance to origin in XY plane at PCA More...
 
const double dzds
 slope in ZS plane (dZ/dS) More...
 
const double z0
 offset in ZS plane More...
 
const double cosPhi0
 cos(phi0) More...
 
const double sinPhi0
 sin(phi0) More...
 
const double xRelCenter
 X position of circle center / R. More...
 
const double yRelCenter
 Y position of circle center / R. More...
 

Detailed Description

Simple helix.

Circle in XY plane, straight line in ZS.

Definition at line 78 of file GblUtilities.h.

Constructor & Destructor Documentation

◆ GblSimpleHelix()

gbl::GblSimpleHelix::GblSimpleHelix ( double  aRinv,
double  aPhi0,
double  aDca,
double  aDzds,
double  aZ0 
)

Create simple helix.

Helix for constant magnetic field in Z direction.

Parameters
[in]aRinvcurvature (1/R)
[in]aPhi0azimuth at PCA
[in]aDcaXY distance at PCA
[in]aDzdsslope in ZS (tanLambda)
[in]aZ0offset in ZS

Definition at line 170 of file GblUtilities.cpp.

◆ ~GblSimpleHelix()

gbl::GblSimpleHelix::~GblSimpleHelix ( )
virtual

Definition at line 178 of file GblUtilities.cpp.

Member Function Documentation

◆ getArcLengthR()

double gbl::GblSimpleHelix::getArcLengthR ( double  aRadius) const

Get (2D) arc length for given radius (to ref. point)

( |dca| < radius < |rad-2*dca|, from H1/cjfsxy )

Parameters
[in]aRadiusradius

Definition at line 199 of file GblUtilities.cpp.

References dca, and rinv.

Referenced by exampleComposedGeo(), exampleComposedKin(), and GblSimpleHelix_getArcLengthR().

◆ getArcLengthXY()

double gbl::GblSimpleHelix::getArcLengthXY ( double  xPos,
double  yPos 
) const

Get (2D) arc length for given point.

Parameters
[in]xPosX Position
[in]yPosY Position

Definition at line 223 of file GblUtilities.cpp.

References cosPhi0, phi0, rinv, sinPhi0, xRelCenter, and yRelCenter.

Referenced by exampleComposedGeo(), exampleComposedKin(), GblSimpleHelix_getArcLengthXY(), and getPrediction().

◆ getPhi()

double gbl::GblSimpleHelix::getPhi ( double  aRadius) const

Get phi (of point on circle) for given radius (to ref. point)

( |dca| < radius < |rad-2*dca|, from H1/cjfphi, not restricted to -Pi .. +Pi )

Parameters
[in]aRadiusradius

Definition at line 187 of file GblUtilities.cpp.

References dca, phi0, and rinv.

Referenced by exampleComposedGeo(), exampleComposedKin(), and GblSimpleHelix_getPhi().

◆ getPrediction()

GblHelixPrediction gbl::GblSimpleHelix::getPrediction ( const Eigen::Vector3d &  refPos,
const Eigen::Vector3d &  uDir,
const Eigen::Vector3d &  vDir 
) const

◆ moveToXY()

void gbl::GblSimpleHelix::moveToXY ( double  xPos,
double  yPos,
double &  newPhi0,
double &  newDca,
double &  newZ0 
) const

Move to new reference point (X,Y)

Parameters
[in]xPosX Position
[in]yPosY Position
[out]newPhi0new phi0
[out]newDcanew dca
[out]newZ0new z0

Definition at line 246 of file GblUtilities.cpp.

References cosPhi0, dca, dzds, phi0, rinv, sinPhi0, and z0.

Referenced by exampleDc(), exampleSit(), and GblSimpleHelix_moveToXY().

Member Data Documentation

◆ cosPhi0

const double gbl::GblSimpleHelix::cosPhi0
private

cos(phi0)

Definition at line 97 of file GblUtilities.h.

Referenced by getArcLengthXY(), getPrediction(), and moveToXY().

◆ dca

const double gbl::GblSimpleHelix::dca
private

distance to origin in XY plane at PCA

Definition at line 94 of file GblUtilities.h.

Referenced by getArcLengthR(), getPhi(), getPrediction(), and moveToXY().

◆ dzds

const double gbl::GblSimpleHelix::dzds
private

slope in ZS plane (dZ/dS)

Definition at line 95 of file GblUtilities.h.

Referenced by getPrediction(), and moveToXY().

◆ phi0

const double gbl::GblSimpleHelix::phi0
private

azimuth at PCA (point of closest approach to origin in XY plane, defines arc-length S=0)

Definition at line 93 of file GblUtilities.h.

Referenced by getArcLengthXY(), getPhi(), getPrediction(), and moveToXY().

◆ rinv

const double gbl::GblSimpleHelix::rinv
private

curvature (1/Radius)

Definition at line 92 of file GblUtilities.h.

Referenced by getArcLengthR(), getArcLengthXY(), getPhi(), getPrediction(), and moveToXY().

◆ sinPhi0

const double gbl::GblSimpleHelix::sinPhi0
private

sin(phi0)

Definition at line 98 of file GblUtilities.h.

Referenced by getArcLengthXY(), getPrediction(), and moveToXY().

◆ xRelCenter

const double gbl::GblSimpleHelix::xRelCenter
private

X position of circle center / R.

Definition at line 99 of file GblUtilities.h.

Referenced by getArcLengthXY(), and getPrediction().

◆ yRelCenter

const double gbl::GblSimpleHelix::yRelCenter
private

Y position of circle center / R.

Definition at line 100 of file GblUtilities.h.

Referenced by getArcLengthXY(), and getPrediction().

◆ z0

const double gbl::GblSimpleHelix::z0
private

offset in ZS plane

Definition at line 96 of file GblUtilities.h.

Referenced by getPrediction(), and moveToXY().


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