8#include <top/dbobjects/TOPPulseHeightPar.h>
21 if (x <= 0 or
x0 == 0)
return 0;
23 double f = std::pow(xx,
p1) * std::exp(-std::pow(xx,
p2));
29 return p2 / std::tgamma((
p1 + 1) /
p2) /
x0;
34 return std::tgamma((
p1 + 2) /
p2) / std::tgamma((
p1 + 1) /
p2) *
x0;
39 double x2 = std::tgamma((
p1 + 3) /
p2) / std::tgamma((
p1 + 1) /
p2) *
x0 *
x0;
41 return std::sqrt(x2 - x * x);
46 return std::pow(
p1 /
p2, 1 /
p2) *
x0;
51 if (
x0 == 0)
return 0;
53 double dx = (threshold + rmsNoise) / n;
55 for (
int i = 1; i <= n; i++) {
double getThresholdEffi(double threshold, double rmsNoise, int n=100) const
Returns threshold efficiency.
double getMean() const
Returns distribution mean.
double getPeakPosition() const
Returns the position of distribution maximum.
double getNorm() const
Returns normalization constant.
double getValue(double x) const
Returns a value of non-normalized pulse height distribution at x Multiply with getNorm() to get norma...
double getRMS() const
Returns distribution standard deviation.
Abstract base class for different kinds of events.
float p1
distribution parameter p1
float x0
distribution parameter x0 [ADC counts]
float p2
distribution parameter p2