File ImpactPointEstimator.hpp
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
-
struct ImpactParametersAndSigma
- #include <Acts/Vertexing/ImpactPointEstimator.hpp>
-
template<typename input_track_t, typename propagator_t, typename propagator_options_t = PropagatorOptions<>>
class ImpactPointEstimator - #include <Acts/Vertexing/ImpactPointEstimator.hpp>
Estimator for impact point calculations A description of the underlying mathematics can be found here: https://github.com/acts-project/acts/pull/2506 TODO: Upload reference at a better place.
Public Functions
-
inline ImpactPointEstimator(const Config &cfg)
Constructor.
- Parameters
cfg – Configuration object
-
Result<double> calculateDistance(const GeometryContext &gctx, const BoundTrackParameters &trkParams, const Vector3 &vtxPos, State &state) const
Calculates 3D distance between a track and a vertex.
- Parameters
gctx – The geometry context
trkParams – Track parameters
vtxPos – 3D position to calculate the distance to
state – The state object
- Returns
Distance
-
Result<BoundTrackParameters> estimate3DImpactParameters(const GeometryContext &gctx, const Acts::MagneticFieldContext &mctx, const BoundTrackParameters &trkParams, const Vector3 &vtxPos, State &state) const
Estimates the track parameters at the 3D PCA (i.e., a point of minimal 3D distance) to a vertex.
The track parameters are defined wrt a reference plane that has its origin at the vertex position and whose z-axis points in the direction of the track momentum. The plane’s x-axis points approximately from the vertex to the 3D PCA (it is only approximate because we force it to be orthogonal to the z-axis). The y-axis is calculated as a cross product between x- and z-axis.
- Parameters
gctx – The geometry context
mctx – The magnetic field context
trkParams – Track parameters
vtxPos – Reference position (vertex)
state – The state object
- Returns
Track parameters at the 3D PCA
-
Result<double> get3DLifetimeSignOfTrack(const BoundTrackParameters &track, const Vertex<input_track_t> &vtx, const Acts::Vector3 &direction, const GeometryContext &gctx, const MagneticFieldContext &mctx) const
Estimates the sign of the 3D lifetime of a given track w.r.t.
a vertex and a direction (e.g. a jet direction)
- Parameters
track – Track to estimate the IP from
vtx – Vertex the track belongs to
direction – The direction
gctx – The geometry context
mctx – The magnetic field context
- Returns
The value of the 3D lifetime
-
template<unsigned int nDim>
Result<std::pair<Acts::ActsVector<nDim>, Acts::Vector3>> getDistanceAndMomentum(const GeometryContext &gctx, const BoundTrackParameters &trkParams, const ActsVector<nDim> &vtxPos, State &state) const Calculate the distance between a track and a vertex by finding the corresponding 3D PCA.
Returns also the momentum direction at the 3D PCA. The template parameter nDim determines whether we calculate the 3D distance (nDim = 3) or the 4D distance (nDim = 4) to the 3D PCA.
Note
For straight tracks we use an analytical solution; for helical tracks we use the Newton method.
Note
If nDim = 3 we only consider spatial dimensions; if nDim = 4, we also consider time. Other values are not allowed.
- Template Parameters
nDim – Number of dimensions used to compute compatibility
- Parameters
gctx – Geometry context
trkParams – Track parameters
vtxPos – Vertex position
state – The state object
-
Result<ImpactParametersAndSigma> getImpactParameters(const BoundTrackParameters &track, const Vertex<input_track_t> &vtx, const GeometryContext &gctx, const MagneticFieldContext &mctx, bool calculateTimeIP = false) const
Calculates the impact parameters of a track w.r.t.
a vertex. The corresponding errors are approximated by summing the variances of the track and the vertex.
- Parameters
track – Track whose impact parameters are calculated
vtx – Vertex corresponding to the track
gctx – The geometry context
mctx – The magnetic field context
calculateTimeIP – If true, the difference in time is computed
-
Result<std::pair<double, double>> getLifetimeSignOfTrack(const BoundTrackParameters &track, const Vertex<input_track_t> &vtx, const Acts::Vector3 &direction, const GeometryContext &gctx, const MagneticFieldContext &mctx) const
Estimates the sign of the 2D and Z lifetime of a given track w.r.t.
a vertex and a direction (e.g. a jet direction) by propagating the trajectory state towards the vertex position and computing the scalar product with the direction vector
- Parameters
track – Track to estimate the IP from
vtx – Vertex the track belongs to
direction – The direction
gctx – The geometry context
mctx – The magnetic field context
- Returns
A pair holding the sign for the 2D and Z lifetimes
-
template<unsigned int nDim>
Result<double> getVertexCompatibility(const GeometryContext &gctx, const BoundTrackParameters *trkParams, const ActsVector<nDim> &vertexPos) const Estimates the compatibility of a track to a vertex based on their 3D (if nDim = 3) or 4D (if nDim = 4) distance and the track covariance.
Note
Confusingly, a smaller compatibility means that a track is more compatible.
Note
If nDim = 3 we only consider spatial dimensions; if nDim = 4, we also consider time. Other values are not allowed.
- Template Parameters
nDim – Number of dimensions used to compute compatibility
- Parameters
gctx – The Geometry context
trkParams – Track parameters at point of closest approach in 3D as retrieved by estimate3DImpactParameters
vertexPos – The vertex position
- Returns
The compatibility value
Private Functions
-
Result<double> performNewtonOptimization(const Vector3 &helixCenter, const Vector3 &vtxPos, double phi, double theta, double rho) const
Performs a Newton approximation to retrieve a point of closest approach in 3D to a reference position.
Note
Modifying phi corresponds to moving along the track. This function optimizes phi until we reach a 3D PCA.
- Parameters
helixCenter – Position of the helix center
vtxPos – Vertex position
phi – Azimuthal momentum angle
theta – Polar momentum angle (constant along the track)
rho – Signed helix radius
- Returns
Phi value at 3D PCA
-
struct Config
- #include <Acts/Vertexing/ImpactPointEstimator.hpp>
Public Functions
Config constructor if magnetic field is present.
- Parameters
bIn – The magnetic field
prop – The propagator
Config constructor without B field -> uses NullBField provided)
- Parameters
prop – The propagator
Public Members
-
std::shared_ptr<const MagneticFieldProvider> bField
Magnetic field.
-
int maxIterations = 20
Max. number of iterations in Newton method.
-
double precision = 1.e-10
Desired precision of deltaPhi in Newton method.
-
std::shared_ptr<const propagator_t> propagator
Propagator.
-
struct State
- #include <Acts/Vertexing/ImpactPointEstimator.hpp>
State struct.
Public Functions
-
inline State(MagneticFieldProvider::Cache fieldCacheIn)
The state constructor.
- Parameters
fieldCacheIn – The magnetic field cache
Public Members
-
MagneticFieldProvider::Cache fieldCache
Magnetic field cache.
-
inline State(MagneticFieldProvider::Cache fieldCacheIn)
-
inline ImpactPointEstimator(const Config &cfg)
-
struct ImpactParametersAndSigma