Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
#include <AvalancheMC.hh>
Public Member Functions | |
AvalancheMC () | |
Constructor. | |
~AvalancheMC () | |
Destructor. | |
void | SetSensor (Sensor *s) |
Set the sensor. | |
void | EnablePlotting (ViewDrift *view) |
Switch on drift line plotting. | |
void | DisablePlotting () |
Switch off drift line plotting. | |
void | EnableSignalCalculation (const bool on=true) |
Switch on calculation of induced currents (default: disabled). | |
void | SetSignalAveragingOrder (const unsigned int navg) |
void | UseWeightingPotential (const bool on=true) |
void | EnableInducedChargeCalculation (const bool on=true) |
Switch on calculation of induced charge (default: disabled). | |
void | EnableRKFSteps (const bool on=true) |
void | EnableProjectedPathIntegration (const bool on=true) |
void | EnableDiffusion () |
Switch on diffusion (default: enabled). | |
void | DisableDiffusion () |
Switch off diffusion. | |
void | EnableAttachment () |
void | DisableAttachment () |
Switch off attachment and multiplication. | |
void | EnableAttachmentMap (const bool on=true) |
Retrieve the attachment coefficient from the component. | |
void | EnableVelocityMap (const bool on=true) |
Retrieve the drift velocity from the component. | |
void | EnableMagneticField (const bool on=true) |
Enable use of magnetic field in stepping algorithm. | |
void | EnableAvalancheSizeLimit (const unsigned int size) |
void | DisableAvalancheSizeLimit () |
Do not limit the maximum avalanche size. | |
int | GetAvalancheSizeLimit () const |
Return the currently set avalanche size limit. | |
void | SetTimeSteps (const double d=0.02) |
Use fixed-time steps (default 20 ps). | |
void | SetDistanceSteps (const double d=0.001) |
Use fixed distance steps (default 10 um). | |
void | SetCollisionSteps (const unsigned int n=100) |
void | SetStepDistanceFunction (double(*f)(double x, double y, double z)) |
Retrieve the step distance from a user-supplied function. | |
void | SetTimeWindow (const double t0, const double t1) |
Define a time interval (only carriers inside the interval are drifted). | |
void | UnsetTimeWindow () |
Do not limit the time interval within which carriers are drifted. | |
void | SetElectronSignalScalingFactor (const double scale) |
Set multiplication factor for the signal induced by electrons. | |
void | SetHoleSignalScalingFactor (const double scale) |
Set multiplication factor for the signal induced by holes. | |
void | SetIonSignalScalingFactor (const double scale) |
Set multiplication factor for the signal induced by ions. | |
void | GetAvalancheSize (unsigned int &ne, unsigned int &ni) const |
Return the number of electrons and ions/holes in the avalanche. | |
unsigned int | GetNumberOfDriftLinePoints () const |
Return the number of points along the last simulated drift line. | |
void | GetDriftLinePoint (const unsigned int i, double &x, double &y, double &z, double &t) const |
Return the coordinates and time of a point along the last drift line. | |
unsigned int | GetNumberOfElectronEndpoints () const |
unsigned int | GetNumberOfHoleEndpoints () const |
unsigned int | GetNumberOfIonEndpoints () const |
Return the number of ion trajectories. | |
void | GetElectronEndpoint (const unsigned int i, double &x0, double &y0, double &z0, double &t0, double &x1, double &y1, double &z1, double &t1, int &status) const |
void | GetHoleEndpoint (const unsigned int i, double &x0, double &y0, double &z0, double &t0, double &x1, double &y1, double &z1, double &t1, int &status) const |
void | GetIonEndpoint (const unsigned int i, double &x0, double &y0, double &z0, double &t0, double &x1, double &y1, double &z1, double &t1, int &status) const |
bool | DriftElectron (const double x0, const double y0, const double z0, const double t0) |
Simulate the drift line of an electron from a given starting point. | |
bool | DriftHole (const double x0, const double y0, const double z0, const double t0) |
Simulate the drift line of a hole from a given starting point. | |
bool | DriftIon (const double x0, const double y0, const double z0, const double t0) |
Simulate the drift line of an ion from a given starting point. | |
bool | AvalancheElectron (const double x0, const double y0, const double z0, const double t0, const bool hole=false) |
bool | AvalancheHole (const double x0, const double y0, const double z0, const double t0, const bool electron=false) |
Simulate an avalanche initiated by a hole at a given starting point. | |
bool | AvalancheElectronHole (const double x0, const double y0, const double z0, const double t0) |
Simulate an avalanche initiated by an electron-hole pair. | |
bool | ResumeAvalanche (const bool electron=true, const bool hole=true) |
void | EnableDebugging (const bool on=true) |
Switch debugging messages on/off (default: off). | |
Calculate drift lines and avalanches based on macroscopic transport coefficients, using Monte Carlo integration.
Definition at line 17 of file AvalancheMC.hh.
Garfield::AvalancheMC::AvalancheMC | ( | ) |
|
inline |
bool Garfield::AvalancheMC::AvalancheElectron | ( | const double | x0, |
const double | y0, | ||
const double | z0, | ||
const double | t0, | ||
const bool | hole = false |
||
) |
Simulate an avalanche initiated by an electron at a given starting point.
x0,y0,z0,t0 | coordinates and time of the initial electron |
hole | simulate the hole component of the avalanche or not |
Definition at line 517 of file AvalancheMC.cc.
bool Garfield::AvalancheMC::AvalancheElectronHole | ( | const double | x0, |
const double | y0, | ||
const double | z0, | ||
const double | t0 | ||
) |
Simulate an avalanche initiated by an electron-hole pair.
Definition at line 533 of file AvalancheMC.cc.
bool Garfield::AvalancheMC::AvalancheHole | ( | const double | x0, |
const double | y0, | ||
const double | z0, | ||
const double | t0, | ||
const bool | electron = false |
||
) |
Simulate an avalanche initiated by a hole at a given starting point.
Definition at line 525 of file AvalancheMC.cc.
|
inline |
Switch off attachment and multiplication.
Definition at line 69 of file AvalancheMC.hh.
|
inline |
Do not limit the maximum avalanche size.
Definition at line 84 of file AvalancheMC.hh.
|
inline |
|
inline |
Switch off drift line plotting.
Definition at line 30 of file AvalancheMC.hh.
bool Garfield::AvalancheMC::DriftElectron | ( | const double | x0, |
const double | y0, | ||
const double | z0, | ||
const double | t0 | ||
) |
Simulate the drift line of an electron from a given starting point.
Definition at line 186 of file AvalancheMC.cc.
Referenced by GarfieldPhysics::DoIt(), and main().
bool Garfield::AvalancheMC::DriftHole | ( | const double | x0, |
const double | y0, | ||
const double | z0, | ||
const double | t0 | ||
) |
Simulate the drift line of a hole from a given starting point.
Definition at line 205 of file AvalancheMC.cc.
Referenced by main().
bool Garfield::AvalancheMC::DriftIon | ( | const double | x0, |
const double | y0, | ||
const double | z0, | ||
const double | t0 | ||
) |
Simulate the drift line of an ion from a given starting point.
Definition at line 224 of file AvalancheMC.cc.
|
inline |
Switch on attachment (and multiplication) for drift line calculation (default: enabled). For avalanches the flag is ignored.
Definition at line 67 of file AvalancheMC.hh.
|
inline |
Retrieve the attachment coefficient from the component.
Definition at line 72 of file AvalancheMC.hh.
Referenced by main().
|
inline |
Set a maximum avalanche size (ignore further multiplication once this size has been reached).
Definition at line 82 of file AvalancheMC.hh.
|
inline |
Switch debugging messages on/off (default: off).
Definition at line 178 of file AvalancheMC.hh.
|
inline |
Switch on diffusion (default: enabled).
Definition at line 61 of file AvalancheMC.hh.
|
inline |
Switch on calculation of induced charge (default: disabled).
Definition at line 46 of file AvalancheMC.hh.
|
inline |
Enable use of magnetic field in stepping algorithm.
Definition at line 78 of file AvalancheMC.hh.
void Garfield::AvalancheMC::EnablePlotting | ( | ViewDrift * | view | ) |
Switch on drift line plotting.
Definition at line 38 of file AvalancheMC.cc.
Referenced by main().
|
inline |
Switch on equilibration of multiplication and attachment over the drift line (default: enabled).
Definition at line 56 of file AvalancheMC.hh.
|
inline |
Switch on Runge-Kutta-Fehlberg stepping (as opposed to simple straight-line steps.
Definition at line 52 of file AvalancheMC.hh.
|
inline |
Switch on calculation of induced currents (default: disabled).
Definition at line 33 of file AvalancheMC.hh.
Referenced by main().
|
inline |
Retrieve the drift velocity from the component.
Definition at line 75 of file AvalancheMC.hh.
|
inline |
Return the number of electrons and ions/holes in the avalanche.
Definition at line 111 of file AvalancheMC.hh.
|
inline |
Return the currently set avalanche size limit.
Definition at line 86 of file AvalancheMC.hh.
void Garfield::AvalancheMC::GetDriftLinePoint | ( | const unsigned int | i, |
double & | x, | ||
double & | y, | ||
double & | z, | ||
double & | t | ||
) | const |
Return the coordinates and time of a point along the last drift line.
Definition at line 114 of file AvalancheMC.cc.
void Garfield::AvalancheMC::GetElectronEndpoint | ( | const unsigned int | i, |
double & | x0, | ||
double & | y0, | ||
double & | z0, | ||
double & | t0, | ||
double & | x1, | ||
double & | y1, | ||
double & | z1, | ||
double & | t1, | ||
int & | status | ||
) | const |
Return the coordinates and time of start and end point of a given electron drift line.
i | index of the drift line |
x0,y0,z0,t0 | coordinates and time of the starting point |
x1,y1,z1,t1 | coordinates and time of the end point |
status | status code (see GarfieldConstants.hh) |
Definition at line 166 of file AvalancheMC.cc.
Referenced by GarfieldPhysics::DoIt().
void Garfield::AvalancheMC::GetHoleEndpoint | ( | const unsigned int | i, |
double & | x0, | ||
double & | y0, | ||
double & | z0, | ||
double & | t0, | ||
double & | x1, | ||
double & | y1, | ||
double & | z1, | ||
double & | t1, | ||
int & | status | ||
) | const |
Definition at line 127 of file AvalancheMC.cc.
void Garfield::AvalancheMC::GetIonEndpoint | ( | const unsigned int | i, |
double & | x0, | ||
double & | y0, | ||
double & | z0, | ||
double & | t0, | ||
double & | x1, | ||
double & | y1, | ||
double & | z1, | ||
double & | t1, | ||
int & | status | ||
) | const |
Definition at line 147 of file AvalancheMC.cc.
|
inline |
Return the number of points along the last simulated drift line.
Definition at line 117 of file AvalancheMC.hh.
|
inline |
Return the number of electron trajectories in the last simulated avalanche (including captured electrons).
Definition at line 124 of file AvalancheMC.hh.
|
inline |
Return the number of hole trajectories in the last simulated avalanche (including captured holes).
Definition at line 129 of file AvalancheMC.hh.
|
inline |
Return the number of ion trajectories.
Definition at line 133 of file AvalancheMC.hh.
bool Garfield::AvalancheMC::ResumeAvalanche | ( | const bool | electron = true , |
const bool | hole = true |
||
) |
Definition at line 541 of file AvalancheMC.cc.
void Garfield::AvalancheMC::SetCollisionSteps | ( | const unsigned int | n = 100 | ) |
Use exponentially distributed time steps with mean equal to the specified multiple of the collision time (default model).
Definition at line 77 of file AvalancheMC.cc.
void Garfield::AvalancheMC::SetDistanceSteps | ( | const double | d = 0.001 | ) |
Use fixed distance steps (default 10 um).
Definition at line 62 of file AvalancheMC.cc.
Referenced by GarfieldPhysics::DoIt(), and main().
|
inline |
Set multiplication factor for the signal induced by electrons.
Definition at line 104 of file AvalancheMC.hh.
|
inline |
Set multiplication factor for the signal induced by holes.
Definition at line 106 of file AvalancheMC.hh.
|
inline |
Set multiplication factor for the signal induced by ions.
Definition at line 108 of file AvalancheMC.hh.
void Garfield::AvalancheMC::SetSensor | ( | Sensor * | s | ) |
Set the sensor.
Definition at line 29 of file AvalancheMC.cc.
Referenced by GarfieldPhysics::DoIt(), and main().
|
inline |
Set the number of points to be used when averaging the signal vector over a time bin in the Sensor class. The averaging is done with a point Newton-Raphson integration. Default: 1.
Definition at line 38 of file AvalancheMC.hh.
void Garfield::AvalancheMC::SetStepDistanceFunction | ( | double(*)(double x, double y, double z) | f | ) |
Retrieve the step distance from a user-supplied function.
Definition at line 92 of file AvalancheMC.cc.
void Garfield::AvalancheMC::SetTimeSteps | ( | const double | d = 0.02 | ) |
Use fixed-time steps (default 20 ps).
Definition at line 47 of file AvalancheMC.cc.
void Garfield::AvalancheMC::SetTimeWindow | ( | const double | t0, |
const double | t1 | ||
) |
Define a time interval (only carriers inside the interval are drifted).
Definition at line 102 of file AvalancheMC.cc.
|
inline |
Do not limit the time interval within which carriers are drifted.
Definition at line 101 of file AvalancheMC.hh.
|
inline |
Use the weighting potential (as opposed to the weighting field) for calculating the induced signal.
Definition at line 41 of file AvalancheMC.hh.