9#include <top/modules/TOPDigitizer/PulseHeightGenerator.h>
10#include <framework/logging/Logger.h>
27 m_x0(x0), m_p1(p1), m_p2(p2), m_xmax(xmax)
30 B2FATAL(
"TOP::PulseHeightGenerator: parameter x0 must be positive");
32 B2FATAL(
"TOP::PulseHeightGenerator: parameter p1 must be non-negative");
34 B2FATAL(
"TOP::PulseHeightGenerator: parameter p2 must be positive");
36 double xPeak = pow((p1 / p2), 1 / p2) * x0;
47 double x = gRandom->Uniform(
m_xmax);
double getValue(double x) const
Returns distribution value at x.
PulseHeightGenerator()
Default constructor.
double m_xmax
upper bound of range [ADC counts]
double generate() const
Returns generated pulse height.
Abstract base class for different kinds of events.