ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
ActsPlugins::MutablePodioTrackStateContainer< holder_t > Class Template Reference

Mutable Podio-based track state container implementation. More...

#include </home/runner/work/acts/acts/Plugins/EDM4hep/include/ActsPlugins/EDM4hep/PodioTrackStateContainer.hpp>

Inheritance diagram for ActsPlugins::MutablePodioTrackStateContainer< holder_t >:
[legend]
Collaboration diagram for ActsPlugins::MutablePodioTrackStateContainer< holder_t >:
[legend]

Public Member Functions

 MutablePodioTrackStateContainer (PodioUtil::ConversionHelper &helper, ActsPodioEdm::TrackStateCollection &trackStates, ActsPodioEdm::BoundParametersCollection &params, ActsPodioEdm::JacobianCollection &jacs)
 Constructor from references (for RefHolder).
 MutablePodioTrackStateContainer (PodioUtil::ConversionHelper &helper, holder_t< ActsPodioEdm::TrackStateCollection > trackStates, holder_t< ActsPodioEdm::BoundParametersCollection > params, holder_t< ActsPodioEdm::JacobianCollection > jacs)
 Constructor.
template<typename T>
constexpr void addColumn_impl (std::string_view key)
 Add a dynamic column.
IndexType addTrackState_impl (Acts::TrackStatePropMask mask=Acts::TrackStatePropMask::All, Acts::TrackIndexType iprevious=Acts::kTrackIndexInvalid)
 Add a new track state and return its index.
void addTrackStateComponents_impl (IndexType istate, Acts::TrackStatePropMask mask)
 Add track state components based on mask.
template<typename val_t, typename cov_t>
requires (Acts::Concepts::eigen_base_is_fixed_size<val_t> && Eigen::PlainObjectBase<val_t>::RowsAtCompileTime <= toUnderlying(Acts::eBoundSize) && Acts::Concepts::eigen_bases_have_same_num_rows<val_t, cov_t> && Acts::Concepts::eigen_base_is_square<cov_t>)
void allocateCalibrated_impl (IndexType istate, const Eigen::DenseBase< val_t > &val, const Eigen::DenseBase< cov_t > &cov)
 Allocate calibrated measurement and covariance.
template<std::size_t measdim>
Calibrated< measdim > calibrated_impl (IndexType index)
 Get calibrated measurement vector (mutable version).
template<std::size_t measdim>
ConstCalibrated< measdim > calibrated_impl (IndexType index) const
 Get calibrated measurement vector (const version).
template<std::size_t measdim>
CalibratedCovariance< measdim > calibratedCovariance_impl (IndexType index)
 Get calibrated measurement covariance (mutable version).
template<std::size_t measdim>
ConstCalibratedCovariance< measdim > calibratedCovariance_impl (IndexType index) const
 Get calibrated measurement covariance (const version).
Acts::TrackIndexType calibratedSize_impl (IndexType istate) const
 Get the size of the calibrated measurement.
void clear_impl ()
 Clear all track states.
std::any component_impl (Acts::HashedString key, IndexType istate)
 Get a component by key from the track state (mutable version).
std::any component_impl (Acts::HashedString key, IndexType istate) const
 Get a component by key from the track state (const version).
void copyDynamicFrom_impl (IndexType dstIdx, Acts::HashedString key, const std::any &srcPtr)
 Copy dynamic column data from another track state.
Covariance covariance_impl (IndexType istate)
 Get mutable covariance matrix for a track state.
ConstCovariance covariance_impl (IndexType istate) const
 Get const covariance matrix for a track state.
Acts::detail::DynamicKeyRange< podio_detail::DynamicColumnBase > dynamicKeys_impl () const
 Get dynamic column keys.
Acts::SourceLink getUncalibratedSourceLink_impl (IndexType istate) const
 Get the uncalibrated source link for a track state.
constexpr bool has_impl (Acts::HashedString key, IndexType istate) const
 Check if a track state component is present.
constexpr bool hasColumn_impl (Acts::HashedString key) const
 Check if a dynamic column exists.
Covariance jacobian_impl (IndexType istate)
 Get the jacobian matrix for a track state (mutable version).
ConstCovariance jacobian_impl (IndexType istate) const
 Get the jacobian matrix for a track state (const version).
ConstParameters parameters_impl (Acts::TrackIndexType istate) const
 Get const track parameters for a track state.
Parameters parameters_impl (IndexType istate)
 Get mutable track parameters for a track state.
const Acts::SurfacereferenceSurface_impl (IndexType istate) const
 Get the reference surface for a track state.
void releaseInto (podio::Frame &frame, const std::string &suffix="")
 Release collections into a podio frame.
void setReferenceSurface_impl (IndexType istate, std::shared_ptr< const Acts::Surface > surface)
 Set the reference surface for a track state.
void setUncalibratedSourceLink_impl (IndexType istate, const Acts::SourceLink &sourceLink)
 Set the uncalibrated source link for a track state.
void shareFrom_impl (Acts::TrackIndexType iself, Acts::TrackIndexType iother, Acts::TrackStatePropMask shareSource, Acts::TrackStatePropMask shareTarget)
 Share data from another track state.
IndexType size_impl () const
 Get the number of track states.
void unset_impl (Acts::TrackStatePropMask target, Acts::TrackIndexType istate)
 Unset a track state component.
Public Member Functions inherited from Acts::MultiTrajectory< MutablePodioTrackStateContainer< holder_t > >
void clear ()
 Clear the MultiTrajectory.
IndexType size () const
 Returns the number of track states contained.
ConstTrackStateProxy getTrackState (IndexType istate) const
 Access a read-only point on the trajectory by index.
IndexType addTrackState (TrackStatePropMask mask=TrackStatePropMask::All, IndexType iprevious=kInvalid)
 Add a track state without providing explicit information.
TrackStateProxy makeTrackState (TrackStatePropMask mask=TrackStatePropMask::All, IndexType iprevious=kInvalid)
 Add a track state to the container and return a track state proxy to it This effectively calls addTrackState and getTrackState.
void visitBackwards (IndexType iendpoint, F &&callable) const
 Visit all previous states starting at a given endpoint.
void applyBackwards (IndexType iendpoint, F &&callable)
 Apply a function to all previous states starting at a given endpoint.
auto reverseTrackStateRange (IndexType iendpoint) const
 Range for the track states from iendpoint to the trajectory start.
auto forwardTrackStateRange (IndexType istartpoint) const
 Range for the track states from istartpoint to the trajectory end, i.e from inside out.
void addColumn (std::string_view key)
 Add a column to the MultiTrajectory.
bool hasColumn (HashedString key) const
 Check if a column with a key key exists.

Additional Inherited Members

Public Types inherited from ActsPlugins::PodioTrackStateContainerBase
template<std::size_t M>
using Calibrated
 Calibrated measurement vector type.
template<std::size_t M>
using CalibratedCovariance
 Calibrated measurement covariance matrix type.
template<std::size_t M>
using ConstCalibrated
 Const calibrated measurement vector type.
template<std::size_t M>
using ConstCalibratedCovariance
 Const calibrated measurement covariance matrix type.
using ConstCovariance
 Const covariance map type.
using ConstParameters
 Const parameters map type.
using Covariance
 Mutable covariance map type.
using Parameters
 Mutable parameters map type.
Public Types inherited from Acts::MultiTrajectory< MutablePodioTrackStateContainer< holder_t > >
using ConstTrackStateProxy
 Alias for the const version of a track state proxy, with the same backends as this container.
using Derived
 Type alias for derived multi-trajectory implementation.
using IndexType
 The index type of the track state container.
using TrackStateProxy
 Alias for the mutable version of a track state proxy, with the same backends as this container.
Static Public Attributes inherited from Acts::MultiTrajectory< MutablePodioTrackStateContainer< holder_t > >
static constexpr IndexType kInvalid
 Sentinel value that indicates an invalid index.
static constexpr unsigned int MeasurementSizeMax
 Maximum number of measurement dimensions supported by this trajectory.
static constexpr bool ReadOnly
 Flag indicating whether this multi-trajectory is read-only.
Protected Member Functions inherited from Acts::MultiTrajectory< MutablePodioTrackStateContainer< holder_t > >
void addTrackStateComponents (IndexType istate, TrackStatePropMask mask)
 Add additional components to an existing track state.
void allocateCalibrated (IndexType istate, std::size_t measdim)
 Allocate storage for a calibrated measurement of specified dimension.
TrackStateProxy::template Calibrated< measdim > calibrated (IndexType istate)
 Retrieve a calibrated measurement proxy instance for a measurement at a given index.
TrackStateProxy::template CalibratedCovariance< measdim > calibratedCovariance (IndexType istate)
 Retrieve a calibrated measurement covariance proxy instance for a measurement at a given index.
IndexType calibratedSize (IndexType istate) const
 Get the calibrated measurement size for a track state.
T & component (IndexType istate)
 Retrieve a mutable reference to a component.
TrackStateProxy::Covariance covariance (IndexType covIdx)
 Get covariance for a track state.
TrackStateProxy::EffectiveCalibrated effectiveCalibrated (IndexType istate)
 Retrieve a calibrated measurement covariance proxy instance for a measurement at a given index.
TrackStateProxy::EffectiveCalibratedCovariance effectiveCalibratedCovariance (IndexType istate)
 Retrieve a calibrated measurement covariance proxy instance for a measurement at a given index.
SourceLink getUncalibratedSourceLink (IndexType istate) const
 Get the uncalibrated source link for a track state.
bool has (HashedString key, IndexType istate) const
 Check for component existence of key in track satet istate.
TrackStateProxy::Jacobian jacobian (IndexType istate)
 Retrieve a jacobian proxy instance for a jacobian at a given index.
TrackStateProxy::Parameters parameters (IndexType parIdx)
 Get parameters for a track state.
const SurfacereferenceSurface (IndexType istate) const
 Get the reference surface for a track state.
void setReferenceSurface (IndexType istate, std::shared_ptr< const Surface > surface)
 Set the reference surface for a track state.
void setUncalibratedSourceLink (IndexType istate, SourceLink &&sourceLink)
 Set the uncalibrated source link for a track state.
void shareFrom (IndexType iself, IndexType iother, TrackStatePropMask shareSource, TrackStatePropMask shareTarget)
 Share a shareable component from between track state.
void unset (TrackStatePropMask target, IndexType istate)
 Unset an optional track state component.
Static Protected Member Functions inherited from ActsPlugins::PodioTrackStateContainerBase
template<bool EnsureConst, typename T>
static std::any component_impl (T &instance, Acts::HashedString key, Acts::TrackIndexType istate)
 Get a component from a track state.
template<typename T>
static constexpr bool has_impl (T &instance, Acts::HashedString key, Acts::TrackIndexType istate)
 Check if a component exists for a track state.
template<typename T>
static constexpr bool hasColumn_impl (T &instance, Acts::HashedString key)
 Check if a column exists.
static void populateSurfaceBuffer (const PodioUtil::ConversionHelper &helper, const ActsPodioEdm::TrackStateCollection &collection, std::vector< std::shared_ptr< const Acts::Surface > > &surfaces) noexcept
 Populate surface buffer from track state collection.

Detailed Description

template<template< typename... > class holder_t>
class ActsPlugins::MutablePodioTrackStateContainer< holder_t >

Mutable Podio-based track state container implementation.

Constructor & Destructor Documentation

◆ MutablePodioTrackStateContainer() [1/2]

template<template< typename... > class holder_t>
ActsPlugins::MutablePodioTrackStateContainer< holder_t >::MutablePodioTrackStateContainer ( PodioUtil::ConversionHelper & helper,
holder_t< ActsPodioEdm::TrackStateCollection > trackStates,
holder_t< ActsPodioEdm::BoundParametersCollection > params,
holder_t< ActsPodioEdm::JacobianCollection > jacs )
explicit

Constructor.

Parameters
helperConversion helper
trackStatesTrack states collection
paramsParameters collection
jacsJacobians collection

◆ MutablePodioTrackStateContainer() [2/2]

template<template< typename... > class holder_t>
ActsPlugins::MutablePodioTrackStateContainer< holder_t >::MutablePodioTrackStateContainer ( PodioUtil::ConversionHelper & helper,
ActsPodioEdm::TrackStateCollection & trackStates,
ActsPodioEdm::BoundParametersCollection & params,
ActsPodioEdm::JacobianCollection & jacs )
explicit

Constructor from references (for RefHolder).

Parameters
helperConversion helper
trackStatesTrack states collection reference
paramsParameters collection reference
jacsJacobians collection reference

Member Function Documentation

◆ addColumn_impl()

template<template< typename... > class holder_t>
template<typename T>
void ActsPlugins::MutablePodioTrackStateContainer< holder_t >::addColumn_impl ( std::string_view key)
constexpr

Add a dynamic column.

Template Parameters
TColumn value type
Parameters
keyColumn key

◆ addTrackState_impl()

template<template< typename... > class holder_t>
IndexType ActsPlugins::MutablePodioTrackStateContainer< holder_t >::addTrackState_impl ( Acts::TrackStatePropMask mask = Acts::TrackStatePropMask::All,
Acts::TrackIndexType iprevious = Acts::kTrackIndexInvalid )

Add a new track state and return its index.

Parameters
maskTrack state component mask
ipreviousIndex of previous track state
Returns
Index of the new track state

◆ addTrackStateComponents_impl()

template<template< typename... > class holder_t>
void ActsPlugins::MutablePodioTrackStateContainer< holder_t >::addTrackStateComponents_impl ( IndexType istate,
Acts::TrackStatePropMask mask )

Add track state components based on mask.

Parameters
istateTrack state index
maskTrack state component mask

◆ allocateCalibrated_impl()

template<template< typename... > class holder_t>
template<typename val_t, typename cov_t>
requires (Acts::Concepts::eigen_base_is_fixed_size<val_t> && Eigen::PlainObjectBase<val_t>::RowsAtCompileTime <= toUnderlying(Acts::eBoundSize) && Acts::Concepts::eigen_bases_have_same_num_rows<val_t, cov_t> && Acts::Concepts::eigen_base_is_square<cov_t>)
void ActsPlugins::MutablePodioTrackStateContainer< holder_t >::allocateCalibrated_impl ( IndexType istate,
const Eigen::DenseBase< val_t > & val,
const Eigen::DenseBase< cov_t > & cov )

Allocate calibrated measurement and covariance.

Template Parameters
val_tType of the measurement vector
cov_tType of the covariance matrix
Parameters
istateTrack state index
valMeasurement vector to store
covCovariance matrix to store

◆ calibrated_impl() [1/2]

template<template< typename... > class holder_t>
template<std::size_t measdim>
Calibrated< measdim > ActsPlugins::MutablePodioTrackStateContainer< holder_t >::calibrated_impl ( IndexType index)

Get calibrated measurement vector (mutable version).

Template Parameters
measdimDimension of the measurement
Parameters
indexTrack state index
Returns
Mutable calibrated measurement vector

◆ calibrated_impl() [2/2]

template<template< typename... > class holder_t>
template<std::size_t measdim>
ConstCalibrated< measdim > ActsPlugins::MutablePodioTrackStateContainer< holder_t >::calibrated_impl ( IndexType index) const

Get calibrated measurement vector (const version).

Template Parameters
measdimDimension of the measurement
Parameters
indexTrack state index
Returns
Const calibrated measurement vector

◆ calibratedCovariance_impl() [1/2]

template<template< typename... > class holder_t>
template<std::size_t measdim>
CalibratedCovariance< measdim > ActsPlugins::MutablePodioTrackStateContainer< holder_t >::calibratedCovariance_impl ( IndexType index)

Get calibrated measurement covariance (mutable version).

Template Parameters
measdimDimension of the measurement
Parameters
indexTrack state index
Returns
Mutable calibrated covariance matrix

◆ calibratedCovariance_impl() [2/2]

template<template< typename... > class holder_t>
template<std::size_t measdim>
ConstCalibratedCovariance< measdim > ActsPlugins::MutablePodioTrackStateContainer< holder_t >::calibratedCovariance_impl ( IndexType index) const

Get calibrated measurement covariance (const version).

Template Parameters
measdimDimension of the measurement
Parameters
indexTrack state index
Returns
Const calibrated covariance matrix

◆ calibratedSize_impl()

template<template< typename... > class holder_t>
Acts::TrackIndexType ActsPlugins::MutablePodioTrackStateContainer< holder_t >::calibratedSize_impl ( IndexType istate) const

Get the size of the calibrated measurement.

Parameters
istateTrack state index
Returns
Size of the calibrated measurement

◆ component_impl() [1/2]

template<template< typename... > class holder_t>
std::any ActsPlugins::MutablePodioTrackStateContainer< holder_t >::component_impl ( Acts::HashedString key,
IndexType istate )

Get a component by key from the track state (mutable version).

Parameters
keyComponent key
istateTrack state index
Returns
Component value

◆ component_impl() [2/2]

template<template< typename... > class holder_t>
std::any ActsPlugins::MutablePodioTrackStateContainer< holder_t >::component_impl ( Acts::HashedString key,
IndexType istate ) const

Get a component by key from the track state (const version).

Parameters
keyComponent key
istateTrack state index
Returns
Component value

◆ copyDynamicFrom_impl()

template<template< typename... > class holder_t>
void ActsPlugins::MutablePodioTrackStateContainer< holder_t >::copyDynamicFrom_impl ( IndexType dstIdx,
Acts::HashedString key,
const std::any & srcPtr )

Copy dynamic column data from another track state.

Parameters
dstIdxDestination track state index
keyColumn key
srcPtrSource pointer

◆ covariance_impl() [1/2]

template<template< typename... > class holder_t>
Covariance ActsPlugins::MutablePodioTrackStateContainer< holder_t >::covariance_impl ( IndexType istate)

Get mutable covariance matrix for a track state.

Parameters
istateTrack state index
Returns
Mutable covariance matrix

◆ covariance_impl() [2/2]

template<template< typename... > class holder_t>
ConstCovariance ActsPlugins::MutablePodioTrackStateContainer< holder_t >::covariance_impl ( IndexType istate) const

Get const covariance matrix for a track state.

Parameters
istateTrack state index
Returns
Const covariance matrix

◆ dynamicKeys_impl()

template<template< typename... > class holder_t>
Acts::detail::DynamicKeyRange< podio_detail::DynamicColumnBase > ActsPlugins::MutablePodioTrackStateContainer< holder_t >::dynamicKeys_impl ( ) const

Get dynamic column keys.

Returns
Range of dynamic column keys

◆ getUncalibratedSourceLink_impl()

template<template< typename... > class holder_t>
Acts::SourceLink ActsPlugins::MutablePodioTrackStateContainer< holder_t >::getUncalibratedSourceLink_impl ( IndexType istate) const

Get the uncalibrated source link for a track state.

Parameters
istateTrack state index
Returns
Uncalibrated source link

◆ has_impl()

template<template< typename... > class holder_t>
bool ActsPlugins::MutablePodioTrackStateContainer< holder_t >::has_impl ( Acts::HashedString key,
IndexType istate ) const
constexpr

Check if a track state component is present.

Parameters
keyComponent key
istateTrack state index
Returns
True if component is present

◆ hasColumn_impl()

template<template< typename... > class holder_t>
bool ActsPlugins::MutablePodioTrackStateContainer< holder_t >::hasColumn_impl ( Acts::HashedString key) const
constexpr

Check if a dynamic column exists.

Parameters
keyColumn key
Returns
True if column exists

◆ jacobian_impl() [1/2]

template<template< typename... > class holder_t>
Covariance ActsPlugins::MutablePodioTrackStateContainer< holder_t >::jacobian_impl ( IndexType istate)

Get the jacobian matrix for a track state (mutable version).

Parameters
istateTrack state index
Returns
Mutable jacobian matrix

◆ jacobian_impl() [2/2]

template<template< typename... > class holder_t>
ConstCovariance ActsPlugins::MutablePodioTrackStateContainer< holder_t >::jacobian_impl ( IndexType istate) const

Get the jacobian matrix for a track state (const version).

Parameters
istateTrack state index
Returns
Const jacobian matrix

◆ parameters_impl() [1/2]

template<template< typename... > class holder_t>
ConstParameters ActsPlugins::MutablePodioTrackStateContainer< holder_t >::parameters_impl ( Acts::TrackIndexType istate) const

Get const track parameters for a track state.

Parameters
istateTrack state index
Returns
Const parameters

◆ parameters_impl() [2/2]

template<template< typename... > class holder_t>
Parameters ActsPlugins::MutablePodioTrackStateContainer< holder_t >::parameters_impl ( IndexType istate)

Get mutable track parameters for a track state.

Parameters
istateTrack state index
Returns
Mutable parameters

◆ referenceSurface_impl()

template<template< typename... > class holder_t>
const Acts::Surface * ActsPlugins::MutablePodioTrackStateContainer< holder_t >::referenceSurface_impl ( IndexType istate) const

Get the reference surface for a track state.

Parameters
istateTrack state index
Returns
Pointer to the reference surface

◆ releaseInto()

template<template< typename... > class holder_t>
void ActsPlugins::MutablePodioTrackStateContainer< holder_t >::releaseInto ( podio::Frame & frame,
const std::string & suffix = "" )

Release collections into a podio frame.

Parameters
frameThe podio frame to release into
suffixOptional suffix for collection names

◆ setReferenceSurface_impl()

template<template< typename... > class holder_t>
void ActsPlugins::MutablePodioTrackStateContainer< holder_t >::setReferenceSurface_impl ( IndexType istate,
std::shared_ptr< const Acts::Surface > surface )

Set the reference surface for a track state.

Parameters
istateTrack state index
surfaceReference surface to set

◆ setUncalibratedSourceLink_impl()

template<template< typename... > class holder_t>
void ActsPlugins::MutablePodioTrackStateContainer< holder_t >::setUncalibratedSourceLink_impl ( IndexType istate,
const Acts::SourceLink & sourceLink )

Set the uncalibrated source link for a track state.

Parameters
istateTrack state index
sourceLinkSource link to set

◆ shareFrom_impl()

template<template< typename... > class holder_t>
void ActsPlugins::MutablePodioTrackStateContainer< holder_t >::shareFrom_impl ( Acts::TrackIndexType iself,
Acts::TrackIndexType iother,
Acts::TrackStatePropMask shareSource,
Acts::TrackStatePropMask shareTarget )

Share data from another track state.

Parameters
iselfIndex of the destination track state
iotherIndex of the source track state
shareSourceComponent to share from source
shareTargetTarget component to share to

◆ size_impl()

template<template< typename... > class holder_t>
IndexType ActsPlugins::MutablePodioTrackStateContainer< holder_t >::size_impl ( ) const

Get the number of track states.

Returns
Number of track states in the container

◆ unset_impl()

template<template< typename... > class holder_t>
void ActsPlugins::MutablePodioTrackStateContainer< holder_t >::unset_impl ( Acts::TrackStatePropMask target,
Acts::TrackIndexType istate )

Unset a track state component.

Parameters
targetComponent to unset
istateTrack state index