Template Class SharedBField

Class Documentation

template<typename BField>
class Acts::SharedBField

allows to use a shared magnetic field in several places and with multiple steppers mainly targeted to save memory

Public Types

using Cache = typename BField::Cache

Public Functions

SharedBField() = delete

Disallow construction without a valid underlying field.

SharedBField(std::shared_ptr<const BField> bField)

Constructur with a shared pointer from a shared pointer.

Note

Since it is a shared field, we enforce it to be const

Template Parameters
  • bField: is the shared BField to be stored

Vector3D getField(const Vector3D &position) const

retrieve magnetic field value

Return

magnetic field vector at given position

Parameters
  • [in] position: global 3D position

Vector3D getField(const Vector3D &position, Cache &cache) const

Retrieve magnetic field value.

Parameters
  • [in] position: global 3D position

  • [inout] cache: Cache object, passed through to wrapped BField

Vector3D getFieldGradient(const Vector3D &position, ActsMatrixD<3, 3> &derivative) const

retrieve magnetic field value & its gradient

Return

magnetic field vector

Note

currently the derivative is not calculated

Parameters
  • [in] position: global 3D position

  • [out] derivative: gradient of magnetic field vector as (3x3) matrix

Vector3D getFieldGradient(const Vector3D &position, ActsMatrixD<3, 3> &derivative, Cache &cache) const

retrieve magnetic field value & its gradient

Return

magnetic field vector

Note

currently the derivative is not calculated

Parameters
  • [in] position: global 3D position

  • [out] derivative: gradient of magnetic field vector as (3x3) matrix

  • [inout] cache: Cache object, passed through to wrapped BField