60 Xp(
"Xp",
"Xp",this,_Xp),
61 sigp(
"sigp",
"sigp",this,_sigp),
62 xi(
"xi",
"xi",this,_xi),
63 rho1(
"rho1",
"rho1",this,_rho1),
64 rho2(
"rho2",
"rho2",this,_rho2)
77 Xp(
"Xp",this,other.Xp),
78 sigp(
"sigp",this,other.sigp),
79 xi(
"xi",this,other.xi),
80 rho1(
"rho1",this,other.rho1),
81 rho2(
"rho2",this,other.rho2)
91 const double consts = 2*
sqrt(2*
log(2.0));
92 double r1=0,r2=0,r3=0,r4=0,r5=0,hp=0;
94 double fit_result = 0;
107 x1 =
Xp + (hp / 2) * (r1-1);
108 x2 =
Xp + (hp / 2) * (r1+1);
123 r2=-4*r3*(
x-
Xp)*(
x-
Xp)/hp/hp;
138 fit_result =
exp(r2);
149template<
class Tx,
class TXp,
class TSigp,
class Txi,
class Trho1,
class Trho2>
150void compute(
size_t batchSize,
151 double * __restrict
output,
152 Tx X, TXp XP, TSigp SP, Txi XI, Trho1
R1, Trho2
R2)
154 const double r3 =
log(2.0);
155 const double r6 =
exp(-6.0);
156 const double r7 = 2*
sqrt(2*
log(2.0));
158 for (
size_t i=0; i<batchSize; i++) {
159 const double r1 = XI[i]/
sqrt(XI[i]*XI[i]+1);
160 const double r4 =
sqrt(XI[i]*XI[i]+1);
161 const double hp = 1 / (SP[i]*r7);
162 const double x1 = XP[i] + 0.5*SP[i]*r7*(r1-1);
163 const double x2 = XP[i] + 0.5*SP[i]*r7*(r1+1);
166 if (XI[i]>r6 || XI[i]<-r6) r5 = XI[i]/
log(r4+XI[i]);
168 double factor=1,
y=X[i]-
x1, Yp=XP[i]-
x1, yi=r4-XI[i], rho=
R1[i];
177 output[i] = rho*
y*
y/Yp/Yp -r3 + factor*4*r3*
y*hp*r5*r4/yi/yi;
178 if (X[i]>=
x1 && X[i]<
x2) {
182 if (X[i]>=
x1 && X[i]<
x2 && XI[i]<r6 && XI[i]>-r6) {
183 output[i] = -4*r3*(X[i]-XP[i])*(X[i]-XP[i])*hp*hp;
186 for (
size_t i=0; i<batchSize; i++) {
203 if (info.
nBatches==1 && !xData.empty()) {
204 compute(info.
size,
output.data(), xData.data(),
static const double x2[5]
static const double x1[5]
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.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
BatchHelpers::BatchData _batchData
The RooBukinPdf implements the NovosibirskA function.
RooSpan< double > evaluateBatch(std::size_t begin, std::size_t batchSize) const
Evaluate function for a batch of input data points.
Double_t evaluate() const
Implementation.
A simple container to hold a batch of data values.
RooSpan< const double > getValBatch(std::size_t begin, std::size_t batchSize) const
EvaluateInfo getInfo(std::vector< const RooRealProxy * > parameters, size_t begin, size_t batchSize)
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
void checkRangeOfParameters(const RooAbsReal *callingClass, std::initializer_list< const RooAbsReal * > pars, double min=-std::numeric_limits< double >::max(), double max=std::numeric_limits< double >::max(), bool limitsInAllowedRange=false, std::string extraMessage="")
Check if the parameters have a range, and warn if the range extends below / above the set limits.
#define R1(v, w, x, y, z, i)
#define R2(v, w, x, y, z, i)
static void output(int code)