Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
Interpolation in a field map created by Sentaurus Device. More...
#include <ComponentTcadBase.hh>
Classes | |
struct | Defect |
struct | Element |
struct | Region |
Public Member Functions | |
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) |
Public Member Functions inherited from Garfield::Component | |
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 direction. | |
void | EnablePeriodicityY (const bool on=true) |
Enable simple periodicity in the direction. | |
void | EnablePeriodicityZ (const bool on=true) |
Enable simple periodicity in the direction. | |
void | IsPeriodic (bool &perx, bool &pery, bool &perz) |
Return periodicity flags. | |
void | EnableMirrorPeriodicityX (const bool on=true) |
Enable mirror periodicity in the direction. | |
void | EnableMirrorPeriodicityY (const bool on=true) |
Enable mirror 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 | EnableAxialPeriodicityX (const bool on=true) |
Enable axial periodicity in the direction. | |
void | EnableAxialPeriodicityY (const bool on=true) |
Enable axial periodicity in the direction. | |
void | EnableAxialPeriodicityZ (const bool on=true) |
Enable axial periodicity in the direction. | |
void | IsAxiallyPeriodic (bool &perx, bool &pery, bool &perz) |
Return axial periodicity flags. | |
void | EnableRotationSymmetryX (const bool on=true) |
Enable rotation symmetry around the axis. | |
void | EnableRotationSymmetryY (const bool on=true) |
Enable rotation symmetry around the axis. | |
void | EnableRotationSymmetryZ (const bool on=true) |
Enable rotation symmetry around the axis. | |
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) |
Protected Member Functions | |
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) |
Protected Member Functions inherited from Garfield::Component | |
virtual void | Reset ()=0 |
Reset the component. | |
virtual void | UpdatePeriodicity ()=0 |
Verify periodicities. | |
Static Protected Member Functions | |
static unsigned int | ElementVertices (const Element &element) |
Protected Attributes | |
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 = false |
bool | m_useAttachmentMap = false |
std::array< double, 3 > | m_bbMin = {{0., 0., 0.}} |
std::array< double, 3 > | m_bbMax = {{0., 0., 0.}} |
double | m_pMin = 0. |
double | m_pMax = 0. |
Protected Attributes inherited from Garfield::Component | |
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 Protected Attributes | |
static constexpr size_t | nMaxVertices = 4 |
Interpolation in a field map created by Sentaurus Device.
Definition at line 14 of file ComponentTcadBase.hh.
|
delete |
Default constructor.
|
inline |
Constructor.
Definition at line 19 of file ComponentTcadBase.hh.
|
inlinevirtual |
|
protected |
Definition at line 1518 of file ComponentTcadBase.cc.
|
overridevirtual |
Get the electron attachment coefficient.
Reimplemented from Garfield::Component.
Definition at line 1438 of file ComponentTcadBase.cc.
|
overridevirtual |
Get the electron drift velocity.
Reimplemented from Garfield::Component.
Definition at line 1452 of file ComponentTcadBase.cc.
|
inlinestaticprotected |
Definition at line 226 of file ComponentTcadBase.hh.
|
inline |
Switch use of the imported trapping map on/off.
Definition at line 107 of file ComponentTcadBase.hh.
void Garfield::ComponentTcadBase< N >::EnableVelocityMap | ( | const bool | on | ) |
Switch use of the imported velocity map on/off.
Definition at line 376 of file ComponentTcadBase.cc.
|
protectedpure virtual |
|
protected |
Definition at line 1573 of file ComponentTcadBase.cc.
|
overridevirtual |
Reimplemented from Garfield::Component.
Definition at line 1466 of file ComponentTcadBase.cc.
bool Garfield::ComponentTcadBase< N >::GetElectronMobility | ( | const double | x, |
const double | y, | ||
const double | z, | ||
double & | mob | ||
) |
Definition at line 1478 of file ComponentTcadBase.cc.
|
overridevirtual |
Reimplemented from Garfield::Component.
Definition at line 1472 of file ComponentTcadBase.cc.
bool Garfield::ComponentTcadBase< N >::GetHoleMobility | ( | const double | x, |
const double | y, | ||
const double | z, | ||
double & | mob | ||
) |
Definition at line 1484 of file ComponentTcadBase.cc.
|
inline |
Get the number of acceptor states found in the map.
Definition at line 92 of file ComponentTcadBase.hh.
|
inline |
Get the number of donor states found in the map.
Definition at line 90 of file ComponentTcadBase.hh.
|
inline |
|
inline |
|
inline |
Get the number of regions in the device.
Definition at line 64 of file ComponentTcadBase.hh.
Referenced by main().
void Garfield::ComponentTcadBase< N >::GetRegion | ( | const size_t | ireg, |
std::string & | name, | ||
bool & | active | ||
) | const |
Get the name and "active volume" flag of a region.
Definition at line 1363 of file ComponentTcadBase.cc.
|
overridevirtual |
Calculate the voltage range [V].
Implements Garfield::Component.
Definition at line 269 of file ComponentTcadBase.cc.
|
inlineoverridevirtual |
Does the component have attachment maps?
Reimplemented from Garfield::Component.
Definition at line 108 of file ComponentTcadBase.hh.
|
inlineoverridevirtual |
Does the component have velocity maps?
Reimplemented from Garfield::Component.
Definition at line 81 of file ComponentTcadBase.hh.
|
overridevirtual |
Get the hole attachment coefficient.
Reimplemented from Garfield::Component.
Definition at line 1445 of file ComponentTcadBase.cc.
|
overridevirtual |
Get the hole drift velocity.
Reimplemented from Garfield::Component.
Definition at line 1459 of file ComponentTcadBase.cc.
|
inlineprotected |
Definition at line 239 of file ComponentTcadBase.hh.
bool Garfield::ComponentTcadBase< N >::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 92 of file ComponentTcadBase.cc.
Referenced by main().
|
protectedpure virtual |
|
protectedpure virtual |
|
protected |
Definition at line 917 of file ComponentTcadBase.cc.
|
protected |
Definition at line 385 of file ComponentTcadBase.cc.
|
protected |
Definition at line 1200 of file ComponentTcadBase.cc.
|
protected |
Definition at line 1550 of file ComponentTcadBase.cc.
void Garfield::ComponentTcadBase< N >::PrintRegions |
List all currently defined regions.
Definition at line 1335 of file ComponentTcadBase.cc.
|
protected |
Definition at line 1027 of file ComponentTcadBase.cc.
bool Garfield::ComponentTcadBase< N >::SetAcceptor | ( | const size_t | acceptorNumber, |
const double | exsec, | ||
const double | hxsec, | ||
const double | concentration | ||
) |
Set the properties of an acceptor-type defect state.
Definition at line 1422 of file ComponentTcadBase.cc.
bool Garfield::ComponentTcadBase< N >::SetDonor | ( | const size_t | donorNumber, |
const double | exsec, | ||
const double | hxsec, | ||
const double | concentration | ||
) |
Set the properties of a donor-type defect state.
donorNumber | index of the donor |
exsec | cross-section [cm2] for electrons |
hxsec | cross-section [cm2] for holes |
concentration | defect density [cm-3] |
Definition at line 1406 of file ComponentTcadBase.cc.
void Garfield::ComponentTcadBase< N >::SetDriftRegion | ( | const size_t | ireg | ) |
Make a region active ("driftable").
Definition at line 1374 of file ComponentTcadBase.cc.
void Garfield::ComponentTcadBase< N >::SetMedium | ( | const size_t | ireg, |
Medium * | m | ||
) |
Set the medium to be associated to a given region.
Definition at line 1392 of file ComponentTcadBase.cc.
Referenced by main().
bool Garfield::ComponentTcadBase< N >::SetWeightingField | ( | const std::string & | datfile1, |
const std::string & | datfile2, | ||
const double | dv, | ||
const std::string & | label | ||
) |
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. |
label | name of the electrode |
The field maps must use the same mesh as the drift field.
Definition at line 277 of file ComponentTcadBase.cc.
bool Garfield::ComponentTcadBase< N >::SetWeightingFieldShift | ( | const std::string & | label, |
const double | x, | ||
const double | y, | ||
const double | z | ||
) |
Shift the maps of weighting field/potential for a given electrode with respect to the original mesh. If the electrode does not exist yet, a new one will be added to the list.
Definition at line 350 of file ComponentTcadBase.cc.
void Garfield::ComponentTcadBase< N >::UnsetDriftRegion | ( | const size_t | ireg | ) |
Make a region inactive.
Definition at line 1383 of file ComponentTcadBase.cc.
|
protected |
Definition at line 1582 of file ComponentTcadBase.cc.
|
overrideprotectedvirtual |
Verify periodicities.
Implements Garfield::Component.
Definition at line 1490 of file ComponentTcadBase.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::Component.
Definition at line 48 of file ComponentTcadBase.cc.
|
overridevirtual |
Calculate the weighting potential at a given point.
x,y,z | coordinates [cm]. |
label | name of the electrode. |
Reimplemented from Garfield::Component.
Definition at line 69 of file ComponentTcadBase.cc.
|
protected |
Definition at line 193 of file ComponentTcadBase.hh.
|
protected |
Definition at line 207 of file ComponentTcadBase.hh.
Referenced by Garfield::ComponentTcadBase< N >::GetNumberOfAcceptors(), and Garfield::ComponentTcadBase< N >::HasAttachmentMap().
|
protected |
Definition at line 216 of file ComponentTcadBase.hh.
Referenced by Garfield::ComponentTcadBase< N >::InBoundingBox().
|
protected |
Definition at line 215 of file ComponentTcadBase.hh.
Referenced by Garfield::ComponentTcadBase< N >::InBoundingBox().
|
protected |
Definition at line 192 of file ComponentTcadBase.hh.
|
protected |
Definition at line 206 of file ComponentTcadBase.hh.
Referenced by Garfield::ComponentTcadBase< N >::GetNumberOfDonors(), and Garfield::ComponentTcadBase< N >::HasAttachmentMap().
|
protected |
Definition at line 195 of file ComponentTcadBase.hh.
|
protected |
Definition at line 173 of file ComponentTcadBase.hh.
|
protected |
Definition at line 168 of file ComponentTcadBase.hh.
Referenced by Garfield::ComponentTcadBase< N >::ComponentTcadBase(), and Garfield::ComponentTcadBase< N >::GetNumberOfElements().
|
protected |
Definition at line 189 of file ComponentTcadBase.hh.
|
protected |
Definition at line 186 of file ComponentTcadBase.hh.
|
protected |
Definition at line 171 of file ComponentTcadBase.hh.
|
protected |
Definition at line 183 of file ComponentTcadBase.hh.
Referenced by Garfield::ComponentTcadBase< N >::HasVelocityMap().
|
protected |
Definition at line 196 of file ComponentTcadBase.hh.
|
protected |
Definition at line 190 of file ComponentTcadBase.hh.
|
protected |
Definition at line 187 of file ComponentTcadBase.hh.
|
protected |
Definition at line 184 of file ComponentTcadBase.hh.
Referenced by Garfield::ComponentTcadBase< N >::HasVelocityMap().
|
protected |
Definition at line 220 of file ComponentTcadBase.hh.
|
protected |
Definition at line 219 of file ComponentTcadBase.hh.
|
protected |
Definition at line 138 of file ComponentTcadBase.hh.
Referenced by Garfield::ComponentTcadBase< N >::ComponentTcadBase(), and Garfield::ComponentTcadBase< N >::GetNumberOfRegions().
|
protected |
Definition at line 212 of file ComponentTcadBase.hh.
Referenced by Garfield::ComponentTcadBase< N >::EnableAttachmentMap(), and Garfield::ComponentTcadBase< N >::HasAttachmentMap().
|
protected |
Definition at line 210 of file ComponentTcadBase.hh.
Referenced by Garfield::ComponentTcadBase< N >::HasVelocityMap().
|
protected |
Definition at line 141 of file ComponentTcadBase.hh.
Referenced by Garfield::ComponentTcadBase< N >::ComponentTcadBase(), and Garfield::ComponentTcadBase< N >::GetNumberOfNodes().
|
protected |
Definition at line 176 of file ComponentTcadBase.hh.
|
protected |
Definition at line 179 of file ComponentTcadBase.hh.
|
protected |
Definition at line 177 of file ComponentTcadBase.hh.
|
protected |
Definition at line 180 of file ComponentTcadBase.hh.
|
staticconstexprprotected |
Definition at line 128 of file ComponentTcadBase.hh.