49 _x(
"x",
"Dependent", this,
x),
50 _coefList(
"coefficients",
"List of coefficients",this)
52 for (
const auto coef : coefList) {
54 coutE(InputArguments) <<
"RooChebychev::ctor(" <<
GetName() <<
55 ") ERROR: coefficient " << coef->
GetName() <<
56 " is not of type RooAbsReal" << std::endl ;
57 throw std::invalid_argument(
"Wrong input arguments for RooChebychev");
67 _x(
"x", this, other._x),
68 _coefList(
"coefList",this,other._coefList),
69 _refRangeName(other._refRangeName)
95 std::vector<double> coeffs;
138 assert(1 == code); (void)code;
141 double xmaxFull =
_x.
max(rangeName);
143 double xminFull =
_x.
min(rangeName);
146 std::vector<double> coeffs;
157 double xmaxFull =
_x.
max(rangeName);
159 double xminFull =
_x.
min(rangeName);
162 return ctx.
buildCall(
"RooFit::Detail::AnalyticalIntegrals::chebychevIntegral",
_coefList, sz,
xmin,
xmax, xminFull, xmaxFull);
Storage_t::size_type size() const
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value and implements functionality common to al...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
bool matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Chebychev polynomial p.d.f.
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
std::string buildCallToAnalyticIntegral(Int_t code, const char *rangeName, RooFit::Detail::CodeSquashContext &ctx) const override
This function defines the analytical integral translation for the class.
void selectNormalizationRange(const char *rangeName=nullptr, bool force=false) override
Interface function to force use of a given normalization range to interpret function value.
void translate(RooFit::Detail::CodeSquashContext &ctx) const override
This function defines a translation for each RooAbsReal based object that can be used to express the ...
void computeBatch(double *output, size_t nEvents, RooFit::Detail::DataMap const &) const override
Compute multiple values of Chebychev.
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
bool add(const RooAbsArg &var, bool valueServer, bool shapeServer, bool silent)
Overloaded RooCollection_t::add() method insert object into set and registers object as server to own...
A class to maintain the context for squashing of RooFit models into code.
std::string buildCall(std::string const &funcname, Args_t const &...args)
Build the code to call the function with name funcname, passing some arguments.
void addResult(RooAbsArg const *key, std::string const &value)
A function to save an expression that includes/depends on the result of the input node.
RooBatchCompute::Config config(RooAbsArg const *arg) const
const TNamed * constPtr(const char *stringPtr)
Return a unique TNamed pointer for given C++ string.
static RooNameReg & instance()
Return reference to singleton instance.
double max(const char *rname=nullptr) const
Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
double min(const char *rname=nullptr) const
Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
std::vector< double > ArgVector
void compute(Config cfg, Computer comp, RestrictArr output, size_t size, const VarVector &vars, ArgVector &extraArgs)
double chebychevIntegral(double const *coeffs, unsigned int nCoeffs, double xMin, double xMax, double xMinFull, double xMaxFull)
double chebychevEvaluate(double *coeffs, unsigned int nCoeffs, double x_in, double xMin, double xMax)