 |
Belle II Software
release-05-01-25
|
13 #include <framework/dbobjects/MagneticFieldComponent.h>
21 class MagneticFieldComponent3D final:
public MagneticFieldComponent {
27 int nR,
int nPhi,
int nZ,
28 std::vector<B2Vector3F>&& fieldmap):
30 m_gridPitch{
static_cast<float>((maxR - minR) / (nR - 1)),
static_cast<float>(M_PI / (nPhi - 1)),
static_cast<float>((maxZ - minZ) / (nZ - 1))},
38 const float z = pos.Z();
39 if (z < m_minZ || z >
m_maxZ)
return false;
40 const float r = pos.Perp();
54 B2Vector3D interpolate(
unsigned int ir,
unsigned int iphi,
unsigned int iz,
double wr,
double wphi,
double wz)
const;
float m_maxR
maximal R=sqrt(x^2+y^2) for which this field is present
float m_gridPitch[3]
grid pitch in r, phi and z
ClassDefOverride(MagneticFieldComponent3D, 1)
ROOT dictionary.
B2Vector3D interpolate(unsigned int ir, unsigned int iphi, unsigned int iz, double wr, double wphi, double wz) const
Linear interpolate the magnetic field inside a bin.
MagneticFieldComponent3D()
empty constructor for ROOT
float m_maxZ
maximal Z for which this field is present
B2Vector3D getField(const B2Vector3D &pos) const override
return the field assuming we are inside the active region as returned by inside()
float m_invgridPitch[3]
inverted grid pitch in r, phi and z
std::vector< B2Vector3F > m_bmap
magnetic field strength
float m_minZ
minimal Z for which this field is present
float m_minR
minimal R=sqrt(x^2+y^2) for which this field is present
bool inside(const B2Vector3D &pos) const override
return whether we are inside the active region for this component
int m_mapSize[3]
number of bins in r, phi and z
Abstract base class for different kinds of events.
Describe one component of the Geometry.
Abstract base class for BField components.
MagneticFieldComponent(bool exclusive)
Constructor.