cms-nanoAOD / nanoAOD-tools

Tools for working with NanoAOD (requiring only python + root, not CMSSW)
42 stars 328 forks source link

Wrong calculation of raw softdrop mass for AK8 jets? #280

Open nurfikri89 opened 3 years ago

nurfikri89 commented 3 years ago

From the snippet below, it looks like the raw softdrop mass is wrongly calculated. The subjets retrieved here are with jet energy corrections (JECs) applied on them [1]. From what I understand of what we mean by the raw softdrop mass is the invariant mass of the subjet pair with the JECs removed from each subjet four-vector.

https://github.com/cms-nanoAOD/nanoAOD-tools/blob/4396652db3c63fc1375d4479a3fa2a94c18f98d4/python/postprocessing/modules/jme/fatJetUncertainties.py#L549-L555

[1] at the nanoAOD production level, or probably even earlier at the miniAOD production level

nurfikri89 commented 3 years ago

I think line 550-551 can be replaced by:

groomedP4 = (subJets[jet.subJetIdx1].p4() * (1. - subJets[jet.subJetIdx1].rawFactor)) \
     + (subJets[jet.subJetIdx2].p4() * (1. - subJets[jet.subJetIdx2].rawFactor))