Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
Plot the signal computed by a sensor as a ROOT histogram. More...
#include <ViewSignal.hh>
Public Member Functions | |
ViewSignal () | |
Constructor. | |
~ViewSignal ()=default | |
Destructor. | |
void | SetSensor (Sensor *s) |
Set the sensor from which to retrieve the signal. | |
void | PlotSignal (const std::string &label, const bool total=true, const bool electron=false, const bool ion=false, const bool delayed=false) |
TH1D * | GetHistogram (const char h='t') |
void | SetRangeX (const double xmin, const double xmax) |
Set the x-axis limits explicitly. | |
void | UnsetRangeX () |
Remove the user-defined x-axis limits. | |
void | SetRangeY (const double ymin, const double ymax) |
Set the y-axis limits explicitly. | |
void | UnsetRangeY () |
Remove the user-defined y-axis limits. | |
void | SetLabelY (const std::string &label) |
Override the default y-axis label. | |
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. | |
Additional Inherited Members | |
Protected Member Functions inherited from Garfield::ViewBase | |
std::string | FindUnusedFunctionName (const std::string &s) const |
std::string | FindUnusedHistogramName (const std::string &s) const |
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] |
Plot the signal computed by a sensor as a ROOT histogram.
Definition at line 18 of file ViewSignal.hh.
Garfield::ViewSignal::ViewSignal | ( | ) |
|
default |
Destructor.
|
inline |
Retrieve the histogram for the induced signal.
h | histogram to be returned ('t': total, 'e': electron-induced, 'i': ion/hole-induced). |
Definition at line 43 of file ViewSignal.hh.
void Garfield::ViewSignal::PlotSignal | ( | const std::string & | label, |
const bool | total = true , |
||
const bool | electron = false , |
||
const bool | ion = false , |
||
const bool | delayed = false |
||
) |
Plot the signal.
label | Identifier (weighting field) of the signal to be plotted. |
total | Flag whether to plot the total induced signal. |
electron | Flag whether to plot the electron-induced signal. |
ion | Flag whether to plot the ion/hole-induced signal. |
delayed | Flag whether to plot the delayed signal component. |
Definition at line 44 of file ViewSignal.cc.
Referenced by main().
|
inline |
Override the default y-axis label.
Definition at line 59 of file ViewSignal.hh.
void Garfield::ViewSignal::SetRangeX | ( | const double | xmin, |
const double | xmax | ||
) |
Set the x-axis limits explicitly.
Definition at line 22 of file ViewSignal.cc.
void Garfield::ViewSignal::SetRangeY | ( | const double | ymin, |
const double | ymax | ||
) |
Set the y-axis limits explicitly.
Definition at line 33 of file ViewSignal.cc.
void Garfield::ViewSignal::SetSensor | ( | Sensor * | s | ) |
Set the sensor from which to retrieve the signal.
Definition at line 14 of file ViewSignal.cc.
Referenced by main().
|
inline |
Remove the user-defined x-axis limits.
Definition at line 51 of file ViewSignal.hh.
|
inline |
Remove the user-defined y-axis limits.
Definition at line 56 of file ViewSignal.hh.