Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/rkansal47/HHbbVV into main
Browse files Browse the repository at this point in the history
  • Loading branch information
rkansal47 committed Aug 26, 2023
2 parents ce368e6 + 8d54e10 commit d059487
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/HHbbVV/postprocessing/CreateDatacard.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ def mxmy(sample):
value=((1.006 ** (LUMI["2017"] / full_lumi)) * (1.002 ** (LUMI["2018"] / full_lumi))),
),
# https://gitlab.cern.ch/hh/naming-conventions#theory-uncertainties
"BR_hbb": Syst(prior="lnN", samples=nonres_sig_keys, value=1.0124, value_down=0.9874),
"BR_hbb": Syst(
prior="lnN", samples=nonres_sig_keys + res_sig_keys, value=1.0124, value_down=0.9874
),
"BR_hww": Syst(prior="lnN", samples=nonres_sig_keys, value=1.0153, value_down=0.9848),
"pdf_gg": Syst(prior="lnN", samples=["TT"], value=1.042),
"pdf_qqbar": Syst(prior="lnN", samples=["ST"], value=1.027),
Expand Down
3 changes: 2 additions & 1 deletion src/HHbbVV/postprocessing/postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ def apply_weights(
events_dict: Dict[str, pd.DataFrame],
year: str,
cutflow: pd.DataFrame = None,
qcd_sf: bool = True,
):
"""
Applies (1) 2D trigger scale factors, (2) QCD scale facotr.
Expand Down Expand Up @@ -656,7 +657,7 @@ def apply_weights(
utils.add_to_cutflow(events_dict, "TriggerEffs", weight_key, cutflow)

# calculate QCD scale factor
if qcd_key in events_dict:
if qcd_sf and qcd_key in events_dict:
trig_yields = cutflow["TriggerEffs"]
non_qcd_bgs_yield = np.sum(
[
Expand Down

0 comments on commit d059487

Please sign in to comment.