Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions src/hbb/common_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"2022EE": 26671.6,
"2023": 18084.4,
"2023BPix": 9692.1,
"2024": 109080.0,
"2022-2023": 62428.6,
"2022-2024": 171508.6
}

norm_preserving_weights = ["genweight", "pileup", "ISRPartonShower", "FSRPartonShower"]
Expand Down
10 changes: 7 additions & 3 deletions src/hbb/corrections.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,17 @@ def add_pileup_weight(weights: Weights, year: str, nPU):
values = {}

cset = correctionlib.CorrectionSet.from_file(get_pog_json("pileup", year))
if year == "2024":
pog_json_file = Path(f"{package_path}/hbb/data/puWeights_2024.json")
cset = correctionlib.CorrectionSet.from_file(pog_json_file)

corr = {
"2018": "Collisions18_UltraLegacy_goldenJSON",
"2022": "Collisions2022_355100_357900_eraBCD_GoldenJson",
"2022EE": "Collisions2022_359022_362760_eraEFG_GoldenJson",
"2023": "Collisions2023_366403_369802_eraBC_GoldenJson",
"2023BPix": "Collisions2023_369803_370790_eraD_GoldenJson",
#"2024": "", Not yet derived by pog
"2024": "Pileup",
}[year]
# evaluate and clip up to 4 to avoid large weights
values["nominal"] = ak_clip(cset[corr].evaluate(nPU, "nominal"), 0, 4)
Expand Down Expand Up @@ -239,7 +243,7 @@ def get_veto(j, nj, csetstr):
"2022EE": "Summer22EE_23Sep2023_RunEFG_V1",
"2023": "Summer23Prompt23_RunC_V1",
"2023BPix": "Summer23BPixPrompt23_RunD_V1",
"2024": "Summer24Prompt24",
"2024": "Summer24Prompt24_RunBCDEFGHI_V1",
}[year]

jet_veto = get_veto(j, nj, corr_str) > 0
Expand Down Expand Up @@ -481,7 +485,7 @@ def add_photon_weights(weights: Weights, year: str, photons):
"2022EE" : "2022Re-recoE+PromptFG",
"2023" : "2023PromptC",
"2023BPix" : "2023PromptD",
# "2024" #TODO double check
"2024" : "2024",
}

cset = correctionlib.CorrectionSet.from_file(get_pog_json("photon", year))
Expand Down
Binary file added src/hbb/data/PU_weights_Summer24.histo.root
Binary file not shown.
Loading