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

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

#include <HelixParameters.h>

Inheritance diagram for HelixUtil:
Collaboration diagram for HelixUtil:

Public Types

using PerigeeAmbiguity = TrackFindingCDC::JacobianMatrix< 3, 5 >
 Matrix type for the ambiguity to the perigee parameters, e.g. under the stereo projection.
 
using EParamaters = EHelixParameter
 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 HelixUtil::ParameterVector reversalSigns ()
 Getter for the signs which have to be applied to reverse the parameters.
 
static PerigeeUtil::ParameterVector getPerigeeParameters (const ParameterVector &helixPar)
 Get helix parameters related to the xy space.
 
static SZUtil::ParameterVector getSZParameters (const ParameterVector &helixPar)
 Get sz parameters.
 
static HelixUtil::ParameterVector stack (const PerigeeUtil::ParameterVector &perigeePar, const SZUtil::ParameterVector &szPar)
 Combine parameters from the xy space and the sz space.
 
static PerigeeUtil::CovarianceMatrix getPerigeeCovariance (const CovarianceMatrix &helixCov)
 Get perigee covariance matrix related to the xy space.
 
static SZUtil::CovarianceMatrix getSZCovariance (const CovarianceMatrix &helixCov)
 Get sz covariance matrix.
 
static HelixUtil::CovarianceMatrix stackBlocks (const PerigeeUtil::CovarianceMatrix &perigeeCov, const SZUtil::CovarianceMatrix &szCov)
 Combine covariance matrices from the xy space and the sz space in their respective blocks.
 
static PerigeeAmbiguity defaultPerigeeAmbiguity ()
 Initialse a default covariance matrix to zero.
 
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 matrix. More...
 
static double average (const PerigeeUtil::ParameterVector &fromPar, const PerigeeUtil::CovarianceMatrix &fromCov, const HelixUtil::PerigeeAmbiguity &fromAmbiguity, const HelixUtil::ParameterVector &toPar, const HelixUtil::CovarianceMatrix &toCov, HelixUtil::ParameterVector &avgPar, HelixUtil::CovarianceMatrix &avgCov)
 Calculates the weighted average between a perigee parameter sets and helix parameter sets with their respective covariance matrix under consideration of the relative ambiguity between the helix and the given perigee parameters. More...
 
static double average (const PerigeeUtil::ParameterVector &fromPar, const PerigeeUtil::CovarianceMatrix &fromCov, const HelixUtil::PerigeeAmbiguity &fromAmbiguity, const PerigeeUtil::ParameterVector &toPar, const PerigeeUtil::CovarianceMatrix &toCov, const HelixUtil::PerigeeAmbiguity &toAmbiguity, const SZUtil::ParameterVector &szParameters, HelixUtil::ParameterVector &avgPar, HelixUtil::CovarianceMatrix &avgCov)
 Calculates the weighted average between two perigee parameter sets with their respective covariance matrix under consideration of their relative ambiguity to a helix near the sz parameters given as a reference. 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 helix parameters.

Definition at line 56 of file HelixParameters.h.

Member Function Documentation

◆ average() [1/3]

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

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

Returns the chi2 value of the average.

Definition at line 70 of file HelixParameters.cc.

76 {
77  using namespace NHelixParameterIndices;
78  HelixParameters refPar = (fromPar + toPar) / 2.0;
79  refPar[c_Phi0] = AngleUtil::average(fromPar[c_Phi0], toPar[c_Phi0]);
80 
81  HelixParameters relFromPar = fromPar - refPar;
82  AngleUtil::normalise(relFromPar[c_Phi0]);
83 
84  HelixParameters relToPar = toPar - refPar;
85  AngleUtil::normalise(relToPar[c_Phi0]);
86 
87  HelixParameters relAvgPar;
88  double chi2 =
89  CovarianceMatrixUtil::average(relFromPar, fromCov, relToPar, toCov, relAvgPar, avgCov);
90 
91  avgPar = relAvgPar + refPar;
92  AngleUtil::normalise(avgPar[c_Phi0]);
93 
94  return chi2;
95 }
A matrix implementation to be used as an interface typ through out the track finder.
Definition: PlainMatrix.h:40
@ c_Phi0
Constant to address the azimuth angle of the direction of flight.
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.

◆ average() [2/3]

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

Calculates the weighted average between a perigee parameter sets and helix parameter sets with their respective covariance matrix under consideration of the relative ambiguity between the helix and the given perigee parameters.

Returns the chi2 value of the average.

Definition at line 97 of file HelixParameters.cc.

◆ average() [3/3]

double average ( const PerigeeUtil::ParameterVector fromPar,
const PerigeeUtil::CovarianceMatrix fromCov,
const HelixUtil::PerigeeAmbiguity fromAmbiguity,
const PerigeeUtil::ParameterVector toPar,
const PerigeeUtil::CovarianceMatrix toCov,
const HelixUtil::PerigeeAmbiguity toAmbiguity,
const SZUtil::ParameterVector szParameters,
HelixUtil::ParameterVector avgPar,
HelixUtil::CovarianceMatrix avgCov 
)
static

Calculates the weighted average between two perigee parameter sets with their respective covariance matrix under consideration of their relative ambiguity to a helix near the sz parameters given as a reference.

Returns the chi2 value of the average.

Definition at line 137 of file HelixParameters.cc.

◆ 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.

92  {
93  return CovarianceMatrixUtil::fromFullPrecision(prec);
94  }

◆ 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: