Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
#include <MediumMagboltz.hh>
Public Member Functions | |
MediumMagboltz () | |
Constructor. | |
virtual | ~MediumMagboltz () |
Destructor. | |
bool | SetMaxElectronEnergy (const double e) |
double | GetMaxElectronEnergy () const |
Get the highest electron energy in the table of scattering rates. | |
bool | SetMaxPhotonEnergy (const double e) |
double | GetMaxPhotonEnergy () const |
Get the highest photon energy in the table of scattering rates. | |
void | EnableEnergyRangeAdjustment (const bool on) |
void | EnableAnisotropicScattering (const bool on=true) |
Switch on/off anisotropic scattering (enabled by default) | |
void | SetSplittingFunctionOpalBeaty () |
Sample the secondary electron energy according to the Opal-Beaty model. | |
void | SetSplittingFunctionGreenSawada () |
Sample the secondary electron energy according to the Green-Sawada model. | |
void | SetSplittingFunctionFlat () |
Sample the secondary electron energy from a flat distribution. | |
void | EnableDeexcitation () |
Switch on (microscopic) de-excitation handling. | |
void | DisableDeexcitation () |
Switch off (microscopic) de-excitation handling. | |
void | EnableRadiationTrapping () |
Switch on discrete photoabsorption levels. | |
void | DisableRadiationTrapping () |
Switch off discrete photoabsorption levels. | |
bool | EnablePenningTransfer (const double r, const double lambda) override |
bool | EnablePenningTransfer (const double r, const double lambda, std::string gasname) override |
void | DisablePenningTransfer () override |
Switch the simulation of Penning transfers off globally. | |
bool | DisablePenningTransfer (std::string gasname) override |
Switch the simulation of Penning transfers off for a given component. | |
void | EnableCrossSectionOutput (const bool on=true) |
Write the gas cross-section table to a file during the initialisation. | |
void | SetExcitationScaling (const double r, std::string gasname) |
Multiply all excitation cross-sections by a uniform scaling factor. | |
bool | Initialise (const bool verbose=false) |
void | PrintGas () override |
Print information about the present gas mixture and available data. | |
double | GetElectronNullCollisionRate (const int band) override |
Get the overall null-collision rate [ns-1]. | |
double | GetElectronCollisionRate (const double e, const int band) override |
Get the (real) collision rate [ns-1] at a given electron energy e [eV]. | |
double | GetElectronCollisionRate (const double e, const unsigned int level, const int band) |
Get the collision rate [ns-1] for a specific level. | |
bool | GetElectronCollision (const double e, int &type, int &level, double &e1, double &dx, double &dy, double &dz, std::vector< std::pair< int, double > > &secondaries, int &ndxc, int &band) override |
Sample the collision type. | |
void | ComputeDeexcitation (int iLevel, int &fLevel) |
unsigned int | GetNumberOfDeexcitationProducts () const override |
bool | GetDeexcitationProduct (const unsigned int i, double &t, double &s, int &type, double &energy) const override |
double | GetPhotonCollisionRate (const double e) override |
bool | GetPhotonCollision (const double e, int &type, int &level, double &e1, double &ctheta, int &nsec, double &esec) override |
void | ResetCollisionCounters () |
Reset the collision counters. | |
unsigned int | GetNumberOfElectronCollisions () const |
Get the total number of electron collisions. | |
unsigned int | GetNumberOfElectronCollisions (unsigned int &nElastic, unsigned int &nIonising, unsigned int &nAttachment, unsigned int &nInelastic, unsigned int &nExcitation, unsigned int &nSuperelastic) const |
Get the number of collisions broken down by cross-section type. | |
unsigned int | GetNumberOfLevels () |
Get the number of cross-section terms. | |
bool | GetLevel (const unsigned int i, int &ngas, int &type, std::string &descr, double &e) |
Get detailed information about a given cross-section term i. | |
unsigned int | GetNumberOfElectronCollisions (const unsigned int level) const |
Get the number of collisions for a specific cross-section term. | |
unsigned int | GetNumberOfPenningTransfers () const |
Get the number of Penning transfers that occured since the last reset. | |
unsigned int | GetNumberOfPhotonCollisions () const |
Get the total number of photon collisions. | |
unsigned int | GetNumberOfPhotonCollisions (unsigned int &nElastic, unsigned int &nIonising, unsigned int &nInelastic) const |
Get number of photon collisions by collision type. | |
void | EnableThermalMotion (const bool on=true) |
void | EnableAutoEnergyLimit (const bool on=true) |
void | RunMagboltz (const double e, const double b, const double btheta, const int ncoll, bool verbose, double &vx, double &vy, double &vz, double &dl, double &dt, double &alpha, double &eta, double &lor, double &vxerr, double &vyerr, double &vzerr, double &dlerr, double &dterr, double &alphaerr, double &etaerr, double &lorerr, double &alphatof, std::array< double, 6 > &difftens) |
void | GenerateGasTable (const int numCollisions=10, const bool verbose=true) |
Public Member Functions inherited from Garfield::MediumGas | |
MediumGas () | |
Constructor. | |
virtual | ~MediumGas () |
Destructor. | |
bool | IsGas () const override |
Is this medium a gas? | |
bool | SetComposition (const std::string &gas1, const double f1=1., const std::string &gas2="", const double f2=0., const std::string &gas3="", const double f3=0., const std::string &gas4="", const double f4=0., const std::string &gas5="", const double f5=0., const std::string &gas6="", const double f6=0.) |
Set the gas mixture. | |
void | GetComposition (std::string &gas1, double &f1, std::string &gas2, double &f2, std::string &gas3, double &f3, std::string &gas4, double &f4, std::string &gas5, double &f5, std::string &gas6, double &f6) |
Retrieve the gas mixture. | |
void | GetComponent (const unsigned int i, std::string &label, double &f) override |
Get the name and fraction of a given component. | |
void | SetAtomicNumber (const double z) override |
Set the effective atomic number. | |
double | GetAtomicNumber () const override |
Get the effective atomic number. | |
void | SetAtomicWeight (const double a) override |
Set the effective atomic weight. | |
double | GetAtomicWeight () const override |
Get the effective atomic weight. | |
void | SetNumberDensity (const double n) override |
Set the number density [cm-3]. | |
double | GetNumberDensity () const override |
Get the number density [cm-3]. | |
void | SetMassDensity (const double rho) override |
Set the mass density [g/cm3]. | |
double | GetMassDensity () const override |
Get the mass density [g/cm3]. | |
bool | LoadGasFile (const std::string &filename) |
Read table of gas properties (transport parameters) from file. | |
bool | WriteGasFile (const std::string &filename) |
Save the present table of gas properties (transport parameters) to a file. | |
bool | MergeGasFile (const std::string &filename, const bool replaceOld) |
Read table of gas properties from and merge with the existing dataset. | |
virtual bool | EnablePenningTransfer (const double r, const double lambda) |
virtual bool | EnablePenningTransfer (const double r, const double lambda, std::string gasname) |
virtual void | DisablePenningTransfer () |
Switch the simulation of Penning transfers off globally. | |
virtual bool | DisablePenningTransfer (std::string gasname) |
Switch the simulation of Penning transfers off for a given component. | |
virtual void | PrintGas () |
Print information about the present gas mixture and available data. | |
bool | LoadIonMobility (const std::string &filename) |
Read a table of ion mobilities as function of electric field from file. | |
bool | AdjustTownsendCoefficient () |
void | ResetTables () override |
Reset all tables of transport parameters. | |
void | SetExtrapolationMethodExcitationRates (const std::string &low, const std::string &high) |
void | SetExtrapolationMethodIonisationRates (const std::string &low, const std::string &high) |
void | SetInterpolationMethodExcitationRates (const unsigned int intrp) |
void | SetInterpolationMethodIonisationRates (const unsigned int intrp) |
double | ScaleElectricField (const double e) const override |
double | UnScaleElectricField (const double e) const override |
double | ScaleDiffusion (const double d) const override |
double | ScaleDiffusionTensor (const double d) const override |
double | ScaleTownsend (const double alpha) const override |
double | ScaleAttachment (const double eta) const override |
double | ScaleLorentzAngle (const double lor) const override |
bool | GetPhotoAbsorptionCrossSection (const double e, double &sigma, const unsigned int i) override |
Public Member Functions inherited from Garfield::Medium | |
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 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 () |
Get the W value. | |
void | SetFanoFactor (const double f) |
Set the Fano factor. | |
double | GetFanoFactor () |
Get the Fano factor. | |
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 | 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]) |
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 | 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) |
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 | GetElectronCollision (const double e, int &type, int &level, double &e1, double &dx, double &dy, double &dz, std::vector< std::pair< int, double > > &secondaries, int &ndxc, int &band) |
Sample the collision type. Update energy and direction vector. | |
virtual unsigned int | GetNumberOfDeexcitationProducts () const |
virtual bool | GetDeexcitationProduct (const unsigned int i, double &t, double &s, int &type, double &energy) const |
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) |
Drift velocity [cm / ns]. | |
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 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 unsigned int ie, const unsigned int ib, const unsigned int ia, const double v) |
Set an entry in the table of drift speeds along E. | |
bool | GetElectronVelocityE (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &v) |
Get an entry in the table of drift speeds along E. | |
bool | SetElectronVelocityExB (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double v) |
Set an entry in the table of drift speeds along ExB. | |
bool | GetElectronVelocityExB (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &v) |
Get an entry in the table of drift speeds along ExB. | |
bool | SetElectronVelocityB (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double v) |
Set an entry in the table of drift speeds along Btrans. | |
bool | GetElectronVelocityB (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &v) |
Get an entry in the table of drift speeds along Btrans. | |
bool | SetElectronLongitudinalDiffusion (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double dl) |
Set an entry in the table of longitudinal diffusion coefficients. | |
bool | GetElectronLongitudinalDiffusion (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &dl) |
Get an entry in the table of longitudinal diffusion coefficients. | |
bool | SetElectronTransverseDiffusion (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double dt) |
Set an entry in the table of transverse diffusion coefficients. | |
bool | GetElectronTransverseDiffusion (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &dt) |
Get an entry in the table of transverse diffusion coefficients. | |
bool | SetElectronTownsend (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double alpha) |
Set an entry in the table of Townsend coefficients. | |
bool | GetElectronTownsend (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &alpha) |
Get an entry in the table of Townsend coefficients. | |
bool | SetElectronAttachment (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double eta) |
Set an entry in the table of attachment coefficients. | |
bool | GetElectronAttachment (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &eta) |
Get an entry in the table of attachment coefficients. | |
bool | SetElectronLorentzAngle (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double lor) |
Set an entry in the table of Lorentz angles. | |
bool | GetElectronLorentzAngle (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &lor) |
Get an entry in the table of Lorentz angles. | |
bool | SetHoleVelocityE (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double v) |
Set an entry in the table of drift speeds along E. | |
bool | GetHoleVelocityE (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &v) |
Get an entry in the table of drift speeds along E. | |
bool | SetHoleVelocityExB (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double v) |
Set an entry in the table of drift speeds along ExB. | |
bool | GetHoleVelocityExB (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &v) |
Get an entry in the table of drift speeds along ExB. | |
bool | SetHoleVelocityB (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double v) |
Set an entry in the table of drift speeds along Btrans. | |
bool | GetHoleVelocityB (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &v) |
Get an entry in the table of drift speeds along Btrans. | |
bool | SetHoleLongitudinalDiffusion (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double dl) |
Set an entry in the table of longitudinal diffusion coefficients. | |
bool | GetHoleLongitudinalDiffusion (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &dl) |
Get an entry in the table of longitudinal diffusion coefficients. | |
bool | SetHoleTransverseDiffusion (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double dt) |
Set an entry in the table of transverse diffusion coefficients. | |
bool | GetHoleTransverseDiffusion (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &dt) |
Get an entry in the table of transverse diffusion coefficients. | |
bool | SetHoleTownsend (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double alpha) |
Set an entry in the table of Townsend coefficients. | |
bool | GetHoleTownsend (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &alpha) |
Get an entry in the table of Townsend coefficients. | |
bool | SetHoleAttachment (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double eta) |
Set an entry in the table of attachment coefficients. | |
bool | GetHoleAttachment (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &eta) |
Get an entry in the table of attachment coefficients. | |
bool | SetIonMobility (const std::vector< double > &fields, const std::vector< double > &mobilities) |
bool | SetIonMobility (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double mu) |
Set an entry in the table of ion mobilities. | |
bool | GetIonMobility (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &mu) |
Get an entry in the table of ion mobilities. | |
bool | SetIonLongitudinalDiffusion (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double dl) |
Set an entry in the table of longitudinal diffusion coefficients. | |
bool | GetIonLongitudinalDiffusion (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &dl) |
Get an entry in the table of longitudinal diffusion coefficients. | |
bool | SetIonTransverseDiffusion (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double dt) |
Set an entry in the table of transverse diffusion coefficients. | |
bool | GetIonTransverseDiffusion (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &dt) |
Get an entry in the table of transverse diffusion coefficients. | |
bool | SetIonDissociation (const unsigned int ie, const unsigned int ib, const unsigned int ia, const double diss) |
Set an entry in the table of dissociation coefficients. | |
bool | GetIonDissociation (const unsigned int ie, const unsigned int ib, const unsigned int ia, double &diss) |
Get an entry in the table of dissociation coefficients. | |
virtual void | ResetTables () |
Reset all tables of transport parameters. | |
void | ResetElectronVelocity () |
void | ResetElectronDiffusion () |
void | ResetElectronTownsend () |
void | ResetElectronAttachment () |
void | ResetElectronLorentzAngle () |
void | ResetHoleVelocity () |
void | ResetHoleDiffusion () |
void | ResetHoleTownsend () |
void | ResetHoleAttachment () |
void | ResetIonMobility () |
void | ResetIonDiffusion () |
void | ResetIonDissociation () |
void | SetExtrapolationMethodVelocity (const std::string &extrLow, const std::string &extrHigh) |
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 | GetPhotonCollision (const double e, int &type, int &level, double &e1, double &ctheta, int &nsec, double &esec) |
void | EnableDebugging () |
Switch on/off debugging messages. | |
void | DisableDebugging () |
Additional Inherited Members | |
Protected Member Functions inherited from Garfield::MediumGas | |
bool | ReadHeader (std::ifstream &gasfile, int &version, std::bitset< 20 > &gasok, bool &is3d, std::vector< double > &mixture, std::vector< double > &efields, std::vector< double > &bfields, std::vector< double > &angles, std::vector< ExcLevel > &excLevels, std::vector< IonLevel > &ionLevels) |
void | ReadFooter (std::ifstream &gasfile, std::array< unsigned int, 13 > &extrapH, std::array< unsigned int, 13 > &extrapL, std::array< unsigned int, 13 > &interp, unsigned int &thrAlp, unsigned int &thrAtt, unsigned int &thrDis, double &ionDiffL, double &ionDiffT, double &pgas, double &tgas) |
void | ReadRecord3D (std::ifstream &gasfile, double &ve, double &vb, double &vx, double &dl, double &dt, double &alpha, double &alpha0, double &eta, double &mu, double &lor, double &dis, std::array< double, 6 > &dif, std::vector< double > &rexc, std::vector< double > &rion) |
void | ReadRecord1D (std::ifstream &gasfile, double &ve, double &vb, double &vx, double &dl, double &dt, double &alpha, double &alpha0, double &eta, double &mu, double &lor, double &dis, std::array< double, 6 > &dif, std::vector< double > &rexc, std::vector< double > &rion) |
void | InsertE (const int ie, const int ne, const int nb, const int na) |
void | InsertB (const int ib, const int ne, const int nb, const int na) |
void | InsertA (const int ia, const int ne, const int nb, const int na) |
void | ZeroRowE (const int ie, const int nb, const int na) |
void | ZeroRowB (const int ib, const int ne, const int na) |
void | ZeroRowA (const int ia, const int ne, const int nb) |
bool | GetMixture (const std::vector< double > &mixture, const int version, std::vector< std::string > &gasnames, std::vector< double > &percentages) const |
void | GetGasBits (std::bitset< 20 > &gasok) const |
bool | GetGasInfo (const std::string &gasname, double &a, double &z) const |
std::string | GetGasName (const int gasnumber, const int version) const |
std::string | GetGasName (std::string input) const |
int | GetGasNumberGasFile (const std::string &input) const |
Protected Member Functions inherited from Garfield::Medium | |
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 | 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 |
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 | SetEntry (const unsigned int i, const unsigned int j, const unsigned int k, const std::string &fcn, std::vector< std::vector< std::vector< double > > > &tab, const double val) |
bool | GetEntry (const unsigned int i, const unsigned int j, const unsigned int 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 |
unsigned int | 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 unsigned int 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) |
Protected Attributes inherited from Garfield::MediumGas | |
std::array< std::string, m_nMaxGases > | m_gas |
std::array< double, m_nMaxGases > | m_fraction |
std::array< double, m_nMaxGases > | m_atWeight |
std::array< double, m_nMaxGases > | m_atNum |
bool | m_usePenning = false |
double | m_rPenningGlobal = 0. |
double | m_lambdaPenningGlobal = 0. |
std::array< double, m_nMaxGases > | m_rPenningGas |
std::array< double, m_nMaxGases > | m_lambdaPenningGas |
double | m_pressureTable |
double | m_temperatureTable |
std::vector< std::vector< std::vector< double > > > | m_eAlp0 |
std::vector< std::vector< std::vector< std::vector< double > > > > | m_excRates |
std::vector< std::vector< std::vector< std::vector< double > > > > | m_ionRates |
std::vector< ExcLevel > | m_excLevels |
std::vector< IonLevel > | m_ionLevels |
std::pair< unsigned int, unsigned int > | m_extrExc = {0, 1} |
std::pair< unsigned int, unsigned int > | m_extrIon = {0, 1} |
unsigned int | m_intpExc = 2 |
unsigned int | m_intpIon = 2 |
Protected Attributes inherited from Garfield::Medium | |
std::string | m_className = "Medium" |
int | m_id |
std::string | m_name = "" |
double | m_temperature = 293.15 |
double | m_pressure = 760. |
double | m_epsilon = 1. |
unsigned int | m_nComponents = 1 |
double | m_z = 1. |
double | m_a = 0. |
double | m_density = 0. |
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 |
std::vector< double > | m_eFields |
std::vector< double > | m_bFields |
std::vector< double > | m_bAngles |
bool | m_tab2d = false |
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< 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_iDifL |
std::vector< std::vector< std::vector< double > > > | m_iDifT |
std::vector< std::vector< std::vector< double > > > | m_iDis |
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 inherited from Garfield::MediumGas | |
static constexpr unsigned int | m_nMaxGases = 6 |
Static Protected Attributes inherited from Garfield::Medium | |
static int | m_idCounter = -1 |
Interface to Magboltz (version 11).
Definition at line 14 of file MediumMagboltz.hh.
Garfield::MediumMagboltz::MediumMagboltz | ( | ) |
Constructor.
Definition at line 38 of file MediumMagboltz.cc.
|
inlinevirtual |
void Garfield::MediumMagboltz::ComputeDeexcitation | ( | int | iLevel, |
int & | fLevel | ||
) |
Definition at line 3099 of file MediumMagboltz.cc.
|
inline |
Switch off (microscopic) de-excitation handling.
Definition at line 53 of file MediumMagboltz.hh.
|
overridevirtual |
Switch the simulation of Penning transfers off globally.
Reimplemented from Garfield::MediumGas.
Definition at line 279 of file MediumMagboltz.cc.
|
overridevirtual |
Switch the simulation of Penning transfers off for a given component.
Reimplemented from Garfield::MediumGas.
Definition at line 288 of file MediumMagboltz.cc.
|
inline |
Switch off discrete photoabsorption levels.
Definition at line 57 of file MediumMagboltz.hh.
|
inline |
Switch on/off anisotropic scattering (enabled by default)
Definition at line 38 of file MediumMagboltz.hh.
|
inline |
Let Magboltz determine the upper energy limit (this is the default) or use the energy limit specified using SetMaxElectronEnergy).
Definition at line 136 of file MediumMagboltz.hh.
|
inline |
Write the gas cross-section table to a file during the initialisation.
Definition at line 66 of file MediumMagboltz.hh.
void Garfield::MediumMagboltz::EnableDeexcitation | ( | ) |
Switch on (microscopic) de-excitation handling.
Definition at line 151 of file MediumMagboltz.cc.
|
inline |
Switch on/off the automatic adjustment of the max. energy when an energy exceeding the present range is requested
Definition at line 35 of file MediumMagboltz.hh.
|
overridevirtual |
Switch on simulation of Penning transfers by means of transfer probabilities, for all excitation levels in the mixture.
r | transfer probability [0, 1] |
lambda | parameter for sampling the distance of the Penning electron with respect to the excitation. |
Reimplemented from Garfield::MediumGas.
Definition at line 177 of file MediumMagboltz.cc.
Referenced by GarfieldPhysics::InitializePhysics().
|
overridevirtual |
Switch on simulation of Penning transfers by means of transfer probabilities, for all excitations of a given component.
Reimplemented from Garfield::MediumGas.
Definition at line 227 of file MediumMagboltz.cc.
void Garfield::MediumMagboltz::EnableRadiationTrapping | ( | ) |
Switch on discrete photoabsorption levels.
Definition at line 167 of file MediumMagboltz.cc.
|
inline |
Take the thermal motion of the gas at the selected temperature into account in the calculations done by Magboltz. By the default, this feature is off (static gas at 0 K).
Definition at line 133 of file MediumMagboltz.hh.
void Garfield::MediumMagboltz::GenerateGasTable | ( | const int | numCollisions = 10 , |
const bool | verbose = true |
||
) |
Generate a new gas table (can later be saved to file) by running Magboltz for all electric fields, magnetic fields, and angles in the currently set grid.
Definition at line 3493 of file MediumMagboltz.cc.
|
overridevirtual |
Reimplemented from Garfield::Medium.
Definition at line 808 of file MediumMagboltz.cc.
|
overridevirtual |
Sample the collision type.
Reimplemented from Garfield::Medium.
Definition at line 562 of file MediumMagboltz.cc.
|
overridevirtual |
Get the (real) collision rate [ns-1] at a given electron energy e [eV].
Reimplemented from Garfield::Medium.
Definition at line 477 of file MediumMagboltz.cc.
Referenced by GetElectronCollisionRate().
double Garfield::MediumMagboltz::GetElectronCollisionRate | ( | const double | e, |
const unsigned int | level, | ||
const int | band | ||
) |
Get the collision rate [ns-1] for a specific level.
Definition at line 523 of file MediumMagboltz.cc.
|
overridevirtual |
Get the overall null-collision rate [ns-1].
Reimplemented from Garfield::Medium.
Definition at line 460 of file MediumMagboltz.cc.
bool Garfield::MediumMagboltz::GetLevel | ( | const unsigned int | i, |
int & | ngas, | ||
int & | type, | ||
std::string & | descr, | ||
double & | e | ||
) |
Get detailed information about a given cross-section term i.
Definition at line 988 of file MediumMagboltz.cc.
|
inline |
Get the highest electron energy in the table of scattering rates.
Definition at line 25 of file MediumMagboltz.hh.
|
inline |
Get the highest photon energy in the table of scattering rates.
Definition at line 31 of file MediumMagboltz.hh.
|
inlineoverridevirtual |
Reimplemented from Garfield::Medium.
Definition at line 91 of file MediumMagboltz.hh.
unsigned int Garfield::MediumMagboltz::GetNumberOfElectronCollisions | ( | ) | const |
Get the total number of electron collisions.
Definition at line 958 of file MediumMagboltz.cc.
unsigned int Garfield::MediumMagboltz::GetNumberOfElectronCollisions | ( | const unsigned int | level | ) | const |
Get the number of collisions for a specific cross-section term.
Definition at line 1062 of file MediumMagboltz.cc.
unsigned int Garfield::MediumMagboltz::GetNumberOfElectronCollisions | ( | unsigned int & | nElastic, |
unsigned int & | nIonising, | ||
unsigned int & | nAttachment, | ||
unsigned int & | nInelastic, | ||
unsigned int & | nExcitation, | ||
unsigned int & | nSuperelastic | ||
) | const |
Get the number of collisions broken down by cross-section type.
Definition at line 962 of file MediumMagboltz.cc.
unsigned int Garfield::MediumMagboltz::GetNumberOfLevels | ( | ) |
Get the number of cross-section terms.
Definition at line 976 of file MediumMagboltz.cc.
|
inline |
Get the number of Penning transfers that occured since the last reset.
Definition at line 121 of file MediumMagboltz.hh.
unsigned int Garfield::MediumMagboltz::GetNumberOfPhotonCollisions | ( | ) | const |
Get the total number of photon collisions.
Definition at line 1072 of file MediumMagboltz.cc.
unsigned int Garfield::MediumMagboltz::GetNumberOfPhotonCollisions | ( | unsigned int & | nElastic, |
unsigned int & | nIonising, | ||
unsigned int & | nInelastic | ||
) | const |
Get number of photon collisions by collision type.
Definition at line 1077 of file MediumMagboltz.cc.
|
overridevirtual |
Reimplemented from Garfield::Medium.
Definition at line 858 of file MediumMagboltz.cc.
|
overridevirtual |
Reimplemented from Garfield::Medium.
Definition at line 821 of file MediumMagboltz.cc.
bool Garfield::MediumMagboltz::Initialise | ( | const bool | verbose = false | ) |
Initialise the table of scattering rates (called internally when a collision rate is requested and the gas mixture or other parameters have changed).
Definition at line 362 of file MediumMagboltz.cc.
Referenced by GarfieldPhysics::InitializePhysics(), and PrintGas().
|
overridevirtual |
Print information about the present gas mixture and available data.
Reimplemented from Garfield::MediumGas.
Definition at line 377 of file MediumMagboltz.cc.
void Garfield::MediumMagboltz::ResetCollisionCounters | ( | ) |
Reset the collision counters.
Definition at line 951 of file MediumMagboltz.cc.
void Garfield::MediumMagboltz::RunMagboltz | ( | const double | e, |
const double | b, | ||
const double | btheta, | ||
const int | ncoll, | ||
bool | verbose, | ||
double & | vx, | ||
double & | vy, | ||
double & | vz, | ||
double & | dl, | ||
double & | dt, | ||
double & | alpha, | ||
double & | eta, | ||
double & | lor, | ||
double & | vxerr, | ||
double & | vyerr, | ||
double & | vzerr, | ||
double & | dlerr, | ||
double & | dterr, | ||
double & | alphaerr, | ||
double & | etaerr, | ||
double & | lorerr, | ||
double & | alphatof, | ||
std::array< double, 6 > & | difftens | ||
) |
Run Magboltz for a given electric field, magnetic field and angle.
[in] | e | electric field |
[in] | b | magnetic field |
[in] | btheta | angle between electric and magnetic field |
[in] | ncoll | number of collisions (in multiples of 107) to be simulated |
[in] | verbose | verbosity flag |
[out] | vx,vy,vz | drift velocity vector |
[out] | dl,dt | diffusion cofficients |
[out] | alpha | Townsend cofficient |
[out] | eta | attachment cofficient |
[out] | lor | Lorentz angle |
[out] | vxerr,vyerr,vzerr | errors on drift velocity |
[out] | dlerr,dterr | errors on diffusion coefficients |
[out] | alphaerr,etaerr | errors on Townsend/attachment coefficients |
[out] | lorerr | error on Lorentz angle |
[out] | alphatof | effective Townsend coefficient calculated using time-of-flight method |
[out] | difftens | components of the diffusion tensor (zz, xx, yy, xz, yz, xy) |
Definition at line 3365 of file MediumMagboltz.cc.
Referenced by GenerateGasTable().
void Garfield::MediumMagboltz::SetExcitationScaling | ( | const double | r, |
std::string | gasname | ||
) |
Multiply all excitation cross-sections by a uniform scaling factor.
Definition at line 328 of file MediumMagboltz.cc.
bool Garfield::MediumMagboltz::SetMaxElectronEnergy | ( | const double | e | ) |
Set the highest electron energy to be included in the table of scattering rates.
Definition at line 91 of file MediumMagboltz.cc.
Referenced by GetElectronCollision(), and GetElectronCollisionRate().
bool Garfield::MediumMagboltz::SetMaxPhotonEnergy | ( | const double | e | ) |
Set the highest photon energy to be included in the table of scattering rates.
Definition at line 107 of file MediumMagboltz.cc.
Referenced by GetPhotonCollision(), and GetPhotonCollisionRate().
void Garfield::MediumMagboltz::SetSplittingFunctionFlat | ( | ) |
Sample the secondary electron energy from a flat distribution.
Definition at line 146 of file MediumMagboltz.cc.
void Garfield::MediumMagboltz::SetSplittingFunctionGreenSawada | ( | ) |
Sample the secondary electron energy according to the Green-Sawada model.
Definition at line 128 of file MediumMagboltz.cc.
void Garfield::MediumMagboltz::SetSplittingFunctionOpalBeaty | ( | ) |
Sample the secondary electron energy according to the Opal-Beaty model.
Definition at line 123 of file MediumMagboltz.cc.