diff --git a/hbw/config/defaults_and_groups.py b/hbw/config/defaults_and_groups.py index c748a9b2..1a7e3fbc 100644 --- a/hbw/config/defaults_and_groups.py +++ b/hbw/config/defaults_and_groups.py @@ -60,7 +60,7 @@ def default_producers(cls, container, task_params): """ Default producers chosen based on the Inference model and the ML Model """ # per default, use the ml_inputs and event_weights - default_producers = [ml_inputs_producer(container), "event_weights", "pre_ml_cats"] + default_producers = ["event_weights", "pre_ml_cats", ml_inputs_producer(container)] if hasattr(cls, "ml_model"): # do no further resolve the ML categorizer when this task is part of the MLTraining pipeline @@ -127,22 +127,22 @@ def set_config_defaults_and_groups(config_inst): # (used in wrapper_factory and during plotting) config_inst.x.process_groups = { "all": ["*"], - "default": [default_signal_process, "tt", "st", "w_lnu", "dy_lep"], - "with_qcd": [default_signal_process, "tt", "qcd", "st", "w_lnu", "dy_lep"], - "much": [default_signal_process, "tt", "qcd_mu", "st", "w_lnu", "dy_lep"], - "2much": [default_signal_process, "tt", "st", "w_lnu", "dy_lep"], - "ech": [default_signal_process, "tt", "qcd_ele", "st", "w_lnu", "dy_lep"], - "2ech": [default_signal_process, "tt", "st", "w_lnu", "dy_lep"], - "emuch": [default_signal_process, "tt", "st", "w_lnu", "dy_lep"], - "inference": ["hh_ggf_*", "tt", "st", "w_lnu", "dy_lep", "qcd_*"], - "k2v": ["hh_vbf_*", "tt", "st", "w_lnu", "dy_lep", "qcd_*"], - "ml": [default_signal_process, "tt", "st", "w_lnu", "dy_lep"], + "default": [default_signal_process, "tt", "st", "w_lnu", "dy"], + "with_qcd": [default_signal_process, "tt", "qcd", "st", "w_lnu", "dy"], + "much": [default_signal_process, "tt", "qcd_mu", "st", "w_lnu", "dy"], + "2much": [default_signal_process, "tt", "st", "w_lnu", "dy"], + "ech": [default_signal_process, "tt", "qcd_ele", "st", "w_lnu", "dy"], + "2ech": [default_signal_process, "tt", "st", "w_lnu", "dy"], + "emuch": [default_signal_process, "tt", "st", "w_lnu", "dy"], + "inference": ["hh_ggf_*", "tt", "st", "w_lnu", "dy", "qcd_*"], + "k2v": ["hh_vbf_*", "tt", "st", "w_lnu", "dy", "qcd_*"], + "ml": [default_signal_process, "tt", "st", "w_lnu", "dy"], "ml_test": [default_signal_process, "st", "w_lnu"], - "mldl": ["hh_ggf_kl1_kt1_hbb_hvv2l2nu", "tt", "st", "dy_lep"], - "mlsl": ["hh_ggf_kl1_kt1_hbb_hvvqqlnu", "tt", "st", "w_lnu", "dy_lep"], + "mldl": ["hh_ggf_kl1_kt1_hbb_hvv2l2nu", "tt", "st", "dy"], + "mlsl": ["hh_ggf_kl1_kt1_hbb_hvvqqlnu", "tt", "st", "w_lnu", "dy"], "test": [default_signal_process, "tt_sl"], "small": [default_signal_process, "tt", "st"], - "bkg": ["tt", "st", "w_lnu", "dy_lep"], + "bkg": ["tt", "st", "w_lnu", "dy"], "signal": ["hh_ggf_*", "hh_vbf_*"], "hh_ggf": ["hh_ggf_*"], "hh_vbf": ["hh_vbf_*"], } config_inst.x.process_groups["dmuch"] = ["data_mu"] + config_inst.x.process_groups["much"] @@ -170,12 +170,16 @@ def set_config_defaults_and_groups(config_inst): # category groups for conveniently looping over certain categories # (used during plotting and for rebinning) config_inst.x.category_groups = { + "sl": ["sr__1e", "sr__1mu"], + "sl_resolved": ["sr__1e__resolved", "sr__1mu__resolved"], "sl_much": ["sr__1mu", "sr__1mu__resolved", "sr__1mu__boosted"], "sl_ech": ["sr__1e", "sr__1e__resolved", "sr__1e__boosted"], "sl_much_resolved": ["sr__1mu__resolved", "sr__1mu__resolved__1b", "sr__1mu__resolved__2b"], "sl_ech_resolved": ["sr__1e__resolved", "sr__1e__resolved__1b", "sr__1e__resolved__2b"], "sl_much_boosted": ["sr__1mu__boosted"], "sl_ech_boosted": ["sr__1e__boosted"], + "dl": ["sr__2e", "sr__2mu", "sr__emu"], + "dl_resolved": ["sr__2e__resolved", "sr__2mu__resolved", "sr__emu__resolved"], "dl_2much": ["sr__2mu", "sr__2mu__resolved", "sr__2mu__boosted"], "dl_2ech": ["sr__2e", "sr__2e__resolved", "sr__2e__boosted"], "dl_emuch": ["sr__emu", "sr__emu__resolved", "sr__emu__boosted"], @@ -227,9 +231,9 @@ def set_config_defaults_and_groups(config_inst): "sr__emu__1b__ml_hh_ggf_kl1_kt1_hbb_hvv2l2nu", "sr__emu__2b__ml_hh_ggf_kl1_kt1_hbb_hvv2l2nu", ), "BR_dl": ( - "sr__2e__ml_tt", "sr__2e__ml_st", "sr__2e__ml_dy_lep", - "sr__2mu__ml_tt", "sr__2mu__ml_st", "sr__2mu__ml_dy_lep", - "sr__emu__ml_tt", "sr__emu__ml_st", "sr__emu__ml_dy_lep", + "sr__2e__ml_tt", "sr__2e__ml_st", "sr__2e__ml_dy", + "sr__2mu__ml_tt", "sr__2mu__ml_st", "sr__2mu__ml_dy", + "sr__emu__ml_tt", "sr__emu__ml_st", "sr__emu__ml_dy", ), } @@ -299,7 +303,7 @@ def set_config_defaults_and_groups(config_inst): }, } # when drawing DY as a line, use a different type of yellow - config_inst.x.process_settings_groups["unstack_all"].update({"dy_lep": {"unstack": True, "color": "#e6d800"}}) + config_inst.x.process_settings_groups["unstack_all"].update({"dy": {"unstack": True, "color": "#e6d800"}}) config_inst.x.variable_settings_groups = { "test": { diff --git a/hbw/config/processes.py b/hbw/config/processes.py index dac4ba1f..c4c07fba 100644 --- a/hbw/config/processes.py +++ b/hbw/config/processes.py @@ -50,7 +50,7 @@ def add_dummy_xsecs(config: od.Config, dummy_xsec: float = 0.1): process_inst.xsecs[ecm] = Number(dummy_xsec) # # temporary xsecs from XSDB - # config.get_process("dy_lep").xsecs[13.6] = Number(67710.0) # https://xsdb-temp.app.cern.ch/xsdb/?columns=37814272¤tPage=0&pageSize=10&searchQuery=DAS%3DWtoLNu-2Jets_TuneCP5_13p6TeV_amcatnloFXFX-pythia8 # noqa + # config.get_process("dy").xsecs[13.6] = Number(67710.0) # https://xsdb-temp.app.cern.ch/xsdb/?columns=37814272¤tPage=0&pageSize=10&searchQuery=DAS%3DWtoLNu-2Jets_TuneCP5_13p6TeV_amcatnloFXFX-pythia8 # noqa # config.get_process("w_lnu").xsecs[13.6] = Number(5558.0) # https://xsdb-temp.app.cern.ch/xsdb/?columns=37814272¤tPage=0&ordDirection=1&ordFieldName=process_name&pageSize=10&searchQuery=DAS%3DWtoLNu-2Jets_TuneCP5_13p6TeV_amcatnloFXFX-pythia8 # noqa # temporary xsecs that were missing in xsdb @@ -93,11 +93,11 @@ def configure_hbw_processes(config: od.Config): # custom v_lep process for ML Training, combining W+DY w_lnu = config.get_process("w_lnu", default=None) - dy_lep = config.get_process("dy_lep", default=None) - if w_lnu and dy_lep: + dy = config.get_process("dy", default=None) + if w_lnu and dy: v_lep = add_parent_process( # noqa config, - [w_lnu, dy_lep], + [w_lnu, dy], name="v_lep", id=64575573, # random number label="W and DY", diff --git a/hbw/config/styling.py b/hbw/config/styling.py index 40cca001..7d546904 100644 --- a/hbw/config/styling.py +++ b/hbw/config/styling.py @@ -25,7 +25,7 @@ "higgs": "#984ea3", # purple "st": "#ff7f00", # orange "t_bkg": "#e41a1c", # orange - "dy_lep": "#ffff33", # yellow + "dy": "#ffff33", # yellow "ttV": "#a65628", # brown "VV": "#f781bf", # pink "other": "#999999", # grey @@ -71,7 +71,7 @@ "graviton_hh_ggf_bbww_m1000": "grav1000", "st": "st", "w_lnu": "W", - "dy_lep": "DY", + "dy": "DY", "v_lep": "W+DY", "t_bkg": "tt+st", } @@ -101,7 +101,7 @@ "hh_vbf_kv0p5_k2v1_kl1_hbb_hvv2l2nu": r"$HH_{vbf}^{0.5,1,1} (DL)$", "hh_vbf_kv1p5_k2v1_kl1_hbb_hvv2l2nu": r"$HH_{vbf}^{1.5,1,1} (DL)$", "w_lnu": r"$W \rightarrow l\nu$", - "dy_lep": r"$Z \rightarrow ll$", + "dy": r"$Z \rightarrow ll$", "qcd_mu": r"$QCD \mu$", "qcd_ele": r"$QCD e$", } diff --git a/hbw/inference/constants.py b/hbw/inference/constants.py index d1f80cd7..79648dbb 100644 --- a/hbw/inference/constants.py +++ b/hbw/inference/constants.py @@ -42,7 +42,7 @@ # mapping, which processes are used for which QCDScale (rate) uncertainty processes_per_QCDScale = { "ttbar": ["tt", "st_tchannel", "st_schannel", "st_twchannel", "ttW", "ttZ"], - "V": ["dy_lep", "w_lnu"], + "V": ["dy", "w_lnu"], "VV": ["WW", "ZZ", "WZ", "qqZZ"], "VVV": ["vvv"], "ggH": ["ggH"], @@ -59,7 +59,7 @@ # mapping, which processes are used for which pdf (rate) uncertainty processes_per_pdf_rate = { "gg": ["tt", "ttZ", "ggZZ"], - "qqbar": ["st_schannel", "st_tchannel", "dy_lep", "w_lnu", "vvv", "qqZZ", "ttW"], + "qqbar": ["st_schannel", "st_tchannel", "dy", "w_lnu", "vvv", "qqZZ", "ttW"], "qg": ["st_twchannel"], "Higgs_gg": ["ggH"], "Higgs_qqbar": ["qqH", "ZH", "WH", "VH"], @@ -100,7 +100,7 @@ "pdf_shape_hh_ggf_kl5_kt1_hbb_hvv2l2nu": ["hh_ggf_kl5_kt1_hbb_hvv2l2nu"], "pdf_shape_tt": ["tt"], "pdf_shape_st": ["st_schannel", "st_twchannel"], # TODO: there was some bug with "st_tchannel" - "pdf_shape_dy": ["dy_lep"], + "pdf_shape_dy": ["dy"], "pdf_shape_w": ["w_lnu"], "murf_envelope_hh_ggf_kl0_kt1_hbb_hvvqqlnu": ["hh_ggf_kl0_kt1_hbb_hvvqqlnu"], "murf_envelope_hh_ggf_kl1_kt1_hbb_hvvqqlnu": ["hh_ggf_kl1_kt1_hbb_hvvqqlnu"], @@ -112,7 +112,7 @@ "murf_envelope_hh_ggf_kl5_kt1_hbb_hvv2l2nu": ["hh_ggf_kl5_kt1_hbb_hvv2l2nu"], "murf_envelope_tt": ["tt"], "murf_envelope_st": ["st_schannel", "st_tchannel", "st_twchannel"], - "murf_envelope_dy": ["dy_lep"], + "murf_envelope_dy": ["dy"], "murf_envelope_w": ["w_lnu"], } diff --git a/hbw/inference/dl.py b/hbw/inference/dl.py index 98fdac21..00a828dc 100644 --- a/hbw/inference/dl.py +++ b/hbw/inference/dl.py @@ -25,7 +25,7 @@ "tt", # "ttv", "ttvv", "st_schannel", "st_tchannel", "st_twchannel", - "dy_lep", + "dy", "w_lnu", # "vv", # "vvv", @@ -93,14 +93,14 @@ # "murf_envelope_hh_ggf_kl1_kt1_hbb_hvv2l2nu", "murf_envelope_tt", "murf_envelope_st", - "murf_envelope_dy_lep", + "murf_envelope_dy", "murf_envelope_w_lnu", "murf_envelope_ttV", "murf_envelope_VV", # Shape PDF Uncertainties "pdf_shape_tt", "pdf_shape_st", - "pdf_shape_dy_lep", + "pdf_shape_dy", "pdf_shape_w_lnu", "pdf_shape_ttV", "pdf_shape_VV", @@ -169,7 +169,7 @@ "tt", # "st_schannel", "st_tchannel", "st_twchannel", - "dy_lep", + "dy", "w_lnu", ] @@ -184,13 +184,13 @@ # Background regions "sr__2e__ml_tt", "sr__2e__ml_st", - "sr__2e__ml_dy_lep", + "sr__2e__ml_dy", "sr__2mu__ml_tt", "sr__2mu__ml_st", - "sr__2mu__ml_dy_lep", + "sr__2mu__ml_dy", "sr__emu__ml_tt", "sr__emu__ml_st", - "sr__emu__ml_dy_lep", + "sr__emu__ml_dy", ] dl_22 = dl.derive("dl_22", cls_dict={ diff --git a/hbw/inference/old_model.py b/hbw/inference/old_model.py index 614b292f..d1d42133 100644 --- a/hbw/inference/old_model.py +++ b/hbw/inference/old_model.py @@ -28,7 +28,7 @@ def default(self): "tt", "st", "w_lnu", - "dy_lep", + "dy", ] for proc in ml_model_processes: @@ -69,7 +69,7 @@ def default(self): "tt", # "ttv", "ttvv", "st_schannel", "st_tchannel", "st_twchannel", - "dy_lep", + "dy", "w_lnu", # "vv", # "vvv", @@ -112,7 +112,7 @@ def default(self): # add QCD scale uncertainties to inference model proc_QCDscale = { "ttbar": ["tt", "st_tchannel", "st_schannel", "st_twchannel", "ttW", "ttZ"], - "V": ["dy_lep", "w_lnu"], + "V": ["dy", "w_lnu"], "VV": ["WW", "ZZ", "WZ", "qqZZ"], "VVV": ["vvv"], "ggH": ["ggH"], @@ -151,7 +151,7 @@ def default(self): # add PDF rate uncertainties to inference model proc_pdf = { "gg": ["tt", "ttZ", "ggZZ"], - "qqbar": ["st_schannel", "st_tchannel", "dy_lep", "w_lnu", "vvv", "qqZZ", "ttW"], + "qqbar": ["st_schannel", "st_tchannel", "dy", "w_lnu", "vvv", "qqZZ", "ttW"], "qg": ["st_twchannel"], "Higgs_gg": ["ggH"], "Higgs_qqbar": ["qqH", "ZH", "WH", "VH"], diff --git a/hbw/inference/sl.py b/hbw/inference/sl.py index eb319a02..b9d59c08 100644 --- a/hbw/inference/sl.py +++ b/hbw/inference/sl.py @@ -26,7 +26,7 @@ "tt", # "ttv", "ttvv", "st_schannel", "st_tchannel", "st_twchannel", - "dy_lep", + "dy", "w_lnu", # "vv", # "vvv", @@ -92,14 +92,14 @@ # "murf_envelope_hh_ggf_kl1_kt1_hbb_hvv2l2nu", "murf_envelope_tt", "murf_envelope_st", - "murf_envelope_dy_lep", + "murf_envelope_dy", "murf_envelope_w_lnu", "murf_envelope_ttV", "murf_envelope_VV", # Shape PDF Uncertainties "pdf_shape_tt", "pdf_shape_st", - "pdf_shape_dy_lep", + "pdf_shape_dy", "pdf_shape_w_lnu", "pdf_shape_ttV", "pdf_shape_VV", @@ -176,7 +176,7 @@ "tt", # "st_schannel", "st_tchannel", "st_twchannel", - "dy_lep", + "dy", "w_lnu", ] diff --git a/hbw/inference/sl_res.py b/hbw/inference/sl_res.py index 826f8227..abdc6ca7 100644 --- a/hbw/inference/sl_res.py +++ b/hbw/inference/sl_res.py @@ -52,7 +52,7 @@ def add_inference_categories(self: InferenceModel): "graviton_hh_ggf_bbww_m600", "tt", "st", - "dy_lep", + "dy", "w_lnu", # "v_lep", # "t_bkg", @@ -64,7 +64,7 @@ def add_inference_categories(self: InferenceModel): "cat__1e_graviton_hh_ggf_bbww_m600", # "1e__ml_tt", # "1e__ml_st", - # "1e__ml_dy_lep", + # "1e__ml_dy", # "1e__ml_w_lnu", "1e__ml_v_lep", "1e__ml_t_bkg", @@ -72,7 +72,7 @@ def add_inference_categories(self: InferenceModel): "1mu__ml_graviton_hh_ggf_bbww_m600", # "1mu__ml_tt", # "1mu__ml_st", - # "1mu__ml_dy_lep", + # "1mu__ml_dy", # "1mu__ml_w_lnu", "1mu__ml_v_lep", "1mu__ml_t_bkg", @@ -83,7 +83,7 @@ def add_inference_categories(self: InferenceModel): "1e_graviton_hh_ggf_bbww_m600", # "1e__ml_tt", # "1e__ml_st", - # "1e__ml_dy_lep", + # "1e__ml_dy", # "1e__ml_w_lnu", "1e__ml_v_lep", "1e__ml_t_bkg", @@ -91,7 +91,7 @@ def add_inference_categories(self: InferenceModel): "1mu__ml_graviton_hh_ggf_bbww_m600", # "1mu__ml_tt", # "1mu__ml_st", - # "1mu__ml_dy_lep", + # "1mu__ml_dy", # "1mu__ml_w_lnu", "1mu__ml_v_lep", "1mu__ml_t_bkg", @@ -139,7 +139,7 @@ def add_inference_categories(self: InferenceModel): # "murf_envelope_st_schannel", # "murf_envelope_st_tchannel", # "murf_envelope_st_twchannel", - # "murf_envelope_dy_lep", + # "murf_envelope_dy", # "murf_envelope_w_lnu", # "murf_envelope_ttV", # "murf_envelope_VV", @@ -148,7 +148,7 @@ def add_inference_categories(self: InferenceModel): # "pdf_shape_st_schannel", # "pdf_shape_st_tchannel", # "pdf_shape_st_twchannel", - # "pdf_shape_dy_lep", + # "pdf_shape_dy", # "pdf_shape_w_lnu", # "pdf_shape_ttV", # "pdf_shape_VV", @@ -193,7 +193,7 @@ def add_inference_categories(self: InferenceModel): f"graviton_hh_ggf_bbww_m{m}", "tt", "st", - "dy_lep", + "dy", "w_lnu", ] @@ -215,12 +215,12 @@ def add_inference_categories(self: InferenceModel): f"1e__ml_graviton_hh_ggf_bbww_m{m}", "1e__ml_tt", "1e__ml_st", - "1e__ml_dy_lep", + "1e__ml_dy", "1e__ml_w_lnu", f"1mu__ml_graviton_hh_ggf_bbww_m{m}", "1mu__ml_tt", "1mu__ml_st", - "1mu__ml_dy_lep", + "1mu__ml_dy", "1mu__ml_w_lnu", ] ml_model_name = f"dense_graviton{m}" diff --git a/hbw/ml/derived/dl.py b/hbw/ml/derived/dl.py index 8b28c504..457ef46c 100644 --- a/hbw/ml/derived/dl.py +++ b/hbw/ml/derived/dl.py @@ -27,7 +27,7 @@ class DenseClassifierDL(DenseModelMixin, ModelFitMixin, MLClassifierBase): "sig", "tt", "st", - "dy_lep", + "dy", ) ml_process_weights = { @@ -41,7 +41,7 @@ class DenseClassifierDL(DenseModelMixin, ModelFitMixin, MLClassifierBase): "v_lep": 2, "tt_bkg": 2, "w_lnu": 2, - "dy_lep": 2, + "dy": 2, } input_features = [ @@ -160,7 +160,7 @@ def setup(self): dl_22post = DenseClassifierDL.derive("dl_22post", cls_dict={ "training_configs": lambda self, requested_configs: ["c22post"], - "processes": ["hh_ggf_kl1_kt1_hbb_hvv2l2nu", "tt", "st", "dy_lep"], + "processes": ["hh_ggf_kl1_kt1_hbb_hvv2l2nu", "tt", "st", "dy"], }) dl_22post_test = dl_22post.derive("dl_22post_test", cls_dict={ "processes": ["hh_ggf_kl1_kt1_hbb_hvv2l2nu", "st_tchannel_t"], @@ -171,11 +171,11 @@ def setup(self): }) dl_22 = DenseClassifierDL.derive("dl_22", cls_dict={ "training_configs": lambda self, requested_configs: ["c22post", "c22pre"], - "processes": ["hh_ggf_kl1_kt1_hbb_hvv2l2nu", "tt", "st", "dy_lep"], + "processes": ["hh_ggf_kl1_kt1_hbb_hvv2l2nu", "tt", "st", "dy"], }) dl_17 = DenseClassifierDL.derive("dl_17", cls_dict={ "training_configs": lambda self, requested_configs: ["c17"], - "processes": ["sig", "tt", "st", "dy_lep"], + "processes": ["sig", "tt", "st", "dy"], }) # testing of hyperparameter changes diff --git a/hbw/ml/derived/grid_search.py b/hbw/ml/derived/grid_search.py index 48de5415..2c3ebbae 100644 --- a/hbw/ml/derived/grid_search.py +++ b/hbw/ml/derived/grid_search.py @@ -16,7 +16,7 @@ "st": bkg_weight, "v_lep": bkg_weight, "w_lnu": bkg_weight, - "dy_lep": bkg_weight, + "dy": bkg_weight, } example_grid_search = { # 4*2*2*1*3*3*1 = 144 trainings diff --git a/hbw/ml/derived/sl.py b/hbw/ml/derived/sl.py index c7d832ca..65f6c1fc 100644 --- a/hbw/ml/derived/sl.py +++ b/hbw/ml/derived/sl.py @@ -30,7 +30,7 @@ class DenseClassifierSL(ModelFitMixin, DenseModelMixin, MLClassifierBase): "st", "v_lep", # "w_lnu", - # "dy_lep", + # "dy", ] ml_process_weights: dict = { @@ -40,7 +40,7 @@ class DenseClassifierSL(ModelFitMixin, DenseModelMixin, MLClassifierBase): "st": 2, "v_lep": 2, "w_lnu": 2, - "dy_lep": 2, + "dy": 2, } input_features: list = [ diff --git a/hbw/ml/derived/sl_res.py b/hbw/ml/derived/sl_res.py index e8fd109d..100f41e5 100644 --- a/hbw/ml/derived/sl_res.py +++ b/hbw/ml/derived/sl_res.py @@ -29,7 +29,7 @@ class DenseClassifierRes(ModelFitMixin, DenseModelMixin, MLClassifierBase): # "tt", # "st", # "w_lnu", - # "dy_lep", + # "dy", "t_bkg", "v_lep", @@ -40,7 +40,7 @@ class DenseClassifierRes(ModelFitMixin, DenseModelMixin, MLClassifierBase): # "tt": 8, # "st": 8, # "w_lnu": 8, - # "dy_lep": 8, + # "dy": 8, "t_bkg": 1, "v_lep": 1, } @@ -68,14 +68,14 @@ class DenseClassifierRes(ModelFitMixin, DenseModelMixin, MLClassifierBase): "w_lnu_ht1200To2500_madgraph", "w_lnu_ht2500_madgraph", # DY - "dy_lep_m50_ht70to100_madgraph", - "dy_lep_m50_ht100to200_madgraph", - "dy_lep_m50_ht200to400_madgraph", - "dy_lep_m50_ht400to600_madgraph", - "dy_lep_m50_ht600to800_madgraph", - "dy_lep_m50_ht800to1200_madgraph", - "dy_lep_m50_ht1200to2500_madgraph", - "dy_lep_m50_ht2500_madgraph", + "dy_m50_ht70to100_madgraph", + "dy_m50_ht100to200_madgraph", + "dy_m50_ht200to400_madgraph", + "dy_m50_ht400to600_madgraph", + "dy_m50_ht600to800_madgraph", + "dy_m50_ht800to1200_madgraph", + "dy_m50_ht1200to2500_madgraph", + "dy_m50_ht2500_madgraph", } input_features = [ @@ -220,7 +220,7 @@ def training_producers(self, config_inst: od.Config, requested_producers: Sequen # "tt", # "st", # "w_lnu", - # "dy_lep", + # "dy", "t_bkg", "v_lep", ] @@ -229,7 +229,7 @@ def training_producers(self, config_inst: od.Config, requested_producers: Sequen # "tt": 8, # "st": 8, # "w_lnu": 8, - # "dy_lep": 8, + # "dy": 8, "t_bkg": 1, "v_lep": 1, } @@ -256,14 +256,14 @@ def training_producers(self, config_inst: od.Config, requested_producers: Sequen "w_lnu_ht1200To2500_madgraph", "w_lnu_ht2500_madgraph", # DY - "dy_lep_m50_ht70to100_madgraph", - "dy_lep_m50_ht100to200_madgraph", - "dy_lep_m50_ht200to400_madgraph", - "dy_lep_m50_ht400to600_madgraph", - "dy_lep_m50_ht600to800_madgraph", - "dy_lep_m50_ht800to1200_madgraph", - "dy_lep_m50_ht1200to2500_madgraph", - "dy_lep_m50_ht2500_madgraph", + "dy_m50_ht70to100_madgraph", + "dy_m50_ht100to200_madgraph", + "dy_m50_ht200to400_madgraph", + "dy_m50_ht400to600_madgraph", + "dy_m50_ht600to800_madgraph", + "dy_m50_ht800to1200_madgraph", + "dy_m50_ht1200to2500_madgraph", + "dy_m50_ht2500_madgraph", } cls_dict_res = { "processes": processes, diff --git a/hbw/ml/old_ml_model.py b/hbw/ml/old_ml_model.py index 3ab28473..12d95f5c 100644 --- a/hbw/ml/old_ml_model.py +++ b/hbw/ml/old_ml_model.py @@ -533,7 +533,7 @@ def evaluate( "tt", "st", "w_lnu", - "dy_lep", + "dy", ] custom_procweights = { @@ -541,7 +541,7 @@ def evaluate( "tt": 8, "st": 8, "w_lnu": 8, - "dy_lep": 8, + "dy": 8, } dataset_names = { @@ -567,14 +567,14 @@ def evaluate( "w_lnu_ht1200To2500_madgraph", "w_lnu_ht2500_madgraph", # DY - "dy_lep_m50_ht70to100_madgraph", - "dy_lep_m50_ht100to200_madgraph", - "dy_lep_m50_ht200to400_madgraph", - "dy_lep_m50_ht400to600_madgraph", - "dy_lep_m50_ht600to800_madgraph", - "dy_lep_m50_ht800to1200_madgraph", - "dy_lep_m50_ht1200to2500_madgraph", - "dy_lep_m50_ht2500_madgraph", + "dy_m50_ht70to100_madgraph", + "dy_m50_ht100to200_madgraph", + "dy_m50_ht200to400_madgraph", + "dy_m50_ht400to600_madgraph", + "dy_m50_ht600to800_madgraph", + "dy_m50_ht800to1200_madgraph", + "dy_m50_ht1200to2500_madgraph", + "dy_m50_ht2500_madgraph", } input_features = [ diff --git a/hbw/scripts/hbwtasks.sh b/hbw/scripts/hbwtasks.sh index c1468d79..07ac83f4 100644 --- a/hbw/scripts/hbwtasks.sh +++ b/hbw/scripts/hbwtasks.sh @@ -210,7 +210,7 @@ hbw_plot_variables(){ } ml_output_variables="mlscore.*" -ml_categories="resolved,boosted,incl,ml_hh_ggf_kl1_kt1_hbb_hvvqqlnu,ml_tt,ml_st,ml_w_lnu,ml_dy_lep" +ml_categories="resolved,boosted,incl,ml_hh_ggf_kl1_kt1_hbb_hvvqqlnu,ml_tt,ml_st,ml_w_lnu,ml_dy" hbw_plot_ml_nodes(){ law run cf.PlotVariables1D --version $version \ diff --git a/hbw/selection/categories.py b/hbw/selection/categories.py index 83083d69..200a7243 100644 --- a/hbw/selection/categories.py +++ b/hbw/selection/categories.py @@ -272,7 +272,7 @@ def catid_2b(self: Categorizer, events: ak.Array, **kwargs) -> tuple[ak.Array, a # TODO: not hard-coded -> use config? ml_processes = [ "hh_ggf_kl1_kt1_hbb_hvvqqlnu", "hh_vbf_kv1_k2v1_kl1_hbb_hvvqqlnu", - "tt", "st", "w_lnu", "dy_lep", "v_lep", + "tt", "st", "w_lnu", "dy", "v_lep", "hh_ggf_kl1_kt1_hbb_hvv2l2nu", "t_bkg", "sig", "graviton_hh_ggf_bbww_m250", "graviton_hh_ggf_bbww_m350", "graviton_hh_ggf_bbww_m450", "graviton_hh_ggf_bbww_m600", "graviton_hh_ggf_bbww_m750", "graviton_hh_ggf_bbww_m1000", diff --git a/hbw/util.py b/hbw/util.py index 1720065c..7c0132a2 100644 --- a/hbw/util.py +++ b/hbw/util.py @@ -7,7 +7,7 @@ from __future__ import annotations import time -from typing import Hashable, Iterable, Callable, Any +from typing import Hashable, Iterable, Callable from functools import wraps import tracemalloc