11const double HeedFieldMap::conv = 1. / CLHEP::cm;
24 const double x = pt.
v.
x * conv + m_x;
25 const double y = pt.
v.
y * conv + m_y;
26 const double z = pt.
v.
z * conv + m_z;
29 efield =
vec(0., 0., 0.);
30 bfield =
vec(0., 0., 0.);
34 std::cerr <<
"HeedFieldMap::field_map: Sensor not defined.\n";
39 double ex = 0., ey = 0., ez = 0.;
43 efield.x = ex * 1.e-7;
44 efield.y = ey * 1.e-7;
45 efield.z = ez * 1.e-7;
49 double bx = 0., by = 0., bz = 0.;
52 bfield.
x = bx * 1.e-3;
53 bfield.
y = by * 1.e-3;
54 bfield.
z = bz * 1.e-3;
60 const double x = pt.
v.
x * conv + m_x;
61 const double y = pt.
v.
y * conv + m_y;
62 const double z = pt.
v.
z * conv + m_z;
64 if (!m_sensor->
IsInArea(x, y, z))
return false;
67 if (!m_sensor->
GetMedium(x, y, z, m) || !m)
return false;
Abstract base class for media.
void MagneticField(const double x, const double y, const double z, double &bx, double &by, double &bz, int &status)
Get the magnetic field at (x, y, z).
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&medium, int &status)
Get the drift field and potential at (x, y, z).
bool IsInArea(const double x, const double y, const double z)
Check if a point is inside the user area.
bool GetMedium(const double x, const double y, const double z, Medium *&medium)
Get the medium at (x, y, z).
bool inside(const point &pt)
void field_map(const point &pt, vec &efield, vec &bfield, vfloat &mrange) const