From c67e8cef946ace1fd01e2521eb54dbd4dea935ef Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Sun, 14 Apr 2024 22:49:01 +0200 Subject: [PATCH 1/8] Fix menu table code for nano --- menu_tools/rate_table/menu_table.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/menu_tools/rate_table/menu_table.py b/menu_tools/rate_table/menu_table.py index 3dd8bdf4..240e2464 100644 --- a/menu_tools/rate_table/menu_table.py +++ b/menu_tools/rate_table/menu_table.py @@ -6,6 +6,7 @@ import yaml import awkward as ak + import numpy as np import pandas as pd import vector @@ -62,7 +63,11 @@ def _transform_key(self, raw_key: str, obj: objects.Object) -> str: key: string of with the l1 object name prefix removed, qual transformed to quality """ - key = raw_key.removeprefix(obj.nano_obj_name).lower() + if raw_key.startswith("L1"): + key = raw_key.removeprefix(obj.nano_obj_name+"_") + else: + key = raw_key.removeprefix(obj.nano_obj_name).lower() + if "qual" in key: return "quality" return key @@ -84,13 +89,14 @@ def _load_cached_arrays(self, object_name: str) -> ak.Array: self.config.version, f"{self.config.version}_{self.config.sample}_{obj.nano_obj_name}.parquet", ) + arr = ak.from_parquet(fpath) # Remove object name prefix from array fields arr = ak.zip({self._transform_key(var, obj): arr[var] for var in arr.fields}) # Apply scalings, except for PV variable, which has no scalings - if "z0L1TkPV" not in object_name: + if "PV" not in object_name: arr = scalings.add_offline_pt(arr, obj) # When loading sums (MET, HT, etc.) transfrom the array structure to @@ -287,6 +293,20 @@ def print_table(self) -> None: df_table = pd.DataFrame(self.table) print(df_table) + def compute_tot_and_pure(self) -> pd.DataFrame: + + df_masks = ak.to_dataframe(self._seed_masks) + counts = {} + + for seed in df_masks.columns: + counts[seed] = { + "total": df_masks[seed].sum(), + "pure" : ((df_masks[seed]==True)&~(df_masks.drop(seed, axis=1).any(axis=1))).sum()} + + df_counts = pd.DataFrame(counts).T + + return df_counts + def make_table(self) -> None: """ Function that prints to screen the rates table. @@ -295,6 +315,7 @@ def make_table(self) -> None: table: list[dict[str, Union[str, float]]] = [] all_seeds_or_mask = ak.zeros_like(list(self._seed_masks.values())[0]) + for seed, mask in self._seed_masks.items(): # Compute seed values npass = ak.sum(mask) From a7c16940b3d1f608ab7549180e9d4f3f85e2c4d5 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Sun, 14 Apr 2024 22:49:39 +0200 Subject: [PATCH 2/8] Add V31 and 38 menu table configs --- configs/V31/rate_table/v31_cfg.yml | 4 + configs/V31/rate_table/v31_menu_cfg.yml | 440 +++++++++++++++++++ configs/V38nano/rate_table/v38_cfg.yml | 4 + configs/V38nano/rate_table/v38_menu_cfg.yml | 445 ++++++++++++++++++++ 4 files changed, 893 insertions(+) create mode 100644 configs/V31/rate_table/v31_cfg.yml create mode 100644 configs/V31/rate_table/v31_menu_cfg.yml create mode 100644 configs/V38nano/rate_table/v38_cfg.yml create mode 100644 configs/V38nano/rate_table/v38_menu_cfg.yml diff --git a/configs/V31/rate_table/v31_cfg.yml b/configs/V31/rate_table/v31_cfg.yml new file mode 100644 index 00000000..04ba0252 --- /dev/null +++ b/configs/V31/rate_table/v31_cfg.yml @@ -0,0 +1,4 @@ +version: "V31" +sample: "MinBias" +menu_config: "configs/V31/rate_table/v31_menu_cfg.yml" +table_fname: "rates_full_Final" diff --git a/configs/V31/rate_table/v31_menu_cfg.yml b/configs/V31/rate_table/v31_menu_cfg.yml new file mode 100644 index 00000000..3aec068c --- /dev/null +++ b/configs/V31/rate_table/v31_menu_cfg.yml @@ -0,0 +1,440 @@ +L1_PFHTT: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 450.0 + obj: seededConePuppiHT:default +L1_PFMHTT: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 135.5 + obj: seededConePuppiMHT:default +L1_PFMet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 200.0 + obj: puppiMET:default +L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18: + cross_masks: + - (((leg1+leg2).mass > 7.0) & (leg1.deltaR(leg2) > 0)) + - (((leg1+leg2).mass < 18.0) & (leg1.deltaR(leg2) > 0)) + - ((leg1.chg*leg2.chg < 0.0) & (leg1.deltaR(leg2) > 0)) + - ((abs(leg2.z0-leg1.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 4.4 + obj: gmtTkMuon:default + leg2: + threshold_cut: pt > 4.4 + obj: gmtTkMuon:default +L1_TkMu_PfJet_dRMax_DoubleJet_dEtaMax: + cross_masks: + - abs(leg2.eta) < 2.4 + - abs(leg2.z0-leg1['']) < 1 + - leg2.deltaR(leg3) < 0.4 + - abs(leg5.eta-leg4.eta) < 1.6 + leg1: + threshold_cut: null + obj: z0L1TkPV:default + leg2: + threshold_cut: offline_pt >= 12.0 + obj: gmtTkMuon:default + leg3: + threshold_cut: offline_pt >= 40.0 + obj: seededConePuppiJet:default + leg4: + threshold_cut: offline_pt >= 40.0 + obj: seededConePuppiJet:default + leg5: + threshold_cut: offline_pt >= 40.0 + obj: seededConePuppiJet:default +L1_DoubleTkMu0er1p5_SQ_OS_dR_Max1p4: + cross_masks: + - (abs(leg1.eta) < 1.5) + - (abs(leg2.eta) < 1.5) + - ((leg1.deltaR(leg2) < 1.4)) + - ((leg1.chg*leg2.chg < 0.0)) + - ((abs(leg2.z0-leg1.z0) < 1)) + - ((leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 0 + obj: gmtTkMuon:default + leg2: + threshold_cut: pt > 0 + obj: gmtTkMuon:default +L1_SingleTkPhoIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 36.0 + obj: tkPhoton:Iso + +L1_DoubleTkPhoIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 22.0 + obj: tkPhoton:Iso + leg2: + threshold_cut: offline_pt >= 12.0 + obj: tkPhoton:Iso +L1_PFTau_PFTau: + cross_masks: + - leg1.deltaR(leg2) > 0.5 + leg1: + threshold_cut: offline_pt > 90.0 + obj: caloTau:default + leg2: + threshold_cut: offline_pt > 90.0 + obj: caloTau:default +L1_SingleEGEle: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 51.0 + obj: EG:default:inclusive +L1_SinglePFTau: + cross_masks: [] + leg1: + threshold_cut: offline_pt > 150.0 + obj: caloTau:default +L1_SinglePfJet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 230.0 + obj: seededConePuppiJet:default +L1_SingleTkEle: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 36.0 + obj: tkElectron:NoIso:inclusive +L1_SingleTkEleIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt > 28.0 + obj: tkElectron:Iso:inclusive +L1_SingleTkMu: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 22.0 + obj: gmtTkMuon:default +L1_TkEleIso_EG: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + leg1: + threshold_cut: offline_pt >= 22.0 + obj: tkElectron:Iso:inclusive + leg2: + threshold_cut: offline_pt >= 12.0 + obj: EG:default:inclusive +L1_TkEleIso_PFHTT: + cross_masks: + - abs(leg2.zvtx-leg1['']) < 1 + leg1: + threshold_cut: null + obj: z0L1TkPV:default + leg2: + threshold_cut: offline_pt >= 26.0 + obj: tkElectron:Iso:inclusive + leg3: + threshold_cut: offline_pt >= 190.0 + obj: seededConePuppiHT:default +L1_TkEleIso_PFIsoTau: + cross_masks: + - abs(leg2.zvtx-leg1['']) < 1 + leg1: + threshold_cut: null + obj: z0L1TkPV:default + leg2: + threshold_cut: offline_pt >= 22.0 + obj: tkElectron:Iso:inclusive + leg3: + threshold_cut: offline_pt >= 45.0 + obj: nnTau:default +L1_TkEle_PFJet_dRMin: + cross_masks: + - abs(leg2.zvtx-leg1['']) < 1 + - leg2.deltaR(leg3) > 0.3 + leg1: + threshold_cut: null + obj: z0L1TkPV:default + leg2: + threshold_cut: offline_pt >= 28.0 + obj: tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt >= 40.0 + obj: seededConePuppiJet:default +L1_TkEle_TkMu: + cross_masks: + - abs(leg2.z0-leg1.zvtx) < 1 + leg1: + threshold_cut: offline_pt >= 10.0 + obj: tkElectron:NoIso:inclusive + leg2: + threshold_cut: offline_pt >= 20.0 + obj: gmtTkMuon:default +L1_TkMu_DoubleTkEle: + cross_masks: + - abs(leg2.zvtx-leg1.z0) < 1 + - abs(leg3.zvtx-leg1.z0) < 1 + leg1: + threshold_cut: pt > 6 + obj: gmtTkMuon:default + leg2: + threshold_cut: offline_pt >= 17.0 + obj: tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt >= 17.0 + obj: tkElectron:NoIso:inclusive +L1_TkMu_PfHTT: + cross_masks: + - abs(leg2.z0-leg1['']) < 1 + leg1: + threshold_cut: null + obj: z0L1TkPV:default + leg2: + threshold_cut: pt > 6 + obj: gmtTkMuon:default + leg3: + threshold_cut: offline_pt >= 320.0 + obj: seededConePuppiHT:default +L1_TkMu_PfJet_PfMet: + cross_masks: + - abs(leg2.z0-leg1['']) < 1 + leg1: + threshold_cut: null + obj: z0L1TkPV:default + leg2: + threshold_cut: pt > 3 + obj: gmtTkMuon:default + leg3: + threshold_cut: offline_pt >= 110.0 + obj: seededConePuppiJet:default + leg4: + threshold_cut: offline_pt >= 120.0 + obj: puppiMET:default +L1_TkMu_TkEle: + cross_masks: + - abs(leg2.zvtx-leg1.z0) < 1 + leg1: + threshold_cut: pt > 7 + obj: gmtTkMuon:default + leg2: + threshold_cut: offline_pt >= 23.0 + obj: tkElectron:NoIso:inclusive +L1_TkMu_TkEleIso: + cross_masks: + - abs(leg2.zvtx-leg1.z0) < 1 + leg1: + threshold_cut: pt > 7 + obj: gmtTkMuon:default + leg2: + threshold_cut: offline_pt >= 20.0 + obj: tkElectron:Iso:inclusive +L1_TripleTkMu: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: gmtTkMuon:default + leg2: + threshold_cut: pt > 3 + obj: gmtTkMuon:default + leg3: + threshold_cut: pt > 3 + obj: gmtTkMuon:default +L1_TripleTkMu_5SQ_3SQ_0OQ_DoubleMu_5_3_SQ_OS_Mass_Max9: + cross_masks: + - (leg1+leg2).mass < 9.0 + - leg1.chg*leg2.chg < 0.0 + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: gmtTkMuon:default + leg2: + threshold_cut: pt > 3 + obj: gmtTkMuon:default + leg3: + threshold_cut: pt > 0 + obj: gmtTkMuon:default +L1_TripleTkMu_5_3p5_2p5_OS_Mass_5to17: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - leg1.chg*leg3.chg < 0.0 + - (leg1+leg3).mass > 5.0 + - (leg1+leg3).mass < 17.0 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: gmtTkMuon:default + leg2: + threshold_cut: pt > 3.5 + obj: gmtTkMuon:default + leg3: + threshold_cut: pt > 2.5 + obj: gmtTkMuon:default +L1_DoubleTkEle_PFHTT: + cross_masks: + - (abs(leg2.zvtx-leg1['']) < 1 & (leg2.deltaR(leg3) > 0)) + - (abs(leg3.zvtx-leg1['']) < 1 & (leg2.deltaR(leg3) > 0)) + - (leg3.deltaR(leg2) > 0) + leg1: + threshold_cut: null + obj: z0L1TkPV:default + leg2: + threshold_cut: offline_pt > 8.0 + obj: tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt > 8.0 + obj: tkElectron:NoIso:inclusive + leg4: + threshold_cut: offline_pt > 390.0 + obj: seededConePuppiHT:default +L1_DoubleEGEle: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + leg1: + threshold_cut: offline_pt >= 37.0 + obj: EG:default:inclusive + leg2: + threshold_cut: offline_pt >= 24.0 + obj: EG:default:inclusive +L1_DoublePFJet_MassMin: + cross_masks: + - (leg1 + leg2).mass > 620 + leg1: + threshold_cut: offline_pt >= 160.0 + obj: seededConePuppiJet:default + leg2: + threshold_cut: offline_pt >= 35.0 + obj: seededConePuppiJet:default +L1_DoublePFJet_dEtaMax: + cross_masks: + - abs(leg2.eta-leg1.eta) < 1.6 + leg1: + threshold_cut: leg1.offline_pt >= 112.0 + obj: seededConePuppiJet:default + leg2: + threshold_cut: leg2.offline_pt >= 112.0 + obj: seededConePuppiJet:default +L1_DoubleTkEle: + cross_masks: + - abs(leg2.zvtx-leg1.zvtx) < 1 + leg1: + threshold_cut: offline_pt >= 25.0 + obj: tkElectron:NoIso:inclusive + leg2: + threshold_cut: offline_pt >= 12.0 + obj: tkElectron:NoIso:inclusive +L1_DoubleTkMu: + cross_masks: + - ((abs(leg1.z0-leg2.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: offline_pt > 15.0 + obj: gmtTkMuon:default + leg2: + threshold_cut: pt > 7 + obj: gmtTkMuon:default +L1_DoubleTkMu4_SQ_OS_dR_Max1p2: + cross_masks: + - ((leg1.deltaR(leg2) < 1.2) & (leg1.deltaR(leg2) > 0)) + - ((leg1.chg*leg2.chg < 0.0) & (leg1.deltaR(leg2) > 0)) + - ((abs(leg2.z0-leg1.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 4 + obj: gmtTkMuon:default + leg2: + threshold_cut: pt > 4 + obj: gmtTkMuon:default +L1_DoubleTkMu_PfHTT: + cross_masks: + - (abs(leg2.z0-leg1['']) < 1 & (leg3.deltaR(leg2) > 0)) + - (abs(leg3.z0-leg1['']) < 1 & (leg3.deltaR(leg2) > 0)) + - (leg3.deltaR(leg2) > 0) + leg1: + threshold_cut: null + obj: z0L1TkPV:default + leg2: + threshold_cut: pt > 3 + obj: gmtTkMuon:default + leg3: + threshold_cut: pt > 3 + obj: gmtTkMuon:default + leg4: + threshold_cut: offline_pt >= 300.0 + obj: seededConePuppiHT:default +L1_DoubleTkMu_PfJet_PfMet: + cross_masks: + - abs(leg2.z0-leg1['']) < 1 + - abs(leg3.z0-leg1['']) < 1 + leg1: + threshold_cut: null + obj: z0L1TkPV:default + leg2: + threshold_cut: pt > 3 + obj: gmtTkMuon:default + leg3: + threshold_cut: pt > 3 + obj: gmtTkMuon:default + leg4: + threshold_cut: offline_pt >= 60.0 + obj: seededConePuppiJet:default + leg5: + threshold_cut: offline_pt >= 130.0 + obj: puppiMET:default +L1_DoubleTkMu_TkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.zvtx-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: gmtTkMuon:default + leg2: + threshold_cut: pt > 5 + obj: gmtTkMuon:default + leg3: + threshold_cut: offline_pt >= 9.0 + obj: tkElectron:NoIso:inclusive +L1_PFHTT_QuadJet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 400.0 + obj: seededConePuppiHT:default + leg2: + threshold_cut: offline_pt >= 70.0 + obj: seededConePuppiJet:default + leg3: + threshold_cut: offline_pt >= 55.0 + obj: seededConePuppiJet:default + leg4: + threshold_cut: offline_pt >= 40.0 + obj: seededConePuppiJet:default + leg5: + threshold_cut: offline_pt >= 40.0 + obj: seededConePuppiJet:default +L1_PFIsoTau_PFIsoTau: + cross_masks: + - leg1.deltaR(leg2) > 0.5 + leg1: + threshold_cut: offline_pt >= 52.0 + obj: nnTau:default + leg2: + threshold_cut: offline_pt >= 52.0 + obj: nnTau:default +L1_PFIsoTau_PFMet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 55.0 + obj: nnTau:default + leg2: + threshold_cut: offline_pt >= 190.0 + obj: puppiMET:default +L1_PFIsoTau_TkMu: + cross_masks: + - abs(leg3.z0-leg1['']) < 1 + leg1: + threshold_cut: null + obj: z0L1TkPV:default + leg2: + threshold_cut: offline_pt >= 42.0 + obj: nnTau:default + leg3: + threshold_cut: offline_pt >= 18.0 + obj: gmtTkMuon:default diff --git a/configs/V38nano/rate_table/v38_cfg.yml b/configs/V38nano/rate_table/v38_cfg.yml new file mode 100644 index 00000000..252b9df8 --- /dev/null +++ b/configs/V38nano/rate_table/v38_cfg.yml @@ -0,0 +1,4 @@ +version: "V38nano" +sample: "MinBias" +menu_config: "configs/V38nano/rate_table/v38_menu_cfg.yml" +table_fname: "rates_full_Final" diff --git a/configs/V38nano/rate_table/v38_menu_cfg.yml b/configs/V38nano/rate_table/v38_menu_cfg.yml new file mode 100644 index 00000000..c3428fe7 --- /dev/null +++ b/configs/V38nano/rate_table/v38_menu_cfg.yml @@ -0,0 +1,445 @@ +L1_PFHTT: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 450.0 + obj: L1puppiJetSC4sums:HT +L1_PFMHTT: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 135.5 + obj: L1puppiJetSC4sums:MHT +L1_PFMet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 200.0 + obj: L1puppiMET:default +# L1_PFMLMet: +# cross_masks: [] +# leg1: +# threshold_cut: offline_pt >= 200.0 +# obj: L1puppiMLMET:default +L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18: + cross_masks: + - (((leg1+leg2).mass > 7.0) & (leg1.deltaR(leg2) > 0)) + - (((leg1+leg2).mass < 18.0) & (leg1.deltaR(leg2) > 0)) + - ((leg1.charge*leg2.charge < 0.0) & (leg1.deltaR(leg2) > 0)) + - ((abs(leg2.z0-leg1.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 4.4 + obj: L1gmtTkMuon:default + leg2: + threshold_cut: pt > 4.4 + obj: L1gmtTkMuon:default +L1_TkMu_PfJet_dRMax_DoubleJet_dEtaMax: + cross_masks: + - abs(leg2.eta) < 2.4 + - abs(leg2.z0-leg1.z0) < 1 + - leg2.deltaR(leg3) < 0.4 + - abs(leg5.eta-leg4.eta) < 1.6 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1gmtTkMuon:default + leg3: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default + leg4: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default + leg5: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default +L1_DoubleTkMu0er1p5_SQ_OS_dR_Max1p4: + cross_masks: + - (abs(leg1.eta) < 1.5) + - (abs(leg2.eta) < 1.5) + - ((leg1.deltaR(leg2) < 1.4)) + - ((leg1.charge*leg2.charge < 0.0)) + - ((abs(leg2.z0-leg1.z0) < 1)) + - ((leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 0 + obj: L1gmtTkMuon:default + leg2: + threshold_cut: pt > 0 + obj: L1gmtTkMuon:default +L1_SingleTkPhoIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 36.0 + obj: L1tkPhoton:Iso + +L1_DoubleTkPhoIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 22.0 + obj: L1tkPhoton:Iso + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1tkPhoton:Iso +L1_PFTau_PFTau: + cross_masks: + - leg1.deltaR(leg2) > 0.5 + leg1: + threshold_cut: offline_pt > 90.0 + obj: L1caloTau:default + leg2: + threshold_cut: offline_pt > 90.0 + obj: L1caloTau:default +L1_SingleEGEle: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 51.0 + obj: L1EG:default:inclusive +L1_SinglePFTau: + cross_masks: [] + leg1: + threshold_cut: offline_pt > 150.0 + obj: L1caloTau:default +L1_SinglePfJet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 230.0 + obj: L1puppiJetSC4:default +L1_SingleTkEle: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 36.0 + obj: L1tkElectron:NoIso:inclusive +L1_SingleTkEleIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt > 28.0 + obj: L1tkElectron:Iso:inclusive +L1_SingleTkMu: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 22.0 + obj: L1gmtTkMuon:default +L1_TkEleIso_EG: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + leg1: + threshold_cut: offline_pt >= 22.0 + obj: L1tkElectron:Iso:inclusive + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1EG:default:inclusive +L1_TkEleIso_PFHTT: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 26.0 + obj: L1tkElectron:Iso:inclusive + leg3: + threshold_cut: offline_pt >= 190.0 + obj: L1puppiJetSC4sums:HT +L1_TkEleIso_PFIsoTau: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 22.0 + obj: L1tkElectron:Iso:inclusive + leg3: + threshold_cut: offline_pt >= 45.0 + obj: L1nnPuppiTau:default +L1_TkEle_PFJet_dRMin: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - leg2.deltaR(leg3) > 0.3 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 28.0 + obj: L1tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default +L1_TkEle_TkMu: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: offline_pt >= 10.0 + obj: L1tkElectron:NoIso:inclusive + leg2: + threshold_cut: offline_pt >= 20.0 + obj: L1gmtTkMuon:default +L1_TkMu_DoubleTkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 6 + obj: L1gmtTkMuon:default + leg2: + threshold_cut: offline_pt >= 17.0 + obj: L1tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt >= 17.0 + obj: L1tkElectron:NoIso:inclusive +L1_TkMu_PfHTT: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 6 + obj: L1gmtTkMuon:default + leg3: + threshold_cut: offline_pt >= 320.0 + obj: L1puppiJetSC4sums:HT +L1_TkMu_PfJet_PfMet: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:default + leg3: + threshold_cut: offline_pt >= 110.0 + obj: L1puppiJetSC4:default + leg4: + threshold_cut: offline_pt >= 120.0 + obj: L1puppiMET:default +L1_TkMu_TkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 7 + obj: L1gmtTkMuon:default + leg2: + threshold_cut: offline_pt >= 23.0 + obj: L1tkElectron:NoIso:inclusive +L1_TkMu_TkEleIso: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 7 + obj: L1gmtTkMuon:default + leg2: + threshold_cut: offline_pt >= 20.0 + obj: L1tkElectron:Iso:inclusive +L1_TripleTkMu: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:default + leg3: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:default +L1_TripleTkMu_5SQ_3SQ_0OQ_DoubleMu_5_3_SQ_OS_Mass_Max9: + cross_masks: + - (leg1+leg2).mass < 9.0 + - leg1.charge*leg2.charge < 0.0 + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:default + leg3: + threshold_cut: pt > 0 + obj: L1gmtTkMuon:default +L1_TripleTkMu_5_3p5_2p5_OS_Mass_5to17: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - leg1.charge*leg3.charge < 0.0 + - (leg1+leg3).mass > 5.0 + - (leg1+leg3).mass < 17.0 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:default + leg2: + threshold_cut: pt > 3.5 + obj: L1gmtTkMuon:default + leg3: + threshold_cut: pt > 2.5 + obj: L1gmtTkMuon:default +L1_DoubleTkEle_PFHTT: + cross_masks: + - (abs(leg2.z0-leg1.z0) < 1 & (leg2.deltaR(leg3) > 0)) + - (abs(leg3.z0-leg1.z0) < 1 & (leg2.deltaR(leg3) > 0)) + - (leg3.deltaR(leg2) > 0) + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt > 8.0 + obj: L1tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt > 8.0 + obj: L1tkElectron:NoIso:inclusive + leg4: + threshold_cut: offline_pt > 390.0 + obj: L1puppiJetSC4sums:HT +L1_DoubleEGEle: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + leg1: + threshold_cut: offline_pt >= 37.0 + obj: L1EG:default:inclusive + leg2: + threshold_cut: offline_pt >= 24.0 + obj: L1EG:default:inclusive +L1_DoublePFJet_MassMin: + cross_masks: + - (leg1 + leg2).mass > 620 + leg1: + threshold_cut: offline_pt >= 160.0 + obj: L1puppiJetSC4:default + leg2: + threshold_cut: offline_pt >= 35.0 + obj: L1puppiJetSC4:default +L1_DoublePFJet_dEtaMax: + cross_masks: + - abs(leg2.eta-leg1.eta) < 1.6 + leg1: + threshold_cut: leg1.offline_pt >= 112.0 + obj: L1puppiJetSC4:default + leg2: + threshold_cut: leg2.offline_pt >= 112.0 + obj: L1puppiJetSC4:default +L1_DoubleTkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: offline_pt >= 25.0 + obj: L1tkElectron:NoIso:inclusive + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1tkElectron:NoIso:inclusive +L1_DoubleTkMu: + cross_masks: + - ((abs(leg1.z0-leg2.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: offline_pt > 15.0 + obj: L1gmtTkMuon:default + leg2: + threshold_cut: pt > 7 + obj: L1gmtTkMuon:default +L1_DoubleTkMu4_SQ_OS_dR_Max1p2: + cross_masks: + - ((leg1.deltaR(leg2) < 1.2) & (leg1.deltaR(leg2) > 0)) + - ((leg1.charge*leg2.charge < 0.0) & (leg1.deltaR(leg2) > 0)) + - ((abs(leg2.z0-leg1.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 4 + obj: L1gmtTkMuon:default + leg2: + threshold_cut: pt > 4 + obj: L1gmtTkMuon:default +L1_DoubleTkMu_PfHTT: + cross_masks: + - (abs(leg2.z0-leg1.z0) < 1 & (leg3.deltaR(leg2) > 0)) + - (abs(leg3.z0-leg1.z0) < 1 & (leg3.deltaR(leg2) > 0)) + - (leg3.deltaR(leg2) > 0) + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:default + leg3: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:default + leg4: + threshold_cut: offline_pt >= 300.0 + obj: L1puppiJetSC4sums:HT +L1_DoubleTkMu_PfJet_PfMet: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:default + leg3: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:default + leg4: + threshold_cut: offline_pt >= 60.0 + obj: L1puppiJetSC4:default + leg5: + threshold_cut: offline_pt >= 130.0 + obj: L1puppiMET:default +L1_DoubleTkMu_TkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:default + leg2: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:default + leg3: + threshold_cut: offline_pt >= 9.0 + obj: L1tkElectron:NoIso:inclusive +L1_PFHTT_QuadJet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 400.0 + obj: L1puppiJetSC4sums:HT + leg2: + threshold_cut: offline_pt >= 70.0 + obj: L1puppiJetSC4:default + leg3: + threshold_cut: offline_pt >= 55.0 + obj: L1puppiJetSC4:default + leg4: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default + leg5: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default +L1_PFIsoTau_PFIsoTau: + cross_masks: + - leg1.deltaR(leg2) > 0.5 + leg1: + threshold_cut: offline_pt >= 52.0 + obj: L1nnPuppiTau:default + leg2: + threshold_cut: offline_pt >= 52.0 + obj: L1nnPuppiTau:default +L1_PFIsoTau_PFMet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 55.0 + obj: L1nnPuppiTau:default + leg2: + threshold_cut: offline_pt >= 190.0 + obj: L1puppiMET:default +L1_PFIsoTau_TkMu: + cross_masks: + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 42.0 + obj: L1nnPuppiTau:default + leg3: + threshold_cut: offline_pt >= 18.0 + obj: L1gmtTkMuon:default From e801cc5f73c3c41cc4c591535f22d92454aad3bc Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Mon, 15 Apr 2024 11:26:34 +0200 Subject: [PATCH 3/8] Add PV object for table --- configs/V31/objects/pv.yaml | 4 ++++ configs/V38nano/objects/pv.yaml | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 configs/V31/objects/pv.yaml create mode 100644 configs/V38nano/objects/pv.yaml diff --git a/configs/V31/objects/pv.yaml b/configs/V31/objects/pv.yaml new file mode 100644 index 00000000..adc3eab4 --- /dev/null +++ b/configs/V31/objects/pv.yaml @@ -0,0 +1,4 @@ +z0L1TkPV: + label: "Primary Vertex" + ids: + default: {} diff --git a/configs/V38nano/objects/pv.yaml b/configs/V38nano/objects/pv.yaml new file mode 100644 index 00000000..25fea9c0 --- /dev/null +++ b/configs/V38nano/objects/pv.yaml @@ -0,0 +1,4 @@ +L1PV: + label: "Primary Vertex" + ids: + default: {} From a2d4034d30ca5da1d563a7996966ff8e053ad7a1 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Mon, 15 Apr 2024 12:23:31 +0200 Subject: [PATCH 4/8] Add array cache in table code --- menu_tools/rate_table/menu_table.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/menu_tools/rate_table/menu_table.py b/menu_tools/rate_table/menu_table.py index 240e2464..62f15dcd 100644 --- a/menu_tools/rate_table/menu_table.py +++ b/menu_tools/rate_table/menu_table.py @@ -30,6 +30,7 @@ class MenuTable: def __init__(self, config: dict): self.config: MenuConfig = MenuConfig(config) + self.arr_cache = {} self.table: Optional[list[dict[str, Union[str, float]]]] = None self._trigger_seeds: Optional[dict] = None self._seed_masks: dict[str, np.ndarray] = {} @@ -130,7 +131,14 @@ def get_legs_arrays_for_seed( # Load object array if not already loeaded if leg["obj"] not in raw_object_arrays: print("Loading ", leg["obj"]) - raw_object_arrays[leg["obj"]] = self._load_cached_arrays(leg["obj"]) + + if leg["obj"] not in self.arr_cache: + print(f"Caching {leg['obj']}") + self.arr_cache[leg["obj"]] = self._load_cached_arrays(leg["obj"]) + else: + print(f"Using cached {leg['obj']}") + # raw_object_arrays[leg["obj"]] = self._load_cached_arrays(leg["obj"]) + raw_object_arrays[leg["obj"]] = self.arr_cache[leg["obj"]] # Prepare object ID mask obj = objects.Object(leg["obj"], self.config.version) @@ -278,8 +286,8 @@ def _prepare_masks(self) -> dict[str, np.ndarray]: mask = self.get_trigger_pass_mask(seed_name) seed_masks[seed_name] = mask.to_numpy() self._seed_masks = seed_masks - self.make_table() - self.print_table() + # self.make_table() + # self.print_table() return seed_masks From 451d9f0232629e17ad9a7c05ca77cb3dab1d5285 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Mon, 15 Apr 2024 12:23:50 +0200 Subject: [PATCH 5/8] Add v38 menu tavbles with TkMuon IDs --- .../rate_table/v38_TkMuonLooseID_cfg.yml | 4 + .../rate_table/v38_TkMuonMediumID_cfg.yml | 4 + .../rate_table/v38_menu_TkMuonLooseID_cfg.yml | 445 ++++++++++++++++++ .../v38_menu_TkMuonMediumID_cfg.yml | 445 ++++++++++++++++++ 4 files changed, 898 insertions(+) create mode 100644 configs/V38nano/rate_table/v38_TkMuonLooseID_cfg.yml create mode 100644 configs/V38nano/rate_table/v38_TkMuonMediumID_cfg.yml create mode 100644 configs/V38nano/rate_table/v38_menu_TkMuonLooseID_cfg.yml create mode 100644 configs/V38nano/rate_table/v38_menu_TkMuonMediumID_cfg.yml diff --git a/configs/V38nano/rate_table/v38_TkMuonLooseID_cfg.yml b/configs/V38nano/rate_table/v38_TkMuonLooseID_cfg.yml new file mode 100644 index 00000000..dadd5701 --- /dev/null +++ b/configs/V38nano/rate_table/v38_TkMuonLooseID_cfg.yml @@ -0,0 +1,4 @@ +version: "V38nano" +sample: "MinBias" +menu_config: "configs/V38nano/rate_table/v38_menu_TkMuonLooseID_cfg.yml" +table_fname: "rates_full_TkMuonLooseID" diff --git a/configs/V38nano/rate_table/v38_TkMuonMediumID_cfg.yml b/configs/V38nano/rate_table/v38_TkMuonMediumID_cfg.yml new file mode 100644 index 00000000..422fe8ea --- /dev/null +++ b/configs/V38nano/rate_table/v38_TkMuonMediumID_cfg.yml @@ -0,0 +1,4 @@ +version: "V38nano" +sample: "MinBias" +menu_config: "configs/V38nano/rate_table/v38_menu_TkMuonMediumID_cfg.yml" +table_fname: "rates_full_TkMuonMediumID" diff --git a/configs/V38nano/rate_table/v38_menu_TkMuonLooseID_cfg.yml b/configs/V38nano/rate_table/v38_menu_TkMuonLooseID_cfg.yml new file mode 100644 index 00000000..5a412a41 --- /dev/null +++ b/configs/V38nano/rate_table/v38_menu_TkMuonLooseID_cfg.yml @@ -0,0 +1,445 @@ +L1_PFHTT: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 450.0 + obj: L1puppiJetSC4sums:HT +L1_PFMHTT: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 135.5 + obj: L1puppiJetSC4sums:MHT +L1_PFMet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 200.0 + obj: L1puppiMET:default +# L1_PFMLMet: +# cross_masks: [] +# leg1: +# threshold_cut: offline_pt >= 200.0 +# obj: L1puppiMLMET:default +L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18: + cross_masks: + - (((leg1+leg2).mass > 7.0) & (leg1.deltaR(leg2) > 0)) + - (((leg1+leg2).mass < 18.0) & (leg1.deltaR(leg2) > 0)) + - ((leg1.charge*leg2.charge < 0.0) & (leg1.deltaR(leg2) > 0)) + - ((abs(leg2.z0-leg1.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 4.4 + obj: L1gmtTkMuon:Loose + leg2: + threshold_cut: pt > 4.4 + obj: L1gmtTkMuon:Loose +L1_TkMu_PfJet_dRMax_DoubleJet_dEtaMax: + cross_masks: + - abs(leg2.eta) < 2.4 + - abs(leg2.z0-leg1.z0) < 1 + - leg2.deltaR(leg3) < 0.4 + - abs(leg5.eta-leg4.eta) < 1.6 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1gmtTkMuon:Loose + leg3: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default + leg4: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default + leg5: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default +L1_DoubleTkMu0er1p5_SQ_OS_dR_Max1p4: + cross_masks: + - (abs(leg1.eta) < 1.5) + - (abs(leg2.eta) < 1.5) + - ((leg1.deltaR(leg2) < 1.4)) + - ((leg1.charge*leg2.charge < 0.0)) + - ((abs(leg2.z0-leg1.z0) < 1)) + - ((leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 0 + obj: L1gmtTkMuon:Loose + leg2: + threshold_cut: pt > 0 + obj: L1gmtTkMuon:Loose +L1_SingleTkPhoIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 36.0 + obj: L1tkPhoton:Iso + +L1_DoubleTkPhoIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 22.0 + obj: L1tkPhoton:Iso + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1tkPhoton:Iso +L1_PFTau_PFTau: + cross_masks: + - leg1.deltaR(leg2) > 0.5 + leg1: + threshold_cut: offline_pt > 90.0 + obj: L1caloTau:default + leg2: + threshold_cut: offline_pt > 90.0 + obj: L1caloTau:default +L1_SingleEGEle: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 51.0 + obj: L1EG:default:inclusive +L1_SinglePFTau: + cross_masks: [] + leg1: + threshold_cut: offline_pt > 150.0 + obj: L1caloTau:default +L1_SinglePfJet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 230.0 + obj: L1puppiJetSC4:default +L1_SingleTkEle: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 36.0 + obj: L1tkElectron:NoIso:inclusive +L1_SingleTkEleIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt > 28.0 + obj: L1tkElectron:Iso:inclusive +L1_SingleTkMu: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 22.0 + obj: L1gmtTkMuon:Loose +L1_TkEleIso_EG: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + leg1: + threshold_cut: offline_pt >= 22.0 + obj: L1tkElectron:Iso:inclusive + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1EG:default:inclusive +L1_TkEleIso_PFHTT: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 26.0 + obj: L1tkElectron:Iso:inclusive + leg3: + threshold_cut: offline_pt >= 190.0 + obj: L1puppiJetSC4sums:HT +L1_TkEleIso_PFIsoTau: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 22.0 + obj: L1tkElectron:Iso:inclusive + leg3: + threshold_cut: offline_pt >= 45.0 + obj: L1nnPuppiTau:default +L1_TkEle_PFJet_dRMin: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - leg2.deltaR(leg3) > 0.3 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 28.0 + obj: L1tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default +L1_TkEle_TkMu: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: offline_pt >= 10.0 + obj: L1tkElectron:NoIso:inclusive + leg2: + threshold_cut: offline_pt >= 20.0 + obj: L1gmtTkMuon:Loose +L1_TkMu_DoubleTkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 6 + obj: L1gmtTkMuon:Loose + leg2: + threshold_cut: offline_pt >= 17.0 + obj: L1tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt >= 17.0 + obj: L1tkElectron:NoIso:inclusive +L1_TkMu_PfHTT: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 6 + obj: L1gmtTkMuon:Loose + leg3: + threshold_cut: offline_pt >= 320.0 + obj: L1puppiJetSC4sums:HT +L1_TkMu_PfJet_PfMet: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Loose + leg3: + threshold_cut: offline_pt >= 110.0 + obj: L1puppiJetSC4:default + leg4: + threshold_cut: offline_pt >= 120.0 + obj: L1puppiMET:default +L1_TkMu_TkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 7 + obj: L1gmtTkMuon:Loose + leg2: + threshold_cut: offline_pt >= 23.0 + obj: L1tkElectron:NoIso:inclusive +L1_TkMu_TkEleIso: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 7 + obj: L1gmtTkMuon:Loose + leg2: + threshold_cut: offline_pt >= 20.0 + obj: L1tkElectron:Iso:inclusive +L1_TripleTkMu: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Loose + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Loose + leg3: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Loose +L1_TripleTkMu_5SQ_3SQ_0OQ_DoubleMu_5_3_SQ_OS_Mass_Max9: + cross_masks: + - (leg1+leg2).mass < 9.0 + - leg1.charge*leg2.charge < 0.0 + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Loose + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Loose + leg3: + threshold_cut: pt > 0 + obj: L1gmtTkMuon:Loose +L1_TripleTkMu_5_3p5_2p5_OS_Mass_5to17: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - leg1.charge*leg3.charge < 0.0 + - (leg1+leg3).mass > 5.0 + - (leg1+leg3).mass < 17.0 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Loose + leg2: + threshold_cut: pt > 3.5 + obj: L1gmtTkMuon:Loose + leg3: + threshold_cut: pt > 2.5 + obj: L1gmtTkMuon:Loose +L1_DoubleTkEle_PFHTT: + cross_masks: + - (abs(leg2.z0-leg1.z0) < 1 & (leg2.deltaR(leg3) > 0)) + - (abs(leg3.z0-leg1.z0) < 1 & (leg2.deltaR(leg3) > 0)) + - (leg3.deltaR(leg2) > 0) + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt > 8.0 + obj: L1tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt > 8.0 + obj: L1tkElectron:NoIso:inclusive + leg4: + threshold_cut: offline_pt > 390.0 + obj: L1puppiJetSC4sums:HT +L1_DoubleEGEle: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + leg1: + threshold_cut: offline_pt >= 37.0 + obj: L1EG:default:inclusive + leg2: + threshold_cut: offline_pt >= 24.0 + obj: L1EG:default:inclusive +L1_DoublePFJet_MassMin: + cross_masks: + - (leg1 + leg2).mass > 620 + leg1: + threshold_cut: offline_pt >= 160.0 + obj: L1puppiJetSC4:default + leg2: + threshold_cut: offline_pt >= 35.0 + obj: L1puppiJetSC4:default +L1_DoublePFJet_dEtaMax: + cross_masks: + - abs(leg2.eta-leg1.eta) < 1.6 + leg1: + threshold_cut: leg1.offline_pt >= 112.0 + obj: L1puppiJetSC4:default + leg2: + threshold_cut: leg2.offline_pt >= 112.0 + obj: L1puppiJetSC4:default +L1_DoubleTkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: offline_pt >= 25.0 + obj: L1tkElectron:NoIso:inclusive + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1tkElectron:NoIso:inclusive +L1_DoubleTkMu: + cross_masks: + - ((abs(leg1.z0-leg2.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: offline_pt > 15.0 + obj: L1gmtTkMuon:Loose + leg2: + threshold_cut: pt > 7 + obj: L1gmtTkMuon:Loose +L1_DoubleTkMu4_SQ_OS_dR_Max1p2: + cross_masks: + - ((leg1.deltaR(leg2) < 1.2) & (leg1.deltaR(leg2) > 0)) + - ((leg1.charge*leg2.charge < 0.0) & (leg1.deltaR(leg2) > 0)) + - ((abs(leg2.z0-leg1.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 4 + obj: L1gmtTkMuon:Loose + leg2: + threshold_cut: pt > 4 + obj: L1gmtTkMuon:Loose +L1_DoubleTkMu_PfHTT: + cross_masks: + - (abs(leg2.z0-leg1.z0) < 1 & (leg3.deltaR(leg2) > 0)) + - (abs(leg3.z0-leg1.z0) < 1 & (leg3.deltaR(leg2) > 0)) + - (leg3.deltaR(leg2) > 0) + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Loose + leg3: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Loose + leg4: + threshold_cut: offline_pt >= 300.0 + obj: L1puppiJetSC4sums:HT +L1_DoubleTkMu_PfJet_PfMet: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Loose + leg3: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Loose + leg4: + threshold_cut: offline_pt >= 60.0 + obj: L1puppiJetSC4:default + leg5: + threshold_cut: offline_pt >= 130.0 + obj: L1puppiMET:default +L1_DoubleTkMu_TkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Loose + leg2: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Loose + leg3: + threshold_cut: offline_pt >= 9.0 + obj: L1tkElectron:NoIso:inclusive +L1_PFHTT_QuadJet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 400.0 + obj: L1puppiJetSC4sums:HT + leg2: + threshold_cut: offline_pt >= 70.0 + obj: L1puppiJetSC4:default + leg3: + threshold_cut: offline_pt >= 55.0 + obj: L1puppiJetSC4:default + leg4: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default + leg5: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default +L1_PFIsoTau_PFIsoTau: + cross_masks: + - leg1.deltaR(leg2) > 0.5 + leg1: + threshold_cut: offline_pt >= 52.0 + obj: L1nnPuppiTau:default + leg2: + threshold_cut: offline_pt >= 52.0 + obj: L1nnPuppiTau:default +L1_PFIsoTau_PFMet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 55.0 + obj: L1nnPuppiTau:default + leg2: + threshold_cut: offline_pt >= 190.0 + obj: L1puppiMET:default +L1_PFIsoTau_TkMu: + cross_masks: + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 42.0 + obj: L1nnPuppiTau:default + leg3: + threshold_cut: offline_pt >= 18.0 + obj: L1gmtTkMuon:Loose diff --git a/configs/V38nano/rate_table/v38_menu_TkMuonMediumID_cfg.yml b/configs/V38nano/rate_table/v38_menu_TkMuonMediumID_cfg.yml new file mode 100644 index 00000000..30871bf5 --- /dev/null +++ b/configs/V38nano/rate_table/v38_menu_TkMuonMediumID_cfg.yml @@ -0,0 +1,445 @@ +L1_PFHTT: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 450.0 + obj: L1puppiJetSC4sums:HT +L1_PFMHTT: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 135.5 + obj: L1puppiJetSC4sums:MHT +L1_PFMet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 200.0 + obj: L1puppiMET:default +# L1_PFMLMet: +# cross_masks: [] +# leg1: +# threshold_cut: offline_pt >= 200.0 +# obj: L1puppiMLMET:default +L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18: + cross_masks: + - (((leg1+leg2).mass > 7.0) & (leg1.deltaR(leg2) > 0)) + - (((leg1+leg2).mass < 18.0) & (leg1.deltaR(leg2) > 0)) + - ((leg1.charge*leg2.charge < 0.0) & (leg1.deltaR(leg2) > 0)) + - ((abs(leg2.z0-leg1.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 4.4 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 4.4 + obj: L1gmtTkMuon:Medium +L1_TkMu_PfJet_dRMax_DoubleJet_dEtaMax: + cross_masks: + - abs(leg2.eta) < 2.4 + - abs(leg2.z0-leg1.z0) < 1 + - leg2.deltaR(leg3) < 0.4 + - abs(leg5.eta-leg4.eta) < 1.6 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default + leg4: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default + leg5: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default +L1_DoubleTkMu0er1p5_SQ_OS_dR_Max1p4: + cross_masks: + - (abs(leg1.eta) < 1.5) + - (abs(leg2.eta) < 1.5) + - ((leg1.deltaR(leg2) < 1.4)) + - ((leg1.charge*leg2.charge < 0.0)) + - ((abs(leg2.z0-leg1.z0) < 1)) + - ((leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 0 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 0 + obj: L1gmtTkMuon:Medium +L1_SingleTkPhoIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 36.0 + obj: L1tkPhoton:Iso + +L1_DoubleTkPhoIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 22.0 + obj: L1tkPhoton:Iso + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1tkPhoton:Iso +L1_PFTau_PFTau: + cross_masks: + - leg1.deltaR(leg2) > 0.5 + leg1: + threshold_cut: offline_pt > 90.0 + obj: L1caloTau:default + leg2: + threshold_cut: offline_pt > 90.0 + obj: L1caloTau:default +L1_SingleEGEle: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 51.0 + obj: L1EG:default:inclusive +L1_SinglePFTau: + cross_masks: [] + leg1: + threshold_cut: offline_pt > 150.0 + obj: L1caloTau:default +L1_SinglePfJet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 230.0 + obj: L1puppiJetSC4:default +L1_SingleTkEle: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 36.0 + obj: L1tkElectron:NoIso:inclusive +L1_SingleTkEleIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt > 28.0 + obj: L1tkElectron:Iso:inclusive +L1_SingleTkMu: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 22.0 + obj: L1gmtTkMuon:Medium +L1_TkEleIso_EG: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + leg1: + threshold_cut: offline_pt >= 22.0 + obj: L1tkElectron:Iso:inclusive + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1EG:default:inclusive +L1_TkEleIso_PFHTT: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 26.0 + obj: L1tkElectron:Iso:inclusive + leg3: + threshold_cut: offline_pt >= 190.0 + obj: L1puppiJetSC4sums:HT +L1_TkEleIso_PFIsoTau: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 22.0 + obj: L1tkElectron:Iso:inclusive + leg3: + threshold_cut: offline_pt >= 45.0 + obj: L1nnPuppiTau:default +L1_TkEle_PFJet_dRMin: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - leg2.deltaR(leg3) > 0.3 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 28.0 + obj: L1tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default +L1_TkEle_TkMu: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: offline_pt >= 10.0 + obj: L1tkElectron:NoIso:inclusive + leg2: + threshold_cut: offline_pt >= 20.0 + obj: L1gmtTkMuon:Medium +L1_TkMu_DoubleTkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 6 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: offline_pt >= 17.0 + obj: L1tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt >= 17.0 + obj: L1tkElectron:NoIso:inclusive +L1_TkMu_PfHTT: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 6 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: offline_pt >= 320.0 + obj: L1puppiJetSC4sums:HT +L1_TkMu_PfJet_PfMet: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: offline_pt >= 110.0 + obj: L1puppiJetSC4:default + leg4: + threshold_cut: offline_pt >= 120.0 + obj: L1puppiMET:default +L1_TkMu_TkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 7 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: offline_pt >= 23.0 + obj: L1tkElectron:NoIso:inclusive +L1_TkMu_TkEleIso: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 7 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: offline_pt >= 20.0 + obj: L1tkElectron:Iso:inclusive +L1_TripleTkMu: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium +L1_TripleTkMu_5SQ_3SQ_0OQ_DoubleMu_5_3_SQ_OS_Mass_Max9: + cross_masks: + - (leg1+leg2).mass < 9.0 + - leg1.charge*leg2.charge < 0.0 + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: pt > 0 + obj: L1gmtTkMuon:Medium +L1_TripleTkMu_5_3p5_2p5_OS_Mass_5to17: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - leg1.charge*leg3.charge < 0.0 + - (leg1+leg3).mass > 5.0 + - (leg1+leg3).mass < 17.0 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 3.5 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: pt > 2.5 + obj: L1gmtTkMuon:Medium +L1_DoubleTkEle_PFHTT: + cross_masks: + - (abs(leg2.z0-leg1.z0) < 1 & (leg2.deltaR(leg3) > 0)) + - (abs(leg3.z0-leg1.z0) < 1 & (leg2.deltaR(leg3) > 0)) + - (leg3.deltaR(leg2) > 0) + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt > 8.0 + obj: L1tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt > 8.0 + obj: L1tkElectron:NoIso:inclusive + leg4: + threshold_cut: offline_pt > 390.0 + obj: L1puppiJetSC4sums:HT +L1_DoubleEGEle: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + leg1: + threshold_cut: offline_pt >= 37.0 + obj: L1EG:default:inclusive + leg2: + threshold_cut: offline_pt >= 24.0 + obj: L1EG:default:inclusive +L1_DoublePFJet_MassMin: + cross_masks: + - (leg1 + leg2).mass > 620 + leg1: + threshold_cut: offline_pt >= 160.0 + obj: L1puppiJetSC4:default + leg2: + threshold_cut: offline_pt >= 35.0 + obj: L1puppiJetSC4:default +L1_DoublePFJet_dEtaMax: + cross_masks: + - abs(leg2.eta-leg1.eta) < 1.6 + leg1: + threshold_cut: leg1.offline_pt >= 112.0 + obj: L1puppiJetSC4:default + leg2: + threshold_cut: leg2.offline_pt >= 112.0 + obj: L1puppiJetSC4:default +L1_DoubleTkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: offline_pt >= 25.0 + obj: L1tkElectron:NoIso:inclusive + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1tkElectron:NoIso:inclusive +L1_DoubleTkMu: + cross_masks: + - ((abs(leg1.z0-leg2.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: offline_pt > 15.0 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 7 + obj: L1gmtTkMuon:Medium +L1_DoubleTkMu4_SQ_OS_dR_Max1p2: + cross_masks: + - ((leg1.deltaR(leg2) < 1.2) & (leg1.deltaR(leg2) > 0)) + - ((leg1.charge*leg2.charge < 0.0) & (leg1.deltaR(leg2) > 0)) + - ((abs(leg2.z0-leg1.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 4 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 4 + obj: L1gmtTkMuon:Medium +L1_DoubleTkMu_PfHTT: + cross_masks: + - (abs(leg2.z0-leg1.z0) < 1 & (leg3.deltaR(leg2) > 0)) + - (abs(leg3.z0-leg1.z0) < 1 & (leg3.deltaR(leg2) > 0)) + - (leg3.deltaR(leg2) > 0) + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg4: + threshold_cut: offline_pt >= 300.0 + obj: L1puppiJetSC4sums:HT +L1_DoubleTkMu_PfJet_PfMet: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg4: + threshold_cut: offline_pt >= 60.0 + obj: L1puppiJetSC4:default + leg5: + threshold_cut: offline_pt >= 130.0 + obj: L1puppiMET:default +L1_DoubleTkMu_TkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: offline_pt >= 9.0 + obj: L1tkElectron:NoIso:inclusive +L1_PFHTT_QuadJet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 400.0 + obj: L1puppiJetSC4sums:HT + leg2: + threshold_cut: offline_pt >= 70.0 + obj: L1puppiJetSC4:default + leg3: + threshold_cut: offline_pt >= 55.0 + obj: L1puppiJetSC4:default + leg4: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default + leg5: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:default +L1_PFIsoTau_PFIsoTau: + cross_masks: + - leg1.deltaR(leg2) > 0.5 + leg1: + threshold_cut: offline_pt >= 52.0 + obj: L1nnPuppiTau:default + leg2: + threshold_cut: offline_pt >= 52.0 + obj: L1nnPuppiTau:default +L1_PFIsoTau_PFMet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 55.0 + obj: L1nnPuppiTau:default + leg2: + threshold_cut: offline_pt >= 190.0 + obj: L1puppiMET:default +L1_PFIsoTau_TkMu: + cross_masks: + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 42.0 + obj: L1nnPuppiTau:default + leg3: + threshold_cut: offline_pt >= 18.0 + obj: L1gmtTkMuon:Medium From 68b11049e8e5a4163fbb358f7acc40c4bba2f82a Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Mon, 15 Apr 2024 14:08:30 +0200 Subject: [PATCH 6/8] Add Pt >25 req for Jets --- configs/V38nano/objects/jets.yaml | 5 + .../v38_TkMuonMediumID_JetPt25_cfg.yml | 4 + .../v38_menu_TkMuonMediumID_JetPt25_cfg.yml | 445 ++++++++++++++++++ 3 files changed, 454 insertions(+) create mode 100644 configs/V38nano/rate_table/v38_TkMuonMediumID_JetPt25_cfg.yml create mode 100644 configs/V38nano/rate_table/v38_menu_TkMuonMediumID_JetPt25_cfg.yml diff --git a/configs/V38nano/objects/jets.yaml b/configs/V38nano/objects/jets.yaml index cbc35d90..1896f6c0 100644 --- a/configs/V38nano/objects/jets.yaml +++ b/configs/V38nano/objects/jets.yaml @@ -62,6 +62,11 @@ L1puppiJetSC4: cuts: inclusive: - "abs({eta}) < 7" + PtGe25: + cuts: + inclusive: + - "abs({eta}) < 7" + - "abs({pt}) >= 25" L1puppiJetSC8: match_dR: 0.35 diff --git a/configs/V38nano/rate_table/v38_TkMuonMediumID_JetPt25_cfg.yml b/configs/V38nano/rate_table/v38_TkMuonMediumID_JetPt25_cfg.yml new file mode 100644 index 00000000..208bd127 --- /dev/null +++ b/configs/V38nano/rate_table/v38_TkMuonMediumID_JetPt25_cfg.yml @@ -0,0 +1,4 @@ +version: "V38nano" +sample: "MinBias" +menu_config: "configs/V38nano/rate_table/v38_menu_TkMuonMediumID_JetPt25_cfg.yml" +table_fname: "rates_full_TkMuonMediumID_JetPt25" diff --git a/configs/V38nano/rate_table/v38_menu_TkMuonMediumID_JetPt25_cfg.yml b/configs/V38nano/rate_table/v38_menu_TkMuonMediumID_JetPt25_cfg.yml new file mode 100644 index 00000000..fccbc264 --- /dev/null +++ b/configs/V38nano/rate_table/v38_menu_TkMuonMediumID_JetPt25_cfg.yml @@ -0,0 +1,445 @@ +L1_PFHTT: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 450.0 + obj: L1puppiJetSC4sums:HT +L1_PFMHTT: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 135.5 + obj: L1puppiJetSC4sums:MHT +L1_PFMet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 200.0 + obj: L1puppiMET:default +# L1_PFMLMet: +# cross_masks: [] +# leg1: +# threshold_cut: offline_pt >= 200.0 +# obj: L1puppiMLMET:default +L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18: + cross_masks: + - (((leg1+leg2).mass > 7.0) & (leg1.deltaR(leg2) > 0)) + - (((leg1+leg2).mass < 18.0) & (leg1.deltaR(leg2) > 0)) + - ((leg1.charge*leg2.charge < 0.0) & (leg1.deltaR(leg2) > 0)) + - ((abs(leg2.z0-leg1.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 4.4 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 4.4 + obj: L1gmtTkMuon:Medium +L1_TkMu_PfJet_dRMax_DoubleJet_dEtaMax: + cross_masks: + - abs(leg2.eta) < 2.4 + - abs(leg2.z0-leg1.z0) < 1 + - leg2.deltaR(leg3) < 0.4 + - abs(leg5.eta-leg4.eta) < 1.6 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:PtGe25 + leg4: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:PtGe25 + leg5: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:PtGe25 +L1_DoubleTkMu0er1p5_SQ_OS_dR_Max1p4: + cross_masks: + - (abs(leg1.eta) < 1.5) + - (abs(leg2.eta) < 1.5) + - ((leg1.deltaR(leg2) < 1.4)) + - ((leg1.charge*leg2.charge < 0.0)) + - ((abs(leg2.z0-leg1.z0) < 1)) + - ((leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 0 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 0 + obj: L1gmtTkMuon:Medium +L1_SingleTkPhoIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 36.0 + obj: L1tkPhoton:Iso + +L1_DoubleTkPhoIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 22.0 + obj: L1tkPhoton:Iso + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1tkPhoton:Iso +L1_PFTau_PFTau: + cross_masks: + - leg1.deltaR(leg2) > 0.5 + leg1: + threshold_cut: offline_pt > 90.0 + obj: L1caloTau:default + leg2: + threshold_cut: offline_pt > 90.0 + obj: L1caloTau:default +L1_SingleEGEle: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 51.0 + obj: L1EG:default:inclusive +L1_SinglePFTau: + cross_masks: [] + leg1: + threshold_cut: offline_pt > 150.0 + obj: L1caloTau:default +L1_SinglePfJet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 230.0 + obj: L1puppiJetSC4:PtGe25 +L1_SingleTkEle: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 36.0 + obj: L1tkElectron:NoIso:inclusive +L1_SingleTkEleIso: + cross_masks: [] + leg1: + threshold_cut: offline_pt > 28.0 + obj: L1tkElectron:Iso:inclusive +L1_SingleTkMu: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 22.0 + obj: L1gmtTkMuon:Medium +L1_TkEleIso_EG: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + leg1: + threshold_cut: offline_pt >= 22.0 + obj: L1tkElectron:Iso:inclusive + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1EG:default:inclusive +L1_TkEleIso_PFHTT: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 26.0 + obj: L1tkElectron:Iso:inclusive + leg3: + threshold_cut: offline_pt >= 190.0 + obj: L1puppiJetSC4sums:HT +L1_TkEleIso_PFIsoTau: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 22.0 + obj: L1tkElectron:Iso:inclusive + leg3: + threshold_cut: offline_pt >= 45.0 + obj: L1nnPuppiTau:default +L1_TkEle_PFJet_dRMin: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - leg2.deltaR(leg3) > 0.3 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 28.0 + obj: L1tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:PtGe25 +L1_TkEle_TkMu: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: offline_pt >= 10.0 + obj: L1tkElectron:NoIso:inclusive + leg2: + threshold_cut: offline_pt >= 20.0 + obj: L1gmtTkMuon:Medium +L1_TkMu_DoubleTkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 6 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: offline_pt >= 17.0 + obj: L1tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt >= 17.0 + obj: L1tkElectron:NoIso:inclusive +L1_TkMu_PfHTT: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 6 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: offline_pt >= 320.0 + obj: L1puppiJetSC4sums:HT +L1_TkMu_PfJet_PfMet: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: offline_pt >= 110.0 + obj: L1puppiJetSC4:PtGe25 + leg4: + threshold_cut: offline_pt >= 120.0 + obj: L1puppiMET:default +L1_TkMu_TkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 7 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: offline_pt >= 23.0 + obj: L1tkElectron:NoIso:inclusive +L1_TkMu_TkEleIso: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 7 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: offline_pt >= 20.0 + obj: L1tkElectron:Iso:inclusive +L1_TripleTkMu: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium +L1_TripleTkMu_5SQ_3SQ_0OQ_DoubleMu_5_3_SQ_OS_Mass_Max9: + cross_masks: + - (leg1+leg2).mass < 9.0 + - leg1.charge*leg2.charge < 0.0 + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: pt > 0 + obj: L1gmtTkMuon:Medium +L1_TripleTkMu_5_3p5_2p5_OS_Mass_5to17: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - leg1.charge*leg3.charge < 0.0 + - (leg1+leg3).mass > 5.0 + - (leg1+leg3).mass < 17.0 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 3.5 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: pt > 2.5 + obj: L1gmtTkMuon:Medium +L1_DoubleTkEle_PFHTT: + cross_masks: + - (abs(leg2.z0-leg1.z0) < 1 & (leg2.deltaR(leg3) > 0)) + - (abs(leg3.z0-leg1.z0) < 1 & (leg2.deltaR(leg3) > 0)) + - (leg3.deltaR(leg2) > 0) + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt > 8.0 + obj: L1tkElectron:NoIso:inclusive + leg3: + threshold_cut: offline_pt > 8.0 + obj: L1tkElectron:NoIso:inclusive + leg4: + threshold_cut: offline_pt > 390.0 + obj: L1puppiJetSC4sums:HT +L1_DoubleEGEle: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + leg1: + threshold_cut: offline_pt >= 37.0 + obj: L1EG:default:inclusive + leg2: + threshold_cut: offline_pt >= 24.0 + obj: L1EG:default:inclusive +L1_DoublePFJet_MassMin: + cross_masks: + - (leg1 + leg2).mass > 620 + leg1: + threshold_cut: offline_pt >= 160.0 + obj: L1puppiJetSC4:PtGe25 + leg2: + threshold_cut: offline_pt >= 35.0 + obj: L1puppiJetSC4:PtGe25 +L1_DoublePFJet_dEtaMax: + cross_masks: + - abs(leg2.eta-leg1.eta) < 1.6 + leg1: + threshold_cut: leg1.offline_pt >= 112.0 + obj: L1puppiJetSC4:PtGe25 + leg2: + threshold_cut: leg2.offline_pt >= 112.0 + obj: L1puppiJetSC4:PtGe25 +L1_DoubleTkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + leg1: + threshold_cut: offline_pt >= 25.0 + obj: L1tkElectron:NoIso:inclusive + leg2: + threshold_cut: offline_pt >= 12.0 + obj: L1tkElectron:NoIso:inclusive +L1_DoubleTkMu: + cross_masks: + - ((abs(leg1.z0-leg2.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: offline_pt > 15.0 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 7 + obj: L1gmtTkMuon:Medium +L1_DoubleTkMu4_SQ_OS_dR_Max1p2: + cross_masks: + - ((leg1.deltaR(leg2) < 1.2) & (leg1.deltaR(leg2) > 0)) + - ((leg1.charge*leg2.charge < 0.0) & (leg1.deltaR(leg2) > 0)) + - ((abs(leg2.z0-leg1.z0) < 1) & (leg1.deltaR(leg2) > 0)) + leg1: + threshold_cut: pt > 4 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 4 + obj: L1gmtTkMuon:Medium +L1_DoubleTkMu_PfHTT: + cross_masks: + - (abs(leg2.z0-leg1.z0) < 1 & (leg3.deltaR(leg2) > 0)) + - (abs(leg3.z0-leg1.z0) < 1 & (leg3.deltaR(leg2) > 0)) + - (leg3.deltaR(leg2) > 0) + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg4: + threshold_cut: offline_pt >= 300.0 + obj: L1puppiJetSC4sums:HT +L1_DoubleTkMu_PfJet_PfMet: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: pt > 3 + obj: L1gmtTkMuon:Medium + leg4: + threshold_cut: offline_pt >= 60.0 + obj: L1puppiJetSC4:PtGe25 + leg5: + threshold_cut: offline_pt >= 130.0 + obj: L1puppiMET:default +L1_DoubleTkMu_TkEle: + cross_masks: + - abs(leg2.z0-leg1.z0) < 1 + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Medium + leg2: + threshold_cut: pt > 5 + obj: L1gmtTkMuon:Medium + leg3: + threshold_cut: offline_pt >= 9.0 + obj: L1tkElectron:NoIso:inclusive +L1_PFHTT_QuadJet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 400.0 + obj: L1puppiJetSC4sums:HT + leg2: + threshold_cut: offline_pt >= 70.0 + obj: L1puppiJetSC4:PtGe25 + leg3: + threshold_cut: offline_pt >= 55.0 + obj: L1puppiJetSC4:PtGe25 + leg4: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:PtGe25 + leg5: + threshold_cut: offline_pt >= 40.0 + obj: L1puppiJetSC4:PtGe25 +L1_PFIsoTau_PFIsoTau: + cross_masks: + - leg1.deltaR(leg2) > 0.5 + leg1: + threshold_cut: offline_pt >= 52.0 + obj: L1nnPuppiTau:default + leg2: + threshold_cut: offline_pt >= 52.0 + obj: L1nnPuppiTau:default +L1_PFIsoTau_PFMet: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 55.0 + obj: L1nnPuppiTau:default + leg2: + threshold_cut: offline_pt >= 190.0 + obj: L1puppiMET:default +L1_PFIsoTau_TkMu: + cross_masks: + - abs(leg3.z0-leg1.z0) < 1 + leg1: + threshold_cut: null + obj: L1PV:default + leg2: + threshold_cut: offline_pt >= 42.0 + obj: L1nnPuppiTau:default + leg3: + threshold_cut: offline_pt >= 18.0 + obj: L1gmtTkMuon:Medium From 46a5fa9c9749736ca313e9669b8a5856e792e7ac Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Mon, 15 Apr 2024 14:38:39 +0200 Subject: [PATCH 7/8] Add tqdm progress to menu table --- menu_tools/rate_table/menu_table.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/menu_tools/rate_table/menu_table.py b/menu_tools/rate_table/menu_table.py index 62f15dcd..f5241b30 100644 --- a/menu_tools/rate_table/menu_table.py +++ b/menu_tools/rate_table/menu_table.py @@ -5,6 +5,8 @@ import warnings import yaml +from tqdm import tqdm + import awkward as ak import numpy as np @@ -282,7 +284,7 @@ def _prepare_masks(self) -> dict[str, np.ndarray]: """ seed_masks: dict = {} - for seed_name in self.trigger_seeds: + for seed_name in tqdm(self.trigger_seeds): mask = self.get_trigger_pass_mask(seed_name) seed_masks[seed_name] = mask.to_numpy() self._seed_masks = seed_masks From 880efccd35af6c5099ac50684647221cc5c261bc Mon Sep 17 00:00:00 2001 From: Emyr Clement Date: Mon, 15 Apr 2024 14:17:14 +0100 Subject: [PATCH 8/8] Add SC8 seeds. --- .../v38_menu_TkMuonMediumID_JetPt25_cfg.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/configs/V38nano/rate_table/v38_menu_TkMuonMediumID_JetPt25_cfg.yml b/configs/V38nano/rate_table/v38_menu_TkMuonMediumID_JetPt25_cfg.yml index fccbc264..da3bd1df 100644 --- a/configs/V38nano/rate_table/v38_menu_TkMuonMediumID_JetPt25_cfg.yml +++ b/configs/V38nano/rate_table/v38_menu_TkMuonMediumID_JetPt25_cfg.yml @@ -103,6 +103,11 @@ L1_SinglePfJet: leg1: threshold_cut: offline_pt >= 230.0 obj: L1puppiJetSC4:PtGe25 +L1_SinglePfJet8: + cross_masks: [] + leg1: + threshold_cut: offline_pt >= 300.0 + obj: L1puppiJetSC8:default L1_SingleTkEle: cross_masks: [] leg1: @@ -319,6 +324,15 @@ L1_DoublePFJet_dEtaMax: leg2: threshold_cut: leg2.offline_pt >= 112.0 obj: L1puppiJetSC4:PtGe25 +L1_DoublePFJet8_dEtaMax: + cross_masks: + - abs(leg2.eta-leg1.eta) < 1.6 + leg1: + threshold_cut: leg1.offline_pt >= 200.0 + obj: L1puppiJetSC8:default + leg2: + threshold_cut: leg2.offline_pt >= 200.0 + obj: L1puppiJetSC8:default L1_DoubleTkEle: cross_masks: - abs(leg2.z0-leg1.z0) < 1