ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only > Class Template Reference

Proxy class representing a single track. More...

#include <Acts/EventData/TrackProxy.hpp>

Inheritance diagram for Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >:
[legend]
Collaboration diagram for Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >:
[legend]

Public Types

using ConstCovariance
 Same as Covariance, but with const semantics.
using ConstParameters
 Same as Parameters, but with const semantics.
using ConstProxyType = ConstTrackProxy
 Alias for an associated const track proxy, with the same backends.
using ConstTrackProxy
 Alias for the const version of this track proxy, with the same backends.
using ConstTrackStateProxy = typename Trajectory::ConstTrackStateProxy
 Alias for an associated const track state proxy, with the same backends.
using Container = track_container_t
 The track container backend given as a template parameter.
using Covariance
 Map-type for a bound covariance.
using IndexType = TrackIndexType
 The index type of the track container.
using MutableTrackProxy
 Alias for the mutable version of this track proxy, with the same backends.
using Parameters
 Map-type for a bound parameter vector.
using TrackStateProxy = typename Trajectory::TrackStateProxy
 Alias for an associated mutable track state proxy, with the same backends.
using Trajectory = trajectory_t
 The track state container backend given as a template parameter.
Public Types inherited from Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, true >, track_container_t::IndexType, true >
using IndexType
 Index type used for referencing track states.

Public Member Functions

auto & container ()
 Return a reference to the track container backend, mutable version.
const auto & container () const
 Return a reference to the track container backend, const version.
BoundTrackParameters createParametersAtReference () const
 Return the track parameters at the reference surface.
BoundTrackParameters createParametersFromState (const ConstTrackStateProxy &trackState) const
 Convert a track state into track parameters.
bool operator== (const TrackProxy &other) const
 Equality operator with another track proxy Checks the container identity and the track index.
Constructors and assignment operator

Public constructors and assignment operators for TrackProxy only allow construction from another TrackProxy. You should generally not have to construct TrackProxy manually.

 TrackProxy (const TrackProxy &other)=default
 Copy constructor: const to const or mutable to mutable.
TrackProxyoperator= (const TrackProxy &other)=default
 Copy assignment operator: const to const or mutable to mutable.
 TrackProxy (const MutableTrackProxy &other)
 Constructor from mutable track proxy.
TrackProxyoperator= (const MutableTrackProxy &other)
 Copy assignment operator from mutable track proxy.
TrackProxy properties

Methods that give access to the properties of a track represented by TrackProxy.

Many of these methods come in a const and a non-const version. The non-const version is only available if you have an instance of TrackProxy that does not have the read_only template parameter set to true, even if you hold it as an lvalue.

const SurfacereferenceSurface () const
 Get the reference surface of the track (e.g.
void setReferenceSurface (std::shared_ptr< const Surface > srf)
 Set a new reference surface for this track.
bool hasReferenceSurface () const
 Returns whether the track has a reference surface or not.
ConstParameters parameters () const
 Get the parameters of the track at the reference surface (e.g.
ConstCovariance covariance () const
 Get the covariance of the track at the reference surface (e.g.
Parameters parameters ()
 Get the parameters of the track at the reference surface (e.g.
Covariance covariance ()
 Get the covariance of the track at the reference surface (e.g.
ParticleHypothesis particleHypothesis () const
 Get the particle hypothesis.
void setParticleHypothesis (const ParticleHypothesis &particleHypothesis)
 Set a new particle hypothesis for this track.
unsigned int nTrackStates () const
 Return the number of track states associated to this track.
IndexType index () const
 Return the index of this track in the track container.
double absoluteMomentum () const
 Get the absolute momentum.
double charge () const
 Get the charge.
float chi2 () const
 Return the local chi-squared contribution.
float & chi2 ()
 Return a mutable reference to the local chi-squared contribution.
Vector3 direction () const
 Get a unit vector along the track direction at the reference surface.
Vector4 fourMomentum () const
 Get the four-momentum vector: (px, py, pz, e).
double loc0 () const
 Access the loc0 parameter of the track at the reference surface.
double loc1 () const
 Access the loc1 parameter of the track at the reference surface.
Vector3 momentum () const
 Get the global momentum vector.
unsigned int nDoF () const
 Return the number of degrees of freedom.
unsigned int & nDoF ()
 Return a mutable reference to the number of degrees of freedom.
unsigned int nHoles () const
 Return the number of holes on this track.
unsigned int & nHoles ()
 Return a mutable reference to the number of holes.
unsigned int nMeasurements () const
 Return the number of measurements assigned to this track.
unsigned int & nMeasurements ()
 Return a mutable reference to the number of measurements.
unsigned int nOutliers () const
 Return the number of outliers for this track.
unsigned int & nOutliers ()
 Return a mutable reference to the number of outliers.
unsigned int nSharedHits () const
 Return the number of shared hits for this track.
unsigned int & nSharedHits ()
 Return a mutable reference to the number of shared hits.
double phi () const
 Access the phi parameter of the track at the reference surface.
double qOverP () const
 Access the q/p (curvature) parameter of the track at the reference surface.
IndexType stemIndex () const
 Get the stem index, i.e. the innermost track state in the track.
IndexTypestemIndex ()
 Get a mutable reference to the stem index.
double theta () const
 Access the theta parameter of the track at the reference surface.
double time () const
 Access the time parameter of the track at the reference surface.
IndexType tipIndex () const
 Get the tip index, i.e. the entry point into the track state container.
IndexTypetipIndex ()
 Get a mutable reference to the tip index.
double transverseMomentum () const
 Get the transverse momentum.
TrackProxy track state access

Methods that give access to the track states of a track represented by TrackProxy.

ConstTrackStateProxy outermostTrackState () const
 Return a const track state proxy to the outermost track state.
TrackStateProxy outermostTrackState ()
 Return a mutable track state proxy to the outermost track state.
auto innermostTrackState () const
 Return a const track state proxy to the innermost track state.
auto innermostTrackState ()
 Return a mutable track state proxy to the innermost track state.
auto trackStatesReversed () const
 Get a range over the track states of this track.
auto trackStatesReversed ()
 Get a range over the track states of this track.
auto trackStates () const
 Get a range over the track states of this track.
auto trackStates ()
 Get a range over the track states of this track.
TrackProxy track state manipulation

Methods that manipulate the track states of a track represented by TrackProxy.

Copy Methods Overview:

Three main copy methods are available with different behaviors:

  • copyFrom(): Deep copy including all track states (creates new track states)
  • copyFromWithoutStates(): Copy only track properties, invalidate track state indices
  • copyFromShallow(): Shallow copy sharing the same track states (copy indices only)

Choose based on your needs:

  • Use copyFrom() for independent track copies with separate track states
  • Use copyFromWithoutStates() to update track metadata without affecting trajectories
  • Use copyFromShallow() for lightweight copies when track states can be shared
void linkForward ()
 Forward connect a track.
auto appendTrackState (TrackStatePropMask mask=TrackStatePropMask::All)
 Append a track state to this track.
template<TrackProxyConcept track_proxy_t>
requires (!ReadOnly)
void copyFrom (const track_proxy_t &other)
 Create a complete deep copy of another track, including all track states.
template<TrackProxyConcept track_proxy_t>
requires (!ReadOnly)
void copyFromWithoutStates (const track_proxy_t &other)
 Copy track-level properties from another track, but not the track states.
template<TrackProxyConcept track_proxy_t>
requires (!ReadOnly)
void copyFromShallow (const track_proxy_t &other)
 Create a shallow copy from another track, sharing the same track states.
void reverseTrackStates (bool invertJacobians=false)
 Reverse the ordering of track states for this track Afterwards, the previous endpoint of the track state sequence will be the "innermost" track state.
TrackProxy generic component access

Methods that give access to generic components of a track represented by TrackProxy.

Internally, a compile-time hash of the component name is used to identify which component is being requested. Most of the named methods in TrackProxy properties use these methods to retrieve the actual data.

A number of overloads exist, where you can either supply the HashedString key as a template parameter or a runtime argument. The former has the advantage of being guaranteed to be evaluated at compile-time.

template<typename T, HashedString key>
requires (!ReadOnly)
constexpr T & component ()
 Retrieve a mutable reference to a component.
template<typename T>
requires (!ReadOnly)
constexpr T & component (HashedString key)
 Retrieve a mutable reference to a component.
template<typename T>
requires (!ReadOnly)
constexpr T & component (std::string_view key)
 Retrieve a mutable reference to a component.
template<typename T, HashedString key>
constexpr const T & component () const
 Retrieve a const reference to a component.
bool hasColumn (HashedString key) const
 Check whether a dynamic column exists.
template<typename T>
constexpr const T & component (HashedString key) const
 Retrieve a const reference to a component.
template<typename T>
constexpr const T & component (std::string_view key) const
 Retrieve a const reference to a component.
Public Member Functions inherited from Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, true >, track_container_t::IndexType, true >
double absoluteMomentum () const
 Get the absolute momentum.
double charge () const
 Get the charge.
float chi2 () const
 Return the local chi-squared contribution.
Vector3 direction () const
 Get a unit vector along the track direction at the reference surface.
Vector4 fourMomentum () const
 Get the four-momentum vector: (px, py, pz, e).
double loc0 () const
 Access the loc0 parameter of the track at the reference surface.
double loc1 () const
 Access the loc1 parameter of the track at the reference surface.
Vector3 momentum () const
 Get the global momentum vector.
unsigned int nDoF () const
 Return the number of degrees of freedom.
unsigned int nHoles () const
 Return the number of holes on this track.
unsigned int nMeasurements () const
 Return the number of measurements assigned to this track.
unsigned int nOutliers () const
 Return the number of outliers for this track.
unsigned int nSharedHits () const
 Return the number of shared hits for this track.
double phi () const
 Access the phi parameter of the track at the reference surface.
double qOverP () const
 Access the q/p (curvature) parameter of the track at the reference surface.
IndexType stemIndex () const
 Get the stem index, i.e. the innermost track state in the track.
double theta () const
 Access the theta parameter of the track at the reference surface.
double time () const
 Access the time parameter of the track at the reference surface.
IndexType tipIndex () const
 Get the tip index, i.e. the entry point into the track state container.
double transverseMomentum () const
 Get the transverse momentum.

Static Public Attributes

static constexpr IndexType kInvalid = kTrackIndexInvalid
 Sentinel value that indicates an invalid index.
static constexpr bool ReadOnly = read_only
 Indicates whether this track proxy is read-only or if it can be modified.

Additional Inherited Members

Protected Member Functions inherited from Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, true >, track_container_t::IndexType, true >
constexpr TrackProxy< track_container_t, trajectory_t, holder_t, true > & derived ()

Detailed Description

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
class Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >

Proxy class representing a single track.

This class provides a view into an associated TrackContainer, and has reference semantics. You can think of it as a pointer to a vector of tracks, which exposes an object-oriented interface for accessing the track properties.

Template Parameters
track_container_tthe container backend
trajectory_tthe track state container backend
holder_townership management class for the backend
read_onlytrue if this track container is not mutable

Member Typedef Documentation

◆ ConstCovariance

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
using Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::ConstCovariance
Initial value:
typename detail_tsp::FixedSizeTypes<eBoundSize, true>::CovarianceMap

Same as Covariance, but with const semantics.

◆ ConstParameters

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
using Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::ConstParameters
Initial value:
typename detail_tsp::FixedSizeTypes<eBoundSize, true>::CoefficientsMap

Same as Parameters, but with const semantics.

◆ ConstProxyType

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
using Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::ConstProxyType = ConstTrackProxy

Alias for an associated const track proxy, with the same backends.

◆ ConstTrackProxy

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
using Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::ConstTrackProxy
Initial value:
TrackProxy(const TrackProxy &other)=default
Copy constructor: const to const or mutable to mutable.

Alias for the const version of this track proxy, with the same backends.

◆ ConstTrackStateProxy

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
using Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::ConstTrackStateProxy = typename Trajectory::ConstTrackStateProxy

Alias for an associated const track state proxy, with the same backends.

◆ Container

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
using Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::Container = track_container_t

The track container backend given as a template parameter.

◆ Covariance

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
using Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::Covariance
Initial value:
typename detail_tsp::FixedSizeTypes<eBoundSize, false>::CovarianceMap

Map-type for a bound covariance.

This has reference semantics, i.e. points at a matrix by an internal pointer.

◆ IndexType

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
using Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::IndexType = TrackIndexType

The index type of the track container.

◆ MutableTrackProxy

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
using Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::MutableTrackProxy
Initial value:

Alias for the mutable version of this track proxy, with the same backends.

◆ Parameters

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
using Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::Parameters
Initial value:
typename detail_tsp::FixedSizeTypes<eBoundSize, false>::CoefficientsMap

Map-type for a bound parameter vector.

This has reference semantics, i.e. points at a matrix by an internal pointer.

◆ TrackStateProxy

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
using Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::TrackStateProxy = typename Trajectory::TrackStateProxy

Alias for an associated mutable track state proxy, with the same backends.

◆ Trajectory

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
using Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::Trajectory = trajectory_t

The track state container backend given as a template parameter.

Constructor & Destructor Documentation

◆ TrackProxy() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::TrackProxy ( const TrackProxy< track_container_t, trajectory_t, holder_t, read_only > & other)
default

Copy constructor: const to const or mutable to mutable.

Parameters
otherthe other track proxy

◆ TrackProxy() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::TrackProxy ( const MutableTrackProxy< track_container_t, trajectory_t, holder_t, read_only > & other)
explicit

Constructor from mutable track proxy.

Note
Only available if the track proxy is read-only
Parameters
otherthe other track proxy

Member Function Documentation

◆ absoluteMomentum()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
double Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::absoluteMomentum ( ) const

Get the absolute momentum.

Returns
The absolute momentum value

◆ appendTrackState()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
auto Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::appendTrackState ( TrackStatePropMask mask = TrackStatePropMask::All)

Append a track state to this track.

This will modify the tip index to point at the newly created track state, which will be directly after the previous track state at tip index.

Note
Only available if the track proxy is not read-only
Parameters
maskThe allocation prop mask for the new track state
Returns
The newly added track state

◆ charge()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
double Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::charge ( ) const

Get the charge.

Returns
The charge value

◆ chi2() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
float & Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::chi2 ( )

Return a mutable reference to the local chi-squared contribution.

◆ chi2() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
float Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::chi2 ( ) const

Return the local chi-squared contribution.

◆ component() [1/6]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
template<typename T, HashedString key>
requires (!ReadOnly)
T & Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::component ( )
constexpr

Retrieve a mutable reference to a component.

Template Parameters
TThe type of the component to access
keyString key for the component to access
Returns
Mutable reference to the component given by key

◆ component() [2/6]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
template<typename T, HashedString key>
const T & Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::component ( ) const
constexpr

Retrieve a const reference to a component.

Template Parameters
TThe type of the component to access
keyString key for the component to access
Returns
Const reference to the component given by key

◆ component() [3/6]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
template<typename T>
requires (!ReadOnly)
T & Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::component ( HashedString key)
constexpr

Retrieve a mutable reference to a component.

Template Parameters
TThe type of the component to access
Parameters
keyString key for the component to access
Returns
Mutable reference to the component given by key

◆ component() [4/6]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
template<typename T>
const T & Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::component ( HashedString key) const
constexpr

Retrieve a const reference to a component.

Template Parameters
TThe type of the component to access
Parameters
keyString key for the component to access
Returns
Const reference to the component given by key

◆ component() [5/6]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
template<typename T>
requires (!ReadOnly)
T & Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::component ( std::string_view key)
constexpr

Retrieve a mutable reference to a component.

Template Parameters
TThe type of the component to access
Parameters
keyString key for the component to access
Note
This might hash the key at runtime instead of compile-time
Returns
Mutable reference to the component given by key

◆ component() [6/6]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
template<typename T>
const T & Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::component ( std::string_view key) const
constexpr

Retrieve a const reference to a component.

Template Parameters
TThe type of the component to access
Parameters
keyString key for the component to access
Note
This might hash the key at runtime instead of compile-time
Returns
Const reference to the component given by key

◆ container() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
auto & Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::container ( )

Return a reference to the track container backend, mutable version.

Note
Only available if the track proxy is not read-only
Returns
reference to the track container backend

◆ container() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
const auto & Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::container ( ) const

Return a reference to the track container backend, const version.

Returns
reference to the track container backend

◆ copyFrom()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
template<TrackProxyConcept track_proxy_t>
requires (!ReadOnly)
void Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::copyFrom ( const track_proxy_t & other)

Create a complete deep copy of another track, including all track states.

This creates new track states in the destination trajectory and copies all data from the source track states. The track state sequence order is preserved.

Implementation details:

  • Track states are initially copied in reversed order for efficiency
  • The track state links are then updated using reverseTrackStates()
  • As a consequence, the resulting track is forward-linked

What gets copied:

  • All track-level properties (parameters, covariance, particle hypothesis, etc.)
  • Reference surface (shared pointer is copied)
  • Track summary data (nMeasurements, nHoles, chi2, etc.)
  • All dynamic track columns
  • Complete sequence of track states with all their data
  • All dynamic track state columns

Result:

  • The destination track will have newly created track states
  • tipIndex() and stemIndex() will point to the new track states
  • Track state indices will be different from the source
  • All track state data will be identical to the source
  • The track will be forward-linked (stemIndex() will be valid)
Note
Only available if the track proxy is not read-only
Both track containers must have compatible dynamic columns
Template Parameters
track_proxy_tthe other track proxy's type
Parameters
otherThe source track proxy to copy from

◆ copyFromShallow()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
template<TrackProxyConcept track_proxy_t>
requires (!ReadOnly)
void Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::copyFromShallow ( const track_proxy_t & other)

Create a shallow copy from another track, sharing the same track states.

This copies all track-level properties and makes the destination track point to the same track state sequence as the source. The track states themselves are not duplicated - both tracks will reference the same track state objects in memory.

What gets copied:

  • All track-level properties (parameters, covariance, particle hypothesis, etc.)
  • Reference surface (shared pointer is copied)
  • Track summary data (nMeasurements, nHoles, chi2, etc.)
  • All dynamic track columns
  • tipIndex() and stemIndex() (track state linking information)

What gets shared (not duplicated):

  • Track states (both tracks reference the same track state objects)

Result:

  • The destination track will have the same nTrackStates() as the source
  • Both tracks will iterate over the same track state sequence
  • Modifications to track states will be visible in both tracks
  • Track state indices will be identical between tracks
  • The destination track will have a different track index than the source
Warning
Modifying track states through either track will affect both tracks since they share the same track state objects
It is the user's responsibility to ensure that the tip and stem indices from the source track are valid in the destination track's track state container. No validation is performed - invalid indices will lead to undefined behavior when accessing track states
Note
Only available if the track proxy is not read-only
Both track containers must have compatible dynamic columns
Template Parameters
track_proxy_tthe other track proxy's type
Parameters
otherThe source track proxy to create a shallow copy from

◆ copyFromWithoutStates()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
template<TrackProxyConcept track_proxy_t>
requires (!ReadOnly)
void Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::copyFromWithoutStates ( const track_proxy_t & other)

Copy track-level properties from another track, but not the track states.

This copies all track metadata and properties but leaves the track state sequence unchanged. Useful when you want to copy track properties to an existing track that may already have track states.

What gets copied:

  • Track parameters at reference surface
  • Covariance matrix at reference surface
  • Particle hypothesis
  • Reference surface (shared pointer is copied)
  • Track summary data (nMeasurements, nHoles, nOutliers, nSharedHits, chi2, nDoF)
  • All dynamic track columns

What does NOT get copied:

  • Track states (existing track states remain unchanged in the container)

Result:

  • All track-level properties are updated to match the source
  • tipIndex() and stemIndex() are set to kInvalid (track states become inaccessible)
  • Existing track states remain in the container but are no longer linked to this track
  • nTrackStates() will return 0 due to invalid indices
Note
Only available if the track proxy is not read-only
Both track containers must have compatible dynamic columns
Template Parameters
track_proxy_tthe other track proxy's type
Parameters
otherThe source track proxy to copy properties from

◆ covariance() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
Covariance Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::covariance ( )

Get the covariance of the track at the reference surface (e.g.

perigee). Mutable version

Note
Only available if the track proxy is not read-only
Returns
Proxy matrix for the covariance

◆ covariance() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
ConstCovariance Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::covariance ( ) const

Get the covariance of the track at the reference surface (e.g.

perigee). Const version

Returns
Proxy matrix for the covariance

◆ createParametersAtReference()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
BoundTrackParameters Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::createParametersAtReference ( ) const

Return the track parameters at the reference surface.

Note
The parameters are created on the fly
Returns
the track parameters

◆ createParametersFromState()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
BoundTrackParameters Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::createParametersFromState ( const ConstTrackStateProxy & trackState) const

Convert a track state into track parameters.

Note
The parameters are created on the fly
Parameters
trackStateTrack state to convert to parameters
Returns
the track parameters

◆ direction()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
Vector3 Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::direction ( ) const

Get a unit vector along the track direction at the reference surface.

Returns
The direction unit vector

◆ fourMomentum()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
Vector4 Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::fourMomentum ( ) const

Get the four-momentum vector: (px, py, pz, e).

Returns
the four-momentum vector

◆ hasColumn()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
bool Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::hasColumn ( HashedString key) const

Check whether a dynamic column exists.

Parameters
keyString key for the component to check
Returns
whether the column exists

◆ hasReferenceSurface()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
bool Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::hasReferenceSurface ( ) const

Returns whether the track has a reference surface or not.

Returns
whether a surface exists or not

◆ index()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
IndexType Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::index ( ) const

Return the index of this track in the track container.

Note
This is separate from the tip index
Returns
the track index

◆ innermostTrackState() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
auto Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::innermostTrackState ( )

Return a mutable track state proxy to the innermost track state.

Note
This is only available, if the track is forward linked
Only available if the track proxy is not read-only
Returns
The innermost track state proxy

◆ innermostTrackState() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
auto Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::innermostTrackState ( ) const

Return a const track state proxy to the innermost track state.

Note
This is only available, if the track is forward linked
Returns
The innermost track state proxy

◆ linkForward()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
void Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::linkForward ( )

Forward connect a track.

This means setting indices from the inside out on all track states.

Note
Only available if the track proxy is not read-only

◆ loc0()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
double Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::loc0 ( ) const

Access the loc0 parameter of the track at the reference surface.

Returns
The loc0 parameter

◆ loc1()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
double Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::loc1 ( ) const

Access the loc1 parameter of the track at the reference surface.

Returns
The loc1 parameter

◆ momentum()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
Vector3 Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::momentum ( ) const

Get the global momentum vector.

Returns
the global momentum vector

◆ nDoF() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
unsigned int & Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::nDoF ( )

Return a mutable reference to the number of degrees of freedom.

◆ nDoF() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
unsigned int Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::nDoF ( ) const

Return the number of degrees of freedom.

◆ nHoles() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
unsigned int & Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::nHoles ( )

Return a mutable reference to the number of holes.

◆ nHoles() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
unsigned int Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::nHoles ( ) const

Return the number of holes on this track.

◆ nMeasurements() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
unsigned int & Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::nMeasurements ( )

Return a mutable reference to the number of measurements.

◆ nMeasurements() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
unsigned int Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::nMeasurements ( ) const

Return the number of measurements assigned to this track.

◆ nOutliers() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
unsigned int & Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::nOutliers ( )

Return a mutable reference to the number of outliers.

◆ nOutliers() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
unsigned int Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::nOutliers ( ) const

Return the number of outliers for this track.

◆ nSharedHits() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
unsigned int & Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::nSharedHits ( )

Return a mutable reference to the number of shared hits.

◆ nSharedHits() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
unsigned int Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::nSharedHits ( ) const

Return the number of shared hits for this track.

◆ nTrackStates()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
unsigned int Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::nTrackStates ( ) const

Return the number of track states associated to this track.

Note
This is calculated by iterating over the track states which is somewhat expensive. Consider caching this value if you need It more than once.
Returns
The number of track states

◆ operator=() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
TrackProxy & Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::operator= ( const MutableTrackProxy< track_container_t, trajectory_t, holder_t, read_only > & other)

Copy assignment operator from mutable track proxy.

Note
Only available if the track proxy is read-only
Parameters
otherthe other track proxy
Returns
reference to this track proxy

◆ operator=() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
TrackProxy & Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::operator= ( const TrackProxy< track_container_t, trajectory_t, holder_t, read_only > & other)
default

Copy assignment operator: const to const or mutable to mutable.

Parameters
otherthe other track proxy
Returns
reference to this track proxy

◆ operator==()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
bool Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::operator== ( const TrackProxy< track_container_t, trajectory_t, holder_t, read_only > & other) const

Equality operator with another track proxy Checks the container identity and the track index.

Parameters
otherOther track proxy to compare with
Returns
True if the track proxies refer to the same track

◆ outermostTrackState() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
TrackStateProxy Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::outermostTrackState ( )

Return a mutable track state proxy to the outermost track state.

Returns
The outermost track state proxy

◆ outermostTrackState() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
ConstTrackStateProxy Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::outermostTrackState ( ) const

Return a const track state proxy to the outermost track state.

Returns
The outermost track state proxy

◆ parameters() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
Parameters Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::parameters ( )

Get the parameters of the track at the reference surface (e.g.

perigee). Mutable version

Note
Only available if the track proxy is not read-only
Returns
Proxy vector for the parameters

◆ parameters() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
ConstParameters Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::parameters ( ) const

Get the parameters of the track at the reference surface (e.g.

perigee). Const version

Returns
Proxy vector for the parameters

◆ particleHypothesis()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
ParticleHypothesis Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::particleHypothesis ( ) const

Get the particle hypothesis.

Returns
the particle hypothesis

◆ phi()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
double Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::phi ( ) const

Access the phi parameter of the track at the reference surface.

Returns
The phi parameter

◆ qOverP()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
double Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::qOverP ( ) const

Access the q/p (curvature) parameter of the track at the reference surface.

Returns
The q/p parameter

◆ referenceSurface()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
const Surface & Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::referenceSurface ( ) const

Get the reference surface of the track (e.g.

the perigee)

Returns
the reference surface

◆ reverseTrackStates()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
void Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::reverseTrackStates ( bool invertJacobians = false)

Reverse the ordering of track states for this track Afterwards, the previous endpoint of the track state sequence will be the "innermost" track state.

Note
Only available if the track proxy is not read-only
This is dangerous with branching track state sequences, as it will break them
This also automatically forward-links the track!
Parameters
invertJacobiansWhether to invert the Jacobians of the track states

◆ setParticleHypothesis()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
void Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::setParticleHypothesis ( const ParticleHypothesis & particleHypothesis)

Set a new particle hypothesis for this track.

Note
Only available if the track proxy is not read-only
Parameters
particleHypothesisThe particle hypothesis to set

◆ setReferenceSurface()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
void Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::setReferenceSurface ( std::shared_ptr< const Surface > srf)

Set a new reference surface for this track.

Parameters
srfThe surface to set

◆ stemIndex() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
IndexType & Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::stemIndex ( )

Get a mutable reference to the stem index.

◆ stemIndex() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
IndexType Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::stemIndex ( ) const

Get the stem index, i.e. the innermost track state in the track.

◆ theta()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
double Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::theta ( ) const

Access the theta parameter of the track at the reference surface.

Returns
The theta parameter

◆ time()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
double Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::time ( ) const

Access the time parameter of the track at the reference surface.

Returns
The time parameter

◆ tipIndex() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
IndexType & Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::tipIndex ( )

Get a mutable reference to the tip index.

◆ tipIndex() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
IndexType Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::tipIndex ( ) const

Get the tip index, i.e. the entry point into the track state container.

◆ trackStates() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
auto Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::trackStates ( )

Get a range over the track states of this track.

Return value is compatible with range based for loop. This overload returns a mutable track state range, which means you can modify the track states obtained in the iteration.

Note
Only available if the track proxy is not read-only
This range is from the inside out!
Warning
This access direction is only possible if the track states are forward-linked.
Returns
Track state range to iterate over

◆ trackStates() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
auto Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::trackStates ( ) const

Get a range over the track states of this track.

Return value is compatible with range based for loop. This overload returns a const-only track state range, which means you cannot modify the track states obtained in the iteration.

Note
This range is from the inside out!
Warning
This access direction is only possible if the track states are forward-linked.
Returns
Track state range to iterate over

◆ trackStatesReversed() [1/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
auto Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::trackStatesReversed ( )

Get a range over the track states of this track.

Return value is compatible with range based for loop. Mutable version

Note
Only available if the track proxy is not read-only
This range is from the outside inwards!
Returns
Track state range to iterate over

◆ trackStatesReversed() [2/2]

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
auto Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::trackStatesReversed ( ) const

Get a range over the track states of this track.

Return value is compatible with range based for loop. Const version

Note
This range is from the outside inwards!
Returns
Track state range to iterate over

◆ transverseMomentum()

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
double Acts::TrackProxyCommon< TrackProxy< track_container_t, trajectory_t, holder_t, read_only >, typename track_container_t::IndexType, read_only >::transverseMomentum ( ) const

Get the transverse momentum.

Returns
The transverse momentum value

Member Data Documentation

◆ kInvalid

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
IndexType Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::kInvalid = kTrackIndexInvalid
staticconstexpr

Sentinel value that indicates an invalid index.

◆ ReadOnly

template<typename track_container_t, typename trajectory_t, template< typename > class holder_t, bool read_only = true>
bool Acts::TrackProxy< track_container_t, trajectory_t, holder_t, read_only >::ReadOnly = read_only
staticconstexpr

Indicates whether this track proxy is read-only or if it can be modified.