Belle II Software development
UncertainPerigeeCircle Class Reference

Adds an uncertainty matrix to the circle in perigee parameterisation. More...

#include <UncertainPerigeeCircle.h>

Public Member Functions

 UncertainPerigeeCircle ()
 Default constructor for ROOT compatibility.
 
 UncertainPerigeeCircle (const double curvature, const double phi0Vec, const double impact, const PerigeeCovariance &perigeeCovariance=PerigeeUtil::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.
 
 UncertainPerigeeCircle (const double curvature, const Vector2D &phi0, const double impact, const PerigeeCovariance &perigeeCovariance=PerigeeUtil::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.
 
 UncertainPerigeeCircle (const PerigeeCircle &perigeeCircle, const PerigeeCovariance &perigeeCovariance=PerigeeUtil::identity(), const double chi2=0.0, std::size_t ndf=0)
 Augments a plain perigee circle with a covariance matrix. Covariance defaults to zero.
 
 UncertainPerigeeCircle (const GeneralizedCircle &generalizedCircle, const PerigeeCovariance &perigeeCovariance=PerigeeUtil::identity(), const double chi2=0.0, std::size_t ndf=0)
 Augments a plain perigee circle with a covariance matrix. Covariance defaults to zero.
 
 UncertainPerigeeCircle (const PerigeeParameters &parameters, const PerigeeCovariance &perigeeCovariance=PerigeeUtil::identity(), const double chi2=0.0, std::size_t ndf=0)
 Constructor taking all stored parameters as a SVector.
 
const PerigeeCircleoperator-> () 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.
 
 operator const PerigeeCircle & () const
 Downcast to the "super" class.
 
const PerigeeCircleperigeeCircle () const
 Getter for the underlying circle.
 
PerigeeParameters perigeeParameters () const
 Getter for the perigee parameters in the order defined by EPerigeeParameter.h.
 
void setPerigeeCovariance (const PerigeeCovariance &perigeeCovariance)
 Setter for the whole covariance matrix of the perigee parameters.
 
const PerigeeCovarianceperigeeCovariance () const
 Getter for the whole covariance matrix of the perigee parameters.
 
double covariance (const EPerigeeParameter &iRow, const EPerigeeParameter &iCol) const
 Getter for individual elements of the covariance matrix.
 
double variance (const EPerigeeParameter &i) const
 Getter for individual diagonal elements of the covariance matrix.
 
double chi2 () const
 Getter for the chi square value of the circle fit.
 
void setChi2 (const double chi2)
 Setter for the chi square value of the circle fit.
 
std::size_t ndf () const
 Getter for the number of degrees of freediom used in the circle fit.
 
void setNDF (std::size_t ndf)
 Setter for the number of degrees of freediom used in the circle fit.
 
void invalidate ()
 Sets all circle parameters to zero including the covariance matrix.
 
void reverse ()
 Flips the orientation of the circle in place.
 
UncertainPerigeeCircle reversed () const
 Returns a copy of the circle with opposite orientation.
 
void passiveMoveBy (const Vector2D &by)
 Moves the coordinate system by the vector by and calculates the new perigee and its covariance matrix.
 
PerigeeCovariance passiveMovedCovarianceBy (const Vector2D &by) const
 Calculates the jacobian matrix that is needed for the translation of the parameter covariance for a passive move of the coordinate system.
 

Static Public Member Functions

static UncertainPerigeeCircle average (const UncertainPerigeeCircle &fromPerigeeCircle, const UncertainPerigeeCircle &toPerigeeCircle)
 Average the parameters of the two given perigee circles properly considering their covariance matrix.
 

Private Attributes

PerigeeCircle m_perigeeCircle
 Memory for the underlying circle.
 
PerigeeCovariance m_perigeeCovariance = PerigeeUtil::identity()
 Memory for the 3x3 covariance matrix of the perigee parameters.
 
double m_chi2 = 0.0
 Memory for the chi square value of the fit of this circle.
 
size_t m_ndf = 0.0
 Memory for the number of degrees of freedim of the fit of this circle.
 

Detailed Description

Adds an uncertainty matrix to the circle in perigee parameterisation.

Definition at line 29 of file UncertainPerigeeCircle.h.

Constructor & Destructor Documentation

◆ UncertainPerigeeCircle() [1/6]

Default constructor for ROOT compatibility.

Definition at line 33 of file UncertainPerigeeCircle.h.

34 {
35 }

◆ UncertainPerigeeCircle() [2/6]

UncertainPerigeeCircle ( const double  curvature,
const double  phi0Vec,
const double  impact,
const PerigeeCovariance perigeeCovariance = PerigeeUtil::identity(),
const double  chi2 = 0.0,
std::size_t  ndf = 0 
)
inline

Composes an uncertain perigee circle from the perigee parameters and a 3x3 covariance matrix.

Covariance matrix defaults to a zero matrix.

Definition at line 42 of file UncertainPerigeeCircle.h.

48 : m_perigeeCircle(curvature, phi0Vec, impact)
50 , m_chi2(chi2)
51 , m_ndf(ndf)
52 {
53 }
double m_chi2
Memory for the chi square value of the fit of this circle.
PerigeeCovariance m_perigeeCovariance
Memory for the 3x3 covariance matrix of the perigee parameters.
double chi2() const
Getter for the chi square value of the circle fit.
size_t m_ndf
Memory for the number of degrees of freedim of the fit of this circle.
const PerigeeCovariance & perigeeCovariance() const
Getter for the whole covariance matrix of the perigee parameters.
std::size_t ndf() const
Getter for the number of degrees of freediom used in the circle fit.
PerigeeCircle m_perigeeCircle
Memory for the underlying circle.

◆ UncertainPerigeeCircle() [3/6]

UncertainPerigeeCircle ( const double  curvature,
const Vector2D phi0,
const double  impact,
const PerigeeCovariance perigeeCovariance = PerigeeUtil::identity(),
const double  chi2 = 0.0,
std::size_t  ndf = 0 
)
inline

Composes an uncertain perigee circle from the perigee parameters and a 3x3 covariance matrix.

Covariance matrix defaults to a zero matrix

Definition at line 60 of file UncertainPerigeeCircle.h.

66 : m_perigeeCircle(curvature, phi0, impact)
68 , m_chi2(chi2)
69 , m_ndf(ndf)
70 {
71 }

◆ UncertainPerigeeCircle() [4/6]

UncertainPerigeeCircle ( const PerigeeCircle perigeeCircle,
const PerigeeCovariance perigeeCovariance = PerigeeUtil::identity(),
const double  chi2 = 0.0,
std::size_t  ndf = 0 
)
inlineexplicit

Augments a plain perigee circle with a covariance matrix. Covariance defaults to zero.

Definition at line 74 of file UncertainPerigeeCircle.h.

80 , m_chi2(chi2)
81 , m_ndf(ndf)
82 {
83 }
const PerigeeCircle & perigeeCircle() const
Getter for the underlying circle.

◆ UncertainPerigeeCircle() [5/6]

UncertainPerigeeCircle ( const GeneralizedCircle generalizedCircle,
const PerigeeCovariance perigeeCovariance = PerigeeUtil::identity(),
const double  chi2 = 0.0,
std::size_t  ndf = 0 
)
inlineexplicit

Augments a plain perigee circle with a covariance matrix. Covariance defaults to zero.

Definition at line 86 of file UncertainPerigeeCircle.h.

90 : m_perigeeCircle(generalizedCircle)
92 , m_chi2(chi2)
93 , m_ndf(ndf)
94 {
95 }

◆ UncertainPerigeeCircle() [6/6]

UncertainPerigeeCircle ( const PerigeeParameters parameters,
const PerigeeCovariance perigeeCovariance = PerigeeUtil::identity(),
const double  chi2 = 0.0,
std::size_t  ndf = 0 
)
inlineexplicit

Constructor taking all stored parameters as a SVector.

Definition at line 98 of file UncertainPerigeeCircle.h.

103 : m_perigeeCircle(parameters)
105 , m_chi2(chi2)
106 , m_ndf(ndf)
107 {
108 }

Member Function Documentation

◆ average()

UncertainPerigeeCircle average ( const UncertainPerigeeCircle fromPerigeeCircle,
const UncertainPerigeeCircle toPerigeeCircle 
)
static

Average the parameters of the two given perigee circles properly considering their covariance matrix.

Definition at line 19 of file UncertainPerigeeCircle.cc.

21{
22 const PerigeeParameters& fromPar = fromPerigeeCircle.perigeeParameters();
23 const PerigeeCovariance& fromCov = fromPerigeeCircle.perigeeCovariance();
24
25 const PerigeeParameters& toPar = toPerigeeCircle.perigeeParameters();
26 const PerigeeCovariance& toCov = toPerigeeCircle.perigeeCovariance();
27
28 PerigeeParameters avgPar;
29 PerigeeCovariance avgCov;
30
31 double chi2 = PerigeeUtil::average(fromPar, fromCov, toPar, toCov, avgPar, avgCov);
32
33 // Calculating 3 parameters from 6 input parameters. 3 NDF remaining.
34 size_t ndf = 3;
35
36 return UncertainPerigeeCircle(avgPar, avgCov, chi2, ndf);
37}
A matrix implementation to be used as an interface typ through out the track finder.
Definition: PlainMatrix.h:40
UncertainPerigeeCircle()
Default constructor for ROOT compatibility.
PerigeeParameters perigeeParameters() const
Getter for the perigee parameters in the order defined by EPerigeeParameter.h.
static double average(const PerigeeUtil::ParameterVector &fromPar, const PerigeeUtil::CovarianceMatrix &fromCov, const PerigeeUtil::ParameterVector &toPar, const PerigeeUtil::CovarianceMatrix &toCov, PerigeeUtil::ParameterVector &avgPar, PerigeeUtil::CovarianceMatrix &avgCov)
Calculates the weighted average between two perigee parameter sets with their respective covariance m...

◆ chi2()

double chi2 ( ) const
inline

Getter for the chi square value of the circle fit.

Definition at line 174 of file UncertainPerigeeCircle.h.

175 {
176 return m_chi2;
177 }

◆ covariance()

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

Getter for individual elements of the covariance matrix.

Definition at line 162 of file UncertainPerigeeCircle.h.

163 {
164 return perigeeCovariance()(iRow, iCol);
165 }

◆ invalidate()

void invalidate ( )
inline

Sets all circle parameters to zero including the covariance matrix.

Definition at line 198 of file UncertainPerigeeCircle.h.

199 {
202 m_chi2 = 0.0;
203 }
void invalidate()
Sets all circle parameters to zero.

◆ ndf()

std::size_t ndf ( ) const
inline

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

Definition at line 186 of file UncertainPerigeeCircle.h.

187 {
188 return m_ndf;
189 }

◆ operator const PerigeeCircle &()

operator const PerigeeCircle & ( ) const
inline

Downcast to the "super" class.

Definition at line 131 of file UncertainPerigeeCircle.h.

132 {
133 return m_perigeeCircle;
134 }

◆ operator->()

const PerigeeCircle * 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 125 of file UncertainPerigeeCircle.h.

126 {
127 return &m_perigeeCircle;
128 }

◆ passiveMoveBy()

void passiveMoveBy ( const Vector2D 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 228 of file UncertainPerigeeCircle.h.

229 {
230 // Move the covariance matrix first to have access to the original parameters
231 PerigeeJacobian jacobian = m_perigeeCircle.passiveMoveByJacobian(by);
234 }
void passiveMoveBy(const Vector2D &by)
Moves the coordinates system by the given vector. Updates perigee parameters in place.
PerigeeJacobian passiveMoveByJacobian(const Vector2D &by) const
Computes the Jacobi matrix for a move of the coordinate system by the given vector.
static void transport(const JacobianMatrix &jacobian, CovarianceMatrix &cov)
Transport the covariance matrix inplace with the given jacobian matrix.

◆ passiveMovedCovarianceBy()

PerigeeCovariance passiveMovedCovarianceBy ( const Vector2D by) 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 241 of file UncertainPerigeeCircle.h.

242 {
243 PerigeeJacobian jacobian = m_perigeeCircle.passiveMoveByJacobian(by);
245 }
static CovarianceMatrix transported(const JacobianMatrix &jacobian, const CovarianceMatrix &cov)
Return a copy of the covariance matrix transported with the given jacobian matrix.

◆ perigeeCircle()

const PerigeeCircle & perigeeCircle ( ) const
inline

Getter for the underlying circle.

Definition at line 137 of file UncertainPerigeeCircle.h.

138 {
139 return m_perigeeCircle;
140 }

◆ perigeeCovariance()

const PerigeeCovariance & perigeeCovariance ( ) const
inline

Getter for the whole covariance matrix of the perigee parameters.

Definition at line 156 of file UncertainPerigeeCircle.h.

157 {
158 return m_perigeeCovariance;
159 }

◆ perigeeParameters()

PerigeeParameters perigeeParameters ( ) const
inline

Getter for the perigee parameters in the order defined by EPerigeeParameter.h.

Definition at line 143 of file UncertainPerigeeCircle.h.

144 {
146 }
PerigeeParameters perigeeParameters() const
Getter for the three perigee parameters in the order defined by EPerigeeParameter....

◆ reverse()

void reverse ( )
inline

Flips the orientation of the circle in place.

Definition at line 207 of file UncertainPerigeeCircle.h.

208 {
211 }
void reverse()
Flips the orientation of the circle in place.
static void reverse(CovarianceMatrix &cov)
Reverse the covariance matrix inplace.

◆ reversed()

UncertainPerigeeCircle reversed ( ) const
inline

Returns a copy of the circle with opposite orientation.

Definition at line 214 of file UncertainPerigeeCircle.h.

215 {
218 chi2(),
219 ndf());
220 }
PerigeeCircle reversed() const
Returns a copy of the circle with opposite orientation.
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 circle fit.

Definition at line 180 of file UncertainPerigeeCircle.h.

181 {
182 m_chi2 = chi2;
183 }

◆ setNDF()

void setNDF ( std::size_t  ndf)
inline

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

Definition at line 192 of file UncertainPerigeeCircle.h.

193 {
194 m_ndf = ndf;
195 }

◆ setPerigeeCovariance()

void setPerigeeCovariance ( const PerigeeCovariance perigeeCovariance)
inline

Setter for the whole covariance matrix of the perigee parameters.

Definition at line 150 of file UncertainPerigeeCircle.h.

◆ variance()

double variance ( const EPerigeeParameter i) const
inline

Getter for individual diagonal elements of the covariance matrix.

Definition at line 168 of file UncertainPerigeeCircle.h.

169 {
170 return perigeeCovariance()(i, i);
171 }

Member Data Documentation

◆ m_chi2

double m_chi2 = 0.0
private

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

Definition at line 255 of file UncertainPerigeeCircle.h.

◆ m_ndf

size_t m_ndf = 0.0
private

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

Definition at line 258 of file UncertainPerigeeCircle.h.

◆ m_perigeeCircle

PerigeeCircle m_perigeeCircle
private

Memory for the underlying circle.

Definition at line 249 of file UncertainPerigeeCircle.h.

◆ m_perigeeCovariance

PerigeeCovariance m_perigeeCovariance = PerigeeUtil::identity()
private

Memory for the 3x3 covariance matrix of the perigee parameters.

Definition at line 252 of file UncertainPerigeeCircle.h.


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