diff --git a/.github/integration_cfg.yaml b/.github/integration_cfg.yaml index 630115d5..fc386796 100644 --- a/.github/integration_cfg.yaml +++ b/.github/integration_cfg.yaml @@ -25,13 +25,15 @@ variables: HH_bbWW_active: "1" HH_bbtautau_active: "1" H_mumu_active: "1" - # HH_bbWW_task: "StatInference.law.tasks.ResonantLimitsAndHistPlotTask" - HH_bbWW_task: "FLAF.Analysis.tasks.HistPlotTask" + HH_bbWW_task: "StatInference.law.tasks.ResonantLimitsAndHistPlotTask" HH_bbtautau_task: "FLAF.Analysis.tasks.HistPlotTask" H_mumu_task: "FLAF.Analysis.tasks.HistPlotTask" HH_bbWW_args: "--test 1000" HH_bbtautau_args: "--test 1000" H_mumu_args: "--test 1000" + HH_bbWW_processes: "custom_CI_Signal custom_CI_Background custom_CI_Data" + HH_bbtautau_processes: "custom_CI_Signal custom_CI_Background custom_CI_Data" + H_mumu_processes: "custom_CI_signal custom_CI_background custom_CI_data" HH_bbtautau_eras: "Run3_2022 Run3_2022EE Run3_2023 Run3_2023BPix" HH_bbWW_eras: "Run3_2022 Run3_2022EE Run3_2023 Run3_2023BPix" H_mumu_eras: "ALL" diff --git a/Common/Setup.py b/Common/Setup.py index b108f76d..19bc5816 100644 --- a/Common/Setup.py +++ b/Common/Setup.py @@ -135,6 +135,7 @@ def __init__(self, name, model_dict): ) self._processes[item] = key self._base_processes = {} + self.meta_processes = {} def processes(self, process_type=None): if process_type is None: @@ -346,6 +347,7 @@ def __init__( self.phys_model.replace_process( key, new_process_names_for_model, ignore_missing=True ) + self.phys_model.meta_processes[key] = new_process_names_for_model else: processes[key] = item @@ -375,8 +377,17 @@ def collect_base_processes(p_name, parent_name=None): if custom_process_selection is not None: if type(custom_process_selection) == str: custom_process_selection = custom_process_selection.split(",") + expanded_selection = [] + for pattern in custom_process_selection: + if ( + hasattr(self.phys_model, "meta_processes") + and pattern in self.phys_model.meta_processes + ): + expanded_selection.extend(self.phys_model.meta_processes[pattern]) + else: + expanded_selection.append(pattern) filters = ["drop ^.*"] + [ - f"keep {pattern}" for pattern in custom_process_selection + f"keep {pattern}" for pattern in expanded_selection ] self.phys_model.select_processes(filters) self.base_processes = {}