Class Acts::GenericFreeTrackParameters

template<class charge_t>
class GenericFreeTrackParameters

Track parameters not bound to a surface for a single track.

Parameters and covariance matrix are stored using the free parametrization defined in enum FreeIndices.

Template Parameters

charge_t – Helper type to interpret the particle charge

Public Types

using CovarianceMatrix = FreeSymMatrix
using ParametersVector = FreeVector
using Scalar = ActsScalar

Public Functions

inline GenericFreeTrackParameters(const ParametersVector &params, Scalar q, std::optional<CovarianceMatrix> cov = std::nullopt)

Construct from a parameters vector and particle charge.

In principle, only the charge magnitude is needed her to allow unambiguous extraction of the absolute momentum. The particle charge is required as an input here to be consistent with the other constructors below that that also take the charge as an input. The charge sign is only used in debug builds to check for consistency with the q/p parameter.

Parameters
  • params – Free parameters vector

  • q – Particle charge

  • cov – Free parameters covariance matrix

template<typename T = charge_t, std::enable_if_t<std::is_default_constructible_v<T>, int> = 0>
inline GenericFreeTrackParameters(const ParametersVector &params, std::optional<CovarianceMatrix> cov = std::nullopt)

Construct from a parameters vector.

This constructor is only available if there are no potential charge ambiguities, i.e. the charge interpretation type is default-constructible.

Parameters
  • params – Free parameters vector

  • cov – Free parameters covariance matrix

Template Parameters

T – Internal helper template be able to check charge type

inline GenericFreeTrackParameters(const Vector4 &pos4, Scalar phi, Scalar theta, Scalar p, Scalar q, std::optional<CovarianceMatrix> cov = std::nullopt)

Construct from four-position, angles, absolute momentum, and charge.

Parameters
  • pos4 – Track position/time four-vector

  • phi – Transverse track direction angle

  • theta – Longitudinal track direction angle

  • p – Absolute momentum

  • q – Particle charge

  • cov – Free parameters covariance matrix

template<typename T = charge_t, std::enable_if_t<std::is_default_constructible_v<T>, int> = 0>
inline GenericFreeTrackParameters(const Vector4 &pos4, Scalar phi, Scalar theta, Scalar qOverP, std::optional<CovarianceMatrix> cov = std::nullopt)

Construct from four-position, angles, and charge-over-momentum.

This constructor is only available if there are no potential charge ambiguities, i.e. the charge interpretation type is default-constructible.

Parameters
  • pos4 – Track position/time four-vector

  • phi – Transverse track direction angle

  • theta – Longitudinal track direction angle

  • qOverP – Charge-over-momentum-like parameter

  • cov – Free parameters covariance matrix

GenericFreeTrackParameters() = delete

Parameters are not default constructible due to the charge type.

GenericFreeTrackParameters(const GenericFreeTrackParameters&) = default
GenericFreeTrackParameters(GenericFreeTrackParameters&&) = default
~GenericFreeTrackParameters() = default
inline Scalar absoluteMomentum() const

Absolute momentum.

inline Scalar charge() const

Particle electric charge.

inline const std::optional<CovarianceMatrix> &covariance() const

Optional covariance matrix.

inline Vector4 fourPosition() const

Space-time position four-vector.

template<FreeIndices kIndex>
inline Scalar get() const

Access a single parameter value identified by its index.

Template Parameters

kIndex – Track parameter index

inline Vector3 momentum() const

Momentum three-vector.

GenericFreeTrackParameters &operator=(const GenericFreeTrackParameters&) = default
GenericFreeTrackParameters &operator=(GenericFreeTrackParameters&&) = default
inline const ParametersVector &parameters() const

Parameters vector.

inline Vector3 position() const

Spatial position three-vector.

inline Scalar time() const

Time coordinate.

inline Scalar transverseMomentum() const

Transverse momentum.

inline Vector3 unitDirection() const

Unit direction three-vector, i.e. the normalized momentum three-vector.