|
ACTS
Experiment-independent tracking
|
Magnetic field provider modelling a magnetic field consisting of several (potentially overlapping) regions of constant values. More...
#include <Acts/MagneticField/MultiRangeBField.hpp>
Public Member Functions | |
| MultiRangeBField (const std::vector< BFieldRange > &ranges) | |
| Construct a magnetic field from a vector of ranges. | |
| MultiRangeBField (std::vector< BFieldRange > &&ranges) | |
| Construct from a vector of magnetic field ranges (move version). | |
| Result< Vector3 > | getField (const Vector3 &position, MagneticFieldProvider::Cache &cache) const override |
| Request the value of the magnetic field at a given position. | |
| MagneticFieldProvider::Cache | makeCache (const MagneticFieldContext &mctx) const override |
| Construct a cache object. | |
| Public Member Functions inherited from Acts::MagneticFieldProvider | |
| virtual | ~MagneticFieldProvider ()=default |
Additional Inherited Members | |
| Public Types inherited from Acts::MagneticFieldProvider | |
| using | Cache = Acts::AnyBase<sizeof(char) * 512> |
| Opaque cache type that can store arbitrary implementation specific cache data. | |
Magnetic field provider modelling a magnetic field consisting of several (potentially overlapping) regions of constant values.
The multi-range constant field allows modelling cases where a magnetic field can be described as multiple (potentially overlapping) regions, each of which has its own constant magnetic field. This provides more flexibility than the Acts::ConstantBField while providing higher performance than Acts::InterpolatedBFieldMap.
This magnetic field provider is configured using a list of pairs, where each pair defines a region in three-dimensional space as well as a field vector. Magnetic field lookup then proceeds by finding the last region in the user-provided list that contains the requested coordinate and returning the corresponding field vector.
The implementation uses a simple caching mechanism to store the last matched region, providing improved performance for consecutive lookups within the same region. This is thread-safe when each thread uses its own cache instance. The field configuration itself is immutable after construction.
|
explicit |
Construct a magnetic field from a vector of ranges.
| ranges | Vector of magnetic field ranges to use |
|
explicit |
Construct from a vector of magnetic field ranges (move version).
| ranges | Vector of magnetic field ranges to use (moved) |
|
overridevirtual |
Request the value of the magnetic field at a given position.
| [in] | position | Global 3D position for the lookup. |
| [in,out] | cache | Cache object. |
Implements Acts::MagneticFieldProvider.
|
overridevirtual |
Construct a cache object.
| mctx | Magnetic field context for cache creation |
Implements Acts::MagneticFieldProvider.