Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
Interpolation in a three-dimensional field map created by Sentaurus Device. More...
#include <ComponentTcad3d.hh>
Public Member Functions | |
ComponentTcad3d () | |
Constructor. | |
~ComponentTcad3d () | |
Destructor. | |
void | ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&m, int &status) override |
Calculate the drift field [V/cm] and potential [V] at (x, y, z). | |
void | ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, 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 |
Medium * | GetMedium (const double x, const double y, const double z) override |
Get the medium at a given location (x, y, z). | |
bool | GetVoltageRange (double &vmin, double &vmax) override |
Calculate the voltage range [V]. | |
bool | GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) override |
Get the bounding box coordinates. | |
bool | Initialise (const std::string &gridfilename, const std::string &datafilename) |
bool | SetWeightingField (const std::string &datfile1, const std::string &datfile2, const double dv) |
void | PrintRegions () |
List all currently defined regions. | |
unsigned int | GetNumberOfRegions () const |
Get the number of regions in the device. | |
void | GetRegion (const unsigned int ireg, std::string &name, bool &active) const |
void | SetDriftRegion (const unsigned int ireg) |
void | UnsetDriftRegion (const unsigned int ireg) |
void | SetMedium (const unsigned int ireg, Medium *m) |
Set the medium for a given region. | |
bool | GetMedium (const unsigned int ireg, Medium *&m) const |
Get the medium for a given region. | |
int | GetNumberOfElements () const |
bool | GetElement (const unsigned int i, double &vol, double &dmin, double &dmax, int &type) const |
bool | GetElement (const unsigned int i, double &vol, double &dmin, double &dmax, int &type, int &node1, int &node2, int &node3, int &node4, int &node5, int &node6, int &node7, int ®) const |
unsigned int | GetNumberOfNodes () const |
bool | GetNode (const unsigned int i, double &x, double &y, double &z, double &v, double &ex, double &ey, double &ez) const |
Public Member Functions inherited from Garfield::ComponentBase | |
ComponentBase () | |
Constructor. | |
virtual | ~ComponentBase () |
Destructor. | |
virtual void | SetGeometry (GeometryBase *geo) |
Define the geometry. | |
virtual void | Clear () |
Reset. | |
virtual Medium * | GetMedium (const double x, const double y, const double z) |
Get the medium at a given location (x, y, z). | |
virtual void | ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)=0 |
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 | GetVoltageRange (double &vmin, double &vmax)=0 |
Calculate the voltage range [V]. | |
virtual void | WeightingField (const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label) |
virtual double | WeightingPotential (const double x, const double y, const double z, const std::string &label) |
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) |
virtual void | MagneticField (const double x, const double y, const double z, double &bx, double &by, double &bz, int &status) |
void | SetMagneticField (const double bx, const double by, const double bz) |
Set a constant magnetic field. | |
virtual bool | IsReady () |
Ready for use? | |
virtual bool | GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) |
Get the bounding box coordinates. | |
double | IntegrateFluxCircle (const double xc, const double yc, const double r, const unsigned int nI=50) |
double | IntegrateFluxSphere (const double xc, const double yc, const double zc, const double r, const unsigned int nI=20) |
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) |
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 | IsInTrapRadius (const double q0, const double x0, const double y0, const double z0, double &xw, double &yw, double &rw) |
void | EnablePeriodicityX (const bool on=true) |
Enable simple periodicity in the direction. | |
void | DisablePeriodicityX () |
void | EnablePeriodicityY (const bool on=true) |
Enable simple periodicity in the direction. | |
void | DisablePeriodicityY () |
void | EnablePeriodicityZ (const bool on=true) |
Enable simple periodicity in the direction. | |
void | DisablePeriodicityZ () |
void | EnableMirrorPeriodicityX (const bool on=true) |
Enable mirror periodicity in the direction. | |
void | DisableMirrorPeriodicityX () |
void | EnableMirrorPeriodicityY (const bool on=true) |
Enable mirror periodicity in the direction. | |
void | DisableMirrorPeriodicityY () |
void | EnableMirrorPeriodicityZ (const bool on=true) |
Enable mirror periodicity in the direction. | |
void | DisableMirrorPeriodicityZ () |
void | EnableAxialPeriodicityX (const bool on=true) |
Enable axial periodicity in the direction. | |
void | DisableAxialPeriodicityX () |
void | EnableAxialPeriodicityY (const bool on=true) |
Enable axial periodicity in the direction. | |
void | DisableAxialPeriodicityY () |
void | EnableAxialPeriodicityZ (const bool on=true) |
Enable axial periodicity in the direction. | |
void | DisableAxialPeriodicityZ () |
void | EnableRotationSymmetryX (const bool on=true) |
Enable rotation symmetry around the axis. | |
void | DisableRotationSymmetryX () |
void | EnableRotationSymmetryY (const bool on=true) |
Enable rotation symmetry around the axis. | |
void | DisableRotationSymmetryY () |
void | EnableRotationSymmetryZ (const bool on=true) |
Enable rotation symmetry around the axis. | |
void | DisableRotationSymmetryZ () |
void | EnableDebugging () |
Switch on debugging messages. | |
void | DisableDebugging () |
Switch off debugging messages. | |
void | ActivateTraps () |
Request trapping to be taken care of by the component (for TCAD). | |
void | DeactivateTraps () |
bool | IsTrapActive () |
void | ActivateVelocityMap () |
Request velocity to be taken care of by the component (for TCAD). | |
void | DectivateVelocityMap () |
bool | IsVelocityActive () |
virtual bool | ElectronAttachment (const double, const double, const double, double &eta) |
Get the electron attachment coefficient. | |
virtual bool | HoleAttachment (const double, const double, const double, double &eta) |
Get the hole attachment coefficient. | |
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 | HoleVelocity (const double, const double, const double, double &vx, double &vy, double &vz, Medium *&, int &status) |
Get the hole drift velocity. | |
virtual bool | GetElectronLifetime (const double, const double, const double, double &etau) |
virtual bool | GetHoleLifetime (const double, const double, const double, double &htau) |
Additional Inherited Members | |
virtual void | Reset ()=0 |
Reset the component. | |
virtual void | UpdatePeriodicity ()=0 |
Verify periodicities. | |
Protected Attributes inherited from Garfield::ComponentBase | |
std::string | m_className = "ComponentBase" |
Class name. | |
GeometryBase * | m_geometry = nullptr |
Pointer to the geometry. | |
bool | m_ready = false |
Ready for use? | |
bool | m_activeTraps = false |
Does the component have traps? | |
bool | m_hasVelocityMap = false |
Does the component have velocity maps? | |
std::array< bool, 3 > | m_periodic = {{false, false, false}} |
Simple periodicity in x, y, z. | |
std::array< bool, 3 > | m_mirrorPeriodic = {{false, false, false}} |
Mirror periodicity in x, y, z. | |
std::array< bool, 3 > | m_axiallyPeriodic = {{false, false, false}} |
Axial periodicity in x, y, z. | |
std::array< bool, 3 > | m_rotationSymmetric = {{false, false, false}} |
Rotation symmetry around x-axis, y-axis, z-axis. | |
double | m_bx0 = 0. |
double | m_by0 = 0. |
double | m_bz0 = 0. |
bool | m_debug = false |
Switch on/off debugging messages. | |
Interpolation in a three-dimensional field map created by Sentaurus Device.
Definition at line 12 of file ComponentTcad3d.hh.
Garfield::ComponentTcad3d::ComponentTcad3d | ( | ) |
Constructor.
Definition at line 14 of file ComponentTcad3d.cc.
|
inline |
|
overridevirtual |
Calculate the drift field [V/cm] and potential [V] at (x, y, z).
Implements Garfield::ComponentBase.
Definition at line 22 of file ComponentTcad3d.cc.
Referenced by ElectricField().
|
overridevirtual |
Calculate the drift field at given point.
x,y,z | coordinates [cm]. |
ex,ey,ez | components of the electric field [V/cm]. |
m | pointer to the medium at this location. |
status | status flag |
Status flags:
0: Inside an active medium > 0: Inside a wire of type X -4 ... -1: On the side of a plane where no wires are -5: Inside the mesh but not in an active medium -6: Outside the mesh -10: Unknown potential type (should not occur) other: Other cases (should not occur)
Implements Garfield::ComponentBase.
Definition at line 74 of file ComponentTcad3d.cc.
|
overridevirtual |
Get the bounding box coordinates.
Reimplemented from Garfield::ComponentBase.
Definition at line 483 of file ComponentTcad3d.cc.
bool Garfield::ComponentTcad3d::GetElement | ( | const unsigned int | i, |
double & | vol, | ||
double & | dmin, | ||
double & | dmax, | ||
int & | type | ||
) | const |
Definition at line 641 of file ComponentTcad3d.cc.
Referenced by GetElement().
bool Garfield::ComponentTcad3d::GetElement | ( | const unsigned int | i, |
double & | vol, | ||
double & | dmin, | ||
double & | dmax, | ||
int & | type, | ||
int & | node1, | ||
int & | node2, | ||
int & | node3, | ||
int & | node4, | ||
int & | node5, | ||
int & | node6, | ||
int & | node7, | ||
int & | reg | ||
) | const |
Definition at line 709 of file ComponentTcad3d.cc.
|
overridevirtual |
Get the medium at a given location (x, y, z).
Reimplemented from Garfield::ComponentBase.
Definition at line 145 of file ComponentTcad3d.cc.
bool Garfield::ComponentTcad3d::GetMedium | ( | const unsigned int | ireg, |
Medium *& | m | ||
) | const |
Get the medium for a given region.
Definition at line 586 of file ComponentTcad3d.cc.
bool Garfield::ComponentTcad3d::GetNode | ( | const unsigned int | i, |
double & | x, | ||
double & | y, | ||
double & | z, | ||
double & | v, | ||
double & | ex, | ||
double & | ey, | ||
double & | ez | ||
) | const |
Definition at line 727 of file ComponentTcad3d.cc.
|
inline |
Definition at line 69 of file ComponentTcad3d.hh.
|
inline |
Definition at line 75 of file ComponentTcad3d.hh.
|
inline |
Get the number of regions in the device.
Definition at line 59 of file ComponentTcad3d.hh.
void Garfield::ComponentTcad3d::GetRegion | ( | const unsigned int | ireg, |
std::string & | name, | ||
bool & | active | ||
) | const |
Definition at line 547 of file ComponentTcad3d.cc.
|
overridevirtual |
Calculate the voltage range [V].
Implements Garfield::ComponentBase.
Definition at line 507 of file ComponentTcad3d.cc.
bool Garfield::ComponentTcad3d::Initialise | ( | const std::string & | gridfilename, |
const std::string & | datafilename | ||
) |
Import mesh and field map from files.
gridfilename | name of the .grd file containing the mesh |
datafilename | name of the .dat file containing the nodal solution |
Definition at line 175 of file ComponentTcad3d.cc.
void Garfield::ComponentTcad3d::PrintRegions | ( | ) |
List all currently defined regions.
Definition at line 514 of file ComponentTcad3d.cc.
void Garfield::ComponentTcad3d::SetDriftRegion | ( | const unsigned int | ireg | ) |
Definition at line 557 of file ComponentTcad3d.cc.
void Garfield::ComponentTcad3d::SetMedium | ( | const unsigned int | ireg, |
Medium * | m | ||
) |
Set the medium for a given region.
Definition at line 573 of file ComponentTcad3d.cc.
bool Garfield::ComponentTcad3d::SetWeightingField | ( | const std::string & | datfile1, |
const std::string & | datfile2, | ||
const double | dv | ||
) |
Import field maps defining the weighting field and potential.
datfile1 | .dat file containing the field map at nominal bias. |
datfile2 | .dat file containing the field map for a configuration with the potential at the electrode to be read out increased by a small voltage dv. |
dv | increase in electrode potential between the two field maps. |
The field maps must use the same mesh as the drift field.
Definition at line 379 of file ComponentTcad3d.cc.
void Garfield::ComponentTcad3d::UnsetDriftRegion | ( | const unsigned int | ireg | ) |
Definition at line 565 of file ComponentTcad3d.cc.
|
overridevirtual |
Calculate the weighting field at a given point and for a given electrode.
x,y,z | coordinates [cm]. |
wx,wy,wz | components of the weighting field [1/cm]. |
label | name of the electrode |
Reimplemented from Garfield::ComponentBase.
Definition at line 81 of file ComponentTcad3d.cc.
|
overridevirtual |
Calculate the weighting potential at a given point.
x,y,z | coordinates [cm]. |
label | name of the electrode. |
Reimplemented from Garfield::ComponentBase.
Definition at line 115 of file ComponentTcad3d.cc.