52 x(
"x",
"Observable",this,_x),
53 m0(
"m0",
"m0",this,_m0),
59 if (par && par->getMin()<=1 && par->getMax()>=1 ) {
60 oocoutE(
this,
InputArguments) <<
"The parameter '" << par->GetName() <<
"' with range [" << par->getMin(
"") <<
", "
61 << par->getMax() <<
"] of the " << this->IsA()->GetName() <<
" '" << this->
GetName()
62 <<
"' can reach the unsafe value 1.0 " <<
". Advise to limit its range." << std::endl;
94template<
class Tx,
class Tm0,
class Tk>
95void compute(
size_t batchSize,
96 double * __restrict
output,
100 for (
size_t i=0; i<batchSize; i++) {
103 if (lnk<0) lnk = -lnk;
104 double arg = lnxOverM0/lnk;
116 const bool batchX = !xData.empty();
117 const bool batchM0 = !m0Data.empty();
118 const bool batchK = !kData.empty();
120 if (!batchX && !batchM0 && !batchK) {
123 batchSize =
findSize({ xData, m0Data, kData });
126 if (batchX && !batchM0 && !batchK ) {
129 else if (!batchX && batchM0 && !batchK ) {
132 else if (batchX && batchM0 && !batchK ) {
135 else if (!batchX && !batchM0 && batchK ) {
138 else if (batchX && !batchM0 && batchK ) {
141 else if (!batchX && batchM0 && batchK ) {
144 else if (batchX && batchM0 && batchK ) {
145 compute(batchSize,
output.data(), xData, m0Data, kData);
177 if (
matchArgs(directVars,generateVars,
x))
return 1 ;
190 if (xgen<=
x.
max() && xgen>=
x.
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.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Bool_t matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
BatchHelpers::BatchData _batchData
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const
Load generatedVars with the subset of directVars that we can generate events for, and return a code t...
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
Double_t evaluate() const
ln(k)<1 would correspond to sigma < 0 in the parameterization resulting by transforming a normal rand...
RooSpan< double > evaluateBatch(std::size_t begin, std::size_t batchSize) const
Evaluate function for a batch of input data points.
void generateEvent(Int_t code)
Interface for generation of an event using the algorithm corresponding to the specified code.
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
static std::complex< double > erf(const std::complex< double > z)
complex erf function
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
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
Double_t max(const char *rname=0) const
Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
virtual const char * GetName() const
Returns name of object.
double lognormal_pdf(double x, double m, double s, double x0=0)
Probability density function of the lognormal distribution.
size_t findSize(std::vector< RooSpan< const double > > parameters)
This function returns the minimum size of the non-zero-sized batches.
static const uint32_t K[64]
Double_t Gaus(Double_t x, Double_t mean, Double_t sigma)
Gauss.
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.
static void output(int code)