1#ifndef G_COMPONENT_CONSTANT_H
2#define G_COMPONENT_CONSTANT_H
28 const std::string label);
35 void SetArea(
const double xmin,
const double ymin,
const double zmin,
36 const double xmax,
const double ymax,
const double zmax);
42 Medium*
GetMedium(
const double x,
const double y,
const double z)
override;
43 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
44 double& ey,
double& ez, Medium*& m,
int& status)
override;
45 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
46 double& ey,
double& ez,
double& v, Medium*& m,
47 int& status)
override;
48 using Component::ElectricField;
51 double& wx,
double& wy,
double& wz,
52 const std::string& label)
override;
54 const std::string& label)
override;
57 double& ymax,
double& zmax)
override;
61 std::array<double, 3>
m_efield = {{0., 0., 0.}};
75 std::array<double, 3>
m_wfield = {{0., 0., 0.}};
84 std::array<double, 3>
m_xmin = {{0., 0., 0.}};
85 std::array<double, 3>
m_xmax = {{0., 0., 0.}};
94 bool InArea(
const double x,
const double y,
const double z) {
double WeightingPotential(const double x, const double y, const double z, const std::string &label) override
bool GetVoltageRange(double &vmin, double &vmax) override
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status) override
Medium * GetMedium(const double x, const double y, const double z) override
~ComponentConstant()
Destructor.
void UpdatePeriodicity() override
void SetElectricField(const double ex, const double ey, const double ez)
Set the components of the electric field [V / cm].
bool m_hasWeightingPotential
void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label) override
std::array< double, 3 > m_efield
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&m, int &status) override
void UnsetArea()
Remove the explicit limits of the active area.
void SetArea(const double xmin, const double ymin, const double zmin, const double xmax, const double ymax, const double zmax)
Set the limits of the active area explicitly (instead of using a Geometry object).
bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) override
std::array< double, 3 > m_wfield
std::array< double, 3 > m_xmin
std::array< double, 3 > m_xmax
void SetPotential(const double x, const double y, const double z, const double v=0.)
Specify the potential at a given point.
void SetWeightingPotential(const double x, const double y, const double z, const double v=0.)
Specify the weighting potential at a given point.
bool InArea(const double x, const double y, const double z)
void SetWeightingField(const double wx, const double wy, const double wz, const std::string label)
Set the components of the weighting field [1 / cm].
void SetMedium(Medium *medium)
Set the medium in the active area.
ComponentConstant()
Constructor.