Garfield++ v2r0
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>
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 | SetCanvas (TCanvas *c) |
Set the canvas to be painted on. | |
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. | |
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) |
Friends | |
class | TF1 |
class | TF2 |
Visualize the potential or electric field of a component or sensor.
Definition at line 15 of file ViewField.hh.
Garfield::ViewField::ViewField | ( | ) |
Constructor.
Definition at line 52 of file ViewField.cc.
Garfield::ViewField::~ViewField | ( | ) |
Destructor.
Definition at line 87 of file ViewField.cc.
|
inline |
Ignore the status flag returned by the sensor/component.
Definition at line 133 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 128 of file ViewField.hh.
|
inline |
Definition at line 123 of file ViewField.hh.
|
inline |
|
protected |
Definition at line 314 of file ViewField.cc.
|
protected |
Definition at line 387 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 222 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 213 of file ViewField.cc.
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 254 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 |
quantity | to be plotted (see PlotContour) |
Definition at line 231 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 |
quantity | to be plotted (see PlotContour) |
Definition at line 265 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 73 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 99 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 242 of file ViewField.cc.
Referenced by PlotSurfaceWeightingField().
void Garfield::ViewField::Rotate | ( | const double | angle | ) |
Rotate the viewing plane (angle in radian).
Definition at line 736 of file ViewField.cc.
|
inline |
Set the viewing area based on the bounding box of the sensor/component.
Definition at line 41 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 129 of file ViewField.cc.
void Garfield::ViewField::SetCanvas | ( | TCanvas * | c | ) |
Set the canvas to be painted on.
Definition at line 118 of file ViewField.cc.
void Garfield::ViewField::SetComponent | ( | ComponentBase * | c | ) |
Set the component from which to retrieve the field.
Definition at line 107 of file ViewField.cc.
void Garfield::ViewField::SetDefaultProjection | ( | ) |
Set the default viewing plane ( - at ).
Definition at line 291 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 153 of file ViewField.cc.
void Garfield::ViewField::SetNumberOfContours | ( | const unsigned int | n | ) |
Set the number of contour levels (at most 50).
Definition at line 167 of file ViewField.cc.
void Garfield::ViewField::SetNumberOfSamples1d | ( | const unsigned int | n | ) |
Set the number of points used for drawing 1D functions.
Definition at line 177 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 191 of file ViewField.cc.
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 694 of file ViewField.cc.
void Garfield::ViewField::SetSensor | ( | Sensor * | s | ) |
Set the sensor from which to retrieve the field.
Definition at line 96 of file ViewField.cc.
void Garfield::ViewField::SetVoltageRange | ( | const double | vmin, |
const double | vmax | ||
) |
Set the plot limits for the potential.
Definition at line 146 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 160 of file ViewField.cc.
|
friend |
Definition at line 138 of file ViewField.hh.
|
friend |
Definition at line 139 of file ViewField.hh.