![]() |
Project
|
#include <MagneticFieldAdapter.h>
Inherits Acts::MagneticFieldProvider.
Public Member Functions | |
| MagneticFieldAdapter () | |
| MagneticFieldAdapter (o2::field::MagneticField *field) | |
| Use an explicitly provided field. | |
| Cache | makeCache (const Acts::MagneticFieldContext &mctx) const final |
| Acts::Result< Acts::Vector3 > | getField (const Acts::Vector3 &position, Cache &cache) const final |
| const o2::field::MagneticField * | getO2Field () const |
Exposes the O2 magnetic field to ACTS.
Holds no field of its own: it reads the process-global field that o2::base::Propagator::initFieldFromGRP() installs into TGeoGlobalMagField::Instance() from the GRPMagField CCDB object. The underlying object stays valid across field rescalings – GRPGeomHelper rescales the existing MagneticField in place rather than replacing it – so an adapter built once keeps returning up-to-date values.
Units: O2 works in kGauss and cm, ACTS in its native tesla/mm system, and the conversion is applied here.
Definition at line 42 of file MagneticFieldAdapter.h.
| o2::acts::MagneticFieldAdapter::MagneticFieldAdapter | ( | ) |
Use the field currently installed in TGeoGlobalMagField.
| std::runtime_error | if no field has been initialised |
Definition at line 36 of file MagneticFieldAdapter.cxx.
|
explicit |
Use an explicitly provided field.
Definition at line 41 of file MagneticFieldAdapter.cxx.
|
final |
Definition at line 59 of file MagneticFieldAdapter.cxx.
|
inline |
Definition at line 56 of file MagneticFieldAdapter.h.
|
final |
Definition at line 52 of file MagneticFieldAdapter.cxx.