Belle II Software  release-08-01-10
UncertainHelix Class Reference

A general helix class including a covariance matrix. More...

#include <UncertainHelix.h>

Collaboration diagram for UncertainHelix:

Public Member Functions

 UncertainHelix ()
 Default constructor for ROOT compatibility.
 
 UncertainHelix (const double curvature, const double phi0, const double impact, const double tanLambda, const double z0, const HelixCovariance &helixCovariance=HelixUtil::identity(), const double chi2=0.0, std::size_t ndf=0)
 Composes an uncertain perigee circle from the perigee parameters and a 3x3 covariance matrix.
 
 UncertainHelix (const HelixParameters &parameters, const HelixCovariance &helixCovariance=HelixUtil::identity(), const double chi2=0.0, std::size_t ndf=0)
 Constructor taking all stored parameters.
 
 UncertainHelix (const double curvature, const Vector2D &phi0Vec, const double impact, const double tanLambda, const double z0, const HelixCovariance &helixCovariance=HelixUtil::identity(), const double chi2=0.0, std::size_t ndf=0)
 Composes an uncertain perigee circle from the perigee parameters and a 3x3 covariance matrix.
 
 UncertainHelix (const Helix &helix, const HelixCovariance &helixCovariance=HelixUtil::identity(), const double chi2=0.0, std::size_t ndf=0)
 Augments a plain helix with a covariance matrix. Covariance defaults to zero.
 
 UncertainHelix (const UncertainPerigeeCircle &uncertainPerigeeCircle, const UncertainSZLine &uncertainSZLine)
 Augments a plain helix with a covariance matrix. Covariance defaults to zero.
 
const Helixoperator-> () const
 Access to the constant interface of the underlying parameter line Allows the user of this "super" class to use the getters and other methods to get inforamation about the line but disallows mutation of internal state. More...
 
 operator const Helix & () const
 Downcast to the "super" class.
 
const Helixhelix () const
 Getter for the underlying helix.
 
HelixParameters helixParameters () const
 Getter for the perigee parameters in the order defined by EPerigeeParameter.h.
 
UncertainPerigeeCircle uncertainCircleXY () const
 Projects the helix into the xy plain carrying over the relevant parts of the convariance matrix.
 
UncertainSZLine uncertainSZLine () const
 Reduces the helix to an sz line carrying over the relevant parts of the convariance matrix.
 
void setHelixCovariance (const HelixCovariance &helixCovariance)
 Setter for the whole covariance matrix of the perigee parameters.
 
const HelixCovariancehelixCovariance () const
 Getter for the whole covariance matrix of the perigee parameters.
 
double covariance (const EHelixParameter &iRow, const EHelixParameter &iCol) const
 Getter for individual elements of the covariance matrix.
 
double variance (const EHelixParameter &i) const
 Getter for individual diagonal elements of the covariance matrix.
 
double chi2 () const
 Getter for the chi square value of the helix fit.
 
void setChi2 (const double chi2)
 Setter for the chi square value of the helix fit.
 
std::size_t ndf () const
 Getter for the number of degrees of freediom used in the helix fit.
 
void setNDF (std::size_t ndf)
 Setter for the number of degrees of freediom used in the helix fit.
 
void invalidate ()
 Sets all circle parameters to zero and the covariance matrix to something noninformative.
 
void reverse ()
 Flips the orientation of the circle in place.
 
UncertainHelix reversed () const
 Returns a copy of the circle with opposite orientation.
 
void passiveMoveBy (const Vector3D &by)
 Moves the coordinate system by the vector by and calculates the new perigee and its covariance matrix. More...
 
double shiftPeriod (int nPeriods)
 Adjust the arclength measure to start n periods later. More...
 

Static Public Member Functions

static UncertainHelix average (const UncertainHelix &fromHelix, const UncertainHelix &toHelix)
 Construct the averages of the two given helices by properly considering their covariance matrix.
 
static UncertainHelix average (const UncertainPerigeeCircle &fromPerigeeCircle, const PerigeeHelixAmbiguity &fromAmbiguity, const UncertainPerigeeCircle &toPerigeeCircle, const PerigeeHelixAmbiguity &toAmbiguity, const SZParameters &szParameters)
 Construct the average helix including its covariance matrix from two different stereo angle projections. More...
 
static UncertainHelix average (const UncertainHelix &helix, const UncertainPerigeeCircle &perigeeCircle, const PerigeeHelixAmbiguity &ambiguityMatrix)
 Construct the average helix including its covariance matrix incoorporating additional information from a stereo projection. More...
 
static UncertainHelix average (const UncertainPerigeeCircle &fromPerigeeCircle, const PerigeeHelixAmbiguity &fromAmbiguity, const UncertainHelix &toHelix)
 Construct the average helix including its covariance matrix incoorporating additional information from a stereo projection. More...
 

Private Attributes

Helix m_helix
 Memory for the underlying helix.
 
HelixCovariance m_helixCovariance = HelixUtil::identity()
 Memory for the 5x5 covariance matrix of the helix parameters.
 
double m_chi2 = 0.0
 Memory for the chi square value of the fit of this helix.
 
size_t m_ndf = 0.0
 Memory for the number of degrees of freedom of the fit of this helix.
 

Detailed Description

A general helix class including a covariance matrix.

Definition at line 34 of file UncertainHelix.h.

Member Function Documentation

◆ average() [1/3]

static UncertainHelix average ( const UncertainHelix helix,
const UncertainPerigeeCircle perigeeCircle,
const PerigeeHelixAmbiguity ambiguityMatrix 
)
inlinestatic

Construct the average helix including its covariance matrix incoorporating additional information from a stereo projection.

The averaging in the higher dimensional helix parameter space from the lower dimensional projectsions is accomplished by considering the ambiguity matrix of the projection.

Both circle and helix parameters and their covariance matrix are considered to be passed on the same origin. The circle is considered to be fitted in the sz space defined by the given helix.

Parameters
helixSecond perigee circle
perigeeCirclePerigee circle to be incoorporated
ambiguityMatrixAmbiguity matrix of the perigee parameters with respect to the helix parameters

Definition at line 161 of file UncertainHelix.h.

164  {
165  return average(perigeeCircle, ambiguityMatrix, helix);
166  }
static UncertainHelix average(const UncertainHelix &fromHelix, const UncertainHelix &toHelix)
Construct the averages of the two given helices by properly considering their covariance matrix.
const Helix & helix() const
Getter for the underlying helix.

◆ average() [2/3]

UncertainHelix average ( const UncertainPerigeeCircle fromPerigeeCircle,
const PerigeeHelixAmbiguity fromAmbiguity,
const UncertainHelix toHelix 
)
static

Construct the average helix including its covariance matrix incoorporating additional information from a stereo projection.

The averaging in the higher dimensional helix parameter space from the lower dimensional projectsions is accomplished by considering the ambiguity matrix of the projection.

Both circle and helix parameters and their covariance matrix are considered to be passed on the same origin. The circle is considered to be fitted in the sz space defined by the given helix.

Parameters
fromPerigeeCirclePerigee circle to be incoorporated
fromAmbiguityAmbiguity matrix of the perigee parameters with respect to the helix parameters
toHelixSecond perigee circle

Definition at line 43 of file UncertainHelix.cc.

46 {
47  PerigeeParameters fromPar = fromPerigeeCircle.perigeeParameters();
48  PerigeeCovariance fromCov = fromPerigeeCircle.perigeeCovariance();
49 
50  HelixParameters toPar = toHelix.helixParameters();
51  HelixCovariance toCov = toHelix.helixCovariance();
52 
53  HelixParameters avgPar;
54  HelixCovariance avgCov;
55 
56  double chi2 = HelixUtil::average(fromPar, fromCov, fromAmbiguity, toPar, toCov, avgPar, avgCov);
57 
58  // Calculating 5 parameters from 8 input parameters. 3 NDF remaining.
59  size_t ndf = 3;
60 
61  return UncertainHelix(avgPar, avgCov, chi2, ndf);
62 }
A matrix implementation to be used as an interface typ through out the track finder.
Definition: PlainMatrix.h:40
UncertainHelix()
Default constructor for ROOT compatibility.
double chi2() const
Getter for the chi square value of the helix fit.
std::size_t ndf() const
Getter for the number of degrees of freediom used in the helix fit.
PerigeeParameters perigeeParameters() const
Getter for the perigee parameters in the order defined by EPerigeeParameter.h.
const PerigeeCovariance & perigeeCovariance() const
Getter for the whole covariance matrix of the perigee parameters.
static double average(const HelixUtil::ParameterVector &fromPar, const HelixUtil::CovarianceMatrix &fromCov, const HelixUtil::ParameterVector &toPar, const HelixUtil::CovarianceMatrix &toCov, HelixUtil::ParameterVector &avgPar, HelixUtil::CovarianceMatrix &avgCov)
Calculates the weighted average between two helix parameter sets with their respective covariance mat...

◆ average() [3/3]

UncertainHelix average ( const UncertainPerigeeCircle fromPerigeeCircle,
const PerigeeHelixAmbiguity fromAmbiguity,
const UncertainPerigeeCircle toPerigeeCircle,
const PerigeeHelixAmbiguity toAmbiguity,
const SZParameters szParameters 
)
static

Construct the average helix including its covariance matrix from two different stereo angle projections.

The averaging in the higher dimensional helix parameter space from the lower dimensional projections is accomplished by considering the ambiguity matrix of the projections. The average only succeeds when the projections are not parallel two each other which is generally the case for two different super layers of different stereo kind.

Both circle and helix parameters and their covariance matrix are considered to be passed on the same origin.

Parameters
fromPerigeeCircleFirst perigee circle
fromAmbiguityAmbiguity matrix of the first perigee parameters with respect to the helix parameters
toPerigeeCircleSecond perigee circle
toAmbiguityAmbiguity matrix of the second perigee parameters with respect to the helix parameters
szParametersReference sz parameters where the perigee circles have been fitted.

Definition at line 64 of file UncertainHelix.cc.

◆ operator->()

const Helix* operator-> ( ) const
inline

Access to the constant interface of the underlying parameter line Allows the user of this "super" class to use the getters and other methods to get inforamation about the line but disallows mutation of internal state.

This ensures that the parameters are not changed without proper adjustment to the covariance matrix in this class, which can be achieved by the more limited set of methods in this class accessable by normal . method calls

Definition at line 199 of file UncertainHelix.h.

◆ passiveMoveBy()

void passiveMoveBy ( const Vector3D by)
inline

Moves the coordinate system by the vector by and calculates the new perigee and its covariance matrix.

Change is inplace.

Definition at line 315 of file UncertainHelix.h.

◆ shiftPeriod()

double shiftPeriod ( int  nPeriods)
inline

Adjust the arclength measure to start n periods later.

Returns
The arc length needed to travel n periods.

Definition at line 327 of file UncertainHelix.h.


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