36RooEvaluatorWrapper::RooEvaluatorWrapper(
RooAbsReal &topNode, std::unique_ptr<RooFit::Evaluator> evaluator,
38 bool takeGlobalObservablesFromData)
39 :
RooAbsReal{
"RooEvaluatorWrapper",
"RooEvaluatorWrapper"},
40 _evaluator{std::move(evaluator)},
41 _topNode(
"topNode",
"top node", this, topNode),
42 _rangeName{rangeName},
44 _takeGlobalObservablesFromData{takeGlobalObservablesFromData}
48RooEvaluatorWrapper::RooEvaluatorWrapper(
const RooEvaluatorWrapper &other,
const char *
name)
50 _evaluator{other._evaluator},
51 _topNode(
"topNode", this, other._topNode),
53 _rangeName{other._rangeName},
54 _simPdf{other._simPdf},
55 _takeGlobalObservablesFromData{other._takeGlobalObservablesFromData}
59bool RooEvaluatorWrapper::getParameters(
const RooArgSet *observables,
RooArgSet &outputSet,
62 outputSet.
add(_evaluator->getParameters());
64 outputSet.
remove(*observables);
70 if (_takeGlobalObservablesFromData && _data->getGlobalObservables()) {
71 outputSet.
replace(*_data->getGlobalObservables());
79 std::stack<std::vector<double>>{}.swap(_vectorBuffers);
80 auto dataSpans = RooFit::BatchModeDataHelpers::getDataSpans(*_data, _rangeName, _simPdf,
true,
81 _takeGlobalObservablesFromData, _vectorBuffers);
82 for (
auto const &item : dataSpans) {
83 _evaluator->setInput(item.first->GetName(), item.second,
false);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
virtual bool remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false)
Remove the specified argument from our list.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
virtual bool replace(const RooAbsArg &var1, const RooAbsArg &var2)
Replace var1 with var2 and return true for success.
Abstract base class for binned and unbinned datasets.
Abstract base class for objects that represent a real value and implements functionality common to al...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.