From d83d5160f95b7ca9c184339a540d56b304220ea1 Mon Sep 17 00:00:00 2001 From: Andres Nava Date: Thu, 4 Apr 2024 22:06:26 -0700 Subject: [PATCH] handle mc bkg with no events in regions --- src/HHbbVV/postprocessing/CreateDatacard.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/HHbbVV/postprocessing/CreateDatacard.py b/src/HHbbVV/postprocessing/CreateDatacard.py index 361bcfb8..a6bea068 100644 --- a/src/HHbbVV/postprocessing/CreateDatacard.py +++ b/src/HHbbVV/postprocessing/CreateDatacard.py @@ -1163,7 +1163,11 @@ def get_systematics_abcd(channels, channels_dict, channels_summed, rates_dict): vals = [] for channel in channels: for _, key in enumerate(all_processes): - if key == qcd_data_key or skey not in channel_systs_dict[channel][key]: + if ( + key == qcd_data_key + or key not in channel_systs_dict[channel] + or skey not in channel_systs_dict[channel][key] + ): vals.append("-") else: val, val_down = channel_systs_dict[channel][key][skey]