10#include <tracking/trackFindingCDC/geometry/Helix.h>
12#include <tracking/trackFindingCDC/geometry/UncertainPerigeeCircle.h>
13#include <tracking/trackFindingCDC/geometry/UncertainSZLine.h>
14#include <tracking/trackFindingCDC/geometry/SZLine.h>
16#include <tracking/trackFindingCDC/geometry/HelixParameters.h>
17#include <tracking/trackFindingCDC/geometry/PerigeeParameters.h>
18#include <tracking/trackFindingCDC/geometry/SZParameters.h>
19#include <tracking/trackFindingCDC/geometry/Vector2D.h>
30 namespace TrackFindingCDC {
47 const double tanLambda,
50 const double chi2 = 0.0,
52 :
m_helix(curvature, phi0, impact, tanLambda, z0)
62 const double chi2 = 0.0,
76 const double tanLambda,
79 const double chi2 = 0.0,
81 :
m_helix(curvature, phi0Vec, impact, tanLambda, z0)
91 const double chi2 = 0.0,
139 const PerigeeHelixAmbiguity& fromAmbiguity,
141 const PerigeeHelixAmbiguity& toAmbiguity,
142 const SZParameters& szParameters);
163 const PerigeeHelixAmbiguity& ambiguityMatrix)
186 const PerigeeHelixAmbiguity& fromAmbiguity,
219 return m_helix.helixParameters();
251 double covariance(
const EHelixParameter& iRow,
const EHelixParameter& iCol)
const
251 double covariance(
const EHelixParameter& iRow,
const EHelixParameter& iCol)
const {
…}
318 HelixJacobian jacobian =
m_helix.passiveMoveByJacobian(by);
329 double arcLength2D =
m_helix.shiftPeriod(nPeriods);
330 SZJacobian szJacobian =
m_helix.szLine().passiveMoveByJacobian(
Vector2D(arcLength2D, 0));
353 std::ostream& operator<<(std::ostream& output,
const UncertainHelix& uncertainHelix);
Extension of the generalized circle also caching the perigee coordinates.
A general helix class including a covariance matrix.
double variance(const EHelixParameter &i) const
Getter for individual diagonal elements of the covariance matrix.
UncertainHelix(const double curvature, const double phi0, const double impact, const double tanLambda, const double z0, const HelixCovariance &helixCovariance=HelixUtil::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.
const HelixCovariance & helixCovariance() const
Getter for the whole covariance matrix of the perigee parameters.
UncertainHelix()
Default constructor for ROOT compatibility.
void reverse()
Flips the orientation of the circle in place.
UncertainHelix reversed() const
Returns a copy of the circle with opposite orientation.
UncertainSZLine uncertainSZLine() const
Reduces the helix to an sz line carrying over the relevant parts of the convariance matrix.
UncertainHelix(const UncertainPerigeeCircle &uncertainPerigeeCircle, const UncertainSZLine &uncertainSZLine)
Augments a plain helix with a covariance matrix. Covariance defaults to zero.
UncertainHelix(const HelixParameters ¶meters, const HelixCovariance &helixCovariance=HelixUtil::identity(), const double chi2=0.0, std::size_t ndf=0)
Constructor taking all stored parameters.
double covariance(const EHelixParameter &iRow, const EHelixParameter &iCol) const
Getter for individual elements of the covariance matrix.
static UncertainHelix average(const UncertainHelix &fromHelix, const UncertainHelix &toHelix)
Construct the averages of the two given helices by properly considering their covariance matrix.
void setHelixCovariance(const HelixCovariance &helixCovariance)
Setter for the whole covariance matrix of the perigee parameters.
HelixCovariance m_helixCovariance
Memory for the 5x5 covariance matrix of the helix parameters.
double shiftPeriod(int nPeriods)
Adjust the arclength measure to start n periods later.
void passiveMoveBy(const Vector3D &by)
Moves the coordinate system by the vector by and calculates the new perigee and its covariance matrix...
double m_chi2
Memory for the chi square value of the fit of this helix.
HelixParameters helixParameters() const
Getter for the perigee parameters in the order defined by EPerigeeParameter.h.
void invalidate()
Sets all circle parameters to zero and the covariance matrix to something noninformative.
double chi2() const
Getter for the chi square value of the helix fit.
void setNDF(std::size_t ndf)
Setter for the number of degrees of freediom used in the helix fit.
size_t m_ndf
Memory for the number of degrees of freedom of the fit of this helix.
UncertainHelix(const Helix &helix, const HelixCovariance &helixCovariance=HelixUtil::identity(), const double chi2=0.0, std::size_t ndf=0)
Augments a plain helix with a covariance matrix. Covariance defaults to zero.
UncertainHelix(const double curvature, const Vector2D &phi0Vec, const double impact, const double tanLambda, const double z0, const HelixCovariance &helixCovariance=HelixUtil::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.
Helix m_helix
Memory for the underlying helix.
void setChi2(const double chi2)
Setter for the chi square value of the helix fit.
static UncertainHelix average(const UncertainHelix &helix, const UncertainPerigeeCircle &perigeeCircle, const PerigeeHelixAmbiguity &ambiguityMatrix)
Construct the average helix including its covariance matrix incoorporating additional information fro...
std::size_t ndf() const
Getter for the number of degrees of freediom used in the helix fit.
const Helix & helix() const
Getter for the underlying helix.
UncertainPerigeeCircle uncertainCircleXY() const
Projects the helix into the xy plain carrying over the relevant parts of the convariance matrix.
const Helix * operator->() const
Access to the constant interface of the underlying parameter line Allows the user of this "super" cla...
Adds an uncertainty matrix to the circle in perigee parameterisation.
A line in sz where s is the transverse travel distance as seen in the xy projection with uncertaintie...
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
A three dimensional vector.
Abstract base class for different kinds of events.
Utility struct for functions and types related to the helix parameters.
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 PerigeeUtil::CovarianceMatrix getPerigeeCovariance(const CovarianceMatrix &helixCov)
Get perigee covariance matrix related to the xy space.
static void transport(const JacobianMatrix &jacobian, CovarianceMatrix &cov)
static CovarianceMatrix identity()
static void reverse(CovarianceMatrix &cov)
static CovarianceMatrix reversed(const CovarianceMatrix &cov)