![]() |
Garfield 0.3
Toolkit for the detailed simulation of particle detectors based on ionization measurement in gases and semiconductors
|
Plot transport coefficients as function of electric and magnetic field. More...
#include <ViewMedium.hh>
Public Member Functions | |
| ViewMedium () | |
| Default constructor. | |
| ViewMedium (Medium *medium) | |
| Constructor. | |
| ~ViewMedium ()=default | |
| Destructor. | |
| void | SetMedium (Medium *m) |
| Set the medium from which to retrieve the transport coefficients. | |
| void | EnableAutoRangeX (const bool on=true) |
| Try to choose the x-axis range based on the field grid. | |
| void | SetRangeE (const double emin, const double emax, const bool logscale) |
| Set the limits of the electric field. | |
| void | SetRangeB (const double bmin, const double bmax, const bool logscale) |
| Set the limits of the magnetic field. | |
| void | SetRangeA (const double amin, const double amax, const bool logscale) |
| Set the limits of the angle between electric and magnetic field. | |
| void | SetRangeEN (const double emin, const double emax, const bool logscale) |
| Set the limits of the reduced electric field (E/N). | |
| void | SetRangeEP (const double emin, const double emax, const bool logscale) |
| Set the limits of the reduced electric field (E/P). | |
| void | EnableAutoRangeY (const bool on=true) |
| Choose the y-axis range based on the function's minima/maxima. | |
| void | SetRangeY (const double ymin, const double ymax, const bool logscale=false) |
| Set the range of the function (velocity etc.) to be plotted. | |
| void | SetElectricField (const double efield) |
| Set the electric field to use when plotting as function of B or angle. | |
| void | SetMagneticField (const double bfield) |
| Set the magnetic field to use when plotting as function of E or angle. | |
| void | SetAngle (const double angle) |
| Set the angle to use when plotting as function of E or B. | |
| void | EnableExport (const std::string &txtfile) |
| void | DisableExport () |
| void | PlotVelocity (const std::string &carriers, const char xaxis) |
| Plot the drift velocity components. | |
| void | PlotDiffusion (const std::string &carriers, const char xaxis) |
| Plot the transverse and longitudinal diffusion coefficients. | |
| void | PlotTownsend (const std::string &carriers, const char xaxis) |
| Plot the Townsend coefficient. | |
| void | PlotAttachment (const std::string &carriers, const char xaxis) |
| Plot the attachment coefficient. | |
| void | PlotAlphaEta (const std::string &carriers, const char xaxis) |
| Plot Townsend and attachment coefficients. | |
| void | PlotElectronVelocity (const char xaxis='e', const bool same=false) |
| Plot the drift velocity components of electrons in the medium. | |
| void | PlotElectronVelocityFluxBulk (const char xaxis='e', const bool same=false) |
| Plot Flux and Bulk drift velocity. | |
| void | PlotHoleVelocity (const char xaxis='e', const bool same=false) |
| Plot the drift velocity components of holes in the medium. | |
| void | PlotIonVelocity (const char xaxis='e', const bool same=false) |
| Plot the ion drift velocity in the gas. | |
| void | PlotElectronDiffusion (const char xaxis='e', const bool same=false) |
| Plot the diffusion coefficients in the medium. | |
| void | PlotHoleDiffusion (const char xaxis='e', const bool same=false) |
| Plot the diffusion coefficients of holes in the medium. | |
| void | PlotIonDiffusion (const char xaxis='e', const bool same=false) |
| Plot the diffusion coefficients of ions in the gas. | |
| void | PlotElectronTownsend (const char xaxis='e', const bool same=false) |
| Plot the Townsend coefficient for electrons. | |
| void | PlotElectronReducedTownsendN (const char xaxis='r', const bool same=false) |
| Plot the Townsend coefficient for electrons. | |
| void | PlotElectronReducedTownsendP (const char xaxis='p', const bool same=false) |
| Plot the Townsend coefficient for electrons. | |
| void | PlotElectronTOFIonization (const char xaxis='e', const bool same=false) |
| Plot the TOF ionization rate. | |
| void | PlotHoleTownsend (const char xaxis='e', const bool same=false) |
| Plot the Townsend coefficient for holes. | |
| void | PlotElectronAttachment (const char xaxis='e', const bool same=false) |
| Plot the attachment coefficient for electrons. | |
| void | PlotElectronTOFAttachment (const char xaxis='e', const bool same=false) |
| Plot the TOF attachment rate. | |
| void | PlotHoleAttachment (const char xaxis='e', const bool same=false) |
| Plot the attachment coefficient for holes. | |
| void | PlotElectronLorentzAngle (const char xaxis='e', const bool same=false) |
| Plot the angle between drift velocity and field. | |
| void | SetColours (const std::vector< short > &cols) |
| Set the (ROOT) colours to be used in the plots. | |
| void | SetLabels (const std::vector< std::string > &labels) |
| Set user-defined plot labels. | |
| Public Member Functions inherited from Garfield::ViewBase | |
| ViewBase ()=delete | |
| Default constructor. | |
| ViewBase (const std::string &name) | |
| Constructor. | |
| virtual | ~ViewBase ()=default |
| Destructor. | |
| void | SetCanvas (TPad *pad) |
| Set the canvas to be painted on. | |
| void | SetCanvas () |
| Unset an external canvas. | |
| TPad * | GetCanvas () |
| Retrieve the canvas. | |
| void | SetArea (const double xmin, const double ymin, const double xmax, const double ymax) |
| Set the x- and y-axis limits (in local coordinates of the current viewing plane, if applicable). | |
| virtual void | SetArea (const double xmin, const double ymin, const double zmin, const double xmax, const double ymax, const double zmax) |
| Set a bounding box (if applicable). | |
| void | SetArea () |
| Use default x- and y-axis limits (based on the bounding box of the sensor/component, if applicable). | |
| virtual void | SetPlane (const double fx, const double fy, const double fz, const double x0, const double y0, const double z0) |
| Set the projection (viewing plane), if applicable. | |
| virtual void | SetPlane (const double fx, const double fy, const double fz, const double x0, const double y0, const double z0, const double hx, const double hy, const double hz) |
| Set the projection plane specifying a hint for the in-plane x axis. | |
| void | Rotate (const double angle) |
| Rotate the viewing plane (angle in radian). | |
| void | SetPlaneXY () |
| Set the viewing plane to x-y. | |
| void | SetPlaneXZ () |
| Set the viewing plane to x-z. | |
| void | SetPlaneYZ () |
| Set the viewing plane to y-z. | |
| void | SetPlaneZX () |
| Set the viewing plane to z-x. | |
| void | SetPlaneZY () |
| Set the viewing plane to z-y. | |
| void | EnableDebugging (const bool on=true) |
| Switch on/off debugging output. | |
Private Types | |
| enum class | Parameter { VelocityE , VelocityB , VelocityExB , VelocityWv , VelocityWr , TransverseDiffusion , LongitudinalDiffusion , Townsend , Attachment , LorentzAngle , RIonTof , RAttTof , AlphaN , AlphaP } |
| enum class | Charge { Electron , Hole , Ion } |
| enum class | Axis { E , B , Angle , EoverN , EoverP , None } |
Private Member Functions | |
| void | PlotVelocity (const Axis xaxis, const Charge particle, const bool same) |
| void | PlotVelocityFluxBulk (const Axis xaxis, const Charge particle, const bool same) |
| void | PlotDiffusion (const Axis xaxis, const Charge particle, const bool same) |
| void | Plot (const Axis xaxis, const Charge particle, const Parameter par, const bool same) |
| void | PlotLorentzAngle (const Axis xaxis, const Charge particle, const bool same) |
| void | ResetY () |
| void | ResetX (const Axis xaxis) |
| void | Draw () |
| void | Export () |
| Axis | GetAxis (const char xaxis) const |
| bool | GetGrid (std::array< std::vector< double >, 3 > &grid, int &ie, int &ib, int &ia, const Axis xaxis) const |
| double | ConvertToEN (const double e0Vcm) |
| double | UnConvertFromEN (const double e0Td) |
| double | ConvertToEP (const double e0Vcm) |
| double | UnConvertFromEP (const double e0VcmTorr) |
Private Attributes | |
| Medium * | m_medium = nullptr |
| double | m_eMin = 100. |
| double | m_eMax = 100000. |
| double | m_bMin = 0. |
| double | m_bMax = 2. |
| double | m_aMin = 0. |
| double | m_aMax = Pi |
| double | m_enMin = 0.25 |
| double | m_enMax = 400. |
| double | m_epMin = 0.13 |
| double | m_epMax = 132. |
| bool | m_logE = true |
| bool | m_logB = false |
| bool | m_logA = false |
| bool | m_logEN = true |
| bool | m_logEP = true |
| bool | m_logX = true |
| bool | m_autoRangeX = true |
| Axis | m_xaxis = Axis::None |
| double | m_yMin = 0. |
| double | m_yMax = 1. |
| bool | m_logY = false |
| bool | m_autoRangeY = true |
| double | m_efield = 1000. |
| double | m_bfield = 0. |
| double | m_angle = HalfPi |
| std::vector< double > | m_xPlot |
| std::vector< std::vector< double > > | m_yPlot |
| std::vector< Parameter > | m_par |
| std::vector< Charge > | m_q |
| std::vector< std::vector< double > > | m_xGraph |
| std::vector< std::vector< double > > | m_yGraph |
| std::vector< short > | m_colours |
| std::vector< std::string > | m_labels |
| std::string | m_outfile |
Additional Inherited Members | |
| Static Public Member Functions inherited from Garfield::ViewBase | |
| static std::string | FindUnusedFunctionName (const std::string &s) |
| Find an unused function name. | |
| static std::string | FindUnusedHistogramName (const std::string &s) |
| Find an unused histogram name. | |
| static std::string | FindUnusedCanvasName (const std::string &s) |
| Find an unused canvas name. | |
| Protected Member Functions inherited from Garfield::ViewBase | |
| void | UpdateProjectionMatrix () |
| template<typename T> | |
| void | ToPlane (const T x, const T y, const T z, T &xp, T &yp) const |
| template<typename T> | |
| bool | InBox (const std::array< T, 3 > &x) const |
| void | Clip (const std::array< float, 3 > &x0, const std::array< float, 3 > &x1, std::array< float, 3 > &xc) const |
| void | DrawLine (const std::vector< std::array< float, 3 > > &xl, const short col, const short lw) |
| std::string | LabelX () |
| std::string | LabelY () |
| std::string | PlaneDescription () |
| bool | PlotLimits (Sensor *sensor, double &xmin, double &ymin, double &xmax, double &ymax) const |
| bool | PlotLimits (Component *cmp, double &xmin, double &ymin, double &xmax, double &ymax) const |
| bool | PlotLimitsFromUserBox (double &xmin, double &ymin, double &xmax, double &ymax) const |
| bool | PlotLimits (std::array< double, 3 > &bbmin, std::array< double, 3 > &bbmax, double &xmin, double &ymin, double &xmax, double &ymax) const |
| Static Protected Member Functions inherited from Garfield::ViewBase | |
| static bool | RangeSet (TVirtualPad *) |
| static void | SetRange (TVirtualPad *pad, const double x0, const double y0, const double x1, const double y1) |
| Protected Attributes inherited from Garfield::ViewBase | |
| std::string | m_className = "ViewBase" |
| bool | m_debug = false |
| bool | m_userPlotLimits = false |
| double | m_xMinPlot = -1. |
| double | m_xMaxPlot = 1. |
| double | m_yMinPlot = -1. |
| double | m_yMaxPlot = 1. |
| bool | m_userBox = false |
| double | m_xMinBox = -1. |
| double | m_xMaxBox = 1. |
| double | m_yMinBox = -1. |
| double | m_yMaxBox = 1. |
| double | m_zMinBox = -1. |
| double | m_zMaxBox = 1. |
| std::array< std::array< double, 3 >, 3 > | m_proj |
| std::array< double, 4 > | m_plane {{0, 0, 1, 0}} |
| std::array< std::array< double, 3 >, 3 > | m_prmat |
Plot transport coefficients as function of electric and magnetic field.
Definition at line 17 of file ViewMedium.hh.
|
strongprivate |
| Enumerator | |
|---|---|
| E | |
| B | |
| Angle | |
| EoverN | |
| EoverP | |
| None | |
Definition at line 186 of file ViewMedium.hh.
|
strongprivate |
|
strongprivate |
| Enumerator | |
|---|---|
| VelocityE | |
| VelocityB | |
| VelocityExB | |
| VelocityWv | |
| VelocityWr | |
| TransverseDiffusion | |
| LongitudinalDiffusion | |
| Townsend | |
| Attachment | |
| LorentzAngle | |
| RIonTof | |
| RAttTof | |
| AlphaN | |
| AlphaP | |
Definition at line 167 of file ViewMedium.hh.
|
inline |
| Garfield::ViewMedium::ViewMedium | ( | Medium * | medium | ) |
Constructor.
|
default |
Destructor.
|
private |
|
private |
|
inline |
Definition at line 55 of file ViewMedium.hh.
|
private |
|
inline |
Try to choose the x-axis range based on the field grid.
Definition at line 30 of file ViewMedium.hh.
|
inline |
Choose the y-axis range based on the function's minima/maxima.
Definition at line 42 of file ViewMedium.hh.
|
inline |
Definition at line 54 of file ViewMedium.hh.
|
private |
|
private |
|
private |
|
private |
| void Garfield::ViewMedium::PlotAlphaEta | ( | const std::string & | carriers, |
| const char | xaxis ) |
Plot Townsend and attachment coefficients.
| void Garfield::ViewMedium::PlotAttachment | ( | const std::string & | carriers, |
| const char | xaxis ) |
Plot the attachment coefficient.
|
private |
| void Garfield::ViewMedium::PlotDiffusion | ( | const std::string & | carriers, |
| const char | xaxis ) |
Plot the transverse and longitudinal diffusion coefficients.
|
inline |
Plot the attachment coefficient for electrons.
Definition at line 142 of file ViewMedium.hh.
|
inline |
Plot the diffusion coefficients in the medium.
Definition at line 107 of file ViewMedium.hh.
|
inline |
Plot the angle between drift velocity and field.
Definition at line 156 of file ViewMedium.hh.
|
inline |
Plot the Townsend coefficient for electrons.
Definition at line 123 of file ViewMedium.hh.
|
inline |
Plot the Townsend coefficient for electrons.
Definition at line 128 of file ViewMedium.hh.
|
inline |
|
inline |
|
inline |
Plot the Townsend coefficient for electrons.
Definition at line 119 of file ViewMedium.hh.
|
inline |
Plot the drift velocity components of electrons in the medium.
| xaxis | abscissa.
|
| same | flag to keep existing plots (true) or not. |
Definition at line 90 of file ViewMedium.hh.
|
inline |
Plot Flux and Bulk drift velocity.
Definition at line 94 of file ViewMedium.hh.
|
inline |
Plot the attachment coefficient for holes.
Definition at line 151 of file ViewMedium.hh.
|
inline |
Plot the diffusion coefficients of holes in the medium.
Definition at line 111 of file ViewMedium.hh.
|
inline |
Plot the Townsend coefficient for holes.
Definition at line 138 of file ViewMedium.hh.
|
inline |
Plot the drift velocity components of holes in the medium.
Definition at line 99 of file ViewMedium.hh.
|
inline |
Plot the diffusion coefficients of ions in the gas.
Definition at line 115 of file ViewMedium.hh.
|
inline |
Plot the ion drift velocity in the gas.
Definition at line 103 of file ViewMedium.hh.
|
private |
| void Garfield::ViewMedium::PlotTownsend | ( | const std::string & | carriers, |
| const char | xaxis ) |
Plot the Townsend coefficient.
|
private |
| void Garfield::ViewMedium::PlotVelocity | ( | const std::string & | carriers, |
| const char | xaxis ) |
Plot the drift velocity components.
| carriers | string indicating the carriers for which to plot the drift velocity
|
| xaxis | abscissa.
|
|
private |
|
private |
|
private |
|
inline |
Set the angle to use when plotting as function of E or B.
Definition at line 52 of file ViewMedium.hh.
|
inline |
Set the (ROOT) colours to be used in the plots.
Definition at line 162 of file ViewMedium.hh.
|
inline |
Set the electric field to use when plotting as function of B or angle.
Definition at line 48 of file ViewMedium.hh.
|
inline |
Set user-defined plot labels.
Definition at line 164 of file ViewMedium.hh.
|
inline |
Set the magnetic field to use when plotting as function of E or angle.
Definition at line 50 of file ViewMedium.hh.
| void Garfield::ViewMedium::SetMedium | ( | Medium * | m | ) |
Set the medium from which to retrieve the transport coefficients.
| void Garfield::ViewMedium::SetRangeA | ( | const double | amin, |
| const double | amax, | ||
| const bool | logscale ) |
Set the limits of the angle between electric and magnetic field.
| void Garfield::ViewMedium::SetRangeB | ( | const double | bmin, |
| const double | bmax, | ||
| const bool | logscale ) |
Set the limits of the magnetic field.
| void Garfield::ViewMedium::SetRangeE | ( | const double | emin, |
| const double | emax, | ||
| const bool | logscale ) |
Set the limits of the electric field.
| void Garfield::ViewMedium::SetRangeEN | ( | const double | emin, |
| const double | emax, | ||
| const bool | logscale ) |
Set the limits of the reduced electric field (E/N).
| void Garfield::ViewMedium::SetRangeEP | ( | const double | emin, |
| const double | emax, | ||
| const bool | logscale ) |
Set the limits of the reduced electric field (E/P).
| void Garfield::ViewMedium::SetRangeY | ( | const double | ymin, |
| const double | ymax, | ||
| const bool | logscale = false ) |
Set the range of the function (velocity etc.) to be plotted.
|
private |
|
private |
|
private |
Definition at line 193 of file ViewMedium.hh.
|
private |
Definition at line 193 of file ViewMedium.hh.
|
private |
Definition at line 215 of file ViewMedium.hh.
|
private |
Definition at line 202 of file ViewMedium.hh.
|
private |
Definition at line 208 of file ViewMedium.hh.
|
private |
Definition at line 213 of file ViewMedium.hh.
|
private |
Definition at line 192 of file ViewMedium.hh.
|
private |
Definition at line 192 of file ViewMedium.hh.
|
private |
Definition at line 225 of file ViewMedium.hh.
|
private |
Definition at line 211 of file ViewMedium.hh.
|
private |
Definition at line 191 of file ViewMedium.hh.
|
private |
Definition at line 191 of file ViewMedium.hh.
|
private |
Definition at line 194 of file ViewMedium.hh.
|
private |
Definition at line 194 of file ViewMedium.hh.
|
private |
Definition at line 195 of file ViewMedium.hh.
|
private |
Definition at line 195 of file ViewMedium.hh.
|
private |
Definition at line 226 of file ViewMedium.hh.
|
private |
Definition at line 198 of file ViewMedium.hh.
|
private |
Definition at line 197 of file ViewMedium.hh.
|
private |
Definition at line 196 of file ViewMedium.hh.
|
private |
Definition at line 199 of file ViewMedium.hh.
|
private |
Definition at line 200 of file ViewMedium.hh.
|
private |
Definition at line 201 of file ViewMedium.hh.
|
private |
Definition at line 207 of file ViewMedium.hh.
|
private |
Definition at line 188 of file ViewMedium.hh.
|
private |
Definition at line 228 of file ViewMedium.hh.
|
private |
Definition at line 219 of file ViewMedium.hh.
|
private |
Definition at line 220 of file ViewMedium.hh.
|
private |
Definition at line 203 of file ViewMedium.hh.
|
private |
Definition at line 222 of file ViewMedium.hh.
|
private |
Definition at line 217 of file ViewMedium.hh.
|
private |
Definition at line 223 of file ViewMedium.hh.
|
private |
Definition at line 206 of file ViewMedium.hh.
|
private |
Definition at line 206 of file ViewMedium.hh.
|
private |
Definition at line 218 of file ViewMedium.hh.