31 if (found !=
_map.end()) {
32 found->second.populate(ws);
58 for (
auto const &domain :
_map) {
78 if (found !=
_map.end()) {
79 auto const &elem = found->second;
88 if (!node.
has_child(
"type") || node[
"type"].
val() !=
"product_domain") {
91 for (
auto const &varNode : node[
"axes"].
children()) {
94 if (varNode.has_child(
"min")) {
95 elem.min = varNode[
"min"].val_double();
98 if (varNode.has_child(
"max")) {
99 elem.max = varNode[
"max"].val_double();
107 node[
"type"] <<
"product_domain";
109 auto &variablesNode = node[
"axes"];
111 for (
auto const &item :
_map) {
112 auto const &elem = item.second;
115 varnode[
"min"] << elem.min;
117 varnode[
"max"] << elem.max;
122 for (
auto const &item :
_map) {
123 const auto &
name = item.first;
125 const auto &elem = item.second;
virtual double getMax(const char *name=nullptr) const
Get maximum of currently defined range.
virtual double getMin(const char *name=nullptr) const
Get minimum of currently defined range.
virtual std::string val() const =0
virtual JSONNode & set_map()=0
virtual children_view children()
virtual bool has_child(std::string const &) const =0
std::map< std::string, ProductDomainElement > _map
void populate(RooWorkspace &ws) const
void readVariable(const char *name, double min, double max)
void writeJSON(RooFit::Detail::JSONNode &) const
void readJSON(RooFit::Detail::JSONNode const &)
void writeVariable(RooRealVar &) const
void populate(RooWorkspace &ws) const
std::map< std::string, ProductDomain > _map
void writeVariable(RooRealVar &) const
void readVariable(const char *name, double min, double max)
void writeJSON(RooFit::Detail::JSONNode &) const
void readJSON(RooFit::Detail::JSONNode const &)
static constexpr double infinity()
Return internal infinity representation.
static constexpr int isInfinite(double x)
Return true if x is infinite by RooNumber internal specification.
RooRealVar represents a variable that can be changed from the outside.
void setMin(const char *name, double value)
Set minimum of name range to given value.
void setMax(const char *name, double value)
Set maximum of name range to given value.
Persistable container for RooFit projects.
bool import(const RooAbsArg &arg, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}, const RooCmdArg &arg9={})
Import a RooAbsArg object, e.g.
RooRealVar * var(RooStringView name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found.
const char * GetName() const override
Returns name of object.
static constexpr auto defaultDomainName
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...