12#ifndef LITFIELDREGION_H_
13#define LITFIELDREGION_H_
50 T dz1 = B1z - B0z, dz2 = B2z - B0z;
51 T det =
rcp(T(dz1 * dz2 * (dz2 - dz1)));
57 T dB1 = B1.
Bx - B0.
Bx;
58 T dB2 = B2.
Bx - B0.
Bx;
60 cx1 = dB1 * w11 + dB2 * w12;
61 cx2 = dB1 * w21 + dB2 * w22;
66 cy1 = dB1 * w11 + dB2 * w12;
67 cy2 = dB1 * w21 + dB2 * w22;
72 cz1 = dB1 * w11 + dB2 * w12;
73 cz2 = dB1 * w21 + dB2 * w22;
89 T dzi =
rcp(T(B1z - B0z));
109 cx0 += (
cx1 + cx2dz) * dz;
110 cy0 += (
cy1 + cy2dz) * dz;
111 cz0 += (
cz1 + cz2dz) * dz;
112 cx1 += cx2dz + cx2dz;
113 cy1 += cy2dz + cy2dz;
114 cz1 += cz2dz + cz2dz;
Storage for field approximation along Z.
void Set(const LitFieldValue< T > &B0, const T B0z, const LitFieldValue< T > &B1, const T B1z, const LitFieldValue< T > &B2, const T B2z)
Sets field region using three field values.
void GetFieldValue(const T &z, LitFieldValue< T > &B) const
Returns field value at a certain Z position.
void Set(const LitFieldValue< T > &B0, const T B0z, const LitFieldValue< T > &B1, const T B1z)
Sets field region using two field values.
Magnetic field value at a certain point in the space.
class lit::parallel::LitDetectorLayout _fvecalignment
fscal rcp(const fscal &a)
Returns reciprocal.