Belle II Software development
HelixParameters.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tracking/trackFindingCDC/geometry/PerigeeParameters.h>
11#include <tracking/trackFindingCDC/geometry/SZParameters.h>
12
13#include <tracking/trackFindingCDC/geometry/UncertainParameters.h>
14
15namespace Belle2 {
20
21 namespace TrackFindingCDC {
22
25
29 c_Curv = 0,
30
32 c_Phi0 = 1,
33
35 c_I = 2,
36
38 c_TanL = 3,
39
41 c_Z0 = 4,
42
44 c_N = 5,
45 };
46 }
47
49 using EHelixParameter = NHelixParameterIndices::EHelixParameter;
50
51 // Guard to prevent repeated template symbol emission
52 struct HelixUtil;
53 extern template struct UncertainParametersUtil<HelixUtil, EHelixParameter>;
54
57
60
63
66
69 const SZUtil::ParameterVector& szPar);
70
73
76
79 const SZUtil::CovarianceMatrix& szCov);
80
82 using PerigeeAmbiguity = TrackFindingCDC::JacobianMatrix<3, 5>;
83
86
93 static double average(const HelixUtil::ParameterVector& fromPar,
94 const HelixUtil::CovarianceMatrix& fromCov,
95 const HelixUtil::ParameterVector& toPar,
96 const HelixUtil::CovarianceMatrix& toCov,
99
108 static double average(const PerigeeUtil::ParameterVector& fromPar,
109 const PerigeeUtil::CovarianceMatrix& fromCov,
110 const HelixUtil::PerigeeAmbiguity& fromAmbiguity,
111 const HelixUtil::ParameterVector& toPar,
112 const HelixUtil::CovarianceMatrix& toCov,
115
123 static double average(const PerigeeUtil::ParameterVector& fromPar,
124 const PerigeeUtil::CovarianceMatrix& fromCov,
125 const HelixUtil::PerigeeAmbiguity& fromAmbiguity,
126 const PerigeeUtil::ParameterVector& toPar,
128 const HelixUtil::PerigeeAmbiguity& toAmbiguity,
129 const SZUtil::ParameterVector& szParameters,
132 };
133
135 using HelixParameters = HelixUtil::ParameterVector;
136
138 using HelixCovariance = HelixUtil::CovarianceMatrix;
139
141 using HelixPrecision = HelixUtil::PrecisionMatrix;
142
144 using HelixJacobian = HelixUtil::JacobianMatrix;
145
147 using PerigeeHelixAmbiguity = HelixUtil::PerigeeAmbiguity;
148 }
149
151}
Namespace to hide the contained enum constants.
EHelixParameter
Enumeration to address the individual helix parameters in a vector or matrix.
@ c_I
Constant to address the impact parameter.
@ c_Phi0
Constant to address the azimuth angle of the direction of flight.
@ c_TanL
Constant to address the tan lambda dip out of the xy plane.
@ c_Z0
Constant to address the z start position.
@ c_Curv
Constant to address the curvature in the xy plane.
@ c_N
Constant for the total number of indices.
Abstract base class for different kinds of events.
Utility struct for functions and types related to the helix parameters.
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 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 m...
static SZUtil::ParameterVector getSZParameters(const ParameterVector &helixPar)
Get sz parameters.
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 ...
TrackFindingCDC::JacobianMatrix< 3, 5 > PerigeeAmbiguity
Matrix type for the ambiguity to the perigee parameters, e.g. under the stereo projection.
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.
Utility struct to instantiate a couple of helper function related to a set of uncertain parameters.