|
ATLAS Offline Software
|
Go to the documentation of this file.
31 bxyz[0] = bxyz[1] = bxyz[2] = defaultB;
34 for (
int i = 0;
i < 9;
i++) {
48 defaultField(bxyz, deriv);
52 const double x =
xyz[0];
53 const double y =
xyz[1];
54 const double z =
xyz[2];
55 const double r = std::sqrt(
x *
x +
y *
y);
56 const double phi = std::atan2(
y,
x);
65 defaultField(bxyz, deriv);
78 const size_t condSize =
m_cond->size();
79 for (
size_t i = 0;
i < condSize;
i++) {
92 if (m_fieldMap ==
nullptr) {
93 defaultField(bxyz, deriv);
97 const double x =
xyz[0];
98 const double y =
xyz[1];
99 const double z =
xyz[2];
100 const double r = std::sqrt(
x *
x +
y *
y);
104 if (!m_cacheZR.inside(
z,
r)) {
106 if (!fillFieldCacheZR(
z,
r)) {
110 getField(
xyz, bxyz, deriv);
115 m_cacheZR.getB(
xyz,
r, bxyz, deriv);
void getFieldZR(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field valaue on the z-r plane at given position works only inside the solenoid.
const std::vector< BFieldCond > * m_cond
Pointer to the conductors in the current field zone (to compute Biot-Savart component) Owned by Atlas...
void getB(const double *ATH_RESTRICT xyz, double r, double phi, double *ATH_RESTRICT B, double *ATH_RESTRICT deriv=nullptr) const
const AtlasFieldMap * m_fieldMap
handle to the magnetic field map - not owned
BFieldCache m_cache3d
Full 3d field cell/cache This will be a cell inside a 3d field zone.
bool inside(double z, double r, double phi) const
bool fillFieldCache(double z, double r, double phi)
fill given magnetic field zone */
void getField(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field value at given position xyz[3] is in mm, bxyz[3] is in kT if deriv[9] is given,...