ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::AtlasStepper Class Reference

the AtlasStepper implementation for the More...

#include <Acts/Propagator/AtlasStepper.hpp>

Classes

struct  Config
struct  Options
struct  State
 Nested State struct for the local caching. More...

Public Types

using BoundState = std::tuple<BoundTrackParameters, Jacobian, double>
 Type alias for bound state (parameters, jacobian, path length).
using Covariance = BoundSquareMatrix
 Type alias for covariance matrix.
using Jacobian = BoundMatrix
 Type alias for Jacobian matrix.

Public Member Functions

 AtlasStepper (const Config &config)
 Construct AtlasStepper with configuration.
 AtlasStepper (std::shared_ptr< const MagneticFieldProvider > bField)
 Construct AtlasStepper with magnetic field provider.
double absoluteMomentum (const State &state) const
 Absolute momentum accessor.
Result< BoundStateboundState (State &state, const Surface &surface, bool transportCov=true, const FreeToBoundCorrection &freeToBoundCorrection=FreeToBoundCorrection(false)) const
 Create and return the bound state at the current position.
double charge (const State &state) const
 Charge access.
BoundState curvilinearState (State &state, bool transportCov=true) const
 Create and return a curvilinear state at the current position.
Vector3 direction (const State &state) const
 Get particle direction from stepper state.
Result< Vector3getField (State &state, const Vector3 &pos) const
 Get the field for the stepping It checks first if the access is still within the Cell, and updates the cell if necessary, then it takes the field from the cell.
double getStepSize (const State &state, ConstrainedStep::Type stype) const
 Get the step size.
void initialize (State &state, const BoundTrackParameters &par) const
 Initialize stepper state from bound track parameters.
void initialize (State &state, const BoundVector &boundParams, const std::optional< BoundMatrix > &cov, ParticleHypothesis particleHypothesis, const Surface &surface) const
 Initialize stepper state from individual parameters.
State makeState (const Options &options) const
 Create stepper state with given options.
Vector3 momentum (const State &state) const
 Get 3D momentum vector from stepper state.
std::string outputStepSize (const State &state) const
 Output the Step Size - single component.
double overstepLimit (const State &) const
 Overstep limit.
const ParticleHypothesisparticleHypothesis (const State &state) const
 Particle hypothesis.
Vector3 position (const State &state) const
 Get particle position from stepper state.
bool prepareCurvilinearState (State &state) const
 If necessary fill additional members needed for curvilinearState.
double qOverP (const State &state) const
 Get charge over momentum from stepper state.
void releaseStepSize (State &state, ConstrainedStep::Type stype) const
 Release the Step size.
void setIdentityJacobian (State &state) const
 Method that reset the Jacobian to the Identity for when no bound state are available.
Result< double > step (State &state, Direction propDir, const IVolumeMaterial *material) const
 Perform the actual step on the state.
double time (const State &state) const
 Time access.
void transportCovarianceToBound (State &state, const Surface &surface, const FreeToBoundCorrection &=FreeToBoundCorrection(false)) const
 Method for on-demand transport of the covariance to a new curvilinear frame at current position, or direction of the state.
void transportCovarianceToCurvilinear (State &state) const
 Method for on-demand transport of the covariance to a new curvilinear frame at current position, or direction of the state.
void update (State &state, const FreeVector &parameters, const BoundVector &boundParams, const Covariance &covariance, const Surface &surface) const
 The state update method.
void update (State &state, const Vector3 &uposition, const Vector3 &udirection, double qop, double time) const
 Method to update momentum, direction and p.
void updateStepSize (State &state, const NavigationTarget &target, Direction direction, ConstrainedStep::Type stype) const
 Update step size.
void updateStepSize (State &state, double stepSize, ConstrainedStep::Type stype) const
 Update step size - explicitly with a double.
IntersectionStatus updateSurfaceStatus (State &state, const Surface &surface, std::uint8_t index, Direction navDir, const BoundaryTolerance &boundaryTolerance, double surfaceTolerance, ConstrainedStep::Type stype, const Logger &logger=getDummyLogger()) const
 Update surface status.

Detailed Description

the AtlasStepper implementation for the

This is based original stepper code from the ATLAS RungeKuttaPropagator

Member Typedef Documentation

◆ BoundState

Type alias for bound state (parameters, jacobian, path length).

◆ Covariance

Type alias for covariance matrix.

◆ Jacobian

Type alias for Jacobian matrix.

Constructor & Destructor Documentation

◆ AtlasStepper() [1/2]

Acts::AtlasStepper::AtlasStepper ( std::shared_ptr< const MagneticFieldProvider > bField)
explicit

Construct AtlasStepper with magnetic field provider.

Parameters
bFieldShared pointer to magnetic field provider

◆ AtlasStepper() [2/2]

Acts::AtlasStepper::AtlasStepper ( const Config & config)
explicit

Construct AtlasStepper with configuration.

Parameters
configConfiguration containing magnetic field provider and other settings

Member Function Documentation

◆ absoluteMomentum()

double Acts::AtlasStepper::absoluteMomentum ( const State & state) const

Absolute momentum accessor.

Parameters
state[in] The stepping state (thread-local cache)
Returns
Absolute momentum magnitude

◆ boundState()

Result< BoundState > Acts::AtlasStepper::boundState ( State & state,
const Surface & surface,
bool transportCov = true,
const FreeToBoundCorrection & freeToBoundCorrection = FreeToBoundCorrection(false) ) const

Create and return the bound state at the current position.

Parameters
[in]stateState that will be presented as BoundState
[in]surfaceThe surface to which we bind the state
[in]transportCovFlag steering covariance transport
[in]freeToBoundCorrectionCorrection for non-linearity effect during transform from free to bound
Returns
A bound state:
  • the parameters at the surface
  • the stepwise jacobian towards it
  • and the path length (from start - for ordering)

◆ charge()

double Acts::AtlasStepper::charge ( const State & state) const

Charge access.

Parameters
state[in] The stepping state (thread-local cache)
Returns
Electric charge of the particle

◆ curvilinearState()

BoundState Acts::AtlasStepper::curvilinearState ( State & state,
bool transportCov = true ) const

Create and return a curvilinear state at the current position.

Parameters
[in]stateState that will be presented as CurvilinearState
[in]transportCovFlag steering covariance transport
Returns
A curvilinear state:
  • the curvilinear parameters at given position
  • the stepweise jacobian towards it
  • and the path length (from start - for ordering)

◆ direction()

Vector3 Acts::AtlasStepper::direction ( const State & state) const

Get particle direction from stepper state.

Parameters
stateStepper state containing track information
Returns
3D unit direction vector

◆ getField()

Result< Vector3 > Acts::AtlasStepper::getField ( State & state,
const Vector3 & pos ) const

Get the field for the stepping It checks first if the access is still within the Cell, and updates the cell if necessary, then it takes the field from the cell.

Parameters
[in,out]stateis the stepper state associated with the track the magnetic field cell is used (and potentially updated)
[in]posis the field position
Returns
Magnetic field vector at the given position or error

◆ getStepSize()

double Acts::AtlasStepper::getStepSize ( const State & state,
ConstrainedStep::Type stype ) const

Get the step size.

Parameters
state[in] The stepping state (thread-local cache)
stype[in] The step size type to be returned
Returns
Current step size for the specified constraint type

◆ initialize() [1/2]

void Acts::AtlasStepper::initialize ( State & state,
const BoundTrackParameters & par ) const

Initialize stepper state from bound track parameters.

Parameters
stateStepper state to initialize
parBound track parameters containing initial conditions

◆ initialize() [2/2]

void Acts::AtlasStepper::initialize ( State & state,
const BoundVector & boundParams,
const std::optional< BoundMatrix > & cov,
ParticleHypothesis particleHypothesis,
const Surface & surface ) const

Initialize stepper state from individual parameters.

Parameters
stateStepper state to initialize
boundParamsBound track parameter vector
covOptional covariance matrix
particleHypothesisParticle hypothesis (mass, charge)
surfaceReference surface for bound parameters

◆ makeState()

State Acts::AtlasStepper::makeState ( const Options & options) const

Create stepper state with given options.

Parameters
optionsStepper options including magnetic field context
Returns
Stepper state initialized with options and magnetic field cache

◆ momentum()

Vector3 Acts::AtlasStepper::momentum ( const State & state) const

Get 3D momentum vector from stepper state.

Parameters
stateStepper state containing track information
Returns
3D momentum vector

◆ outputStepSize()

std::string Acts::AtlasStepper::outputStepSize ( const State & state) const

Output the Step Size - single component.

Parameters
[in,out]stateThe stepping state (thread-local cache)
Returns
String representation of the current step size

◆ overstepLimit()

double Acts::AtlasStepper::overstepLimit ( const State & ) const

Overstep limit.

Returns
Overstep limit for this stepper (negative value)

◆ particleHypothesis()

const ParticleHypothesis & Acts::AtlasStepper::particleHypothesis ( const State & state) const

Particle hypothesis.

Parameters
state[in] The stepping state (thread-local cache)
Returns
Reference to the particle hypothesis used

◆ position()

Vector3 Acts::AtlasStepper::position ( const State & state) const

Get particle position from stepper state.

Parameters
stateStepper state containing track information
Returns
3D position vector

◆ prepareCurvilinearState()

bool Acts::AtlasStepper::prepareCurvilinearState ( State & state) const

If necessary fill additional members needed for curvilinearState.

Compute path length derivatives in case they have not been computed yet, which is the case if no step has been executed yet.

Parameters
[in,out]stateThe stepping state (thread-local cache)
Returns
true if nothing is missing after this call, false otherwise.

◆ qOverP()

double Acts::AtlasStepper::qOverP ( const State & state) const

Get charge over momentum from stepper state.

Parameters
stateStepper state containing track information
Returns
Charge over momentum (q/p)

◆ releaseStepSize()

void Acts::AtlasStepper::releaseStepSize ( State & state,
ConstrainedStep::Type stype ) const

Release the Step size.

Parameters
[in,out]stateThe stepping state (thread-local cache)
[in]stypeThe step size type to be released

◆ setIdentityJacobian()

void Acts::AtlasStepper::setIdentityJacobian ( State & state) const

Method that reset the Jacobian to the Identity for when no bound state are available.

Parameters
[in,out]stateState of the stepper

◆ step()

Result< double > Acts::AtlasStepper::step ( State & state,
Direction propDir,
const IVolumeMaterial * material ) const

Perform the actual step on the state.

Parameters
[in,out]stateState of the stepper
propDiris the direction of propagation
materialis the optional volume material we are stepping through.
Returns
the result of the step
Note
The state contains the desired step size. It can be negative during backwards track propagation, and since we're using an adaptive algorithm, it can be modified by the stepper class during propagation.

◆ time()

double Acts::AtlasStepper::time ( const State & state) const

Time access.

Parameters
stateThe stepping state to get time from
Returns
Current time coordinate

◆ transportCovarianceToBound()

void Acts::AtlasStepper::transportCovarianceToBound ( State & state,
const Surface & surface,
const FreeToBoundCorrection & = FreeToBoundCorrection(false) ) const

Method for on-demand transport of the covariance to a new curvilinear frame at current position, or direction of the state.

Parameters
[in,out]stateState of the stepper
[in]surfaceis the surface to which the covariance is forwarded to

◆ transportCovarianceToCurvilinear()

void Acts::AtlasStepper::transportCovarianceToCurvilinear ( State & state) const

Method for on-demand transport of the covariance to a new curvilinear frame at current position, or direction of the state.

Parameters
[in,out]stateState of the stepper

◆ update() [1/2]

void Acts::AtlasStepper::update ( State & state,
const FreeVector & parameters,
const BoundVector & boundParams,
const Covariance & covariance,
const Surface & surface ) const

The state update method.

Parameters
[in,out]stateThe stepper state for
[in]parametersThe new free track parameters at start
[in]boundParamsCorresponding bound parameters
[in]covarianceThe updated covariance matrix
[in]surfaceThe surface used to update the pVector

◆ update() [2/2]

void Acts::AtlasStepper::update ( State & state,
const Vector3 & uposition,
const Vector3 & udirection,
double qop,
double time ) const

Method to update momentum, direction and p.

Parameters
stateThe state object
upositionthe updated position
udirectionthe updated direction
qopthe updated momentum value
timethe update time

◆ updateStepSize() [1/2]

void Acts::AtlasStepper::updateStepSize ( State & state,
const NavigationTarget & target,
Direction direction,
ConstrainedStep::Type stype ) const

Update step size.

It checks the status to the reference surface & updates the step size accordingly

Parameters
state[in,out] The stepping state (thread-local cache)
target[in] The NavigationTarget
direction[in] The propagation direction
stype[in] The step size type to be set

◆ updateStepSize() [2/2]

void Acts::AtlasStepper::updateStepSize ( State & state,
double stepSize,
ConstrainedStep::Type stype ) const

Update step size - explicitly with a double.

Parameters
[in,out]stateThe stepping state (thread-local cache)
[in]stepSizeThe step size value
[in]stypeThe step size type to be set

◆ updateSurfaceStatus()

IntersectionStatus Acts::AtlasStepper::updateSurfaceStatus ( State & state,
const Surface & surface,
std::uint8_t index,
Direction navDir,
const BoundaryTolerance & boundaryTolerance,
double surfaceTolerance,
ConstrainedStep::Type stype,
const Logger & logger = getDummyLogger() ) const

Update surface status.

This method intersect the provided surface and update the navigation step estimation accordingly (hence it changes the state). It also returns the status of the intersection to trigger onSurface in case the surface is reached.

Parameters
[in,out]stateThe stepping state (thread-local cache)
[in]surfaceThe surface provided
[in]indexThe surface intersection index
[in]navDirThe navigation direction
[in]boundaryToleranceThe boundary check for this status update
[in]surfaceToleranceSurface tolerance used for intersection
[in]stypeThe step size type to be set
[in]loggerLogger instance to use
Returns
IntersectionStatus indicating how the surface was encountered