ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Magnetic field

Description of magnetic field configurations. More...

+ Collaboration diagram for Magnetic field:

Classes

exception  Acts::ConstantBField
 returns a given constant field value at every point More...
 
class  Acts::InterpolatedBFieldMap< Mapper_t >
 interpolate magnetic field value from field values on a given grid More...
 
exception  Acts::NullBField
 Null bfield which returns 0 always. More...
 
class  Acts::SharedBField< BField >
 allows to use a shared magnetic field in several places and with multiple steppers mainly targeted to save memory More...
 
exception  FW::BField::ScalableBField
 returns a given constant field value at every point More...
 
class  Acts::SolenoidBField
 
struct  Acts::ConstantBField::Cache
 
struct  Acts::InterpolatedBFieldMap< Mapper_t >::Cache
 
struct  Acts::InterpolatedBFieldMap< Mapper_t >::Config
 configuration object for magnetic field interpolation More...
 
struct  Acts::NullBField::Cache
 
struct  Acts::SolenoidBField::Cache
 
struct  Acts::SolenoidBField::Config
 Config struct for the SolenoidBfield. More...
 
struct  FW::BField::ScalableBField::Cache
 

Detailed Description

Description of magnetic field configurations.

This module collects information about classes and typedefs useful for describing different magnetic field configurations.

Acts is independent of the magnetic field implementation used. Algorithms which need magnetic field information (e.g. Acts::RungeKuttaEngine, Acts::AtlasStepper, Acts::EigenStepper) are templated on the magnetic field. The requirements for the magnetic field implementation are the implementation of the following functions:

// retrieve field at given position
Acts::Vector3D getField(const Acts::Vector3D& position) const
// retrieve magnetic field cell at given position
// where Cache is the specific Cache struct defined by the magnetic field implementation
Acts::Vector3D getField(const Acts::Vector3D& position, Cache& cache) const
// retrieve gradient of magnetic field value
Acts::Vector3D getFieldGradient(const Acts::Vector3D& position, Acts::ActsMatrixD<3, 3>& derivative) const
// check whether given 3D position is inside this field cell
bool isInside(const Acts::Vector3D& position) const

Each magnetic field implementation expects to be passed a reference to an implementation specific cache object. This can usually be achieved through typename BField::Cache cache, where BField is a template parameter.

Acts comes with these implementations of this (implicit) interface:

1. Constant magnetic field implementation

Should be used to describe a constant magnetic field. The Acts::ConstantBField returns a given constant magnetic field value at every point and can be set by the user either at construction or with a set function.

2. Interpolated magnetic field implementation

For more complex magnetic field implementations the Acts::InterpolatedBFieldMap can be used.

The Acts::InterpolatedBFieldMap internally uses a field mapper which follows the boost concept Acts::concept::AnyFieldLookup. This allows users to provide their own field mapper implementation using the Acts::InterpolatedBFieldMap interface.

Acts provides a default field mapper implementation: Acts::InterpolatedBFieldMap::FieldMapper, which maps global cartesian 3D positions to magnetic field values. It uses an underlying grid which follows the boost concept Acts::concept::AnyNDimGrid which can be a grid of any dimension and allows users to provide their own grid implementation. Furthermore users also need to provide two functions in order to use the Acts::InterpolatedBFieldMap::FieldMapper:

  1. a function mapping cartesian global 3D coordinates onto the grid coordinates (of dimension N)
  2. a function calculating cartesian global 3D coordinates of the magnetic field with the local N dimensional field and the global 3D position as an input

A default Acts::detail::Grid implementation is provided following the Acts::concept::AnyNDimGrid, which is flexible (using template parameters) on the dimension of the grid and the value stored in the grid.

Two convenience functions in order ease the creation of an Acts::InterpolatedBFieldMap::FieldMapper e.g. when reading in a field map from a file, are provided:

  1. Acts::InterpolatedBFieldMap::FieldMapper<2, 2> fieldMapperRZ()
  2. Acts::InterpolatedBFieldMap::FieldMapper<3, 3> fieldMapperXYZ()

3. SharedBField

Wraps another BField type, which it holds as a shared_ptr. The instance can then be copied without having to duplicate the underlying field implementation. This is useful in the case of a large B-Field map.