Skip to content

Commit

Permalink
[RF][HS3] Added globs tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
cburgard authored and guitargeek committed Jan 10, 2025
1 parent 017c63b commit 590c79b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion roofit/hs3/src/RooJSONFactoryWSTool.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ void importAnalysis(const JSONNode &rootnode, const JSONNode &analysisNode, cons
for (const auto &p : pars) {
if (mc->GetParametersOfInterest()->find(*p))
continue;
if (p->isConstant() && !mainPars.find(*p)) {
if (p->isConstant() && !mainPars.find(*p) && domainPars.find(*p)) {
globs.add(*p);
} else if (domainPars.find(*p)) {
nps.add(*p);
Expand Down Expand Up @@ -1792,6 +1792,16 @@ void RooJSONFactoryWSTool::exportSingleModelConfig(JSONNode &rootnode, RooStats:
npDomain.writeJSON(appendNamedChild(domainsNode, npDomainName));
}

if (mc.GetGlobalObservables()) {
std::string globDomainName = analysisName + "_global_observables";
domains.append_child() << globDomainName;
RooFit::JSONIO::Detail::Domains::ProductDomain globDomain;
for (auto *glob : static_range_cast<const RooRealVar *>(*mc.GetGlobalObservables())) {
globDomain.readVariable(*glob);
}
globDomain.writeJSON(appendNamedChild(domainsNode, globDomainName));
}

if (mc.GetParametersOfInterest()) {
std::string poiDomainName = analysisName + "_parameters_of_interest";
domains.append_child() << poiDomainName;
Expand Down

0 comments on commit 590c79b

Please sign in to comment.