Class Acts::MagneticFieldProvider¶
-
class Acts::MagneticFieldProvider¶
Base class for all magnetic field providers.
Subclassed by Acts::ConstantBField, Acts::InterpolatedMagneticField, Acts::NullBField, Acts::SharedBField< BField >, Acts::SolenoidBField
Public Types
-
using Cache = detail::SmallObjectCache¶
Public Functions
-
inline virtual ~MagneticFieldProvider()¶
-
virtual Result<Vector3> getField(const Vector3 &position, Cache &cache) const = 0¶
retrieve magnetic field value
- Parameters
position – [in] global 3D position
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 gradient
- 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.
- Parameters
mctx – The magnetic field context to generate cache for
- Returns
Cache The opaque cache object
-
using Cache = detail::SmallObjectCache¶