56#ifdef ROOFIT_LEGACY_EVAL_BACKEND
61using std::cout,std::endl, std::ostream, std::istream, std::list;
80 bool checkVariables) :
82 _actualVars(
"actualVars",
"Variables used by formula expression",this),
86 _value = traceEval(nullptr);
88 _formula = new RooFormula(GetName(), _formExpr, dependents, checkVariables);
89 _formExpr = _formula->formulaString().c_str();
90 _actualVars.add(_formula->actualDependents());
103 bool checkVariables) :
105 _actualVars(
"actualVars",
"Variables used by formula expression",this),
109 _value = traceEval(nullptr);
111 _formula = new RooFormula(GetName(), _formExpr, dependents, checkVariables);
112 _formExpr = _formula->formulaString().c_str();
113 _actualVars.add(_formula->actualDependents());
128 _formula = new RooFormula(*other._formula);
129 _formExpr = _formula->formulaString().c_str();
203 os <<
"formula=\"" <<
_formExpr <<
"\" " ;
214 coutE(InputArguments) <<
"RooFormulaVar::readFromStream(" <<
GetName() <<
"): can't read" << endl ;
226 cout <<
getVal() << endl ;
240 auto func =
static_cast<const RooAbsReal*
>(par);
241 list<double>* binb =
nullptr;
243 if (func && (binb = func->binBoundaries(obs,xlo,xhi)) ) {
259 auto func =
dynamic_cast<const RooAbsReal*
>(par);
260 list<double>* hint =
nullptr;
262 if (func && (hint = func->plotSamplingHint(obs,xlo,xhi)) ) {
286#ifdef ROOFIT_LEGACY_EVAL_BACKEND
297 if (nllArg && !chi2Arg) {
298 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName()
299 <<
") Formula contains a RooNLLVar, using its error level" << endl ;
301 }
else if (chi2Arg && !nllArg) {
302 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName()
303 <<
") Formula contains a RooChi2Var, using its error level" << endl ;
305 }
else if (!nllArg && !chi2Arg) {
306 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName() <<
") WARNING: "
307 <<
"Formula contains neither RooNLLVar nor RooChi2Var server, using default level of 1.0" << endl ;
309 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName() <<
") WARNING: "
310 <<
"Formula contains BOTH RooNLLVar and RooChi2Var server, using default level of 1.0" << endl ;
true
Register systematic variations for multiple existing columns using auto-generated tags.
static void indent(ostringstream &buf, int indent_level)
friend class RooAbsCollection
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooAbsReal()
coverity[UNINIT_CTOR] Default constructor
virtual double defaultErrorLevel() const
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Structure printing.
bool redirectServersHook(const RooAbsCollection &newServerList, bool mustReplaceAll, bool nameChange, bool isRecursiveStep) override
Function that is called at the end of redirectServers().
RooArgList is a container object that can hold multiple RooAbsArg objects.
Simple calculation from a binned dataset and a PDF.
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.
Implements a -log(likelihood) calculation from a dataset and a PDF.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.