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;
62 virtual void WeightingField(
const double x,
const double y,
const double z,
63 double& wx,
double& wy,
double& wz,
64 const std::string& label);
71 const double z,
const std::string& label);
80 const double z,
const double t,
double& wx,
81 double& wy,
double& wz,
82 const std::string& label);
91 const double z,
const double t,
92 const std::string& label);
100 virtual void MagneticField(
const double x,
const double y,
const double z,
101 double& bx,
double& by,
double& bz,
int& status);
109 virtual bool GetBoundingBox(
double& xmin,
double& ymin,
double& zmin,
110 double& xmax,
double& ymax,
double& zmax);
114 double& xmax,
double& ymax,
double& zmax);
124 const unsigned int nI = 50);
133 const double r,
const unsigned int nI = 20);
144 const double x0,
const double y0,
const double z0,
const double dx1,
145 const double dy1,
const double dz1,
const double dx2,
const double dy2,
146 const double dz2,
const unsigned int nU = 20,
const unsigned int nV = 20);
151 const double x0,
const double y0,
const double z0,
const double dx1,
152 const double dy1,
const double dz1,
const double dx2,
const double dy2,
153 const double dz2,
const unsigned int nU = 20,
const unsigned int nV = 20);
165 const double x1,
const double y1,
const double z1,
166 const double xp,
const double yp,
const double zp,
167 const unsigned int nI,
const int isign = 0);
178 virtual bool IsWireCrossed(
const double x0,
const double y0,
const double z0,
179 const double x1,
const double y1,
const double z1,
180 double& xc,
double& yc,
double& zc,
181 const bool centre,
double& rc);
188 virtual bool IsInTrapRadius(
const double q0,
const double x0,
const double y0,
189 const double z0,
double& xw,
double& yw,
292 const double ,
double& eta) {
298 const double ,
double& eta) {
304 const double ,
double& vx,
double& vy,
311 const double ,
double& vx,
double& vy,
317 const double ,
double& etau) {
322 const double ,
double& htau) {
335 std::array<double, 3>
m_b0 = {{0., 0., 0.}};
359 const double x0,
const double y0,
const double z0,
const double dx1,
360 const double dy1,
const double dz1,
const double dx2,
const double dy2,
361 const double dz2,
const unsigned int nU,
const unsigned int nV,
362 const bool wfield,
const std::string& label);
Abstract base class for components.
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.
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 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)
virtual bool ElectronAttachment(const double, const double, const double, double &eta)
Get the electron attachment coefficient.
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 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.
void EnableMirrorPeriodicityY(const bool on=true)
Enable mirror periodicity in the direction.
virtual void Clear()
Reset.
virtual bool HoleAttachment(const double, const double, const double, double &eta)
Get the hole attachment coefficient.
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.
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.
virtual bool IsInTrapRadius(const double q0, const double x0, const double y0, const double z0, double &xw, double &yw, double &rw)
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 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.