Belle II Software light-2406-ragdoll
BFieldComponentBeamline Class Reference

The BFieldComponentBeamline class. More...

#include <BFieldComponentBeamline.h>

Inheritance diagram for BFieldComponentBeamline:
Collaboration diagram for BFieldComponentBeamline:

Public Member Functions

 BFieldComponentBeamline ()
 The BFieldComponentBeamline constructor.
 
virtual ~BFieldComponentBeamline ()
 The BFieldComponentBeamline destructor.
 
virtual void initialize () override
 Initializes the magnetic field component.
 
virtual ROOT::Math::XYZVector calculate (const ROOT::Math::XYZVector &point) const override
 Calculates the magnetic field vector at the specified space point.
 
virtual void terminate () override
 Terminates the magnetic field component.
 
bool isInRange (const ROOT::Math::XYZVector &point) const
 Check presence of beamline field at the specific space point in the detector coordinate frame.
 
void setMapFilename (const std::string &filename_her, const std::string &filename_ler)
 Sets the filename of the magnetic field map.
 
void setInterpolateFilename (const std::string &filename_her, const std::string &filename_ler)
 Sets the filename of the map for interpolation.
 
void setMapRegionZ (double minZ, double maxZ, double offset=0.)
 Sets the size of the magnetic field map.
 
void setMapRegionR (double minR, double maxR)
 Sets the size of the magnetic field map.
 
void setBeamAngle (double beamAngle)
 Parameter to set Map Region

 

Static Public Member Functions

static BFieldComponentBeamlineInstance ()
 BFieldComponentBeamline instance.
 

Private Attributes

std::string m_mapFilename_her {""}
 Parameter to set Angle of the beam.
 
std::string m_mapFilename_ler {""}
 The filename of the magnetic field map.
 
std::string m_interFilename_her {""}
 The filename of the map for interpolation.
 
std::string m_interFilename_ler {""}
 The filename of the map for interpolation.
 
double m_mapRegionZ [2] {0}
 The min and max boundaries of the map region in z.
 
double m_mapOffset {0}
 Offset required because the accelerator group defines the Belle center as zero.
 
double m_mapRegionR [2] {0}
 The min and max boundaries of the map region in r.
 
double m_sinBeamCrossAngle {0}
 The sin of the crossing angle of the beams

 
double m_cosBeamCrossAngle {1}
 The cos of the crossing angle of the beams

 
BeamlineFieldMapInterpolationm_her {0}
 Actual magnetic field interpolation object for HER.
 
BeamlineFieldMapInterpolationm_ler {0}
 Actual magnetic field interpolation object for LER.
 

Detailed Description

The BFieldComponentBeamline class.

This class represents a magnetic field map around beamline. The magnetic field map is stored as a grid in cylindrical coordinates. It is defined by a minimum radius and a maximum radius, a minimum z and a maximum z value, a pitch size in both, r and z, and the number of grid points. The filename points to the zip file containing the magnetic field map.

Definition at line 31 of file BFieldComponentBeamline.h.

Member Function Documentation

◆ setBeamAngle()

void setBeamAngle ( double  beamAngle)
inline

Parameter to set Map Region

Definition at line 122 of file BFieldComponentBeamline.h.

123 {
124 sincos(beamAngle, &m_sinBeamCrossAngle, &m_cosBeamCrossAngle);
125 }
double m_sinBeamCrossAngle
The sin of the crossing angle of the beams
double m_cosBeamCrossAngle
The cos of the crossing angle of the beams

◆ setInterpolateFilename()

void setInterpolateFilename ( const std::string &  filename_her,
const std::string &  filename_ler 
)
inline

Sets the filename of the map for interpolation.

Definition at line 92 of file BFieldComponentBeamline.h.

93 {
94 m_interFilename_her = filename_her;
95 m_interFilename_ler = filename_ler;
96 };
std::string m_interFilename_ler
The filename of the map for interpolation.
std::string m_interFilename_her
The filename of the map for interpolation.

◆ setMapFilename()

void setMapFilename ( const std::string &  filename_her,
const std::string &  filename_ler 
)
inline

Sets the filename of the magnetic field map.

Parameters
filename_herThe filename of the HER magnetic field map.
filename_lerThe filename of the LER magnetic field map.

Definition at line 83 of file BFieldComponentBeamline.h.

84 {
85 m_mapFilename_her = filename_her;
86 m_mapFilename_ler = filename_ler;
87 };
std::string m_mapFilename_ler
The filename of the magnetic field map.
std::string m_mapFilename_her
Parameter to set Angle of the beam.

◆ setMapRegionR()

void setMapRegionR ( double  minR,
double  maxR 
)
inline

Sets the size of the magnetic field map.

Parameters
minRThe left (min) border of the magnetic field map region in r [cm].
maxRThe right (max) border of the magnetic field map region in r [cm].

Definition at line 116 of file BFieldComponentBeamline.h.

117 {
118 m_mapRegionR[0] = minR;
119 m_mapRegionR[1] = maxR;
120 }
double m_mapRegionR[2]
The min and max boundaries of the map region in r.

◆ setMapRegionZ()

void setMapRegionZ ( double  minZ,
double  maxZ,
double  offset = 0. 
)
inline

Sets the size of the magnetic field map.

Parameters
minZThe left (min) border of the magnetic field map region in z [cm].
maxZThe right (max) border of the magnetic field map region in z [cm].
offsetThe offset in z [cm] which is required because the accelerator group defines the Belle center as zero.

Definition at line 104 of file BFieldComponentBeamline.h.

105 {
106 m_mapRegionZ[0] = minZ;
107 m_mapRegionZ[1] = maxZ;
108 m_mapOffset = offset;
109 }
double m_mapRegionZ[2]
The min and max boundaries of the map region in z.
double m_mapOffset
Offset required because the accelerator group defines the Belle center as zero.

Member Data Documentation

◆ m_cosBeamCrossAngle

double m_cosBeamCrossAngle {1}
private

The cos of the crossing angle of the beams

Definition at line 146 of file BFieldComponentBeamline.h.

◆ m_her

BeamlineFieldMapInterpolation* m_her {0}
private

Actual magnetic field interpolation object for HER.

Definition at line 148 of file BFieldComponentBeamline.h.

◆ m_interFilename_her

std::string m_interFilename_her {""}
private

The filename of the map for interpolation.

Definition at line 134 of file BFieldComponentBeamline.h.

◆ m_interFilename_ler

std::string m_interFilename_ler {""}
private

The filename of the map for interpolation.

Definition at line 136 of file BFieldComponentBeamline.h.

◆ m_ler

BeamlineFieldMapInterpolation* m_ler {0}
private

Actual magnetic field interpolation object for LER.

Definition at line 150 of file BFieldComponentBeamline.h.

◆ m_mapFilename_her

std::string m_mapFilename_her {""}
private

Parameter to set Angle of the beam.

The filename of the magnetic field map.

Definition at line 130 of file BFieldComponentBeamline.h.

◆ m_mapFilename_ler

std::string m_mapFilename_ler {""}
private

The filename of the magnetic field map.

Definition at line 132 of file BFieldComponentBeamline.h.

◆ m_mapOffset

double m_mapOffset {0}
private

Offset required because the accelerator group defines the Belle center as zero.

Definition at line 140 of file BFieldComponentBeamline.h.

◆ m_mapRegionR

double m_mapRegionR[2] {0}
private

The min and max boundaries of the map region in r.

Definition at line 142 of file BFieldComponentBeamline.h.

◆ m_mapRegionZ

double m_mapRegionZ[2] {0}
private

The min and max boundaries of the map region in z.

Definition at line 138 of file BFieldComponentBeamline.h.

◆ m_sinBeamCrossAngle

double m_sinBeamCrossAngle {0}
private

The sin of the crossing angle of the beams

Definition at line 144 of file BFieldComponentBeamline.h.


The documentation for this class was generated from the following files: