 |
Belle II Software
release-05-01-25
|
10 #ifndef BFIELDCOMPONENT3D_H
11 #define BFIELDCOMPONENT3D_H
13 #include <geometry/bfieldmap/BFieldComponentAbs.h>
37 class BFieldComponent3d :
public BFieldComponentAbs {
127 void setErrorRegionR(
double minR = -1.,
double maxR = -1.,
double errBr = 0.0,
double errBphi = 0.0,
double errBz = 0.0)
152 B2Vector3D interpolate(
unsigned int ir,
unsigned int iphi,
unsigned int iz,
double wr,
double wphi,
double wz)
const;
157 std::vector<B2Vector3F>
m_bmap;
std::vector< B2Vector3F > m_bmap
The memory buffer for the magnetic field map.
double m_mapRegionR[2]
The min and max boundaries of the map region in r.
bool m_exRegion
Flag to indicate whether there is a region to exclude.
double m_exRegionR[2]
The min and max boundaries of the excluded region in r.
double m_igridPitch[3]
The inverted grid pitch in r,phi,z.
BFieldComponent3d()=default
The BFieldComponent3d constructor.
virtual B2Vector3D calculate(const B2Vector3D &point) const override
Calculates the magnetic field vector at the specified space point.
virtual void terminate() override
Terminates the magnetic field component.
std::string m_mapEnable
Enable different dimension, "rphiz", "rphi", "phiz" or "rz" >
void setMapSize(int sizeR, int sizePhi, int sizeZ)
Sets the size of the magnetic field map.
double m_mapRegionZ[2]
The min and max boundaries of the map region in z.
double m_exRegionZ[2]
The min and max boundaries of the excluded region in z.
int m_mapSize[3]
The size of the map in r, phi and z.
void setGridPitch(double pitchR, double pitchPhi, double pitchZ)
Sets the grid pitch of the magnetic field map.
bool m_mirrorPhi
Flag to indicate whether there is a region to exclude.
B2Vector3< double > B2Vector3D
typedef for common usage with double
void mirrorPhi(bool mirrorPhi=0.)
void setErrorRegionR(double minR=-1., double maxR=-1., double errBr=0.0, double errBphi=0.0, double errBz=0.0)
Sets the size of the magnetic field map to apply error on B.
Abstract base class for different kinds of events.
void setMapRegionZ(double minZ, double maxZ, double offset)
Sets the size of the magnetic field map.
bool m_interpolate
Flag to switch on/off interpolation >
void enableCoordinate(const std::string &mapEnable="rphiz")
Optino to reduce 3D to 2D map (in coordinates, NOT Br, Bphi, Bz components)
void setMapRegionR(double minR, double maxR)
Sets the size of the magnetic field map.
virtual void initialize() override
Initializes the magnetic field component.
void setExcludeRegionZ(double minZ, double maxZ)
Sets the size of the magnetic field map to exclude.
double m_errB[3]
The error Br, Bphi, Bz as a scale factor (B_new = m_errB * B_old).
std::string m_mapFilename
The filename of the magnetic field map.
void setMapFilename(const std::string &filename)
Sets the filename of the magnetic field map.
double m_gridPitch[3]
The grid pitch in r,phi,z.
virtual ~BFieldComponent3d()=default
The BFieldComponent3d destructor.
void setExcludeRegionR(double minR, double maxR)
Sets the size of the magnetic field map to exclude.
B2Vector3D interpolate(unsigned int ir, unsigned int iphi, unsigned int iz, double wr, double wphi, double wz) const
Interpolate the value of B-field between (ir, iphi, iz) and (ir+1, iphi+1, iz+1) using weights (wr,...
double m_errRegionR[2]
The min and max boundaries of the region in r to apply error.
double m_mapOffset
Offset required because the accelerator group defines the Belle center as zero.
void doInterpolation(bool interpolate=true)