42 static const double erflim = 5.0;
57 m(
"m",
"Dependent", this, _m),
58 m0(
"m0",
"M0", this, _m0),
59 sigma(
"sigma",
"Sigma", this, _sigma),
60 alpha(
"alpha",
"Alpha", this, _alpha),
61 n(
"n",
"Order", this, _n)
68 RooAbsPdf(other,
name),
m(
"m", this, other.
m), m0(
"m0", this, other.m0),
69 sigma(
"sigma", this, other.
sigma), alpha(
"alpha", this, other.alpha),
78 if (
alpha < 0) t = -t;
87 double b=
n/absAlpha - absAlpha;
116 static const double sqrtPiOver2 = 1.2533141373;
117 static const double sqrt2 = 1.4142135624;
123 if(
fabs(
n-1.0) < 1.0e-05 )
128 double tmin = (
m.
min(rangeName)-
m0)/sig;
129 double tmax = (
m.
max(rangeName)-
m0)/sig;
139 if( tmin >= -absAlpha ) {
143 else if( tmax <= -absAlpha ) {
145 double b =
n/absAlpha - absAlpha;
157 double b =
n/absAlpha - absAlpha;
161 term1 =
a*sig*(
log(
b-tmin) -
log(
n/absAlpha));
168 double term2 = sig*sqrtPiOver2*(
ApproxErf(tmax/sqrt2)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
bool matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
RooArgSet is a container object that can hold multiple RooAbsArg objects.
virtual void compute(cudaStream_t *, Computer, RestrictArr, size_t, const VarVector &, const ArgVector &={})=0
PDF implementing the Crystal Ball line shape.
double ApproxErf(double arg) const
double analyticalIntegral(Int_t code, const char *rangeName=0) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
void computeBatch(cudaStream_t *, double *output, size_t nEvents, RooFit::Detail::DataMap const &) const override
Compute multiple values of Crystal ball Shape distribution.
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Int_t getMaxVal(const RooArgSet &vars) const override
Advertise that we know the maximum of self for given (m0,alpha,n,sigma)
double maxVal(Int_t code) const override
Return maximum value for set of observables identified by code assigned in getMaxVal.
auto & at(RooAbsArg const *arg, RooAbsArg const *=nullptr)
static std::complex< double > erf(const std::complex< double > z)
complex erf function
double min(const char *rname=0) const
Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
double max(const char *rname=0) const
Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
RVec< PromoteType< T > > log(const RVec< T > &v)
RVec< PromoteType< T > > exp(const RVec< T > &v)
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
R__EXTERN RooBatchComputeInterface * dispatchCUDA
R__EXTERN RooBatchComputeInterface * dispatchCPU
This dispatch pointer points to an implementation of the compute library, provided one has been loade...
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.