3#include "CLHEP/GenericFunctions/defs.h"
4#include "CLHEP/GenericFunctions/PtRelFcn.hh"
5#include "CLHEP/GenericFunctions/Variable.hh"
11#if (defined __STRICT_ANSI__) || (defined _WIN32)
13#define M_PI 3.14159265358979323846
25 _p4("P4", 1.0, 0.1, 5.0),
53 if (p0<0.0) p0=FLT_MIN;
54 if (p0>1.0) p0=1.0-FLT_MIN;
56 if (x<=0.0)
return 1.0E-10;
59 double a = (1/p3)*std::pow(p2,-n);
61 double norm = 1.0/(a*exp(_logGamma(n)));
62 static const double s2 = sqrt(2.0);
64 norm*p0*std::pow(x,p1)*exp(-p2*std::pow(x,p3)) +
65 (2.0/(1+_erf(p5/p4/s2))*(1.0-p0)/(sqrt(2*M_PI)*p4))*exp(-(x-p5)*(x-p5)/(2.0*p4*p4));
69 return std::max(retVal,1.0E-10);
#define FUNCTION_OBJECT_IMP(classname)
virtual double getValue() const
virtual double operator()(double argument) const override