Describe one component of the Geometry.
More...
#include <MagneticFieldComponent3D.h>
|
| | MagneticFieldComponent3D () |
| | empty constructor for ROOT
|
| |
| | MagneticFieldComponent3D (double minR, double maxR, double minZ, double maxZ, int nR, int nPhi, int nZ, std::vector< ROOT::Math::XYZVector > &&fieldmap) |
| | Full constructor to create an object from data.
|
| |
| bool | inside (const ROOT::Math::XYZVector &pos) const override |
| | return whether we are inside the active region for this component
|
| |
| ROOT::Math::XYZVector | getField (const ROOT::Math::XYZVector &pos) const override |
| | return the field assuming we are inside the active region as returned by inside()
|
| |
| void | setExclusive (bool exclusive) |
| | set the state of the exclusive flag
|
| |
| bool | isExclusive () const |
| | returns whether the field is set to exclusive mode
|
| |
|
| ClassDef (MagneticFieldComponent, 1) |
| | ROOT Dictionary.
|
| |
|
| ROOT::Math::XYZVector | 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.
|
| |
|
| ClassDefOverride (MagneticFieldComponent3D, 2) |
| | ROOT dictionary.
|
| |
|
| float | m_minR {0} |
| | minimal R=sqrt(x^2+y^2) for which this field is present
|
| |
| float | m_maxR {0} |
| | maximal R=sqrt(x^2+y^2) for which this field is present
|
| |
| float | m_minZ {0} |
| | minimal Z for which this field is present
|
| |
| float | m_maxZ {0} |
| | maximal Z for which this field is present
|
| |
| int | m_mapSize [3] {0} |
| | number of bins in r, phi and z
|
| |
| float | m_gridPitch [3] {0} |
| | grid pitch in r, phi and z
|
| |
| float | m_invgridPitch [3] {0} |
| | inverted grid pitch in r, phi and z
|
| |
| std::vector< ROOT::Math::XYZVector > | m_bmap |
| | magnetic field strength
|
| |
| bool | m_exclusive {false} |
| | whether or not the component is exclusive
|
| |
Describe one component of the Geometry.
Definition at line 22 of file MagneticFieldComponent3D.h.
◆ MagneticFieldComponent3D() [1/2]
◆ MagneticFieldComponent3D() [2/2]
| MagneticFieldComponent3D |
( |
double | minR, |
|
|
double | maxR, |
|
|
double | minZ, |
|
|
double | maxZ, |
|
|
int | nR, |
|
|
int | nPhi, |
|
|
int | nZ, |
|
|
std::vector< ROOT::Math::XYZVector > && | fieldmap ) |
|
inline |
Full constructor to create an object from data.
Definition at line 27 of file MagneticFieldComponent3D.h.
29 :
30 MagneticFieldComponent(true), m_minR(minR), m_maxR(maxR), m_minZ(minZ), m_maxZ(maxZ), m_mapSize{nR, nPhi, nZ},
31 m_gridPitch{static_cast<float>((maxR - minR) / (nR - 1)), static_cast<float>(M_PI / (nPhi - 1)), static_cast<float>((maxZ - minZ) / (nZ - 1))},
32 m_invgridPitch{static_cast<float>(1. / m_gridPitch[0]), static_cast<float>(1. / m_gridPitch[1]), static_cast<float>(1. / m_gridPitch[2])},
33 m_bmap(fieldmap)
34 {}
◆ inside()
| bool inside |
( |
const ROOT::Math::XYZVector & | pos | ) |
const |
|
inlineoverridevirtual |
return whether we are inside the active region for this component
Implements MagneticFieldComponent.
Definition at line 37 of file MagneticFieldComponent3D.h.
38 {
39 const float z = pos.Z();
40 if (z < m_minZ || z > m_maxZ) return false;
41 const float r = pos.Rho();
42 return (r >= m_minR && r <= m_maxR);
43 }
◆ isExclusive()
| bool isExclusive |
( |
| ) |
const |
|
inlineinherited |
returns whether the field is set to exclusive mode
Definition at line 39 of file MagneticFieldComponent.h.
39{ return m_exclusive; }
◆ setExclusive()
| void setExclusive |
( |
bool | exclusive | ) |
|
|
inlineinherited |
◆ m_bmap
| std::vector<ROOT::Math::XYZVector> m_bmap |
|
private |
◆ m_exclusive
◆ m_gridPitch
◆ m_invgridPitch
| float m_invgridPitch[3] {0} |
|
private |
◆ m_mapSize
◆ m_maxR
◆ m_maxZ
◆ m_minR
◆ m_minZ
The documentation for this class was generated from the following files: