 |
Belle II Software
release-05-02-19
|
14 #include <framework/logging/Logger.h>
15 #include <framework/geometry/B2Vector3.h>
16 #include <framework/gearbox/Unit.h>
17 #include <framework/database/DBObjPtr.h>
18 #include <framework/dbobjects/MagneticField.h>
40 static void getField(
const double* pos,
double* field);
45 static TVector3
getField(
const TVector3& pos)
98 if (!
m_magfield) B2FATAL(
"Could not load magnetic field configuration from database");
static BFieldManager & getInstance()
Return the instance of the magnetic field manager.
static B2Vector3D getField(double x, double y, double z)
return the magnetic field at a given position.
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
Bfield manager to obtain the magnetic field at any point.
B2Vector3D calculate(const B2Vector3D &pos) const
Calculate the field value at a given position and return it.
BFieldManager()=default
Singleton: private constructor.
BFieldManager & operator=(const BFieldManager &)=delete
Singleton: no assignment operator.
void GetXYZ(Double_t *carray) const
directly copies coordinates to an array of double
static B2Vector3D getFieldInTesla(const B2Vector3D &pos)
return the magnetic field at a given position in Tesla.
DBObjPtr< MagneticField > m_magfield
Pointer to the actual magnetic field in the database.
Class for accessing objects in the database.
static const double T
[tesla]
B2Vector3< double > B2Vector3D
typedef for common usage with double
~BFieldManager()=default
Empty destructor: this is just a wrapper to access the database object.
Abstract base class for different kinds of events.