![]() |
SHiP Field Service
Framework-agnostic C++20 library exposing SHiP magnetic field maps.
|
Acts::MagneticFieldProvider wrapping an IFieldEvaluator, the ACTS counterpart of G4MagFieldAdapter.
More...
#include <ActsFieldAdapter.h>
Public Types | |
| using | ErrorHandler = std::function< void(std::string_view)> |
Public Member Functions | |
| ActsFieldAdapter (std::shared_ptr< IFieldEvaluator > eval, ErrorHandler on_error={}) | |
| Cache | makeCache (Acts::MagneticFieldContext const &) const override |
| Acts::Result< Acts::Vector3 > | getField (Acts::Vector3 const &position, Cache &) const override |
Acts::MagneticFieldProvider wrapping an IFieldEvaluator, the ACTS counterpart of G4MagFieldAdapter.
Positions go to the evaluator as they come, so pass one in the global frame: wrap map evaluators in translated, and in zeroOutside if lookups past the grid should see no field.
A non-finite position, a non-finite field or an exception from the evaluator fails the lookup with MagneticFieldError::OutOfBounds, so the propagator aborts instead of carrying on with a wrong field. The first such failure is reported to on_error, if given.
| using SHiP::ActsFieldAdapter::ErrorHandler = std::function<void(std::string_view)> |
|
inlineexplicit |
|
inlineoverride |
|
inlineoverride |