Belle II Software  release-08-01-10
PerigeeUtil Struct Reference

Utility struct for functions and types related to the perigee parameters. More...

#include <PerigeeParameters.h>

Inheritance diagram for PerigeeUtil:
Collaboration diagram for PerigeeUtil:

Public Types

using EParamaters = EPerigeeParameter
 Indices of the parameters.
 
using ParameterVector = TrackFindingCDC::ParameterVector< c_N >
 The vector type representing the n related parameters.
 
using CovarianceMatrix = TrackFindingCDC::CovarianceMatrix< c_N >
 The matrix type representing the covariance of the n related parameters.
 
using PrecisionMatrix = TrackFindingCDC::PrecisionMatrix< c_N >
 The matrix type representing the precision of the n related parameters.
 
using JacobianMatrix = TrackFindingCDC::JacobianMatrix< c_N >
 The matrix type used to translate covariances and precisions im auto mapping of the parameter space.
 

Static Public Member Functions

static ParameterVector reversalSigns ()
 Getter for the signs which have to be applied to reverse the traversal direction.
 
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 matrix. More...
 
static void transport (const JacobianMatrix &jacobian, CovarianceMatrix &cov)
 Transport the covariance matrix inplace with the given jacobian matrix.
 
static CovarianceMatrix transported (const JacobianMatrix &jacobian, const CovarianceMatrix &cov)
 Return a copy of the covariance matrix transported with the given jacobian matrix.
 
static JacobianMatrix reversalJacobian ()
 Jacobian matrix needed in the reversal operation of the parameter vector.
 
static void reverse (CovarianceMatrix &cov)
 Reverse the covariance matrix inplace.
 
static CovarianceMatrix reversed (const CovarianceMatrix &cov)
 Return a copy of the reversed covariance matrix.
 
static CovarianceMatrix identity ()
 Returns an identity matrix.
 
static CovarianceMatrix covarianceFromPrecision (const PrecisionMatrix &prec)
 Convert the precision matrix to the corresponding covariance matrix.
 
static PrecisionMatrix precisionFromCovariance (const CovarianceMatrix &cov)
 Convert the covariance matrix to the corresponding precision matrix.
 
static CovarianceMatrix covarianceFromFullPrecision (const PrecisionMatrix &prec)
 Convert the precision matrix to the corresponding covariance matrix. More...
 
static PrecisionMatrix precisionFromFullCovariance (const CovarianceMatrix &cov)
 Convert the covariance matrix to the corresponding precision matrix. More...
 
static AParameterVector getSubParameterVector (const ParameterVector &par)
 Getter for a sub part of the covariance matrix.
 
static ACovarianceMatrix getSubCovarianceMatrix (const CovarianceMatrix &cov)
 Getter for a sub part of the covariance matrix.
 

Static Public Attributes

static const size_t c_N
 Number of elements.
 

Detailed Description

Utility struct for functions and types related to the perigee parameters.

Definition at line 47 of file PerigeeParameters.h.

Member Function Documentation

◆ average()

double average ( const PerigeeUtil::ParameterVector fromPar,
const PerigeeUtil::CovarianceMatrix fromCov,
const PerigeeUtil::ParameterVector toPar,
const PerigeeUtil::CovarianceMatrix toCov,
PerigeeUtil::ParameterVector avgPar,
PerigeeUtil::CovarianceMatrix avgCov 
)
static

Calculates the weighted average between two perigee parameter sets with their respective covariance matrix.

Returns the chi2 value of the average.

Definition at line 19 of file PerigeeParameters.cc.

25 {
26  using namespace NPerigeeParameterIndices;
27  PerigeeParameters refPar = (fromPar + toPar) / 2.0;
28  refPar(c_Phi0) = AngleUtil::average(fromPar(c_Phi0), toPar(c_Phi0));
29 
30  PerigeeParameters relFromPar = fromPar - refPar;
31  AngleUtil::normalise(relFromPar(c_Phi0));
32 
33  PerigeeParameters relToPar = toPar - refPar;
34  AngleUtil::normalise(relToPar(c_Phi0));
35 
36  PerigeeParameters relAvgPar;
37 
38  double chi2 =
39  CovarianceMatrixUtil::average(relFromPar, fromCov, relToPar, toCov, relAvgPar, avgCov);
40 
41  avgPar = relAvgPar + refPar;
42  AngleUtil::normalise(avgPar(c_Phi0));
43 
44  return chi2;
45 }
A matrix implementation to be used as an interface typ through out the track finder.
Definition: PlainMatrix.h:40
static void normalise(double &angle)
Normalise an angle inplace to lie in the range from [-pi, pi].
Definition: Angle.h:41
static double average(const double angle1, double angle2)
Combines two angluar values to the one that lies half way between them on the short arc.
Definition: Angle.h:27
static double average(const ParameterVector< N > &par1, const CovarianceMatrix< N > &cov1, const ParameterVector< N > &par2, const CovarianceMatrix< N > &cov2, ParameterVector< N > &par, CovarianceMatrix< N > &cov)
Averages two parameter vectors taking into account their respective covariances.

◆ covarianceFromFullPrecision()

auto covarianceFromFullPrecision ( const PrecisionMatrix prec)
staticinherited

Convert the precision matrix to the corresponding covariance matrix.

Faster version with foreknowledge that the precision is of full rank.

Definition at line 73 of file UncertainParameters.icc.h.

◆ precisionFromFullCovariance()

auto precisionFromFullCovariance ( const CovarianceMatrix cov)
staticinherited

Convert the covariance matrix to the corresponding precision matrix.

Faster version with foreknowledge that the precision is of full rank.

Definition at line 79 of file UncertainParameters.icc.h.


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