Closed HerrHorizontal closed 4 years ago
Looks like the term added to sumEtCorrection
for each jet is based on the MET correction calculated from all previous jets, which was surely not the intended behavior:
correction.p4 += l1Jet->p4 - corrJet->p4;
sumEtCorrection += static_cast<double>(correction.p4.Pt());
Another minor issue is that, strictly speaking, sumEtCorrection
should propagate the "uncorrected - corrected" scalar difference in pT to sumEt
and not the pT corresponding to the (four-)vector difference. However, these quantities are the same if the corrected and uncorrected vectors are parallel, which AFAIK is always the case because JEC is applied as a multiplicative factor on the uncorrected jet four-vector.
Here is the CMSSW Implementation for reference: https://github.com/cms-sw/cmssw/blob/CMSSW_10_6_0/JetMETCorrections/Type1MET/interface/PFJetMETcorrInputProducerT.h#L236-L238
The following should fix both issues (cf. PR #65):
correction.p4 += l1Jet->p4 - corrJet->p4;
sumEtCorrection += static_cast<double>(l1Jet->p4.Pt() - corrJet->p4.Pt());
The transfer of jet corrections to sumEt is misleading or wrong.