48 dm(
"dm",
"Dstar-D0 Mass Diff",this, _dm),
49 dm0(
"dm0",
"Threshold",this, _dm0),
50 C(
"C",
"Shape Parameter",this, _c),
51 A(
"A",
"Shape Parameter 2",this, _a),
52 B(
"B",
"Shape Parameter 3",this, _b)
59 RooAbsPdf(other,
name), dm(
"dm",this,other.dm), dm0(
"dm0",this,other.dm0),
60 C(
"C",this,other.
C),
A(
"A",this,other.
A),
B(
"B",this,other.
B)
69 if (arg <= 0 )
return 0;
73 return (val > 0 ? val : 0) ;
79template<
class Tdm,
class Tdm0,
class TC,
class TA,
class TB>
80void compute(
size_t batchSize,
double * __restrict
output,
81 Tdm DM, Tdm0 DM0, TC
C, TA
A, TB
B)
83 for (
size_t i=0; i<batchSize; i++) {
84 const double ratio = DM[i] / DM0[i];
85 const double arg1 = (DM0[i]-DM[i]) /
C[i];
90 for (
size_t i=0; i<batchSize; i++) {
106 if (info.
nBatches==1 && !dmData.empty()) {
107 compute(info.
size,
output.data(), dmData.data(),
141 if (max <=
dm0 )
return 0;
142 else if (min <
dm0) min =
dm0;
145 if (
A != 0 ) doNumerical=
kTRUE;
154 if ( ! doNumerical ) {
156 B * (0.5* (max*max - min*min)/
dm0 - (max- min));
RooSpan< double > makeWritableBatchUnInit(std::size_t begin, std::size_t batchSize)
Make a batch and return a span pointing to the pdf-local memory.
Little adapter that gives a bracket operator to types that don't have one.
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
BatchHelpers::BatchData _batchData
RooAbsFunc * bindVars(const RooArgSet &vars, const RooArgSet *nset=0, Bool_t clipInvalid=kFALSE) 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_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
RooSpan< double > evaluateBatch(std::size_t begin, std::size_t batchSize) const
Evaluate function for a batch of input data points.
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
if (matchArgs(allVars,analVars,dm)) return 1 ;
Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
RooIntegrator1D implements an adaptive one-dimensional numerical integration algorithm.
virtual Double_t integral(const Double_t *yvec=0)
Calculate numeric integral at given set of function binding parameters.
A simple container to hold a batch of data values.
Double_t min(const char *rname=0) const
Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
RooSpan< const double > getValBatch(std::size_t begin, std::size_t batchSize) const
const T & arg() const
Return reference to object held in proxy.
Double_t max(const char *rname=0) const
Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
EvaluateInfo getInfo(std::vector< const RooRealProxy * > parameters, size_t begin, size_t batchSize)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
static void output(int code)