Skip to content

Conversation

@ikrommyd
Copy link
Collaborator

Closes #1119

@ikrommyd
Copy link
Collaborator Author

ikrommyd commented Nov 17, 2025

@nsmith- Is it safe to add zero mass to the trigobj 4-vector to allow 4-vector math? Also CorrT1METJet now has a rawMass field in nano v15 (not in previous versions) which is definitely not zero: https://cms-xpog.docs.cern.ch/autoDoc/NanoAODv15/2024/doc_TTH-Hto2G_Par-M-125_TuneCP5_13p6TeV_amcatnloFXFX-pythia8_RunIII2024Summer24NanoAODv15-150X_mcRun3_2024_realistic_v2-v2.html#CorrT1METJet
image
Should we use that or zero out the mass?
It looks like this

In [16]: events.CorrT1METJet.rawMass.show()
[[2.09, -1.29e-06, 2.11],
 [0.965],
 [1.84],
 [2.74, 1.99, 1.28e-06, 1.78],
 [1.37e-06],
 [2.05, 0.932, 1.35],
 [2.47, 0.841, 0.898, -1.34e-05],
 [],
 [0.606],
 [2.82],
 ...,
 [3.24, 1.26e-06, 2.71, -6.98e-06],
 [2.56, 2.59, 1.99],
 [3.04, -1.01e-06],
 [1.89, 1.71, 1.85, 1.65, 2.15],
 [5.72e-06],
 [0.825, 1.79],
 [1.92, 2.26, 2.59],
 [2.17, 1.6],
 [-9.54e-07, 1.59, 1.72]]

Comment on lines +318 to +332
# 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"]
)
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.

@ikrommyd ikrommyd requested a review from nsmith- November 17, 2025 22:16
@ikrommyd
Copy link
Collaborator Author

I don't understand this flaky failure that just showed up......

@ikrommyd
Copy link
Collaborator Author

ikrommyd commented Nov 19, 2025

Yeah this currently works but I had to add a big chunk of slightly modified code that I stole from awkward array in order to keep tracing functioning properly....This functionality should probably be in awkward and not here.

@ikrommyd ikrommyd marked this pull request as draft November 19, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding the CorrT1METJet class to nanoaod.py

2 participants