|
Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
Visualize the potential or electric field of a component or sensor. More...
#include <ViewField.hh>
Inheritance diagram for Garfield::ViewField:Public Member Functions | |
| ViewField () | |
| Constructor. | |
| ~ViewField () | |
| Destructor. | |
| void | SetSensor (Sensor *s) |
| Set the sensor from which to retrieve the field. | |
| void | SetComponent (ComponentBase *c) |
| Set the component from which to retrieve the field. | |
| void | SetVoltageRange (const double vmin, const double vmax) |
| Set the plot limits for the potential. | |
| void | SetElectricFieldRange (const double emin, const double emax) |
| Set the plot limits for the electric field. | |
| void | SetWeightingFieldRange (const double wmin, const double wmax) |
| Set the plot limits for the weighting field. | |
| void | SetArea (const double xmin, const double ymin, const double xmax, const double ymax) |
| Set the viewing area (in local coordinates of the current viewing plane). | |
| void | SetArea () |
| Set the viewing area based on the bounding box of the sensor/component. | |
| void | SetPlane (const double fx, const double fy, const double fz, const double x0, const double y0, const double z0) |
| void | SetDefaultProjection () |
Set the default viewing plane ( - at ). | |
| void | Rotate (const double angle) |
| Rotate the viewing plane (angle in radian). | |
| void | SetNumberOfContours (const unsigned int n) |
| Set the number of contour levels (at most 50). | |
| void | SetNumberOfSamples1d (const unsigned int n) |
| Set the number of points used for drawing 1D functions. | |
| void | SetNumberOfSamples2d (const unsigned int nx, const unsigned int ny) |
| Set the number of points used for drawing 2D functions. | |
| void | PlotContour (const std::string &option="v") |
| void | PlotSurface (const std::string &option="v") |
| void | Plot (const std::string &option="v", const std::string &drawopt="arr") |
| void | PlotProfile (const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, const std::string &option="v") |
| void | PlotContourWeightingField (const std::string &label, const std::string &option) |
| void | PlotSurfaceWeightingField (const std::string &label, const std::string &option) |
| void | PlotWeightingField (const std::string &label, const std::string &option, const std::string &drawopt) |
| void | PlotProfileWeightingField (const std::string &label, const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, const std::string &option="v") |
| void | EnableAutoRange (const bool on=true) |
| void | EnableAcknowledgeStatus (const double v0=0.) |
| void | DisableAcknowledgeStatus () |
| Ignore the status flag returned by the sensor/component. | |
Public Member Functions inherited from Garfield::ViewBase | |
| ViewBase ()=delete | |
| Default constructor. | |
| ViewBase (const std::string &name) | |
| Constructor. | |
| virtual | ~ViewBase () |
| Destructor. | |
| void | SetCanvas (TCanvas *c) |
| Set the canvas to be painted on. | |
| TCanvas * | GetCanvas () |
| Retrieve the canvas. | |
| void | EnableDebugging (const bool on=true) |
| Switch on/off debugging output. | |
Protected Member Functions | |
| double | Evaluate2D (double *pos, double *par) |
| double | EvaluateProfile (double *pos, double *par) |
Protected Member Functions inherited from Garfield::ViewBase | |
| std::string | FindUnusedFunctionName (const std::string &s) const |
| std::string | FindUnusedHistogramName (const std::string &s) const |
Friends | |
| class | TF1 |
| class | TF2 |
Additional Inherited Members | |
Protected Attributes inherited from Garfield::ViewBase | |
| std::string | m_className = "ViewBase" |
| bool | m_debug = false |
| TCanvas * | m_canvas = nullptr |
| bool | m_hasExternalCanvas = false |
| double | m_proj [3][3] |
Visualize the potential or electric field of a component or sensor.
Definition at line 16 of file ViewField.hh.
| Garfield::ViewField::ViewField | ( | ) |
Constructor.
Definition at line 47 of file ViewField.cc.
| Garfield::ViewField::~ViewField | ( | ) |
Destructor.
Definition at line 51 of file ViewField.cc.
|
inline |
Ignore the status flag returned by the sensor/component.
Definition at line 131 of file ViewField.hh.
|
inline |
Make use of the status flag returned by the sensor/component.
| v0 | Value to be used for regions with status != 0. |
Definition at line 126 of file ViewField.hh.
|
inline |
Definition at line 121 of file ViewField.hh.
|
protected |
Definition at line 236 of file ViewField.cc.
|
protected |
Definition at line 308 of file ViewField.cc.
| void Garfield::ViewField::Plot | ( | const std::string & | option = "v", |
| const std::string & | drawopt = "arr" |
||
| ) |
Make a 2D plot of the electric potential or field.
| option | quantity to be plotted (see PlotContour) |
| drawopt | option string passed to TF2::Draw |
Definition at line 163 of file ViewField.cc.
Referenced by PlotSurface().
| void Garfield::ViewField::PlotContour | ( | const std::string & | option = "v" | ) |
Make a contour plot of the electric potential or field.
| option | quantity to be plotted
|
Definition at line 155 of file ViewField.cc.
Referenced by main().
| void Garfield::ViewField::PlotContourWeightingField | ( | const std::string & | label, |
| const std::string & | option | ||
| ) |
Make a contour plot of the weighting potential or field.
| label | identifier of the electrode |
| option | quantity to be plotted (see PlotContour) |
Definition at line 191 of file ViewField.cc.
| void Garfield::ViewField::PlotProfile | ( | const double | x0, |
| const double | y0, | ||
| const double | z0, | ||
| const double | x1, | ||
| const double | y1, | ||
| const double | z1, | ||
| const std::string & | option = "v" |
||
| ) |
Make a 1D plot of the electric potential or field along a line.
| x0,y0,z0 | starting point |
| x1,y1,z1 | end point |
| option | quantity to be plotted (see PlotContour) |
Definition at line 171 of file ViewField.cc.
| void Garfield::ViewField::PlotProfileWeightingField | ( | const std::string & | label, |
| const double | x0, | ||
| const double | y0, | ||
| const double | z0, | ||
| const double | x1, | ||
| const double | y1, | ||
| const double | z1, | ||
| const std::string & | option = "v" |
||
| ) |
Make a 1D plot of the weighting potential or field along a line.
| label | identifier of the electrode |
| x0,y0,z0 | starting point |
| x1,y1,z1 | end point |
| option | quantity to be plotted (see PlotContour) |
Definition at line 201 of file ViewField.cc.
|
inline |
Make a surface plot ("SURF4") of the electric potential or field.
| option | quantity to be plotted (see PlotContour) |
Definition at line 71 of file ViewField.hh.
|
inline |
Make a surface plot ("SURF4") of the weighting potential or field.
| label | identifier of the electrode |
| option | quantity to be plotted (see PlotContour) |
Definition at line 97 of file ViewField.hh.
| void Garfield::ViewField::PlotWeightingField | ( | const std::string & | label, |
| const std::string & | option, | ||
| const std::string & | drawopt | ||
| ) |
Make a 2D plot of the weighting potential or field.
| label | identifier of the electrode |
| option | quantity to be plotted (see PlotContour) |
| drawopt | option string passed to TF2::Draw |
Definition at line 180 of file ViewField.cc.
Referenced by PlotSurfaceWeightingField().
| void Garfield::ViewField::Rotate | ( | const double | angle | ) |
Rotate the viewing plane (angle in radian).
Definition at line 653 of file ViewField.cc.
|
inline |
Set the viewing area based on the bounding box of the sensor/component.
Definition at line 39 of file ViewField.hh.
| void Garfield::ViewField::SetArea | ( | const double | xmin, |
| const double | ymin, | ||
| const double | xmax, | ||
| const double | ymax | ||
| ) |
Set the viewing area (in local coordinates of the current viewing plane).
Definition at line 78 of file ViewField.cc.
Referenced by main().
| void Garfield::ViewField::SetComponent | ( | ComponentBase * | c | ) |
Set the component from which to retrieve the field.
Definition at line 68 of file ViewField.cc.
| void Garfield::ViewField::SetDefaultProjection | ( | ) |
Set the default viewing plane (
-
at
).
Definition at line 214 of file ViewField.cc.
Referenced by ViewField().
| void Garfield::ViewField::SetElectricFieldRange | ( | const double | emin, |
| const double | emax | ||
| ) |
Set the plot limits for the electric field.
Definition at line 100 of file ViewField.cc.
| void Garfield::ViewField::SetNumberOfContours | ( | const unsigned int | n | ) |
Set the number of contour levels (at most 50).
Definition at line 112 of file ViewField.cc.
Referenced by main().
| void Garfield::ViewField::SetNumberOfSamples1d | ( | const unsigned int | n | ) |
Set the number of points used for drawing 1D functions.
Definition at line 121 of file ViewField.cc.
| void Garfield::ViewField::SetNumberOfSamples2d | ( | const unsigned int | nx, |
| const unsigned int | ny | ||
| ) |
Set the number of points used for drawing 2D functions.
Definition at line 134 of file ViewField.cc.
Referenced by main().
| void Garfield::ViewField::SetPlane | ( | const double | fx, |
| const double | fy, | ||
| const double | fz, | ||
| const double | x0, | ||
| const double | y0, | ||
| const double | z0 | ||
| ) |
Set the projection (viewing plane).
| fx,fy,fz | normal vector |
| x0,y0,z0 | in-plane point |
Definition at line 612 of file ViewField.cc.
Referenced by main().
| void Garfield::ViewField::SetSensor | ( | Sensor * | s | ) |
Set the sensor from which to retrieve the field.
Definition at line 58 of file ViewField.cc.
Referenced by main().
| void Garfield::ViewField::SetVoltageRange | ( | const double | vmin, |
| const double | vmax | ||
| ) |
Set the plot limits for the potential.
Definition at line 94 of file ViewField.cc.
| void Garfield::ViewField::SetWeightingFieldRange | ( | const double | wmin, |
| const double | wmax | ||
| ) |
Set the plot limits for the weighting field.
Definition at line 106 of file ViewField.cc.
|
friend |
Definition at line 133 of file ViewField.hh.
|
friend |
Definition at line 134 of file ViewField.hh.