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