Belle II Software  light-2403-persian
UncertainHelix Class Reference

This class represents an ideal helix in perigee parameterization including the covariance matrix of the 5 perigee parameters. More...

#include <UncertainHelix.h>

Inheritance diagram for UncertainHelix:
Collaboration diagram for UncertainHelix:

Public Member Functions

 UncertainHelix ()
 Default constuctor initialising all members to zero.
 
 UncertainHelix (const ROOT::Math::XYZVector &position, const ROOT::Math::XYZVector &momentum, const short int charge, const double bZ, const TMatrixDSym &cartesianCovariance, const double pValue)
 Constructor initializing class with fit result. More...
 
 UncertainHelix (const double &d0, const double &phi0, const double &omega, const double &z0, const double &tanLambda, const TMatrixDSym &covariance, const double pValue)
 Constructor initializing class with perigee parameters. More...
 
TMatrixDSym getCartesianCovariance (const double bZ_tesla=1.5) const
 Getter for the position and momentum covariance matrix. More...
 
double getPValue () const
 Getter for Chi2 Probability of the track fit.
 
const TMatrixDSym & getCovariance () const
 Getter for covariance matrix of perigee parameters in matrix form.
 
void reverse ()
 Reverses the direction of travel of the helix in place. More...
 
double passiveMoveBy (const ROOT::Math::XYZVector &by)
 Moves origin of the coordinate system (passive transformation) by the given vector. More...
 
double passiveMoveBy (const double &byX, const double &byY, const double &byZ)
 Moves origin of the coordinate system (passive transformation) by the given vector. More...
 
void addRelationTo (const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (with caching). More...
 
void addRelationTo (const TObject *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (no caching, can be quite slow). More...
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights). More...
 
template<class TO >
RelationVector< TO > getRelationsTo (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from this object to another store array. More...
 
template<class FROM >
RelationVector< FROM > getRelationsFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from another store array to this object. More...
 
template<class T >
RelationVector< T > getRelationsWith (const std::string &name="", const std::string &namedRelation="") const
 Get the relations between this object and another store array. More...
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation. More...
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation. More...
 
template<class T >
T * getRelated (const std::string &name="", const std::string &namedRelation="") const
 Get the object to or from which this object has a relation. More...
 
template<class TO >
std::pair< TO *, float > getRelatedToWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing to an array. More...
 
template<class FROM >
std::pair< FROM *, float > getRelatedFromWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from an array. More...
 
template<class T >
std::pair< T *, float > getRelatedWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from/to an array. More...
 
virtual std::string getName () const
 Return a short name that describes this object, e.g. More...
 
virtual std::string getInfoHTML () const
 Return a short summary of this object's contents in HTML format. More...
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format. More...
 
std::string getArrayName () const
 Get name of array this object is stored in, or "" if not found.
 
int getArrayIndex () const
 Returns this object's array index (in StoreArray), or -1 if not found.
 
Getters for perigee helix parameters
double getD0 () const
 Getter for d0, which is the signed distance to the perigee in the r-phi plane. More...
 
double getPhi0 () const
 Getter for phi0, which is the azimuth angle of the transverse momentum at the perigee. More...
 
double getCosPhi0 () const
 Getter for the cosine of the azimuth angle of travel direction at the perigee.
 
double getSinPhi0 () const
 Getter for the cosine of the azimuth angle of travel direction at the perigee.
 
double getOmega () const
 Getter for omega, which is a signed curvature measure of the track. More...
 
double getZ0 () const
 Getter for z0, which is the z coordinate of the perigee.
 
double getTanLambda () const
 Getter for tan lambda, which is the z over two dimensional arc length slope of the track.
 
double getCotTheta () const
 Getter for cot theta, which is the z over two dimensional arc length slope of the track. More...
 

Protected Member Functions

void calcArcLength2DAndDrAtXY (const double &x, const double &y, double &arcLength2D, double &dr) const
 Helper method to calculate the signed two dimensional arc length and the signed distance to the circle of a point in the xy projection. More...
 
double calcArcLength2DAtDeltaCylindricalRAndDr (const double &deltaCylindricalR, const double &dr) const
 Helper method to calculate the two dimensional arc length from the perigee to a point at cylindrical radius, which also has the distance dr from the circle in the xy projection. More...
 
TClonesArray * getArrayPointer () const
 Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).
 

Static Protected Member Functions

static double calcASinXDividedByX (const double &x)
 Implementation of the function asin(x) / x which handles small x values smoothly.
 
static double calcATanXDividedByX (const double &x)
 Implementation of the function atan(x) / x which handles small x values smoothly.
 
static double calcDerivativeOfATanXDividedByX (const double &x)
 Implementation of the function d / dx (atan(x) / x) which handles small x values smoothly.
 

Private Member Functions

 ClassDef (UncertainHelix, 2)
 represents an ideal helix in perigee parameterization including covariance matrix
 
void setCartesian (const ROOT::Math::XYZVector &position, const ROOT::Math::XYZVector &momentum, const short int charge, const double bZ)
 Cartesian to Perigee conversion. More...
 

Private Attributes

TMatrixDSym m_covariance
 5x5 covariance of the perigee parameters.
 
Double32_t m_pValue
 Chi2 Probability of the fit.
 
Double32_t m_d0
 Memory for the signed distance to the perigee. More...
 
Double32_t m_phi0
 Memory for the azimuth angle between the transverse momentum and the x axis, which is in [-pi, pi].
 
Double32_t m_omega
 Memory for the curvature of the signed curvature.
 
Double32_t m_z0
 Memory for the z coordinate of the perigee.
 
Double32_t m_tanLambda
 Memory for the slope of the track in the z coordinate over the two dimensional arc length (dz/ds)
 
DataStore::StoreEntrym_cacheDataStoreEntry
 Cache of the data store entry to which this object belongs.
 
int m_cacheArrayIndex
 Cache of the index in the TClonesArray to which this object belongs.
 

Getters for cartesian parameters of the perigee

double getPerigeeX () const
 Calculates the x coordinate of the perigee point.
 
double getPerigeeY () const
 Calculates the y coordinate of the perigee point.
 
double getPerigeeZ () const
 Calculates the z coordinate of the perigee point.
 
ROOT::Math::XYZVector getPerigee () const
 Getter for the perigee position.
 
double getMomentumX (const double bZ) const
 Calculates the x momentum of the particle at the perigee point. More...
 
double getMomentumY (const double bZ) const
 Calculates the y momentum of the particle at the perigee point. More...
 
double getMomentumZ (const double bZ) const
 Calculates the z momentum of the particle at the perigee point. More...
 
ROOT::Math::XYZVector getMomentum (const double bZ) const
 Getter for vector of momentum at the perigee position. More...
 
ROOT::Math::XYZVector getDirection () const
 Getter for unit vector of momentum at the perigee position. More...
 
double getTransverseMomentum (const double bZ) const
 Getter for the absolute value of the transverse momentum at the perigee. More...
 
double getKappa (const double bZ) const
 Getter for kappa, which is charge / transverse momentum or equivalently omega * alpha.
 
short getChargeSign () const
 Return track charge sign (1, 0 or -1).
 
static double getAlpha (const double bZ)
 Calculates the alpha value for a given magnetic field in Tesla.
 

Simple extrapolations of the ideal helix

double getArcLength2DAtCylindricalR (const double &cylindricalR) const
 Calculates the transverse travel distance at the point the helix first reaches the given cylindrical radius. More...
 
double getArcLength2DAtXY (const double &x, const double &y) const
 Calculates the two dimensional arc length at which the circle in the xy projection is closest to the point. More...
 
double getArcLength2DAtNormalPlane (const double &x, const double &y, const double &nX, const double &nY) const
 Calculates the arc length to reach a plane parallel to the z axes. More...
 
ROOT::Math::XYZVector getPositionAtArcLength2D (const double &arcLength2D) const
 Calculates the position on the helix at the given two dimensional arc length. More...
 
ROOT::Math::XYZVector getTangentialAtArcLength2D (const double &arcLength2D) const
 Calculates the tangential vector to the helix curve at the given two dimensional arc length. More...
 
ROOT::Math::XYZVector getUnitTangentialAtArcLength2D (const double &arcLength2D) const
 Calculates the unit tangential vector to the helix curve at the given two dimensional arc length. More...
 
ROOT::Math::XYZVector getMomentumAtArcLength2D (const double &arcLength2D, const double &bz) const
 Calculates the momentum vector at the given two dimensional arc length. More...
 
TMatrixD calcPassiveMoveByJacobian (const ROOT::Math::XYZVector &by, const double expandBelowChi=M_PI/8) const
 Calculate the 5x5 jacobian matrix for the transport of the helix parameters, when moving the origin of the coordinate system to a new location. More...
 
void calcPassiveMoveByJacobian (const double &byX, const double &byY, TMatrixD &jacobian, const double expandBelowChi=M_PI/8) const
 Calculate the jacobian matrix for the transport of the helix parameters, when moving the origin of the coordinate system to a new location. More...
 
double calcArcLength2DFromSecantLength (const double &secantLength2D) const
 Helper function to calculate the two dimensional arc length from the length of a secant. More...
 
double calcSecantLengthToArcLength2DFactor (const double &secantLength2D) const
 Helper function to calculate the factor between the dimensional secant length and the two dimensional arc length as seen in xy projection of the helix.
 
static double reversePhi (const double &phi)
 Reverses an azimuthal angle to the opposite direction. More...
 

Detailed Description

This class represents an ideal helix in perigee parameterization including the covariance matrix of the 5 perigee parameters.

The used perigee parameters are:

  1. $ d_0 $ - the signed distance from the origin to the perigee. The sign is positive (negative), if the angle from the xy perigee position vector to the transverse momentum vector is +pi/2 (-pi/2). $d_0$ has the same sign as getPerigee().Cross(getMomentum()).Z().
  2. $ \phi_0 $ - the angle in the xy projection between the transverse momentum and the x axis, which is in [-pi, pi]
  3. $ \omega $ - the signed curvature of the track where the sign is given by the charge of the particle
  4. $ z_0 $ - z coordinate of the perigee
  5. $ \tan \lambda $ - the slope of the track in the sz plane (dz/ds)

in that exact order.

It may also store a p-value obtained from the fit of the helix.

Definition at line 36 of file UncertainHelix.h.

Constructor & Destructor Documentation

◆ UncertainHelix() [1/2]

UncertainHelix ( const ROOT::Math::XYZVector &  position,
const ROOT::Math::XYZVector &  momentum,
const short int  charge,
const double  bZ,
const TMatrixDSym &  cartesianCovariance,
const double  pValue 
)

Constructor initializing class with fit result.

The given position, momentum and their covariance matrix are extrapolated to the perigee assuming a homogeneous magnetic field in the z direction.

Parameters
positionPosition of the track at the perigee.
momentumMomentum of the track at the perigee.
chargeCharge of the particle.
bZMagnetic field to be used for the calculation of the curvature;
cartesianCovariance6x6 Covariance matrix for position and momentum of the track at the perigee.
pValuep-value of the fit. It is assumed, that the B-field is parallel to the z-Axis.

Definition at line 24 of file UncertainHelix.cc.

29  :
30  Helix(ROOT::Math::XYZVector(0.0, 0.0, position.Z()), momentum, charge, bZ),
31  m_covariance(cartesianCovariance), // Initialize the covariance matrix to the 6x6 covariance and reduce it afterwards
32  m_pValue(pValue)
33 {
34  // Maybe push these out of this function:
35  // Indices of the cartesian coordinates
36  const int iX = 0;
37  const int iY = 1;
38  const int iZ = 2;
39  const int iPx = 3;
40  const int iPy = 4;
41  const int iPz = 5;
42 
43  // We initialised the m_covariance to the cartesian covariance and
44  // reduce it now to the real 5x5 matrix that should be there.
45 
46  // 1. Rotate to a system where phi0 = 0
47  TMatrixD jacobianRot(6, 6);
48  jacobianRot.Zero();
49 
50  const double px = momentum.X();
51  const double py = momentum.Y();
52  const double pt = hypot(px, py);
53  const double cosPhi0 = px / pt;
54  const double sinPhi0 = py / pt;
55 
56  // Passive rotation matrix by phi0:
57  jacobianRot(iX, iX) = cosPhi0;
58  jacobianRot(iX, iY) = sinPhi0;
59  jacobianRot(iY, iX) = -sinPhi0;
60  jacobianRot(iY, iY) = cosPhi0;
61  jacobianRot(iZ, iZ) = 1.0;
62 
63  jacobianRot(iPx, iPx) = cosPhi0;
64  jacobianRot(iPx, iPy) = sinPhi0;
65  jacobianRot(iPy, iPx) = -sinPhi0;
66  jacobianRot(iPy, iPy) = cosPhi0;
67  jacobianRot(iPz, iPz) = 1.0;
68 
69  m_covariance.Similarity(jacobianRot);
70 
71  // 2. Translate to perigee parameters on the position
72  const double pz = momentum.Z();
73  const double invPt = 1 / pt;
74  const double invPtSquared = invPt * invPt;
75  const double alpha = getAlpha(bZ);
76 
77  TMatrixD jacobianToHelixParameters(5, 6);
78  jacobianToHelixParameters.Zero();
79 
80  jacobianToHelixParameters(iD0, iY) = -1;
81  jacobianToHelixParameters(iPhi0, iX) = charge * invPt / alpha;
82  jacobianToHelixParameters(iPhi0, iPy) = invPt;
83  jacobianToHelixParameters(iOmega, iPx) = -charge * invPtSquared / alpha;
84  jacobianToHelixParameters(iTanLambda, iPx) = - pz * invPtSquared;
85  jacobianToHelixParameters(iTanLambda, iPz) = invPt;
86  jacobianToHelixParameters(iZ0, iX) = - pz * invPt;
87  jacobianToHelixParameters(iZ0, iZ) = 1;
88  m_covariance.Similarity(jacobianToHelixParameters);
89 
90  // The covariance m_covariance is now the correct 5x5 covariance matrix.
91  assert(m_covariance.GetNrows() == 5);
92 
93  // 3. Extrapolate to the origin.
94  /* const double arcLength2D = */ passiveMoveBy(-position.X(), -position.Y(), 0.0);
95 }
static double getAlpha(const double bZ)
Calculates the alpha value for a given magnetic field in Tesla.
Definition: Helix.cc:109
Helix()
Constructor initializing all perigee parameters to zero.
Definition: Helix.cc:24
Double32_t m_pValue
Chi2 Probability of the fit.
double passiveMoveBy(const ROOT::Math::XYZVector &by)
Moves origin of the coordinate system (passive transformation) by the given vector.
TMatrixDSym m_covariance
5x5 covariance of the perigee parameters.
double charge(int pdgCode)
Returns electric charge of a particle with given pdg code.
Definition: EvtPDLUtil.cc:44

◆ UncertainHelix() [2/2]

UncertainHelix ( const double &  d0,
const double &  phi0,
const double &  omega,
const double &  z0,
const double &  tanLambda,
const TMatrixDSym &  covariance,
const double  pValue 
)

Constructor initializing class with perigee parameters.

Parameters
d0The signed distance from the origin to the perigee. The sign is positive (negative), if the angle from the xy perigee position vector to the transverse momentum vector is +pi/2 (-pi/2). d0 has the same sign as getPosition().Cross(getMomentum()).Z().
phi0The angle between the transverse momentum and the x axis and in [-pi, pi]
omegaThe signed curvature of the track where the sign is given by the charge of the particle
z0The z coordinate of the perigee.
tanLambdaThe slope of the track in the sz plane (dz/ds)
covariance5x5 Covariance matrix for the five helix parameters. Indices correspond to the order d0, phi0, omega, z0, tanLambda.
pValuep-value of the Helix fit

Definition at line 98 of file UncertainHelix.cc.

Member Function Documentation

◆ addRelationTo() [1/2]

void addRelationTo ( const RelationsInterface< BASE > *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (with caching).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 142 of file RelationsObject.h.

◆ addRelationTo() [2/2]

void addRelationTo ( const TObject *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (no caching, can be quite slow).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 155 of file RelationsObject.h.

◆ calcArcLength2DAndDrAtXY()

void calcArcLength2DAndDrAtXY ( const double &  x,
const double &  y,
double &  arcLength2D,
double &  dr 
) const
protectedinherited

Helper method to calculate the signed two dimensional arc length and the signed distance to the circle of a point in the xy projection.

This function is an implementation detail that prevents some code duplication.

Parameters
xX coordinate of the point to which to extrapolate
yY coordinate of the point to which to extrapolate
[out]arcLength2DThe two dimensional arc length from the perigee at which the closest approach is reached
[out]drSigned distance of the point to circle in the xy projection.

Definition at line 545 of file Helix.cc.

◆ calcArcLength2DAtDeltaCylindricalRAndDr()

double calcArcLength2DAtDeltaCylindricalRAndDr ( const double &  deltaCylindricalR,
const double &  dr 
) const
protectedinherited

Helper method to calculate the two dimensional arc length from the perigee to a point at cylindrical radius, which also has the distance dr from the circle in the xy projection.

This function is an implementation detail that prevents some code duplication.

Parameters
deltaCylindricalRThe absolute distance of the point in question to the perigee in the xy projection
drSigned distance of the point to circle in the xy projection.
Returns
The absolute two dimensional arc length from the perigee to the point.

Definition at line 581 of file Helix.cc.

◆ calcArcLength2DFromSecantLength()

double calcArcLength2DFromSecantLength ( const double &  secantLength2D) const
inherited

Helper function to calculate the two dimensional arc length from the length of a secant.

Translates the direct length between two point on the circle in the xy projection to the two dimensional arc length on the circle Behaves smoothly in the limit of vanishing curvature.

Definition at line 426 of file Helix.cc.

◆ calcPassiveMoveByJacobian() [1/2]

void calcPassiveMoveByJacobian ( const double &  byX,
const double &  byY,
TMatrixD &  jacobian,
const double  expandBelowChi = M_PI / 8 
) const
inherited

Calculate the jacobian matrix for the transport of the helix parameters, when moving the origin of the coordinate system to a new location.

Does not update the helix parameters in any way.

The jacobian matrix is written into the output parameter 'jacobian'. If output parameter is a 5x5 matrix only the derivatives of the 5 helix parameters are written If output parameter is a 6x6 matrix the derivatives of the 5 helix parameters and derivates of the two dimensional arc length are written. The derivatives of the arcLength2D are in the 6th row of the matrix.

Parameters
byXX displacement by which the origin of the coordinate system should be moved.
byYY displacement by which the origin of the coordinate system should be moved.
[out]jacobianThe jacobian matrix containing the derivatives of the five helix parameters after the move relative the orignal parameters.
expandBelowChiControl parameter below, which absolute value of chi an expansion of divergent terms shall be used. This parameter exists for testing the consistency of the expansion with the closed form. In other applications the parameter should remain at its default value.

Definition at line 309 of file Helix.cc.

◆ calcPassiveMoveByJacobian() [2/2]

TMatrixD calcPassiveMoveByJacobian ( const ROOT::Math::XYZVector &  by,
const double  expandBelowChi = M_PI / 8 
) const
inherited

Calculate the 5x5 jacobian matrix for the transport of the helix parameters, when moving the origin of the coordinate system to a new location.

Does not update the helix parameters in any way.

Parameters
byVector by which the origin of the coordinate system should be moved.
expandBelowChiControl parameter below, which absolute value of chi an expansion of divergent terms shall be used. This parameter exists for testing the consistency of the expansion with the closed form. In other applications the parameter should remain at its default value.
Returns
The jacobian matrix containing the derivatives of the five helix parameters after the move relative the orignal parameters.

Definition at line 301 of file Helix.cc.

◆ copyRelations()

void copyRelations ( const RelationsInterface< BASE > *  sourceObj)
inlineinherited

Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).

Useful if you want to make a complete copy of a StoreArray object to make modifications to it, but retain all information on linked objects.

Note: this only works if sourceObj inherits from the same base (e.g. RelationsObject), and only for related objects that also inherit from the same base.

Definition at line 170 of file RelationsObject.h.

◆ getArcLength2DAtCylindricalR()

double getArcLength2DAtCylindricalR ( const double &  cylindricalR) const
inherited

Calculates the transverse travel distance at the point the helix first reaches the given cylindrical radius.

Gives the two dimensional arc length in the forward direction that is traversed until a certain cylindrical radius is reached. Returns NAN, if the cylindrical radius can not be reached, either because it is to far outside or inside of the perigee.

Forward the result to getPositionAtArcLength2D() or getMomentumAtArcLength2D() in order to extrapolate to the cylinder detector boundaries.

The result always has a positive sign. Hence it refers to the forward direction. Adding a minus sign yields the point at the same cylindrical radius but in the backward direction.

Parameters
cylindricalRThe cylinder radius to extrapolate to.
Returns
The two dimensional arc length traversed to reach the cylindrical radius. NAN if it can not be reached.

Definition at line 128 of file Helix.cc.

◆ getArcLength2DAtNormalPlane()

double getArcLength2DAtNormalPlane ( const double &  x,
const double &  y,
const double &  nX,
const double &  nY 
) const
inherited

Calculates the arc length to reach a plane parallel to the z axes.

If there is no intersection with the plane NAN is returned

Parameters
xX coordinate of the support point of the plane
yY coordinate of the support point of the plane
nXX coordinate of the normal vector of the plane
nYY coordinate of the normal vector of the plane
Returns
Shortest two dimensional arc length to the plane

Definition at line 149 of file Helix.cc.

◆ getArcLength2DAtXY()

double getArcLength2DAtXY ( const double &  x,
const double &  y 
) const
inherited

Calculates the two dimensional arc length at which the circle in the xy projection is closest to the point.

This calculates the dimensional arc length to the closest approach in xy projection. Hence, it only optimizes the distance in x and y. This is sufficent to extrapolate to an axial wire. For stereo wires this is not optimal, since the distance in the z direction also plays a role.

Parameters
xX coordinate of the point to which to extrapolate
yY coordinate of the point to which to extrapolate
Returns
The two dimensional arc length from the perigee at which the closest approach is reached

Definition at line 141 of file Helix.cc.

◆ getCartesianCovariance()

TMatrixDSym getCartesianCovariance ( const double  bZ_tesla = 1.5) const

Getter for the position and momentum covariance matrix.

Note
Because the position and momentum covariance matrix is regenerated from a 5x5 perigee parameter covariance matrix there is necessarily a missing rank in the resulting matrix. The rank has to be filled by a convention essentially expressing, which points around the perigee are considered to be at s = 0. For backwards compatability with the original Belle experiment we apply the convention used there. See the Belle II note for more details.
Parameters
bZ_teslaMagnetic field to be used for the calculation from the curvature;
  1. Rotate to the right phi0

Definition at line 113 of file UncertainHelix.cc.

◆ getCotTheta()

double getCotTheta ( ) const
inlineinherited

Getter for cot theta, which is the z over two dimensional arc length slope of the track.

Synomym to tan lambda.

Definition at line 396 of file Helix.h.

◆ getD0()

double getD0 ( ) const
inlineinherited

Getter for d0, which is the signed distance to the perigee in the r-phi plane.

The signed distance from the origin to the perigee. The sign is positive (negative), if the angle from the xy perigee position vector to the transverse momentum vector is +pi/2 (-pi/2). d0 has the same sign as getPerigee().Cross(getMomentum()).Z().

Definition at line 372 of file Helix.h.

◆ getDirection()

ROOT::Math::XYZVector getDirection ( ) const
inherited

Getter for unit vector of momentum at the perigee position.

This is mainly useful cases where curvature is zero (pT is infinite)

Definition at line 94 of file Helix.cc.

◆ getInfo()

std::string getInfo ( ) const
inlineinherited

Return a short summary of this object's contents in raw text format.

Returns the contents of getInfoHTML() while translating line-breaks etc.

Note
: You don't need to implement this function (it's not virtual), getInfoHTML() is enough.

Definition at line 370 of file RelationsObject.h.

◆ getInfoHTML()

virtual std::string getInfoHTML ( ) const
inlinevirtualinherited

Return a short summary of this object's contents in HTML format.

Reimplement this in your own class to provide useful output for display or debugging purposes. For example, you might do something like:

std::stringstream out;
out << "<b>PDG</b>: " << m_pdg << "<br>";
out << "<b>Covariance Matrix</b>: " << HTML::getString(getCovariance5()) << "<br>";
return out.str();
std::string getString(const TMatrixFBase &matrix, int precision=2, bool color=true)
get HTML table representing a matrix.
Definition: HTML.cc:24
See also
Particle::getInfoHTML() for a more complex example.
HTML for some utility functions.
Use getInfo() to get a raw text version of this output.

Reimplemented in TRGSummary, TrackFitResult, Track, SoftwareTriggerResult, PIDLikelihood, MCParticle, Cluster, and Particle.

Definition at line 362 of file RelationsObject.h.

◆ getMomentum()

ROOT::Math::XYZVector getMomentum ( const double  bZ) const
inherited

Getter for vector of momentum at the perigee position.

As we calculate recalculate the momentum from a geometric helix, we need an estimate of the magnetic field along the z-axis to give back the momentum.

Parameters
bZMagnetic field at the perigee.

Definition at line 89 of file Helix.cc.

◆ getMomentumAtArcLength2D()

ROOT::Math::XYZVector getMomentumAtArcLength2D ( const double &  arcLength2D,
const double &  bz 
) const
inherited

Calculates the momentum vector at the given two dimensional arc length.

Parameters
arcLength2DTwo dimensional arc length to be traversed.
bzMagnetic field strength in the z direction.

Definition at line 270 of file Helix.cc.

◆ getMomentumX()

double getMomentumX ( const double  bZ) const
inherited

Calculates the x momentum of the particle at the perigee point.

Parameters
bZZ component of the magnetic field in Tesla

Definition at line 74 of file Helix.cc.

◆ getMomentumY()

double getMomentumY ( const double  bZ) const
inherited

Calculates the y momentum of the particle at the perigee point.

Parameters
bZZ component of the magnetic field in Tesla

Definition at line 79 of file Helix.cc.

◆ getMomentumZ()

double getMomentumZ ( const double  bZ) const
inherited

Calculates the z momentum of the particle at the perigee point.

Parameters
bZZ component of the magnetic field in Tesla

Definition at line 84 of file Helix.cc.

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

Return a short name that describes this object, e.g.

pi+ for an MCParticle.

Reimplemented in MCParticle, and Particle.

Definition at line 344 of file RelationsObject.h.

◆ getOmega()

double getOmega ( ) const
inlineinherited

Getter for omega, which is a signed curvature measure of the track.

The sign is equivalent to the charge of the particle.

Definition at line 387 of file Helix.h.

◆ getPhi0()

double getPhi0 ( ) const
inlineinherited

Getter for phi0, which is the azimuth angle of the transverse momentum at the perigee.

getMomentum().Phi() == getPhi0() holds.

Definition at line 378 of file Helix.h.

◆ getPositionAtArcLength2D()

ROOT::Math::XYZVector getPositionAtArcLength2D ( const double &  arcLength2D) const
inherited

Calculates the position on the helix at the given two dimensional arc length.

Parameters
arcLength2DTwo dimensional arc length to be traversed.

Definition at line 201 of file Helix.cc.

◆ getRelated()

T* getRelated ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to or from which this object has a relation.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 278 of file RelationsObject.h.

◆ getRelatedFrom()

FROM* getRelatedFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object from which this object has a relation.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 263 of file RelationsObject.h.

◆ getRelatedFromWithWeight()

std::pair<FROM*, float> getRelatedFromWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from an array.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 314 of file RelationsObject.h.

◆ getRelatedTo()

TO* getRelatedTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to which this object has a relation.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 248 of file RelationsObject.h.

◆ getRelatedToWithWeight()

std::pair<TO*, float> getRelatedToWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing to an array.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 297 of file RelationsObject.h.

◆ getRelatedWithWeight()

std::pair<T*, float> getRelatedWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from/to an array.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 331 of file RelationsObject.h.

◆ getRelationsFrom()

RelationVector<FROM> getRelationsFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from another store array to this object.

Template Parameters
FROMThe class of objects from which the relations point.
Parameters
nameThe name of the store array from which the relations point. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 212 of file RelationsObject.h.

◆ getRelationsTo()

RelationVector<TO> getRelationsTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from this object to another store array.

Template Parameters
TOThe class of objects to which the relations point.
Parameters
nameThe name of the store array to which the relations point. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 197 of file RelationsObject.h.

◆ getRelationsWith()

RelationVector<T> getRelationsWith ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations between this object and another store array.

Relations in both directions are returned.

Template Parameters
TThe class of objects to or from which the relations point.
Parameters
nameThe name of the store array to or from which the relations point. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 230 of file RelationsObject.h.

◆ getTangentialAtArcLength2D()

ROOT::Math::XYZVector getTangentialAtArcLength2D ( const double &  arcLength2D) const
inherited

Calculates the tangential vector to the helix curve at the given two dimensional arc length.

The tangential vector is the derivative of the position with respect to the two dimensional arc length It is normalised such that the cylindrical radius of the result is 1

getTangentialAtArcLength2D(arcLength2D).Perp() == 1 holds.

Parameters
arcLength2DTwo dimensional arc length to be traversed.
Returns
Tangential vector normalised to unit transverse component / cylindrical radius.

Definition at line 245 of file Helix.cc.

◆ getTransverseMomentum()

double getTransverseMomentum ( const double  bZ) const
inherited

Getter for the absolute value of the transverse momentum at the perigee.

Parameters
bZMagnetic field at the perigee

Definition at line 99 of file Helix.cc.

◆ getUnitTangentialAtArcLength2D()

ROOT::Math::XYZVector getUnitTangentialAtArcLength2D ( const double &  arcLength2D) const
inherited

Calculates the unit tangential vector to the helix curve at the given two dimensional arc length.

Parameters
arcLength2DTwo dimensional arc length to be traversed.

Definition at line 261 of file Helix.cc.

◆ passiveMoveBy() [1/2]

double passiveMoveBy ( const double &  byX,
const double &  byY,
const double &  byZ 
)

Moves origin of the coordinate system (passive transformation) by the given vector.

Updates the helix inplace.

Parameters
byXX displacement by which the origin of the coordinate system should be moved.
byYY displacement by which the origin of the coordinate system should be moved.
byZZ displacement by which the origin of the coordinate system should be moved.
Returns
The double value is the two dimensional arc length, which has the be traversed from the old perigee to the new.

Definition at line 198 of file UncertainHelix.cc.

◆ passiveMoveBy() [2/2]

double passiveMoveBy ( const ROOT::Math::XYZVector &  by)
inline

Moves origin of the coordinate system (passive transformation) by the given vector.

Updates the helix inplace.

Parameters
byVector by which the origin of the coordinate system should be moved.
Returns
The double value is the two dimensional arc length, which has the be traversed from the old perigee to the new.

Definition at line 117 of file UncertainHelix.h.

118  { return passiveMoveBy(by.X(), by.Y(), by.Z()); }

◆ reverse()

void reverse ( )

Reverses the direction of travel of the helix in place.

The same points that are located on the helix stay are the same after the transformation, but have the opposite two dimensional arc length associated to them. The momentum at each point is reversed. The charge sign is changed to its opposite by this transformation.

Definition at line 182 of file UncertainHelix.cc.

◆ reversePhi()

double reversePhi ( const double &  phi)
staticinherited

Reverses an azimuthal angle to the opposite direction.

Parameters
phiA angle in [-pi, pi]
Returns
The angle for the opposite direction in [-pi, pi]

Definition at line 421 of file Helix.cc.

◆ setCartesian()

void setCartesian ( const ROOT::Math::XYZVector &  position,
const ROOT::Math::XYZVector &  momentum,
const short int  charge,
const double  bZ 
)
privateinherited

Cartesian to Perigee conversion.


Definition at line 588 of file Helix.cc.

Member Data Documentation

◆ m_d0

Double32_t m_d0
privateinherited

Memory for the signed distance to the perigee.

The sign is the same as of the z component of getPerigee().Cross(getMomentum()).

Definition at line 414 of file Helix.h.


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