Skip to content

Adding the CorrT1METJet class to nanoaod.py #1119

@9GaoHong

Description

@9GaoHong

Is your feature request related to a problem? Please describe.
When propagating JEC to Type1 corrections for raw MET, it is necessary to consider the contributions of both jet and soft jets, but currently the script does not support the use of soft jets branch CorrT1METJet.

Describe the solution you'd like
Fix the /coffea/nanoevents/methods/nanoaod.py, add these code for CorrT1METJet:

@awkward.mixin_class(behavior)
class CorrT1METJet(vector.PtEtaPhiMLorentzVector, base.NanoCollection, base.Systematic):
    """NanoAOD narrow radius jet object"""
    @property
    def pt(self):
        return self["rawPt"]

    @property
    def rawFactor(self):
        self["rawFactor"] = awkward.zeros_like(self["rawPt"])
        return self["rawFactor"]

    @property
    def mass(self):
        self["mass"] = awkward.zeros_like(self["rawPt"])
        return self["mass"]

    @property
    def chEmEF(self):
        self["chEmEF"] = awkward.zeros_like(self["rawPt"])
        return self["chEmEF"]

    @property
    def neEmEF(self):
        self["neEmEF"] = awkward.zeros_like(self["rawPt"])
        return self["neEmEF"]


_set_repr_name("CorrT1METJet")

Fix the /coffea/nanoevents/schemas/nanoaod.py, add this key in 'mixins' dictionary:

"CorrT1METJet":"CorrT1METJet",

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions