Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
Interpolation in a two-dimensional field map created by Sentaurus Device. More...
#include <ComponentTcad2d.hh>
Public Member Functions | |
ComponentTcad2d () | |
Constructor. | |
~ComponentTcad2d () | |
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 |
Medium * | GetMedium (const double x, const double y, const double z) override |
Get the medium at a given location (x, y, z). | |
bool | GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) override |
Get the bounding box coordinates. | |
bool | GetElementaryCell (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) override |
Get the coordinates of the elementary cell. | |
void | SetRangeZ (const double zmin, const double zmax) |
Set the z-extent of the bounding box (default: unlimited). | |
bool | GetElement (const size_t i, double &vol, double &dmin, double &dmax, int &type, std::vector< size_t > &nodes, int ®) const |
bool | GetNode (const size_t i, double &x, double &y, double &v, double &ex, double &ey) const |
![]() | |
ComponentTcadBase ()=delete | |
Default constructor. | |
ComponentTcadBase (const std::string &name) | |
Constructor. | |
virtual | ~ComponentTcadBase () |
Destructor. | |
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 |
bool | GetVoltageRange (double &vmin, double &vmax) override |
Calculate the voltage range [V]. | |
bool | Initialise (const std::string &gridfilename, const std::string &datafilename) |
bool | SetWeightingField (const std::string &datfile1, const std::string &datfile2, const double dv, const std::string &label) |
bool | SetWeightingFieldShift (const std::string &label, const double x, const double y, const double z) |
void | PrintRegions () const |
List all currently defined regions. | |
size_t | GetNumberOfRegions () const |
Get the number of regions in the device. | |
void | GetRegion (const size_t ireg, std::string &name, bool &active) const |
Get the name and "active volume" flag of a region. | |
void | SetDriftRegion (const size_t ireg) |
Make a region active ("driftable"). | |
void | UnsetDriftRegion (const size_t ireg) |
Make a region inactive. | |
void | SetMedium (const size_t ireg, Medium *m) |
Set the medium to be associated to a given region. | |
size_t | GetNumberOfElements () const |
Get the number of elements in the mesh. | |
size_t | GetNumberOfNodes () const |
Get the number of vertices in the mesh. | |
void | EnableVelocityMap (const bool on) |
Switch use of the imported velocity map on/off. | |
bool | HasVelocityMap () const override |
Does the component have velocity maps? | |
bool | ElectronVelocity (const double x, const double y, const double z, double &vx, double &vy, double &vz) override |
Get the electron drift velocity. | |
bool | HoleVelocity (const double x, const double y, const double z, double &vx, double &vy, double &vz) override |
Get the hole drift velocity. | |
size_t | GetNumberOfDonors () |
Get the number of donor states found in the map. | |
size_t | GetNumberOfAcceptors () |
Get the number of acceptor states found in the map. | |
bool | SetDonor (const size_t donorNumber, const double exsec, const double hxsec, const double concentration) |
bool | SetAcceptor (const size_t acceptorNumber, const double exsec, const double hxsec, const double concentration) |
Set the properties of an acceptor-type defect state. | |
void | EnableAttachmentMap (const bool on) |
Switch use of the imported trapping map on/off. | |
bool | HasAttachmentMap () const override |
Does the component have attachment maps? | |
bool | ElectronAttachment (const double x, const double y, const double z, double &eta) override |
Get the electron attachment coefficient. | |
bool | HoleAttachment (const double x, const double y, const double z, double &eta) override |
Get the hole attachment coefficient. | |
bool | GetElectronLifetime (const double x, const double y, const double z, double &etau) override |
bool | GetHoleLifetime (const double x, const double y, const double z, double &htau) override |
bool | GetElectronMobility (const double x, const double y, const double z, double &mob) |
bool | GetHoleMobility (const double x, const double y, const double z, double &mob) |
![]() | |
Component ()=delete | |
Default constructor. | |
Component (const std::string &name) | |
Constructor. | |
virtual | ~Component () |
Destructor. | |
virtual void | SetGeometry (Geometry *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 double | DelayedWeightingPotential (const double x, const double y, const double z, const double t, 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. | |
virtual bool | GetElementaryCell (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) |
Get the coordinates of the elementary cell. | |
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 | 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) |
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) |
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) |
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 ![]() | |
void | EnablePeriodicityY (const bool on=true) |
Enable simple periodicity in the ![]() | |
void | EnablePeriodicityZ (const bool on=true) |
Enable simple periodicity in the ![]() | |
void | IsPeriodic (bool &perx, bool &pery, bool &perz) |
Return periodicity flags. | |
void | EnableMirrorPeriodicityX (const bool on=true) |
Enable mirror periodicity in the ![]() | |
void | EnableMirrorPeriodicityY (const bool on=true) |
Enable mirror periodicity in the ![]() | |
void | EnableMirrorPeriodicityZ (const bool on=true) |
Enable mirror periodicity in the ![]() | |
void | IsMirrorPeriodic (bool &perx, bool &pery, bool &perz) |
Return mirror periodicity flags. | |
void | EnableAxialPeriodicityX (const bool on=true) |
Enable axial periodicity in the ![]() | |
void | EnableAxialPeriodicityY (const bool on=true) |
Enable axial periodicity in the ![]() | |
void | EnableAxialPeriodicityZ (const bool on=true) |
Enable axial periodicity in the ![]() | |
void | IsAxiallyPeriodic (bool &perx, bool &pery, bool &perz) |
Return axial periodicity flags. | |
void | EnableRotationSymmetryX (const bool on=true) |
Enable rotation symmetry around the ![]() | |
void | EnableRotationSymmetryY (const bool on=true) |
Enable rotation symmetry around the ![]() | |
void | EnableRotationSymmetryZ (const bool on=true) |
Enable rotation symmetry around the ![]() | |
void | IsRotationSymmetric (bool &rotx, bool &roty, bool &rotz) |
Return rotation symmetry flags. | |
void | EnableDebugging () |
Switch on debugging messages. | |
void | DisableDebugging () |
Switch off debugging messages. | |
virtual bool | HasAttachmentMap () const |
Does the component have attachment maps? | |
virtual bool | HasVelocityMap () const |
Does the component have velocity maps? | |
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 bool | ElectronVelocity (const double, const double, const double, double &vx, double &vy, double &vz) |
Get the electron drift velocity. | |
virtual bool | HoleVelocity (const double, const double, const double, double &vx, double &vy, double &vz) |
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 | |
![]() | |
void | UpdatePeriodicity () override |
Verify periodicities. | |
void | Cleanup () |
virtual bool | Interpolate (const double x, const double y, const double z, const std::vector< double > &field, double &f)=0 |
virtual bool | Interpolate (const double x, const double y, const double z, const std::vector< std::array< double, N > > &field, double &fx, double &fy, double &fz)=0 |
virtual void | FillTree ()=0 |
size_t | FindRegion (const std::string &name) const |
void | MapCoordinates (std::array< double, N > &x, std::array< bool, N > &mirr) const |
bool | InBoundingBox (const std::array< double, N > &x) const |
void | UpdateAttachment () |
bool | LoadGrid (const std::string &gridfilename) |
bool | LoadData (const std::string &datafilename) |
bool | ReadDataset (std::ifstream &datafile, const std::string &dataset) |
bool | LoadWeightingField (const std::string &datafilename, std::vector< std::array< double, N > > &wf, std::vector< double > &wp) |
virtual void | Reset ()=0 |
Reset the component. | |
virtual void | UpdatePeriodicity ()=0 |
Verify periodicities. | |
![]() | |
static unsigned int | ElementVertices (const Element &element) |
![]() | |
std::vector< Region > | m_regions |
std::vector< std::array< double, N > > | m_vertices |
std::vector< Element > | m_elements |
std::vector< double > | m_epot |
std::vector< std::array< double, N > > | m_efield |
std::vector< std::array< double, N > > | m_wfield |
std::vector< double > | m_wpot |
std::vector< std::string > | m_wlabel |
std::vector< std::array< double, 3 > > | m_wshift |
std::vector< std::array< double, N > > | m_eVelocity |
std::vector< std::array< double, N > > | m_hVelocity |
std::vector< double > | m_eMobility |
std::vector< double > | m_hMobility |
std::vector< double > | m_eLifetime |
std::vector< double > | m_hLifetime |
std::vector< std::vector< float > > | m_donorOcc |
std::vector< std::vector< float > > | m_acceptorOcc |
std::vector< double > | m_eAttachment |
std::vector< double > | m_hAttachment |
std::vector< Defect > | m_donors |
std::vector< Defect > | m_acceptors |
bool | m_useVelocityMap |
bool | m_useAttachmentMap |
std::array< double, 3 > | m_bbMin |
std::array< double, 3 > | m_bbMax |
double | m_pMin |
double | m_pMax |
![]() | |
std::string | m_className = "Component" |
Class name. | |
Geometry * | m_geometry = nullptr |
Pointer to the geometry. | |
std::array< double, 3 > | m_b0 = {{0., 0., 0.}} |
Constant magnetic field. | |
bool | m_ready = false |
Ready for use? | |
bool | m_debug = false |
Switch on/off debugging messages. | |
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. | |
![]() | |
static constexpr size_t | nMaxVertices |
Interpolation in a two-dimensional field map created by Sentaurus Device.
Definition at line 13 of file ComponentTcad2d.hh.
Garfield::ComponentTcad2d::ComponentTcad2d | ( | ) |
|
inline |
|
overridevirtual |
Calculate the drift field [V/cm] and potential [V] at (x, y, z).
Implements Garfield::Component.
Definition at line 13 of file ComponentTcad2d.cc.
Referenced by ElectricField().
|
inlineoverridevirtual |
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::Component.
Definition at line 24 of file ComponentTcad2d.hh.
|
overridevirtual |
Get the bounding box coordinates.
Reimplemented from Garfield::Component.
Definition at line 174 of file ComponentTcad2d.cc.
bool Garfield::ComponentTcad2d::GetElement | ( | const size_t | i, |
double & | vol, | ||
double & | dmin, | ||
double & | dmax, | ||
int & | type, | ||
std::vector< size_t > & | nodes, | ||
int & | reg | ||
) | const |
Retrieve the properties of an element.
i | index of the element |
vol | volume |
dmin | smallest length in the element |
dmax | largest length in the element |
type | element type |
nodes | indices of the constituent vertices |
reg | region |
Definition at line 230 of file ComponentTcad2d.cc.
|
overridevirtual |
Get the coordinates of the elementary cell.
Reimplemented from Garfield::Component.
Definition at line 200 of file ComponentTcad2d.cc.
|
overridevirtual |
Get the medium at a given location (x, y, z).
Reimplemented from Garfield::Component.
Definition at line 125 of file ComponentTcad2d.cc.
bool Garfield::ComponentTcad2d::GetNode | ( | const size_t | i, |
double & | x, | ||
double & | y, | ||
double & | v, | ||
double & | ex, | ||
double & | ey | ||
) | const |
Get the coordinates of a mesh node and the potential and electric field at this node.
Definition at line 280 of file ComponentTcad2d.cc.
void Garfield::ComponentTcad2d::SetRangeZ | ( | const double | zmin, |
const double | zmax | ||
) |
Set the z-extent of the bounding box (default: unlimited).
Definition at line 220 of file ComponentTcad2d.cc.