14#ifndef TRK_KALMANUPDATORSMATRIX_H
15#define TRK_KALMANUPDATORSMATRIX_H
25#include "Math/SMatrix.h"
26#include "Math/SVector.h"
30typedef ROOT::Math::SMatrix<double, 1, 1, ROOT::Math::MatRepSym<double, 1>>
32typedef ROOT::Math::SMatrix<double, 2, 2, ROOT::Math::MatRepSym<double, 2>>
34typedef ROOT::Math::SMatrix<double, 3, 3, ROOT::Math::MatRepSym<double, 3>>
36typedef ROOT::Math::SMatrix<double, 4, 4, ROOT::Math::MatRepSym<double, 4>>
38typedef ROOT::Math::SMatrix<double, 5, 5, ROOT::Math::MatRepSym<double, 5>>
40typedef ROOT::Math::SMatrix<double, 2, 2, ROOT::Math::MatRepStd<double, 2, 2>>
42typedef ROOT::Math::SMatrix<double, 3, 3, ROOT::Math::MatRepStd<double, 3, 3>>
44typedef ROOT::Math::SMatrix<double, 4, 4, ROOT::Math::MatRepStd<double, 4, 4>>
46typedef ROOT::Math::SMatrix<double, 5, 5, ROOT::Math::MatRepStd<double, 5, 5>>
88 virtual StatusCode
finalize()
override;
94 virtual std::unique_ptr<TrackParameters>
addToState(
100 virtual std::unique_ptr<TrackParameters>
addToState(
106 virtual std::unique_ptr<TrackParameters>
addToState(
113 virtual std::unique_ptr<TrackParameters>
addToState(
205 bool)
const override final
#define AmgSymMatrix(dim)
ROOT::Math::SVector< double, 3 > SParVector3
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > SCovMatrix2
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepStd< double, 4, 4 > > SGenMatrix4
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > SCovMatrix5
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > SGenMatrix5
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > SCovMatrix3
ROOT::Math::SMatrix< double, 1, 1, ROOT::Math::MatRepSym< double, 1 > > SCovMatrix1
ROOT::Math::SVector< double, 2 > SParVector2
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > SGenMatrix3
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > SCovMatrix4
ROOT::Math::SVector< double, 5 > SParVector5
ROOT::Math::SVector< double, 4 > SParVector4
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepStd< double, 2, 2 > > SGenMatrix2
Set of interfaces for methods operating on track states, mainly for Kalman filtering.
std::unique_ptr< TrackParameters > calculateFilterStep_4D(const TrackParameters &, const SParVector5 &, const SCovMatrix5 &, const LocalParameters &, const Amg::MatrixX &, const int, FitQualityOnSurface *&, bool) const
common maths calculation code for all addToState and removeFromState versions which happen to be call...
virtual FitQualityOnSurface fullStateFitQuality(const TrackParameters &, const Amg::Vector2D &, const Amg::MatrixX &) const override final
estimator for FitQuality on Surface from a full track state, that is a state which contains the curre...
bool thetaPhiWithinRange_5D(const SParVector5 &V, const RangeCheckDef rcd) const
Test if angles are inside boundaries.
virtual ~KalmanUpdatorSMatrix()
std::unique_ptr< TrackParameters > calculateFilterStep_1D(const TrackParameters &, const SParVector5 &, const SCovMatrix5 &, double, int, const Amg::MatrixX &, const int, FitQualityOnSurface *&, bool) const
common maths calculation code for all addToState and removeFromState versions which happen to be call...
static const ParamDefsAccessor s_enumAccessor
std::unique_ptr< TrackParameters > calculateFilterStep_5D(const TrackParameters &, const SParVector5 &, const SCovMatrix5 &, const SParVector5 &, const Amg::MatrixX &, const int, FitQualityOnSurface *&, bool) const
common maths calculation code for all addToState and removeFromState versions which happen to be call...
void logGainForm(int, const SParVector5 &, const SCovMatrix5 &, const SGenMatrix5 &) const
internal structuring: common logfile output during calculation
virtual FitQualityOnSurface predictedStateFitQuality(const TrackParameters &, const Amg::Vector2D &, const Amg::MatrixX &) const override final
estimator for FitQuality on Surface from a predicted track state, that is a state which contains the ...
SCovMatrix5 m_unitMatrix
avoid mem allocation at every call
bool getStartCov(SCovMatrix5 &, const TrackParameters &, const int) const
Helper method to transform Eigen cov matrix to SMatrix.
FitQualityOnSurface makeChi2_2D(const SParVector5 &, const AmgSymMatrix(5)&, const SParVector2 &, const SCovMatrix2 &, int, int) const
virtual StatusCode initialize() override
AlgTool initialisation.
FitQualityOnSurface makeChi2Object(const Amg::VectorX &, const AmgSymMatrix(5)&, const Amg::MatrixX &, const Amg::MatrixX &, int) const
std::unique_ptr< TrackParameters > convertToClonedTrackPars(const TrackParameters &, const SParVector5 &, const SCovMatrix5 &, int, bool, std::string_view) const
Helper method to convert internal results from SMatrix to Eigen. */.
virtual std::vector< double > initialErrors() const override final
give back how updator is configured for inital covariances
std::unique_ptr< TrackParameters > calculateFilterStep_2D(const TrackParameters &, const SParVector5 &, const SCovMatrix5 &, const SParVector2 &, int, const Amg::MatrixX &, const int, FitQualityOnSurface *&, bool) const
common maths calculation code for all addToState and removeFromState versions which happen to be call...
virtual std::unique_ptr< TrackParameters > addToState(const TrackParameters &, const Amg::Vector2D &, const Amg::MatrixX &) const override final
measurement updator for the KalmanFitter getting the meas't coord' from Amg::Vector2D (use eg with PR...
float m_thetaGainDampingValue
static SCovMatrix3 projection_3D(const SCovMatrix5 &, int)
Avoid multiplications with sparse H matrices by cutting 3D rows&columns out of the full cov matrix.
virtual StatusCode finalize() override
AlgTool termination.
bool thetaWithinRange_5D(const SParVector5 &V) const
Test if theta angle is inside boundaries. No differential-check option.
virtual std::unique_ptr< TrackParameters > removeFromState(const TrackParameters &, const Amg::Vector2D &, const Amg::MatrixX &) const override final
reverse update eg for track property analysis (unbiased residuals) getting the measurement coordinate...
bool correctThetaPhiRange_5D(SParVector5 &, SCovMatrix5 &, const RangeCheckDef) const
method correcting the calculated angles back to their defined ranges phi (-pi, pi) and theta (0,...
virtual std::unique_ptr< TrackParameters > combineStates(const TrackParameters &, const TrackParameters &) const override final
trajectory state updator which combines two parts of a trajectory on a common surface.
std::unique_ptr< TrackParameters > prepareFilterStep(const TrackParameters &, const LocalParameters &, const Amg::MatrixX &, const int, FitQualityOnSurface *&, bool) const
common code analysing the measurement's rank and calling the appropriate implementation for this rank...
KalmanUpdatorSMatrix(const std::string &, const std::string &, const IInterface *)
AlgTool standard constuctor.
SParVector5 m_cov0
initial cov values in SMatrix object
void logResult(const std::string &, const AmgVector(5) &, const AmgSymMatrix(5) &) const
internal structuring: common logfile output after calculation
static SCovMatrix2 projection_2D(const SCovMatrix5 &, int)
Avoid multiplications with sparse H matrices by cutting 2D rows&columns out of the full cov matrix.
bool m_useFruehwirth8a
job options controlling update formula for covariance matrix
void logInputCov(const SCovMatrix5 &, const Amg::VectorX &, const Amg::MatrixX &) const
internal structuring: common logfile output of the inputs
virtual std::pair< AmgVector(5), AmgSymMatrix(5)> * updateParameterDifference(const AmgVector(5) &, const AmgSymMatrix(5) &, const Amg::VectorX &, const Amg::MatrixX &, int, Trk::FitQualityOnSurface *&, bool) const override final
interface for reference-track KF, not implemented
std::unique_ptr< TrackParameters > calculateFilterStep_3D(const TrackParameters &, const SParVector5 &, const SCovMatrix5 &, const LocalParameters &, const Amg::MatrixX &, const int, FitQualityOnSurface *&, bool) const
common maths calculation code for all addToState and removeFromState versions which happen to be call...
std::vector< double > m_cov_stdvec
job options for initial cov values
static SCovMatrix4 projection_4D(const SCovMatrix5 &, int)
Avoid multiplications with sparse H matrices by cutting 4D rows&columns out of the full cov matrix.
FitQualityOnSurface makeChi2_5D(const SParVector5 &, const AmgSymMatrix(5)&, const SParVector5 &, const AmgSymMatrix(5)&, int) const
FitQualityOnSurface makeChi2_1D(const SParVector5 &, const AmgSymMatrix(5)&, double, double, int, int) const
also the chi2 calculation and FitQuality object creation is combined in an extra method.
bool consistentParamDimensions(const LocalParameters &, int) const
method testing correct use of LocalParameters
void logStart(const std::string &, const TrackParameters &) const
internal structuring: debugging output for start of method.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Ensure that the ATLAS eigen extensions are properly loaded.
ParametersBase< TrackParametersDim, Charged > TrackParameters
AmgSymMatrix(5) &GXFTrackState
Simple struct to access the ParamDefs enum with ints.