Closed dsavoiu closed 4 years ago
See comments above. PR can be merged from my point of view or we can keep it open for other people to comment. Your call, @HerrHorizontal
After reading the JetResolution TWiki again it seems the official recommendation is to truncate negative scale factors to zero, effectively suppressing the jet. I think we should implement it like that for the time being, since it's the official recommendation.
Since there is currently no use case for using JER smearing in data, this PR introduces an explicit check in the
JERSmearer
and throws an exception if running on data.In addition, a further check is introduced to prevent smearing the jet p4 with a negative factor. This should be rare, but it can occur in principle when using stochastic smearing, leading to an unwanted reversal of the jet direction. In this case, the jet p4 is not smeared.