50 static const double erflim = 5.0;
67 m(
"m",
"Dependent", this, _m),
68 m0(
"m0",
"M0", this, _m0),
69 sigma(
"sigma",
"Sigma", this, _sigma),
70 alpha(
"alpha",
"Alpha", this, _alpha),
71 n(
"n",
"Order", this, _n)
79 RooAbsPdf(other, name),
m(
"m", this, other.
m),
m0(
"m0", this, other.
m0),
90 if (
alpha < 0) t = -t;
122 static const double sqrtPiOver2 = 1.2533141373;
123 static const double sqrt2 = 1.4142135624;
129 if(
fabs(
n-1.0) < 1.0
e-05 )
134 double tmin = (
m.
min(rangeName)-
m0)/sig;
135 double tmax = (
m.
max(rangeName)-
m0)/sig;
145 if( tmin >= -absAlpha ) {
146 result += sig*sqrtPiOver2*(
ApproxErf(tmax/sqrt2)
149 else if( tmax <= -absAlpha ) {
151 double b =
n/absAlpha - absAlpha;
154 result += a*sig*(
log(b-tmin) -
log(b-tmax) );
163 double b =
n/absAlpha - absAlpha;
167 term1 = a*sig*(
log(b-tmin) -
log(
n/absAlpha));
174 double term2 = sig*sqrtPiOver2*(
ApproxErf(tmax/sqrt2)
178 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 Crystall 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