49 static const double erflim = 5.0;
66 m(
"m",
"Dependent", this, _m),
67 m0(
"m0",
"M0", this, _m0),
68 sigma(
"sigma",
"Sigma", this, _sigma),
69 alpha(
"alpha",
"Alpha", this, _alpha),
70 n(
"n",
"Order", this, _n)
78 RooAbsPdf(other, name),
m(
"m", this, other.
m), m0(
"m0", this, other.m0),
79 sigma(
"sigma", this, other.sigma), alpha(
"alpha", this, other.alpha),
89 if (
alpha < 0) t = -t;
121 static const double sqrtPiOver2 = 1.2533141373;
122 static const double sqrt2 = 1.4142135624;
128 if(
fabs(
n-1.0) < 1.0e-05 )
133 double tmin = (
m.
min(rangeName)-
m0)/sig;
134 double tmax = (
m.
max(rangeName)-
m0)/sig;
144 if( tmin >= -absAlpha ) {
145 result += sig*sqrtPiOver2*(
ApproxErf(tmax/sqrt2)
148 else if( tmax <= -absAlpha ) {
150 double b =
n/absAlpha - absAlpha;
153 result += a*sig*(
log(b-tmin) -
log(b-tmax) );
162 double b =
n/absAlpha - absAlpha;
166 term1 = a*sig*(
log(b-tmin) -
log(
n/absAlpha));
173 double term2 = sig*sqrtPiOver2*(
ApproxErf(tmax/sqrt2)
177 result += term1 + term2;
virtual Int_t getMaxVal(const RooArgSet &vars) const
Advertise that we know the maximum of self for given (m0,alpha,n,sigma)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
virtual Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral. ...
Double_t evaluate() const
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
virtual Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
static RooMathCoreReg dummy
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Double_t min(const char *rname=0) const
static std::complex< double > erf(const std::complex< double > z)
complex erf function
Bool_t matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
Double_t max(const char *rname=0) const
Double_t ApproxErf(Double_t arg) const