Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/coffea/nanoevents/schemas/nanoaod.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class NanoAODSchema(BaseSchema):
"IsoTrack": "PtEtaPhiMCollection",
"SoftActivityJet": "PtEtaPhiMCollection",
"TrigObj": "PtEtaPhiMCollection",
"CorrT1METJet": "PtEtaPhiMCollection",
# True lorentz: pt, eta, phi, mass
"FatJet": "FatJet",
"GenDressedLepton": "PtEtaPhiMCollection",
Expand Down Expand Up @@ -314,6 +315,22 @@ def _build_collections(self, field_names, input_contents):
if "Photon_energy" in branch_forms:
branch_forms["Photon_regrEnergy"] = branch_forms.pop("Photon_energy")

# Alias CorrT1METJet_rawPt to CorrT1METJet_pt and add zero mass for CorrT1METJet collection
if "oCorrT1METJet" in branch_forms:
if "CorrT1METJet_pt" not in branch_forms:
branch_forms["CorrT1METJet_pt"] = branch_forms["CorrT1METJet_rawPt"]
if "CorrT1METJet_mass" not in branch_forms:
branch_forms["CorrT1METJet_mass"] = transforms.zeros_from_offsets_form(
branch_forms["oCorrT1METJet"]
)

# Add zero mass to the trigger objects
if "oTrigObj" in branch_forms:
if "TrigObj_mass" not in branch_forms:
branch_forms["TrigObj_mass"] = transforms.zeros_from_offsets_form(
branch_forms["oTrigObj"]
)
Comment on lines +318 to +332
Copy link
Collaborator Author

@ikrommyd ikrommyd Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these explicit stuff will be refactored in the form of class variable dictionaries similar to how we define all the other mixins. It will be done as part of closing #1474. I'm just now doing it in the same pattern as everything else.


output = {}
for name in collections:
mixin = self.mixins.get(name, "NanoCollection")
Expand Down
Loading