45 static const double erflim = 5.0;
60 m(
"m",
"Dependent", this, _m),
61 m0(
"m0",
"M0", this, _m0),
62 sigma(
"sigma",
"Sigma", this, _sigma),
63 alpha(
"alpha",
"Alpha", this, _alpha),
64 n(
"n",
"Order", this, _n)
71 RooAbsPdf(other, name),
m(
"m", this, other.
m),
m0(
"m0", this, other.
m0),
81 if (
alpha < 0) t = -t;
110 static const double sqrtPiOver2 = 1.2533141373;
111 static const double sqrt2 = 1.4142135624;
117 if(
fabs(
n-1.0) < 1.0
e-05 )
122 double tmin = (
m.
min(rangeName)-
m0)/sig;
123 double tmax = (
m.
max(rangeName)-
m0)/sig;
133 if( tmin >= -absAlpha ) {
134 result += sig*sqrtPiOver2*(
ApproxErf(tmax/sqrt2)
137 else if( tmax <= -absAlpha ) {
139 double b =
n/absAlpha - absAlpha;
142 result += a*sig*(
log(b-tmin) -
log(b-tmax) );
151 double b =
n/absAlpha - absAlpha;
155 term1 = a*sig*(
log(b-tmin) -
log(
n/absAlpha));
162 double term2 = sig*sqrtPiOver2*(
ApproxErf(tmax/sqrt2)
166 result += term1 + term2;
Double_t evaluate() const
Bool_t matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
virtual Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral. ...
P.d.f implementing the Crystal Ball line shape.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
virtual Int_t getMaxVal(const RooArgSet &vars) const
Advertise that we know the maximum of self for given (m0,alpha,n,sigma)
virtual Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported...
Double_t ApproxErf(Double_t arg) const
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
Double_t min(const char *rname=0) const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
static RooMathCoreReg dummy
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Double_t max(const char *rname=0) const
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
static std::complex< double > erf(const std::complex< double > z)
complex erf function