|
ACTS
Experiment-independent tracking
|
Interpolates magnetic field value from field values on a given grid. More...
#include <Acts/MagneticField/InterpolatedBFieldMap.hpp>
Classes | |
| struct | Cache |
| Cache for field cell to improve performance of field lookups. More... | |
| struct | Config |
| Config structure for the interpolated B field map. More... | |
| struct | FieldCell |
| struct representing smallest grid unit in magnetic field grid More... | |
Public Types | |
| using | FieldType = typename Grid::value_type |
| Type alias for magnetic field vector type. | |
| using | Grid = grid_t |
| Type alias for magnetic field grid. | |
| Public Types inherited from Acts::MagneticFieldProvider | |
| using | Cache = Acts::AnyBase<sizeof(char) * 512> |
| Opaque cache type that can store arbitrary implementation specific cache data. | |
Public Member Functions | |
| InterpolatedBFieldMap (Config cfg) | |
| default constructor | |
| Result< Vector3 > | getField (const Vector3 &position) const |
| retrieve field at given position | |
| Result< Vector3 > | getField (const Vector3 &position, MagneticFieldProvider::Cache &cache) const final |
| Retrieve magnetic field value at a given location. | |
| Result< FieldCell > | getFieldCell (const Vector3 &position) const |
| retrieve field cell for given position | |
| Vector3 | getFieldUnchecked (const Vector3 &position) const final |
| Get magnetic field value without bounds checking (faster). | |
| const Grid & | getGrid () const |
| Get a const reference on the underlying grid structure. | |
| std::vector< double > | getMax () const final |
| get the maximum value of all axes of the field map | |
| std::vector< double > | getMin () const final |
| get the minimum value of all axes of the field map | |
| std::vector< std::size_t > | getNBins () const final |
| get the number of bins for all axes of the field map | |
| bool | isInside (const Vector3 &position) const final |
| check whether given 3D position is inside look-up domain | |
| bool | isInsideLocal (const ActsVector< DIM_POS > &gridPosition) const |
| check whether given 3D position is inside look-up domain | |
| MagneticFieldProvider::Cache | makeCache (const MagneticFieldContext &mctx) const final |
| Make an opaque cache for the magnetic field. | |
| Public Member Functions inherited from Acts::MagneticFieldProvider | |
| virtual | ~MagneticFieldProvider ()=default |
Static Public Attributes | |
| static constexpr std::size_t | DIM_POS = Grid::DIM |
| Dimensionality of the position space for field interpolation. | |
Interpolates magnetic field value from field values on a given grid.
This class implements a magnetic field service which is initialized by a field map defined by:
The magnetic field value for a given global position is then determined by:
Internally, this class uses a field interpolation cell to speed up lookups. This cell contains the interpolation points so the grid does not have to be consulted for each lookup. Explicit methods to create such a field cell are provided, but field cell creation is automatically handled by Acts::InterpolatedBFieldMap::makeCache, opaque to the client.
This class can leverage spatial symmetries in the magnetic field distribution. For cylindrically symmetric fields (e.g., solenoids, toroids), a 2D rz map can be used instead of a full 3D xyz map, significantly reducing memory requirements and improving performance. Helper functions Acts::fieldMapRZ and Acts::fieldMapXYZ are provided to construct field maps with the appropriate symmetries.
| grid_t | The Grid type which provides the field storage and interpolation |
| using Acts::InterpolatedBFieldMap< grid_t >::FieldType = typename Grid::value_type |
Type alias for magnetic field vector type.
| using Acts::InterpolatedBFieldMap< grid_t >::Grid = grid_t |
Type alias for magnetic field grid.
|
explicit |
default constructor
| cfg | Configuration containing grid and scaling factor |
| Result< Vector3 > Acts::InterpolatedBFieldMap< grid_t >::getField | ( | const Vector3 & | position | ) | const |
retrieve field at given position
| [in] | position | global 3D position |
position must lie within the range of the underlying magnetic field map.
|
finalvirtual |
Retrieve magnetic field value at a given location.
Requires an instance of Acts::MagneticFieldProvider::Cache created through makeCache.
| [in] | position | global 3D position for the lookup |
| [in,out] | cache | Field provider specific cache object |
Implements Acts::MagneticFieldProvider.
| Result< FieldCell > Acts::InterpolatedBFieldMap< grid_t >::getFieldCell | ( | const Vector3 & | position | ) | const |
retrieve field cell for given position
| [in] | position | global 3D position |
position must lie within the range of the underlying magnetic field map.
|
finalvirtual |
Get magnetic field value without bounds checking (faster).
| position | Global 3D position for the lookup |
Implements Acts::InterpolatedMagneticField.
| const Grid & Acts::InterpolatedBFieldMap< grid_t >::getGrid | ( | ) | const |
Get a const reference on the underlying grid structure.
|
finalvirtual |
get the maximum value of all axes of the field map
Implements Acts::InterpolatedMagneticField.
|
finalvirtual |
get the minimum value of all axes of the field map
Implements Acts::InterpolatedMagneticField.
|
finalvirtual |
get the number of bins for all axes of the field map
Implements Acts::InterpolatedMagneticField.
|
finalvirtual |
check whether given 3D position is inside look-up domain
| [in] | position | global 3D position |
true if position is inside the defined look-up grid, otherwise false Implements Acts::InterpolatedMagneticField.
| bool Acts::InterpolatedBFieldMap< grid_t >::isInsideLocal | ( | const ActsVector< DIM_POS > & | gridPosition | ) | const |
check whether given 3D position is inside look-up domain
| [in] | gridPosition | local N-D position |
true if position is inside the defined look-up grid, otherwise false
|
finalvirtual |
Make an opaque cache for the magnetic field.
Instructs the specific implementation to generate a Acts::MagneticFieldProvider::Cache instance for magnetic field lookup.
| mctx | The magnetic field context to generate cache for |
Implements Acts::MagneticFieldProvider.
|
staticconstexpr |
Dimensionality of the position space for field interpolation.