File Track.hpp¶
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
Typedefs
-
using ConstTrackAccessor = TrackAccessorBase<T, true>¶
-
using TrackAccessor = TrackAccessorBase<T, false>¶
Functions
-
template<typename track_container_t, typename traj_t>
TrackContainer(track_container_t &container, traj_t &traj) -> TrackContainer<track_container_t, traj_t, detail::RefHolder>¶
-
template<typename track_container_t, typename traj_t>
TrackContainer(track_container_t &&container, traj_t &&traj) -> TrackContainer<track_container_t, traj_t, detail::ValueHolder>¶
-
template<typename T>
struct IsReadOnlyTrackContainer¶ - #include <Acts/EventData/Track.hpp>
-
template<typename T, bool ReadOnly>
struct TrackAccessorBase¶ - #include <Acts/EventData/Track.hpp>
Utility class that eases accessing dynamic columns in track containers.
- Template Parameters
T – the type of the value to access
ReadOnly – true if this is a const accessor
Public Functions
-
inline TrackAccessorBase(HashedString _key)¶
Create the accessor from an already-hashed string key.
- Parameters
_key – the key
-
inline TrackAccessorBase(const std::string &_key)¶
Create the accessor from a string key.
- Parameters
_key – the key
-
template<typename track_proxy_t, bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline T &operator()(track_proxy_t track) const¶ Access the stored key on the track given as an argument.
Mutable version
- Template Parameters
track_proxy_t – the type of the track proxy
- Parameters
track – the track to access
- Returns
mutable reference to the column behind the key
-
template<typename track_proxy_t, bool RO = ReadOnly, typename = std::enable_if_t<RO>>
inline const T &operator()(track_proxy_t track) const¶ Access the stored key on the track given as an argument.
COnst version
- Template Parameters
track_proxy_t – the type of the track proxy
- Parameters
track – the track to access
- Returns
const reference to the column behind the key
Public Members
-
HashedString key¶
-
template<typename track_container_t, typename traj_t, template<typename> class holder_t = detail::RefHolder>
class TrackContainer - #include <Acts/EventData/Track.hpp>
Track container interface class.
This type represents a collections of tracks. It uses a backend to store bothe the actual tracks and the associated track states.
- Template Parameters
track_container_t – the track container backend
traj_t – the track state container backend
holder_t – ownership management class for the backend
Public Types
-
using ConstTrackProxy = detail_tc::TrackProxy<track_container_t, traj_t, holder_t, true>
-
using IndexType = MultiTrajectoryTraits::IndexType
-
using TrackProxy = detail_tc::TrackProxy<track_container_t, traj_t, holder_t, false>
Public Functions
-
inline TrackContainer(holder_t<track_container_t> container, holder_t<traj_t> traj)
Constructor from a track container backend and a track state container backend.
- Parameters
container – the track container backend
traj – the track state container backend
-
template<template<typename> class H = holder_t, typename = std::enable_if_t<detail::is_same_template<H, detail::RefHolder>::value>>
inline TrackContainer(track_container_t &container, traj_t &traj) Constructor from references to a track container backend and to a track state container backend.
Note
The track container will not assume ownership over the backends in this case. You need to ensure suitable lifetime
- Parameters
container – the track container backend
traj – the track state container backend
-
template<typename T, bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline constexpr void addColumn(const std::string &key) Add a dymanic column to the track container.
- Parameters
key – the name of the column to be added
-
template<bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline IndexType addTrack() Add a track to the container.
Note this only creates the logical track and allocates memory. You can combine this with
getTrack
to obtain a track proxy- Returns
the index to the newly added track
-
template<bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline auto begin() Get a mutable iterator to the first track in the container.
- Returns
a mutable iterator to the first track
-
inline auto begin() const
Get an const iterator to the first track in the container.
- Returns
a const iterator to the first track
-
template<bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline auto &container() Get a mutable reference to the track container backend.
- Returns
a mutable reference to the backend
-
inline const auto &container() const
Get a const reference to the track container backend.
- Returns
a const reference to the backend
-
template<bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline auto end() Get a past-the-end iterator for this container.
- Returns
a past-the-end iterator
-
inline auto end() const
Get a past-the-end iterator for this container.
- Returns
a past-the-end iterator
-
inline ConstTrackProxy getTrack(IndexType itrack) const
Get a const track proxy for a track index.
- Parameters
itrack – the track index in the container
- Returns
A const track proxy for the index
-
template<bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline TrackProxy getTrack(IndexType itrack) Get a mutable track proxy for a track index.
- Parameters
itrack – the track index in the container
- Returns
A mutable track proxy for the index
-
inline constexpr bool hasColumn(const std::string &key) const
Check if this track container has a specific dynamic column.
- Parameters
key – the key to check for
-
inline constexpr bool hasColumn(HashedString key) const
Check if a this track container has a specific dynamic column.
- Parameters
key – the key to check for
-
template<bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline void removeTrack(IndexType itrack) Remove a track at index
itrack
from the container.Note
This invalidates all track proxies!
- Parameters
itrack – The index of the track to remmove
-
inline constexpr IndexType size() const
Get the size of the track container.
- Returns
the sixe
-
template<bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline auto &trackStateContainer() Get a mutable reference to the track state container backend.
- Returns
a mutable reference to the backend
-
inline const auto &trackStateContainer() const
Get a const reference to the track state container backend.
- Returns
a const reference to the backend
-
template<bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline auto &trackStateContainerHolder() Retrieve the holder of the track state container.
- Returns
The track state container including it’s holder
-
inline const auto &trackStateContainerHolder() const
Retrieve the holder of the track state container.
- Returns
The track state container including it’s holder
Public Static Attributes
-
static constexpr IndexType kInvalid = MultiTrajectoryTraits::kInvalid
-
static constexpr bool ReadOnly = IsReadOnlyTrackContainer<track_container_t>::value
-
static constexpr bool TrackStateReadOnly = IsReadOnlyMultiTrajectory<traj_t>::value
Protected Functions
-
template<typename T, HashedString key, bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline constexpr T &component(IndexType itrack)¶
-
template<typename T, bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline constexpr T &component(HashedString key, IndexType itrack)¶
-
template<typename T, HashedString key>
inline constexpr const T &component(IndexType itrack) const¶
-
template<typename T>
inline constexpr const T &component(HashedString key, IndexType itrack) const¶
-
template<bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline constexpr TrackProxy::Covariance covariance(IndexType itrack)¶
-
inline constexpr ConstTrackProxy::ConstCovariance covariance(IndexType itrack) const¶
-
template<bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline constexpr TrackProxy::Parameters parameters(IndexType itrack)¶
-
inline constexpr ConstTrackProxy::ConstParameters parameters(IndexType itrack) const¶
-
using ConstTrackAccessor = TrackAccessorBase<T, true>¶