From f717dccec1907cf5c6eea5f1c174aafdea892473 Mon Sep 17 00:00:00 2001 From: rkansal47 Date: Fri, 8 Mar 2024 21:43:52 -0600 Subject: [PATCH] create datacard bf --- src/HHbbVV/postprocessing/CreateDatacard.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/HHbbVV/postprocessing/CreateDatacard.py b/src/HHbbVV/postprocessing/CreateDatacard.py index 8a853dd9..6df1d809 100644 --- a/src/HHbbVV/postprocessing/CreateDatacard.py +++ b/src/HHbbVV/postprocessing/CreateDatacard.py @@ -274,13 +274,13 @@ corr_year_shape_systs = { "FSRPartonShower": Syst(name="ps_fsr", prior="shape", samples=all_mc), "ISRPartonShower": Syst(name="ps_isr", prior="shape", samples=all_mc), - "scaleacc": Syst( + "scale": Syst( name=f"{CMS_PARAMS_LABEL}_QCDScaleacc", prior="shape", samples=nonres_sig_keys, samples_corr=False, ), - "pdfacc": Syst( + "pdf": Syst( name=f"{CMS_PARAMS_LABEL}_PDFacc", prior="shape", samples=nonres_sig_keys, @@ -675,7 +675,10 @@ def fill_regions( effect_up, effect_down = get_effect_updown( values_nominal, values_up, values_down, mask, logger, args.epsilon ) - sample.setParamEffect(shape_systs_dict[skey], effect_up, effect_down) + + # separate syst if not correlated across samples + sdkey = skey if syst.samples_corr else f"{skey}_{card_name}" + sample.setParamEffect(shape_systs_dict[sdkey], effect_up, effect_down) # uncorrelated shape systematics for skey, syst in uncorr_year_shape_systs.items():