File MultiComponentBoundTrackParameters.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

class MultiComponentBoundTrackParameters
#include <Acts/EventData/MultiComponentBoundTrackParameters.hpp>

This class is only a light wrapper around a surface and a vector of parameters.

Its main purpose is to provide many constructors for the underlying vector. Most accessors are generated from the BoundTrackParameters equivalent and thus may be expensive

Note

This class holds shared ownership on its reference surface.

Note

The accessors for parameters, covariance, position, etc. are the weighted means of the components.

Note

If all covariances are zero, the accessor for the total covariance does return std::nullopt; TODO Add constructor from range and projector maybe?

Public Types

using CovarianceMatrix = typename Parameters::CovarianceMatrix
using ParametersVector = typename Parameters::ParametersVector
using Scalar = typename Parameters::Scalar

Public Functions

MultiComponentBoundTrackParameters() = delete

Parameters are not default constructible due to the charge type.

MultiComponentBoundTrackParameters(const MultiComponentBoundTrackParameters&) = default
MultiComponentBoundTrackParameters(MultiComponentBoundTrackParameters&&) = default
inline MultiComponentBoundTrackParameters(std::shared_ptr<const Surface> surface, const BoundVector &params, std::optional<BoundSquareMatrix> cov, ParticleHypothesis particleHypothesis)

Construct from a parameters vector on the surface 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
  • surface – Reference surface the parameters are defined on

  • params – Bound parameters vector

  • particleHypothesis – Particle hypothesis for these parameters

  • cov – Bound parameters covariance matrix

template<typename covariance_t>
inline MultiComponentBoundTrackParameters(std::shared_ptr<const Surface> surface, const std::vector<std::tuple<double, BoundVector, covariance_t>> &cmps, ParticleHypothesis particleHypothesis)

Construct from multiple components.

~MultiComponentBoundTrackParameters() = default
inline Scalar absoluteMomentum() const

Absolute momentum.

inline Scalar charge() const

Particle electric charge.

inline const auto &components() const

Access the parameters.

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

Optional covariance matrix.

inline Vector3 direction() const

Unit direction three-vector, i.e.

the normalized momentum three-vector.

inline Vector4 fourPosition(const GeometryContext &geoCtx) const

Space-time position four-vector.

Parameters

geoCtx[in] Geometry context for the local-to-global transformation

template<BoundIndices 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.

MultiComponentBoundTrackParameters &operator=(const MultiComponentBoundTrackParameters&) = default
MultiComponentBoundTrackParameters &operator=(MultiComponentBoundTrackParameters&&) = default
inline std::pair<double, Parameters> operator[](std::size_t i) const

Get the weight and a GenericBoundTrackParameters object for one component.

inline ParametersVector parameters() const

Parameters vector.

inline const ParticleHypothesis &particleHypothesis() const

Particle hypothesis.

inline Scalar phi() const

Phi direction.

inline Vector3 position(const GeometryContext &geoCtx) const

Spatial position three-vector.

Parameters

geoCtx[in] Geometry context for the local-to-global transformation

inline Scalar qOverP() const

Charge over momentum.

inline const Surface &referenceSurface() const

Reference surface onto which the parameters are bound.

inline Scalar theta() const

Theta direction.

inline Scalar time() const

Time coordinate.

inline Scalar transverseMomentum() const

Transverse momentum.

Private Types

using Parameters = BoundTrackParameters
using ParticleHypothesis = Parameters::ParticleHypothesis

Private Functions

template<typename projector_t>
inline auto reduce(projector_t &&proj) const

Helper function to reduce the component vector to a single representation.

Private Members

std::vector<std::tuple<double, BoundVector, std::optional<BoundSquareMatrix>>> m_components
ParticleHypothesis m_particleHypothesis
std::shared_ptr<const Surface> m_surface