Skip to content

Commit

Permalink
BuildRooMorphing now checks if the full set of shape systematics is p…
Browse files Browse the repository at this point in the history
…resent for each mass points, and throws an exception if not - otherwise would lead to a segfault when trying to access the missing Systematic objects
  • Loading branch information
ajgilbert committed Oct 5, 2015
1 parent a68fe6e commit 99bc6ca
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CombinePdfs/src/MorphFunctions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ void BuildRooMorphing(RooWorkspace& ws, CombineHarvester& cb,
// Make a list of the names of shape systematics affecting this process
vector<string> ss_vec =
Set2Vec(cb_bp.cp().syst_type({"shape"}).syst_name_set());
// Now check if all shape systematics are present for all mass points
for (auto const& s : m_str_vec) {
if (cb_bp.cp().syst_type({"shape"}).mass({s}).syst_name_set().size() !=
ss_vec.size()) {
throw std::runtime_error(FNERROR(
"Some mass points do not have the full set of shape systematics, "
"this is currently unsupported"));
}
}

unsigned ss = ss_vec.size(); // number of shape systematics

// ls = "lnN systematic"
Expand Down

0 comments on commit 99bc6ca

Please sign in to comment.