KIT-CMS / Excalibur

Analysis repository for Z+Jet studies
1 stars 4 forks source link

Prevent JER smearing in data and check for negative smearing factors. #67

Closed dsavoiu closed 4 years ago

dsavoiu commented 4 years ago

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.

dsavoiu commented 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

dsavoiu commented 4 years ago

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.