Update jet energy decorations in BJetCalibAnalysisConfig
It was reported by @rjoshi that some jet kinematics distributions look strange after BJetCalibAnalysisConfig
. The issue is that we compute the jet energy based on the jet four momentum JetFourMom_t
and add the energy decoration to jets in SmallRJetAnalysisConfig
here before running CP::BJetCalibrationAlg
. And CP::BJetCalibrationAlg
corrects the jet momentum via xAOD::Jet::setJetP4
which internally only updates pt and mass of the four momentum. In the output ntuple, we then end up saving the corrected jet pt and the old jet energy.
This MR patches BJetCalibAnalysisConfig
by adding an extra block at the end to redecorate jets with the updated energy.
An alternative fix could be to ensure the jet energy decoration algorithm is always called at the end after BJetCalibAnalysisConfig
or any other jet calibration blocks. But I'm not sure how this would be implemented given BJetCalibAnalysisConfig
and others are optional. (Another more proper but probably not-so-practical fix could be to use energy instead of mass internally for defining jet momentum JetFourMom_t
. But this would be quite intrusive and affect many places.)