31 if (default_domain !=
_map.end()) {
32 default_domain->second.populate(ws);
34 for (
const auto &domain :
_map) {
37 domain.second.registerBinnings(domain.first.c_str(), ws);
47 _map[domain].readVariable(
name, min, max);
64 if (default_domain !=
_map.end()) {
65 default_domain->second.writeVariable(var);
72 if (!default_domain_element) {
75 for (
auto &domain : node.
children()) {
76 if (!domain.has_child(
"name")) {
79 auto &
name = domain[
"name"];
86 for (
auto const &domain :
_map) {
118 if (found !=
_map.end()) {
119 auto const &elem = found->second;
128 if (!node.
has_child(
"type") || node[
"type"].
val() !=
"product_domain") {
131 for (
auto const &varNode : node[
"axes"].
children()) {
134 if (varNode.has_child(
"min")) {
135 elem.min = varNode[
"min"].val_double();
138 if (varNode.has_child(
"max")) {
139 elem.max = varNode[
"max"].val_double();
148 node[
"type"] <<
"product_domain";
150 auto &variablesNode = node[
"axes"];
152 for (
auto const &item :
_map) {
153 auto const &elem = item.second;
156 varnode[
"min"] << elem.min;
158 varnode[
"max"] << elem.max;
163 for (
auto const &item :
_map) {
164 const auto &
name = item.first;
166 const auto &elem = item.second;
175 for (
auto const &item :
_map) {
176 auto *var = ws.
var(item.first);
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
void registerBinnings(const char *name, RooWorkspace &ws) const
void populate(RooWorkspace &ws) const
void readVariable(const RooRealVar &)
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, const char *domain)
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.
Variable that can be changed from the outside.
void setMin(const char *name, double value)
Set minimum of name range to given value.
std::list< std::string > getBinningNames() const override
Get a list of all binning names.
const RooAbsBinning & getBinning(const char *name=nullptr, bool verbose=true, bool createOnTheFly=false) const override
Return binning definition with name.
void setRange(const char *name, double min, double max)
Set a fit or plotting range.
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...