73 bool checkVariables) :
75 _actualVars(
"actualVars",
"Variables used by formula expression",this),
97 bool checkVariables) :
99 _actualVars(
"actualVars",
"Variables used by formula expression",this),
119 _actualVars(
"actualVars",this,other._actualVars),
120 _formExpr(other._formExpr)
137 const_cast<std::unique_ptr<RooFormula>&
>(this->
_formula).reset(theFormula);
161 std::cerr <<
"Formula " <<
GetName() <<
" " <<
GetTitle() <<
"\n\tBeing evaluated with normSet " << normSet <<
"\n";
163 std::cerr <<
"\tHowever, _lastNSet = " <<
_lastNSet <<
"\n";
166 throw std::logic_error(
"Got conflicting norm sets. This shouldn't happen.");
206 os <<
"formula=\"" <<
_formExpr <<
"\" " ;
217 coutE(InputArguments) <<
"RooFormulaVar::readFromStream(" <<
GetName() <<
"): can't read" << endl ;
229 cout <<
getVal() << endl ;
243 auto func =
static_cast<const RooAbsReal*
>(par);
244 list<Double_t>* binb =
nullptr;
246 if (func && (binb = func->binBoundaries(obs,xlo,xhi)) ) {
262 auto func =
dynamic_cast<const RooAbsReal*
>(par);
263 list<Double_t>* hint =
nullptr;
265 if (func && (hint = func->plotSamplingHint(obs,xlo,xhi)) ) {
298 if (nllArg && !chi2Arg) {
299 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName()
300 <<
") Formula contains a RooNLLVar, using its error level" << endl ;
302 }
else if (chi2Arg && !nllArg) {
303 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName()
304 <<
") Formula contains a RooChi2Var, using its error level" << endl ;
306 }
else if (!nllArg && !chi2Arg) {
307 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName() <<
") WARNING: "
308 <<
"Formula contains neither RooNLLVar nor RooChi2Var server, using default level of 1.0" << endl ;
310 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName() <<
") WARNING: "
311 <<
"Formula contains BOTH RooNLLVar and RooChi2Var server, using default level of 1.0" << endl ;
static void indent(ostringstream &buf, int indent_level)
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
const RooArgSet * nset() const
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...
virtual Double_t defaultErrorLevel() const
Double_t traceEval(const RooArgSet *set) const
Calculate current value of object, with error tracing wrapper.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooChi2Var implements a simple calculation from a binned dataset and a PDF.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Reimplementation of standard RooArgList::add()
Class RooNLLVar implements a -log(likelihood) calculation from a dataset and a PDF.
A simple container to hold a batch of data values.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
This struct enables passing computation data around between elements of a computation graph.