8#include <tracking/trackFindingCDC/geometry/UncertainParameters.icc.h>
10#include <tracking/trackFindingCDC/geometry/HelixParameters.h>
12#include <tracking/trackFindingCDC/numerics/CovarianceMatrixUtil.h>
13#include <tracking/trackFindingCDC/numerics/ParameterVectorUtil.h>
15#include <tracking/trackFindingCDC/numerics/Angle.h>
18using namespace TrackFindingCDC;
29 using namespace NHelixParameterIndices;
30 return getSubParameterVector<PerigeeUtil::ParameterVector, c_Curv>(helixPar);
35 using namespace NHelixParameterIndices;
36 return getSubParameterVector<SZUtil::ParameterVector, c_TanL>(helixPar);
48 using namespace NHelixParameterIndices;
49 return getSubCovarianceMatrix<PerigeeUtil::CovarianceMatrix, c_Curv>(helixCov);
54 using namespace NHelixParameterIndices;
55 return getSubCovarianceMatrix<SZUtil::CovarianceMatrix, c_TanL>(helixCov);
77 using namespace NHelixParameterIndices;
91 avgPar = relAvgPar + refPar;
105 auto toAmbiguity = JacobianMatrixUtil::identity<5>();
107 using namespace NPerigeeParameterIndices;
131 avgPar = relAvgPar + refHelixPar;
147 using namespace NPerigeeParameterIndices;
171 avgPar = relAvgPar + refHelixPar;
A matrix implementation to be used as an interface typ through out the track finder.
PlainMatrix< T, K, N > tail() const
Get the K bottom rows of the matrix.
static PlainMatrix< T, M, N > Zero()
Construct a matrix initialized with zeros.
PlainMatrix< T, K, N > head() const
Get the K top rows of the matrix.
Abstract base class for different kinds of events.
static void normalise(double &angle)
Normalise an angle inplace to lie in the range from [-pi, pi].
static double average(const double angle1, double angle2)
Combines two angular values to the one that lies half way between them on the short arc.
static CovarianceMatrix< N1+N2 > stackBlocks(const CovarianceMatrix< N1 > &block1, const CovarianceMatrix< N2 > &block2)
Combines two covariance matrices by putting them in two blocks on the diagonal of a larger matrix.
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.
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...
static SZUtil::CovarianceMatrix getSZCovariance(const CovarianceMatrix &helixCov)
Get sz covariance matrix.
static SZUtil::ParameterVector getSZParameters(const ParameterVector &helixPar)
Get sz parameters.
static PerigeeUtil::ParameterVector getPerigeeParameters(const ParameterVector &helixPar)
Get helix parameters related to the xy space.
static PerigeeAmbiguity defaultPerigeeAmbiguity()
Initialise a default covariance matrix to zero.
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 PerigeeUtil::CovarianceMatrix getPerigeeCovariance(const CovarianceMatrix &helixCov)
Get perigee covariance matrix related to the xy space.
static HelixUtil::ParameterVector stack(const PerigeeUtil::ParameterVector &perigeePar, const SZUtil::ParameterVector &szPar)
Combine parameters from the xy space and the sz space.
static HelixUtil::ParameterVector reversalSigns()
Getter for the signs which have to be applied to reverse the parameters.
static ParameterVector< N1+N2 > stack(const ParameterVector< N1 > &upperPar, const ParameterVector< N2 > &lowerPar)
Combines two parameter vectors by stacking them over each other.
static ParameterVector reversalSigns()
Getter for the signs which have to be applied to reverse the traversal direction.
static ParameterVector reversalSigns()
Getter for the signs which have to be applied to reverse the parameters.
Utility struct to instantiate a couple of helper function related to a set of uncertain parameters.