From 61a6701453d331722687ff30a57e12aa63b8ba89 Mon Sep 17 00:00:00 2001 From: Mathis Frahm Date: Mon, 27 Jan 2025 10:13:21 +0100 Subject: [PATCH] fix 2023 btag wps --- hbw/config/config_run2.py | 14 ++++++++------ hbw/config/defaults_and_groups.py | 1 - 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hbw/config/config_run2.py b/hbw/config/config_run2.py index 592a594..e7c336f 100644 --- a/hbw/config/config_run2.py +++ b/hbw/config/config_run2.py @@ -326,9 +326,9 @@ def if_era( # https://twiki.cern.ch/twiki/bin/view/CMS/BtagRecommendation106XUL17?rev=17 cfg.x.btag_working_points = DotDict.wrap({ "deepjet": { - "loose": {"2016preVFP": 0.0508, "2016postVFP": 0.0480, "2017": 0.0532, "2018": 0.0490, "2022preEE": 0.0583, "2022postEE": 0.0614, "2023": 0.0479, "2023BPix": 0.048}.get(cfg.x.cpn_tag, 0.0), # noqa - "medium": {"2016preVFP": 0.2598, "2016postVFP": 0.2489, "2017": 0.3040, "2018": 0.2783, "2022preEE": 0.3086, "2022postEE": 0.3196, "2023": 0.2431, "2023BPix": 0.2435}.get(cfg.x.cpn_tag, 0.0), # noqa - "tight": {"2016preVFP": 0.6502, "2016postVFP": 0.6377, "2017": 0.7476, "2018": 0.7100, "2022preEE": 0.7183, "2022postEE": 0.73, "2023": 0.6553, "2023BPix": 0.6563}.get(cfg.x.cpn_tag, 0.0), # noqa + "loose": {"2016preVFP": 0.0508, "2016postVFP": 0.0480, "2017": 0.0532, "2018": 0.0490, "2022preEE": 0.0583, "2022postEE": 0.0614, "2023preBPix": 0.0479, "2023BPix": 0.048}.get(cfg.x.cpn_tag, 0.0), # noqa + "medium": {"2016preVFP": 0.2598, "2016postVFP": 0.2489, "2017": 0.3040, "2018": 0.2783, "2022preEE": 0.3086, "2022postEE": 0.3196, "2023preBPix": 0.2431, "2023BPix": 0.2435}.get(cfg.x.cpn_tag, 0.0), # noqa + "tight": {"2016preVFP": 0.6502, "2016postVFP": 0.6377, "2017": 0.7476, "2018": 0.7100, "2022preEE": 0.7183, "2022postEE": 0.73, "2023preBPix": 0.6553, "2023BPix": 0.6563}.get(cfg.x.cpn_tag, 0.0), # noqa }, "deepcsv": { "loose": {"2016preVFP": 0.2027, "2016postVFP": 0.1918, "2017": 0.1355, "2018": 0.1208}.get(cfg.x.cpn_tag, 0.0), # noqa @@ -336,9 +336,9 @@ def if_era( "tight": {"2016preVFP": 0.8819, "2016postVFP": 0.8767, "2017": 0.7738, "2018": 0.7665}.get(cfg.x.cpn_tag, 0.0), # noqa }, "particlenet": { - "loose": {"2022preEE": 0.047, "2022postEE": 0.0499, "2023": 0.0358, "2023BPix": 0.359}.get(cfg.x.cpn_tag, 0.0), # noqa - "medium": {"2022preEE": 0.245, "2022postEE": 0.2605, "2023": 0.1917, "2023BPix": 0.1919}.get(cfg.x.cpn_tag, 0.0), # noqa - "tight": {"2022preEE": 0.6734, "2022postEE": 0.6915, "2023": 0.6172, "2023BPix": 0.6133}.get(cfg.x.cpn_tag, 0.0), # noqa + "loose": {"2022preEE": 0.047, "2022postEE": 0.0499, "2023preBPix": 0.0358, "2023postBPix": 0.359}.get(cfg.x.cpn_tag, 0.0), # noqa + "medium": {"2022preEE": 0.245, "2022postEE": 0.2605, "2023preBPix": 0.1917, "2023postBPix": 0.1919}.get(cfg.x.cpn_tag, 0.0), # noqa + "tight": {"2022preEE": 0.6734, "2022postEE": 0.6915, "2023preBPix": 0.6172, "2023postBPix": 0.6133}.get(cfg.x.cpn_tag, 0.0), # noqa }, }) @@ -365,6 +365,8 @@ def if_era( cfg.x.btag_wp_score = ( cfg.x.btag_working_points[cfg.x.b_tagger][cfg.x.btag_wp] ) + if cfg.x.btag_wp_score == 0.0: + raise ValueError(f"Unknown b-tag working point '{cfg.x.btag_wp}' for campaign {cfg.x.cpn_tag}") # met configuration cfg.x.met_name = { diff --git a/hbw/config/defaults_and_groups.py b/hbw/config/defaults_and_groups.py index 392b451..589839a 100644 --- a/hbw/config/defaults_and_groups.py +++ b/hbw/config/defaults_and_groups.py @@ -437,7 +437,6 @@ def set_config_defaults_and_groups(config_inst): "ncols": 2, "fontsize": 16, "bbox_to_anchor": (0., 0., 1., 1.), - "reverse": True, }, "annotate_cfg": { "xy": (0.05, 0.95),