Skip to content

Commit

Permalink
Merge pull request #50 from cmstas/syst-naming
Browse files Browse the repository at this point in the history
Systematics naming and update
  • Loading branch information
kmohrman authored Oct 4, 2024
2 parents 85452e7 + e9a4eb0 commit f164a99
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
7 changes: 6 additions & 1 deletion analysis/wwz/make_datacards_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 6 additions & 5 deletions analysis/wwz/wwz4l.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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:
Expand Down
8 changes: 0 additions & 8 deletions ewkcoffea/params/rate_systs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f164a99

Please sign in to comment.