From 28e43cc9af7e771680156db39d7828ce1023ac92 Mon Sep 17 00:00:00 2001 From: Kelci Mohrman Date: Wed, 25 Sep 2024 09:42:18 -0700 Subject: [PATCH 1/3] Correlate the correlated sf light for r2 r3 --- analysis/wwz/wwz4l.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/analysis/wwz/wwz4l.py b/analysis/wwz/wwz4l.py index 1869d08..cc3fcb0 100644 --- a/analysis/wwz/wwz4l.py +++ b/analysis/wwz/wwz4l.py @@ -420,14 +420,15 @@ def process(self, events): # Set up the list of systematics that are handled via event weight variations wgt_correction_syst_lst_common = [ - "btagSFbc_correlated", f"btagSFbc_uncorrelated_{year}", + "btagSFbc_correlated", "btagSFlight_correlated", f"btagSFbc_uncorrelated_{year}", f"lepSF_elec_{run_tag}", f"lepSF_muon_{run_tag}", "PU", "renorm", "fact", "ISR", "FSR", ] + wgt_correction_syst_lst = wgt_correction_syst_lst_common if not (is2022 or is2023): - wgt_correction_syst_lst = wgt_correction_syst_lst_common + ["PreFiring","btagSFlight_correlated",f"btagSFlight_uncorrelated_{year}"] - else: - wgt_correction_syst_lst = wgt_correction_syst_lst_common + ["btagSFlight"] + # These are only for R2 + wgt_correction_syst_lst = wgt_correction_syst_lst + ["PreFiring",f"btagSFlight_uncorrelated_{year}"] + wgt_correction_syst_lst = append_up_down_to_sys_base(wgt_correction_syst_lst) @@ -557,7 +558,7 @@ def process(self, events): wgt_light_up = cor_tc.get_method1a_wgt_singlewp(btag_eff_light,btag_sf_light_up, jets_light.btagDeepFlavB>btagwpl) wgt_light_down = cor_tc.get_method1a_wgt_singlewp(btag_eff_light,btag_sf_light_down, jets_light.btagDeepFlavB>btagwpl) # Note, up and down weights scaled by 1/wgt_btag_nom so that don't double count the central btag correction (i.e. don't apply it also in the case of up and down variations) - weights_obj_base_for_kinematic_syst.add("btagSFlight", events.nom, wgt_light_up*wgt_bc/wgt_btag_nom, wgt_light_down*wgt_bc/wgt_btag_nom) + weights_obj_base_for_kinematic_syst.add("btagSFlight_correlated", events.nom, wgt_light_up*wgt_bc/wgt_btag_nom, wgt_light_down*wgt_bc/wgt_btag_nom) # Run2 btagging systematics stuff else: From bd585ed89103397b88a734b3f52d1f1b09aafbed Mon Sep 17 00:00:00 2001 From: Kelci Mohrman Date: Fri, 4 Oct 2024 08:05:01 -0700 Subject: [PATCH 2/3] Drop norm uncty on sig --- ewkcoffea/params/rate_systs.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ewkcoffea/params/rate_systs.json b/ewkcoffea/params/rate_systs.json index 0070030..78d2d21 100644 --- a/ewkcoffea/params/rate_systs.json +++ b/ewkcoffea/params/rate_systs.json @@ -12,14 +12,6 @@ "procs" : ["other"], "val" : "1.3" }, - "theory_norm_wwz": { - "procs" : ["WWZ"], - "val" : "1.15" - }, - "theory_norm_zh": { - "procs" : ["ZH"], - "val" : "1.15" - }, "fake": { "procs" : ["WZ"], "val" : "1.3", From e9a4eb098681dd55d62b01cd4963449045d69039 Mon Sep 17 00:00:00 2001 From: Kelci Mohrman Date: Fri, 4 Oct 2024 08:08:22 -0700 Subject: [PATCH 3/3] Clean up run datacards script --- analysis/wwz/make_datacards_wrapper.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/analysis/wwz/make_datacards_wrapper.sh b/analysis/wwz/make_datacards_wrapper.sh index 4e1121a..cb7fb2c 100644 --- a/analysis/wwz/make_datacards_wrapper.sh +++ b/analysis/wwz/make_datacards_wrapper.sh @@ -5,5 +5,10 @@ R3_PKL="r3_wwz_histos_withSyst.pkl.gz" rm cards_wwz4l/* -python make_datacards.py histos/$R3_PKL -u run3 -s --bdt +# For BDT results python make_datacards.py histos/$R2_PKL -u run2 -s --bdt +python make_datacards.py histos/$R3_PKL -u run3 -s --bdt + +# For Cut Based results +#python make_datacards.py histos/$R2_PKL -u run2 -s +#python make_datacards.py histos/$R3_PKL -u run3 -s