ATLAS Offline Software
|
Implementation of Trk::IUpdator based on gain formalism and Eigen. More...
#include <KalmanUpdator.h>
Public Member Functions | |
KalmanUpdator (const std::string &, const std::string &, const IInterface *) | |
AlgTool standard constuctor. More... | |
~KalmanUpdator () | |
virtual StatusCode | initialize () override final |
AlgTool initialisation. More... | |
virtual StatusCode | finalize () override final |
AlgTool termination. More... | |
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' More... | |
virtual std::unique_ptr< TrackParameters > | addToState (const TrackParameters &, const LocalParameters &, const Amg::MatrixX &) const override final |
measurement updator for the KalmanFitter getting the coordinates More... | |
virtual std::unique_ptr< TrackParameters > | addToState (const TrackParameters &, const Amg::Vector2D &, const Amg::MatrixX &, FitQualityOnSurface *&) const override final |
measurement updator interface for the KalmanFitter returning the fit quality More... | |
virtual std::unique_ptr< TrackParameters > | addToState (const TrackParameters &, const LocalParameters &, const Amg::MatrixX &, FitQualityOnSurface *&) const override final |
measurement updator interface for the KalmanFitter returning the fit quality More... | |
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) More... | |
virtual std::unique_ptr< TrackParameters > | removeFromState (const TrackParameters &, const LocalParameters &, const Amg::MatrixX &) const override final |
reverse update eg for track property analysis (unbiased residuals) More... | |
virtual std::unique_ptr< TrackParameters > | removeFromState (const TrackParameters &, const Amg::Vector2D &, const Amg::MatrixX &, FitQualityOnSurface *&) const override final |
reverse updator for the KalmanFitter and other fitters using the More... | |
virtual std::unique_ptr< TrackParameters > | removeFromState (const TrackParameters &, const LocalParameters &, const Amg::MatrixX &, FitQualityOnSurface *&) const override final |
reverse updator for the KalmanFitter and other fitters using More... | |
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. More... | |
virtual std::unique_ptr< TrackParameters > | combineStates (const TrackParameters &, const TrackParameters &, FitQualityOnSurface *&) const override final |
trajectory state updator which combines two parts of a trajectory on a common surface and provides the FitQuality. More... | |
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 More... | |
virtual FitQualityOnSurface | fullStateFitQuality (const TrackParameters &, const LocalParameters &, const Amg::MatrixX &) const override final |
estimator for FitQuality on Surface from a full track state, that is More... | |
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 More... | |
virtual FitQualityOnSurface | predictedStateFitQuality (const TrackParameters &, const LocalParameters &, const Amg::MatrixX &) const override final |
estimator for FitQuality on Surface from a predicted track state, that is a state More... | |
virtual FitQualityOnSurface | predictedStateFitQuality (const TrackParameters &, const TrackParameters &) const override final |
estimator for FitQuality on Surface for the situation when a track is fitted to More... | |
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. More... | |
virtual std::vector< double > | initialErrors () const override final |
gives back how updator is configured for inital covariances More... | |
ServiceHandle< StoreGateSvc > & | evtStore () |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More... | |
const ServiceHandle< StoreGateSvc > & | evtStore () const |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More... | |
const ServiceHandle< StoreGateSvc > & | detStore () const |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More... | |
virtual StatusCode | sysInitialize () override |
Perform system initialization for an algorithm. More... | |
virtual StatusCode | sysStart () override |
Handle START transition. More... | |
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
Return this algorithm's input handles. More... | |
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
Return this algorithm's output handles. More... | |
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
Declare a new Gaudi property. More... | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
Declare a new Gaudi property. More... | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
Declare a new Gaudi property. More... | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
Declare a new Gaudi property. More... | |
void | updateVHKA (Gaudi::Details::PropertyBase &) |
MsgStream & | msg () const |
MsgStream & | msg (const MSG::Level lvl) const |
bool | msgLvl (const MSG::Level lvl) const |
Static Public Member Functions | |
static const InterfaceID & | interfaceID () |
Algtool infrastructure. More... | |
Protected Member Functions | |
void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
remove all handles from I/O resolution More... | |
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > | renounce (T &h) |
void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
Add StoreName to extra input/output deps as needed. More... | |
Private Types | |
typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
Private Member Functions | |
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. More... | |
std::unique_ptr< TrackParameters > | calculateFilterStep (const TrackParameters &, const LocalParameters &, const Amg::MatrixX &, const int, FitQualityOnSurface *&, bool) const |
Common maths calculation code for addToState and removeFromState - LocalParameters interface. More... | |
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. More... | |
Amg::MatrixX | projection (const Amg::MatrixX &, const int) const |
avoid CLHEP's empty math operations (H-matrix) by copying members out More... | |
void | logStart (const std::string &, const TrackParameters &) const |
internal structuring: debugging output for start of method. More... | |
void | logInputCov (const Amg::MatrixX &, const Amg::VectorX &, const Amg::MatrixX &) const |
internal structuring: common logfile output of the inputs More... | |
void | logGainForm (int, const Amg::VectorX &, const Amg::MatrixX &, const Amg::MatrixX &, const Amg::MatrixX &) const |
internal structuring: common logfile output during calculation More... | |
void | logResult (const std::string &, const Amg::VectorX &, const Amg::MatrixX &) const |
internal structuring: common logfile output after calculation More... | |
bool | consistentParamDimensions (const LocalParameters &, int) const |
method testing correct use of LocalParameters */ More... | |
bool | thetaPhiWithinRange (const Amg::VectorX &, const int key=31) const |
tests if ranges of abolute phi (-pi, pi) and theta (0, pi) are correct */ More... | |
bool | diffThetaPhiWithinRange (const Amg::VectorX &, const int key=31) const |
tests if ranges of phi (-pi, pi) and theta (0, pi) residuals are correct */ More... | |
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 More... | |
bool | correctThetaPhiRange (Amg::VectorX &, Amg::MatrixX &, const bool isDifference=false, const int key=31) const |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
specialization for handling Gaudi::Property<SG::VarHandleKey> More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
specialization for handling Gaudi::Property<SG::VarHandleBase> More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More... | |
Private Attributes | |
std::vector< double > | m_cov0 |
job option: initial covariance matrix More... | |
ProjectionMatricesSet | m_projectionMatrices |
get the correct projection matrix More... | |
bool | m_useFruehwirth8a |
job option: formula for cov update More... | |
int | m_outputlevel |
MsgStream output level cached. More... | |
StoreGateSvc_t | m_evtStore |
Pointer to StoreGate (event store by default) More... | |
StoreGateSvc_t | m_detStore |
Pointer to StoreGate (detector store by default) More... | |
std::vector< SG::VarHandleKeyArray * > | m_vhka |
bool | m_varHandleArraysDeclared |
Implementation of Trk::IUpdator based on gain formalism and Eigen.
Tool to provide calculations for Kalman filtering, i.e. to add or remove a measured hit to the state vector. Implemented fully in Eigen using dynamic matrices As a drawback due to using dynamic matrices this tool is generally slower than alternatives that are written based on fixed size objects.
Definition at line 43 of file KalmanUpdator.h.
|
privateinherited |
Definition at line 388 of file AthCommonDataStore.h.
Trk::KalmanUpdator::KalmanUpdator | ( | const std::string & | t, |
const std::string & | n, | ||
const IInterface * | p | ||
) |
AlgTool standard constuctor.
Definition at line 24 of file KalmanUpdator.cxx.
|
default |
|
finaloverridevirtual |
measurement updator for the KalmanFitter getting the meas't coord'
Implements Trk::IUpdator.
Definition at line 59 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
measurement updator interface for the KalmanFitter returning the fit quality
Implements Trk::IUpdator.
Definition at line 76 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
measurement updator for the KalmanFitter getting the coordinates
Implements Trk::IUpdator.
Definition at line 68 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
measurement updator interface for the KalmanFitter returning the fit quality
Implements Trk::IUpdator.
Definition at line 90 of file KalmanUpdator.cxx.
|
private |
Common maths calculation code for addToState and removeFromState - Amg::Vector2D interface.
Definition at line 434 of file KalmanUpdator.cxx.
|
private |
Common maths calculation code for addToState and removeFromState - LocalParameters interface.
Definition at line 546 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
trajectory state updator which combines two parts of a trajectory on a common surface.
Make sure that the TPs' surfaces are identical and that the local hit is not duplicated in both trajectories!
Implements Trk::IUpdator.
Definition at line 152 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
trajectory state updator which combines two parts of a trajectory on a common surface and provides the FitQuality.
Make sure that the TPs' surfaces are identical and that the local hit is not duplicated!
Implements Trk::IUpdator.
Definition at line 207 of file KalmanUpdator.cxx.
|
private |
method testing correct use of LocalParameters */
Definition at line 666 of file KalmanUpdator.cxx.
|
private |
Definition at line 763 of file KalmanUpdator.cxx.
|
private |
brings phi/theta back into valid range using 2pi periodicity
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
|
inlineprivateinherited |
specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>
Definition at line 199 of file AthCommonDataStore.h.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 259 of file AthCommonDataStore.h.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 145 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc/DetectorStore
Returns (kind of) a pointer to the StoreGateSvc
.
Definition at line 95 of file AthCommonDataStore.h.
|
inlineprivate |
tests if ranges of phi (-pi, pi) and theta (0, pi) residuals are correct */
Definition at line 291 of file KalmanUpdator.h.
|
inlineinherited |
The standard StoreGateSvc
(event store) Returns (kind of) a pointer to the StoreGateSvc
.
Definition at line 85 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc
(event store) Returns (kind of) a pointer to the StoreGateSvc
.
Definition at line 90 of file AthCommonDataStore.h.
|
protectedinherited |
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
|
finaloverridevirtual |
AlgTool termination.
Definition at line 53 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
estimator for FitQuality on Surface from a full track state, that is a state
Implements Trk::IUpdator.
Definition at line 273 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
estimator for FitQuality on Surface from a full track state, that is
Implements Trk::IUpdator.
Definition at line 308 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
|
finaloverridevirtual |
|
overridevirtualinherited |
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
|
inlinestaticinherited |
Algtool infrastructure.
Definition at line 227 of file IUpdator.h.
|
private |
internal structuring: common logfile output during calculation
Definition at line 882 of file KalmanUpdator.cxx.
|
private |
internal structuring: common logfile output of the inputs
Definition at line 855 of file KalmanUpdator.cxx.
|
private |
internal structuring: common logfile output after calculation
Definition at line 907 of file KalmanUpdator.cxx.
|
private |
internal structuring: debugging output for start of method.
Definition at line 845 of file KalmanUpdator.cxx.
|
inlineprivate |
also the chi2 calculation and FitQuality object creation is combined in an extra method.
It is called by ___FitQuality() and calculateFilterStep() The sign controls the calculation in case a predicted input track state (sign=+1) or smoothed/updated input track state (sign=-1).
Definition at line 322 of file KalmanUpdator.h.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 27 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
overridevirtualinherited |
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
|
finaloverridevirtual |
estimator for FitQuality on Surface from a predicted track state, that is a state
Implements Trk::IUpdator.
Definition at line 337 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
estimator for FitQuality on Surface from a predicted track state, that is a state
Implements Trk::IUpdator.
Definition at line 370 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
estimator for FitQuality on Surface for the situation when a track is fitted to
Implements Trk::IUpdator.
Definition at line 400 of file KalmanUpdator.cxx.
|
private |
avoid CLHEP's empty math operations (H-matrix) by copying members out
Definition at line 653 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
reverse update eg for track property analysis (unbiased residuals)
Implements Trk::IUpdator.
Definition at line 104 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
reverse updator for the KalmanFitter and other fitters using the
Implements Trk::IUpdator.
Definition at line 122 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
reverse update eg for track property analysis (unbiased residuals)
Implements Trk::IUpdator.
Definition at line 113 of file KalmanUpdator.cxx.
|
finaloverridevirtual |
reverse updator for the KalmanFitter and other fitters using
Implements Trk::IUpdator.
Definition at line 137 of file KalmanUpdator.cxx.
|
inlineprotectedinherited |
Definition at line 380 of file AthCommonDataStore.h.
|
inlineprotectedinherited |
remove all handles from I/O resolution
Definition at line 364 of file AthCommonDataStore.h.
|
overridevirtualinherited |
Perform system initialization for an algorithm.
We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.
Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.
|
overridevirtualinherited |
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
|
inlineprivate |
tests if ranges of abolute phi (-pi, pi) and theta (0, pi) are correct */
Definition at line 258 of file KalmanUpdator.h.
|
inlinefinaloverridevirtual |
interface for reference-track KF, not implemented.
Implements Trk::IUpdator.
Definition at line 169 of file KalmanUpdator.h.
|
inlineinherited |
Definition at line 308 of file AthCommonDataStore.h.
|
private |
job option: initial covariance matrix
Definition at line 250 of file KalmanUpdator.h.
|
privateinherited |
Pointer to StoreGate (detector store by default)
Definition at line 393 of file AthCommonDataStore.h.
|
privateinherited |
Pointer to StoreGate (event store by default)
Definition at line 390 of file AthCommonDataStore.h.
|
private |
MsgStream output level cached.
Definition at line 254 of file KalmanUpdator.h.
|
private |
get the correct projection matrix
Definition at line 252 of file KalmanUpdator.h.
|
private |
job option: formula for cov update
Definition at line 253 of file KalmanUpdator.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.