Class Acts::AtlasStepper

class AtlasStepper

the AtlasStepper implementation for the

Public Types

using BoundState = std::tuple<BoundTrackParameters, Jacobian, double>
using Covariance = BoundSymMatrix
using CurvilinearState = std::tuple<CurvilinearTrackParameters, Jacobian, double>
using Jacobian = BoundMatrix

Public Functions

inline AtlasStepper(std::shared_ptr<const MagneticFieldProvider> bField)
inline double absoluteMomentum(const State &state) const
inline Result<BoundState> 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
  • state[in] State that will be presented as BoundState

  • surface[in] The surface to which we bind the state

  • transportCov[in] Flag steering covariance transport

  • freeToBoundCorrection[in] Correction 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)

inline double charge(const State &state) const

Charge access.

inline CurvilinearState curvilinearState(State &state, bool transportCov = true) const

Create and return a curvilinear state at the current position.

Parameters
  • state[in] State that will be presented as CurvilinearState

  • transportCov[in] Flag 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)

inline Vector3 direction(const State &state) const
inline Result<Vector3> 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
  • state[inout] is the stepper state associated with the track the magnetic field cell is used (and potentially updated)

  • pos[in] is the field position

inline double 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

template<typename charge_t>
inline State makeState(std::reference_wrapper<const GeometryContext> gctx, std::reference_wrapper<const MagneticFieldContext> mctx, const GenericBoundTrackParameters<charge_t> &par, Direction navDir = Direction::Forward, double ssize = std::numeric_limits<double>::max(), double stolerance = s_onSurfaceTolerance) const
inline Vector3 momentum(const State &state) const
inline std::string outputStepSize(const State &state) const

Output the Step Size - single component.

Parameters

state[inout] The stepping state (thread-local cache)

inline double overstepLimit(const State&) const

Overstep limit.

inline Vector3 position(const State &state) const
inline double qOverP(const State &state) const
inline void releaseStepSize(State &state) const

Release the Step size.

Parameters

state[inout] The stepping state (thread-local cache)

inline void resetState(State &state, const BoundVector &boundParams, const BoundSymMatrix &cov, const Surface &surface, const Direction navDir = Direction::Forward, const double stepSize = std::numeric_limits<double>::max()) const

Resets the state.

Parameters
  • state[inout] State of the stepper

  • boundParams[in] Parameters in bound parametrisation

  • cov[in] Covariance matrix

  • surface[in] Reset state will be on this surface

  • navDir[in] Navigation direction

  • stepSize[in] Step size

inline void setIdentityJacobian(State &state) const

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

Parameters

state[inout] State of the stepper

inline void setStepSize(State &state, double stepSize, ConstrainedStep::Type stype = ConstrainedStep::actor, bool release = true) const

Set Step size - explicitly with a double.

Parameters
  • state[inout] The stepping state (thread-local cache)

  • stepSize[in] The step size value

  • stype[in] The step size type to be set

  • release – [in] Do we release the step size?

template<typename propagator_state_t, typename navigator_t>
inline Result<double> step(propagator_state_t &state, const navigator_t&) const

Perform the actual step on the state.

Parameters

state – is the provided stepper state (caller keeps thread locality)

inline double time(const State &state) const

Time access.

inline 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.

Parameters
  • state[inout] State of the stepper

  • surface[in] is the surface to which the covariance is forwarded to

inline 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.

Parameters

state[inout] State of the stepper

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

The state update method.

Parameters
  • state[inout] The stepper state for

  • parameters[in] The new free track parameters at start

  • boundParams[in] Corresponding bound parameters

  • covariance[in] The updated covariance matrix

  • surface[in] The surface used to update the pVector

inline void update(State &state, const Vector3 &uposition, const Vector3 &udirection, double qop, double time) const

Method to update momentum, direction and p.

Parameters
  • state – The state object

  • uposition – the updated position

  • udirection – the updated direction

  • qop – the updated momentum value

  • time – the update time

template<typename object_intersection_t>
inline void updateStepSize(State &state, const object_intersection_t &oIntersection, bool release = true) 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)

  • oIntersection – [in] The ObjectIntersection to layer, boundary, etc

  • release – [in] boolean to trigger step size release

inline Intersection3D::Status updateSurfaceStatus(State &state, const Surface &surface, const BoundaryCheck &bcheck, const Logger &logger = getDummyLogger(), ActsScalar surfaceTolerance = s_onSurfaceTolerance) 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
  • state[inout] The stepping state (thread-local cache)

  • surface[in] The surface provided

  • bcheck[in] The boundary check for this status update

  • logger[in] Logger instance to use

  • surfaceTolerance[in] Surface tolerance used for intersection

struct State

Nested State struct for the local caching.

Public Functions

State() = delete

Default constructor - deleted.

template<typename Parameters>
inline State(const GeometryContext &gctx, MagneticFieldProvider::Cache fieldCacheIn, const Parameters &pars, Direction ndir = Direction::Forward, double ssize = std::numeric_limits<double>::max(), double stolerance = s_onSurfaceTolerance)

Constructor.

Template Parameters

Type – of TrackParameters

Parameters
  • gctx[in] The geometry context tof this call

  • fieldCacheIn[in] The magnetic field cache for this call

  • pars[in] Input parameters

  • ndir[in] The navigation direction w.r.t. parameters

  • ssize[in] the steps size limitation

  • stolerance[in] is the stepping tolerance

Public Members

Covariance cov = Covariance::Zero()
const Covariance *covariance = nullptr
bool covTransport = false
bool debug = false

Debug output the string where debug messages are stored (optionally)

size_t debugMsgWidth = 50
size_t debugPfxWidth = 30

buffer & formatting for consistent output

std::string debugString = ""
Vector3 field
MagneticFieldProvider::Cache fieldCache

It caches the current magnetic field cell and stays (and interpolates) within as long as this is valid.

See step() code for details.

std::reference_wrapper<const GeometryContext> geoContext

Cache the geometry context.

double jacobian[eBoundSize * eBoundSize] = {}
double maxPathLength = 0
bool mcondition = false
Direction navDir = Direction::Forward
bool needgradient = false
bool newfield = true
double parameters[eBoundSize] = {0., 0., 0., 0., 0., 0.}

Storage pattern of pVector /dL0 /dL1 /dPhi /the /dCM /dT X ->P[0] dX / P[ 8] P[16] P[24] P[32] P[40] P[48] Y ->P[1] dY / P[ 9] P[17] P[25] P[33] P[41] P[49] Z ->P[2] dZ / P[10] P[18] P[26] P[34] P[42] P[50] T ->P[3] dT/ P[11] P[19] P[27] P[35] P[43] P[51] Ax ->P[4] dAx/ P[12] P[20] P[28] P[36] P[44] P[52] Ay ->P[5] dAy/ P[13] P[21] P[29] P[37] P[45] P[53] Az ->P[6] dAz/ P[14] P[22] P[30] P[38] P[46] P[54] CM ->P[7] dCM/ P[15] P[23] P[31] P[39] P[47] P[55] Cache: P[56] - P[59].

double pathAccumulated = 0.
double previousStepSize = 0.
std::array<double, 60> pVector = {}
bool state_ready = false
double step = 0
ConstrainedStep stepSize
double tolerance = s_onSurfaceTolerance

The tolerance for the stepping.

bool useJacobian = false