Class Acts::NullBField¶
-
class NullBField : public Acts::MagneticFieldProvider¶
Null bfield which returns 0 always.
Public Functions
-
NullBField() = default¶
Default constructor.
-
inline virtual Result<Vector3> getField(const Vector3 &position, MagneticFieldProvider::Cache &cache) const override¶
Retrieve magnetic field value at a given location.
Requires a cache object created through makeCache().
Note
The
position
is ignored and only kept as argument to provide a consistent interface with other magnetic field services.- Parameters
position – [in] global 3D position for the lookup
cache – [inout] Field provider specific cache object
- Returns
magnetic field vector at given position
-
inline virtual Result<Vector3> getFieldGradient(const Vector3 &position, ActsMatrix<3, 3> &derivative, MagneticFieldProvider::Cache &cache) const override¶
Retrieve magnetic field value its its gradient.
Requires a cache object created through makeCache().
Note
The
position
is ignored and only kept as argument to provide a consistent interface with other magnetic field services.Note
currently the derivative is not calculated
- 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
-
inline bool isInside(const Vector3 &position) const¶
check whether given 3D position is inside look-up domain
Note
The method will always return true for the null B-Field
- Parameters
position – [in] global 3D position
- Returns
true
if position is inside the defined look-up grid, otherwisefalse
-
inline virtual Acts::MagneticFieldProvider::Cache makeCache(const Acts::MagneticFieldContext &mctx) const override¶
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
-
struct Cache¶
Public Functions
-
inline Cache(const MagneticFieldContext&)¶
constructor with context
-
inline Cache(const MagneticFieldContext&)¶
-
NullBField() = default¶