Skip to content

Commit

Permalink
Merge pull request #30558 from ahinzmann/negativeJEC111
Browse files Browse the repository at this point in the history
Add safety check to spot negative jet energy correction factors [11_1_X backport]
  • Loading branch information
cmsbuild authored Jul 16, 2020
2 parents 2df13a8 + 2ea1843 commit 0393b55
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CondFormats/JetMETObjects/src/SimpleJetCorrector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ float SimpleJetCorrector::correction(const std::vector<float>& fX, const std::ve
}
result = tmp / mParameters.definitions().nBinVar();
}
if (result <= 0) {
edm::LogWarning("SimpleJetCorrector")
<< "Null or negative jet energy correction factor evaluated: " << result << ". Truncating to 10e-10.";
result = 10e-10;
}
return result;
}
//------------------------------------------------------------------------
Expand Down

0 comments on commit 0393b55

Please sign in to comment.