14#ifndef TRK_KALMANUPDATOR_H
15#define TRK_KALMANUPDATOR_H
20#include "GaudiKernel/MsgStream.h"
49 KalmanUpdator(
const std::string&,
const std::string&,
const IInterface*);
53 virtual StatusCode
initialize() override final;
55 virtual StatusCode
finalize() override final;
176 bool)
const override final
243 const bool isDifference = false,
247 const bool isDifference = false,
260 if (!(key & 4 || key & 8))
270 for (
int itag = 0, ipos = 1; itag <
Trk::phi; ++itag, ipos *= 2)
273 okay = okay && (std::abs(V[jphi]) <=
M_PI);
277 for (
int itag = 0, ipos = 1; itag <=
Trk::theta; ++itag, ipos *= 2)
280 okay = okay && (std::abs(V[jtheta] - M_PI_2) <= M_PI_2);
294 if (!(key & 4 || key & 8))
305 for (
int itag = 0, ipos = 1; itag <
Trk::phi; ++itag, ipos *= 2)
308 okay = okay && (std::abs(V[jphi]) <=
M_PI);
312 for (
int itag = 0, ipos = 1; itag <=
Trk::theta; ++itag, ipos *= 2)
315 okay = okay && (std::abs(V[jtheta]) <=
M_PI);
329 if (R.determinant() == 0) {
334 const double chiSquared =
Amg::chi2(R.inverse(), residual);
336 <<
" state, chi2 :" << chiSquared
337 <<
" / ndof= " << covRio.cols());
#define ATH_MSG_VERBOSE(x)
Set of interfaces for methods operating on track states, mainly for Kalman filtering.
KalmanUpdator(const std::string &, const std::string &, const IInterface *)
AlgTool standard constuctor.
bool diffThetaPhiWithinRange(const Amg::VectorX &, const int key=31) const
tests if ranges of phi (-pi, pi) and theta (0, pi) residuals are correct */
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
Amg::MatrixX projection(const Amg::MatrixX &, const int) const
avoid CLHEP's empty math operations (H-matrix) by copying members out
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'
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
void logInputCov(const Amg::MatrixX &, const Amg::VectorX &, const Amg::MatrixX &) const
internal structuring: common logfile output of the inputs
ProjectionMatricesSet m_projectionMatrices
get the correct projection matrix
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.
FitQualityOnSurface makeChi2Object(const Amg::VectorX &, const Amg::MatrixX &, const Amg::MatrixX &, const int, const int) const
also the chi2 calculation and FitQuality object creation is combined in an extra method.
std::vector< double > m_cov0
job option: initial covariance matrix
virtual StatusCode initialize() override final
AlgTool initialisation.
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.
void logGainForm(int, const Amg::VectorX &, const Amg::MatrixX &, const Amg::MatrixX &, const Amg::MatrixX &) const
internal structuring: common logfile output during calculation
virtual StatusCode finalize() override final
AlgTool termination.
bool consistentParamDimensions(const LocalParameters &, int) const
method testing correct use of LocalParameters */
int m_outputlevel
MsgStream output level cached.
bool thetaPhiWithinRange(const Amg::VectorX &, const int key=31) const
tests if ranges of abolute phi (-pi, pi) and theta (0, pi) are correct */
bool correctThetaPhiRange(Amg::VectorX &, AmgSymMatrix(5) &, const bool isDifference=false, const int key=31) const
brings phi/theta back into valid range using 2pi periodicity
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)
bool m_useFruehwirth8a
job option: formula for cov update
virtual std::vector< double > initialErrors() const override final
gives back how updator is configured for inital covariances
std::unique_ptr< TrackParameters > calculateFilterStep(const TrackParameters &, const Amg::Vector2D &, const Amg::MatrixX &, const int, FitQualityOnSurface *&, bool) const
Common maths calculation code for addToState and removeFromState - Amg::Vector2D interface.
void logStart(const std::string &, const TrackParameters &) const
internal structuring: debugging output for start of method.
void logResult(const std::string &, const Amg::VectorX &, const Amg::MatrixX &) const
internal structuring: common logfile output after calculation
the matrices to access the variably-dimensioned local parameters and map them to the defined five tra...
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
double chi2(const T &precision, const U &residual, const int sign=1)
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