diff --git a/roofit/hs3/src/RooJSONFactoryWSTool.cxx b/roofit/hs3/src/RooJSONFactoryWSTool.cxx index 35a86f109dbbd..7044d7c9ca0bc 100644 --- a/roofit/hs3/src/RooJSONFactoryWSTool.cxx +++ b/roofit/hs3/src/RooJSONFactoryWSTool.cxx @@ -581,9 +581,10 @@ void importAnalysis(const JSONNode &rootnode, const JSONNode &analysisNode, cons if (!nllNode->has_child("data")) { throw std::runtime_error("likelihood node has no data attached!"); } + std::vector nllDistNames = valsToStringVec((*nllNode)["distributions"]); RooArgSet extConstraints; - for (auto &nameNode : (*nllNode)["aux_distributions"].children()) { + for (auto &nameNode : analysisNode["aux_distributions"].children()) { if (RooAbsArg *extConstraint = workspace.arg(nameNode.val())) { extConstraints.add(*extConstraint); }