 |
Belle II Software
release-05-02-19
|
14 #include <geometry/bfieldmap/BFieldComponentAbs.h>
16 #include <framework/geometry/B2Vector3.h>
17 #include <framework/logging/Logger.h>
92 friend struct std::default_delete<
BFieldMap>;
103 BFIELDCOMP* newComponent =
new BFIELDCOMP;
105 return *newComponent;
113 if (std::isnan(point.
X()) || std::isnan(point.
Y()) || std::isnan(point.
Z())) {
114 B2ERROR(
"Bfield requested for a position containing NaN, returning field 0");
119 magFieldVec += comp->calculate(point);
void clear()
Clear the existing components.
bool m_isMapInitialized
If false the map hasn't been initialized yet.
This class represents the magnetic field of the Belle II detector.
DataType Z() const
access variable Z (= .at(2) without boundary check)
void initialize()
Initialize the magnetic field after adding all components.
static BFieldMap & Instance()
Static method to get a reference to the BFieldMap instance.
BFIELDCOMP & addBFieldComponent()
Adds a new BField component to the Belle II magnetic field.
B2Vector3< double > B2Vector3D
typedef for common usage with double
Abstract base class for different kinds of events.
BFieldMap & operator=(const BFieldMap &)
Disable/Hide the copy assignment operator.
B2Vector3D getBField(const B2Vector3D &point) const
Returns the magnetic field of the Belle II detector at the specified space point.
Simple BFieldComponent to just wrap the existing BFieldMap with the new BFieldManager.
BFieldMap()
The constructor is hidden to avoid that someone creates an instance of this class.
virtual ~BFieldMap()
The destructor of the BFieldMap class.
The BFieldComponentAbs class.
DataType X() const
access variable X (= .at(0) without boundary check)
std::list< BFieldComponentAbs * > m_components
The components of the magnetic field.
DataType Y() const
access variable Y (= .at(1) without boundary check)