Class Acts::MagneticFieldProvider¶
-
class MagneticFieldProvider¶
Base class for all magnetic field providers.
Subclassed by Acts::ConstantBField, Acts::InterpolatedMagneticField, Acts::NullBField, Acts::SolenoidBField
Public Types
-
using Cache = detail::SmallObjectCache¶
Opaque cache type that can store arbitrary implementation specific cache data.
Examples are an interpolation cell, or an experiment specific conditions data handle.
Public Functions
-
inline virtual ~MagneticFieldProvider()¶
-
virtual Result<Vector3> getField(const Vector3 &position, Cache &cache) const = 0¶
Retrieve magnetic field value at a given location.
Requires a cache object created through makeCache().
- Parameters
position – [in] global 3D position for the lookup
cache – [inout] Field provider specific cache object
- Returns
magnetic field vector at given position
-
virtual Result<Vector3> getFieldGradient(const Vector3 &position, ActsMatrix<3, 3> &derivative, Cache &cache) const = 0¶
Retrieve magnetic field value its its gradient.
Requires a cache object created through makeCache().
- Parameters
position – [in] global 3D position
derivative – [out] gradient of magnetic field vector as (3x3) matrix
cache – [inout] Field provider specific cache object
- Returns
magnetic field vector
-
virtual Cache makeCache(const MagneticFieldContext &mctx) const = 0¶
Make an opaque cache for the magnetic field.
Instructs the specific implementation to generate a
Cache
instance for magnetic field lookup.- Parameters
mctx – The magnetic field context to generate cache for
- Returns
Cache The opaque cache object
-
using Cache = detail::SmallObjectCache¶