File NullBField.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

class NullBField : public Acts::MagneticFieldProvider
#include <Acts/MagneticField/NullBField.hpp>

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

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

  • 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 gradient

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, otherwise false

inline virtual Acts::MagneticFieldProvider::Cache makeCache(const Acts::MagneticFieldContext &mctx) const override

Make an opaque cache for the magnetic field.

Parameters

mctx – The magnetic field context to generate cache for

Returns

Cache The opaque cache object

Private Members

const Vector3 m_BField = Vector3::Zero()

magnetic field vector

struct Cache
#include <Acts/MagneticField/NullBField.hpp>

Public Functions

inline Cache(const MagneticFieldContext&)

constructor with context