14 const double x = pt.
v.
x * conv + m_x;
15 const double y = pt.
v.
y * conv + m_y;
16 const double z = pt.
v.
z * conv + m_z;
19 efield.x = bfield.
x = 0.;
20 efield.y = bfield.
y = 0.;
21 efield.z = bfield.
z = 0.;
25 std::cerr <<
"HeedFieldMap::field_map: Sensor not defined.\n";
30 double ex = 0., ey = 0., ez = 0.;
34 efield.x = ex * 1.e-7;
35 efield.y = ey * 1.e-7;
36 efield.z = ez * 1.e-7;
40 double bx = 0., by = 0., bz = 0.;
43 bfield.
x = bx * 1.e-3;
44 bfield.
y = by * 1.e-3;
45 bfield.
z = bz * 1.e-3;
51 const double x = pt.
v.
x * conv + m_x;
52 const double y = pt.
v.
y * conv + m_y;
53 const double z = pt.
v.
z * conv + m_z;
55 if (!m_sensor->
IsInArea(x, y, z))
return false;
58 if (!m_sensor->
GetMedium(x, y, z, m) || !m)
return false;
Abstract base class for media.
bool IsIonisable() const
Is charge deposition by charged particles/photon enabled in this medium?
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