1#ifndef G_COMPONENT_BASE_H
2#define G_COMPONENT_BASE_H
26 virtual Medium*
GetMedium(
const double x,
const double y,
const double z);
45 virtual void ElectricField(
const double x,
const double y,
const double z,
46 double& ex,
double& ey,
double& ez,
Medium*& m,
49 virtual void ElectricField(
const double x,
const double y,
const double z,
50 double& ex,
double& ey,
double& ez,
double& v,
51 Medium*& m,
int& status) = 0;
60 virtual void WeightingField(
const double x,
const double y,
const double z,
61 double& wx,
double& wy,
double& wz,
62 const std::string& label);
69 const double z,
const std::string& label);
78 const double z,
const double t,
79 double& wx,
double& wy,
double& wz,
80 const std::string& label);
88 virtual void MagneticField(
const double x,
const double y,
const double z,
89 double& bx,
double& by,
double& bz,
int& status);
97 virtual bool GetBoundingBox(
double& xmin,
double& ymin,
double& zmin,
98 double& xmax,
double& ymax,
double& zmax);
108 const unsigned int nI = 50);
117 const double r,
const unsigned int nI = 20);
127 double IntegrateFlux(
const double x0,
const double y0,
const double z0,
128 const double dx1,
const double dy1,
const double dz1,
129 const double dx2,
const double dy2,
const double dz2,
130 const unsigned int nU = 20,
const unsigned int nV = 20);
141 virtual bool IsWireCrossed(
const double x0,
const double y0,
const double z0,
142 const double x1,
const double y1,
const double z1,
143 double& xc,
double& yc,
double& zc,
144 const bool centre,
double& rc);
151 virtual bool IsInTrapRadius(
const double q0,
const double x0,
const double y0,
152 const double z0,
double& xw,
double& yw,
248 const double ,
double& eta) {
254 const double ,
double& eta) {
260 const double ,
double& vx,
double& vy,
261 double& vz,
Medium*& ,
int& status) {
267 const double ,
double& vx,
double& vy,
268 double& vz,
Medium*& ,
int& status) {
273 const double ,
double& etau) {
278 const double ,
double& htau) {
Abstract base class for components.
double IntegrateFluxSphere(const double xc, const double yc, const double zc, const double r, const unsigned int nI=20)
std::array< bool, 3 > m_periodic
Simple periodicity in x, y, z.
void DisableRotationSymmetryZ()
virtual void ElectronVelocity(const double, const double, const double, double &vx, double &vy, double &vz, Medium *&, int &status)
Get the electron drift velocity.
virtual void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)=0
ComponentBase()
Constructor.
double IntegrateFluxCircle(const double xc, const double yc, const double r, const unsigned int nI=50)
void EnableDebugging()
Switch on debugging messages.
virtual ~ComponentBase()
Destructor.
virtual void HoleVelocity(const double, const double, const double, double &vx, double &vy, double &vz, Medium *&, int &status)
Get the hole drift velocity.
std::array< bool, 3 > m_rotationSymmetric
Rotation symmetry around x-axis, y-axis, z-axis.
void ActivateVelocityMap()
Request velocity to be taken care of by the component (for TCAD).
void DisablePeriodicityY()
void DisableAxialPeriodicityX()
void DisableMirrorPeriodicityX()
void EnableAxialPeriodicityX(const bool on=true)
Enable axial periodicity in the direction.
virtual double WeightingPotential(const double x, const double y, const double z, const std::string &label)
virtual void Clear()
Reset.
virtual bool IsWireCrossed(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)
std::array< bool, 3 > m_axiallyPeriodic
Axial periodicity in x, y, z.
GeometryBase * m_geometry
Pointer to the geometry.
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).
void EnableRotationSymmetryX(const bool on=true)
Enable rotation symmetry around the axis.
virtual void UpdatePeriodicity()=0
Verify periodicities.
virtual bool IsReady()
Ready for use?
void SetMagneticField(const double bx, const double by, const double bz)
Set a constant magnetic field.
bool m_activeTraps
Does the component have traps?
void DisablePeriodicityZ()
void ActivateTraps()
Request trapping to be taken care of by the component (for TCAD).
void DisableAxialPeriodicityY()
virtual bool GetElectronLifetime(const double, const double, const double, double &etau)
void EnableMirrorPeriodicityZ(const bool on=true)
Enable mirror periodicity in the direction.
virtual void Reset()=0
Reset the component.
void EnablePeriodicityZ(const bool on=true)
Enable simple periodicity in the direction.
void EnablePeriodicityX(const bool on=true)
Enable simple periodicity in the direction.
virtual void MagneticField(const double x, const double y, const double z, double &bx, double &by, double &bz, int &status)
void DisableDebugging()
Switch off debugging messages.
void DisablePeriodicityX()
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)
bool m_ready
Ready for use?
std::array< bool, 3 > m_mirrorPeriodic
Mirror periodicity in x, y, z.
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
Get the bounding box coordinates.
virtual bool HoleAttachment(const double, const double, const double, double &eta)
Get the hole attachment coefficient.
void EnableMirrorPeriodicityY(const bool on=true)
Enable mirror periodicity in the direction.
virtual bool GetHoleLifetime(const double, const double, const double, double &htau)
void DectivateVelocityMap()
void DisableMirrorPeriodicityZ()
void EnableMirrorPeriodicityX(const bool on=true)
Enable mirror periodicity in the direction.
virtual void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label)
void EnableRotationSymmetryY(const bool on=true)
Enable rotation symmetry around the axis.
void EnableAxialPeriodicityY(const bool on=true)
Enable axial periodicity in the direction.
void EnablePeriodicityY(const bool on=true)
Enable simple periodicity in the direction.
void DisableAxialPeriodicityZ()
void DisableRotationSymmetryX()
double IntegrateFlux(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)
void EnableAxialPeriodicityZ(const bool on=true)
Enable axial periodicity in the direction.
std::string m_className
Class name.
void DisableRotationSymmetryY()
virtual void SetGeometry(GeometryBase *geo)
Define the geometry.
virtual bool IsInTrapRadius(const double q0, const double x0, const double y0, const double z0, double &xw, double &yw, double &rw)
bool m_debug
Switch on/off debugging messages.
virtual bool ElectronAttachment(const double, const double, const double, double &eta)
Get the electron attachment coefficient.
void DisableMirrorPeriodicityY()
bool m_hasVelocityMap
Does the component have velocity maps?
virtual Medium * GetMedium(const double x, const double y, const double z)
Get the medium at a given location (x, y, z).
void EnableRotationSymmetryZ(const bool on=true)
Enable rotation symmetry around the axis.
virtual bool GetVoltageRange(double &vmin, double &vmax)=0
Calculate the voltage range [V].
Abstract base class for geometry classes.
Abstract base class for media.