![]() |
Garfield 0.3
Toolkit for the detailed simulation of particle detectors based on ionization measurement in gases and semiconductors
|
Simple component with electric field given by a user function. More...
#include <ComponentUser.hh>
Public Member Functions | |
ComponentUser () | |
Constructor. | |
~ComponentUser () | |
Destructor. | |
void | SetElectricField (std::function< void(const double, const double, const double, double &, double &, double &)>) |
Set the function to be called for calculating the electric field. | |
void | SetElectricField (const std::string &expression) |
Set the expression to be used for calculating the electric field. | |
void | SetPotential (std::function< double(const double, const double, const double)>) |
Set the function to be called for calculating the electric potential. | |
void | SetPotential (const std::string &expression) |
Set the expression to be used for calculating the electric potential. | |
void | SetWeightingField (std::function< void(const double, const double, const double, double &, double &, double &)>, const std::string &label) |
Set the function to be called for calculating the weighting field. | |
void | SetWeightingField (const std::string &expression, const std::string &label) |
Set the expression to be used for calculating the weighting field. | |
void | SetWeightingPotential (std::function< double(const double, const double, const double)>, const std::string &label) |
Set the function to be called for calculating the weighting potential. | |
void | SetWeightingPotential (const std::string &expression, const std::string &label) |
Set the expression to be used for calculating the weighting potential. | |
void | SetDelayedWeightingField (std::function< void(const double, const double, const double, const double, double &, double &, double &)>, const std::string &label) |
Set the function to be called for calculating the delayed weighting field. | |
void | SetDelayedWeightingField (const std::string &expression, const std::string &label) |
Set the expression to be used for calculating the delayed weighting field. | |
void | SetDelayedWeightingPotential (std::function< double(const double, const double, const double, const double)>, const std::string &label) |
Set the function to be called for calculating the delayed weighting potential. | |
void | SetDelayedWeightingPotential (const std::string &expression, const std::string &label) |
Set the expression to be used for calculating the delayed weighting potential. | |
void | SetDelayedSignalTimes (const std::vector< double > &ts) |
Set the time steps at which to evaluate the delayed weighting potential/field. | |
void | SetMagneticField (std::function< void(const double, const double, const double, double &, double &, double &)>) |
Set the function to be called for calculating the magnetic field. | |
void | SetMagneticField (const std::string &expression) |
Set the expression to be used for calculating the magnetic field. | |
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). | |
void | UnsetArea () |
Remove the explicit limits of the active area. | |
void | SetMedium (Medium *medium) |
Set the medium in the active area. | |
Medium * | GetMedium (const double x, const double y, const double z) override |
void | ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status) override |
void | ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&m, int &status) override |
bool | GetVoltageRange (double &vmin, double &vmax) override |
void | MagneticField (const double x, const double y, const double z, double &bx, double &by, double &bz, int &status) override |
void | WeightingField (const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label) override |
double | WeightingPotential (const double x, const double y, const double z, const std::string &label) override |
void | DelayedWeightingField (const double x, const double y, const double z, const double t, double &wx, double &wy, double &wz, const std::string &label) override |
double | DelayedWeightingPotential (const double x, const double y, const double z, const double t, const std::string &label) override |
bool | GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) override |
bool | HasMagneticField () const override |
Private Member Functions | |
void | Reset () override |
Reset the component. | |
void | UpdatePeriodicity () override |
bool | InArea (const double x, const double y, const double z) |
Private Attributes | |
std::function< void(const double, const double, const double, double &, double &, double &)> | m_efield |
Electric field function. | |
std::function< double(const double, const double, const double)> | m_epot |
Electric potential function. | |
std::map< std::string, std::function< void(const double, const double, const double, double &, double &, double &)> > | m_wfield |
Weighting field functions. | |
std::map< std::string, std::function< double(const double, const double, const double)> > | m_wpot |
Weighting potential functions. | |
std::map< std::string, std::function< void(const double, const double, const double, const double, double &, double &, double &)> > | m_dwfield |
Delayed weighting field functions. | |
std::map< std::string, std::function< double(const double, const double, const double, const double)> > | m_dwpot |
Delayed weighting potential functions. | |
std::function< void(const double, const double, const double, double &, double &, double &)> | m_bfield |
Magnetic field function. | |
std::array< double, 3 > | m_xmin = {{0., 0., 0.}} |
std::array< double, 3 > | m_xmax = {{0., 0., 0.}} |
bool | m_hasArea = false |
Medium * | m_medium = nullptr |
Simple component with electric field given by a user function.
Definition at line 14 of file ComponentUser.hh.
Garfield::ComponentUser::ComponentUser | ( | ) |
Constructor.
|
inline |
|
override |
|
override |
|
override |
|
override |
|
override |
|
inlineoverride |
Definition at line 89 of file ComponentUser.hh.
|
override |
|
override |
|
inlineprivate |
Definition at line 167 of file ComponentUser.hh.
|
override |
|
overrideprivate |
Reset the component.
void Garfield::ComponentUser::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).
void Garfield::ComponentUser::SetDelayedSignalTimes | ( | const std::vector< double > & | ts | ) |
Set the time steps at which to evaluate the delayed weighting potential/field.
void Garfield::ComponentUser::SetDelayedWeightingField | ( | const std::string & | expression, |
const std::string & | label ) |
Set the expression to be used for calculating the delayed weighting field.
void Garfield::ComponentUser::SetDelayedWeightingField | ( | std::function< void(const double, const double, const double, const double, double &, double &, double &)> | , |
const std::string & | label ) |
Set the function to be called for calculating the delayed weighting field.
void Garfield::ComponentUser::SetDelayedWeightingPotential | ( | const std::string & | expression, |
const std::string & | label ) |
Set the expression to be used for calculating the delayed weighting potential.
void Garfield::ComponentUser::SetDelayedWeightingPotential | ( | std::function< double(const double, const double, const double, const double)> | , |
const std::string & | label ) |
Set the function to be called for calculating the delayed weighting potential.
void Garfield::ComponentUser::SetElectricField | ( | const std::string & | expression | ) |
Set the expression to be used for calculating the electric field.
void Garfield::ComponentUser::SetElectricField | ( | std::function< void(const double, const double, const double, double &, double &, double &)> | ) |
Set the function to be called for calculating the electric field.
void Garfield::ComponentUser::SetMagneticField | ( | const std::string & | expression | ) |
Set the expression to be used for calculating the magnetic field.
void Garfield::ComponentUser::SetMagneticField | ( | std::function< void(const double, const double, const double, double &, double &, double &)> | ) |
Set the function to be called for calculating the magnetic field.
|
inline |
Set the medium in the active area.
Definition at line 87 of file ComponentUser.hh.
void Garfield::ComponentUser::SetPotential | ( | const std::string & | expression | ) |
Set the expression to be used for calculating the electric potential.
void Garfield::ComponentUser::SetPotential | ( | std::function< double(const double, const double, const double)> | ) |
Set the function to be called for calculating the electric potential.
void Garfield::ComponentUser::SetWeightingField | ( | const std::string & | expression, |
const std::string & | label ) |
Set the expression to be used for calculating the weighting field.
void Garfield::ComponentUser::SetWeightingField | ( | std::function< void(const double, const double, const double, double &, double &, double &)> | , |
const std::string & | label ) |
Set the function to be called for calculating the weighting field.
void Garfield::ComponentUser::SetWeightingPotential | ( | const std::string & | expression, |
const std::string & | label ) |
Set the expression to be used for calculating the weighting potential.
void Garfield::ComponentUser::SetWeightingPotential | ( | std::function< double(const double, const double, const double)> | , |
const std::string & | label ) |
Set the function to be called for calculating the weighting potential.
void Garfield::ComponentUser::UnsetArea | ( | ) |
Remove the explicit limits of the active area.
|
overrideprivate |
|
override |
|
override |
|
private |
Magnetic field function.
Definition at line 152 of file ComponentUser.hh.
|
private |
Delayed weighting field functions.
Definition at line 142 of file ComponentUser.hh.
|
private |
Delayed weighting potential functions.
Definition at line 147 of file ComponentUser.hh.
|
private |
Electric field function.
Definition at line 123 of file ComponentUser.hh.
|
private |
Electric potential function.
Definition at line 125 of file ComponentUser.hh.
|
private |
Definition at line 158 of file ComponentUser.hh.
|
private |
Definition at line 160 of file ComponentUser.hh.
|
private |
Weighting field functions.
Definition at line 131 of file ComponentUser.hh.
|
private |
Weighting potential functions.
Definition at line 136 of file ComponentUser.hh.
|
private |
Definition at line 156 of file ComponentUser.hh.
|
private |
Definition at line 155 of file ComponentUser.hh.