54#ifdef ROOFIT_LEGACY_EVAL_BACKEND
62using std::ostream, std::istream, std::list;
79 _actualVars(
"actualVars",
"Variables used by formula expression",this),
107 _actualVars(
"actualVars",this,other._actualVars),
108 _formExpr(other._formExpr)
169 os <<
"formula=\"" <<
_formExpr <<
"\" " ;
180 coutE(InputArguments) <<
"RooFormulaVar::readFromStream(" <<
GetName() <<
"): can't read" << std::endl ;
192 std::cout <<
getVal() << std::endl ;
250 auto func =
static_cast<const RooAbsReal*
>(par);
251 list<double>* binb =
nullptr;
253 if (func && (binb = func->binBoundaries(obs,xlo,xhi)) ) {
273 auto func =
dynamic_cast<const RooAbsReal*
>(par);
274 list<double>* hint =
nullptr;
276 if (func && (hint = func->plotSamplingHint(obs,xlo,xhi)) ) {
300#ifdef ROOFIT_LEGACY_EVAL_BACKEND
302 if (
dynamic_cast<RooNLLVar*
>(arg)) {
305 if (
dynamic_cast<RooChi2Var*
>(arg)) {
311 if (nllArg && !chi2Arg) {
312 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName()
313 <<
") Formula contains a RooNLLVar, using its error level" << std::endl ;
315 }
else if (chi2Arg && !nllArg) {
316 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName()
317 <<
") Formula contains a RooChi2Var, using its error level" << std::endl ;
319 }
else if (!nllArg && !chi2Arg) {
320 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName() <<
") WARNING: "
321 <<
"Formula contains neither RooNLLVar nor RooChi2Var server, using default level of 1.0" << std::endl ;
323 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName() <<
") WARNING: "
324 <<
"Formula contains BOTH RooNLLVar and RooChi2Var server, using default level of 1.0" << std::endl ;
332 return evaluator().getTFormula()->GetUniqueFuncName().Data();
335std::unique_ptr<RooAbsArg>
348 auto newArg = std::unique_ptr<RooAbsArg>{
static_cast<RooAbsArg *
>(
Clone())};
static void indent(ostringstream &buf, int indent_level)
Common abstract base class for objects that represent a value and a "shape" in RooFit.
RooFit::OwningPtr< RooArgSet > getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
TObject * Clone(const char *newname=nullptr) const override
Make a clone of an object using the Streamer facility.
Abstract base class for RooRealVar binning definitions.
Int_t index(const RooAbsArg *arg) const
Returns index of given arg, or -1 if arg is not in the collection.
const RooArgSet * nset() const
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
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.
virtual double defaultErrorLevel() const
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Structure printing.
double _value
Cache for current value of object.
double traceEval(const RooArgSet *set) const
Calculate current value of object, with error tracing wrapper.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
void markAsCompiled(RooAbsArg &arg) const
void compileServers(RooAbsArg &arg, RooArgSet const &normSet)
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
const char * Data() const