Garfield 0.3
Toolkit for the detailed simulation of particle detectors based on ionization measurement in gases and semiconductors
Loading...
Searching...
No Matches
Garfield::Medium Class Reference

Abstract base class for components. More...

#include <Medium.hh>

Inheritance diagram for Garfield::Medium:
Garfield::MediumCdTe Garfield::MediumConductor Garfield::MediumDiamond Garfield::MediumGaAs Garfield::MediumGaN Garfield::MediumGas Garfield::MediumPlastic Garfield::MediumSilicon

Classes

struct  Secondary

Public Member Functions

 Medium ()
 Constructor.
virtual ~Medium ()
 Destructor.
int GetId () const
 Return the id number of the class instance.
const std::string & GetName () const
 Get the medium name/identifier.
virtual bool IsGas () const
 Is this medium a gas?
virtual bool IsSemiconductor () const
 Is this medium a semiconductor?
virtual bool IsConductor () const
 Is this medium a conductor?
void SetTemperature (const double t)
 Set the temperature [K].
double GetTemperature () const
 Get the temperature [K].
void SetPressure (const double p)
double GetPressure () const
void SetDielectricConstant (const double eps)
 Set the relative static dielectric constant.
double GetDielectricConstant () const
 Get the relative static dielectric constant.
unsigned int GetNumberOfComponents () const
 Get number of components of the medium.
virtual void GetComponent (const unsigned int i, std::string &label, double &f)
 Get the name and fraction of a given component.
virtual void SetAtomicNumber (const double z)
 Set the effective atomic number.
virtual double GetAtomicNumber () const
 Get the effective atomic number.
virtual void SetAtomicWeight (const double a)
 Set the effective atomic weight.
virtual double GetAtomicWeight () const
 Get the effective atomic weight.
virtual void SetNumberDensity (const double n)
 Set the number density [cm-3].
virtual double GetNumberDensity () const
 Get the number density [cm-3].
virtual void SetMassDensity (const double rho)
 Set the mass density [g/cm3].
virtual double GetMassDensity () const
 Get the mass density [g/cm3].
virtual void EnableDrift (const bool on=true)
 Switch electron/ion/hole transport on/off.
virtual void EnablePrimaryIonisation (const bool on=true)
 Make the medium ionisable or non-ionisable.
bool IsDriftable () const
 Is charge carrier transport enabled in this medium?
bool IsMicroscopic () const
 Does the medium have electron scattering rates?
bool IsIonisable () const
 Is charge deposition by charged particles/photon enabled in this medium?
void SetW (const double w)
 Set the W value (average energy to produce an electron/ion or e/h pair).
double GetW () const
 Get the W value.
void SetFanoFactor (const double f)
 Set the Fano factor.
double GetFanoFactor () const
 Get the Fano factor.
void PlotVelocity (const std::string &carriers, TPad *pad)
 Plot the drift velocity as function of the electric field.
void PlotDiffusion (const std::string &carriers, TPad *pad)
 Plot the diffusion coefficients as function of the electric field.
void PlotTownsend (const std::string &carriers, TPad *pad)
 Plot the Townsend coefficient(s) as function of the electric field.
void PlotAttachment (const std::string &carriers, TPad *pad)
 Plot the attachment coefficient(s) as function of the electric field.
void PlotAlphaEta (const std::string &carriers, TPad *pad)
 Plot Townsend and attachment coefficients.
virtual bool ElectronVelocity (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &vx, double &vy, double &vz)
 Drift velocity [cm / ns].
virtual bool ElectronVelocityFluxBulk (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &wv, double &wr)
 Flux (mean velocity; shorthand: wv) and bulk (center of mass velocity; shorthand: wr) drift velocity [cm / ns].
virtual bool ElectronDiffusion (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &dl, double &dt)
 Longitudinal and transverse diffusion coefficients [cm1/2].
virtual bool ElectronDiffusion (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double cov[3][3])
 Diffusion tensor: diagonal elements are the diffusion coefficients [cm] along e, btrans, e x b, off-diagonal elements are the covariances.
virtual bool ElectronTownsend (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &alpha)
 Ionisation coefficient [cm-1].
virtual bool ElectronAttachment (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &eta)
 Attachment coefficient [cm-1].
virtual bool ElectronTOFIonisation (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &riontof)
 TOF Ionisation rate [ns-1].
virtual bool ElectronTOFAttachment (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &ratttof)
 TOF Attachment Rate [ns-1].
virtual bool ElectronLorentzAngle (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &lor)
 Lorentz angle.
virtual double ElectronMobility ()
 Low-field mobility [cm2 V-1 ns-1].
virtual double GetElectronEnergy (const double px, const double py, const double pz, double &vx, double &vy, double &vz, const int band=0)
 Dispersion relation (energy vs. wave vector)
virtual void GetElectronMomentum (const double e, double &px, double &py, double &pz, int &band)
 Sample the momentum vector for a given energy (only meaningful in semiconductors).
virtual double GetElectronNullCollisionRate (const int band=0)
 Null-collision rate [ns-1].
virtual double GetElectronCollisionRate (const double e, const int band=0)
 Collision rate [ns-1] for given electron energy.
virtual bool ElectronCollision (const double e, int &type, int &level, double &e1, double &dx, double &dy, double &dz, std::vector< Secondary > &secondaries, int &band)
 Sample the collision type. Update energy and direction vector.
virtual bool HoleVelocity (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &vx, double &vy, double &vz)
 Drift velocity [cm / ns].
virtual bool HoleDiffusion (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &dl, double &dt)
 Longitudinal and transverse diffusion coefficients [cm1/2].
virtual bool HoleDiffusion (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double cov[3][3])
 Diffusion tensor.
virtual bool HoleTownsend (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &alpha)
 Ionisation coefficient [cm-1].
virtual bool HoleAttachment (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &eta)
 Attachment coefficient [cm-1].
virtual double HoleMobility ()
 Low-field mobility [cm2 V-1 ns-1].
virtual bool IonVelocity (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &vx, double &vy, double &vz)
 Ion drift velocity [cm / ns].
bool HasIonVelocity () const
virtual bool IonDiffusion (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &dl, double &dt)
 Longitudinal and transverse diffusion coefficients [cm1/2].
virtual bool IonDissociation (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &diss)
 Dissociation coefficient.
virtual double IonMobility ()
 Low-field ion mobility [cm2 V-1 ns-1].
virtual bool NegativeIonVelocity (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &vx, double &vy, double &vz)
 Negative ion drift velocity [cm / ns].
virtual double NegativeIonMobility ()
 Low-field negative ion mobility [cm2 V-1 ns-1].
void SetFieldGrid (double emin, double emax, const size_t ne, bool logE, double bmin=0., double bmax=0., const size_t nb=1, double amin=HalfPi, double amax=HalfPi, const size_t na=1)
 Set the range of fields to be covered by the transport tables.
void SetFieldGrid (const std::vector< double > &efields, const std::vector< double > &bfields, const std::vector< double > &angles)
 Set the fields and E-B angles to be used in the transport tables.
void GetFieldGrid (std::vector< double > &efields, std::vector< double > &bfields, std::vector< double > &angles)
 Get the fields and E-B angles used in the transport tables.
bool SetElectronVelocityE (const size_t ie, const size_t ib, const size_t ia, const double v)
 Set an entry in the table of drift speeds along E.
bool GetElectronVelocityE (const size_t ie, const size_t ib, const size_t ia, double &v)
 Get an entry in the table of drift speeds along E.
bool SetElectronVelocityExB (const size_t ie, const size_t ib, const size_t ia, const double v)
 Set an entry in the table of drift speeds along ExB.
bool GetElectronVelocityExB (const size_t ie, const size_t ib, const size_t ia, double &v)
 Get an entry in the table of drift speeds along ExB.
bool SetElectronVelocityB (const size_t ie, const size_t ib, const size_t ia, const double v)
 Set an entry in the table of drift speeds along Btrans.
bool GetElectronVelocityB (const size_t ie, const size_t ib, const size_t ia, double &v)
 Get an entry in the table of drift speeds along Btrans.
bool SetElectronFluxVelocity (const size_t ie, const size_t ib, const size_t ia, const double v)
 Set an entry in the table of flux drift speeds.
bool GetElectronFluxVelocity (const size_t ie, const size_t ib, const size_t ia, double &v)
 Get an entry in the table of flux drift speeds.
bool SetElectronBulkVelocity (const size_t ie, const size_t ib, const size_t ia, const double v)
 Set an entry in the table of bulk drift speeds.
bool GetElectronBulkVelocity (const size_t ie, const size_t ib, const size_t ia, double &v)
 Get an entry in the table of bulk drift speeds.
bool SetElectronLongitudinalDiffusion (const size_t ie, const size_t ib, const size_t ia, const double dl)
 Set an entry in the table of longitudinal diffusion coefficients.
bool GetElectronLongitudinalDiffusion (const size_t ie, const size_t ib, const size_t ia, double &dl)
 Get an entry in the table of longitudinal diffusion coefficients.
bool SetElectronTransverseDiffusion (const size_t ie, const size_t ib, const size_t ia, const double dt)
 Set an entry in the table of transverse diffusion coefficients.
bool GetElectronTransverseDiffusion (const size_t ie, const size_t ib, const size_t ia, double &dt)
 Get an entry in the table of transverse diffusion coefficients.
bool SetElectronTownsend (const size_t ie, const size_t ib, const size_t ia, const double alpha)
 Set an entry in the table of Townsend coefficients.
bool GetElectronTownsend (const size_t ie, const size_t ib, const size_t ia, double &alpha)
 Get an entry in the table of Townsend coefficients.
bool SetElectronAttachment (const size_t ie, const size_t ib, const size_t ia, const double eta)
 Set an entry in the table of attachment coefficients.
bool GetElectronAttachment (const size_t ie, const size_t ib, const size_t ia, double &eta)
 Get an entry in the table of attachment coefficients.
bool SetElectronTOFIonisation (const size_t ie, const size_t ib, const size_t ia, const double v)
 Set an entry in the table of ionization rate of TOF.
bool GetElectronTOFIonisation (const size_t ie, const size_t ib, const size_t ia, double &v)
 Get an entry in the table of ionization rate of TOF.
bool SetElectronTOFAttachment (const size_t ie, const size_t ib, const size_t ia, const double v)
 Set an entry in the table of attachment rate of TOF.
bool GetElectronTOFAttachment (const size_t ie, const size_t ib, const size_t ia, double &v)
 Get an entry in the table of attachment rate of TOF.
bool SetElectronLorentzAngle (const size_t ie, const size_t ib, const size_t ia, const double lor)
 Set an entry in the table of Lorentz angles.
bool GetElectronLorentzAngle (const size_t ie, const size_t ib, const size_t ia, double &lor)
 Get an entry in the table of Lorentz angles.
bool SetHoleVelocityE (const size_t ie, const size_t ib, const size_t ia, const double v)
 Set an entry in the table of drift speeds along E.
bool GetHoleVelocityE (const size_t ie, const size_t ib, const size_t ia, double &v)
 Get an entry in the table of drift speeds along E.
bool SetHoleVelocityExB (const size_t ie, const size_t ib, const size_t ia, const double v)
 Set an entry in the table of drift speeds along ExB.
bool GetHoleVelocityExB (const size_t ie, const size_t ib, const size_t ia, double &v)
 Get an entry in the table of drift speeds along ExB.
bool SetHoleVelocityB (const size_t ie, const size_t ib, const size_t ia, const double v)
 Set an entry in the table of drift speeds along Btrans.
bool GetHoleVelocityB (const size_t ie, const size_t ib, const size_t ia, double &v)
 Get an entry in the table of drift speeds along Btrans.
bool SetHoleLongitudinalDiffusion (const size_t ie, const size_t ib, const size_t ia, const double dl)
 Set an entry in the table of longitudinal diffusion coefficients.
bool GetHoleLongitudinalDiffusion (const size_t ie, const size_t ib, const size_t ia, double &dl)
 Get an entry in the table of longitudinal diffusion coefficients.
bool SetHoleTransverseDiffusion (const size_t ie, const size_t ib, const size_t ia, const double dt)
 Set an entry in the table of transverse diffusion coefficients.
bool GetHoleTransverseDiffusion (const size_t ie, const size_t ib, const size_t ia, double &dt)
 Get an entry in the table of transverse diffusion coefficients.
bool SetHoleTownsend (const size_t ie, const size_t ib, const size_t ia, const double alpha)
 Set an entry in the table of Townsend coefficients.
bool GetHoleTownsend (const size_t ie, const size_t ib, const size_t ia, double &alpha)
 Get an entry in the table of Townsend coefficients.
bool SetHoleAttachment (const size_t ie, const size_t ib, const size_t ia, const double eta)
 Set an entry in the table of attachment coefficients.
bool GetHoleAttachment (const size_t ie, const size_t ib, const size_t ia, double &eta)
 Get an entry in the table of attachment coefficients.
bool SetIonMobility (const std::vector< double > &fields, const std::vector< double > &mobilities, const bool negativeIons=false)
 Initialise the table of ion mobilities from a list of electric fields and corresponding mobilities.
bool SetIonMobility (const size_t ie, const size_t ib, const size_t ia, const double mu)
 Set an entry in the table of ion mobilities.
bool GetIonMobility (const size_t ie, const size_t ib, const size_t ia, double &mu)
 Get an entry in the table of ion mobilities.
bool SetIonLongitudinalDiffusion (const size_t ie, const size_t ib, const size_t ia, const double dl)
 Set an entry in the table of longitudinal diffusion coefficients.
bool GetIonLongitudinalDiffusion (const size_t ie, const size_t ib, const size_t ia, double &dl)
 Get an entry in the table of longitudinal diffusion coefficients.
bool SetIonTransverseDiffusion (const size_t ie, const size_t ib, const size_t ia, const double dt)
 Set an entry in the table of transverse diffusion coefficients.
bool GetIonTransverseDiffusion (const size_t ie, const size_t ib, const size_t ia, double &dt)
 Get an entry in the table of transverse diffusion coefficients.
bool SetIonDissociation (const size_t ie, const size_t ib, const size_t ia, const double diss)
 Set an entry in the table of dissociation coefficients.
bool GetIonDissociation (const size_t ie, const size_t ib, const size_t ia, double &diss)
 Get an entry in the table of dissociation coefficients.
bool SetNegativeIonMobility (const size_t ie, const size_t ib, const size_t ia, const double mu)
 Set an entry in the table of negative ion mobilities.
bool GetNegativeIonMobility (const size_t ie, const size_t ib, const size_t ia, double &mu)
 Get an entry in the table of negative ion mobilities.
virtual void ResetTables ()
 Reset all tables of transport parameters.
void ResetElectronVelocity ()
void ResetElectronDiffusion ()
void ResetElectronTownsend ()
void ResetElectronAttachment ()
void ResetElectronTOFRates ()
void ResetElectronLorentzAngle ()
void ResetHoleVelocity ()
void ResetHoleDiffusion ()
void ResetHoleTownsend ()
void ResetHoleAttachment ()
void ResetIonMobility ()
void ResetIonDiffusion ()
void ResetIonDissociation ()
void ResetNegativeIonMobility ()
void VelocityFromMobility (const std::vector< std::vector< std::vector< double > > > &mob, std::vector< std::vector< std::vector< double > > > &vel)
void SetExtrapolationMethodVelocity (const std::string &extrLow, const std::string &extrHigh)
 Select the extrapolation method for fields below/above the table range.
void SetExtrapolationMethodDiffusion (const std::string &extrLow, const std::string &extrHigh)
void SetExtrapolationMethodTownsend (const std::string &extrLow, const std::string &extrHigh)
void SetExtrapolationMethodAttachment (const std::string &extrLow, const std::string &extrHigh)
void SetExtrapolationMethodIonMobility (const std::string &extrLow, const std::string &extrHigh)
void SetExtrapolationMethodIonDissociation (const std::string &extrLow, const std::string &extrHigh)
void SetInterpolationMethodVelocity (const unsigned int intrp)
 Set the degree of polynomial interpolation (usually 2).
void SetInterpolationMethodDiffusion (const unsigned int intrp)
void SetInterpolationMethodTownsend (const unsigned int intrp)
void SetInterpolationMethodAttachment (const unsigned int intrp)
void SetInterpolationMethodIonMobility (const unsigned int intrp)
void SetInterpolationMethodIonDissociation (const unsigned int intrp)
virtual double ScaleElectricField (const double e) const
virtual double UnScaleElectricField (const double e) const
virtual double ScaleVelocity (const double v) const
virtual double ScaleDiffusion (const double d) const
virtual double ScaleDiffusionTensor (const double d) const
virtual double ScaleTownsend (const double alpha) const
virtual double ScaleAttachment (const double eta) const
virtual double ScaleLorentzAngle (const double lor) const
virtual double ScaleDissociation (const double diss) const
virtual bool GetOpticalDataRange (double &emin, double &emax, const unsigned int i=0)
 Get the energy range [eV] of the available optical data.
virtual bool GetDielectricFunction (const double e, double &eps1, double &eps2, const unsigned int i=0)
 Get the complex dielectric function at a given energy.
virtual bool GetPhotoAbsorptionCrossSection (const double e, double &sigma, const unsigned int i=0)
virtual double GetPhotonCollisionRate (const double e)
virtual bool PhotonCollision (const double e, int &type, int &level, double &e1, double &ctheta, std::vector< Secondary > &secondaries)
void EnableDebugging ()
 Switch on/off debugging messages.
void DisableDebugging ()
virtual double CreateGPUTransferObject (MediumGPU *&med_gpu)
 Create and initialise GPU Transfer class.

Protected Member Functions

bool Velocity (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, const std::vector< std::vector< std::vector< double > > > &velE, const std::vector< std::vector< std::vector< double > > > &velB, const std::vector< std::vector< std::vector< double > > > &velX, const double q, double &vx, double &vy, double &vz) const
bool VelocityFluxBulk (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, const std::vector< std::vector< std::vector< double > > > &velWv, const std::vector< std::vector< std::vector< double > > > &velWr, double &wv, double &wr) const
bool Diffusion (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, const std::vector< std::vector< std::vector< double > > > &difL, const std::vector< std::vector< std::vector< double > > > &difT, double &dl, double &dt) const
bool Diffusion (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, const std::vector< std::vector< std::vector< std::vector< double > > > > &diff, double cov[3][3]) const
bool Alpha (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, const std::vector< std::vector< std::vector< double > > > &tab, unsigned int intp, const unsigned int thr, const std::pair< unsigned int, unsigned int > &extr, double &alpha) const
double GetAngle (const double ex, const double ey, const double ez, const double bx, const double by, const double bz, const double e, const double b) const
bool Interpolate (const double e, const double b, const double a, const std::vector< std::vector< std::vector< double > > > &table, double &y, const unsigned int intp, const std::pair< unsigned int, unsigned int > &extr, const bool logval=false) const
double Interpolate1D (const double e, const std::vector< double > &table, const std::vector< double > &fields, const unsigned int intpMeth, const std::pair< unsigned int, unsigned int > &extr, const bool logval=false) const
bool SetEntry (const size_t i, const size_t j, const size_t k, const std::string &fcn, std::vector< std::vector< std::vector< double > > > &tab, const double val)
bool GetEntry (const size_t i, const size_t j, const size_t k, const std::string &fcn, const std::vector< std::vector< std::vector< double > > > &tab, double &val) const
void SetExtrapolationMethod (const std::string &low, const std::string &high, std::pair< unsigned int, unsigned int > &extr, const std::string &fcn)
bool GetExtrapolationIndex (std::string str, unsigned int &nb) const
size_t SetThreshold (const std::vector< std::vector< std::vector< double > > > &tab) const
void Clone (std::vector< std::vector< std::vector< double > > > &tab, const std::vector< double > &efields, const std::vector< double > &bfields, const std::vector< double > &angles, const unsigned int intp, const std::pair< unsigned int, unsigned int > &extr, const double init, const std::string &label)
void Clone (std::vector< std::vector< std::vector< std::vector< double > > > > &tab, const size_t n, const std::vector< double > &efields, const std::vector< double > &bfields, const std::vector< double > &angles, const unsigned int intp, const std::pair< unsigned int, unsigned int > &extr, const double init, const std::string &label)
void Init (const size_t nE, const size_t nB, const size_t nA, std::vector< std::vector< std::vector< double > > > &tab, const double val)
void Init (const size_t nE, const size_t nB, const size_t nA, const size_t nT, std::vector< std::vector< std::vector< std::vector< double > > > > &tab, const double val)

Static Protected Member Functions

static void Langevin (const double ex, const double ey, const double ez, double bx, double by, double bz, const double mu, double &vx, double &vy, double &vz)
static void Langevin (const double ex, const double ey, const double ez, double bx, double by, double bz, const double mu, const double muH, double &vx, double &vy, double &vz)

Protected Attributes

std::string m_className = "Medium"
unsigned int m_nComponents = 1
std::string m_name = ""
double m_temperature = 293.15
double m_pressure = 760.
double m_epsilon = 1.
double m_z = 1.
double m_a = 0.
double m_density = 0.
int m_id
bool m_driftable = false
bool m_microscopic = false
bool m_ionisable = false
double m_w = 0.
double m_fano = 0.
bool m_isChanged = true
bool m_debug = false
bool m_tab2d = false
std::vector< double > m_eFields
std::vector< double > m_bFields
std::vector< double > m_bAngles
std::vector< std::vector< std::vector< double > > > m_eVelE
std::vector< std::vector< std::vector< double > > > m_eVelX
std::vector< std::vector< std::vector< double > > > m_eVelB
std::vector< std::vector< std::vector< double > > > m_eDifL
std::vector< std::vector< std::vector< double > > > m_eDifT
std::vector< std::vector< std::vector< double > > > m_eAlp
std::vector< std::vector< std::vector< double > > > m_eAtt
std::vector< std::vector< std::vector< double > > > m_eLor
std::vector< std::vector< std::vector< double > > > m_eVelWv
std::vector< std::vector< std::vector< double > > > m_eVelWr
std::vector< std::vector< std::vector< double > > > m_eRIon
std::vector< std::vector< std::vector< double > > > m_eRAtt
std::vector< std::vector< std::vector< std::vector< double > > > > m_eDifM
std::vector< std::vector< std::vector< double > > > m_hVelE
std::vector< std::vector< std::vector< double > > > m_hVelX
std::vector< std::vector< std::vector< double > > > m_hVelB
std::vector< std::vector< std::vector< double > > > m_hDifL
std::vector< std::vector< std::vector< double > > > m_hDifT
std::vector< std::vector< std::vector< double > > > m_hAlp
std::vector< std::vector< std::vector< double > > > m_hAtt
std::vector< std::vector< std::vector< std::vector< double > > > > m_hDifM
std::vector< std::vector< std::vector< double > > > m_iMob
std::vector< std::vector< std::vector< double > > > m_iVel
std::vector< std::vector< std::vector< double > > > m_iDifL
std::vector< std::vector< std::vector< double > > > m_iDifT
std::vector< std::vector< std::vector< double > > > m_iDis
std::vector< std::vector< std::vector< double > > > m_nMob
std::vector< std::vector< std::vector< double > > > m_nVel
unsigned int m_eThrAlp = 0
unsigned int m_eThrAtt = 0
unsigned int m_hThrAlp = 0
unsigned int m_hThrAtt = 0
unsigned int m_iThrDis = 0
std::pair< unsigned int, unsigned int > m_extrVel = {0, 1}
std::pair< unsigned int, unsigned int > m_extrDif = {0, 1}
std::pair< unsigned int, unsigned int > m_extrAlp = {0, 1}
std::pair< unsigned int, unsigned int > m_extrAtt = {0, 1}
std::pair< unsigned int, unsigned int > m_extrLor = {0, 1}
std::pair< unsigned int, unsigned int > m_extrMob = {0, 1}
std::pair< unsigned int, unsigned int > m_extrDis = {0, 1}
unsigned int m_intpVel = 2
unsigned int m_intpDif = 2
unsigned int m_intpAlp = 2
unsigned int m_intpAtt = 2
unsigned int m_intpLor = 2
unsigned int m_intpMob = 2
unsigned int m_intpDis = 2

Static Protected Attributes

static int m_idCounter

Detailed Description

Abstract base class for components.

Definition at line 17 of file Medium.hh.

Constructor & Destructor Documentation

◆ Medium()

Garfield::Medium::Medium ( )

Constructor.

◆ ~Medium()

virtual Garfield::Medium::~Medium ( )
virtual

Destructor.

Member Function Documentation

◆ Alpha()

bool Garfield::Medium::Alpha ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
const std::vector< std::vector< std::vector< double > > > & tab,
unsigned int intp,
const unsigned int thr,
const std::pair< unsigned int, unsigned int > & extr,
double & alpha ) const
protected

◆ Clone() [1/2]

void Garfield::Medium::Clone ( std::vector< std::vector< std::vector< double > > > & tab,
const std::vector< double > & efields,
const std::vector< double > & bfields,
const std::vector< double > & angles,
const unsigned int intp,
const std::pair< unsigned int, unsigned int > & extr,
const double init,
const std::string & label )
protected

◆ Clone() [2/2]

void Garfield::Medium::Clone ( std::vector< std::vector< std::vector< std::vector< double > > > > & tab,
const size_t n,
const std::vector< double > & efields,
const std::vector< double > & bfields,
const std::vector< double > & angles,
const unsigned int intp,
const std::pair< unsigned int, unsigned int > & extr,
const double init,
const std::string & label )
protected

◆ CreateGPUTransferObject()

virtual double Garfield::Medium::CreateGPUTransferObject ( MediumGPU *& med_gpu)
virtual

Create and initialise GPU Transfer class.

Reimplemented in Garfield::MediumGas, and Garfield::MediumMagboltz.

◆ Diffusion() [1/2]

bool Garfield::Medium::Diffusion ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
const std::vector< std::vector< std::vector< double > > > & difL,
const std::vector< std::vector< std::vector< double > > > & difT,
double & dl,
double & dt ) const
protected

◆ Diffusion() [2/2]

bool Garfield::Medium::Diffusion ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
const std::vector< std::vector< std::vector< std::vector< double > > > > & diff,
double cov[3][3] ) const
protected

◆ DisableDebugging()

void Garfield::Medium::DisableDebugging ( )
inline

Definition at line 602 of file Medium.hh.

602{ m_debug = false; }

◆ ElectronAttachment()

virtual bool Garfield::Medium::ElectronAttachment ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & eta )
virtual

◆ ElectronCollision()

virtual bool Garfield::Medium::ElectronCollision ( const double e,
int & type,
int & level,
double & e1,
double & dx,
double & dy,
double & dz,
std::vector< Secondary > & secondaries,
int & band )
virtual

Sample the collision type. Update energy and direction vector.

Reimplemented in Garfield::MediumMagboltz, and Garfield::MediumSilicon.

◆ ElectronDiffusion() [1/2]

virtual bool Garfield::Medium::ElectronDiffusion ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & dl,
double & dt )
virtual

Longitudinal and transverse diffusion coefficients [cm1/2].

◆ ElectronDiffusion() [2/2]

virtual bool Garfield::Medium::ElectronDiffusion ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double cov[3][3] )
virtual

Diffusion tensor: diagonal elements are the diffusion coefficients [cm] along e, btrans, e x b, off-diagonal elements are the covariances.

◆ ElectronLorentzAngle()

virtual bool Garfield::Medium::ElectronLorentzAngle ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & lor )
virtual

Lorentz angle.

◆ ElectronMobility()

virtual double Garfield::Medium::ElectronMobility ( )
virtual

◆ ElectronTOFAttachment()

virtual bool Garfield::Medium::ElectronTOFAttachment ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & ratttof )
virtual

TOF Attachment Rate [ns-1].

◆ ElectronTOFIonisation()

virtual bool Garfield::Medium::ElectronTOFIonisation ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & riontof )
virtual

TOF Ionisation rate [ns-1].

◆ ElectronTownsend()

virtual bool Garfield::Medium::ElectronTownsend ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & alpha )
virtual

◆ ElectronVelocity()

virtual bool Garfield::Medium::ElectronVelocity ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & vx,
double & vy,
double & vz )
virtual

◆ ElectronVelocityFluxBulk()

virtual bool Garfield::Medium::ElectronVelocityFluxBulk ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & wv,
double & wr )
virtual

Flux (mean velocity; shorthand: wv) and bulk (center of mass velocity; shorthand: wr) drift velocity [cm / ns].

◆ EnableDebugging()

void Garfield::Medium::EnableDebugging ( )
inline

Switch on/off debugging messages.

Definition at line 601 of file Medium.hh.

601{ m_debug = true; }

◆ EnableDrift()

virtual void Garfield::Medium::EnableDrift ( const bool on = true)
inlinevirtual

Switch electron/ion/hole transport on/off.

Reimplemented in Garfield::MediumConductor, and Garfield::MediumPlastic.

Definition at line 72 of file Medium.hh.

72{ m_driftable = on; }

◆ EnablePrimaryIonisation()

virtual void Garfield::Medium::EnablePrimaryIonisation ( const bool on = true)
inlinevirtual

Make the medium ionisable or non-ionisable.

Reimplemented in Garfield::MediumConductor, and Garfield::MediumPlastic.

Definition at line 74 of file Medium.hh.

74 {
75 m_ionisable = on;
76 }

◆ GetAngle()

double Garfield::Medium::GetAngle ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
const double e,
const double b ) const
protected

◆ GetAtomicNumber()

virtual double Garfield::Medium::GetAtomicNumber ( ) const
inlinevirtual

Get the effective atomic number.

Reimplemented in Garfield::MediumGas.

Definition at line 57 of file Medium.hh.

57{ return m_z; }

◆ GetAtomicWeight()

virtual double Garfield::Medium::GetAtomicWeight ( ) const
inlinevirtual

Get the effective atomic weight.

Reimplemented in Garfield::MediumGas.

Definition at line 61 of file Medium.hh.

61{ return m_a; }

◆ GetComponent()

virtual void Garfield::Medium::GetComponent ( const unsigned int i,
std::string & label,
double & f )
virtual

Get the name and fraction of a given component.

Reimplemented in Garfield::MediumCdTe, Garfield::MediumDiamond, Garfield::MediumGaAs, Garfield::MediumGaN, and Garfield::MediumGas.

◆ GetDielectricConstant()

double Garfield::Medium::GetDielectricConstant ( ) const
inline

Get the relative static dielectric constant.

Definition at line 47 of file Medium.hh.

47{ return m_epsilon; }
double m_epsilon
Definition Medium.hh:621

◆ GetDielectricFunction()

virtual bool Garfield::Medium::GetDielectricFunction ( const double e,
double & eps1,
double & eps2,
const unsigned int i = 0 )
virtual

Get the complex dielectric function at a given energy.

Reimplemented in Garfield::MediumSilicon.

◆ GetElectronAttachment()

bool Garfield::Medium::GetElectronAttachment ( const size_t ie,
const size_t ib,
const size_t ia,
double & eta )
inline

Get an entry in the table of attachment coefficients.

Definition at line 333 of file Medium.hh.

334 {
335 return GetEntry(ie, ib, ia, "ElectronAttachment", m_eAtt, eta);
336 }
bool GetEntry(const size_t i, const size_t j, const size_t k, const std::string &fcn, const std::vector< std::vector< std::vector< double > > > &tab, double &val) const
std::vector< std::vector< std::vector< double > > > m_eAtt
Definition Medium.hh:663

◆ GetElectronBulkVelocity()

bool Garfield::Medium::GetElectronBulkVelocity ( const size_t ie,
const size_t ib,
const size_t ia,
double & v )
inline

Get an entry in the table of bulk drift speeds.

Definition at line 293 of file Medium.hh.

294 {
295 return GetEntry(ie, ib, ia, "ElectronBulkVelocity", m_eVelWr, v);
296 }
std::vector< std::vector< std::vector< double > > > m_eVelWr
Definition Medium.hh:666

◆ GetElectronCollisionRate()

virtual double Garfield::Medium::GetElectronCollisionRate ( const double e,
const int band = 0 )
virtual

Collision rate [ns-1] for given electron energy.

Reimplemented in Garfield::MediumMagboltz, and Garfield::MediumSilicon.

◆ GetElectronEnergy()

virtual double Garfield::Medium::GetElectronEnergy ( const double px,
const double py,
const double pz,
double & vx,
double & vy,
double & vz,
const int band = 0 )
virtual

Dispersion relation (energy vs. wave vector)

Reimplemented in Garfield::MediumSilicon.

◆ GetElectronFluxVelocity()

bool Garfield::Medium::GetElectronFluxVelocity ( const size_t ie,
const size_t ib,
const size_t ia,
double & v )
inline

Get an entry in the table of flux drift speeds.

Definition at line 283 of file Medium.hh.

284 {
285 return GetEntry(ie, ib, ia, "ElectronFluxVelocity", m_eVelWv, v);
286 }
std::vector< std::vector< std::vector< double > > > m_eVelWv
Definition Medium.hh:665

◆ GetElectronLongitudinalDiffusion()

bool Garfield::Medium::GetElectronLongitudinalDiffusion ( const size_t ie,
const size_t ib,
const size_t ia,
double & dl )
inline

Get an entry in the table of longitudinal diffusion coefficients.

Definition at line 303 of file Medium.hh.

304 {
305 return GetEntry(ie, ib, ia, "ElectronLongitudinalDiffusion", m_eDifL, dl);
306 }
std::vector< std::vector< std::vector< double > > > m_eDifL
Definition Medium.hh:660

◆ GetElectronLorentzAngle()

bool Garfield::Medium::GetElectronLorentzAngle ( const size_t ie,
const size_t ib,
const size_t ia,
double & lor )
inline

Get an entry in the table of Lorentz angles.

Definition at line 364 of file Medium.hh.

365 {
366 return GetEntry(ie, ib, ia, "ElectronLorentzAngle", m_eLor, lor);
367 }
std::vector< std::vector< std::vector< double > > > m_eLor
Definition Medium.hh:664

◆ GetElectronMomentum()

virtual void Garfield::Medium::GetElectronMomentum ( const double e,
double & px,
double & py,
double & pz,
int & band )
virtual

Sample the momentum vector for a given energy (only meaningful in semiconductors).

Reimplemented in Garfield::MediumSilicon.

◆ GetElectronNullCollisionRate()

virtual double Garfield::Medium::GetElectronNullCollisionRate ( const int band = 0)
virtual

Null-collision rate [ns-1].

Reimplemented in Garfield::MediumMagboltz, and Garfield::MediumSilicon.

◆ GetElectronTOFAttachment()

bool Garfield::Medium::GetElectronTOFAttachment ( const size_t ie,
const size_t ib,
const size_t ia,
double & v )
inline

Get an entry in the table of attachment rate of TOF.

Definition at line 353 of file Medium.hh.

354 {
355 return GetEntry(ie, ib, ia, "ElectronTOFAttachment", m_eRAtt, v);
356 }
std::vector< std::vector< std::vector< double > > > m_eRAtt
Definition Medium.hh:668

◆ GetElectronTOFIonisation()

bool Garfield::Medium::GetElectronTOFIonisation ( const size_t ie,
const size_t ib,
const size_t ia,
double & v )
inline

Get an entry in the table of ionization rate of TOF.

Definition at line 343 of file Medium.hh.

344 {
345 return GetEntry(ie, ib, ia, "ElectronTOFIonisation", m_eRIon, v);
346 }
std::vector< std::vector< std::vector< double > > > m_eRIon
Definition Medium.hh:667

◆ GetElectronTownsend()

bool Garfield::Medium::GetElectronTownsend ( const size_t ie,
const size_t ib,
const size_t ia,
double & alpha )
inline

Get an entry in the table of Townsend coefficients.

Definition at line 323 of file Medium.hh.

324 {
325 return GetEntry(ie, ib, ia, "ElectronTownsend", m_eAlp, alpha);
326 }
std::vector< std::vector< std::vector< double > > > m_eAlp
Definition Medium.hh:662

◆ GetElectronTransverseDiffusion()

bool Garfield::Medium::GetElectronTransverseDiffusion ( const size_t ie,
const size_t ib,
const size_t ia,
double & dt )
inline

Get an entry in the table of transverse diffusion coefficients.

Definition at line 313 of file Medium.hh.

314 {
315 return GetEntry(ie, ib, ia, "ElectronTransverseDiffusion", m_eDifT, dt);
316 }
std::vector< std::vector< std::vector< double > > > m_eDifT
Definition Medium.hh:661

◆ GetElectronVelocityB()

bool Garfield::Medium::GetElectronVelocityB ( const size_t ie,
const size_t ib,
const size_t ia,
double & v )
inline

Get an entry in the table of drift speeds along Btrans.

Definition at line 273 of file Medium.hh.

274 {
275 return GetEntry(ie, ib, ia, "ElectronVelocityB", m_eVelB, v);
276 }
std::vector< std::vector< std::vector< double > > > m_eVelB
Definition Medium.hh:659

◆ GetElectronVelocityE()

bool Garfield::Medium::GetElectronVelocityE ( const size_t ie,
const size_t ib,
const size_t ia,
double & v )
inline

Get an entry in the table of drift speeds along E.

Definition at line 253 of file Medium.hh.

254 {
255 return GetEntry(ie, ib, ia, "ElectronVelocityE", m_eVelE, v);
256 }
std::vector< std::vector< std::vector< double > > > m_eVelE
Definition Medium.hh:657

◆ GetElectronVelocityExB()

bool Garfield::Medium::GetElectronVelocityExB ( const size_t ie,
const size_t ib,
const size_t ia,
double & v )
inline

Get an entry in the table of drift speeds along ExB.

Definition at line 263 of file Medium.hh.

264 {
265 return GetEntry(ie, ib, ia, "ElectronVelocityExB", m_eVelX, v);
266 }
std::vector< std::vector< std::vector< double > > > m_eVelX
Definition Medium.hh:658

◆ GetEntry()

bool Garfield::Medium::GetEntry ( const size_t i,
const size_t j,
const size_t k,
const std::string & fcn,
const std::vector< std::vector< std::vector< double > > > & tab,
double & val ) const
protected

◆ GetExtrapolationIndex()

bool Garfield::Medium::GetExtrapolationIndex ( std::string str,
unsigned int & nb ) const
protected

◆ GetFanoFactor()

double Garfield::Medium::GetFanoFactor ( ) const
inline

Get the Fano factor.

Definition at line 93 of file Medium.hh.

93{ return m_fano; }

◆ GetFieldGrid()

void Garfield::Medium::GetFieldGrid ( std::vector< double > & efields,
std::vector< double > & bfields,
std::vector< double > & angles )

Get the fields and E-B angles used in the transport tables.

◆ GetHoleAttachment()

bool Garfield::Medium::GetHoleAttachment ( const size_t ie,
const size_t ib,
const size_t ia,
double & eta )
inline

Get an entry in the table of attachment coefficients.

Definition at line 436 of file Medium.hh.

437 {
438 return GetEntry(ie, ib, ia, "HoleAttachment", m_hAtt, eta);
439 }
std::vector< std::vector< std::vector< double > > > m_hAtt
Definition Medium.hh:679

◆ GetHoleLongitudinalDiffusion()

bool Garfield::Medium::GetHoleLongitudinalDiffusion ( const size_t ie,
const size_t ib,
const size_t ia,
double & dl )
inline

Get an entry in the table of longitudinal diffusion coefficients.

Definition at line 406 of file Medium.hh.

407 {
408 return GetEntry(ie, ib, ia, "HoleLongitudinalDiffusion", m_hDifL, dl);
409 }
std::vector< std::vector< std::vector< double > > > m_hDifL
Definition Medium.hh:676

◆ GetHoleTownsend()

bool Garfield::Medium::GetHoleTownsend ( const size_t ie,
const size_t ib,
const size_t ia,
double & alpha )
inline

Get an entry in the table of Townsend coefficients.

Definition at line 426 of file Medium.hh.

427 {
428 return GetEntry(ie, ib, ia, "HoleTownsend", m_hAlp, alpha);
429 }
std::vector< std::vector< std::vector< double > > > m_hAlp
Definition Medium.hh:678

◆ GetHoleTransverseDiffusion()

bool Garfield::Medium::GetHoleTransverseDiffusion ( const size_t ie,
const size_t ib,
const size_t ia,
double & dt )
inline

Get an entry in the table of transverse diffusion coefficients.

Definition at line 416 of file Medium.hh.

417 {
418 return GetEntry(ie, ib, ia, "HoleTransverseDiffusion", m_hDifT, dt);
419 }
std::vector< std::vector< std::vector< double > > > m_hDifT
Definition Medium.hh:677

◆ GetHoleVelocityB()

bool Garfield::Medium::GetHoleVelocityB ( const size_t ie,
const size_t ib,
const size_t ia,
double & v )
inline

Get an entry in the table of drift speeds along Btrans.

Definition at line 395 of file Medium.hh.

396 {
397 return GetEntry(ie, ib, ia, "HoleVelocityB", m_hVelB, v);
398 }
std::vector< std::vector< std::vector< double > > > m_hVelB
Definition Medium.hh:675

◆ GetHoleVelocityE()

bool Garfield::Medium::GetHoleVelocityE ( const size_t ie,
const size_t ib,
const size_t ia,
double & v )
inline

Get an entry in the table of drift speeds along E.

Definition at line 375 of file Medium.hh.

376 {
377 return GetEntry(ie, ib, ia, "HoleVelocityE", m_hVelE, v);
378 }
std::vector< std::vector< std::vector< double > > > m_hVelE
Definition Medium.hh:673

◆ GetHoleVelocityExB()

bool Garfield::Medium::GetHoleVelocityExB ( const size_t ie,
const size_t ib,
const size_t ia,
double & v )
inline

Get an entry in the table of drift speeds along ExB.

Definition at line 385 of file Medium.hh.

386 {
387 return GetEntry(ie, ib, ia, "HoleVelocityExB", m_hVelX, v);
388 }
std::vector< std::vector< std::vector< double > > > m_hVelX
Definition Medium.hh:674

◆ GetId()

int Garfield::Medium::GetId ( ) const
inline

Return the id number of the class instance.

Definition at line 25 of file Medium.hh.

25{ return m_id; }

◆ GetIonDissociation()

bool Garfield::Medium::GetIonDissociation ( const size_t ie,
const size_t ib,
const size_t ia,
double & diss )
inline

Get an entry in the table of dissociation coefficients.

Definition at line 483 of file Medium.hh.

484 {
485 return GetEntry(ie, ib, ia, "IonDissociation", m_iDis, diss);
486 }
std::vector< std::vector< std::vector< double > > > m_iDis
Definition Medium.hh:688

◆ GetIonLongitudinalDiffusion()

bool Garfield::Medium::GetIonLongitudinalDiffusion ( const size_t ie,
const size_t ib,
const size_t ia,
double & dl )
inline

Get an entry in the table of longitudinal diffusion coefficients.

Definition at line 463 of file Medium.hh.

464 {
465 return GetEntry(ie, ib, ia, "IonLongitudinalDiffusion", m_iDifL, dl);
466 }
std::vector< std::vector< std::vector< double > > > m_iDifL
Definition Medium.hh:686

◆ GetIonMobility()

bool Garfield::Medium::GetIonMobility ( const size_t ie,
const size_t ib,
const size_t ia,
double & mu )
inline

Get an entry in the table of ion mobilities.

Definition at line 452 of file Medium.hh.

453 {
454 return GetEntry(ie, ib, ia, "IonMobility", m_iMob, mu);
455 }
std::vector< std::vector< std::vector< double > > > m_iMob
Definition Medium.hh:684

◆ GetIonTransverseDiffusion()

bool Garfield::Medium::GetIonTransverseDiffusion ( const size_t ie,
const size_t ib,
const size_t ia,
double & dt )
inline

Get an entry in the table of transverse diffusion coefficients.

Definition at line 473 of file Medium.hh.

474 {
475 return GetEntry(ie, ib, ia, "IonTransverseDiffusion", m_iDifT, dt);
476 }
std::vector< std::vector< std::vector< double > > > m_iDifT
Definition Medium.hh:687

◆ GetMassDensity()

virtual double Garfield::Medium::GetMassDensity ( ) const
virtual

Get the mass density [g/cm3].

Reimplemented in Garfield::MediumGas.

◆ GetName()

const std::string & Garfield::Medium::GetName ( ) const
inline

Get the medium name/identifier.

Definition at line 28 of file Medium.hh.

28{ return m_name; }
std::string m_name
Definition Medium.hh:615

◆ GetNegativeIonMobility()

bool Garfield::Medium::GetNegativeIonMobility ( const size_t ie,
const size_t ib,
const size_t ia,
double & mu )
inline

Get an entry in the table of negative ion mobilities.

Definition at line 492 of file Medium.hh.

493 {
494 return GetEntry(ie, ib, ia, "NegativeIonMobility", m_nMob, mu);
495 }
std::vector< std::vector< std::vector< double > > > m_nMob
Definition Medium.hh:690

◆ GetNumberDensity()

virtual double Garfield::Medium::GetNumberDensity ( ) const
inlinevirtual

Get the number density [cm-3].

Reimplemented in Garfield::MediumGas.

Definition at line 65 of file Medium.hh.

65{ return m_density; }
double m_density
Definition Medium.hh:627

◆ GetNumberOfComponents()

unsigned int Garfield::Medium::GetNumberOfComponents ( ) const
inline

Get number of components of the medium.

Definition at line 50 of file Medium.hh.

50{ return m_nComponents; }
unsigned int m_nComponents
Definition Medium.hh:613

◆ GetOpticalDataRange()

virtual bool Garfield::Medium::GetOpticalDataRange ( double & emin,
double & emax,
const unsigned int i = 0 )
virtual

Get the energy range [eV] of the available optical data.

Reimplemented in Garfield::MediumSilicon.

◆ GetPhotoAbsorptionCrossSection()

virtual bool Garfield::Medium::GetPhotoAbsorptionCrossSection ( const double e,
double & sigma,
const unsigned int i = 0 )
virtual

Reimplemented in Garfield::MediumGas.

◆ GetPhotonCollisionRate()

virtual double Garfield::Medium::GetPhotonCollisionRate ( const double e)
virtual

Reimplemented in Garfield::MediumMagboltz.

◆ GetPressure()

double Garfield::Medium::GetPressure ( ) const
inline

Definition at line 43 of file Medium.hh.

43{ return m_pressure; }
double m_pressure
Definition Medium.hh:619

◆ GetTemperature()

double Garfield::Medium::GetTemperature ( ) const
inline

Get the temperature [K].

Definition at line 39 of file Medium.hh.

39{ return m_temperature; }
double m_temperature
Definition Medium.hh:617

◆ GetW()

double Garfield::Medium::GetW ( ) const
inline

Get the W value.

Definition at line 89 of file Medium.hh.

89{ return m_w; }

◆ HasIonVelocity()

bool Garfield::Medium::HasIonVelocity ( ) const
inline

Definition at line 214 of file Medium.hh.

214{ return !(m_iVel.empty() && m_iMob.empty()); }
std::vector< std::vector< std::vector< double > > > m_iVel
Definition Medium.hh:685

◆ HoleAttachment()

virtual bool Garfield::Medium::HoleAttachment ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & eta )
virtual

◆ HoleDiffusion() [1/2]

virtual bool Garfield::Medium::HoleDiffusion ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & dl,
double & dt )
virtual

Longitudinal and transverse diffusion coefficients [cm1/2].

◆ HoleDiffusion() [2/2]

virtual bool Garfield::Medium::HoleDiffusion ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double cov[3][3] )
virtual

Diffusion tensor.

◆ HoleMobility()

virtual double Garfield::Medium::HoleMobility ( )
virtual

◆ HoleTownsend()

virtual bool Garfield::Medium::HoleTownsend ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & alpha )
virtual

◆ HoleVelocity()

virtual bool Garfield::Medium::HoleVelocity ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & vx,
double & vy,
double & vz )
virtual

◆ Init() [1/2]

void Garfield::Medium::Init ( const size_t nE,
const size_t nB,
const size_t nA,
const size_t nT,
std::vector< std::vector< std::vector< std::vector< double > > > > & tab,
const double val )
protected

◆ Init() [2/2]

void Garfield::Medium::Init ( const size_t nE,
const size_t nB,
const size_t nA,
std::vector< std::vector< std::vector< double > > > & tab,
const double val )
protected

◆ Interpolate()

bool Garfield::Medium::Interpolate ( const double e,
const double b,
const double a,
const std::vector< std::vector< std::vector< double > > > & table,
double & y,
const unsigned int intp,
const std::pair< unsigned int, unsigned int > & extr,
const bool logval = false ) const
protected

◆ Interpolate1D()

double Garfield::Medium::Interpolate1D ( const double e,
const std::vector< double > & table,
const std::vector< double > & fields,
const unsigned int intpMeth,
const std::pair< unsigned int, unsigned int > & extr,
const bool logval = false ) const
protected

◆ IonDiffusion()

virtual bool Garfield::Medium::IonDiffusion ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & dl,
double & dt )
virtual

Longitudinal and transverse diffusion coefficients [cm1/2].

◆ IonDissociation()

virtual bool Garfield::Medium::IonDissociation ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & diss )
virtual

Dissociation coefficient.

◆ IonMobility()

virtual double Garfield::Medium::IonMobility ( )
virtual

Low-field ion mobility [cm2 V-1 ns-1].

◆ IonVelocity()

virtual bool Garfield::Medium::IonVelocity ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & vx,
double & vy,
double & vz )
virtual

Ion drift velocity [cm / ns].

◆ IsConductor()

virtual bool Garfield::Medium::IsConductor ( ) const
inlinevirtual

Is this medium a conductor?

Reimplemented in Garfield::MediumConductor.

Definition at line 34 of file Medium.hh.

34{ return false; }

◆ IsDriftable()

bool Garfield::Medium::IsDriftable ( ) const
inline

Is charge carrier transport enabled in this medium?

Definition at line 79 of file Medium.hh.

79{ return m_driftable; }

◆ IsGas()

virtual bool Garfield::Medium::IsGas ( ) const
inlinevirtual

Is this medium a gas?

Reimplemented in Garfield::MediumGas.

Definition at line 30 of file Medium.hh.

30{ return false; }

◆ IsIonisable()

bool Garfield::Medium::IsIonisable ( ) const
inline

Is charge deposition by charged particles/photon enabled in this medium?

Definition at line 84 of file Medium.hh.

84{ return m_ionisable; }

◆ IsMicroscopic()

bool Garfield::Medium::IsMicroscopic ( ) const
inline

Does the medium have electron scattering rates?

Definition at line 81 of file Medium.hh.

81{ return m_microscopic; }

◆ IsSemiconductor()

virtual bool Garfield::Medium::IsSemiconductor ( ) const
inlinevirtual

Is this medium a semiconductor?

Reimplemented in Garfield::MediumCdTe, Garfield::MediumDiamond, Garfield::MediumGaAs, Garfield::MediumGaN, and Garfield::MediumSilicon.

Definition at line 32 of file Medium.hh.

32{ return false; }

◆ Langevin() [1/2]

void Garfield::Medium::Langevin ( const double ex,
const double ey,
const double ez,
double bx,
double by,
double bz,
const double mu,
const double muH,
double & vx,
double & vy,
double & vz )
staticprotected

◆ Langevin() [2/2]

void Garfield::Medium::Langevin ( const double ex,
const double ey,
const double ez,
double bx,
double by,
double bz,
const double mu,
double & vx,
double & vy,
double & vz )
staticprotected

◆ NegativeIonMobility()

virtual double Garfield::Medium::NegativeIonMobility ( )
virtual

Low-field negative ion mobility [cm2 V-1 ns-1].

◆ NegativeIonVelocity()

virtual bool Garfield::Medium::NegativeIonVelocity ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
double & vx,
double & vy,
double & vz )
virtual

Negative ion drift velocity [cm / ns].

◆ PhotonCollision()

virtual bool Garfield::Medium::PhotonCollision ( const double e,
int & type,
int & level,
double & e1,
double & ctheta,
std::vector< Secondary > & secondaries )
virtual

Reimplemented in Garfield::MediumMagboltz.

◆ PlotAlphaEta()

void Garfield::Medium::PlotAlphaEta ( const std::string & carriers,
TPad * pad )

Plot Townsend and attachment coefficients.

◆ PlotAttachment()

void Garfield::Medium::PlotAttachment ( const std::string & carriers,
TPad * pad )

Plot the attachment coefficient(s) as function of the electric field.

◆ PlotDiffusion()

void Garfield::Medium::PlotDiffusion ( const std::string & carriers,
TPad * pad )

Plot the diffusion coefficients as function of the electric field.

◆ PlotTownsend()

void Garfield::Medium::PlotTownsend ( const std::string & carriers,
TPad * pad )

Plot the Townsend coefficient(s) as function of the electric field.

◆ PlotVelocity()

void Garfield::Medium::PlotVelocity ( const std::string & carriers,
TPad * pad )

Plot the drift velocity as function of the electric field.

◆ ResetElectronAttachment()

void Garfield::Medium::ResetElectronAttachment ( )
inline

Definition at line 513 of file Medium.hh.

513{ m_eAtt.clear(); }

◆ ResetElectronDiffusion()

void Garfield::Medium::ResetElectronDiffusion ( )
inline

Definition at line 507 of file Medium.hh.

507 {
508 m_eDifL.clear();
509 m_eDifT.clear();
510 m_eDifM.clear();
511 }
std::vector< std::vector< std::vector< std::vector< double > > > > m_eDifM
Definition Medium.hh:670

◆ ResetElectronLorentzAngle()

void Garfield::Medium::ResetElectronLorentzAngle ( )
inline

Definition at line 518 of file Medium.hh.

518{ m_eLor.clear(); }

◆ ResetElectronTOFRates()

void Garfield::Medium::ResetElectronTOFRates ( )
inline

Definition at line 514 of file Medium.hh.

514 {
515 m_eRIon.clear();
516 m_eRAtt.clear();
517 }

◆ ResetElectronTownsend()

void Garfield::Medium::ResetElectronTownsend ( )
inline

Definition at line 512 of file Medium.hh.

512{ m_eAlp.clear(); }

◆ ResetElectronVelocity()

void Garfield::Medium::ResetElectronVelocity ( )
inline

Definition at line 500 of file Medium.hh.

500 {
501 m_eVelE.clear();
502 m_eVelB.clear();
503 m_eVelX.clear();
504 m_eVelWv.clear();
505 m_eVelWr.clear();
506 }

◆ ResetHoleAttachment()

void Garfield::Medium::ResetHoleAttachment ( )
inline

Definition at line 531 of file Medium.hh.

531{ m_hAtt.clear(); }

◆ ResetHoleDiffusion()

void Garfield::Medium::ResetHoleDiffusion ( )
inline

Definition at line 525 of file Medium.hh.

525 {
526 m_hDifL.clear();
527 m_hDifT.clear();
528 m_hDifM.clear();
529 }
std::vector< std::vector< std::vector< std::vector< double > > > > m_hDifM
Definition Medium.hh:681

◆ ResetHoleTownsend()

void Garfield::Medium::ResetHoleTownsend ( )
inline

Definition at line 530 of file Medium.hh.

530{ m_hAlp.clear(); }

◆ ResetHoleVelocity()

void Garfield::Medium::ResetHoleVelocity ( )
inline

Definition at line 520 of file Medium.hh.

520 {
521 m_hVelE.clear();
522 m_hVelB.clear();
523 m_hVelX.clear();
524 }

◆ ResetIonDiffusion()

void Garfield::Medium::ResetIonDiffusion ( )
inline

Definition at line 537 of file Medium.hh.

537 {
538 m_iDifL.clear();
539 m_iDifT.clear();
540 }

◆ ResetIonDissociation()

void Garfield::Medium::ResetIonDissociation ( )
inline

Definition at line 541 of file Medium.hh.

541{ m_iDis.clear(); }

◆ ResetIonMobility()

void Garfield::Medium::ResetIonMobility ( )
inline

Definition at line 533 of file Medium.hh.

533 {
534 m_iMob.clear();
535 m_iVel.clear();
536 }

◆ ResetNegativeIonMobility()

void Garfield::Medium::ResetNegativeIonMobility ( )
inline

Definition at line 542 of file Medium.hh.

542 {
543 m_nMob.clear();
544 m_nVel.clear();
545 }
std::vector< std::vector< std::vector< double > > > m_nVel
Definition Medium.hh:691

◆ ResetTables()

virtual void Garfield::Medium::ResetTables ( )
virtual

Reset all tables of transport parameters.

Reimplemented in Garfield::MediumGas.

◆ ScaleAttachment()

virtual double Garfield::Medium::ScaleAttachment ( const double eta) const
inlinevirtual

Reimplemented in Garfield::MediumGas.

Definition at line 581 of file Medium.hh.

581{ return eta; }

◆ ScaleDiffusion()

virtual double Garfield::Medium::ScaleDiffusion ( const double d) const
inlinevirtual

Reimplemented in Garfield::MediumGas.

Definition at line 578 of file Medium.hh.

578{ return d; }

◆ ScaleDiffusionTensor()

virtual double Garfield::Medium::ScaleDiffusionTensor ( const double d) const
inlinevirtual

Reimplemented in Garfield::MediumGas.

Definition at line 579 of file Medium.hh.

579{ return d; }

◆ ScaleDissociation()

virtual double Garfield::Medium::ScaleDissociation ( const double diss) const
inlinevirtual

Definition at line 583 of file Medium.hh.

583{ return diss; }

◆ ScaleElectricField()

virtual double Garfield::Medium::ScaleElectricField ( const double e) const
inlinevirtual

Reimplemented in Garfield::MediumGas.

Definition at line 575 of file Medium.hh.

575{ return e; }

◆ ScaleLorentzAngle()

virtual double Garfield::Medium::ScaleLorentzAngle ( const double lor) const
inlinevirtual

Reimplemented in Garfield::MediumGas.

Definition at line 582 of file Medium.hh.

582{ return lor; }

◆ ScaleTownsend()

virtual double Garfield::Medium::ScaleTownsend ( const double alpha) const
inlinevirtual

Reimplemented in Garfield::MediumGas.

Definition at line 580 of file Medium.hh.

580{ return alpha; }

◆ ScaleVelocity()

virtual double Garfield::Medium::ScaleVelocity ( const double v) const
inlinevirtual

Definition at line 577 of file Medium.hh.

577{ return v; }

◆ SetAtomicNumber()

virtual void Garfield::Medium::SetAtomicNumber ( const double z)
virtual

Set the effective atomic number.

Reimplemented in Garfield::MediumGas.

◆ SetAtomicWeight()

virtual void Garfield::Medium::SetAtomicWeight ( const double a)
virtual

Set the effective atomic weight.

Reimplemented in Garfield::MediumGas.

◆ SetDielectricConstant()

void Garfield::Medium::SetDielectricConstant ( const double eps)

Set the relative static dielectric constant.

◆ SetElectronAttachment()

bool Garfield::Medium::SetElectronAttachment ( const size_t ie,
const size_t ib,
const size_t ia,
const double eta )
inline

Set an entry in the table of attachment coefficients.

Definition at line 328 of file Medium.hh.

329 {
330 return SetEntry(ie, ib, ia, "ElectronAttachment", m_eAtt, eta);
331 }
bool SetEntry(const size_t i, const size_t j, const size_t k, const std::string &fcn, std::vector< std::vector< std::vector< double > > > &tab, const double val)

◆ SetElectronBulkVelocity()

bool Garfield::Medium::SetElectronBulkVelocity ( const size_t ie,
const size_t ib,
const size_t ia,
const double v )
inline

Set an entry in the table of bulk drift speeds.

Definition at line 288 of file Medium.hh.

289 {
290 return SetEntry(ie, ib, ia, "ElectronBulkVelocity", m_eVelWr, v);
291 }

◆ SetElectronFluxVelocity()

bool Garfield::Medium::SetElectronFluxVelocity ( const size_t ie,
const size_t ib,
const size_t ia,
const double v )
inline

Set an entry in the table of flux drift speeds.

Definition at line 278 of file Medium.hh.

279 {
280 return SetEntry(ie, ib, ia, "ElectronFluxVelocity", m_eVelWv, v);
281 }

◆ SetElectronLongitudinalDiffusion()

bool Garfield::Medium::SetElectronLongitudinalDiffusion ( const size_t ie,
const size_t ib,
const size_t ia,
const double dl )
inline

Set an entry in the table of longitudinal diffusion coefficients.

Definition at line 298 of file Medium.hh.

299 {
300 return SetEntry(ie, ib, ia, "ElectronLongitudinalDiffusion", m_eDifL, dl);
301 }

◆ SetElectronLorentzAngle()

bool Garfield::Medium::SetElectronLorentzAngle ( const size_t ie,
const size_t ib,
const size_t ia,
const double lor )
inline

Set an entry in the table of Lorentz angles.

Definition at line 359 of file Medium.hh.

360 {
361 return SetEntry(ie, ib, ia, "ElectronLorentzAngle", m_eLor, lor);
362 }

◆ SetElectronTOFAttachment()

bool Garfield::Medium::SetElectronTOFAttachment ( const size_t ie,
const size_t ib,
const size_t ia,
const double v )
inline

Set an entry in the table of attachment rate of TOF.

Definition at line 348 of file Medium.hh.

349 {
350 return SetEntry(ie, ib, ia, "ElectronTOFAttachment", m_eRAtt, v);
351 }

◆ SetElectronTOFIonisation()

bool Garfield::Medium::SetElectronTOFIonisation ( const size_t ie,
const size_t ib,
const size_t ia,
const double v )
inline

Set an entry in the table of ionization rate of TOF.

Definition at line 338 of file Medium.hh.

339 {
340 return SetEntry(ie, ib, ia, "ElectronTOFIonisation", m_eRIon, v);
341 }

◆ SetElectronTownsend()

bool Garfield::Medium::SetElectronTownsend ( const size_t ie,
const size_t ib,
const size_t ia,
const double alpha )
inline

Set an entry in the table of Townsend coefficients.

Definition at line 318 of file Medium.hh.

319 {
320 return SetEntry(ie, ib, ia, "ElectronTownsend", m_eAlp, alpha);
321 }

◆ SetElectronTransverseDiffusion()

bool Garfield::Medium::SetElectronTransverseDiffusion ( const size_t ie,
const size_t ib,
const size_t ia,
const double dt )
inline

Set an entry in the table of transverse diffusion coefficients.

Definition at line 308 of file Medium.hh.

309 {
310 return SetEntry(ie, ib, ia, "ElectronTransverseDiffusion", m_eDifT, dt);
311 }

◆ SetElectronVelocityB()

bool Garfield::Medium::SetElectronVelocityB ( const size_t ie,
const size_t ib,
const size_t ia,
const double v )
inline

Set an entry in the table of drift speeds along Btrans.

Definition at line 268 of file Medium.hh.

269 {
270 return SetEntry(ie, ib, ia, "ElectronVelocityB", m_eVelB, v);
271 }

◆ SetElectronVelocityE()

bool Garfield::Medium::SetElectronVelocityE ( const size_t ie,
const size_t ib,
const size_t ia,
const double v )
inline

Set an entry in the table of drift speeds along E.

Definition at line 248 of file Medium.hh.

249 {
250 return SetEntry(ie, ib, ia, "ElectronVelocityE", m_eVelE, v);
251 }

◆ SetElectronVelocityExB()

bool Garfield::Medium::SetElectronVelocityExB ( const size_t ie,
const size_t ib,
const size_t ia,
const double v )
inline

Set an entry in the table of drift speeds along ExB.

Definition at line 258 of file Medium.hh.

259 {
260 return SetEntry(ie, ib, ia, "ElectronVelocityExB", m_eVelX, v);
261 }

◆ SetEntry()

bool Garfield::Medium::SetEntry ( const size_t i,
const size_t j,
const size_t k,
const std::string & fcn,
std::vector< std::vector< std::vector< double > > > & tab,
const double val )
protected

◆ SetExtrapolationMethod()

void Garfield::Medium::SetExtrapolationMethod ( const std::string & low,
const std::string & high,
std::pair< unsigned int, unsigned int > & extr,
const std::string & fcn )
protected

◆ SetExtrapolationMethodAttachment()

void Garfield::Medium::SetExtrapolationMethodAttachment ( const std::string & extrLow,
const std::string & extrHigh )

◆ SetExtrapolationMethodDiffusion()

void Garfield::Medium::SetExtrapolationMethodDiffusion ( const std::string & extrLow,
const std::string & extrHigh )

◆ SetExtrapolationMethodIonDissociation()

void Garfield::Medium::SetExtrapolationMethodIonDissociation ( const std::string & extrLow,
const std::string & extrHigh )

◆ SetExtrapolationMethodIonMobility()

void Garfield::Medium::SetExtrapolationMethodIonMobility ( const std::string & extrLow,
const std::string & extrHigh )

◆ SetExtrapolationMethodTownsend()

void Garfield::Medium::SetExtrapolationMethodTownsend ( const std::string & extrLow,
const std::string & extrHigh )

◆ SetExtrapolationMethodVelocity()

void Garfield::Medium::SetExtrapolationMethodVelocity ( const std::string & extrLow,
const std::string & extrHigh )

Select the extrapolation method for fields below/above the table range.

Possible options are "constant", "linear", and "exponential".

◆ SetFanoFactor()

void Garfield::Medium::SetFanoFactor ( const double f)
inline

Set the Fano factor.

Definition at line 91 of file Medium.hh.

91{ m_fano = f; }

◆ SetFieldGrid() [1/2]

void Garfield::Medium::SetFieldGrid ( const std::vector< double > & efields,
const std::vector< double > & bfields,
const std::vector< double > & angles )

Set the fields and E-B angles to be used in the transport tables.

◆ SetFieldGrid() [2/2]

void Garfield::Medium::SetFieldGrid ( double emin,
double emax,
const size_t ne,
bool logE,
double bmin = 0.,
double bmax = 0.,
const size_t nb = 1,
double amin = HalfPi,
double amax = HalfPi,
const size_t na = 1 )

Set the range of fields to be covered by the transport tables.

◆ SetHoleAttachment()

bool Garfield::Medium::SetHoleAttachment ( const size_t ie,
const size_t ib,
const size_t ia,
const double eta )
inline

Set an entry in the table of attachment coefficients.

Definition at line 431 of file Medium.hh.

432 {
433 return SetEntry(ie, ib, ia, "HoleAttachment", m_hAtt, eta);
434 }

◆ SetHoleLongitudinalDiffusion()

bool Garfield::Medium::SetHoleLongitudinalDiffusion ( const size_t ie,
const size_t ib,
const size_t ia,
const double dl )
inline

Set an entry in the table of longitudinal diffusion coefficients.

Definition at line 401 of file Medium.hh.

402 {
403 return SetEntry(ie, ib, ia, "HoleLongitudinalDiffusion", m_hDifL, dl);
404 }

◆ SetHoleTownsend()

bool Garfield::Medium::SetHoleTownsend ( const size_t ie,
const size_t ib,
const size_t ia,
const double alpha )
inline

Set an entry in the table of Townsend coefficients.

Definition at line 421 of file Medium.hh.

422 {
423 return SetEntry(ie, ib, ia, "HoleTownsend", m_hAlp, alpha);
424 }

◆ SetHoleTransverseDiffusion()

bool Garfield::Medium::SetHoleTransverseDiffusion ( const size_t ie,
const size_t ib,
const size_t ia,
const double dt )
inline

Set an entry in the table of transverse diffusion coefficients.

Definition at line 411 of file Medium.hh.

412 {
413 return SetEntry(ie, ib, ia, "HoleTransverseDiffusion", m_hDifT, dt);
414 }

◆ SetHoleVelocityB()

bool Garfield::Medium::SetHoleVelocityB ( const size_t ie,
const size_t ib,
const size_t ia,
const double v )
inline

Set an entry in the table of drift speeds along Btrans.

Definition at line 390 of file Medium.hh.

391 {
392 return SetEntry(ie, ib, ia, "HoleVelocityB", m_hVelB, v);
393 }

◆ SetHoleVelocityE()

bool Garfield::Medium::SetHoleVelocityE ( const size_t ie,
const size_t ib,
const size_t ia,
const double v )
inline

Set an entry in the table of drift speeds along E.

Definition at line 370 of file Medium.hh.

371 {
372 return SetEntry(ie, ib, ia, "HoleVelocityE", m_hVelE, v);
373 }

◆ SetHoleVelocityExB()

bool Garfield::Medium::SetHoleVelocityExB ( const size_t ie,
const size_t ib,
const size_t ia,
const double v )
inline

Set an entry in the table of drift speeds along ExB.

Definition at line 380 of file Medium.hh.

381 {
382 return SetEntry(ie, ib, ia, "HoleVelocityExB", m_hVelX, v);
383 }

◆ SetInterpolationMethodAttachment()

void Garfield::Medium::SetInterpolationMethodAttachment ( const unsigned int intrp)

◆ SetInterpolationMethodDiffusion()

void Garfield::Medium::SetInterpolationMethodDiffusion ( const unsigned int intrp)

◆ SetInterpolationMethodIonDissociation()

void Garfield::Medium::SetInterpolationMethodIonDissociation ( const unsigned int intrp)

◆ SetInterpolationMethodIonMobility()

void Garfield::Medium::SetInterpolationMethodIonMobility ( const unsigned int intrp)

◆ SetInterpolationMethodTownsend()

void Garfield::Medium::SetInterpolationMethodTownsend ( const unsigned int intrp)

◆ SetInterpolationMethodVelocity()

void Garfield::Medium::SetInterpolationMethodVelocity ( const unsigned int intrp)

Set the degree of polynomial interpolation (usually 2).

◆ SetIonDissociation()

bool Garfield::Medium::SetIonDissociation ( const size_t ie,
const size_t ib,
const size_t ia,
const double diss )
inline

Set an entry in the table of dissociation coefficients.

Definition at line 478 of file Medium.hh.

479 {
480 return SetEntry(ie, ib, ia, "IonDissociation", m_iDis, diss);
481 }

◆ SetIonLongitudinalDiffusion()

bool Garfield::Medium::SetIonLongitudinalDiffusion ( const size_t ie,
const size_t ib,
const size_t ia,
const double dl )
inline

Set an entry in the table of longitudinal diffusion coefficients.

Definition at line 458 of file Medium.hh.

459 {
460 return SetEntry(ie, ib, ia, "IonLongitudinalDiffusion", m_iDifL, dl);
461 }

◆ SetIonMobility() [1/2]

bool Garfield::Medium::SetIonMobility ( const size_t ie,
const size_t ib,
const size_t ia,
const double mu )

Set an entry in the table of ion mobilities.

◆ SetIonMobility() [2/2]

bool Garfield::Medium::SetIonMobility ( const std::vector< double > & fields,
const std::vector< double > & mobilities,
const bool negativeIons = false )

Initialise the table of ion mobilities from a list of electric fields and corresponding mobilities.

The mobilities will be interpolated at the electric fields of the currently set grid.

◆ SetIonTransverseDiffusion()

bool Garfield::Medium::SetIonTransverseDiffusion ( const size_t ie,
const size_t ib,
const size_t ia,
const double dt )
inline

Set an entry in the table of transverse diffusion coefficients.

Definition at line 468 of file Medium.hh.

469 {
470 return SetEntry(ie, ib, ia, "IonTransverseDiffusion", m_iDifT, dt);
471 }

◆ SetMassDensity()

virtual void Garfield::Medium::SetMassDensity ( const double rho)
virtual

Set the mass density [g/cm3].

Reimplemented in Garfield::MediumGas.

◆ SetNegativeIonMobility()

bool Garfield::Medium::SetNegativeIonMobility ( const size_t ie,
const size_t ib,
const size_t ia,
const double mu )

Set an entry in the table of negative ion mobilities.

◆ SetNumberDensity()

virtual void Garfield::Medium::SetNumberDensity ( const double n)
virtual

Set the number density [cm-3].

Reimplemented in Garfield::MediumGas.

◆ SetPressure()

void Garfield::Medium::SetPressure ( const double p)

◆ SetTemperature()

void Garfield::Medium::SetTemperature ( const double t)

Set the temperature [K].

◆ SetThreshold()

size_t Garfield::Medium::SetThreshold ( const std::vector< std::vector< std::vector< double > > > & tab) const
protected

◆ SetW()

void Garfield::Medium::SetW ( const double w)
inline

Set the W value (average energy to produce an electron/ion or e/h pair).

Definition at line 87 of file Medium.hh.

87{ m_w = w; }

◆ UnScaleElectricField()

virtual double Garfield::Medium::UnScaleElectricField ( const double e) const
inlinevirtual

Reimplemented in Garfield::MediumGas.

Definition at line 576 of file Medium.hh.

576{ return e; }

◆ Velocity()

bool Garfield::Medium::Velocity ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
const std::vector< std::vector< std::vector< double > > > & velE,
const std::vector< std::vector< std::vector< double > > > & velB,
const std::vector< std::vector< std::vector< double > > > & velX,
const double q,
double & vx,
double & vy,
double & vz ) const
protected

◆ VelocityFluxBulk()

bool Garfield::Medium::VelocityFluxBulk ( const double ex,
const double ey,
const double ez,
const double bx,
const double by,
const double bz,
const std::vector< std::vector< std::vector< double > > > & velWv,
const std::vector< std::vector< std::vector< double > > > & velWr,
double & wv,
double & wr ) const
protected

◆ VelocityFromMobility()

void Garfield::Medium::VelocityFromMobility ( const std::vector< std::vector< std::vector< double > > > & mob,
std::vector< std::vector< std::vector< double > > > & vel )

Member Data Documentation

◆ m_a

double Garfield::Medium::m_a = 0.
protected

Definition at line 625 of file Medium.hh.

◆ m_bAngles

std::vector<double> Garfield::Medium::m_bAngles
protected

Definition at line 654 of file Medium.hh.

◆ m_bFields

std::vector<double> Garfield::Medium::m_bFields
protected

Definition at line 653 of file Medium.hh.

◆ m_className

std::string Garfield::Medium::m_className = "Medium"
protected

Definition at line 608 of file Medium.hh.

◆ m_debug

bool Garfield::Medium::m_debug = false
protected

Definition at line 646 of file Medium.hh.

◆ m_density

double Garfield::Medium::m_density = 0.
protected

Definition at line 627 of file Medium.hh.

◆ m_driftable

bool Garfield::Medium::m_driftable = false
protected

Definition at line 633 of file Medium.hh.

◆ m_eAlp

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_eAlp
protected

Definition at line 662 of file Medium.hh.

◆ m_eAtt

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_eAtt
protected

Definition at line 663 of file Medium.hh.

◆ m_eDifL

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_eDifL
protected

Definition at line 660 of file Medium.hh.

◆ m_eDifM

std::vector<std::vector<std::vector<std::vector<double> > > > Garfield::Medium::m_eDifM
protected

Definition at line 670 of file Medium.hh.

◆ m_eDifT

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_eDifT
protected

Definition at line 661 of file Medium.hh.

◆ m_eFields

std::vector<double> Garfield::Medium::m_eFields
protected

Definition at line 652 of file Medium.hh.

◆ m_eLor

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_eLor
protected

Definition at line 664 of file Medium.hh.

◆ m_epsilon

double Garfield::Medium::m_epsilon = 1.
protected

Definition at line 621 of file Medium.hh.

◆ m_eRAtt

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_eRAtt
protected

Definition at line 668 of file Medium.hh.

◆ m_eRIon

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_eRIon
protected

Definition at line 667 of file Medium.hh.

◆ m_eThrAlp

unsigned int Garfield::Medium::m_eThrAlp = 0
protected

Definition at line 694 of file Medium.hh.

◆ m_eThrAtt

unsigned int Garfield::Medium::m_eThrAtt = 0
protected

Definition at line 695 of file Medium.hh.

◆ m_eVelB

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_eVelB
protected

Definition at line 659 of file Medium.hh.

◆ m_eVelE

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_eVelE
protected

Definition at line 657 of file Medium.hh.

◆ m_eVelWr

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_eVelWr
protected

Definition at line 666 of file Medium.hh.

◆ m_eVelWv

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_eVelWv
protected

Definition at line 665 of file Medium.hh.

◆ m_eVelX

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_eVelX
protected

Definition at line 658 of file Medium.hh.

◆ m_extrAlp

std::pair<unsigned int, unsigned int> Garfield::Medium::m_extrAlp = {0, 1}
protected

Definition at line 703 of file Medium.hh.

703{0, 1};

◆ m_extrAtt

std::pair<unsigned int, unsigned int> Garfield::Medium::m_extrAtt = {0, 1}
protected

Definition at line 704 of file Medium.hh.

704{0, 1};

◆ m_extrDif

std::pair<unsigned int, unsigned int> Garfield::Medium::m_extrDif = {0, 1}
protected

Definition at line 702 of file Medium.hh.

702{0, 1};

◆ m_extrDis

std::pair<unsigned int, unsigned int> Garfield::Medium::m_extrDis = {0, 1}
protected

Definition at line 707 of file Medium.hh.

707{0, 1};

◆ m_extrLor

std::pair<unsigned int, unsigned int> Garfield::Medium::m_extrLor = {0, 1}
protected

Definition at line 705 of file Medium.hh.

705{0, 1};

◆ m_extrMob

std::pair<unsigned int, unsigned int> Garfield::Medium::m_extrMob = {0, 1}
protected

Definition at line 706 of file Medium.hh.

706{0, 1};

◆ m_extrVel

std::pair<unsigned int, unsigned int> Garfield::Medium::m_extrVel = {0, 1}
protected

Definition at line 701 of file Medium.hh.

701{0, 1};

◆ m_fano

double Garfield::Medium::m_fano = 0.
protected

Definition at line 640 of file Medium.hh.

◆ m_hAlp

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_hAlp
protected

Definition at line 678 of file Medium.hh.

◆ m_hAtt

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_hAtt
protected

Definition at line 679 of file Medium.hh.

◆ m_hDifL

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_hDifL
protected

Definition at line 676 of file Medium.hh.

◆ m_hDifM

std::vector<std::vector<std::vector<std::vector<double> > > > Garfield::Medium::m_hDifM
protected

Definition at line 681 of file Medium.hh.

◆ m_hDifT

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_hDifT
protected

Definition at line 677 of file Medium.hh.

◆ m_hThrAlp

unsigned int Garfield::Medium::m_hThrAlp = 0
protected

Definition at line 696 of file Medium.hh.

◆ m_hThrAtt

unsigned int Garfield::Medium::m_hThrAtt = 0
protected

Definition at line 697 of file Medium.hh.

◆ m_hVelB

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_hVelB
protected

Definition at line 675 of file Medium.hh.

◆ m_hVelE

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_hVelE
protected

Definition at line 673 of file Medium.hh.

◆ m_hVelX

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_hVelX
protected

Definition at line 674 of file Medium.hh.

◆ m_id

int Garfield::Medium::m_id
protected

Definition at line 630 of file Medium.hh.

◆ m_idCounter

int Garfield::Medium::m_idCounter
staticprotected

Definition at line 610 of file Medium.hh.

◆ m_iDifL

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_iDifL
protected

Definition at line 686 of file Medium.hh.

◆ m_iDifT

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_iDifT
protected

Definition at line 687 of file Medium.hh.

◆ m_iDis

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_iDis
protected

Definition at line 688 of file Medium.hh.

◆ m_iMob

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_iMob
protected

Definition at line 684 of file Medium.hh.

◆ m_intpAlp

unsigned int Garfield::Medium::m_intpAlp = 2
protected

Definition at line 712 of file Medium.hh.

◆ m_intpAtt

unsigned int Garfield::Medium::m_intpAtt = 2
protected

Definition at line 713 of file Medium.hh.

◆ m_intpDif

unsigned int Garfield::Medium::m_intpDif = 2
protected

Definition at line 711 of file Medium.hh.

◆ m_intpDis

unsigned int Garfield::Medium::m_intpDis = 2
protected

Definition at line 716 of file Medium.hh.

◆ m_intpLor

unsigned int Garfield::Medium::m_intpLor = 2
protected

Definition at line 714 of file Medium.hh.

◆ m_intpMob

unsigned int Garfield::Medium::m_intpMob = 2
protected

Definition at line 715 of file Medium.hh.

◆ m_intpVel

unsigned int Garfield::Medium::m_intpVel = 2
protected

Definition at line 710 of file Medium.hh.

◆ m_ionisable

bool Garfield::Medium::m_ionisable = false
protected

Definition at line 635 of file Medium.hh.

◆ m_isChanged

bool Garfield::Medium::m_isChanged = true
protected

Definition at line 643 of file Medium.hh.

◆ m_iThrDis

unsigned int Garfield::Medium::m_iThrDis = 0
protected

Definition at line 698 of file Medium.hh.

◆ m_iVel

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_iVel
protected

Definition at line 685 of file Medium.hh.

◆ m_microscopic

bool Garfield::Medium::m_microscopic = false
protected

Definition at line 634 of file Medium.hh.

◆ m_name

std::string Garfield::Medium::m_name = ""
protected

Definition at line 615 of file Medium.hh.

◆ m_nComponents

unsigned int Garfield::Medium::m_nComponents = 1
protected

Definition at line 613 of file Medium.hh.

◆ m_nMob

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_nMob
protected

Definition at line 690 of file Medium.hh.

◆ m_nVel

std::vector<std::vector<std::vector<double> > > Garfield::Medium::m_nVel
protected

Definition at line 691 of file Medium.hh.

◆ m_pressure

double Garfield::Medium::m_pressure = 760.
protected

Definition at line 619 of file Medium.hh.

◆ m_tab2d

bool Garfield::Medium::m_tab2d = false
protected

Definition at line 649 of file Medium.hh.

◆ m_temperature

double Garfield::Medium::m_temperature = 293.15
protected

Definition at line 617 of file Medium.hh.

◆ m_w

double Garfield::Medium::m_w = 0.
protected

Definition at line 638 of file Medium.hh.

◆ m_z

double Garfield::Medium::m_z = 1.
protected

Definition at line 623 of file Medium.hh.


The documentation for this class was generated from the following file:
  • /builds/garfield/docs/source/Include/Garfield/Medium.hh