52 dm(
"dm",
"Dstar-D0 Mass Diff",this, _dm),
53 dm0(
"dm0",
"Threshold",this, _dm0),
54 C(
"C",
"Shape Parameter",this, _c),
55 A(
"A",
"Shape Parameter 2",this, _a),
56 B(
"B",
"Shape Parameter 3",this, _b)
63 RooAbsPdf(other,
name), dm(
"dm",this,other.dm), dm0(
"dm0",this,other.dm0),
64 C(
"C",this,other.C), A(
"A",this,other.A), B(
"B",this,other.B)
73 if (arg <= 0 )
return 0;
77 return (val > 0 ? val : 0) ;
85 {dataMap.at(dm), dataMap.at(dm0), dataMap.at(C), dataMap.at(A), dataMap.at(B)});
103 double min=
dm.
min(rangeName);
104 double max=
dm.
max(rangeName);
105 if (max <=
dm0 )
return 0;
106 else if (min <
dm0) min =
dm0;
108 bool doNumerical=
false;
109 if (
A != 0 ) doNumerical=
true;
116 if ( 1- exp(-(max-
dm0)/
C) +
B*(max/
dm0 -1) < 0) doNumerical=
true;
118 if ( ! doNumerical ) {
119 return (max-min)+
C* exp(
dm0/
C)* (exp(-max/
C)- exp(-min/
C)) +
120 B * (0.5* (max*max - min*min)/
dm0 - (max- min));
128 std::unique_ptr<RooAbsFunc> func{
bindVars(vset)};
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value and implements functionality common to al...
RooFit::OwningPtr< RooAbsFunc > bindVars(const RooArgSet &vars, const RooArgSet *nset=nullptr, bool clipInvalid=false) const
Create an interface adaptor f(vars) that binds us to the specified variables (in arbitrary order).
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Special p.d.f shape that can be used to model the background of D*-D0 mass difference distributions.
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
void computeBatch(double *output, size_t nEvents, RooFit::Detail::DataMap const &) const override
Compute multiple values of D*-D0 mass difference distribution.
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
if (matchArgs(allVars,analVars,dm)) return 1 ;
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
RooBatchCompute::Config config(RooAbsArg const *arg) const
RooRombergIntegrator implements an adaptive numerical integration algorithm.
double integral(const double *yvec=nullptr) override
double max(const char *rname=nullptr) const
Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
const T & arg() const
Return reference to object held in proxy.
double min(const char *rname=nullptr) const
Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
void compute(Config cfg, Computer comp, RestrictArr output, size_t size, const VarVector &vars, ArgVector &extraArgs)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.