28 virtual Medium*
GetMedium(
const double x,
const double y,
const double z);
47 virtual void ElectricField(
const double x,
const double y,
const double z,
48 double& ex,
double& ey,
double& ez,
Medium*& m,
51 virtual void ElectricField(
const double x,
const double y,
const double z,
52 double& ex,
double& ey,
double& ez,
double& v,
53 Medium*& m,
int& status) = 0;
55 std::array<double, 3>
ElectricField(
const double x,
const double y,
68 virtual void WeightingField(
const double x,
const double y,
const double z,
69 double& wx,
double& wy,
double& wz,
70 const std::string& label);
77 const double z,
const std::string& label);
86 const double z,
const double t,
double& wx,
87 double& wy,
double& wz,
88 const std::string& label);
97 const double z,
const double t,
98 const std::string& label);
106 virtual void MagneticField(
const double x,
const double y,
const double z,
107 double& bx,
double& by,
double& bz,
int& status);
115 virtual bool GetBoundingBox(
double& xmin,
double& ymin,
double& zmin,
116 double& xmax,
double& ymax,
double& zmax);
120 double& xmax,
double& ymax,
double& zmax);
130 const unsigned int nI = 50);
139 const double r,
const unsigned int nI = 20);
150 const double x0,
const double y0,
const double z0,
const double dx1,
151 const double dy1,
const double dz1,
const double dx2,
const double dy2,
152 const double dz2,
const unsigned int nU = 20,
const unsigned int nV = 20);
157 const double x0,
const double y0,
const double z0,
const double dx1,
158 const double dy1,
const double dz1,
const double dx2,
const double dy2,
159 const double dz2,
const unsigned int nU = 20,
const unsigned int nV = 20);
171 const double x1,
const double y1,
const double z1,
172 const double xp,
const double yp,
const double zp,
173 const unsigned int nI,
const int isign = 0);
184 virtual bool CrossedWire(
const double x0,
const double y0,
const double z0,
185 const double x1,
const double y1,
const double z1,
186 double& xc,
double& yc,
double& zc,
187 const bool centre,
double& rc);
194 virtual bool InTrapRadius(
const double q0,
const double x0,
const double y0,
195 const double z0,
double& xw,
double& yw,
199 virtual bool CrossedPlane(
const double x0,
const double y0,
const double z0,
200 const double x1,
const double y1,
const double z1,
201 double& xc,
double& yc,
double& zc);
308 const double ,
double& eta) {
314 const double ,
double& eta) {
320 const double ,
double& alpha) {
326 const double ,
double& alpha) {
332 const double ,
double& vx,
double& vy,
339 const double ,
double& vx,
double& vy,
345 const double ,
double& etau) {
350 const double ,
double& htau) {
365 std::array<double, 3>
m_b0 = {{0., 0., 0.}};
389 const double x0,
const double y0,
const double z0,
const double dx1,
390 const double dy1,
const double dz1,
const double dx2,
const double dy2,
391 const double dz2,
const unsigned int nU,
const unsigned int nV,
392 const bool wfield,
const std::string& label);
virtual void UpdatePeriodicity()=0
Verify periodicities.
void IsAxiallyPeriodic(bool &perx, bool &pery, bool &perz)
Return axial periodicity flags.
virtual double WeightingPotential(const double x, const double y, const double z, const std::string &label)
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
Get the bounding box coordinates.
virtual bool GetHoleLifetime(const double, const double, const double, double &htau)
std::array< bool, 3 > m_rotationSymmetric
Rotation symmetry around x-axis, y-axis, z-axis.
void EnableMirrorPeriodicityX(const bool on=true)
Enable mirror periodicity in the direction.
std::array< bool, 3 > m_mirrorPeriodic
Mirror periodicity in x, y, z.
virtual void Reset()=0
Reset the component.
void DisableDebugging()
Switch off debugging messages.
void EnablePeriodicityX(const bool on=true)
Enable simple periodicity in the direction.
void IsRotationSymmetric(bool &rotx, bool &roty, bool &rotz)
Return rotation symmetry flags.
void EnableDebugging()
Switch on debugging messages.
virtual void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)=0
virtual Medium * GetMedium(const double x, const double y, const double z)
Get the medium at a given location (x, y, z).
virtual void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label)
virtual void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&m, int &status)=0
Calculate the drift field [V/cm] and potential [V] at (x, y, z).
virtual bool ElectronVelocity(const double, const double, const double, double &vx, double &vy, double &vz)
Get the electron drift velocity.
virtual bool CrossedWire(const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, double &xc, double &yc, double &zc, const bool centre, double &rc)
void EnablePeriodicityY(const bool on=true)
Enable simple periodicity in the direction.
virtual bool GetElectronLifetime(const double, const double, const double, double &etau)
bool m_debug
Switch on/off debugging messages.
virtual void DelayedWeightingField(const double x, const double y, const double z, const double t, double &wx, double &wy, double &wz, const std::string &label)
double IntegrateWeightingFluxParallelogram(const std::string &label, const double x0, const double y0, const double z0, const double dx1, const double dy1, const double dz1, const double dx2, const double dy2, const double dz2, const unsigned int nU=20, const unsigned int nV=20)
virtual bool InTrapRadius(const double q0, const double x0, const double y0, const double z0, double &xw, double &yw, double &rw)
virtual bool ElectronAttachment(const double, const double, const double, double &eta)
Get the electron attachment coefficient.
virtual bool CrossedPlane(const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, double &xc, double &yc, double &zc)
void EnablePeriodicityZ(const bool on=true)
Enable simple periodicity in the direction.
virtual bool GetVoltageRange(double &vmin, double &vmax)=0
Calculate the voltage range [V].
Component()=delete
Default constructor.
void EnableRotationSymmetryY(const bool on=true)
Enable rotation symmetry around the axis.
std::array< bool, 3 > m_periodic
Simple periodicity in x, y, z.
void EnableAxialPeriodicityY(const bool on=true)
Enable axial periodicity in the direction.
virtual bool ElectronTownsend(const double, const double, const double, double &alpha)
Get the electron Townsend coefficient.
virtual bool HasVelocityMap() const
Does the component have velocity maps?
void EnableRotationSymmetryZ(const bool on=true)
Enable rotation symmetry around the axis.
void EnableAxialPeriodicityX(const bool on=true)
Enable axial periodicity in the direction.
void EnableMirrorPeriodicityZ(const bool on=true)
Enable mirror periodicity in the direction.
void IsMirrorPeriodic(bool &perx, bool &pery, bool &perz)
Return mirror periodicity flags.
virtual bool HasMagneticField() const
Does the component have a non-zero magnetic field?
void EnableMirrorPeriodicityY(const bool on=true)
Enable mirror periodicity in the direction.
virtual void Clear()
Reset.
virtual bool HasTownsendMap() const
Does the component have maps of the Townsend coefficient?
virtual bool HoleAttachment(const double, const double, const double, double &eta)
Get the hole attachment coefficient.
virtual double ElectricPotential(const double x, const double y, const double z)
Calculate the (drift) electrostatic potential [V] at (x, y, z).
std::string m_className
Class name.
double IntegrateFluxCircle(const double xc, const double yc, const double r, const unsigned int nI=50)
Geometry * m_geometry
Pointer to the geometry.
virtual bool HoleTownsend(const double, const double, const double, double &alpha)
Get the hole Townsend coefficient.
double IntegrateFluxSphere(const double xc, const double yc, const double zc, const double r, const unsigned int nI=20)
void IsPeriodic(bool &perx, bool &pery, bool &perz)
Return periodicity flags.
virtual void MagneticField(const double x, const double y, const double z, double &bx, double &by, double &bz, int &status)
bool m_ready
Ready for use?
void SetMagneticField(const double bx, const double by, const double bz)
Set a constant magnetic field.
virtual bool HoleVelocity(const double, const double, const double, double &vx, double &vy, double &vz)
Get the hole drift velocity.
std::array< double, 3 > m_b0
Constant magnetic field.
std::array< bool, 3 > m_axiallyPeriodic
Axial periodicity in x, y, z.
virtual bool IsReady()
Ready for use?
virtual double StepSizeHint()
virtual bool HasAttachmentMap() const
Does the component have attachment maps?
void EnableAxialPeriodicityZ(const bool on=true)
Enable axial periodicity in the direction.
virtual bool GetElementaryCell(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
Get the coordinates of the elementary cell.
virtual double DelayedWeightingPotential(const double x, const double y, const double z, const double t, const std::string &label)
double IntegrateFluxParallelogram(const double x0, const double y0, const double z0, const double dx1, const double dy1, const double dz1, const double dx2, const double dy2, const double dz2, const unsigned int nU=20, const unsigned int nV=20)
virtual ~Component()
Destructor.
virtual void SetGeometry(Geometry *geo)
Define the geometry.
void EnableRotationSymmetryX(const bool on=true)
Enable rotation symmetry around the axis.
double IntegrateFluxLine(const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, const double xp, const double yp, const double zp, const unsigned int nI, const int isign=0)
Abstract base class for geometry classes.
Abstract base class for media.