Belle II Software
release-08-01-10
|
Generates pulse height according to distribution: P(x) = (x/x0)^p1 * exp(-(x/x0)^p2), p1 >= 0, p2 > 0 in the range 0 to xmax. More...
#include <PulseHeightGenerator.h>
Public Member Functions | |
PulseHeightGenerator () | |
Default constructor. | |
PulseHeightGenerator (double x0, double p1, double p2, double xmax) | |
Constructor. More... | |
double | getValue (double x) const |
Returns distribution value at x. More... | |
double | generate () const |
Returns generated pulse height. More... | |
Private Attributes | |
double | m_x0 = 0 |
distribution parameter [ADC counts] | |
double | m_p1 = 0 |
distribution parameter, must be non-negative | |
double | m_p2 = 0 |
distribution parameter | |
double | m_xmax = 0 |
upper bound of range [ADC counts] | |
double | m_vPeak = 0 |
peak value | |
Generates pulse height according to distribution: P(x) = (x/x0)^p1 * exp(-(x/x0)^p2), p1 >= 0, p2 > 0 in the range 0 to xmax.
Definition at line 25 of file PulseHeightGenerator.h.
PulseHeightGenerator | ( | double | x0, |
double | p1, | ||
double | p2, | ||
double | xmax | ||
) |
Constructor.
x0 | distribution parameter [ADC counts] |
p1 | distribution parameter, must be non-negative |
p2 | distribution parameter |
xmax | upper bound of range in which to generate [ADC counts] |
Definition at line 25 of file PulseHeightGenerator.cc.
double generate | ( | ) | const |
Returns generated pulse height.
Definition at line 43 of file PulseHeightGenerator.cc.
|
inline |
Returns distribution value at x.
x | argument [ADC counts] |
Definition at line 49 of file PulseHeightGenerator.h.