49 void PlotSignal(
const std::string& label,
const std::string& optTotal =
"t",
50 const std::string& optPrompt =
"",
51 const std::string& optDelayed =
"",
const bool same =
false);
54 void SetRangeX(
const double xmin,
const double xmax);
59 void SetRangeY(
const double ymin,
const double ymax);
80 const short colElectrons = kYellow - 7,
81 const short colIons = kRed - 9) {
107 {kCyan + 2, kYellow - 7, kRed - 9, kGreen + 1, kYellow - 4, kRed - 9}};
109 std::array<short, 3>
m_colPrompt{{kAzure + 10, kRed - 4, kMagenta + 2}};
112 const std::string& ylabel);
ViewBase()=delete
Default constructor.
void UnsetRangeY()
Remove the user-defined y-axis limits.
ViewSignal()
Default constructor.
std::array< short, 3 > m_colPrompt
std::array< short, 6 > m_colDelayed
void SetColourTotal(const short col)
Set the (ROOT) colour with which to draw the total signal.
~ViewSignal()=default
Destructor.
void SetColourDelayed(const short colTotal, const short colElectrons=kYellow - 7, const short colIons=kRed - 9)
Set the (ROOT) colours with which to draw the delayed signal(s).
ViewSignal(Sensor *sensor)
Constructor.
void EnableLegend(const bool on=true)
Draw a legend on the plot or not.
void SetColourIons(const short col)
Set the (ROOT) colour with which to draw the hole/ion component.
void SetLabelY(const std::string &label)
Override the default y-axis label.
void SetSensor(Sensor *s)
Set the sensor from which to retrieve the signal.
TH1 * DrawHistogram(TH1D &h, const std::string &opt, const std::string &ylabel)
void SetColourHoles(const short col)
Set the (ROOT) colour with which to draw the hole/ion component.
void UnsetRangeX()
Remove the user-defined x-axis limits.
void SetRangeY(const double ymin, const double ymax)
Set the y-axis limits explicitly.
void SetRangeX(const double xmin, const double xmax)
Set the x-axis limits explicitly.
void SetColourElectrons(const short col)
Set the (ROOT) colour with which to draw the electron component.
void PlotSignal(const std::string &label, const std::string &optTotal="t", const std::string &optPrompt="", const std::string &optDelayed="", const bool same=false)
Plot the signal.