Skip to content

Add low pu 2026 hitmakers#706

Open
kdlong wants to merge 8 commits into
WMass:mainfrom
kdlong:lowpu_2026
Open

Add low pu 2026 hitmakers#706
kdlong wants to merge 8 commits into
WMass:mainfrom
kdlong:lowpu_2026

Conversation

@kdlong

@kdlong kdlong commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

This adds separate histmakers for W and Z (focusing on the MET for now) production for the low PU 2026 data. A change was needed to the lumitools in Narf to be able to analyse the prompt Nano from T0 for the data. Currently using the 2023 PU 5 simulation for MC. This should be updated when possible.

I did not make much effort to avoid code duplication. We should perhaps have a wider discussion about this. On one hand, code reuse would avoid unintentional differences. On the other hand, factoring too many things into helper tools (e.g., ID, selection, calibration) can be more trouble than it's worth when analyses have different use cases.

if flavor == "mumu":
df = df.Define(
"goodLeptons",
f"Muon_mediumId && Muon_pt > {lep_pt_min} && Muon_pt < 150"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Here the cut is at 150 for the pt, but the ptl axis extends up to 200

logger.warning(
f"Branch {met_type}_pt not found in {dataset.name}, falling back to {fallback}_pt"
)
df = df.Define(f"{met_type}_pt", f"{fallback}_pt")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Here you can use Alias instead of Define

# Loose muon veto: exactly one loose muon to reject Z→μμ
df = df.Define(
"vetoMuons",
"Muon_looseId && Muon_pt > 15 && abs(Muon_eta) < 2.4 && abs(Muon_dxybs) < 0.05",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I know we still need to optimise, but I believe we can surely veto lower pt values, at least down to 10.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, agreed. This is just a first pass.

)
)

# Signal-region-filtered observables; --selection none in the plotting script

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why not just filtering at plotting script level? It could be useful to have these same plots in the other regions too, and the selection would be very trivial.

# reset datagroups
dg.groups = {}

def add_if_nonempty(name, **kwargs):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This might be named more specifically as add_group_if_nonempty to make what happens clearer

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.

2 participants