35 void PlotSignal(
const std::string& label,
const bool total =
true,
36 const bool electron =
false,
const bool ion =
false,
37 const bool delayed =
false);
44 return h ==
'e' ? m_hSignalElectrons.get()
45 : h ==
'i' ? m_hSignalIons.get() : m_hSignal.get();
49 void SetRangeX(
const double xmin,
const double xmax);
54 void SetRangeY(
const double ymin,
const double ymax);
59 void SetLabelY(
const std::string& label) { m_labelY = label; }
63 Sensor* m_sensor =
nullptr;
68 bool m_userRangeX =
false;
71 bool m_userRangeY =
false;
74 std::string m_labelY =
"";
77 std::unique_ptr<TH1D> m_hSignal;
78 std::unique_ptr<TH1D> m_hSignalElectrons;
79 std::unique_ptr<TH1D> m_hSignalIons;
80 std::unique_ptr<TH1D> m_hDelayedSignal;
81 std::unique_ptr<TH1D> m_hDelayedSignalElectrons;
82 std::unique_ptr<TH1D> m_hDelayedSignalIons;
85 std::unique_ptr<TGraph> m_gCrossings;
Base class for visualization classes.
Plot the signal computed by a sensor as a ROOT histogram.
void UnsetRangeY()
Remove the user-defined y-axis limits.
TH1D * GetHistogram(const char h='t')
~ViewSignal()=default
Destructor.
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.
void PlotSignal(const std::string &label, const bool total=true, const bool electron=false, const bool ion=false, const bool delayed=false)
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.