Belle II Software development
UncertainSZLine Class Reference

A line in sz where s is the transverse travel distance as seen in the xy projection with uncertainties in the slope and intercept of the line. More...

#include <UncertainSZLine.h>

Public Member Functions

 UncertainSZLine ()
 Default constructor for ROOT compatibility.
 
 UncertainSZLine (const double tanLambda, const double z0, const SZCovariance &szCovariance=SZUtil::identity(), const double chi2=0.0, const size_t ndf=0)
 Composes an uncertain sz line from the perigee parameters and a 2x2 covariance matrix.
 
 UncertainSZLine (const SZParameters szParameters, const SZCovariance &szCovariance=SZUtil::identity(), const double chi2=0.0, const size_t ndf=0)
 Composes an uncertain sz line from the perigee parameters and a 2x2 covariance matrix.
 
 UncertainSZLine (const SZLine &szLine, const SZCovariance &szCovariance=SZUtil::identity(), const double chi2=0.0, const size_t ndf=0)
 Augments a plain two dimensional line with a covariance matrix.
 
const SZLineoperator-> () 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 information about the line but disallows mutation of internal state.
 
 operator const SZLine & () const
 Downcast to the "super" class.
 
const SZLineszLine () const
 Getter for the underlying sz line.
 
SZParameters szParameters () const
 Getter for the sz parameters in the order defined by ESZParameter.h.
 
void setSZCovariance (const SZCovariance &szCovariance)
 Setter for the whole covariance matrix of the sz line parameters.
 
const SZCovarianceszCovariance () const
 Getter for the whole covariance matrix of the sz line parameters.
 
double covariance (const ESZParameter &iRow, const ESZParameter &iCol) const
 Getter for individual elements of the covariance matrix.
 
double variance (const ESZParameter &i) const
 Getter for individual diagonal elements of the covariance matrix.
 
double chi2 () const
 Getter for the chi square value of the line fit.
 
void setChi2 (const double chi2)
 Setter for the chi square value of the line fit.
 
std::size_t ndf () const
 Getter for the number of degrees of freediom used in the line fit.
 
void setNDF (std::size_t ndf)
 Setter for the number of degrees of freediom used in the line fit.
 
void invalidate ()
 Sets all line parameters to zero including the covariance matrix.
 
void reverse ()
 Reverses the direction of flight represented by this sz line.
 
UncertainSZLine reversed () const
 Returns a copy of the line corresponding to the reverse direction of travel.
 
void passiveMoveBy (const Vector2D &bySZ)
 Moves the coordinate system by the vector by and calculates the new sz line and its covariance matrix.
 
SZCovariance passiveMovedCovarianceBy (const Vector2D &bySZ) const
 Calculates the jacobian matrix that is needed for the translation of the parameter covariance for a passive move of the coordinate system.
 

Private Attributes

SZLine m_szLine
 Memory for the underlying line.
 
SZCovariance m_szCovariance = SZUtil::identity()
 Memory for the 2x2 covariance matrix of sz slope (aka tan lambda) and z0.
 
double m_chi2 = 0.0
 Memory for the chi square value of the fit of this line.
 
size_t m_ndf = 0
 Memory for the number of degrees of freedim of the fit of this line.
 

Detailed Description

A line in sz where s is the transverse travel distance as seen in the xy projection with uncertainties in the slope and intercept of the line.

Definition at line 28 of file UncertainSZLine.h.

Constructor & Destructor Documentation

◆ UncertainSZLine() [1/4]

UncertainSZLine ( )
inline

Default constructor for ROOT compatibility.

Definition at line 32 of file UncertainSZLine.h.

33 {
34 }

◆ UncertainSZLine() [2/4]

UncertainSZLine ( const double  tanLambda,
const double  z0,
const SZCovariance szCovariance = SZUtil::identity(),
const double  chi2 = 0.0,
const size_t  ndf = 0 
)
inline

Composes an uncertain sz line from the perigee parameters and a 2x2 covariance matrix.

Covariance matrix defaults to a zero matrix.

Definition at line 38 of file UncertainSZLine.h.

43 : m_szLine(tanLambda, z0)
45 , m_chi2(chi2)
46 , m_ndf(ndf)
47 {
48 }
SZCovariance m_szCovariance
Memory for the 2x2 covariance matrix of sz slope (aka tan lambda) and z0.
double m_chi2
Memory for the chi square value of the fit of this line.
const SZCovariance & szCovariance() const
Getter for the whole covariance matrix of the sz line parameters.
double chi2() const
Getter for the chi square value of the line fit.
size_t m_ndf
Memory for the number of degrees of freedim of the fit of this line.
SZLine m_szLine
Memory for the underlying line.
std::size_t ndf() const
Getter for the number of degrees of freediom used in the line fit.

◆ UncertainSZLine() [3/4]

UncertainSZLine ( const SZParameters  szParameters,
const SZCovariance szCovariance = SZUtil::identity(),
const double  chi2 = 0.0,
const size_t  ndf = 0 
)
inlineexplicit

Composes an uncertain sz line from the perigee parameters and a 2x2 covariance matrix.

Covariance matrix defaults to a zero matrix.

Definition at line 52 of file UncertainSZLine.h.

58 , m_chi2(chi2)
59 , m_ndf(ndf)
60 {
61 }
SZParameters szParameters() const
Getter for the sz parameters in the order defined by ESZParameter.h.

◆ UncertainSZLine() [4/4]

UncertainSZLine ( const SZLine szLine,
const SZCovariance szCovariance = SZUtil::identity(),
const double  chi2 = 0.0,
const size_t  ndf = 0 
)
inlineexplicit

Augments a plain two dimensional line with a covariance matrix.

Covariance defaults to zero.

Definition at line 65 of file UncertainSZLine.h.

71 , m_chi2(chi2)
72 , m_ndf(ndf)
73 {
74 }
const SZLine & szLine() const
Getter for the underlying sz line.

Member Function Documentation

◆ chi2()

double chi2 ( ) const
inline

Getter for the chi square value of the line fit.

Definition at line 134 of file UncertainSZLine.h.

135 {
136 return m_chi2;
137 }

◆ covariance()

double covariance ( const ESZParameter iRow,
const ESZParameter iCol 
) const
inline

Getter for individual elements of the covariance matrix.

Definition at line 122 of file UncertainSZLine.h.

123 {
124 return szCovariance()(iRow, iCol);
125 }

◆ invalidate()

void invalidate ( )
inline

Sets all line parameters to zero including the covariance matrix.

Definition at line 158 of file UncertainSZLine.h.

159 {
162 m_chi2 = 0.0;
163 m_ndf = 0;
164 }
void invalidate()
Sets the parameters to a invalid representation.
Definition: SZLine.h:135

◆ ndf()

std::size_t ndf ( ) const
inline

Getter for the number of degrees of freediom used in the line fit.

Definition at line 146 of file UncertainSZLine.h.

147 {
148 return m_ndf;
149 }

◆ operator const SZLine &()

operator const SZLine & ( ) const
inline

Downcast to the "super" class.

Definition at line 91 of file UncertainSZLine.h.

92 {
93 return m_szLine;
94 }

◆ operator->()

const SZLine * 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 information 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 accessible by normal . method calls

Definition at line 85 of file UncertainSZLine.h.

86 {
87 return &m_szLine;
88 }

◆ passiveMoveBy()

void passiveMoveBy ( const Vector2D bySZ)
inline

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

Change is inplace.

Definition at line 183 of file UncertainSZLine.h.

184 {
185 // Move the covariance matrix first to have access to the original parameters
186 SZJacobian jacobian = m_szLine.passiveMoveByJacobian(bySZ);
189 }
SZJacobian passiveMoveByJacobian(const Vector2D &bySZ) const
Computes the Jacobi matrix for a move of the coordinate system by the given vector.
Definition: SZLine.h:208
void passiveMoveBy(const Vector2D &bySZ)
Passively move the coordinate system in place by the given sz vector.
Definition: SZLine.h:184
static void transport(const JacobianMatrix &jacobian, CovarianceMatrix &cov)
Transport the covariance matrix inplace with the given jacobian matrix.

◆ passiveMovedCovarianceBy()

SZCovariance passiveMovedCovarianceBy ( const Vector2D bySZ) const
inline

Calculates the jacobian matrix that is needed for the translation of the parameter covariance for a passive move of the coordinate system.

Definition at line 196 of file UncertainSZLine.h.

197 {
198 SZJacobian jacobian = m_szLine.passiveMoveByJacobian(bySZ);
199 return SZUtil::transported(jacobian, szCovariance());
200 }
static CovarianceMatrix transported(const JacobianMatrix &jacobian, const CovarianceMatrix &cov)
Return a copy of the covariance matrix transported with the given jacobian matrix.

◆ reverse()

void reverse ( )
inline

Reverses the direction of flight represented by this sz line.

Definition at line 168 of file UncertainSZLine.h.

169 {
172 }
void reverse()
Reverse the arc length direction in place.
Definition: SZLine.h:148
static void reverse(CovarianceMatrix &cov)
Reverse the covariance matrix inplace.

◆ reversed()

UncertainSZLine reversed ( ) const
inline

Returns a copy of the line corresponding to the reverse direction of travel.

Definition at line 175 of file UncertainSZLine.h.

176 {
178 }
SZLine reversed() const
Returns a copy of the line with reversed the arc length direction.
Definition: SZLine.h:154
UncertainSZLine()
Default constructor for ROOT compatibility.
static CovarianceMatrix reversed(const CovarianceMatrix &cov)
Return a copy of the reversed covariance matrix.

◆ setChi2()

void setChi2 ( const double  chi2)
inline

Setter for the chi square value of the line fit.

Definition at line 140 of file UncertainSZLine.h.

141 {
142 m_chi2 = chi2;
143 }

◆ setNDF()

void setNDF ( std::size_t  ndf)
inline

Setter for the number of degrees of freediom used in the line fit.

Definition at line 152 of file UncertainSZLine.h.

153 {
154 m_ndf = ndf;
155 }

◆ setSZCovariance()

void setSZCovariance ( const SZCovariance szCovariance)
inline

Setter for the whole covariance matrix of the sz line parameters.

Definition at line 110 of file UncertainSZLine.h.

111 {
113 }

◆ szCovariance()

const SZCovariance & szCovariance ( ) const
inline

Getter for the whole covariance matrix of the sz line parameters.

Definition at line 116 of file UncertainSZLine.h.

117 {
118 return m_szCovariance;
119 }

◆ szLine()

const SZLine & szLine ( ) const
inline

Getter for the underlying sz line.

Definition at line 97 of file UncertainSZLine.h.

98 {
99 return m_szLine;
100 }

◆ szParameters()

SZParameters szParameters ( ) const
inline

Getter for the sz parameters in the order defined by ESZParameter.h.

Definition at line 103 of file UncertainSZLine.h.

104 {
105 return m_szLine.szParameters();
106 }
SZParameters szParameters() const
Getter for the sz parameters.
Definition: SZLine.h:100

◆ variance()

double variance ( const ESZParameter i) const
inline

Getter for individual diagonal elements of the covariance matrix.

Definition at line 128 of file UncertainSZLine.h.

129 {
130 return szCovariance()(i, i);
131 }

Member Data Documentation

◆ m_chi2

double m_chi2 = 0.0
private

Memory for the chi square value of the fit of this line.

Definition at line 210 of file UncertainSZLine.h.

◆ m_ndf

size_t m_ndf = 0
private

Memory for the number of degrees of freedim of the fit of this line.

Definition at line 213 of file UncertainSZLine.h.

◆ m_szCovariance

SZCovariance m_szCovariance = SZUtil::identity()
private

Memory for the 2x2 covariance matrix of sz slope (aka tan lambda) and z0.

Definition at line 207 of file UncertainSZLine.h.

◆ m_szLine

SZLine m_szLine
private

Memory for the underlying line.

Definition at line 204 of file UncertainSZLine.h.


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