Skip to content

Commit

Permalink
edited postprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
andresnava1000 committed Mar 7, 2024
1 parent 88525b1 commit 90c0096
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/HHbbVV/postprocessing/postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ def get_nonres_vbf_selection_regions(
"ak8FatJetEta1": [-2.4, 2.4],
"DijetdEta": [0, 2.0],
"DijetdPhi": [2.6, 10000],
"bbFatJetParticleNetMass": [50, 250],
"nGoodElectronsHbb": [0, 0.9],
"nGoodMuonsHbb": [0, 0.9],
},
label="Pass",
),
Expand All @@ -208,6 +211,9 @@ def get_nonres_vbf_selection_regions(
"ak8FatJetEta1": [-2.4, 2.4],
"DijetdEta": [0, 2.0],
"DijetdPhi": [2.6, 10000],
"bbFatJetParticleNetMass": [50, 250],
"nGoodElectronsHbb": [0, 0.9],
"nGoodMuonsHbb": [0, 0.9],
},
label="Fail",
),
Expand Down Expand Up @@ -810,11 +816,11 @@ def _make_dirs(args, scan, scan_cuts, scan_wps):
if scan:
for wps in scan_wps:
cutstr = "_".join([f"{cut}_{wp}" for cut, wp in zip(scan_cuts, wps)])
(args.template_dir / f"{cutstr}/{args.templates_name}/cutflows/{args.year}").mkdir(
Path(f"{args.template_dir}/{args.templates_name}/cutflows/{args.year}").mkdir(
parents=True, exist_ok=True
)
else:
(args.template_dir / f"{args.templates_name}/cutflows/{args.year}").mkdir(
Path(f"{args.template_dir}/{args.templates_name}/cutflows/{args.year}").mkdir(
parents=True, exist_ok=True
)

Expand Down Expand Up @@ -1058,7 +1064,7 @@ def apply_weights(
year: str,
cutflow: pd.DataFrame = None,
trigger_effs: bool = True,
qcd_sf: bool = True,
do_qcd_sf: bool = True,
):
"""
Applies (1) 2D trigger scale factors, (2) QCD scale facotr.
Expand All @@ -1071,7 +1077,7 @@ def apply_weights(
if trigger_effs:
apply_trigger_weights(events_dict, year, cutflow)

if qcd_sf:
if do_qcd_sf:
qcd_sf(events_dict, cutflow)


Expand Down

0 comments on commit 90c0096

Please sign in to comment.