 |
Belle II Software
release-05-02-19
|
11 #ifndef BFIELDCOMPONENTQUAD_H
12 #define BFIELDCOMPONENTQUAD_H
14 #include <geometry/bfieldmap/BFieldComponentAbs.h>
37 class BFieldComponentQuad :
public BFieldComponentAbs {
46 typedef std::vector<range_t>
ranges_t;
73 inline double getBx(
double x,
double y)
const {
return x *
mxx + y *
mxy +
mx0;}
82 inline double getBy(
double x,
double y)
const {
return x *
myx + y *
myy +
my0;}
187 inline double getAperture(
double s, std::vector<ApertPoint>::const_iterator hint)
const;
223 std::vector<ParamPoint3 >
m_l3;
virtual void initialize() override
Initializes the magnetic field component.
Quadrupole lense data structure.
double myy
yy coefficents to calculate By
double getAperture(double s, std::vector< ApertPoint >::const_iterator hint) const
Returns the beam pipe aperture at given position.
std::vector< ApertPoint > m_ah
The the aperture parameters for HER.
std::vector< range_t > ranges_t
vector of Range data structure.
double L
element length in [cm]
std::vector< ParamPoint3 > m_h3
The map for HER.
double mx0
x0 coefficents to calculate Bx
std::vector< std::vector< ParamPoint3 >::const_iterator > m_offset_pp_ler
The vector of pointer to accelerate search in maps for ler.
double getApertureLER(double s) const
Returns the LER beam pipe aperture at given position.
std::string m_apertFilenameHER
Filename of the aperture for HER.
double getBy(double x, double y) const
Calculates the Y component of the magnetic field vector at the specified space point from a quadrupol...
BFieldComponentQuad()=default
The BFieldComponentQuad constructor.
double getApertureHER(double s) const
Returns the HER beam pipe aperture at given position.
std::string m_apertFilenameLER
The filename of the aperture for LER.
double my0
y0 coefficents to calculate By
int m_apertSizeHER
The size of the aperture for HER.
double m_maxr2
The square of maximal aperture for fast rejection.
ranges_t m_ranges_her
ranges vector for HER
int m_mapSizeHER
The size of the map for HER.
int m_apertSizeLER
The size of the aperture for LER.
double getBx(double x, double y) const
Calculates the X component of the magnetic field vector at the specified space point from a quadrupol...
double r1
max of the range
double r0
min of the range
double mxx
xx coefficents to calculate Bx
int m_mapSizeLER
The size of the map for LER.
Abstract base class for different kinds of events.
virtual B2Vector3D calculate(const B2Vector3D &point) const override
Calculates the magnetic field vector at the specified space point.
std::vector< ParamPoint3 > m_l3
The map for LER.
int getRange(double a, const ranges_t &b) const
Search for range occuped by optics since now only for ranges are present use linear search.
ranges_t m_ranges_ler
ranges vector for LER
std::vector< ApertPoint > m_al
The the aperture parameters for LER.
double s
length along beamline in [cm]
std::vector< std::vector< ApertPoint >::const_iterator > m_offset_ap_her
The vector of pointer to accelerate search in aperture for her.
std::vector< std::vector< ApertPoint >::const_iterator > m_offset_ap_ler
The vector of pointer to accelerate search in aperture for ler.
ParamPoint3 & operator+=(const ParamPoint3 &t)
Sum up the matrix components of quadrupole lenses.
void setApertSize(int sizeHER, int sizeLER)
Sets the size of the aperture map.
void setMapFilename(const std::string &filenameHER, const std::string &filenameLER, const std::string &filenameHERleak)
Sets the filename of the magnetic field map.
std::string m_mapFilenameHER
Magnetic field map of HER
virtual ~BFieldComponentQuad()=default
The BFieldComponentQuad destructor.
std::vector< std::vector< ParamPoint3 >::const_iterator > m_offset_pp_her
The vector of pointer to accelerate search in maps for her.
std::string m_mapFilenameLER
Magnetic field map of LER
double mxy
xy coefficents to calculate Bx
void setApertFilename(const std::string &filenameHER, const std::string &filenameLER)
Sets the filename of aperture definition file.
std::string m_mapFilenameHERleak
The filename of the magnetic field map.
double myx
yx coefficents to calculate By
int m_mapSizeHERleak
The size of the map.
void setMapSize(int sizeHER, int sizeLER, int sizeHERleak)
Sets the size of the magnetic field map.