ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::GenericBoundTrackParameters< particle_hypothesis_t > Class Template Reference

Track parameters bound to a reference surface for a single track. More...

#include <Acts/EventData/GenericBoundTrackParameters.hpp>

Inheritance diagram for Acts::GenericBoundTrackParameters< particle_hypothesis_t >:
[legend]

Public Types

using CovarianceMatrix = BoundSquareMatrix
 Type alias for bound track covariance matrix.
using ParametersVector = BoundVector
 Type alias for bound track parameters vector.
using ParticleHypothesis = particle_hypothesis_t
 Type alias for particle hypothesis used in reconstruction.

Public Member Functions

template<typename other_particle_hypothesis_t>
 GenericBoundTrackParameters (const GenericBoundTrackParameters< other_particle_hypothesis_t > &other)
 Converts a bound track parameter with a different hypothesis.
 GenericBoundTrackParameters (std::shared_ptr< const Surface > surface, const ParametersVector &params, std::optional< CovarianceMatrix > cov, ParticleHypothesis particleHypothesis)
 Construct from a parameters vector on the surface and particle charge.
double absoluteMomentum () const
 Absolute momentum.
double charge () const
 Particle electric charge.
std::optional< CovarianceMatrix > & covariance ()
 Optional covariance matrix.
const std::optional< CovarianceMatrix > & covariance () const
 Optional covariance matrix.
Vector3 direction () const
 Unit direction three-vector, i.e.
Vector4 fourPosition (const GeometryContext &geoCtx) const
 Space-time position four-vector.
template<BoundIndices kIndex>
double get () const
 Access a single parameter value identified by its index.
std::optional< ActsSquareMatrix< 3 > > impactParameterCovariance () const
 Covariance matrix of the spatial and temporal impact parameters (i.e., of d0, z0, and t).
Vector3 impactParameters () const
 Vector of spatial and temporal impact parameters (i.e., d0, z0, and t).
Vector2 localPosition () const
 Local spatial position two-vector.
Vector3 momentum () const
 Momentum three-vector.
ParametersVectorparameters ()
 Parameters vector.
const ParametersVectorparameters () const
 Parameters vector.
const ParticleHypothesisparticleHypothesis () const
 Particle hypothesis.
double phi () const
 Phi direction.
Vector3 position (const GeometryContext &geoCtx) const
 Spatial position three-vector.
double qOverP () const
 Charge over momentum.
RotationMatrix3 referenceFrame (const GeometryContext &geoCtx) const
 Reference frame in which the local error is defined.
const SurfacereferenceSurface () const
 Reference surface onto which the parameters are bound.
GenericBoundTrackParameters< ParticleHypothesisreflect () const
 Reflect the parameters.
void reflectInPlace ()
 Reflect the parameters in place.
std::optional< ActsSquareMatrix< 2 > > spatialImpactParameterCovariance () const
 Covariance matrix of the spatial impact parameters (i.e., of d0 and z0).
Vector2 spatialImpactParameters () const
 Vector of spatial impact parameters (i.e., d0 and z0).
double theta () const
 Theta direction.
double time () const
 Time coordinate.
GenericBoundTrackParameters< Acts::ParticleHypothesistoBound () const
 Convert this track parameter object to the general type-erased one.
double transverseMomentum () const
 Transverse momentum.

Static Public Member Functions

static Result< GenericBoundTrackParameterscreate (const GeometryContext &geoCtx, std::shared_ptr< const Surface > surface, const Vector4 &pos4, const Vector3 &dir, double qOverP, std::optional< CovarianceMatrix > cov, ParticleHypothesis particleHypothesis, double tolerance=s_onSurfaceTolerance)
 Factory to construct from four-position, direction, absolute momentum, and charge.
static GenericBoundTrackParameters createCurvilinear (const Vector4 &pos4, const Vector3 &dir, double qOverP, std::optional< CovarianceMatrix > cov, ParticleHypothesis particleHypothesis)
 Construct from four-position, direction, and qOverP.
static GenericBoundTrackParameters createCurvilinear (const Vector4 &pos4, double phi, double theta, double qOverP, std::optional< CovarianceMatrix > cov, ParticleHypothesis particleHypothesis)
 Construct from four-position, angles, and qOverP.

Detailed Description

template<class particle_hypothesis_t>
class Acts::GenericBoundTrackParameters< particle_hypothesis_t >

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

Template Parameters
particle_hypothesis_tHelper type to interpret the particle charge/momentum

This is intended as a user-facing data class that adds additional accessors and charge/momentum interpretation on top of the pure parameters vector. All parameters and their corresponding covariance matrix are stored in bound parametrization. The specific definition of the local spatial parameters is defined by the associated surface.

Note
This class holds shared ownership on its reference surface.

Member Typedef Documentation

◆ CovarianceMatrix

template<class particle_hypothesis_t>
using Acts::GenericBoundTrackParameters< particle_hypothesis_t >::CovarianceMatrix = BoundSquareMatrix

Type alias for bound track covariance matrix.

◆ ParametersVector

template<class particle_hypothesis_t>
using Acts::GenericBoundTrackParameters< particle_hypothesis_t >::ParametersVector = BoundVector

Type alias for bound track parameters vector.

◆ ParticleHypothesis

template<class particle_hypothesis_t>
using Acts::GenericBoundTrackParameters< particle_hypothesis_t >::ParticleHypothesis = particle_hypothesis_t

Type alias for particle hypothesis used in reconstruction.

Constructor & Destructor Documentation

◆ GenericBoundTrackParameters() [1/2]

template<class particle_hypothesis_t>
Acts::GenericBoundTrackParameters< particle_hypothesis_t >::GenericBoundTrackParameters ( std::shared_ptr< const Surface > surface,
const ParametersVector & params,
std::optional< CovarianceMatrix > cov,
ParticleHypothesis particleHypothesis )

Construct from a parameters vector on the surface and particle charge.

Parameters
surfaceReference surface the parameters are defined on
paramsBound parameters vector
covBound parameters covariance matrix
particleHypothesisParticle hypothesis

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.

◆ GenericBoundTrackParameters() [2/2]

template<class particle_hypothesis_t>
template<typename other_particle_hypothesis_t>
Acts::GenericBoundTrackParameters< particle_hypothesis_t >::GenericBoundTrackParameters ( const GenericBoundTrackParameters< other_particle_hypothesis_t > & other)
explicit

Converts a bound track parameter with a different hypothesis.

Parameters
otherThe other bound track parameters to convert from

Member Function Documentation

◆ absoluteMomentum()

template<class particle_hypothesis_t>
double Acts::GenericBoundTrackParameters< particle_hypothesis_t >::absoluteMomentum ( ) const

Absolute momentum.

Returns
The absolute momentum magnitude

◆ charge()

template<class particle_hypothesis_t>
double Acts::GenericBoundTrackParameters< particle_hypothesis_t >::charge ( ) const

Particle electric charge.

Returns
The particle electric charge

◆ covariance() [1/2]

template<class particle_hypothesis_t>
std::optional< CovarianceMatrix > & Acts::GenericBoundTrackParameters< particle_hypothesis_t >::covariance ( )

Optional covariance matrix.

Returns
Mutable reference to the optional covariance matrix

◆ covariance() [2/2]

template<class particle_hypothesis_t>
const std::optional< CovarianceMatrix > & Acts::GenericBoundTrackParameters< particle_hypothesis_t >::covariance ( ) const

Optional covariance matrix.

Returns
Const reference to the optional covariance matrix

◆ create()

template<class particle_hypothesis_t>
Result< GenericBoundTrackParameters > Acts::GenericBoundTrackParameters< particle_hypothesis_t >::create ( const GeometryContext & geoCtx,
std::shared_ptr< const Surface > surface,
const Vector4 & pos4,
const Vector3 & dir,
double qOverP,
std::optional< CovarianceMatrix > cov,
ParticleHypothesis particleHypothesis,
double tolerance = s_onSurfaceTolerance )
static

Factory to construct from four-position, direction, absolute momentum, and charge.

Parameters
geoCtxGeometry context for the local-to-global transformation
surfaceReference surface the parameters are defined on
pos4Track position/time four-vector
dirTrack direction three-vector; normalization is ignored
qOverPCharge over momentum
covBound parameters covariance matrix
particleHypothesisParticle hypothesis
toleranceTolerance used for globalToLocal
Returns
Result containing the constructed bound track parameters or error
Note
The returned result indicates whether the free parameters could successfully be converted to on-surface parameters.

◆ createCurvilinear() [1/2]

template<class particle_hypothesis_t>
GenericBoundTrackParameters Acts::GenericBoundTrackParameters< particle_hypothesis_t >::createCurvilinear ( const Vector4 & pos4,
const Vector3 & dir,
double qOverP,
std::optional< CovarianceMatrix > cov,
ParticleHypothesis particleHypothesis )
static

Construct from four-position, direction, and qOverP.

Parameters
pos4Track position/time four-vector
dirTrack direction three-vector; normalization is ignored.
qOverPCharge over momentum
covCurvilinear bound parameters covariance matrix
particleHypothesisParticle hypothesis
Returns
Curvilinear bound track parameters

◆ createCurvilinear() [2/2]

template<class particle_hypothesis_t>
GenericBoundTrackParameters Acts::GenericBoundTrackParameters< particle_hypothesis_t >::createCurvilinear ( const Vector4 & pos4,
double phi,
double theta,
double qOverP,
std::optional< CovarianceMatrix > cov,
ParticleHypothesis particleHypothesis )
static

Construct from four-position, angles, and qOverP.

Parameters
pos4Track position/time four-vector
phiTransverse track direction angle
thetaLongitudinal track direction angle
qOverPCharge over momentum
covCurvilinear bound parameters covariance matrix
particleHypothesisParticle hypothesis
Returns
Curvilinear bound track parameters

◆ direction()

template<class particle_hypothesis_t>
Vector3 Acts::GenericBoundTrackParameters< particle_hypothesis_t >::direction ( ) const

Unit direction three-vector, i.e.

the normalized momentum three-vector.

Returns
Normalized direction vector

◆ fourPosition()

template<class particle_hypothesis_t>
Vector4 Acts::GenericBoundTrackParameters< particle_hypothesis_t >::fourPosition ( const GeometryContext & geoCtx) const

Space-time position four-vector.

Parameters
[in]geoCtxGeometry context for the local-to-global transformation
Returns
Four-dimensional position vector (x, y, z, t) in global coordinates

This uses the associated surface to transform the local position on the surface to globalcoordinates. This requires a geometry context to select the appropriate transformation and might be a computationally expensive operation.

◆ get()

template<class particle_hypothesis_t>
template<BoundIndices kIndex>
double Acts::GenericBoundTrackParameters< particle_hypothesis_t >::get ( ) const

Access a single parameter value identified by its index.

Template Parameters
kIndexTrack parameter index
Returns
The parameter value at the specified index

◆ impactParameterCovariance()

template<class particle_hypothesis_t>
std::optional< ActsSquareMatrix< 3 > > Acts::GenericBoundTrackParameters< particle_hypothesis_t >::impactParameterCovariance ( ) const

Covariance matrix of the spatial and temporal impact parameters (i.e., of d0, z0, and t).

Returns
Optional 3x3 covariance matrix of impact parameters

◆ impactParameters()

template<class particle_hypothesis_t>
Vector3 Acts::GenericBoundTrackParameters< particle_hypothesis_t >::impactParameters ( ) const

Vector of spatial and temporal impact parameters (i.e., d0, z0, and t).

Returns
Three-dimensional vector of impact parameters

◆ localPosition()

template<class particle_hypothesis_t>
Vector2 Acts::GenericBoundTrackParameters< particle_hypothesis_t >::localPosition ( ) const

Local spatial position two-vector.

Returns
Two-dimensional local position vector on the reference surface

◆ momentum()

template<class particle_hypothesis_t>
Vector3 Acts::GenericBoundTrackParameters< particle_hypothesis_t >::momentum ( ) const

Momentum three-vector.

Returns
Three-dimensional momentum vector

◆ parameters() [1/2]

template<class particle_hypothesis_t>
ParametersVector & Acts::GenericBoundTrackParameters< particle_hypothesis_t >::parameters ( )

Parameters vector.

Returns
Mutable reference to the parameters vector

◆ parameters() [2/2]

template<class particle_hypothesis_t>
const ParametersVector & Acts::GenericBoundTrackParameters< particle_hypothesis_t >::parameters ( ) const

Parameters vector.

Returns
Const reference to the parameters vector

◆ particleHypothesis()

template<class particle_hypothesis_t>
const ParticleHypothesis & Acts::GenericBoundTrackParameters< particle_hypothesis_t >::particleHypothesis ( ) const

Particle hypothesis.

Returns
Reference to the particle hypothesis

◆ phi()

template<class particle_hypothesis_t>
double Acts::GenericBoundTrackParameters< particle_hypothesis_t >::phi ( ) const

Phi direction.

Returns
The azimuthal angle phi in radians

◆ position()

template<class particle_hypothesis_t>
Vector3 Acts::GenericBoundTrackParameters< particle_hypothesis_t >::position ( const GeometryContext & geoCtx) const

Spatial position three-vector.

Parameters
[in]geoCtxGeometry context for the local-to-global transformation
Returns
Three-dimensional position vector in global coordinates

This uses the associated surface to transform the local position on the surface to globalcoordinates. This requires a geometry context to select the appropriate transformation and might be a computationally expensive operation.

◆ qOverP()

template<class particle_hypothesis_t>
double Acts::GenericBoundTrackParameters< particle_hypothesis_t >::qOverP ( ) const

Charge over momentum.

Returns
The charge over momentum ratio

◆ referenceFrame()

template<class particle_hypothesis_t>
RotationMatrix3 Acts::GenericBoundTrackParameters< particle_hypothesis_t >::referenceFrame ( const GeometryContext & geoCtx) const

Reference frame in which the local error is defined.

Parameters
[in]geoCtxGeometry context for the local-to-global transformation
Returns
The reference frame rotation matrix

For planar surfaces, this is the transformation local-to-global rotation matrix. For non-planar surfaces, it is the local-to-global rotation matrix of the tangential plane at the track position.

◆ referenceSurface()

template<class particle_hypothesis_t>
const Surface & Acts::GenericBoundTrackParameters< particle_hypothesis_t >::referenceSurface ( ) const

Reference surface onto which the parameters are bound.

Returns
Reference to the bound reference surface

◆ reflect()

template<class particle_hypothesis_t>
GenericBoundTrackParameters< ParticleHypothesis > Acts::GenericBoundTrackParameters< particle_hypothesis_t >::reflect ( ) const

Reflect the parameters.

Returns
Reflected parameters.

◆ reflectInPlace()

template<class particle_hypothesis_t>
void Acts::GenericBoundTrackParameters< particle_hypothesis_t >::reflectInPlace ( )

Reflect the parameters in place.

◆ spatialImpactParameterCovariance()

template<class particle_hypothesis_t>
std::optional< ActsSquareMatrix< 2 > > Acts::GenericBoundTrackParameters< particle_hypothesis_t >::spatialImpactParameterCovariance ( ) const

Covariance matrix of the spatial impact parameters (i.e., of d0 and z0).

Returns
Optional 2x2 covariance matrix of spatial impact parameters

◆ spatialImpactParameters()

template<class particle_hypothesis_t>
Vector2 Acts::GenericBoundTrackParameters< particle_hypothesis_t >::spatialImpactParameters ( ) const

Vector of spatial impact parameters (i.e., d0 and z0).

Returns
Two-dimensional vector of spatial impact parameters

◆ theta()

template<class particle_hypothesis_t>
double Acts::GenericBoundTrackParameters< particle_hypothesis_t >::theta ( ) const

Theta direction.

Returns
The polar angle theta in radians

◆ time()

template<class particle_hypothesis_t>
double Acts::GenericBoundTrackParameters< particle_hypothesis_t >::time ( ) const

Time coordinate.

Returns
The time coordinate value

◆ toBound()

template<class particle_hypothesis_t>
GenericBoundTrackParameters< Acts::ParticleHypothesis > Acts::GenericBoundTrackParameters< particle_hypothesis_t >::toBound ( ) const

Convert this track parameter object to the general type-erased one.

Returns
Type-erased bound track parameters

◆ transverseMomentum()

template<class particle_hypothesis_t>
double Acts::GenericBoundTrackParameters< particle_hypothesis_t >::transverseMomentum ( ) const

Transverse momentum.

Returns
The transverse momentum magnitude