From 070355b2a2fcdad886f085de5f78f4bd2a88b4b1 Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Thu, 29 Jun 2023 09:27:48 +0200 Subject: [PATCH 001/140] [cache_objects.py] Add status == 2 check on visible had taus --- objectPerformance/src/cache_objects.py | 39 +++++++++++++++++++++----- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/objectPerformance/src/cache_objects.py b/objectPerformance/src/cache_objects.py index 6af8a0e4..ef36d058 100755 --- a/objectPerformance/src/cache_objects.py +++ b/objectPerformance/src/cache_objects.py @@ -92,21 +92,34 @@ def _p4_sum(self, array, axis=-1): behavior=array.behavior ) - def _get_visible_taus(self, all_parts): + def _get_visible_taus(self, all_parts, status_check = True): """ Create a collection of gen-level taus. Leptonic taus are discarded. Only the visible component (i.e. no neutrinos) of hadronically-decaying taus is considered. """ + all_parts = ak.zip({k.lower(): all_parts[k] for k in all_parts.keys()}) + + if status_check: + + sel = ( (all_parts.id == 15) & + (all_parts.stat == 2) + ) + + is_tau = ak.any(sel, axis=-1) + all_parts = ak.where(is_tau, all_parts, ak.full_like(all_parts, -1000)) + + all_parts = {f: field for f, field in zip(['Id','Stat','Pt','Eta','Phi','Parent','E'],ak.unzip(all_parts))} + sel_no_nu_e = abs(all_parts["Id"]) != 12 sel_no_nu_mu = abs(all_parts["Id"]) != 14 sel_no_nu_tau = abs(all_parts["Id"]) != 16 - sel = sel_no_nu_e & sel_no_nu_mu & sel_no_nu_tau + sel_no_nan = abs(all_parts["Id"]) != 1000 + sel = sel_no_nu_e & sel_no_nu_mu & sel_no_nu_tau & sel_no_nan for branch in all_parts: all_parts[branch] = all_parts[branch][sel] - all_tau_p = all_parts.copy() all_tau_m = all_parts.copy() @@ -163,18 +176,32 @@ def _filter_genpart_branches(self, all_arrays): return all_arrays - def _filter_fspart_branches(self, all_parts): + def _filter_fspart_branches(self, all_parts, status_check = True): """ Select all the final state particles. This collection is used only for dR matching and Isolation computations, but it's not saved. Neutrino final state particles are not considered. """ + all_parts = ak.zip({k.lower(): all_parts[k] for k in all_parts.keys()}) + + if status_check: + + sel = ( (all_parts.id == 15) & + (all_parts.stat == 2) + ) + + is_tau = ak.any(sel, axis=-1) + all_parts = ak.where(is_tau, all_parts, ak.full_like(all_parts, -1000)) + + all_parts = {f: field for f, field in zip(['Id','Stat','Pt','Eta','Phi','Parent','E'],ak.unzip(all_parts))} + sel_no_nu_e = abs(all_parts["Id"]) != 12 sel_no_nu_mu = abs(all_parts["Id"]) != 14 sel_no_nu_tau = abs(all_parts["Id"]) != 16 + sel_no_nan = abs(all_parts["Id"]) != 1000 sel_fs = all_parts["Stat"] == 1 - sel = sel_fs & sel_no_nu_e & sel_no_nu_mu & sel_no_nu_tau + sel = sel_fs & sel_no_nu_e & sel_no_nu_mu & sel_no_nu_tau & sel_no_nan for branch in all_parts: all_parts[branch] = all_parts[branch][sel] @@ -348,5 +375,3 @@ def load(self): dryrun=args.dry_run ) loader.load() - - From 6c11b527a3ad63757c76147a5d64107cd9b7edf5 Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Tue, 1 Aug 2023 12:41:31 +0200 Subject: [PATCH 002/140] [Rates] Start development on rates table --- rates/table/menu.py | 350 ++++++++++++++++++++++++++++++++++++++ rates/table/rate_table.py | 11 ++ rates/table/scaler.py | 107 ++++++++++++ rates/table/utils.py | 33 ++++ 4 files changed, 501 insertions(+) create mode 100644 rates/table/menu.py create mode 100644 rates/table/rate_table.py create mode 100644 rates/table/scaler.py create mode 100644 rates/table/utils.py diff --git a/rates/table/menu.py b/rates/table/menu.py new file mode 100644 index 00000000..72a5837d --- /dev/null +++ b/rates/table/menu.py @@ -0,0 +1,350 @@ +#!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python +import numpy as np + +from glob import glob + +import yaml, re +from utils import * + +import uproot +import awkward as ak +import vector + +vector.register_awkward() + +class MenuConfigurator: + def __init__(self, scalings, menu): + self.scalings = self.get_scalings(scalings) + self.menu = menu + self.menu_dict = self.parse_menu() + self.menu_branches = self.trignames_to_branch() + self.trig_seeds = self.get_trig_seeds() + self.fname = "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/13X/v29_RelVal/RelValTTbar_14TeV/RelVal_13X_TT_200PU_crab_v29_13X_RelVal_FixGenTree/230710_081407/L1NtuplePhaseII_Step1_hadd.root" + + def get_scalings(self, scalings): + with open(f'{scalings}', 'r') as infile: + scalings_eta = yaml.safe_load(infile.read()) + return scalings_eta + + def parse_menu(self): + with open(f'{self.menu}', 'r') as infile: + obj_dict = yaml.safe_load(infile.read()) + return obj_dict + + def trignames_to_branch(self): + trignames_to_branch = {} + for obj,items in self.menu_dict.items(): + br = items["basebranch"] + + trignames_to_branch[obj] = br + + return trignames_to_branch + + def get_trig_seeds(self): + cfg_fname = "./v29_menu_config_cleaned.yml" + + with open(cfg_fname, 'r') as infile: + test_trig_seeds = yaml.safe_load(infile.read()) + + return test_trig_seeds + + def add_offline_pt(self, arr, obj_scalings, pt_var = None): + # initialise array of zeros identical to the original pt + if pt_var is not None: pt_orig = arr[pt_var] + elif "pt" in arr.fields: pt_orig = arr.pt + elif "et" in arr.fields: pt_orig = arr.et + elif "" in arr.fields: pt_orig = arr[""][:,0] + else: + print("Error! Unknown pt branch") + return 0 + + if None in obj_scalings: + values = obj_scalings[None] + new_pt = pt_orig * values["slope"] + values["offset"] * (pt_orig > 0) + else: + new_pt = ak.zeros_like(pt_orig) + + # loop through eta regions with it's scaling parameters + for region,values in obj_scalings.items(): + # create eta mask for this eta region + eta_mask = (abs(arr.eta) >= values["eta_min"]) & (abs(arr.eta) < values["eta_max"]) + # scale pt for non-masked elements of this eta region + new_pt = new_pt + eta_mask * (pt_orig * values["slope"] + values["offset"]) + + return ak.with_field(arr, new_pt, "offline_pt") + + def scale_pt(self, obj, arr): + if obj in self.scalings: + arr = self.add_offline_pt(arr, self.scalings[obj]) + else: + print("No scalings found for " + obj) + if "" in arr.fields: + arr["et"] = arr[""] + arr["pt"] = arr[""] + arr["offline_pt"] = arr.pt + + if "eta" in arr.fields: arr = ak.with_name(arr, "Momentum3D") + + arr["idx"] = ak.local_index(arr) + return arr + + def format_values(self, arr): + if "et" not in arr.fields: + if "pt" in arr.fields: + arr["et"] = arr.pt + elif "" in arr.fields: + arr["pt"] = arr[""] + arr["et"] = arr[""] + elif "pt" not in arr.fields: + if "et" in arr.fields: + arr["pt"] = arr.et + + for x in ["passeseleid","passessaid","passesphoid"]: + if x in arr.fields: + arr[x] = ak.values_astype(arr[x], bool) + + return arr + + def load_minbias(self, obj): + with uproot.open(self.fname) as f: + arr = f["l1PhaseIITree/L1PhaseIITree"].arrays( + filter_name = f"{obj}*", + how = "zip" + ) + return arr + + def get_obj_arr(self, obj, + sample = "MinBias", + vers = "V29_part"): + + arr = self.load_minbias(obj) + if "jagged0" in arr.fields: + arr = arr["jagged0"] + + arr = ak.zip({f.replace(obj,"").lower():arr[f] for f in arr.fields}) + arr = self.format_values(arr) + arr = self.scale_pt(obj, arr) + + return arr + + def get_cut_str(self, leg, cut, trig_object, cut_str): + for var in trig_object["variables"]: + var = var.lower() + if var in cut: + # replace var only it not preceeded by legX where X is a digit + pattern = r"(?= {pt_cut})") + elif "leading" in cut: + leg_mask.append("("+cut.replace("leading",f"{leg}.et")+")") + else: + cut = cut.replace("etaRangeCutLess","RangeCutLess") + cut = cut.replace("deltaEta(Eta,","abs(Eta-").lower() + + cut_str = cut + cut_str = self.get_cut_str(leg, cut, trig_object, cut_str) + cut_str = cut_str.replace("deltar","deltaR") + + if "leg" in cut: + cross_mask.append(cut_str) + else: + leg_mask.append(cut_str) + + return leg_mask, cross_mask + + def decode_leg_cuts(self, leg, items): + obj = items["obj"] + + trig_object = self.menu_dict[obj] + + leg_mask, cross_mask = self.get_masks(leg, trig_object, items) + + return leg_mask, cross_mask + + def decode_seed(self, trig_seed): + ## make leg masks etc + seed_legs = {} + cross_masks_str = [] + cross_seeds = [] + + ### 0. decompose trig_seed + for leg, items in trig_seed.items(): + if "leg" in leg: + obj = items["obj"] + leg_mask, cross_mask = self.decode_leg_cuts(leg, items) + + if len(cross_mask) > 0: cross_masks_str.append(cross_mask) + + seed_legs[leg] = { "obj": self.menu_branches[obj], + "leg_mask": leg_mask + } + elif leg == "x-seeds": + if isinstance(items, list): cross_seeds+=items + else: cross_seeds.append(items) + + return seed_legs, cross_masks_str, cross_seeds + + def get_legs(self, seed_legs): + all_arrs = {} + leg_arrs = {} + + for leg, items in seed_legs.items(): + obj = items["obj"] + + if obj not in all_arrs: all_arrs[obj] = self.get_obj_arr(obj) + + leg_mask_str = items["leg_mask"] + + leg_mask_str = "&".join([f"({s})" for s in leg_mask_str]).replace(leg,"leg_arr") + leg_arr = all_arrs[obj] + + # get masked array + leg_mask = eval(leg_mask_str) + + ## apply mask if regular (non-jagged) array, e.g. MET/HT etc + if "var" in str(leg_arr.type): + leg_arrs[leg] = leg_arr[leg_mask] + else: + leg_arrs[leg] = ak.mask(leg_arr, leg_mask) + + return leg_arrs + + def get_combos(self, leg_arrs, seed_legs): + + if len(leg_arrs) > 1: + combos = ak.cartesian(leg_arrs) + else: + combos = leg_arrs + + ## duplicate handling (exclude combinations) + ### first check whether objects are repeating + objs = [o["obj"] for o in seed_legs.values()] + obj_cnts = {i: objs.count(i) for i in objs} + + if np.max(list(obj_cnts.values())) > 1: + nodup_masks = [] + + for i,l1 in enumerate(leg_arrs.keys()): + for j,l2 in enumerate(leg_arrs.keys()): + if i>=j: continue + ## check that the legs are the same type object, skip otherwise + if seed_legs[l1]["obj"] != seed_legs[l2]["obj"]: continue + nodup_masks.append(combos[l1].idx < combos[l2].idx) + + if len(nodup_masks) > 0: + eval_str = " & ".join([f"nodup_masks[{i}]" for i in range(len(nodup_masks))]) + nodup_mask = eval(eval_str) + combos = combos[nodup_mask] + + return combos + + def get_legs_and_masks(self, seed_legs): + ### load all legs + leg_arrs = self.get_legs(seed_legs) + + ### leg duplicate removal + combos = self.get_combos(leg_arrs, seed_legs) + + return leg_arrs, combos + + def get_eval_string(self, leg_arrs): + eval_str = [] + for leg, leg_arr in leg_arrs.items(): + if "var" in str(leg_arr.type): + eval_str.append(f"(ak.num({leg}) > 0)") + else: + eval_str.append(f"(ak.is_none({leg}) == False)") + eval_str = " & ".join(eval_str) + + return eval_str + + def get_npass(self, trig_seed): + seed_legs, cross_masks_str, cross_seeds = self.decode_seed(trig_seed) + leg_arrs, combos = self.get_legs_and_masks(seed_legs) + + ## define leg arrays + for leg in leg_arrs: exec(f"{leg} = combos['{leg}']") + + ## require presence of legs + eval_str = self.get_eval_string(leg_arrs) + nleg_mask = eval(eval_str) + + ## create event mask + total_mask = nleg_mask + + ## add cross_conditions + if len(cross_masks_str) > 0: + cross_mask = [] + + for cross_mask_str in [item for sublist in cross_masks_str for item in sublist]: + cross_mask.append(eval(cross_mask_str)) + + ## combine cross_masks + eval_str = " & ".join([f"cross_mask[{i}]" for i in range(len(cross_mask))]) + cross_mask_all = eval(f"ak.any({eval_str}, axis = 1)") + + total_mask = total_mask & cross_mask_all + + ## Add cross-seeds: + for xseed in cross_seeds: + xseed_mask = get_npass(self.trig_seeds[xseed]) + total_mask = total_mask & xseed_mask + + total_mask = ak.fill_none(total_mask, False) + return total_mask + + def prepare_masks(self): + trig_masks = {} + + seeds = self.trig_seeds + + for seed in sorted(seeds): + + if "PFTau" in seed: continue + + print(seed) + + mask = self.get_npass(self.trig_seeds[seed]) + npass = np.sum(mask) + print("##### Npasses:", npass,"\n") + + trig_masks[seed] = mask.to_numpy() + + return trig_masks + + @property + def make_table(self): + total_mask = 0 + trig_masks = self.prepare_masks() + + for seed, mask in trig_masks.items(): + + total_mask = total_mask | mask + npass = np.sum(mask) + eff = npass/len(mask) + rate = eff * 2760*11246 / 1e3 + print(seed.ljust(50), ":\t%8i\t%.5f\t%.1f" %(npass, eff, rate)) + + ## total + npass = np.sum(total_mask) + eff = npass/len(total_mask) + rate = eff * 2760*11246 / 1e3 + + tot_str = "Total:".ljust(50)+ "\t%8i\t%.5f\t%.1f" %(npass, eff, rate) + print((len(tot_str)+5)*"-") + print(tot_str) + + print("Total nev: %i" % len(total_mask)) diff --git a/rates/table/rate_table.py b/rates/table/rate_table.py new file mode 100644 index 00000000..18752fa5 --- /dev/null +++ b/rates/table/rate_table.py @@ -0,0 +1,11 @@ +#!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python +from scaler import Scaler +from menu import MenuConfigurator + +path_to_scalings = "/eos/user/m/mbonanom/www/Postdoc/L1PhaseII/V29/scalings/" +scaler = Scaler(path_to_scalings) +scaler.collect_scalings +scaler.scaling_dict + +menu_config = MenuConfigurator('scalings.yml', 'v29_WITHMUONS_Final_obj_dict.yml') +menu_config.make_table diff --git a/rates/table/scaler.py b/rates/table/scaler.py new file mode 100644 index 00000000..2df58d17 --- /dev/null +++ b/rates/table/scaler.py @@ -0,0 +1,107 @@ +#!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python + +import os, yaml +from glob import glob + +class Scaler: + def __init__(self, path_to_scalings): + self.dir = path_to_scalings + self.fnames = glob(f"{self.dir}/*.txt") + self.scaling_dict = {} +# self.scaling_file = None + + def get_lines(self, fname): + with open(fname) as f: + lines = f.readlines() + + return lines + + def get_basename(self, fname): + basename = os.path.basename(fname).replace(".txt","") + basename = basename.replace( + "Turnon","").replace( + "Trigger","").replace( + "Matching","").replace( + "_","") + + return basename + + def eta_ranges(self, obj, suffix): + eta_range = None + if obj == "Muons": + if suffix == "Barrel": + eta_range = (0,0.83) + elif suffix == "Overlap": + eta_range = (0.83,1.24) + elif suffix == "Endcap": + eta_range = (1.24,2.5) + else: + if suffix == "Barrel": + eta_range = (0,1.5) + elif suffix == "Endcap": + eta_range = (1.5,2.5) + elif suffix == "Forward": + eta_range = (2.5,5) + + return eta_range + + def get_eta_range(self, fname): + + basename = self.get_basename(fname) + + for suffix in ["Barrel","Endcap","Overlap"]: + if suffix in basename: + obj = basename.split(suffix)[0] + eta_range = self.eta_ranges(obj, suffix) + + if eta_range is None: + print("Not found! ", basename, obj) + else: + return obj, suffix, eta_range + + return None + + def decode_scaling(self, line): + line = line.replace(" ","") + items = line.split("::") + + obj = items[1][:-len("Scaling")] + slope = float(items[2][len("args:=(offline);lambda:="):items[2].find("*off")-10]) + offset = float(items[2][items[2].find("*off")+len("*offline"):-10]) + + return obj,slope,offset + + @property + def collect_scalings(self): + for fname in self.fnames: + r = self.get_eta_range(os.path.basename(fname)) + + if r is None: + print(30*"#", r) + objcat = None + region = None + eta_range = (None,None) + else: + objcat,region,eta_range = r + + lines = self.get_lines(fname) + + for line in lines: + obj,slope,offset = self.decode_scaling(line) + d = { region : { + "eta_min" : eta_range[0], + "eta_max" : eta_range[1], + "offset" : offset, + "slope" : slope + } + } + + if obj in self.scaling_dict: self.scaling_dict[obj].update(d) + else: self.scaling_dict[obj] = d + + @property + def dump_scalings(self): + with open('scalings.yml', 'w') as outfile: + yaml.dump(self.scaling_dict, + outfile, + default_flow_style=False) diff --git a/rates/table/utils.py b/rates/table/utils.py new file mode 100644 index 00000000..2617b468 --- /dev/null +++ b/rates/table/utils.py @@ -0,0 +1,33 @@ +import numpy as np + +def dr(leg1,leg2): + return leg1.deltaR(leg2) + +def deltar(eta1,eta2,phi1,phi2): + return np.sqrt(np.power(abs(eta1-eta2),2) + np.power(abs(phi1-phi2) if abs(phi1-phi2)<=np.pi else 2*np.pi-abs(phi1-phi2),2)) + #return np.sqrt(np.power(abs(eta1-eta2),2) + np.power(abs(phi1-phi2) * abs(phi1-phi2)<=np.pi else 2*np.pi-abs(phi1-phi2),2)) + +def notmatched(eta1,eta2,phi1,phi2): + return deltar(eta1,eta2,phi1,phi2) > 0.1 + +def pairinvmass(pt1,pt2,eta1,eta2,phi1,phi2): + return np.sqrt(2.0*pt1*pt2*(np.cosh(eta1-eta2)-np.cos(phi1-phi2))) + +def phoid(EleID, PhoID, Eta): + return EleID * (abs(Eta)<1.5) + PhoID * (abs(Eta)>=1.5) + +def egid(EleID, SaID, Eta): + return EleID * abs(Eta)<1.5 + SaID * (abs(Eta)>=1.5) + +def TkEleQualHIGH(Et,Eta,PassesEleID): return PassesEleID +def TkEleQualLOW(Et,Eta,PassesEleID): return PassesEleID * (abs(Eta)<1.479) + (abs(Eta)<1.479) +def TkEleIsoQualHIGH(Et,Eta,PassesEleID): return PassesEleID * (abs(Eta)>1.479) + (abs(Eta)<1.479) +def TkEleIsoQualLOW(Et,Eta,PassesEleID): return (PassesEleID>=0) # this should be always true: we can remove this condition from the menu + +def tkelequalhigh(et,eta,passeseleid): return passeseleid +def tkelequallow(et,eta,passeseleid): return passeseleid * (abs(eta)<1.479) + (abs(eta)<1.479) +def tkeleisoqualhigh(et,eta,passeseleid): return passeseleid * (abs(eta)>1.479) + (abs(eta)<1.479) +def tkeleisoquallow(et,eta,passeseleid): return (passeseleid>=0) # this should be always true: we can remove this condition from the menu + +def rangecutless(x,eta,etaRange,cutInRange,cutOutRange): + return (x=etaRange) From b58797f23014af2ff81200f31815880186b2c5c0 Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Tue, 1 Aug 2023 17:00:33 +0200 Subject: [PATCH 003/140] [Rates] Improvements and cleanup. Move to a single config --- .../cfg/v29/v29_16Seeds_Final_clean_cfg.yml | 204 ++++++++++++++++++ rates/table/cfg/v29/v29_cfg.yml | 5 + rates/table/menu.py | 125 +++-------- rates/table/menu_config.py | 24 +++ rates/table/rate_table.py | 33 ++- 5 files changed, 284 insertions(+), 107 deletions(-) create mode 100644 rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml create mode 100644 rates/table/cfg/v29/v29_cfg.yml create mode 100644 rates/table/menu_config.py diff --git a/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml b/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml new file mode 100644 index 00000000..afc1762f --- /dev/null +++ b/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml @@ -0,0 +1,204 @@ +L1_DoubleEGEle: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + - leg1.offline_pt + leg2.offline_pt > 40 + leg1: + leg_mask: + - leg1.offline_pt >= 37.0 + - abs(leg1.eta)<2.4 + - egid(leg1.passeseleid,leg1.passessaid,leg1.eta) + obj: EG + leg2: + leg_mask: + - leg2.offline_pt >= 24.0 + - abs(leg2.eta)<2.4 + - egid(leg2.passeseleid,leg2.passessaid,leg2.eta) + obj: EG +L1_DoubleTkEle: + cross_masks: + - abs(leg2.zvtx-leg1.zvtx)<1 + leg1: + leg_mask: + - leg1.offline_pt >= 25.0 + - abs(leg1.eta)<2.4 + - tkelequallow(leg1.et,leg1.eta,leg1.passeseleid) + obj: tkElectron + leg2: + leg_mask: + - leg2.offline_pt >= 12.0 + - abs(leg2.eta)<2.4 + - tkelequallow(leg2.et,leg2.eta,leg2.passeseleid) + obj: tkElectron +L1_DoubleTkMu: + cross_masks: + - abs(leg1.z0-leg2.z0)<1 + leg1: + leg_mask: + - leg1.offline_pt >= 15.0 + - abs(leg1.eta)<2.4 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.offline_pt >= 7.0 + - abs(leg2.eta)<2.4 + obj: gmtTkMuon +L1_DoubleTkPhoIso: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 22.0 + - abs(leg1.eta)<2.4 + - phoid(leg1.passeseleid,leg1.passesphoid,leg1.eta) + - rangecutless(leg1.trkiso,leg1.eta,1.479,0.25,0.205) + obj: tkPhoton + leg2: + leg_mask: + - leg2.offline_pt >= 12.0 + - abs(leg2.eta)<2.4 + - phoid(leg2.passeseleid,leg2.passesphoid,leg2.eta) + - rangecutless(leg2.trkiso,leg2.eta,1.479,0.25,0.205) + obj: tkPhoton +L1_PFHTT: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 450.0 + obj: seededConePuppiHT +L1_PFHTT_QuadJet: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 400.0 + obj: seededConePuppiHT + leg2: + leg_mask: + - leg2.offline_pt >= 70.0 + - leg2.et>25.0 + - abs(leg2.eta)<2.4 + obj: seededConePuppiJet + leg3: + leg_mask: + - leg3.offline_pt >= 55.0 + - leg3.et>25.0 + - abs(leg3.eta)<2.4 + obj: seededConePuppiJet + leg4: + leg_mask: + - leg4.offline_pt >= 40.0 + - leg4.et>25.0 + - abs(leg4.eta)<2.4 + obj: seededConePuppiJet + leg5: + leg_mask: + - leg5.offline_pt >= 40.0 + - leg5.et>25.0 + - abs(leg5.eta)<2.4 + obj: seededConePuppiJet +L1_PFIsoTau_PFIsoTau: + cross_masks: + - leg1.deltaR(leg2) > 0.5 + leg1: + leg_mask: + - leg1.offline_pt >= 52.0 + - abs(leg1.eta)<2.172 + - leg1.passloosenn>0 + obj: nnTau + leg2: + leg_mask: + - leg2.offline_pt >= 52.0 + - abs(leg2.eta)<2.172 + - leg2.passloosenn>0 + obj: nnTau +L1_PFMet: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 200.0 + obj: puppiMET +L1_SingleEGEle: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 51.0 + - abs(leg1.eta)<2.4 + - egid(leg1.passeseleid,leg1.passessaid,leg1.eta) + obj: EG +L1_SinglePfJet: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 230.0 + - leg1.et>25 + - abs(leg1.eta)<2.4 + obj: seededConePuppiJet +L1_SingleTkEle: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 36.0 + - abs(leg1.eta)<2.4 + - tkelequalhigh(leg1.et,leg1.eta,leg1.passeseleid) + obj: tkElectron +L1_SingleTkEleIso: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 28.0 + - tkeleisoquallow(leg1.et,leg1.eta,leg1.passeseleid) + - rangecutless(leg1.trkiso,leg1.eta,1.479,0.13,0.28) + obj: tkElectron +L1_SingleTkMu: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 22.0 + - abs(leg1.eta)<2.4 + obj: gmtTkMuon +L1_SingleTkPhoIso: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 36.0 + - abs(leg1.eta)<2.4 + - phoid(leg1.passeseleid,leg1.passesphoid,leg1.eta) + - rangecutless(leg1.trkiso,leg1.eta,1.479,0.25,0.205) + obj: tkPhoton +L1_TkEleIso_EG: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + leg1: + leg_mask: + - leg1.offline_pt >= 22.0 + - abs(leg1.eta)<2.4 + - tkeleisoquallow(leg1.et,leg1.eta,leg1.passeseleid) + - rangecutless(leg1.trkiso,leg1.eta,1.479,0.13,0.28) + obj: tkElectron + leg2: + leg_mask: + - leg2.offline_pt >= 12.0 + - abs(leg2.eta)<2.4 + - egid(leg2.passeseleid,leg2.passessaid,leg2.eta) + obj: EG +L1_TripleTkMu: + cross_masks: + - abs(leg2.z0-leg1.z0)<1 + - abs(leg3.z0-leg1.z0)<1 + leg1: + leg_mask: + - leg1.pt>5 + - abs(leg1.eta)<2.4 + - leg1.qual>0 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.pt>3 + - abs(leg2.eta)<2.4 + - leg2.qual>0 + obj: gmtTkMuon + leg3: + leg_mask: + - leg3.pt>3 + - abs(leg3.eta)<2.4 + - leg3.qual>0 + obj: gmtTkMuon + diff --git a/rates/table/cfg/v29/v29_cfg.yml b/rates/table/cfg/v29/v29_cfg.yml new file mode 100644 index 00000000..163d904f --- /dev/null +++ b/rates/table/cfg/v29/v29_cfg.yml @@ -0,0 +1,5 @@ +MenuV29: + version: "V29" + sample: "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/13X/v29_RelVal/RelValTTbar_14TeV/RelVal_13X_TT_200PU_crab_v29_13X_RelVal_FixGenTree/230710_081407/L1NtuplePhaseII_Step1_hadd.root" + menu_config: "cfg/v29_16Seeds_Final_clean_cfg.yml" + scalings: "scalings.yml" diff --git a/rates/table/menu.py b/rates/table/menu.py index 72a5837d..e3ea42be 100644 --- a/rates/table/menu.py +++ b/rates/table/menu.py @@ -4,7 +4,9 @@ from glob import glob import yaml, re + from utils import * +from menu_config import MenuConfig import uproot import awkward as ak @@ -12,38 +14,21 @@ vector.register_awkward() -class MenuConfigurator: - def __init__(self, scalings, menu): - self.scalings = self.get_scalings(scalings) - self.menu = menu - self.menu_dict = self.parse_menu() - self.menu_branches = self.trignames_to_branch() +class MenuTable: + def __init__(self, cfg): + self.cfg = MenuConfig(cfg) + self.fname = self.cfg.sample + self.cfg_fname = self.cfg.menu_cfg + self.scalings = self.get_scalings(self.cfg.scalings) self.trig_seeds = self.get_trig_seeds() - self.fname = "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/13X/v29_RelVal/RelValTTbar_14TeV/RelVal_13X_TT_200PU_crab_v29_13X_RelVal_FixGenTree/230710_081407/L1NtuplePhaseII_Step1_hadd.root" def get_scalings(self, scalings): with open(f'{scalings}', 'r') as infile: scalings_eta = yaml.safe_load(infile.read()) return scalings_eta - def parse_menu(self): - with open(f'{self.menu}', 'r') as infile: - obj_dict = yaml.safe_load(infile.read()) - return obj_dict - - def trignames_to_branch(self): - trignames_to_branch = {} - for obj,items in self.menu_dict.items(): - br = items["basebranch"] - - trignames_to_branch[obj] = br - - return trignames_to_branch - def get_trig_seeds(self): - cfg_fname = "./v29_menu_config_cleaned.yml" - - with open(cfg_fname, 'r') as infile: + with open(self.cfg_fname, 'r') as infile: test_trig_seeds = yaml.safe_load(infile.read()) return test_trig_seeds @@ -126,77 +111,7 @@ def get_obj_arr(self, obj, arr = self.scale_pt(obj, arr) return arr - - def get_cut_str(self, leg, cut, trig_object, cut_str): - for var in trig_object["variables"]: - var = var.lower() - if var in cut: - # replace var only it not preceeded by legX where X is a digit - pattern = r"(?= {pt_cut})") - elif "leading" in cut: - leg_mask.append("("+cut.replace("leading",f"{leg}.et")+")") - else: - cut = cut.replace("etaRangeCutLess","RangeCutLess") - cut = cut.replace("deltaEta(Eta,","abs(Eta-").lower() - - cut_str = cut - cut_str = self.get_cut_str(leg, cut, trig_object, cut_str) - cut_str = cut_str.replace("deltar","deltaR") - - if "leg" in cut: - cross_mask.append(cut_str) - else: - leg_mask.append(cut_str) - - return leg_mask, cross_mask - - def decode_leg_cuts(self, leg, items): - obj = items["obj"] - - trig_object = self.menu_dict[obj] - - leg_mask, cross_mask = self.get_masks(leg, trig_object, items) - - return leg_mask, cross_mask - - def decode_seed(self, trig_seed): - ## make leg masks etc - seed_legs = {} - cross_masks_str = [] - cross_seeds = [] - - ### 0. decompose trig_seed - for leg, items in trig_seed.items(): - if "leg" in leg: - obj = items["obj"] - leg_mask, cross_mask = self.decode_leg_cuts(leg, items) - - if len(cross_mask) > 0: cross_masks_str.append(cross_mask) - - seed_legs[leg] = { "obj": self.menu_branches[obj], - "leg_mask": leg_mask - } - elif leg == "x-seeds": - if isinstance(items, list): cross_seeds+=items - else: cross_seeds.append(items) - - return seed_legs, cross_masks_str, cross_seeds - + def get_legs(self, seed_legs): all_arrs = {} leg_arrs = {} @@ -271,8 +186,19 @@ def get_eval_string(self, leg_arrs): return eval_str - def get_npass(self, trig_seed): - seed_legs, cross_masks_str, cross_seeds = self.decode_seed(trig_seed) + def seeds_from_cfg(self, seed): + seed_legs = {l: self.trig_seeds[seed][l] for l in self.trig_seeds[seed] if "leg" in l} + cross_masks_str = self.trig_seeds[seed]["cross_masks"] + if len(cross_masks_str)>0: cross_masks_str = [cross_masks_str] + cross_seeds = [] + for leg, items in self.trig_seeds[seed].items(): + if leg == "x-seeds": + if isinstance(items, list): cross_seeds+=items + else: cross_seeds.append(items) + return seed_legs, cross_masks_str, cross_seeds + + def get_npass(self, seed, trig_seed): + seed_legs, cross_masks_str, cross_seeds = self.seeds_from_cfg(seed) leg_arrs, combos = self.get_legs_and_masks(seed_legs) ## define leg arrays @@ -300,7 +226,7 @@ def get_npass(self, trig_seed): ## Add cross-seeds: for xseed in cross_seeds: - xseed_mask = get_npass(self.trig_seeds[xseed]) + xseed_mask = self.get_npass(self.trig_seeds[xseed]) total_mask = total_mask & xseed_mask total_mask = ak.fill_none(total_mask, False) @@ -312,12 +238,11 @@ def prepare_masks(self): seeds = self.trig_seeds for seed in sorted(seeds): - if "PFTau" in seed: continue print(seed) - mask = self.get_npass(self.trig_seeds[seed]) + mask = self.get_npass(seed, self.trig_seeds[seed]) npass = np.sum(mask) print("##### Npasses:", npass,"\n") diff --git a/rates/table/menu_config.py b/rates/table/menu_config.py new file mode 100644 index 00000000..ea915e45 --- /dev/null +++ b/rates/table/menu_config.py @@ -0,0 +1,24 @@ +class MenuConfig: + + def __init__(self, cfg: dict): + self._cfg = cfg + + @property + def sample(self): + return self._cfg["sample"] + + @property + def scalings(self): + return self._cfg["scalings"] + + @property + def menu_cfg(self): + return self._cfg["menu_config"] + + @property + def menu_objects(self): + return self._cfg["menu_objects"] + + @property + def version(self): + return self._cfg["version"] diff --git a/rates/table/rate_table.py b/rates/table/rate_table.py index 18752fa5..123c4155 100644 --- a/rates/table/rate_table.py +++ b/rates/table/rate_table.py @@ -1,11 +1,30 @@ #!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python +import argparse +import yaml + from scaler import Scaler -from menu import MenuConfigurator +from menu import MenuTable +from menu_config import MenuConfig + +if __name__ == "__main__": + + parser = argparse.ArgumentParser() + parser.add_argument( + "cfg", + default="cfg_caching/V22.yaml", + help="" + ) + args = parser.parse_args() + + with open(args.cfg, 'r') as f: + cfg = yaml.safe_load(f) + + path_to_scalings = "/eos/user/m/mbonanom/www/Postdoc/L1PhaseII/V29/scalings/" + scaler = Scaler(path_to_scalings) + scaler.collect_scalings + scaler.scaling_dict -path_to_scalings = "/eos/user/m/mbonanom/www/Postdoc/L1PhaseII/V29/scalings/" -scaler = Scaler(path_to_scalings) -scaler.collect_scalings -scaler.scaling_dict + for menu_title, menu_cfg in cfg.items(): + menu_config = MenuTable(menu_cfg) + menu_config.make_table -menu_config = MenuConfigurator('scalings.yml', 'v29_WITHMUONS_Final_obj_dict.yml') -menu_config.make_table From ded3cd24788c6f321768105623e07cc4ec7d545d Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Wed, 2 Aug 2023 12:17:46 +0200 Subject: [PATCH 004/140] Clean up the code. Improve actions in config. Remove util functions from menu config definition --- .../cfg/v29/v29_16Seeds_Final_clean_cfg.yml | 38 +++-- rates/table/cfg/v29/v29_cfg.yml | 9 +- rates/table/menu_config.py | 24 ++- rates/table/{menu.py => menu_table.py} | 142 +++++++++++++++--- rates/table/rate_table.py | 15 +- rates/table/scaler.py | 73 +++++++-- rates/table/utils.py | 4 +- 7 files changed, 239 insertions(+), 66 deletions(-) rename rates/table/{menu.py => menu_table.py} (61%) mode change 100644 => 100755 rates/table/rate_table.py diff --git a/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml b/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml index afc1762f..0055f818 100644 --- a/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml +++ b/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml @@ -1,18 +1,17 @@ L1_DoubleEGEle: cross_masks: - leg1.deltaR(leg2) > 0.1 - - leg1.offline_pt + leg2.offline_pt > 40 leg1: leg_mask: - leg1.offline_pt >= 37.0 - abs(leg1.eta)<2.4 - - egid(leg1.passeseleid,leg1.passessaid,leg1.eta) + - leg1.passeseleid * (abs(leg1.eta)<1.5) + leg1.passessaid * (abs(leg1.eta) >= 1.5) obj: EG leg2: leg_mask: - leg2.offline_pt >= 24.0 - abs(leg2.eta)<2.4 - - egid(leg2.passeseleid,leg2.passessaid,leg2.eta) + - leg2.passeseleid * (abs(leg2.eta)<1.5) + leg2.passessaid * (abs(leg2.eta) >= 1.5) obj: EG L1_DoubleTkEle: cross_masks: @@ -21,13 +20,13 @@ L1_DoubleTkEle: leg_mask: - leg1.offline_pt >= 25.0 - abs(leg1.eta)<2.4 - - tkelequallow(leg1.et,leg1.eta,leg1.passeseleid) + - leg1.passeseleid * (abs(leg1.eta)<1.479) + (abs(leg1.eta)>1.479) obj: tkElectron leg2: leg_mask: - leg2.offline_pt >= 12.0 - abs(leg2.eta)<2.4 - - tkelequallow(leg2.et,leg2.eta,leg2.passeseleid) + - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) obj: tkElectron L1_DoubleTkMu: cross_masks: @@ -48,15 +47,15 @@ L1_DoubleTkPhoIso: leg_mask: - leg1.offline_pt >= 22.0 - abs(leg1.eta)<2.4 - - phoid(leg1.passeseleid,leg1.passesphoid,leg1.eta) - - rangecutless(leg1.trkiso,leg1.eta,1.479,0.25,0.205) + - leg1.passeseleid * (abs(leg1.eta)<1.5) + leg1.passesphoid * (abs(leg1.eta) >= 1.5) + - (leg1.trkiso<0.25) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.205) * (abs(leg1.eta)>=1.479) obj: tkPhoton leg2: leg_mask: - leg2.offline_pt >= 12.0 - abs(leg2.eta)<2.4 - - phoid(leg2.passeseleid,leg2.passesphoid,leg2.eta) - - rangecutless(leg2.trkiso,leg2.eta,1.479,0.25,0.205) + - leg2.passeseleid * (abs(leg2.eta)<1.5) + leg2.passesphoid * (abs(leg2.eta) >= 1.5) + - (leg2.trkiso<0.25) * (abs(leg2.eta)<1.479) + (leg2.trkiso<0.205) * (abs(leg2.eta)>=1.479) obj: tkPhoton L1_PFHTT: cross_masks: [] @@ -121,7 +120,7 @@ L1_SingleEGEle: leg_mask: - leg1.offline_pt >= 51.0 - abs(leg1.eta)<2.4 - - egid(leg1.passeseleid,leg1.passessaid,leg1.eta) + - leg1.passeseleid * (abs(leg1.eta)<1.5) + leg1.passessaid * (abs(leg1.eta) >= 1.5) obj: EG L1_SinglePfJet: cross_masks: [] @@ -137,15 +136,15 @@ L1_SingleTkEle: leg_mask: - leg1.offline_pt >= 36.0 - abs(leg1.eta)<2.4 - - tkelequalhigh(leg1.et,leg1.eta,leg1.passeseleid) + - leg1.passeseleid >= 0 obj: tkElectron L1_SingleTkEleIso: cross_masks: [] leg1: leg_mask: - leg1.offline_pt >= 28.0 - - tkeleisoquallow(leg1.et,leg1.eta,leg1.passeseleid) - - rangecutless(leg1.trkiso,leg1.eta,1.479,0.13,0.28) + - leg1.passeseleid * (abs(leg1.eta)<1.479) + (abs(leg1.eta)>1.479) + - (leg1.trkiso<0.13) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.28) * (abs(leg1.eta)>=1.479) obj: tkElectron L1_SingleTkMu: cross_masks: [] @@ -160,8 +159,8 @@ L1_SingleTkPhoIso: leg_mask: - leg1.offline_pt >= 36.0 - abs(leg1.eta)<2.4 - - phoid(leg1.passeseleid,leg1.passesphoid,leg1.eta) - - rangecutless(leg1.trkiso,leg1.eta,1.479,0.25,0.205) + - leg1.passeseleid * (abs(leg1.eta)<1.5) + leg1.passesphoid * (abs(leg1.eta) >= 1.5) + - (leg1.trkiso<0.25) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.205) * (abs(leg1.eta)>=1.479) obj: tkPhoton L1_TkEleIso_EG: cross_masks: @@ -170,14 +169,14 @@ L1_TkEleIso_EG: leg_mask: - leg1.offline_pt >= 22.0 - abs(leg1.eta)<2.4 - - tkeleisoquallow(leg1.et,leg1.eta,leg1.passeseleid) - - rangecutless(leg1.trkiso,leg1.eta,1.479,0.13,0.28) + - leg.passeseleid >= 0 + - (leg1.trkiso<0.13) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.28) * (abs(leg1.eta)>=1.479) obj: tkElectron leg2: leg_mask: - leg2.offline_pt >= 12.0 - abs(leg2.eta)<2.4 - - egid(leg2.passeseleid,leg2.passessaid,leg2.eta) + - leg2.passeseleid * (abs(leg2.eta)<1.5) + leg2.passessaid * (abs(leg2.eta) >= 1.5) obj: EG L1_TripleTkMu: cross_masks: @@ -200,5 +199,4 @@ L1_TripleTkMu: - leg3.pt>3 - abs(leg3.eta)<2.4 - leg3.qual>0 - obj: gmtTkMuon - + obj: gmtTkMuon \ No newline at end of file diff --git a/rates/table/cfg/v29/v29_cfg.yml b/rates/table/cfg/v29/v29_cfg.yml index 163d904f..04295717 100644 --- a/rates/table/cfg/v29/v29_cfg.yml +++ b/rates/table/cfg/v29/v29_cfg.yml @@ -2,4 +2,11 @@ MenuV29: version: "V29" sample: "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/13X/v29_RelVal/RelValTTbar_14TeV/RelVal_13X_TT_200PU_crab_v29_13X_RelVal_FixGenTree/230710_081407/L1NtuplePhaseII_Step1_hadd.root" menu_config: "cfg/v29_16Seeds_Final_clean_cfg.yml" - scalings: "scalings.yml" + scalings: + scalings_path: "/eos/user/m/mbonanom/www/Postdoc/L1PhaseII/V29/scalings/" + collect_scalings: True + scalings_outdir: "scalings_input/V29/" + scalings_file: "scalings.yml" + table: + table_fname: "rates_16Seeds_Final" + table_outdir: "rates_tables/V29" \ No newline at end of file diff --git a/rates/table/menu_config.py b/rates/table/menu_config.py index ea915e45..2a60c3dd 100644 --- a/rates/table/menu_config.py +++ b/rates/table/menu_config.py @@ -8,8 +8,20 @@ def sample(self): return self._cfg["sample"] @property - def scalings(self): - return self._cfg["scalings"] + def scalings_path(self): + return self._cfg["scalings"]["scalings_path"] + + @property + def do_scalings(self): + return self._cfg["scalings"]["collect_scalings"] + + @property + def scalings_file(self): + return self._cfg["scalings"]["scalings_file"] + + @property + def scalings_outdir(self): + return self._cfg["scalings"]["scalings_outdir"] @property def menu_cfg(self): @@ -22,3 +34,11 @@ def menu_objects(self): @property def version(self): return self._cfg["version"] + + @property + def table_outdir(self): + return self._cfg["table"]["table_outdir"] + + @property + def table_fname(self): + return self._cfg["table"]["table_fname"] \ No newline at end of file diff --git a/rates/table/menu.py b/rates/table/menu_table.py similarity index 61% rename from rates/table/menu.py rename to rates/table/menu_table.py index e3ea42be..acf311ed 100644 --- a/rates/table/menu.py +++ b/rates/table/menu_table.py @@ -3,7 +3,7 @@ from glob import glob -import yaml, re +import yaml, re, os from utils import * from menu_config import MenuConfig @@ -15,25 +15,67 @@ vector.register_awkward() class MenuTable: + ''' + Base class that defines the rates table. + This class contains method to read the minbias sample, + convert online to offline pT, and compute the trigger rates. + All the relevant information is dumped to a csv table. + ''' def __init__(self, cfg): self.cfg = MenuConfig(cfg) + self.version = self.cfg.version self.fname = self.cfg.sample + self.table_outdir = self.cfg.table_outdir + self.table_fname = self.cfg.table_fname self.cfg_fname = self.cfg.menu_cfg - self.scalings = self.get_scalings(self.cfg.scalings) + self.scalings = self.get_scalings(os.path.join(self.cfg.scalings_outdir, + self.cfg.scalings_file)) self.trig_seeds = self.get_trig_seeds() + def load_minbias(self, obj): + ''' + Function to load the minbias sample to be used for the rates computation. + The name of the file is specified in the config used for the MenuTable init. + ''' + with uproot.open(self.fname) as f: + arr = f["l1PhaseIITree/L1PhaseIITree"].arrays( + filter_name = f"{obj}*", + how = "zip" + ) + return arr + def get_scalings(self, scalings): + ''' + Get the list of scalings for all the L1 objects. + Scalings are collected by the Scaler() class and + saved to a yaml file. + The inputs used are the files created in `objectPerformance` + and saved in `objectPerformance/output/VX/scalings/*.txt` + ''' with open(f'{scalings}', 'r') as infile: scalings_eta = yaml.safe_load(infile.read()) return scalings_eta def get_trig_seeds(self): + ''' + Get the menu definition. + Load a yaml file containing the definition of the objects + and the cuts of each leg for the different trigger paths. + ''' with open(self.cfg_fname, 'r') as infile: test_trig_seeds = yaml.safe_load(infile.read()) return test_trig_seeds def add_offline_pt(self, arr, obj_scalings, pt_var = None): + ''' + Use the scalings to convert online pT to offline pT. + The `pt_var` argument can be used to specify which observables + should be used as "pT" for a given object. + If `pt_var` is not specified, `pt` or `et` are used. + For each object, a dedicated scaling in the barrel/endcap regions + is applied to the online pT. + ''' # initialise array of zeros identical to the original pt if pt_var is not None: pt_orig = arr[pt_var] elif "pt" in arr.fields: pt_orig = arr.pt @@ -50,7 +92,7 @@ def add_offline_pt(self, arr, obj_scalings, pt_var = None): new_pt = ak.zeros_like(pt_orig) # loop through eta regions with it's scaling parameters - for region,values in obj_scalings.items(): + for region, values in obj_scalings.items(): # create eta mask for this eta region eta_mask = (abs(arr.eta) >= values["eta_min"]) & (abs(arr.eta) < values["eta_max"]) # scale pt for non-masked elements of this eta region @@ -59,6 +101,11 @@ def add_offline_pt(self, arr, obj_scalings, pt_var = None): return ak.with_field(arr, new_pt, "offline_pt") def scale_pt(self, obj, arr): + ''' + Wrapper function that calls `add_offline_pt` if the scaling is defined. + If the scaling for a given object is not found, `offline_pt` is set to + be equal to the online pt. + ''' if obj in self.scalings: arr = self.add_offline_pt(arr, self.scalings[obj]) else: @@ -74,6 +121,14 @@ def scale_pt(self, obj, arr): return arr def format_values(self, arr): + ''' + Function to format values in the array. + The `et` branch is converted to `pt`, if no `pt` is found in the array. + If neither `pt` nor `et` are found in the array, the corresponding + entries will be left empty or filled with the unique field of the array. + The ID branches (`["passeseleid","passessaid","passesphoid"]`) are + converted into boolean variables for easier usage in the triggers definition. + ''' if "et" not in arr.fields: if "pt" in arr.fields: arr["et"] = arr.pt @@ -90,18 +145,13 @@ def format_values(self, arr): return arr - def load_minbias(self, obj): - with uproot.open(self.fname) as f: - arr = f["l1PhaseIITree/L1PhaseIITree"].arrays( - filter_name = f"{obj}*", - how = "zip" - ) - return arr - - def get_obj_arr(self, obj, - sample = "MinBias", - vers = "V29_part"): - + def get_obj_arr(self, obj): + ''' + Function that loads the minbias sample and gets the relevant object from the TTree. + The TBranches are loaded in an awkward array, `format_values` is used to parse the + `pt`, `et`, and ID branches. + The `scale_pt` function is used to convert the online pT into offline using the scalings. + ''' arr = self.load_minbias(obj) if "jagged0" in arr.fields: arr = arr["jagged0"] @@ -113,6 +163,12 @@ def get_obj_arr(self, obj, return arr def get_legs(self, seed_legs): + ''' + Function that parses the config file (menu definition) + to get the cuts to be used for the definition of each trigger leg + and the L1 object used. + The function returns the awkard array after the application of the cuts. + ''' all_arrs = {} leg_arrs = {} @@ -138,14 +194,18 @@ def get_legs(self, seed_legs): return leg_arrs def get_combos(self, leg_arrs, seed_legs): - + ''' + For multi-leg triggers, this function creates the combination of the legs. + After the trigger legs are combined, the resulting array corresponding to the + AND of all the conditions on each leg is returned. + ''' if len(leg_arrs) > 1: combos = ak.cartesian(leg_arrs) else: combos = leg_arrs ## duplicate handling (exclude combinations) - ### first check whether objects are repeating + ## first check whether objects are repeating objs = [o["obj"] for o in seed_legs.values()] obj_cnts = {i: objs.count(i) for i in objs} @@ -167,6 +227,11 @@ def get_combos(self, leg_arrs, seed_legs): return combos def get_legs_and_masks(self, seed_legs): + ''' + Wrapper function that calls `get_legs` and `get_combos`. + This function returns the awkward arrays with the legs definition + and the definition of the combinations in case of multi-leg triggers. + ''' ### load all legs leg_arrs = self.get_legs(seed_legs) @@ -175,7 +240,11 @@ def get_legs_and_masks(self, seed_legs): return leg_arrs, combos - def get_eval_string(self, leg_arrs): + def get_eval_string(self, leg_arrs): + ''' + Function that selects only relevant entries in the arrays and returns the + awkward array corresponding to events which satisfy the cuts on the trigger legs. + ''' eval_str = [] for leg, leg_arr in leg_arrs.items(): if "var" in str(leg_arr.type): @@ -187,6 +256,10 @@ def get_eval_string(self, leg_arrs): return eval_str def seeds_from_cfg(self, seed): + ''' + Function that loads the information from the menu config. + Returns the legs, cross_masks, and cross-triggers (if present). + ''' seed_legs = {l: self.trig_seeds[seed][l] for l in self.trig_seeds[seed] if "leg" in l} cross_masks_str = self.trig_seeds[seed]["cross_masks"] if len(cross_masks_str)>0: cross_masks_str = [cross_masks_str] @@ -198,6 +271,12 @@ def seeds_from_cfg(self, seed): return seed_legs, cross_masks_str, cross_seeds def get_npass(self, seed, trig_seed): + ''' + Main function that computes the nr of events passing each trigger. + After loading the minbias sample and the menu definition, + each leg is selected and the masks are applied (together with cross-masks/seeds). + The function returns the total mask that defines the trigger. + ''' seed_legs, cross_masks_str, cross_seeds = self.seeds_from_cfg(seed) leg_arrs, combos = self.get_legs_and_masks(seed_legs) @@ -233,6 +312,11 @@ def get_npass(self, seed, trig_seed): return total_mask def prepare_masks(self): + ''' + Wrapper function that calls `get_npass` + for each object defined in the menu. + The function returns the masks for each object. + ''' trig_masks = {} seeds = self.trig_seeds @@ -250,8 +334,13 @@ def prepare_masks(self): return trig_masks - @property def make_table(self): + ''' + Function that prints to screen the rates table. + Returns a list containing the csv-compatible table. + ''' + table = [] + table.append("Seed,NPass,Eff,Rate\n") total_mask = 0 trig_masks = self.prepare_masks() @@ -261,6 +350,7 @@ def make_table(self): npass = np.sum(mask) eff = npass/len(mask) rate = eff * 2760*11246 / 1e3 + table.append(f"{seed},{npass},{eff},{rate}\n") print(seed.ljust(50), ":\t%8i\t%.5f\t%.1f" %(npass, eff, rate)) ## total @@ -269,7 +359,21 @@ def make_table(self): rate = eff * 2760*11246 / 1e3 tot_str = "Total:".ljust(50)+ "\t%8i\t%.5f\t%.1f" %(npass, eff, rate) + table.append(f"Total,{npass},{eff},{rate}\n") + table.append(f"Total nev,{len(total_mask)},,\n") print((len(tot_str)+5)*"-") print(tot_str) print("Total nev: %i" % len(total_mask)) + + return table + + def dump_table(self, table): + ''' + Function that dumps to file the table produced by `make_table`. + ''' + os.makedirs(f"{self.table_outdir}", exist_ok=True) + f = open(f"{self.table_outdir}/{self.table_fname}_{self.version}.csv", "w") + for line in table: + f.write(line) + f.close() diff --git a/rates/table/rate_table.py b/rates/table/rate_table.py old mode 100644 new mode 100755 index 123c4155..e5c84cc2 --- a/rates/table/rate_table.py +++ b/rates/table/rate_table.py @@ -3,7 +3,7 @@ import yaml from scaler import Scaler -from menu import MenuTable +from menu_table import MenuTable from menu_config import MenuConfig if __name__ == "__main__": @@ -19,12 +19,11 @@ with open(args.cfg, 'r') as f: cfg = yaml.safe_load(f) - path_to_scalings = "/eos/user/m/mbonanom/www/Postdoc/L1PhaseII/V29/scalings/" - scaler = Scaler(path_to_scalings) - scaler.collect_scalings - scaler.scaling_dict - for menu_title, menu_cfg in cfg.items(): - menu_config = MenuTable(menu_cfg) - menu_config.make_table + scaler = Scaler(menu_cfg) + scaler.collect_scalings + scaler.dump_scalings + menu_config = MenuTable(menu_cfg) + table = menu_config.make_table() + menu_config.dump_table(table) \ No newline at end of file diff --git a/rates/table/scaler.py b/rates/table/scaler.py index 2df58d17..ea67902a 100644 --- a/rates/table/scaler.py +++ b/rates/table/scaler.py @@ -2,13 +2,34 @@ import os, yaml from glob import glob +from menu_config import MenuConfig class Scaler: - def __init__(self, path_to_scalings): - self.dir = path_to_scalings - self.fnames = glob(f"{self.dir}/*.txt") + ''' + Base class that takes as input the scalings computed + in `objectPerformance` and aggregates all of them together + to be used for the rates computation. + ''' + def __init__(self, cfg): + self.cfg = MenuConfig(cfg) + self.scalings_path = self.cfg.scalings_path + self.scalings_file = self.cfg.scalings_file + self.scalings_outdir = self.cfg.scalings_outdir + self.do_scalings = self.cfg.do_scalings + self.fnames = glob(f"{self.scalings_path}/*.txt") self.scaling_dict = {} -# self.scaling_file = None + self.init_log + + @property + def init_log(self): + print(f"::: The scalings file used is: {self.scalings_outdir}/{self.scalings_file} :::") + if (not os.path.isfile(f"{self.scalings_outdir}/{self.scalings_file}")) and (not self.do_scalings): + print(f"::: WARNING!! You are trying to use {self.scalings_outdir}/{self.scalings_file}, but the file does not exist! :::") + print("::: WARNING!! Set do_scalings to True in config or specify a different location for the scalings file! :::") + if self.do_scalings: + print(f"::: Will collect scalings from scratch and recreate {self.scalings_file} :::") + print(f"::: Will load scalings from {self.scalings_path} :::") + print(f"::: Will dump scalings into {self.scalings_outdir} :::") def get_lines(self, fname): with open(fname) as f: @@ -17,16 +38,21 @@ def get_lines(self, fname): return lines def get_basename(self, fname): + # TODO: Harmonize the naming of the scaligns in `objectPerformance` + # so that we can drop this function. basename = os.path.basename(fname).replace(".txt","") basename = basename.replace( "Turnon","").replace( "Trigger","").replace( - "Matching","").replace( "_","") return basename def eta_ranges(self, obj, suffix): + ''' + Wrapper function that defines the Barrel/Overlap/Endcap + range definitions for different objects. + ''' eta_range = None if obj == "Muons": if suffix == "Barrel": @@ -46,22 +72,30 @@ def eta_ranges(self, obj, suffix): return eta_range def get_eta_range(self, fname): - + ''' + Wrapper function that calls `eta_ranges` + and returns the object and the relevant eta ranges + for the various detector regions. + ''' basename = self.get_basename(fname) - + for suffix in ["Barrel","Endcap","Overlap"]: if suffix in basename: obj = basename.split(suffix)[0] eta_range = self.eta_ranges(obj, suffix) - + if eta_range is None: print("Not found! ", basename, obj) else: return obj, suffix, eta_range - + return None def decode_scaling(self, line): + ''' + Function that parses the syntax used in the scaling.txt files + and returns the slope and offset of the scaling law for each object. + ''' line = line.replace(" ","") items = line.split("::") @@ -73,19 +107,24 @@ def decode_scaling(self, line): @property def collect_scalings(self): + ''' + Property that collects the scalings for all the objects available + and saves them to `self.scaling_dict`. + This function works only if `do_scalings` is set to True in the config. + ''' + if not self.do_scalings: return for fname in self.fnames: r = self.get_eta_range(os.path.basename(fname)) - if r is None: - print(30*"#", r) + if r is None: objcat = None region = None eta_range = (None,None) else: objcat,region,eta_range = r - + lines = self.get_lines(fname) - + for line in lines: obj,slope,offset = self.decode_scaling(line) d = { region : { @@ -101,7 +140,13 @@ def collect_scalings(self): @property def dump_scalings(self): - with open('scalings.yml', 'w') as outfile: + ''' + Property that dumps to file the content of `self.scaling_dict`. + This function works only if `do_scalings` is set to True in the config. + ''' + if not self.do_scalings: return + os.makedirs(f"{self.scalings_outdir}", exist_ok=True) + with open(f'{self.scalings_outdir}/{self.scalings_file}', 'w') as outfile: yaml.dump(self.scaling_dict, outfile, default_flow_style=False) diff --git a/rates/table/utils.py b/rates/table/utils.py index 2617b468..56238cf3 100644 --- a/rates/table/utils.py +++ b/rates/table/utils.py @@ -20,12 +20,12 @@ def egid(EleID, SaID, Eta): return EleID * abs(Eta)<1.5 + SaID * (abs(Eta)>=1.5) def TkEleQualHIGH(Et,Eta,PassesEleID): return PassesEleID -def TkEleQualLOW(Et,Eta,PassesEleID): return PassesEleID * (abs(Eta)<1.479) + (abs(Eta)<1.479) +def TkEleQualLOW(Et,Eta,PassesEleID): return PassesEleID * (abs(Eta)<1.479) + (abs(Eta)>1.479) def TkEleIsoQualHIGH(Et,Eta,PassesEleID): return PassesEleID * (abs(Eta)>1.479) + (abs(Eta)<1.479) def TkEleIsoQualLOW(Et,Eta,PassesEleID): return (PassesEleID>=0) # this should be always true: we can remove this condition from the menu def tkelequalhigh(et,eta,passeseleid): return passeseleid -def tkelequallow(et,eta,passeseleid): return passeseleid * (abs(eta)<1.479) + (abs(eta)<1.479) +def tkelequallow(et,eta,passeseleid): return passeseleid * (abs(eta)<1.479) + (abs(eta)>1.479) def tkeleisoqualhigh(et,eta,passeseleid): return passeseleid * (abs(eta)>1.479) + (abs(eta)<1.479) def tkeleisoquallow(et,eta,passeseleid): return (passeseleid>=0) # this should be always true: we can remove this condition from the menu From c9df08b010c71b19bc76ad55b64efc309814224f Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Wed, 2 Aug 2023 13:06:34 +0200 Subject: [PATCH 005/140] Cleaned up config for v29_WITHMUONS menu --- .../cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml | 697 ++++++++++++++++++ 1 file changed, 697 insertions(+) create mode 100644 rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml diff --git a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml new file mode 100644 index 00000000..00478fa6 --- /dev/null +++ b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml @@ -0,0 +1,697 @@ +L1_DoubleEGEle: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + leg1: + leg_mask: + - leg1.offline_pt >= 37.0 + - abs(leg1.eta)<2.4 + - leg1.passeseleid * (abs(leg1.eta)<1.5) + leg1.passessaid * (abs(leg1.eta) >= 1.5) + obj: EG + leg2: + leg_mask: + - leg2.offline_pt >= 24.0 + - abs(leg2.eta)<2.4 + - leg2.passeseleid * (abs(leg2.eta)<1.5) + leg2.passessaid * (abs(leg2.eta) >= 1.5) + obj: EG +L1_DoublePFJet_MassMin: + cross_masks: + - pairinvmass(leg2.et,leg1.et,leg2.eta,leg1.eta,leg2.phi,leg1.phi)>620.0 + leg1: + leg_mask: + - leg1.offline_pt >= 160.0 + obj: seededConePuppiJet + leg2: + leg_mask: + - leg2.offline_pt >= 35.0 + - leg2.et>25 + obj: seededConePuppiJet +L1_DoublePFJet_dEtaMax: + cross_masks: + - abs(leg2.eta-leg1.eta)<1.6 + leg1: + leg_mask: + - leg1.offline_pt >= 112.0 + - leg1.et>25 + - abs(leg1.eta)<2.4 + obj: seededConePuppiJet + leg2: + leg_mask: + - leg2.offline_pt >= 112.0 + - leg2.et>25 + - abs(leg2.eta)<2.4 + obj: seededConePuppiJet +L1_DoubleTkEle: + cross_masks: + - abs(leg2.zvtx-leg1.zvtx)<1 + leg1: + leg_mask: + - leg1.offline_pt >= 25.0 + - abs(leg1.eta)<2.4 + - leg1.passeseleid * (abs(leg1.eta)<1.479) + (abs(leg1.eta)>1.479) + obj: tkElectron + leg2: + leg_mask: + - leg2.offline_pt >= 12.0 + - abs(leg2.eta)<2.4 + - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) + obj: tkElectron +L1_DoubleTkEle_PFHTT: + cross_masks: + - abs(leg2.zvtx-leg1.et)<1 + - abs(leg3.zvtx-leg1.et)<1 + leg1: + leg_mask: + - leg1.et>-99999.0 + obj: z0L1TkPV + leg2: + leg_mask: + - leg2.offline_pt >= 8.0 + - abs(leg2.eta)<2.5 + - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) + obj: tkElectron + leg3: + leg_mask: + - leg3.offline_pt >= 8.0 + - abs(leg3.eta)<2.5 + - leg3.passeseleid * (abs(leg3.eta)<1.479) + (abs(leg3.eta)>1.479) + obj: tkElectron + leg4: + leg_mask: + - leg4.offline_pt >= 390.0 + obj: seededConePuppiHT +L1_DoubleTkMu: + cross_masks: + - abs(leg1.z0-leg2.z0)<1 + leg1: + leg_mask: + - leg1.offline_pt >= 15.0 + - abs(leg1.eta)<2.4 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.pt>7 + - abs(leg2.eta)<2.4 + - leg2.qual>0 + obj: gmtTkMuon +L1_DoubleTkMu0er1p5_SQ_OS_dR_Max1p4: + cross_masks: + - leg1.deltaR(leg2)<1.4 + - leg1.chg*leg2.chg<0.0 + - abs(leg2.z0-leg1.z0)<1 + leg1: + leg_mask: + - abs(leg1.eta)<1.5 + - leg1.qual>0 + obj: gmtTkMuon + leg2: + leg_mask: + - abs(leg2.eta)<1.5 + - leg2.qual>0 + obj: gmtTkMuon +L1_DoubleTkMu4_SQ_OS_dR_Max1p2: + cross_masks: + - leg1.deltaR(leg2)<1.2 + - leg1.chg*leg2.chg<0.0 + - abs(leg2.z0-leg1.z0)<1 + leg1: + leg_mask: + - leg1.pt>4 + - abs(leg1.eta)<2.4 + - leg1.qual>0 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.pt>4 + - abs(leg2.eta)<2.4 + - leg2.qual>0 + obj: gmtTkMuon +L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18: + cross_masks: + - pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)>7.0 + - pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)<18.0 + - leg1.chg*leg2.chg<0.0 + - abs(leg2.z0-leg1.z0)<1 + leg1: + leg_mask: + - leg1.pt>4.5 + - abs(leg1.eta)<2.0 + - leg1.qual>0 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.pt>4.5 + - abs(leg2.eta)<2.0 + - leg2.qual>0 + obj: gmtTkMuon +L1_DoubleTkMu9_SQ: + cross_masks: + - abs(leg2.z0-leg1.z0)<1 + leg1: + leg_mask: + - leg1.offline_pt >= 9.0 + - abs(leg1.eta)<2.4 + - leg1.qual>0 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.offline_pt >= 9.0 + - abs(leg2.eta)<2.4 + - leg2.qual>0 + obj: gmtTkMuon +L1_DoubleTkMu_PfHTT: + cross_masks: + - abs(leg2.z0-leg1.et)<1 + - abs(leg3.z0-leg1.et)<1 + leg1: + leg_mask: + - leg1.et>-99999.0 + obj: z0L1TkPV + leg2: + leg_mask: + - leg2.pt>3 + - abs(leg2.eta)<2.4 + - leg2.qual>0 + obj: gmtTkMuon + leg3: + leg_mask: + - leg3.pt>3 + - abs(leg3.eta)<2.4 + - leg3.qual>0 + obj: gmtTkMuon + leg4: + leg_mask: + - leg4.offline_pt >= 300.0 + obj: seededConePuppiHT +L1_DoubleTkMu_PfJet_PfMet: + cross_masks: + - abs(leg2.z0-leg1.et)<1 + - abs(leg3.z0-leg1.et)<1 + leg1: + leg_mask: + - leg1.et>-99999.0 + obj: z0L1TkPV + leg2: + leg_mask: + - leg2.pt>3 + - abs(leg2.eta)<2.4 + - leg2.qual>0 + obj: gmtTkMuon + leg3: + leg_mask: + - leg3.pt>3 + - abs(leg3.eta)<2.4 + - leg3.qual>0 + obj: gmtTkMuon + leg4: + leg_mask: + - leg4.offline_pt >= 60.0 + - leg4.et>25 + - abs(leg4.eta)<2.4 + obj: seededConePuppiJet + leg5: + leg_mask: + - leg5.offline_pt >= 130.0 + obj: puppiMET +L1_DoubleTkMu_TkEle: + cross_masks: + - abs(leg2.z0-leg1.z0)<1 + - abs(leg3.zvtx-leg1.z0)<1 + leg1: + leg_mask: + - leg1.pt>5 + - abs(leg1.eta)<2.4 + - leg1.qual>0 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.pt>5 + - abs(leg2.eta)<2.4 + - leg2.qual>0 + obj: gmtTkMuon + leg3: + leg_mask: + - leg3.offline_pt >= 9.0 + - abs(leg3.eta)<2.4 + - leg3.passeseleid * (abs(leg3.eta)<1.479) + (abs(leg3.eta)>1.479) + obj: tkElectron +L1_DoubleTkPhoIso: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 22.0 + - abs(leg1.eta)<2.4 + - leg1.passeseleid * (abs(leg1.eta)<1.5) + leg1.passesphoid * (abs(leg1.eta) >= 1.5) + - (leg1.trkiso<0.25) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.205) * (abs(leg1.eta)>=1.479) + obj: tkPhoton + leg2: + leg_mask: + - leg2.offline_pt >= 12.0 + - abs(leg2.eta)<2.4 + - leg2.passeseleid * (abs(leg2.eta)<1.5) + leg2.passesphoid * (abs(leg2.eta) >= 1.5) + - (leg2.trkiso<0.25) * (abs(leg2.eta)<1.479) + (leg2.trkiso<0.205) * (abs(leg2.eta)>=1.479) + obj: tkPhoton +L1_PFHTT: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 450.0 + obj: seededConePuppiHT +L1_PFHTT_QuadJet: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 400.0 + obj: seededConePuppiHT + leg2: + leg_mask: + - leg2.offline_pt >= 70.0 + - leg2.et>25.0 + - abs(leg2.eta)<2.4 + obj: seededConePuppiJet + leg3: + leg_mask: + - leg3.offline_pt >= 55.0 + - leg3.et>25.0 + - abs(leg3.eta)<2.4 + obj: seededConePuppiJet + leg4: + leg_mask: + - leg4.offline_pt >= 40.0 + - leg4.et>25.0 + - abs(leg4.eta)<2.4 + obj: seededConePuppiJet + leg5: + leg_mask: + - leg5.offline_pt >= 40.0 + - leg5.et>25.0 + - abs(leg5.eta)<2.4 + obj: seededConePuppiJet +L1_PFIsoTau_PFIsoTau: + cross_masks: + - leg1.deltaR(leg2)>0.5 + leg1: + leg_mask: + - leg1.offline_pt >= 52.0 + - abs(leg1.eta)<2.172 + - leg1.passloosenn>0 + obj: nnTau + leg2: + leg_mask: + - leg2.offline_pt >= 52.0 + - abs(leg2.eta)<2.172 + - leg2.passloosenn>0 + obj: nnTau +L1_PFIsoTau_PFMet: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 55.0 + - abs(leg1.eta)<2.172 + - leg1.passloosenn>0 + obj: nnTau + leg2: + leg_mask: + - leg2.offline_pt >= 190.0 + obj: puppiMET +L1_PFIsoTau_TkMu: + cross_masks: + - abs(leg3.z0-leg1.et)<1 + leg1: + leg_mask: + - leg1.et>-99999.0 + obj: z0L1TkPV + leg2: + leg_mask: + - leg2.offline_pt >= 42.0 + - abs(leg2.eta)<2.172 + - leg2.passloosenn>0 + obj: nnTau + leg3: + leg_mask: + - leg3.offline_pt >= 18.0 + - abs(leg3.eta)<2.1 + obj: gmtTkMuon +L1_PFMHTT: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 135.5 + obj: seededConePuppiMHT +L1_PFMet: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 200.0 + obj: puppiMET +L1_PFTau_PFTau: + cross_masks: + - leg1.deltaR(leg2)>0.5 + leg1: + leg_mask: + - leg1.offline_pt >= 90.0 + - abs(leg1.eta)<2.172 + obj: caloTau + leg2: + leg_mask: + - leg2.offline_pt >= 90.0 + - abs(leg2.eta)<2.172 + obj: caloTau +L1_SingleEGEle: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 51.0 + - abs(leg1.eta)<2.4 + - leg1.passeseleid * (abs(leg1.eta)<1.5) + leg1.passessaid * (abs(leg1.eta) >= 1.5) + obj: EG +L1_SinglePFTau: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 150.0 + - abs(leg1.eta)<2.172 + obj: caloTau +L1_SinglePfJet: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 230.0 + - leg1.et>25 + - abs(leg1.eta)<2.4 + obj: seededConePuppiJet +L1_SingleTkEle: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 36.0 + - abs(leg1.eta)<2.4 + - tkelequalhigh(leg1.et,leg1.eta,leg1.passeseleid) + obj: tkElectron +L1_SingleTkEleIso: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 28.0 + - leg1.passeseleid * (abs(leg1.eta)<1.479) + (abs(leg1.eta)>1.479) + - (leg1.trkiso<0.13) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.28) * (abs(leg1.eta)>=1.479) + obj: tkElectron +L1_SingleTkMu: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 22.0 + - abs(leg1.eta)<2.4 + obj: gmtTkMuon +L1_SingleTkPhoIso: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 36.0 + - abs(leg1.eta)<2.4 + - leg1.passeseleid * (abs(leg1.eta)<1.5) + leg1.passesphoid * (abs(leg1.eta) >= 1.5) + - (leg1.trkiso<0.25) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.205) * (abs(leg1.eta)>=1.479) + obj: tkPhoton +L1_TkEleIso_EG: + cross_masks: + - leg1.deltaR(leg2) > 0.1 + leg1: + leg_mask: + - leg1.offline_pt >= 22.0 + - abs(leg1.eta)<2.4 + - leg1.passeseleid * (abs(leg1.eta)<1.479) + (abs(leg1.eta)>1.479) + - (leg1.trkiso<0.13) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.28) * (abs(leg1.eta)>=1.479) + obj: tkElectron + leg2: + leg_mask: + - leg2.offline_pt >= 12.0 + - abs(leg2.eta)<2.4 + - leg2.passeseleid * (abs(leg2.eta)<1.5) + leg2.passessaid * (abs(leg2.eta) >= 1.5) + obj: EG +L1_TkEleIso_PFHTT: + cross_masks: + - abs(leg2.zvtx-leg1.et)<1 + leg1: + leg_mask: + - leg1.et>-99999.0 + obj: z0L1TkPV + leg2: + leg_mask: + - leg2.offline_pt >= 26.0 + - abs(leg2.eta)<2.1 + - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) + - (leg2.trkiso<0.13) * (abs(leg2.eta)<1.479) + (leg2.trkiso<0.28) * (abs(leg2.eta)>=1.479) + obj: tkElectron + leg3: + leg_mask: + - leg3.offline_pt >= 190.0 + obj: seededConePuppiHT +L1_TkEleIso_PFIsoTau: + cross_masks: + - abs(leg2.zvtx-leg1.et)<1 + leg1: + leg_mask: + - leg1.et>-99999.0 + obj: z0L1TkPV + leg2: + leg_mask: + - leg2.offline_pt >= 22.0 + - abs(leg2.eta)<2.1 + - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) + - (leg2.trkiso<0.13) * (abs(leg2.eta)<1.479) + (leg2.trkiso<0.28) * (abs(leg2.eta)>=1.479) + obj: tkElectron + leg3: + leg_mask: + - leg3.offline_pt >= 45.0 + - abs(leg3.eta)<2.172 + - leg3.passloosenn>0 + obj: nnTau +L1_TkEle_PFJet_dRMin: + cross_masks: + - abs(leg2.zvtx-leg1.et)<1 + - leg2.deltaR(leg3)>0.3 + leg1: + leg_mask: + - leg1.et>-99999.0 + obj: z0L1TkPV + leg2: + leg_mask: + - leg2.offline_pt >= 28.0 + - abs(leg2.eta)<2.1 + - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) + obj: tkElectron + leg3: + leg_mask: + - leg3.offline_pt >= 40.0 + - leg3.et>25 + - abs(leg3.eta)<2.4 + obj: seededConePuppiJet +L1_TkEle_TkMu: + cross_masks: + - abs(leg2.z0-leg1.zvtx)<1 + leg1: + leg_mask: + - leg1.offline_pt >= 10.0 + - abs(leg1.eta)<2.4 + - leg1.passeseleid * (abs(leg1.eta)<1.479) + (abs(leg1.eta)>1.479) + obj: tkElectron + leg2: + leg_mask: + - leg2.offline_pt >= 20.0 + - abs(leg2.eta)<2.4 + obj: gmtTkMuon +L1_TkMu_DoubleTkEle: + cross_masks: + - abs(leg2.zvtx-leg1.z0)<1 + - abs(leg3.zvtx-leg1.z0)<1 + leg1: + leg_mask: + - leg1.pt>6 + - abs(leg1.eta)<2.4 + - leg1.qual>0 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.offline_pt >= 17.0 + - abs(leg2.eta)<2.4 + - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) + obj: tkElectron + leg3: + leg_mask: + - leg3.offline_pt >= 17.0 + - abs(leg3.eta)<2.4 + - leg3.passeseleid * (abs(leg3.eta)<1.479) + (abs(leg3.eta)>1.479) + obj: tkElectron +L1_TkMu_PfHTT: + cross_masks: + - abs(leg2.z0-leg1.et)<1 + leg1: + leg_mask: + - leg1.et>-99999.0 + obj: z0L1TkPV + leg2: + leg_mask: + - leg2.pt>6 + - abs(leg2.eta)<2.4 + - leg2.qual>0 + obj: gmtTkMuon + leg3: + leg_mask: + - leg3.offline_pt >= 320.0 + obj: seededConePuppiHT +L1_TkMu_PfJet_PfMet: + cross_masks: + - abs(leg2.z0-leg1.et)<1 + leg1: + leg_mask: + - leg1.et>-99999.0 + obj: z0L1TkPV + leg2: + leg_mask: + - leg2.pt>3 + - abs(leg2.eta)<2.1 + - leg2.qual>0 + obj: gmtTkMuon + leg3: + leg_mask: + - leg3.offline_pt >= 110.0 + - leg3.et>25 + - abs(leg3.eta)<2.5 + obj: seededConePuppiJet + leg4: + leg_mask: + - leg4.offline_pt >= 120.0 + obj: puppiMET +L1_TkMu_PfJet_dRMax_DoubleJet_dEtaMax: + cross_masks: + - abs(leg2.z0-leg1.et)<1 + - leg2.deltaR(leg3)<0.4 + - abs(leg5.eta-leg4.eta)<1.6 + leg1: + leg_mask: + - leg1.et>-99999.0 + obj: z0L1TkPV + leg2: + leg_mask: + - leg2.offline_pt >= 12.0 + - abs(leg2.eta)<2.4 + - leg2.qual>0 + obj: gmtTkMuon + leg3: + leg_mask: + - leg3.offline_pt >= 40.0 + - leg3.et>25 + - abs(leg3.eta)<2.4 + obj: seededConePuppiJet + leg4: + leg_mask: + - leg4.offline_pt >= 40.0 + - leg4.et>25 + - abs(leg4.eta)<2.4 + obj: seededConePuppiJet + leg5: + leg_mask: + - leg5.offline_pt >= 40.0 + - leg5.et>25 + - abs(leg5.eta)<2.4 + obj: seededConePuppiJet +L1_TkMu_TkEle: + cross_masks: + - abs(leg2.zvtx-leg1.z0)<1 + leg1: + leg_mask: + - leg1.offline_pt >= 7.0 + - abs(leg1.eta)<2.4 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.offline_pt >= 23.0 + - abs(leg2.eta)<2.4 + - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) + obj: tkElectron +L1_TkMu_TkEleIso: + cross_masks: + - abs(leg2.zvtx-leg1.z0)<1 + leg1: + leg_mask: + - leg1.pt>7 + - abs(leg1.eta)<2.4 + - leg1.qual>0 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.offline_pt >= 20.0 + - abs(leg2.eta)<2.4 + - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) + - (leg2.trkiso<0.13) * (abs(leg2.eta)<1.479) + (leg2.trkiso<0.28) * (abs(leg2.eta)>=1.479) + obj: tkElectron +L1_TripleTkMu: + cross_masks: + - abs(leg2.z0-leg1.z0)<1 + - abs(leg3.z0-leg1.z0)<1 + leg1: + leg_mask: + - leg1.pt>5 + - abs(leg1.eta)<2.4 + - leg1.qual>0 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.pt>3 + - abs(leg2.eta)<2.4 + - leg2.qual>0 + obj: gmtTkMuon + leg3: + leg_mask: + - leg3.pt>3 + - abs(leg3.eta)<2.4 + - leg3.qual>0 + obj: gmtTkMuon +L1_TripleTkMu_5SQ_3SQ_0OQ_DoubleMu_5_3_SQ_OS_Mass_Max9: + cross_masks: + - pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)<9.0 + - leg1.chg*leg2.chg<0.0 + - abs(leg2.z0-leg1.z0)<1 + - abs(leg3.z0-leg1.z0)<1 + leg1: + leg_mask: + - leg1.pt>5 + - abs(leg1.eta)<2.4 + - leg1.qual>0 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.pt>3 + - abs(leg2.eta)<2.4 + - leg2.qual>0 + obj: gmtTkMuon + leg3: + leg_mask: + - leg3.pt>0 + - abs(leg3.eta)<2.4 + - leg3.qual>0 + obj: gmtTkMuon +L1_TripleTkMu_5_3p5_2p5_OS_Mass_5to17: + cross_masks: + - abs(leg2.z0-leg1.z0)<1 + - leg1.chg*leg3.chg<0.0 + - pairinvmass(leg3.pt,leg1.pt,leg3.eta,leg1.eta,leg3.phi,leg1.phi)>5.0 + - pairinvmass(leg3.pt,leg1.pt,leg3.eta,leg1.eta,leg3.phi,leg1.phi)<17.0 + - abs(leg3.z0-leg1.z0)<1 + leg1: + leg_mask: + - leg1.pt>5 + - abs(leg1.eta)<2.4 + - leg1.qual>0 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.pt>3.5 + - abs(leg2.eta)<2.4 + - leg2.qual>0 + obj: gmtTkMuon + leg3: + leg_mask: + - leg3.pt>2.5 + - abs(leg3.eta)<2.4 + - leg3.qual>0 + obj: gmtTkMuon From 645265be37ee98822fe1ac7c7ade178a7e1ae00d Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Mon, 7 Aug 2023 09:59:03 +0200 Subject: [PATCH 006/140] [v29_16Seeds] Scalings and minor modifications for full synch on v29_16Seeds menu (Double and TripleTkMuon slightly off) --- .../cfg/v29/v29_16Seeds_Final_clean_cfg.yml | 222 +++++++++--------- rates/table/menu_table.py | 7 +- rates/table/scalings_input/V29/scalings.yml | 200 ++++++++++++++++ rates/table/utils.py | 4 +- 4 files changed, 322 insertions(+), 111 deletions(-) create mode 100644 rates/table/scalings_input/V29/scalings.yml diff --git a/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml b/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml index 0055f818..f600ecaf 100644 --- a/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml +++ b/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml @@ -1,18 +1,107 @@ L1_DoubleEGEle: cross_masks: - - leg1.deltaR(leg2) > 0.1 + - ak.where(abs(leg2.phi-leg1.phi) 0.1 leg1: leg_mask: - - leg1.offline_pt >= 37.0 + - leg1.offline_pt >= 37 - abs(leg1.eta)<2.4 - leg1.passeseleid * (abs(leg1.eta)<1.5) + leg1.passessaid * (abs(leg1.eta) >= 1.5) + # - ak.where(abs(leg1.eta)<1.5, leg1.passeseleid, leg1.passessaid) obj: EG leg2: leg_mask: - - leg2.offline_pt >= 24.0 + - leg2.offline_pt >= 24 - abs(leg2.eta)<2.4 - leg2.passeseleid * (abs(leg2.eta)<1.5) + leg2.passessaid * (abs(leg2.eta) >= 1.5) + # - ak.where(abs(leg2.eta)<1.5, leg2.passeseleid, leg2.passessaid) obj: EG +L1_SingleEGEle: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 51.0 + - abs(leg1.eta)<2.4 + - leg1.passeseleid * (abs(leg1.eta)<1.5) + leg1.passessaid * (abs(leg1.eta) >= 1.5) + obj: EG +L1_SinglePfJet: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt > 230.0 + - leg1.et>25 + - abs(leg1.eta)<2.4 + obj: seededConePuppiJet +L1_SingleTkEle: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 36.0 + - abs(leg1.eta)<2.4 + - leg1.passeseleid + # - leg1.passeseleid > 0 + obj: tkElectron +L1_SingleTkEleIso: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 28.0 + - leg1.passeseleid>=0 + - ak.where(abs(leg1.eta)<1.479, leg1.trkiso<0.13, leg1.trkiso<0.28) + obj: tkElectron +L1_SingleTkMu: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt > 22.0 + - abs(leg1.eta)<2.4 + obj: gmtTkMuon +L1_SingleTkPhoIso: + cross_masks: [] + leg1: + leg_mask: + - leg1.offline_pt >= 36.0 + - abs(leg1.eta)<2.4 + - ak.where(abs(leg1.eta)<1.5, leg1.passeseleid, leg1.passesphoid) + - ak.where(abs(leg1.eta)<1.479, leg1.trkiso<0.25, leg1.trkiso<0.205) + obj: tkPhoton +L1_TkEleIso_EG: + cross_masks: + - leg2.deltaR(leg1) > 0.1 + leg1: + leg_mask: + - leg1.offline_pt > 22.0 + - abs(leg1.eta)<2.4 + - leg1.passeseleid >= 0 + - ak.where(abs(leg1.eta)<1.479, leg1.trkiso<0.13, leg1.trkiso<0.28) + obj: tkElectron + leg2: + leg_mask: + - leg2.offline_pt > 12.0 + - abs(leg2.eta)<2.4 + - ak.where(abs(leg2.eta)<1.5, leg2.passeseleid, leg2.passessaid) + obj: EG +L1_TripleTkMu: + cross_masks: + - abs(leg2.z0-leg1.z0)<1 + - abs(leg3.z0-leg1.z0)<1 + leg1: + leg_mask: + - leg1.pt>5 + - abs(leg1.eta)<2.4 + - leg1.qual>0 + obj: gmtTkMuon + leg2: + leg_mask: + - leg2.pt>3 + - abs(leg2.eta)<2.4 + - leg2.qual>0 + obj: gmtTkMuon + leg3: + leg_mask: + - leg3.pt>3 + - abs(leg3.eta)<2.4 + - leg3.qual>0 + obj: gmtTkMuon L1_DoubleTkEle: cross_masks: - abs(leg2.zvtx-leg1.zvtx)<1 @@ -20,91 +109,94 @@ L1_DoubleTkEle: leg_mask: - leg1.offline_pt >= 25.0 - abs(leg1.eta)<2.4 - - leg1.passeseleid * (abs(leg1.eta)<1.479) + (abs(leg1.eta)>1.479) + - (((leg1.passeseleid) * (abs(leg1.eta)<1.479)) + ((abs(leg1.eta)>1.479))) obj: tkElectron leg2: leg_mask: - leg2.offline_pt >= 12.0 - abs(leg2.eta)<2.4 - - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) + - (((leg2.passeseleid) * (abs(leg2.eta)<1.479)) + ((abs(leg2.eta)>1.479))) obj: tkElectron L1_DoubleTkMu: cross_masks: - abs(leg1.z0-leg2.z0)<1 leg1: leg_mask: - - leg1.offline_pt >= 15.0 + - leg1.offline_pt > 15.0 - abs(leg1.eta)<2.4 obj: gmtTkMuon leg2: leg_mask: - - leg2.offline_pt >= 7.0 + - leg2.pt > 7.0 - abs(leg2.eta)<2.4 + - leg2.qual > 0 obj: gmtTkMuon L1_DoubleTkPhoIso: cross_masks: [] leg1: leg_mask: - - leg1.offline_pt >= 22.0 + - leg1.offline_pt > 22.0 - abs(leg1.eta)<2.4 - - leg1.passeseleid * (abs(leg1.eta)<1.5) + leg1.passesphoid * (abs(leg1.eta) >= 1.5) - - (leg1.trkiso<0.25) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.205) * (abs(leg1.eta)>=1.479) + - ak.where(abs(leg1.eta)<1.5, leg1.passeseleid, leg1.passesphoid) + - ak.where(abs(leg1.eta)<1.479, leg1.trkiso<0.25, leg1.trkiso<0.205) obj: tkPhoton leg2: leg_mask: - - leg2.offline_pt >= 12.0 + - leg2.offline_pt > 12.0 - abs(leg2.eta)<2.4 - - leg2.passeseleid * (abs(leg2.eta)<1.5) + leg2.passesphoid * (abs(leg2.eta) >= 1.5) - - (leg2.trkiso<0.25) * (abs(leg2.eta)<1.479) + (leg2.trkiso<0.205) * (abs(leg2.eta)>=1.479) + - ak.where(abs(leg2.eta)<1.5, leg2.passeseleid, leg2.passesphoid) + - ak.where(abs(leg2.eta)<1.479, leg2.trkiso<0.25, leg2.trkiso<0.205) obj: tkPhoton L1_PFHTT: cross_masks: [] leg1: leg_mask: - - leg1.offline_pt >= 450.0 + # - leg1.pt > 372.9 + - leg1.offline_pt > 450 obj: seededConePuppiHT L1_PFHTT_QuadJet: cross_masks: [] leg1: leg_mask: - - leg1.offline_pt >= 400.0 + - leg1.offline_pt > 400.0 obj: seededConePuppiHT leg2: leg_mask: - - leg2.offline_pt >= 70.0 + - leg2.offline_pt > 70.0 - leg2.et>25.0 - abs(leg2.eta)<2.4 obj: seededConePuppiJet leg3: leg_mask: - - leg3.offline_pt >= 55.0 + - leg3.offline_pt > 55.0 - leg3.et>25.0 - abs(leg3.eta)<2.4 obj: seededConePuppiJet leg4: leg_mask: - - leg4.offline_pt >= 40.0 + - leg4.offline_pt > 40.0 - leg4.et>25.0 - abs(leg4.eta)<2.4 obj: seededConePuppiJet leg5: leg_mask: - - leg5.offline_pt >= 40.0 + - leg5.offline_pt > 40.0 - leg5.et>25.0 - abs(leg5.eta)<2.4 obj: seededConePuppiJet L1_PFIsoTau_PFIsoTau: cross_masks: + # - ak.where(abs(leg2.phi-leg1.phi) 0.5 - leg1.deltaR(leg2) > 0.5 leg1: leg_mask: - - leg1.offline_pt >= 52.0 + - leg1.offline_pt > 52.0 - abs(leg1.eta)<2.172 - leg1.passloosenn>0 obj: nnTau leg2: leg_mask: - - leg2.offline_pt >= 52.0 + - leg2.offline_pt > 52.0 - abs(leg2.eta)<2.172 - leg2.passloosenn>0 obj: nnTau @@ -112,91 +204,5 @@ L1_PFMet: cross_masks: [] leg1: leg_mask: - - leg1.offline_pt >= 200.0 + - leg1.offline_pt > 200.0 obj: puppiMET -L1_SingleEGEle: - cross_masks: [] - leg1: - leg_mask: - - leg1.offline_pt >= 51.0 - - abs(leg1.eta)<2.4 - - leg1.passeseleid * (abs(leg1.eta)<1.5) + leg1.passessaid * (abs(leg1.eta) >= 1.5) - obj: EG -L1_SinglePfJet: - cross_masks: [] - leg1: - leg_mask: - - leg1.offline_pt >= 230.0 - - leg1.et>25 - - abs(leg1.eta)<2.4 - obj: seededConePuppiJet -L1_SingleTkEle: - cross_masks: [] - leg1: - leg_mask: - - leg1.offline_pt >= 36.0 - - abs(leg1.eta)<2.4 - - leg1.passeseleid >= 0 - obj: tkElectron -L1_SingleTkEleIso: - cross_masks: [] - leg1: - leg_mask: - - leg1.offline_pt >= 28.0 - - leg1.passeseleid * (abs(leg1.eta)<1.479) + (abs(leg1.eta)>1.479) - - (leg1.trkiso<0.13) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.28) * (abs(leg1.eta)>=1.479) - obj: tkElectron -L1_SingleTkMu: - cross_masks: [] - leg1: - leg_mask: - - leg1.offline_pt >= 22.0 - - abs(leg1.eta)<2.4 - obj: gmtTkMuon -L1_SingleTkPhoIso: - cross_masks: [] - leg1: - leg_mask: - - leg1.offline_pt >= 36.0 - - abs(leg1.eta)<2.4 - - leg1.passeseleid * (abs(leg1.eta)<1.5) + leg1.passesphoid * (abs(leg1.eta) >= 1.5) - - (leg1.trkiso<0.25) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.205) * (abs(leg1.eta)>=1.479) - obj: tkPhoton -L1_TkEleIso_EG: - cross_masks: - - leg1.deltaR(leg2) > 0.1 - leg1: - leg_mask: - - leg1.offline_pt >= 22.0 - - abs(leg1.eta)<2.4 - - leg.passeseleid >= 0 - - (leg1.trkiso<0.13) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.28) * (abs(leg1.eta)>=1.479) - obj: tkElectron - leg2: - leg_mask: - - leg2.offline_pt >= 12.0 - - abs(leg2.eta)<2.4 - - leg2.passeseleid * (abs(leg2.eta)<1.5) + leg2.passessaid * (abs(leg2.eta) >= 1.5) - obj: EG -L1_TripleTkMu: - cross_masks: - - abs(leg2.z0-leg1.z0)<1 - - abs(leg3.z0-leg1.z0)<1 - leg1: - leg_mask: - - leg1.pt>5 - - abs(leg1.eta)<2.4 - - leg1.qual>0 - obj: gmtTkMuon - leg2: - leg_mask: - - leg2.pt>3 - - abs(leg2.eta)<2.4 - - leg2.qual>0 - obj: gmtTkMuon - leg3: - leg_mask: - - leg3.pt>3 - - abs(leg3.eta)<2.4 - - leg3.qual>0 - obj: gmtTkMuon \ No newline at end of file diff --git a/rates/table/menu_table.py b/rates/table/menu_table.py index acf311ed..e4b1a8f9 100644 --- a/rates/table/menu_table.py +++ b/rates/table/menu_table.py @@ -152,6 +152,11 @@ def get_obj_arr(self, obj): `pt`, `et`, and ID branches. The `scale_pt` function is used to convert the online pT into offline using the scalings. ''' + # TODO: Implement reading from parquet + # vers = self.version + # fname = f"/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/cache/{vers}/{vers}_MinBias_{obj}.parquet" + # arr = ak.from_parquet(fname) + arr = self.load_minbias(obj) if "jagged0" in arr.fields: arr = arr["jagged0"] @@ -217,7 +222,7 @@ def get_combos(self, leg_arrs, seed_legs): if i>=j: continue ## check that the legs are the same type object, skip otherwise if seed_legs[l1]["obj"] != seed_legs[l2]["obj"]: continue - nodup_masks.append(combos[l1].idx < combos[l2].idx) + nodup_masks.append(combos[l1].idx != combos[l2].idx) if len(nodup_masks) > 0: eval_str = " & ".join([f"nodup_masks[{i}]" for i in range(len(nodup_masks))]) diff --git a/rates/table/scalings_input/V29/scalings.yml b/rates/table/scalings_input/V29/scalings.yml new file mode 100644 index 00000000..f532a86d --- /dev/null +++ b/rates/table/scalings_input/V29/scalings.yml @@ -0,0 +1,200 @@ +EG: + Barrel: + eta_max: 1.5 + eta_min: 0 + offset: 2.707 + slope: 1.188 + Endcap: + eta_max: 2.5 + eta_min: 1.5 + offset: 1.572 + slope: 1.249 +caloTau: + Barrel: + eta_max: 1.5 + eta_min: 0 + offset: -2.553 + slope: 1.525 + Endcap: + eta_max: 2.5 + eta_min: 1.5 + offset: 1.273 + slope: 1.968 +gmtMuon: + Barrel: + eta_max: 0.83 + eta_min: 0 + offset: -0.2379695 + slope: 1.13674 + Endcap: + eta_max: 2.5 + eta_min: 1.24 + offset: 11.219282 + slope: 1.5027 + Overlap: + eta_max: 1.24 + eta_min: 0.83 + offset: -2.5687838 + slope: 1.34598 +gmtTkMuon: + Barrel: + eta_max: 0.83 + eta_min: 0 + offset: 0.986 + slope: 1.049 + Endcap: + eta_max: 2.5 + eta_min: 1.24 + offset: 0.792 #1.075 + slope: 1.054 # 1.052 + Overlap: + eta_max: 1.24 + eta_min: 0.83 + offset: 1.075 # 0.792 + slope: 1.052 # 1.054 +nnTau: + Barrel: + eta_max: 1.5 + eta_min: 0 + offset: -2.065 + slope: 1.899 + Endcap: + eta_max: 2.5 + eta_min: 1.5 + offset: 19.596 + slope: 1.584 +phase1PuppiHT: + null: + eta_max: null + eta_min: null + offset: 54.550 + slope: 1.087 +phase1PuppiJet: + Barrel: + eta_max: 1.5 + eta_min: 0 + offset: 15.497 + slope: 1.383 + Endcap: + eta_max: 2.5 + eta_min: 1.5 + offset: 9.362 + slope: 1.959 + null: + eta_max: null + eta_min: null + offset: 75.5 + slope: 1.41 +phase1PuppiMHT: + null: + eta_max: null + eta_min: null + offset: 49.175 + slope: 1.321 +puppiMET: + null: + eta_max: null + eta_min: null + offset: 63.781 + slope: 1.465 +seededConePuppiHT: + null: + eta_max: null + eta_min: null + offset: 47.986 + slope: 1.084 +seededConePuppiJet: + Barrel: + eta_max: 1.5 + eta_min: 0 + offset: 20.10841 + slope: 1.30781 + Endcap: + eta_max: 2.4 + eta_min: 1.5 + offset: 7.971 + slope: 2.05 + # null: + # eta_max: null + # eta_min: null + # offset: 72.567 + # slope: 1.418 +seededConePuppiMHT: + null: + eta_max: null + eta_min: null + offset: 55.097 + slope: 1.202 +tkIsoElectron: + Barrel: + eta_max: 1.5 + eta_min: 0 + offset: 1.441 + slope: 1.159 + Endcap: + eta_max: 2.5 + eta_min: 1.5 + offset: 1.256 + slope: 1.217 +tkElectron: + Barrel: + eta_max: 1.5 + eta_min: 0 + offset: 1.638 + slope: 1.144 + Endcap: + eta_max: 2.5 + eta_min: 1.5 + offset: 1.219 + slope: 1.214 +tkIsoPhoton: + Barrel: + eta_max: 1.5 + eta_min: 0 + offset: 2.697 + slope: 1.096 + Endcap: + eta_max: 2.5 + eta_min: 1.5 + offset: 5.038 + slope: 1.067 +tkPhoton: + Barrel: + eta_max: 1.5 + eta_min: 0 + offset: 2.697 + slope: 1.096 + Endcap: + eta_max: 2.5 + eta_min: 1.5 + offset: 5.038 + slope: 1.067 +trackerHT: + null: + eta_max: null + eta_min: null + offset: -25.35696 + slope: 3.622799 +trackerJet: + Barrel: + eta_max: 1.5 + eta_min: 0 + offset: 446.22001 + slope: 0.341314 + Endcap: + eta_max: 2.5 + eta_min: 1.5 + offset: 477.198 + slope: 0.04346206 +trackerMET: + null: + eta_max: null + eta_min: null + offset: 417.67308 + slope: 0.2483366 +trackerMHT: + null: + eta_max: null + eta_min: null + offset: 410.9299 + slope: 0.295772 diff --git a/rates/table/utils.py b/rates/table/utils.py index 56238cf3..6bf8511d 100644 --- a/rates/table/utils.py +++ b/rates/table/utils.py @@ -14,10 +14,10 @@ def pairinvmass(pt1,pt2,eta1,eta2,phi1,phi2): return np.sqrt(2.0*pt1*pt2*(np.cosh(eta1-eta2)-np.cos(phi1-phi2))) def phoid(EleID, PhoID, Eta): - return EleID * (abs(Eta)<1.5) + PhoID * (abs(Eta)>=1.5) + return (EleID * (abs(Eta)<1.5)) + (PhoID * (abs(Eta)>=1.5)) def egid(EleID, SaID, Eta): - return EleID * abs(Eta)<1.5 + SaID * (abs(Eta)>=1.5) + return (EleID * (abs(Eta)<1.5)) + (SaID * (abs(Eta)>=1.5)) def TkEleQualHIGH(Et,Eta,PassesEleID): return PassesEleID def TkEleQualLOW(Et,Eta,PassesEleID): return PassesEleID * (abs(Eta)<1.479) + (abs(Eta)>1.479) From 41a1be170b319820f35ac21dbf6b6d16aa476064 Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Mon, 7 Aug 2023 10:21:11 +0200 Subject: [PATCH 007/140] Add README --- rates/table/README.md | 38 ++++++++++++++++++++++++++++++++- rates/table/cfg/v29/v29_cfg.yml | 4 ++-- rates/table/rate_table.py | 2 +- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/rates/table/README.md b/rates/table/README.md index afdd252c..55b7bfaa 100644 --- a/rates/table/README.md +++ b/rates/table/README.md @@ -1,4 +1,40 @@ -# Rate table for the Phase-2 L1 Trigger Menu +# L1 Phase2 Menu Tools: Rate Table + +The rates table can be produced using the following command: + + ./rate_table.py cfg/v29/v29_cfg.yml + +where the `cfg` argument specifies the structure of the config file to be used. + +An example of config can be found in `./cfg/v29_cfg.yml` and it is a `yaml` file +with the following structure: + + MenuV29: + version: "V29" + sample: "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/13X/v29_RelVal/RelValTTbar_14TeV/RelVal_13X_TT_200PU_crab_v29_13X_RelVal_FixGenTree/230710_081407/L1NtuplePhaseII_Step1_hadd.root" + menu_config: "cfg/v29/v29_16Seeds_Final_clean_cfg.yml" + scalings: + scalings_path: "/eos/user/m/mbonanom/www/Postdoc/L1PhaseII/V29/scalings/" + collect_scalings: False + scalings_outdir: "scalings_input/V29/" + scalings_file: "scalings.yml" + table: + table_fname: "rates_16Seeds_Final" + table_outdir: "rates_tables/V29" + +The block above defines entirely a menu table (`MenuV29` in the example above). +Several blocks (with a different title) can be specified in the config if one wants to produce +rate tables for different menu configurations. + +The other fields that can be specified are: +* `version`: specifies the version of the ntuples used; +* `sample`: specifies the sample to be used; +* `menu_config`: user-defined config of the menu seeds. See `cfg/v29/v29_16Seeds_Final_clean_cfg.yml` for an example. The current example replicates the menu config implemented in `cfg/v29/v29_16Seeds_Final`; +* `scalings`: this block defines the properties of the scalings file to be used. If `collect_scalings` is `False`, +the scalings file in `scalings_outdir` will be used (`scalings.yml` in the example above corresponds to the `v29` scalings used for AR). If `collect_scalings` is `True`, then the `Scaler` (cf `scaler.py`) class is used to create a new scalings file, with the name specified in `scalings_file` (which will be located in `scalings_outdir`), starting from the per-object `.txt` scalings saved under `scalings_path` (i.e. the output of the `objectPerformance` code); +* `table`: this block defines the properties of the rates table that will be dumped to a `.csv` file. The table will be saved under `table_outdir` with `table_fname` as name. + +## Outdated: Rate table for the Phase-2 L1 Trigger Menu To run the rate table, for example for the L1 TDR results, do ``` python run.py cfg/v10_TRIDAS_newThresholds_LHCCReview diff --git a/rates/table/cfg/v29/v29_cfg.yml b/rates/table/cfg/v29/v29_cfg.yml index 04295717..2d70e325 100644 --- a/rates/table/cfg/v29/v29_cfg.yml +++ b/rates/table/cfg/v29/v29_cfg.yml @@ -1,10 +1,10 @@ MenuV29: version: "V29" sample: "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/13X/v29_RelVal/RelValTTbar_14TeV/RelVal_13X_TT_200PU_crab_v29_13X_RelVal_FixGenTree/230710_081407/L1NtuplePhaseII_Step1_hadd.root" - menu_config: "cfg/v29_16Seeds_Final_clean_cfg.yml" + menu_config: "cfg/v29/v29_16Seeds_Final_clean_cfg.yml" scalings: scalings_path: "/eos/user/m/mbonanom/www/Postdoc/L1PhaseII/V29/scalings/" - collect_scalings: True + collect_scalings: False scalings_outdir: "scalings_input/V29/" scalings_file: "scalings.yml" table: diff --git a/rates/table/rate_table.py b/rates/table/rate_table.py index e5c84cc2..bd878d10 100755 --- a/rates/table/rate_table.py +++ b/rates/table/rate_table.py @@ -11,7 +11,7 @@ parser = argparse.ArgumentParser() parser.add_argument( "cfg", - default="cfg_caching/V22.yaml", + default="cfg/v29/v29_cfg.yml", help="" ) args = parser.parse_args() From dfeec58c9415affdb9b1d240905cab383a2c02ff Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Tue, 8 Aug 2023 14:08:00 +0200 Subject: [PATCH 008/140] Move old menu tool to separate folder --- rates/table/README.md | 47 +++++++++++++------ rates/table/cfg/v29/v29_cfg.yml | 4 +- rates/table/old_tool/README.md | 18 +++++++ .../v10/v10_TRIDAS_newThresholds_LHCCReview | 0 .../cfg/v22/FBE_noMu_L1TDRMET_mhtSeed_123x | 0 ...E_noMu_L1TDRMET_mhtSeed_123x_singleJetEta5 | 0 .../{ => old_tool}/cfg/v27/v27_1252_noSoftMu | 0 .../{ => old_tool}/cfg/v29/v29_16Seeds_Final | 0 .../{ => old_tool}/cfg/v29/v29_NOMUONS_Final | 0 .../cfg/v29/v29_WITHMUONS_Final | 0 rates/table/{ => old_tool}/lib/__init__.py | 0 rates/table/{ => old_tool}/lib/cfg.py | 0 rates/table/{ => old_tool}/lib/functions.py | 0 .../{ => old_tool}/lib/functionsTreeReader.py | 0 rates/table/{ => old_tool}/lib/master.py | 0 rates/table/{ => old_tool}/lib/menu.py | 0 rates/table/{ => old_tool}/lib/object.py | 0 rates/table/{ => old_tool}/lib/sample.py | 0 .../table/{ => old_tool}/lib/samplemanager.py | 0 rates/table/{ => old_tool}/lib/trigger.py | 0 rates/table/{ => old_tool}/lib/vb.py | 0 rates/table/{ => old_tool}/printRateTable.py | 0 rates/table/{ => old_tool}/run.py | 0 rates/table/rate_table.py | 2 +- 24 files changed, 54 insertions(+), 17 deletions(-) create mode 100644 rates/table/old_tool/README.md rename rates/table/{ => old_tool}/cfg/v10/v10_TRIDAS_newThresholds_LHCCReview (100%) rename rates/table/{ => old_tool}/cfg/v22/FBE_noMu_L1TDRMET_mhtSeed_123x (100%) rename rates/table/{ => old_tool}/cfg/v22/FBE_noMu_L1TDRMET_mhtSeed_123x_singleJetEta5 (100%) rename rates/table/{ => old_tool}/cfg/v27/v27_1252_noSoftMu (100%) rename rates/table/{ => old_tool}/cfg/v29/v29_16Seeds_Final (100%) rename rates/table/{ => old_tool}/cfg/v29/v29_NOMUONS_Final (100%) rename rates/table/{ => old_tool}/cfg/v29/v29_WITHMUONS_Final (100%) rename rates/table/{ => old_tool}/lib/__init__.py (100%) rename rates/table/{ => old_tool}/lib/cfg.py (100%) rename rates/table/{ => old_tool}/lib/functions.py (100%) rename rates/table/{ => old_tool}/lib/functionsTreeReader.py (100%) rename rates/table/{ => old_tool}/lib/master.py (100%) rename rates/table/{ => old_tool}/lib/menu.py (100%) rename rates/table/{ => old_tool}/lib/object.py (100%) rename rates/table/{ => old_tool}/lib/sample.py (100%) rename rates/table/{ => old_tool}/lib/samplemanager.py (100%) rename rates/table/{ => old_tool}/lib/trigger.py (100%) rename rates/table/{ => old_tool}/lib/vb.py (100%) rename rates/table/{ => old_tool}/printRateTable.py (100%) rename rates/table/{ => old_tool}/run.py (100%) diff --git a/rates/table/README.md b/rates/table/README.md index afdd252c..f6e8bb2e 100644 --- a/rates/table/README.md +++ b/rates/table/README.md @@ -1,16 +1,35 @@ -# Rate table for the Phase-2 L1 Trigger Menu -To run the rate table, for example for the L1 TDR results, do -``` -python run.py cfg/v10_TRIDAS_newThresholds_LHCCReview -``` +# L1 Phase2 Menu Tools: Rate Table -For the firmware-based emulators under 123x, utilise `FBE_noMu_L1TDRMET_mhtSeed_123x` (`FBE_noMu_L1TDRMET_mhtSeed_123x_singleJetEta5` only includes forward region for the singleJet seed). - -To display the rates in an easy-to-read format, run -``` -python3 printRateTable.py -c cfg/v10_TRIDAS_newThresholds_LHCCReview -r out/2020-05-26-MENU-LHCCReview-BugFix_v10_TRIDAS_newThresholds_LHCCReview/thresholds/menu.csv -``` -You can also edit the `CFG_RATE_COMBOS` dictionary at the top of -the file and run the script without any arguments `python3 printRateTable.py`. -This way multiple rate tables can be compared quickly. +The rates table can be produced using the following command: + ./rate_table.py cfg/v29/v29_cfg.yml + +where the `cfg` argument specifies the structure of the config file to be used. + +An example of config can be found in `./cfg/v29_cfg.yml` and it is a `yaml` file +with the following structure: + + MenuV29: + version: "V29" + sample: "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/13X/v29_RelVal/RelValTTbar_14TeV/RelVal_13X_TT_200PU_crab_v29_13X_RelVal_FixGenTree/230710_081407/L1NtuplePhaseII_Step1_hadd.root" + menu_config: "cfg/v29/v29_16Seeds_Final_clean_cfg.yml" + scalings: + scalings_path: "/eos/user/m/mbonanom/www/Postdoc/L1PhaseII/V29/scalings/" + collect_scalings: False + scalings_outdir: "scalings_input/V29/" + scalings_file: "scalings.yml" + table: + table_fname: "rates_16Seeds_Final" + table_outdir: "rates_tables/V29" + +The block above defines entirely a menu table (`MenuV29` in the example above). +Several blocks (with a different title) can be specified in the config if one wants to produce +rate tables for different menu configurations. + +The other fields that can be specified are: +* `version`: specifies the version of the ntuples used; +* `sample`: specifies the sample to be used; +* `menu_config`: user-defined config of the menu seeds. See `cfg/v29/v29_16Seeds_Final_clean_cfg.yml` for an example. The current example replicates the menu config implemented in `cfg/v29/v29_16Seeds_Final`; +* `scalings`: this block defines the properties of the scalings file to be used. If `collect_scalings` is `False`, +the scalings file in `scalings_outdir` will be used (`scalings.yml` in the example above corresponds to the `v29` scalings used for AR). If `collect_scalings` is `True`, then the `Scaler` (cf `scaler.py`) class is used to create a new scalings file, with the name specified in `scalings_file` (which will be located in `scalings_outdir`), starting from the per-object `.txt` scalings saved under `scalings_path` (i.e. the output of the `objectPerformance` code); +* `table`: this block defines the properties of the rates table that will be dumped to a `.csv` file. The table will be saved under `table_outdir` with `table_fname` as name. diff --git a/rates/table/cfg/v29/v29_cfg.yml b/rates/table/cfg/v29/v29_cfg.yml index 04295717..2d70e325 100644 --- a/rates/table/cfg/v29/v29_cfg.yml +++ b/rates/table/cfg/v29/v29_cfg.yml @@ -1,10 +1,10 @@ MenuV29: version: "V29" sample: "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/13X/v29_RelVal/RelValTTbar_14TeV/RelVal_13X_TT_200PU_crab_v29_13X_RelVal_FixGenTree/230710_081407/L1NtuplePhaseII_Step1_hadd.root" - menu_config: "cfg/v29_16Seeds_Final_clean_cfg.yml" + menu_config: "cfg/v29/v29_16Seeds_Final_clean_cfg.yml" scalings: scalings_path: "/eos/user/m/mbonanom/www/Postdoc/L1PhaseII/V29/scalings/" - collect_scalings: True + collect_scalings: False scalings_outdir: "scalings_input/V29/" scalings_file: "scalings.yml" table: diff --git a/rates/table/old_tool/README.md b/rates/table/old_tool/README.md new file mode 100644 index 00000000..bd5e82e4 --- /dev/null +++ b/rates/table/old_tool/README.md @@ -0,0 +1,18 @@ +# L1 Phase2 Menu Tools: Rate Table + +## Old fwk: Rate table for the Phase-2 L1 Trigger Menu +To run the rate table, for example for the L1 TDR results, do +``` +python run.py cfg/v10_TRIDAS_newThresholds_LHCCReview +``` + +For the firmware-based emulators under 123x, utilise `FBE_noMu_L1TDRMET_mhtSeed_123x` (`FBE_noMu_L1TDRMET_mhtSeed_123x_singleJetEta5` only includes forward region for the singleJet seed). + +To display the rates in an easy-to-read format, run +``` +python3 printRateTable.py -c cfg/v10_TRIDAS_newThresholds_LHCCReview -r out/2020-05-26-MENU-LHCCReview-BugFix_v10_TRIDAS_newThresholds_LHCCReview/thresholds/menu.csv +``` +You can also edit the `CFG_RATE_COMBOS` dictionary at the top of +the file and run the script without any arguments `python3 printRateTable.py`. +This way multiple rate tables can be compared quickly. + diff --git a/rates/table/cfg/v10/v10_TRIDAS_newThresholds_LHCCReview b/rates/table/old_tool/cfg/v10/v10_TRIDAS_newThresholds_LHCCReview similarity index 100% rename from rates/table/cfg/v10/v10_TRIDAS_newThresholds_LHCCReview rename to rates/table/old_tool/cfg/v10/v10_TRIDAS_newThresholds_LHCCReview diff --git a/rates/table/cfg/v22/FBE_noMu_L1TDRMET_mhtSeed_123x b/rates/table/old_tool/cfg/v22/FBE_noMu_L1TDRMET_mhtSeed_123x similarity index 100% rename from rates/table/cfg/v22/FBE_noMu_L1TDRMET_mhtSeed_123x rename to rates/table/old_tool/cfg/v22/FBE_noMu_L1TDRMET_mhtSeed_123x diff --git a/rates/table/cfg/v22/FBE_noMu_L1TDRMET_mhtSeed_123x_singleJetEta5 b/rates/table/old_tool/cfg/v22/FBE_noMu_L1TDRMET_mhtSeed_123x_singleJetEta5 similarity index 100% rename from rates/table/cfg/v22/FBE_noMu_L1TDRMET_mhtSeed_123x_singleJetEta5 rename to rates/table/old_tool/cfg/v22/FBE_noMu_L1TDRMET_mhtSeed_123x_singleJetEta5 diff --git a/rates/table/cfg/v27/v27_1252_noSoftMu b/rates/table/old_tool/cfg/v27/v27_1252_noSoftMu similarity index 100% rename from rates/table/cfg/v27/v27_1252_noSoftMu rename to rates/table/old_tool/cfg/v27/v27_1252_noSoftMu diff --git a/rates/table/cfg/v29/v29_16Seeds_Final b/rates/table/old_tool/cfg/v29/v29_16Seeds_Final similarity index 100% rename from rates/table/cfg/v29/v29_16Seeds_Final rename to rates/table/old_tool/cfg/v29/v29_16Seeds_Final diff --git a/rates/table/cfg/v29/v29_NOMUONS_Final b/rates/table/old_tool/cfg/v29/v29_NOMUONS_Final similarity index 100% rename from rates/table/cfg/v29/v29_NOMUONS_Final rename to rates/table/old_tool/cfg/v29/v29_NOMUONS_Final diff --git a/rates/table/cfg/v29/v29_WITHMUONS_Final b/rates/table/old_tool/cfg/v29/v29_WITHMUONS_Final similarity index 100% rename from rates/table/cfg/v29/v29_WITHMUONS_Final rename to rates/table/old_tool/cfg/v29/v29_WITHMUONS_Final diff --git a/rates/table/lib/__init__.py b/rates/table/old_tool/lib/__init__.py similarity index 100% rename from rates/table/lib/__init__.py rename to rates/table/old_tool/lib/__init__.py diff --git a/rates/table/lib/cfg.py b/rates/table/old_tool/lib/cfg.py similarity index 100% rename from rates/table/lib/cfg.py rename to rates/table/old_tool/lib/cfg.py diff --git a/rates/table/lib/functions.py b/rates/table/old_tool/lib/functions.py similarity index 100% rename from rates/table/lib/functions.py rename to rates/table/old_tool/lib/functions.py diff --git a/rates/table/lib/functionsTreeReader.py b/rates/table/old_tool/lib/functionsTreeReader.py similarity index 100% rename from rates/table/lib/functionsTreeReader.py rename to rates/table/old_tool/lib/functionsTreeReader.py diff --git a/rates/table/lib/master.py b/rates/table/old_tool/lib/master.py similarity index 100% rename from rates/table/lib/master.py rename to rates/table/old_tool/lib/master.py diff --git a/rates/table/lib/menu.py b/rates/table/old_tool/lib/menu.py similarity index 100% rename from rates/table/lib/menu.py rename to rates/table/old_tool/lib/menu.py diff --git a/rates/table/lib/object.py b/rates/table/old_tool/lib/object.py similarity index 100% rename from rates/table/lib/object.py rename to rates/table/old_tool/lib/object.py diff --git a/rates/table/lib/sample.py b/rates/table/old_tool/lib/sample.py similarity index 100% rename from rates/table/lib/sample.py rename to rates/table/old_tool/lib/sample.py diff --git a/rates/table/lib/samplemanager.py b/rates/table/old_tool/lib/samplemanager.py similarity index 100% rename from rates/table/lib/samplemanager.py rename to rates/table/old_tool/lib/samplemanager.py diff --git a/rates/table/lib/trigger.py b/rates/table/old_tool/lib/trigger.py similarity index 100% rename from rates/table/lib/trigger.py rename to rates/table/old_tool/lib/trigger.py diff --git a/rates/table/lib/vb.py b/rates/table/old_tool/lib/vb.py similarity index 100% rename from rates/table/lib/vb.py rename to rates/table/old_tool/lib/vb.py diff --git a/rates/table/printRateTable.py b/rates/table/old_tool/printRateTable.py similarity index 100% rename from rates/table/printRateTable.py rename to rates/table/old_tool/printRateTable.py diff --git a/rates/table/run.py b/rates/table/old_tool/run.py similarity index 100% rename from rates/table/run.py rename to rates/table/old_tool/run.py diff --git a/rates/table/rate_table.py b/rates/table/rate_table.py index e5c84cc2..bd878d10 100755 --- a/rates/table/rate_table.py +++ b/rates/table/rate_table.py @@ -11,7 +11,7 @@ parser = argparse.ArgumentParser() parser.add_argument( "cfg", - default="cfg_caching/V22.yaml", + default="cfg/v29/v29_cfg.yml", help="" ) args = parser.parse_args() From e6c1871c21dec32f5e2397895d44d3a4b9ced8a9 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Tue, 8 Aug 2023 14:08:25 +0200 Subject: [PATCH 009/140] Add loading math package --- rates/table/menu_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rates/table/menu_table.py b/rates/table/menu_table.py index e4b1a8f9..1eaa5365 100644 --- a/rates/table/menu_table.py +++ b/rates/table/menu_table.py @@ -3,7 +3,7 @@ from glob import glob -import yaml, re, os +import yaml, re, os, math from utils import * from menu_config import MenuConfig From 3db4eab852a07f37eeb3b95ec82bde149ef05aab Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Tue, 8 Aug 2023 14:34:44 +0200 Subject: [PATCH 010/140] Fix scalings for caloTau and sc jets --- rates/table/scalings_input/V29/scalings.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rates/table/scalings_input/V29/scalings.yml b/rates/table/scalings_input/V29/scalings.yml index f532a86d..2f1744bc 100644 --- a/rates/table/scalings_input/V29/scalings.yml +++ b/rates/table/scalings_input/V29/scalings.yml @@ -18,7 +18,7 @@ caloTau: Endcap: eta_max: 2.5 eta_min: 1.5 - offset: 1.273 + offset: -1.273 slope: 1.968 gmtMuon: Barrel: @@ -114,11 +114,11 @@ seededConePuppiJet: eta_min: 1.5 offset: 7.971 slope: 2.05 - # null: - # eta_max: null - # eta_min: null - # offset: 72.567 - # slope: 1.418 + Forward: + eta_max: 6 + eta_min: 2.4 + offset: 72.567 + slope: 1.418 seededConePuppiMHT: null: eta_max: null From 14508a4603fac5c11881a47ebefd499e6549c6f2 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Tue, 8 Aug 2023 14:35:46 +0200 Subject: [PATCH 011/140] Add pyc files to git ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1d9df5e1..24ca9e3f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ **/__pycache__/* +*.pyc **/*.png **/.DS_Store **/*.parquet From c8d38983d47175a10168cbbdd6171998b923a541 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Tue, 8 Aug 2023 14:56:36 +0200 Subject: [PATCH 012/140] Change >= to > in Tau seeds in v29 config --- rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml index 00478fa6..8c83bd72 100644 --- a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml +++ b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml @@ -348,12 +348,12 @@ L1_PFTau_PFTau: - leg1.deltaR(leg2)>0.5 leg1: leg_mask: - - leg1.offline_pt >= 90.0 + - leg1.offline_pt > 90.0 - abs(leg1.eta)<2.172 obj: caloTau leg2: leg_mask: - - leg2.offline_pt >= 90.0 + - leg2.offline_pt > 90.0 - abs(leg2.eta)<2.172 obj: caloTau L1_SingleEGEle: @@ -368,7 +368,7 @@ L1_SinglePFTau: cross_masks: [] leg1: leg_mask: - - leg1.offline_pt >= 150.0 + - leg1.offline_pt > 150.0 - abs(leg1.eta)<2.172 obj: caloTau L1_SinglePfJet: From 031d667a1f767f6d926d9d250e2acd8f00f098f0 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Tue, 8 Aug 2023 14:57:22 +0200 Subject: [PATCH 013/140] Removing skipping Tau seeds --- rates/table/menu_table.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rates/table/menu_table.py b/rates/table/menu_table.py index 1eaa5365..75424ea1 100644 --- a/rates/table/menu_table.py +++ b/rates/table/menu_table.py @@ -326,9 +326,7 @@ def prepare_masks(self): seeds = self.trig_seeds - for seed in sorted(seeds): - if "PFTau" in seed: continue - + for seed in sorted(seeds): print(seed) mask = self.get_npass(seed, self.trig_seeds[seed]) From 1e3abf5afb70ae9ae14f9dd1d74b15bfef5d88d8 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Tue, 8 Aug 2023 15:07:35 +0200 Subject: [PATCH 014/140] Add full menu and 16seed menu v29 steering file --- rates/table/cfg/v29/v29_16seed_cfg.yml | 12 ++++++++++++ rates/table/cfg/v29/v29_cfg.yml | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 rates/table/cfg/v29/v29_16seed_cfg.yml diff --git a/rates/table/cfg/v29/v29_16seed_cfg.yml b/rates/table/cfg/v29/v29_16seed_cfg.yml new file mode 100644 index 00000000..2d70e325 --- /dev/null +++ b/rates/table/cfg/v29/v29_16seed_cfg.yml @@ -0,0 +1,12 @@ +MenuV29: + version: "V29" + sample: "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/13X/v29_RelVal/RelValTTbar_14TeV/RelVal_13X_TT_200PU_crab_v29_13X_RelVal_FixGenTree/230710_081407/L1NtuplePhaseII_Step1_hadd.root" + menu_config: "cfg/v29/v29_16Seeds_Final_clean_cfg.yml" + scalings: + scalings_path: "/eos/user/m/mbonanom/www/Postdoc/L1PhaseII/V29/scalings/" + collect_scalings: False + scalings_outdir: "scalings_input/V29/" + scalings_file: "scalings.yml" + table: + table_fname: "rates_16Seeds_Final" + table_outdir: "rates_tables/V29" \ No newline at end of file diff --git a/rates/table/cfg/v29/v29_cfg.yml b/rates/table/cfg/v29/v29_cfg.yml index 2d70e325..e464ec13 100644 --- a/rates/table/cfg/v29/v29_cfg.yml +++ b/rates/table/cfg/v29/v29_cfg.yml @@ -1,12 +1,12 @@ MenuV29: version: "V29" sample: "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/13X/v29_RelVal/RelValTTbar_14TeV/RelVal_13X_TT_200PU_crab_v29_13X_RelVal_FixGenTree/230710_081407/L1NtuplePhaseII_Step1_hadd.root" - menu_config: "cfg/v29/v29_16Seeds_Final_clean_cfg.yml" + menu_config: "cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml" scalings: scalings_path: "/eos/user/m/mbonanom/www/Postdoc/L1PhaseII/V29/scalings/" collect_scalings: False scalings_outdir: "scalings_input/V29/" scalings_file: "scalings.yml" table: - table_fname: "rates_16Seeds_Final" + table_fname: "rates_full_Final" table_outdir: "rates_tables/V29" \ No newline at end of file From 9e95004a9e3cf1adcdb18b1efc49757801d80990 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Tue, 8 Aug 2023 15:42:58 +0200 Subject: [PATCH 015/140] Fix MHT scalings --- rates/table/scalings_input/V29/scalings.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rates/table/scalings_input/V29/scalings.yml b/rates/table/scalings_input/V29/scalings.yml index 2f1744bc..93271a05 100644 --- a/rates/table/scalings_input/V29/scalings.yml +++ b/rates/table/scalings_input/V29/scalings.yml @@ -121,10 +121,8 @@ seededConePuppiJet: slope: 1.418 seededConePuppiMHT: null: - eta_max: null - eta_min: null - offset: 55.097 - slope: 1.202 + offset: -20.499 + slope: 1.170 tkIsoElectron: Barrel: eta_max: 1.5 From 35a082930c72c419c7da9a1f627c20478eba20e7 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Tue, 8 Aug 2023 15:43:21 +0200 Subject: [PATCH 016/140] Remove unused doublemu seed --- .../cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml index 8c83bd72..d83e512c 100644 --- a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml +++ b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml @@ -143,21 +143,6 @@ L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18: - abs(leg2.eta)<2.0 - leg2.qual>0 obj: gmtTkMuon -L1_DoubleTkMu9_SQ: - cross_masks: - - abs(leg2.z0-leg1.z0)<1 - leg1: - leg_mask: - - leg1.offline_pt >= 9.0 - - abs(leg1.eta)<2.4 - - leg1.qual>0 - obj: gmtTkMuon - leg2: - leg_mask: - - leg2.offline_pt >= 9.0 - - abs(leg2.eta)<2.4 - - leg2.qual>0 - obj: gmtTkMuon L1_DoubleTkMu_PfHTT: cross_masks: - abs(leg2.z0-leg1.et)<1 From d407e80a7e508ea6277ba8f499464614caf837b7 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Tue, 8 Aug 2023 15:43:42 +0200 Subject: [PATCH 017/140] Remove colon from old fwk printout --- rates/table/old_tool/lib/menu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rates/table/old_tool/lib/menu.py b/rates/table/old_tool/lib/menu.py index e68e70d9..5094e1ae 100644 --- a/rates/table/old_tool/lib/menu.py +++ b/rates/table/old_tool/lib/menu.py @@ -69,8 +69,8 @@ def dump(self, outdir): print refs names = refs.keys()[:] names.sort() - fs = "%-"+str(maxlength)+"s: %9.2f" - fss = fs + " %1.5f %3.3f" + fs = "%-"+str(maxlength)+"s\t%9.2f" + fss = fs + " \t%1.5f \t%3.3f" print print "MENU RESULT:" for tname in names: From 4a10178899bfa641f71bd668bb768c1b14d9c406 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Tue, 8 Aug 2023 16:28:23 +0200 Subject: [PATCH 018/140] Introduce tkIsoEle fix and fix scalings and menu --- .../cfg/v29/v29_16Seeds_Final_clean_cfg.yml | 4 ++-- .../cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml | 22 +++++++++---------- rates/table/menu_table.py | 18 +++++++++++---- rates/table/scalings_input/V29/scalings.yml | 4 ++-- 4 files changed, 29 insertions(+), 19 deletions(-) diff --git a/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml b/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml index f600ecaf..79bdd1b7 100644 --- a/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml +++ b/rates/table/cfg/v29/v29_16Seeds_Final_clean_cfg.yml @@ -47,7 +47,7 @@ L1_SingleTkEleIso: - leg1.offline_pt >= 28.0 - leg1.passeseleid>=0 - ak.where(abs(leg1.eta)<1.479, leg1.trkiso<0.13, leg1.trkiso<0.28) - obj: tkElectron + obj: tkIsoElectron L1_SingleTkMu: cross_masks: [] leg1: @@ -73,7 +73,7 @@ L1_TkEleIso_EG: - abs(leg1.eta)<2.4 - leg1.passeseleid >= 0 - ak.where(abs(leg1.eta)<1.479, leg1.trkiso<0.13, leg1.trkiso<0.28) - obj: tkElectron + obj: tkIsoElectron leg2: leg_mask: - leg2.offline_pt > 12.0 diff --git a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml index d83e512c..e8454224 100644 --- a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml +++ b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml @@ -376,10 +376,10 @@ L1_SingleTkEleIso: cross_masks: [] leg1: leg_mask: - - leg1.offline_pt >= 28.0 - - leg1.passeseleid * (abs(leg1.eta)<1.479) + (abs(leg1.eta)>1.479) + - leg1.offline_pt > 28.0 + - leg1.passeseleid >= 0 - (leg1.trkiso<0.13) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.28) * (abs(leg1.eta)>=1.479) - obj: tkElectron + obj: tkIsoElectron L1_SingleTkMu: cross_masks: [] leg1: @@ -403,9 +403,9 @@ L1_TkEleIso_EG: leg_mask: - leg1.offline_pt >= 22.0 - abs(leg1.eta)<2.4 - - leg1.passeseleid * (abs(leg1.eta)<1.479) + (abs(leg1.eta)>1.479) + - leg1.passeseleid >= 0 - (leg1.trkiso<0.13) * (abs(leg1.eta)<1.479) + (leg1.trkiso<0.28) * (abs(leg1.eta)>=1.479) - obj: tkElectron + obj: tkIsoElectron leg2: leg_mask: - leg2.offline_pt >= 12.0 @@ -423,9 +423,9 @@ L1_TkEleIso_PFHTT: leg_mask: - leg2.offline_pt >= 26.0 - abs(leg2.eta)<2.1 - - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) + - leg2.passeseleid >= 0 - (leg2.trkiso<0.13) * (abs(leg2.eta)<1.479) + (leg2.trkiso<0.28) * (abs(leg2.eta)>=1.479) - obj: tkElectron + obj: tkIsoElectron leg3: leg_mask: - leg3.offline_pt >= 190.0 @@ -441,9 +441,9 @@ L1_TkEleIso_PFIsoTau: leg_mask: - leg2.offline_pt >= 22.0 - abs(leg2.eta)<2.1 - - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) + - leg2.passeseleid >= 0 - (leg2.trkiso<0.13) * (abs(leg2.eta)<1.479) + (leg2.trkiso<0.28) * (abs(leg2.eta)>=1.479) - obj: tkElectron + obj: tkIsoElectron leg3: leg_mask: - leg3.offline_pt >= 45.0 @@ -606,9 +606,9 @@ L1_TkMu_TkEleIso: leg_mask: - leg2.offline_pt >= 20.0 - abs(leg2.eta)<2.4 - - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) + - leg2.passeseleid >= 0 - (leg2.trkiso<0.13) * (abs(leg2.eta)<1.479) + (leg2.trkiso<0.28) * (abs(leg2.eta)>=1.479) - obj: tkElectron + obj: tkIsoElectron L1_TripleTkMu: cross_masks: - abs(leg2.z0-leg1.z0)<1 diff --git a/rates/table/menu_table.py b/rates/table/menu_table.py index 75424ea1..b5647128 100644 --- a/rates/table/menu_table.py +++ b/rates/table/menu_table.py @@ -78,8 +78,8 @@ def add_offline_pt(self, arr, obj_scalings, pt_var = None): ''' # initialise array of zeros identical to the original pt if pt_var is not None: pt_orig = arr[pt_var] - elif "pt" in arr.fields: pt_orig = arr.pt elif "et" in arr.fields: pt_orig = arr.et + elif "pt" in arr.fields: pt_orig = arr.pt elif "" in arr.fields: pt_orig = arr[""][:,0] else: print("Error! Unknown pt branch") @@ -106,7 +106,9 @@ def scale_pt(self, obj, arr): If the scaling for a given object is not found, `offline_pt` is set to be equal to the online pt. ''' + if obj in self.scalings: + # print(self.scalings[obj]) arr = self.add_offline_pt(arr, self.scalings[obj]) else: print("No scalings found for " + obj) @@ -157,12 +159,17 @@ def get_obj_arr(self, obj): # fname = f"/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/cache/{vers}/{vers}_MinBias_{obj}.parquet" # arr = ak.from_parquet(fname) - arr = self.load_minbias(obj) + load_obj = obj + + if obj == "tkIsoElectron": load_obj = "tkElectron" + + arr = self.load_minbias(load_obj) if "jagged0" in arr.fields: arr = arr["jagged0"] - arr = ak.zip({f.replace(obj,"").lower():arr[f] for f in arr.fields}) + arr = ak.zip({f.replace(load_obj,"").lower():arr[f] for f in arr.fields}) arr = self.format_values(arr) + arr = self.scale_pt(obj, arr) return arr @@ -326,7 +333,10 @@ def prepare_masks(self): seeds = self.trig_seeds - for seed in sorted(seeds): + for seed in sorted(seeds): + + if "TkEle" not in seed: continue + print(seed) mask = self.get_npass(seed, self.trig_seeds[seed]) diff --git a/rates/table/scalings_input/V29/scalings.yml b/rates/table/scalings_input/V29/scalings.yml index 93271a05..ba55c642 100644 --- a/rates/table/scalings_input/V29/scalings.yml +++ b/rates/table/scalings_input/V29/scalings.yml @@ -123,7 +123,7 @@ seededConePuppiMHT: null: offset: -20.499 slope: 1.170 -tkIsoElectron: +tkElectron: Barrel: eta_max: 1.5 eta_min: 0 @@ -134,7 +134,7 @@ tkIsoElectron: eta_min: 1.5 offset: 1.256 slope: 1.217 -tkElectron: +tkIsoElectron: Barrel: eta_max: 1.5 eta_min: 0 From 43a655b0399206e61831ae4484c5f08497c8ed48 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Tue, 8 Aug 2023 17:12:58 +0200 Subject: [PATCH 019/140] Add dump of masks --- rates/table/menu_table.py | 16 ++++++++++++++-- rates/table/rate_table.py | 4 +++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/rates/table/menu_table.py b/rates/table/menu_table.py index b5647128..dd2de591 100644 --- a/rates/table/menu_table.py +++ b/rates/table/menu_table.py @@ -335,8 +335,6 @@ def prepare_masks(self): for seed in sorted(seeds): - if "TkEle" not in seed: continue - print(seed) mask = self.get_npass(seed, self.trig_seeds[seed]) @@ -356,6 +354,7 @@ def make_table(self): table.append("Seed,NPass,Eff,Rate\n") total_mask = 0 trig_masks = self.prepare_masks() + self.trig_masks = trig_masks for seed, mask in trig_masks.items(): @@ -380,6 +379,19 @@ def make_table(self): print("Total nev: %i" % len(total_mask)) return table + + def dump_masks(self): + ''' + Function that dumps to file the masks produced by `prepare_masks`. + ''' + if hasattr(self, "trig_masks"): + os.makedirs(f"{self.table_outdir}", exist_ok=True) + fname = f"{self.table_outdir}/{self.table_fname}_{self.version}_masks.parquet" + print(f"Dumping masks to parquet in: {fname}") + + ak.to_parquet(ak.zip(self.trig_masks), fname) + else: + print("No masks created! Run `prepare_masks` first.") def dump_table(self, table): ''' diff --git a/rates/table/rate_table.py b/rates/table/rate_table.py index bd878d10..96ae2fd6 100755 --- a/rates/table/rate_table.py +++ b/rates/table/rate_table.py @@ -26,4 +26,6 @@ menu_config = MenuTable(menu_cfg) table = menu_config.make_table() - menu_config.dump_table(table) \ No newline at end of file + menu_config.dump_table(table) + + menu_config.dump_masks() \ No newline at end of file From acc07d1793da0f7d50a30fc339b33f4948792678 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Tue, 8 Aug 2023 17:38:30 +0200 Subject: [PATCH 020/140] Fix seed threshold --- rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml index e8454224..ee00e269 100644 --- a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml +++ b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml @@ -584,7 +584,8 @@ L1_TkMu_TkEle: - abs(leg2.zvtx-leg1.z0)<1 leg1: leg_mask: - - leg1.offline_pt >= 7.0 + #- leg1.offline_pt >= 7.0 + - leg1.pt>7 - abs(leg1.eta)<2.4 obj: gmtTkMuon leg2: From 80117cb48e458c1d38b26d789e14fb6f01bad331 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 15 Jan 2024 17:13:09 +0100 Subject: [PATCH 021/140] move everything from objectPerformance --- {objectPerformance/cfg_caching => configs/caching}/V22.yaml | 0 {objectPerformance/cfg_caching => configs/caching}/V26.yaml | 0 {objectPerformance/cfg_caching => configs/caching}/V27.yaml | 0 .../cfg_caching => configs/caching}/V27_bTagNN.yaml | 0 {objectPerformance/cfg_caching => configs/caching}/V28.yaml | 0 {objectPerformance/cfg_caching => configs/caching}/V29.yaml | 0 {objectPerformance/cfg_caching => configs/caching}/V29_13X.yaml | 0 {objectPerformance/cfg_caching => configs/caching}/V30.yaml | 0 .../object_performance_plots}/V22/electron_iso.yaml | 0 .../object_performance_plots}/V22/electron_matching.yaml | 0 .../object_performance_plots}/V22/electron_matching_eta.yaml | 0 .../object_performance_plots}/V22/electron_trigger.yaml | 0 .../object_performance_plots}/V22/jets_matching_eta.yaml | 0 .../object_performance_plots}/V22/jets_trigger.yaml | 0 .../object_performance_plots}/V22/met_ht_mht.yaml | 0 .../object_performance_plots}/V22/met_ht_mht_trigger.yaml | 0 .../cfg_plots => configs/object_performance_plots}/V22/mht.yaml | 0 .../object_performance_plots}/V22/mht_comparison.yaml | 0 .../object_performance_plots}/V22/muon_matching.yaml | 0 .../object_performance_plots}/V22/muon_matching_eta.yaml | 0 .../object_performance_plots}/V22/muon_trigger.yaml | 0 .../object_performance_plots}/V22/photon_iso.yaml | 0 .../object_performance_plots}/V22/tau_matching.yaml | 0 .../object_performance_plots}/V22/tau_matching_GG_VBF.yaml | 0 .../object_performance_plots}/V22/tau_trigger.yaml | 0 .../object_performance_plots}/V22/version_comparison.yaml | 0 .../object_performance_plots}/V26/electron_iso.yaml | 0 .../object_performance_plots}/V26/electron_matching.yaml | 0 .../object_performance_plots}/V26/electron_matching_eta.yaml | 0 .../object_performance_plots}/V26/electron_matching_eta_test.yaml | 0 .../object_performance_plots}/V26/electron_trigger.yaml | 0 .../object_performance_plots}/V26/jets_matching_eta.yaml | 0 .../object_performance_plots}/V26/jets_trigger.yaml | 0 .../object_performance_plots}/V26/met_ht_mht.yaml | 0 .../object_performance_plots}/V26/muon_matching.yaml | 0 .../object_performance_plots}/V26/muon_matching_eta.yaml | 0 .../object_performance_plots}/V26/muon_trigger.yaml | 0 .../object_performance_plots}/V26/photon_iso.yaml | 0 .../object_performance_plots}/V26/photons_matching_eta.yaml | 0 .../object_performance_plots}/V26/photons_matching_eta_iso.yaml | 0 .../object_performance_plots}/V26/scaling_thresholds.yaml | 0 .../object_performance_plots}/V26/tau_matching.yaml | 0 .../object_performance_plots}/V26/tau_trigger.yaml | 0 .../object_performance_plots}/V27/electron_iso.yaml | 0 .../object_performance_plots}/V27/electron_matching.yaml | 0 .../object_performance_plots}/V27/electron_matching_eta.yaml | 0 .../object_performance_plots}/V27/electron_matching_eta_test.yaml | 0 .../object_performance_plots}/V27/electron_trigger.yaml | 0 .../object_performance_plots}/V27/jets_matching.yaml | 0 .../object_performance_plots}/V27/jets_matching_eta.yaml | 0 .../object_performance_plots}/V27/jets_trigger.yaml | 0 .../object_performance_plots}/V27/jets_trigger_fwd.yaml | 0 .../object_performance_plots}/V27/met_ht_mht.yaml | 0 .../cfg_plots => configs/object_performance_plots}/V27/mht.yaml | 0 .../object_performance_plots}/V27/muon_matching.yaml | 0 .../object_performance_plots}/V27/muon_matching_eta.yaml | 0 .../object_performance_plots}/V27/muon_trigger.yaml | 0 .../object_performance_plots}/V27/photon_iso.yaml | 0 .../object_performance_plots}/V27/photons_matching.yaml | 0 .../object_performance_plots}/V27/photons_matching_eta.yaml | 0 .../object_performance_plots}/V27/photons_matching_eta_iso.yaml | 0 .../object_performance_plots}/V27/photons_trigger.yaml | 0 .../object_performance_plots}/V27/scaling_thresholds.yaml | 0 .../object_performance_plots}/V27/tau_matching.yaml | 0 .../object_performance_plots}/V27/tau_matching_wHH.yaml | 0 .../object_performance_plots}/V27/tau_trigger.yaml | 0 .../object_performance_plots}/V27/version_comparison.yaml | 0 .../object_performance_plots}/V28/electron_iso.yaml | 0 .../object_performance_plots}/V28/electron_matching.yaml | 0 .../object_performance_plots}/V28/electron_matching_eta | 0 .../object_performance_plots}/V28/electron_matching_eta.yaml | 0 .../object_performance_plots}/V28/electron_matching_eta_test.yaml | 0 .../object_performance_plots}/V28/electron_matching_new.yaml | 0 .../object_performance_plots}/V28/electron_trigger.yaml | 0 .../object_performance_plots}/V28/jets_matching.yaml | 0 .../object_performance_plots}/V28/jets_matching_eta.yaml | 0 .../object_performance_plots}/V28/jets_trigger.yaml | 0 .../object_performance_plots}/V28/jets_trigger_fwd.yaml | 0 .../object_performance_plots}/V28/met_ht_mht.yaml | 0 .../object_performance_plots}/V28/muon_matching.yaml | 0 .../object_performance_plots}/V28/muon_matching_eta.yaml | 0 .../object_performance_plots}/V28/muon_trigger.yaml | 0 .../object_performance_plots}/V28/photon_iso.yaml | 0 .../object_performance_plots}/V28/photons_matching.yaml | 0 .../object_performance_plots}/V28/photons_matching_eta.yaml | 0 .../V28/photons_matching_eta_IDtest.yaml | 0 .../object_performance_plots}/V28/photons_matching_eta_iso.yaml | 0 .../object_performance_plots}/V28/photons_trigger.yaml | 0 .../object_performance_plots}/V28/scaling_thresholds.yaml | 0 .../object_performance_plots}/V28/tau_matching.yaml | 0 .../object_performance_plots}/V28/tau_matching_wHH.yaml | 0 .../object_performance_plots}/V28/tau_trigger.yaml | 0 .../object_performance_plots}/V28/version_comparison.yaml | 0 .../object_performance_plots}/V29/bJetEff.yaml | 0 .../object_performance_plots}/V29/electron_iso.yaml | 0 .../object_performance_plots}/V29/electron_matching.yaml | 0 .../object_performance_plots}/V29/electron_matching_eta.yaml | 0 .../object_performance_plots}/V29/electron_trigger.yaml | 0 .../object_performance_plots}/V29/jets_matching.yaml | 0 .../object_performance_plots}/V29/jets_matching_eta.yaml | 0 .../object_performance_plots}/V29/jets_matching_wBTag.yaml | 0 .../object_performance_plots}/V29/jets_trigger.yaml | 0 .../object_performance_plots}/V29/jets_trigger_fwd.yaml | 0 .../object_performance_plots}/V29/met_ht_mht.yaml | 0 .../cfg_plots => configs/object_performance_plots}/V29/mht.yaml | 0 .../object_performance_plots}/V29/muon_matching.yaml | 0 .../object_performance_plots}/V29/muon_matching_eta.yaml | 0 .../object_performance_plots}/V29/muon_trigger.yaml | 0 .../object_performance_plots}/V29/photon_iso.yaml | 0 .../object_performance_plots}/V29/photons_matching.yaml | 0 .../object_performance_plots}/V29/photons_matching_eta.yaml | 0 .../object_performance_plots}/V29/photons_trigger.yaml | 0 .../object_performance_plots}/V29/slim/.backups/.cele.yaml~ | 0 .../object_performance_plots}/V29/slim/cele.yaml | 0 .../object_performance_plots}/V29/slim/cjet.yaml | 0 .../object_performance_plots}/V29/slim/compare_gammas.yaml | 0 .../object_performance_plots}/V29/slim/compare_jets.yaml | 0 .../object_performance_plots}/V29/slim/compare_mus.yaml | 0 .../object_performance_plots}/V29/slim/comparisons.yaml | 0 .../V29/slim/egamma_trigger_inclusive.yaml | 0 .../V29/slim/egamma_trigger_tkiso_inclusive.yaml | 0 .../object_performance_plots}/V29/slim/ele_test.yaml | 0 .../object_performance_plots}/V29/slim/electron_matching.yaml | 0 .../object_performance_plots}/V29/slim/electrons_comparisons.yaml | 0 .../object_performance_plots}/V29/slim/jets_matching.yaml | 0 .../object_performance_plots}/V29/slim/jets_matching_eta.yaml | 0 .../V29/slim/jets_trigger_inclusive.yaml | 0 .../V29/slim/jets_trigger_sc_inclusive.yaml | 0 .../object_performance_plots}/V29/slim/met.yaml | 0 .../object_performance_plots}/V29/slim/muon_matching.yaml | 0 .../V29/slim/muon_trigger_gmtTK_inclusive.yaml | 0 .../V29/slim/muon_trigger_inclusive.yaml | 0 .../object_performance_plots}/V29/slim/pho_test.yaml | 0 .../object_performance_plots}/V29/slim/photons_matching.yaml | 0 .../object_performance_plots}/V29/slim/tau_matching.yaml | 0 .../object_performance_plots}/V29/slim/tau_matching_eta.yaml | 0 .../object_performance_plots}/V29/slim/tau_trigger_inclusive.yaml | 0 .../object_performance_plots}/V29/tau_matching.yaml | 0 .../object_performance_plots}/V29/tau_matching_wHH.yaml | 0 .../object_performance_plots}/V29/tau_trigger.yaml | 0 .../object_performance_plots}/V29/version_comparison.yaml | 0 .../object_performance_plots}/V29_13X/bJetEff.yaml | 0 .../object_performance_plots}/V29_13X/electron_iso.yaml | 0 .../object_performance_plots}/V29_13X/electron_matching.yaml | 0 .../object_performance_plots}/V29_13X/electron_matching_eta.yaml | 0 .../object_performance_plots}/V29_13X/electron_trigger.yaml | 0 .../object_performance_plots}/V29_13X/ht_test.yaml | 0 .../object_performance_plots}/V29_13X/jets_matching.yaml | 0 .../object_performance_plots}/V29_13X/jets_matching_eta.yaml | 0 .../object_performance_plots}/V29_13X/jets_trigger.yaml | 0 .../object_performance_plots}/V29_13X/jets_trigger_fwd.yaml | 0 .../object_performance_plots}/V29_13X/met_ht_mht.yaml | 0 .../object_performance_plots}/V29_13X/mht.yaml | 0 .../object_performance_plots}/V29_13X/muon_matching.yaml | 0 .../object_performance_plots}/V29_13X/muon_matching_eta.yaml | 0 .../object_performance_plots}/V29_13X/muon_trigger.yaml | 0 .../object_performance_plots}/V29_13X/photon_iso.yaml | 0 .../object_performance_plots}/V29_13X/photons_matching.yaml | 0 .../object_performance_plots}/V29_13X/photons_matching_eta.yaml | 0 .../object_performance_plots}/V29_13X/photons_trigger.yaml | 0 .../object_performance_plots}/V29_13X/tau_matching.yaml | 0 .../object_performance_plots}/V29_13X/tau_trigger.yaml | 0 .../object_performance_plots}/V29_13X/tests/electron_iso_Hgg.yaml | 0 .../object_performance_plots}/V29_13X/tests/tau_matching_TT.yaml | 0 .../object_performance_plots}/V29_13X/tests/tau_trigger_TT.yaml | 0 .../object_performance_plots}/V29_13X/version_comparison.yaml | 0 .../object_performance_plots}/V30/bJetEff.yaml | 0 .../object_performance_plots}/V30/electron_iso.yaml | 0 .../object_performance_plots}/V30/electron_matching.yaml | 0 .../object_performance_plots}/V30/electron_matching_eta.yaml | 0 .../object_performance_plots}/V30/electron_trigger.yaml | 0 .../object_performance_plots}/V30/ht_test.yaml | 0 .../object_performance_plots}/V30/jets_matching.yaml | 0 .../object_performance_plots}/V30/jets_matching_eta.yaml | 0 .../object_performance_plots}/V30/jets_matching_wBTag.yaml | 0 .../object_performance_plots}/V30/jets_trigger.yaml | 0 .../object_performance_plots}/V30/jets_trigger_fwd.yaml | 0 .../object_performance_plots}/V30/met_ht_mht.yaml | 0 .../cfg_plots => configs/object_performance_plots}/V30/mht.yaml | 0 .../object_performance_plots}/V30/muon_matching.yaml | 0 .../object_performance_plots}/V30/muon_matching_eta.yaml | 0 .../object_performance_plots}/V30/muon_trigger.yaml | 0 .../object_performance_plots}/V30/photon_iso.yaml | 0 .../object_performance_plots}/V30/photons_matching.yaml | 0 .../object_performance_plots}/V30/photons_matching_eta.yaml | 0 .../object_performance_plots}/V30/photons_trigger.yaml | 0 .../object_performance_plots}/V30/tau_matching.yaml | 0 .../object_performance_plots}/V30/tau_matching_wHH.yaml | 0 .../object_performance_plots}/V30/tau_trigger.yaml | 0 .../object_performance_plots}/V30/version_comparison.yaml | 0 .../object_performance_plots}/scaling_thresholds.yaml | 0 .../Details.md => docs/object-performance-details.md | 0 objectPerformance/README.md => docs/object-performance.md | 0 {objectPerformance/src => menu_tools/caching}/cache_objects.py | 0 .../src => menu_tools/object_performance}/__init__.py | 0 .../src => menu_tools/object_performance}/compare_json.ipynb | 0 .../src => menu_tools/object_performance}/compare_plots.py | 0 .../src => menu_tools/object_performance}/plotBTagEfficiency.py | 0 .../src => menu_tools/object_performance}/plot_config.py | 0 .../src => menu_tools/object_performance}/plotter.py | 0 .../src => menu_tools/object_performance}/quality_obj.py | 0 .../src => menu_tools/object_performance}/scaling_collection.py | 0 .../object_performance}/tests/__init__.py | 0 .../object_performance}/tests/conftest.py | 0 .../object_performance}/tests/test_integration.py | 0 .../object_performance}/tests/test_turnon_collection.py | 0 .../object_performance}/tests/test_utils.py | 0 .../src => menu_tools/object_performance}/turnon_collection.py | 0 {objectPerformance/src => menu_tools/utils}/utils.py | 0 objectPerformance/pyproject.toml => pyproject.toml | 0 210 files changed, 0 insertions(+), 0 deletions(-) rename {objectPerformance/cfg_caching => configs/caching}/V22.yaml (100%) rename {objectPerformance/cfg_caching => configs/caching}/V26.yaml (100%) rename {objectPerformance/cfg_caching => configs/caching}/V27.yaml (100%) rename {objectPerformance/cfg_caching => configs/caching}/V27_bTagNN.yaml (100%) rename {objectPerformance/cfg_caching => configs/caching}/V28.yaml (100%) rename {objectPerformance/cfg_caching => configs/caching}/V29.yaml (100%) rename {objectPerformance/cfg_caching => configs/caching}/V29_13X.yaml (100%) rename {objectPerformance/cfg_caching => configs/caching}/V30.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/electron_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/electron_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/electron_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/electron_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/jets_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/jets_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/met_ht_mht.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/met_ht_mht_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/mht.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/mht_comparison.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/muon_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/muon_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/muon_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/photon_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/tau_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/tau_matching_GG_VBF.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/tau_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V22/version_comparison.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/electron_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/electron_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/electron_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/electron_matching_eta_test.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/electron_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/jets_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/jets_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/met_ht_mht.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/muon_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/muon_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/muon_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/photon_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/photons_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/photons_matching_eta_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/scaling_thresholds.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/tau_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V26/tau_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/electron_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/electron_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/electron_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/electron_matching_eta_test.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/electron_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/jets_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/jets_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/jets_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/jets_trigger_fwd.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/met_ht_mht.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/mht.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/muon_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/muon_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/muon_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/photon_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/photons_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/photons_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/photons_matching_eta_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/photons_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/scaling_thresholds.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/tau_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/tau_matching_wHH.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/tau_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V27/version_comparison.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/electron_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/electron_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/electron_matching_eta (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/electron_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/electron_matching_eta_test.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/electron_matching_new.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/electron_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/jets_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/jets_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/jets_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/jets_trigger_fwd.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/met_ht_mht.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/muon_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/muon_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/muon_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/photon_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/photons_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/photons_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/photons_matching_eta_IDtest.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/photons_matching_eta_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/photons_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/scaling_thresholds.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/tau_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/tau_matching_wHH.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/tau_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V28/version_comparison.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/bJetEff.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/electron_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/electron_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/electron_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/electron_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/jets_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/jets_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/jets_matching_wBTag.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/jets_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/jets_trigger_fwd.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/met_ht_mht.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/mht.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/muon_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/muon_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/muon_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/photon_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/photons_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/photons_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/photons_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/.backups/.cele.yaml~ (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/cele.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/cjet.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/compare_gammas.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/compare_jets.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/compare_mus.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/comparisons.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/egamma_trigger_inclusive.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/egamma_trigger_tkiso_inclusive.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/ele_test.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/electron_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/electrons_comparisons.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/jets_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/jets_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/jets_trigger_inclusive.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/jets_trigger_sc_inclusive.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/met.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/muon_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/muon_trigger_gmtTK_inclusive.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/muon_trigger_inclusive.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/pho_test.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/photons_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/tau_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/tau_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/slim/tau_trigger_inclusive.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/tau_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/tau_matching_wHH.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/tau_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29/version_comparison.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/bJetEff.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/electron_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/electron_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/electron_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/electron_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/ht_test.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/jets_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/jets_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/jets_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/jets_trigger_fwd.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/met_ht_mht.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/mht.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/muon_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/muon_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/muon_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/photon_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/photons_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/photons_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/photons_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/tau_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/tau_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/tests/electron_iso_Hgg.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/tests/tau_matching_TT.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/tests/tau_trigger_TT.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V29_13X/version_comparison.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/bJetEff.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/electron_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/electron_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/electron_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/electron_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/ht_test.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/jets_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/jets_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/jets_matching_wBTag.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/jets_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/jets_trigger_fwd.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/met_ht_mht.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/mht.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/muon_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/muon_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/muon_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/photon_iso.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/photons_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/photons_matching_eta.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/photons_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/tau_matching.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/tau_matching_wHH.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/tau_trigger.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/V30/version_comparison.yaml (100%) rename {objectPerformance/cfg_plots => configs/object_performance_plots}/scaling_thresholds.yaml (100%) rename objectPerformance/Details.md => docs/object-performance-details.md (100%) rename objectPerformance/README.md => docs/object-performance.md (100%) rename {objectPerformance/src => menu_tools/caching}/cache_objects.py (100%) rename {objectPerformance/src => menu_tools/object_performance}/__init__.py (100%) rename {objectPerformance/src => menu_tools/object_performance}/compare_json.ipynb (100%) rename {objectPerformance/src => menu_tools/object_performance}/compare_plots.py (100%) rename {objectPerformance/src => menu_tools/object_performance}/plotBTagEfficiency.py (100%) rename {objectPerformance/src => menu_tools/object_performance}/plot_config.py (100%) rename {objectPerformance/src => menu_tools/object_performance}/plotter.py (100%) rename {objectPerformance/src => menu_tools/object_performance}/quality_obj.py (100%) rename {objectPerformance/src => menu_tools/object_performance}/scaling_collection.py (100%) rename {objectPerformance => menu_tools/object_performance}/tests/__init__.py (100%) rename {objectPerformance => menu_tools/object_performance}/tests/conftest.py (100%) rename {objectPerformance => menu_tools/object_performance}/tests/test_integration.py (100%) rename {objectPerformance => menu_tools/object_performance}/tests/test_turnon_collection.py (100%) rename {objectPerformance => menu_tools/object_performance}/tests/test_utils.py (100%) rename {objectPerformance/src => menu_tools/object_performance}/turnon_collection.py (100%) rename {objectPerformance/src => menu_tools/utils}/utils.py (100%) rename objectPerformance/pyproject.toml => pyproject.toml (100%) diff --git a/objectPerformance/cfg_caching/V22.yaml b/configs/caching/V22.yaml similarity index 100% rename from objectPerformance/cfg_caching/V22.yaml rename to configs/caching/V22.yaml diff --git a/objectPerformance/cfg_caching/V26.yaml b/configs/caching/V26.yaml similarity index 100% rename from objectPerformance/cfg_caching/V26.yaml rename to configs/caching/V26.yaml diff --git a/objectPerformance/cfg_caching/V27.yaml b/configs/caching/V27.yaml similarity index 100% rename from objectPerformance/cfg_caching/V27.yaml rename to configs/caching/V27.yaml diff --git a/objectPerformance/cfg_caching/V27_bTagNN.yaml b/configs/caching/V27_bTagNN.yaml similarity index 100% rename from objectPerformance/cfg_caching/V27_bTagNN.yaml rename to configs/caching/V27_bTagNN.yaml diff --git a/objectPerformance/cfg_caching/V28.yaml b/configs/caching/V28.yaml similarity index 100% rename from objectPerformance/cfg_caching/V28.yaml rename to configs/caching/V28.yaml diff --git a/objectPerformance/cfg_caching/V29.yaml b/configs/caching/V29.yaml similarity index 100% rename from objectPerformance/cfg_caching/V29.yaml rename to configs/caching/V29.yaml diff --git a/objectPerformance/cfg_caching/V29_13X.yaml b/configs/caching/V29_13X.yaml similarity index 100% rename from objectPerformance/cfg_caching/V29_13X.yaml rename to configs/caching/V29_13X.yaml diff --git a/objectPerformance/cfg_caching/V30.yaml b/configs/caching/V30.yaml similarity index 100% rename from objectPerformance/cfg_caching/V30.yaml rename to configs/caching/V30.yaml diff --git a/objectPerformance/cfg_plots/V22/electron_iso.yaml b/configs/object_performance_plots/V22/electron_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/electron_iso.yaml rename to configs/object_performance_plots/V22/electron_iso.yaml diff --git a/objectPerformance/cfg_plots/V22/electron_matching.yaml b/configs/object_performance_plots/V22/electron_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/electron_matching.yaml rename to configs/object_performance_plots/V22/electron_matching.yaml diff --git a/objectPerformance/cfg_plots/V22/electron_matching_eta.yaml b/configs/object_performance_plots/V22/electron_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/electron_matching_eta.yaml rename to configs/object_performance_plots/V22/electron_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V22/electron_trigger.yaml b/configs/object_performance_plots/V22/electron_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/electron_trigger.yaml rename to configs/object_performance_plots/V22/electron_trigger.yaml diff --git a/objectPerformance/cfg_plots/V22/jets_matching_eta.yaml b/configs/object_performance_plots/V22/jets_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/jets_matching_eta.yaml rename to configs/object_performance_plots/V22/jets_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V22/jets_trigger.yaml b/configs/object_performance_plots/V22/jets_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/jets_trigger.yaml rename to configs/object_performance_plots/V22/jets_trigger.yaml diff --git a/objectPerformance/cfg_plots/V22/met_ht_mht.yaml b/configs/object_performance_plots/V22/met_ht_mht.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/met_ht_mht.yaml rename to configs/object_performance_plots/V22/met_ht_mht.yaml diff --git a/objectPerformance/cfg_plots/V22/met_ht_mht_trigger.yaml b/configs/object_performance_plots/V22/met_ht_mht_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/met_ht_mht_trigger.yaml rename to configs/object_performance_plots/V22/met_ht_mht_trigger.yaml diff --git a/objectPerformance/cfg_plots/V22/mht.yaml b/configs/object_performance_plots/V22/mht.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/mht.yaml rename to configs/object_performance_plots/V22/mht.yaml diff --git a/objectPerformance/cfg_plots/V22/mht_comparison.yaml b/configs/object_performance_plots/V22/mht_comparison.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/mht_comparison.yaml rename to configs/object_performance_plots/V22/mht_comparison.yaml diff --git a/objectPerformance/cfg_plots/V22/muon_matching.yaml b/configs/object_performance_plots/V22/muon_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/muon_matching.yaml rename to configs/object_performance_plots/V22/muon_matching.yaml diff --git a/objectPerformance/cfg_plots/V22/muon_matching_eta.yaml b/configs/object_performance_plots/V22/muon_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/muon_matching_eta.yaml rename to configs/object_performance_plots/V22/muon_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V22/muon_trigger.yaml b/configs/object_performance_plots/V22/muon_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/muon_trigger.yaml rename to configs/object_performance_plots/V22/muon_trigger.yaml diff --git a/objectPerformance/cfg_plots/V22/photon_iso.yaml b/configs/object_performance_plots/V22/photon_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/photon_iso.yaml rename to configs/object_performance_plots/V22/photon_iso.yaml diff --git a/objectPerformance/cfg_plots/V22/tau_matching.yaml b/configs/object_performance_plots/V22/tau_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/tau_matching.yaml rename to configs/object_performance_plots/V22/tau_matching.yaml diff --git a/objectPerformance/cfg_plots/V22/tau_matching_GG_VBF.yaml b/configs/object_performance_plots/V22/tau_matching_GG_VBF.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/tau_matching_GG_VBF.yaml rename to configs/object_performance_plots/V22/tau_matching_GG_VBF.yaml diff --git a/objectPerformance/cfg_plots/V22/tau_trigger.yaml b/configs/object_performance_plots/V22/tau_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/tau_trigger.yaml rename to configs/object_performance_plots/V22/tau_trigger.yaml diff --git a/objectPerformance/cfg_plots/V22/version_comparison.yaml b/configs/object_performance_plots/V22/version_comparison.yaml similarity index 100% rename from objectPerformance/cfg_plots/V22/version_comparison.yaml rename to configs/object_performance_plots/V22/version_comparison.yaml diff --git a/objectPerformance/cfg_plots/V26/electron_iso.yaml b/configs/object_performance_plots/V26/electron_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/electron_iso.yaml rename to configs/object_performance_plots/V26/electron_iso.yaml diff --git a/objectPerformance/cfg_plots/V26/electron_matching.yaml b/configs/object_performance_plots/V26/electron_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/electron_matching.yaml rename to configs/object_performance_plots/V26/electron_matching.yaml diff --git a/objectPerformance/cfg_plots/V26/electron_matching_eta.yaml b/configs/object_performance_plots/V26/electron_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/electron_matching_eta.yaml rename to configs/object_performance_plots/V26/electron_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V26/electron_matching_eta_test.yaml b/configs/object_performance_plots/V26/electron_matching_eta_test.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/electron_matching_eta_test.yaml rename to configs/object_performance_plots/V26/electron_matching_eta_test.yaml diff --git a/objectPerformance/cfg_plots/V26/electron_trigger.yaml b/configs/object_performance_plots/V26/electron_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/electron_trigger.yaml rename to configs/object_performance_plots/V26/electron_trigger.yaml diff --git a/objectPerformance/cfg_plots/V26/jets_matching_eta.yaml b/configs/object_performance_plots/V26/jets_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/jets_matching_eta.yaml rename to configs/object_performance_plots/V26/jets_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V26/jets_trigger.yaml b/configs/object_performance_plots/V26/jets_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/jets_trigger.yaml rename to configs/object_performance_plots/V26/jets_trigger.yaml diff --git a/objectPerformance/cfg_plots/V26/met_ht_mht.yaml b/configs/object_performance_plots/V26/met_ht_mht.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/met_ht_mht.yaml rename to configs/object_performance_plots/V26/met_ht_mht.yaml diff --git a/objectPerformance/cfg_plots/V26/muon_matching.yaml b/configs/object_performance_plots/V26/muon_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/muon_matching.yaml rename to configs/object_performance_plots/V26/muon_matching.yaml diff --git a/objectPerformance/cfg_plots/V26/muon_matching_eta.yaml b/configs/object_performance_plots/V26/muon_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/muon_matching_eta.yaml rename to configs/object_performance_plots/V26/muon_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V26/muon_trigger.yaml b/configs/object_performance_plots/V26/muon_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/muon_trigger.yaml rename to configs/object_performance_plots/V26/muon_trigger.yaml diff --git a/objectPerformance/cfg_plots/V26/photon_iso.yaml b/configs/object_performance_plots/V26/photon_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/photon_iso.yaml rename to configs/object_performance_plots/V26/photon_iso.yaml diff --git a/objectPerformance/cfg_plots/V26/photons_matching_eta.yaml b/configs/object_performance_plots/V26/photons_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/photons_matching_eta.yaml rename to configs/object_performance_plots/V26/photons_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V26/photons_matching_eta_iso.yaml b/configs/object_performance_plots/V26/photons_matching_eta_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/photons_matching_eta_iso.yaml rename to configs/object_performance_plots/V26/photons_matching_eta_iso.yaml diff --git a/objectPerformance/cfg_plots/V26/scaling_thresholds.yaml b/configs/object_performance_plots/V26/scaling_thresholds.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/scaling_thresholds.yaml rename to configs/object_performance_plots/V26/scaling_thresholds.yaml diff --git a/objectPerformance/cfg_plots/V26/tau_matching.yaml b/configs/object_performance_plots/V26/tau_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/tau_matching.yaml rename to configs/object_performance_plots/V26/tau_matching.yaml diff --git a/objectPerformance/cfg_plots/V26/tau_trigger.yaml b/configs/object_performance_plots/V26/tau_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V26/tau_trigger.yaml rename to configs/object_performance_plots/V26/tau_trigger.yaml diff --git a/objectPerformance/cfg_plots/V27/electron_iso.yaml b/configs/object_performance_plots/V27/electron_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/electron_iso.yaml rename to configs/object_performance_plots/V27/electron_iso.yaml diff --git a/objectPerformance/cfg_plots/V27/electron_matching.yaml b/configs/object_performance_plots/V27/electron_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/electron_matching.yaml rename to configs/object_performance_plots/V27/electron_matching.yaml diff --git a/objectPerformance/cfg_plots/V27/electron_matching_eta.yaml b/configs/object_performance_plots/V27/electron_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/electron_matching_eta.yaml rename to configs/object_performance_plots/V27/electron_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V27/electron_matching_eta_test.yaml b/configs/object_performance_plots/V27/electron_matching_eta_test.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/electron_matching_eta_test.yaml rename to configs/object_performance_plots/V27/electron_matching_eta_test.yaml diff --git a/objectPerformance/cfg_plots/V27/electron_trigger.yaml b/configs/object_performance_plots/V27/electron_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/electron_trigger.yaml rename to configs/object_performance_plots/V27/electron_trigger.yaml diff --git a/objectPerformance/cfg_plots/V27/jets_matching.yaml b/configs/object_performance_plots/V27/jets_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/jets_matching.yaml rename to configs/object_performance_plots/V27/jets_matching.yaml diff --git a/objectPerformance/cfg_plots/V27/jets_matching_eta.yaml b/configs/object_performance_plots/V27/jets_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/jets_matching_eta.yaml rename to configs/object_performance_plots/V27/jets_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V27/jets_trigger.yaml b/configs/object_performance_plots/V27/jets_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/jets_trigger.yaml rename to configs/object_performance_plots/V27/jets_trigger.yaml diff --git a/objectPerformance/cfg_plots/V27/jets_trigger_fwd.yaml b/configs/object_performance_plots/V27/jets_trigger_fwd.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/jets_trigger_fwd.yaml rename to configs/object_performance_plots/V27/jets_trigger_fwd.yaml diff --git a/objectPerformance/cfg_plots/V27/met_ht_mht.yaml b/configs/object_performance_plots/V27/met_ht_mht.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/met_ht_mht.yaml rename to configs/object_performance_plots/V27/met_ht_mht.yaml diff --git a/objectPerformance/cfg_plots/V27/mht.yaml b/configs/object_performance_plots/V27/mht.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/mht.yaml rename to configs/object_performance_plots/V27/mht.yaml diff --git a/objectPerformance/cfg_plots/V27/muon_matching.yaml b/configs/object_performance_plots/V27/muon_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/muon_matching.yaml rename to configs/object_performance_plots/V27/muon_matching.yaml diff --git a/objectPerformance/cfg_plots/V27/muon_matching_eta.yaml b/configs/object_performance_plots/V27/muon_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/muon_matching_eta.yaml rename to configs/object_performance_plots/V27/muon_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V27/muon_trigger.yaml b/configs/object_performance_plots/V27/muon_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/muon_trigger.yaml rename to configs/object_performance_plots/V27/muon_trigger.yaml diff --git a/objectPerformance/cfg_plots/V27/photon_iso.yaml b/configs/object_performance_plots/V27/photon_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/photon_iso.yaml rename to configs/object_performance_plots/V27/photon_iso.yaml diff --git a/objectPerformance/cfg_plots/V27/photons_matching.yaml b/configs/object_performance_plots/V27/photons_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/photons_matching.yaml rename to configs/object_performance_plots/V27/photons_matching.yaml diff --git a/objectPerformance/cfg_plots/V27/photons_matching_eta.yaml b/configs/object_performance_plots/V27/photons_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/photons_matching_eta.yaml rename to configs/object_performance_plots/V27/photons_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V27/photons_matching_eta_iso.yaml b/configs/object_performance_plots/V27/photons_matching_eta_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/photons_matching_eta_iso.yaml rename to configs/object_performance_plots/V27/photons_matching_eta_iso.yaml diff --git a/objectPerformance/cfg_plots/V27/photons_trigger.yaml b/configs/object_performance_plots/V27/photons_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/photons_trigger.yaml rename to configs/object_performance_plots/V27/photons_trigger.yaml diff --git a/objectPerformance/cfg_plots/V27/scaling_thresholds.yaml b/configs/object_performance_plots/V27/scaling_thresholds.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/scaling_thresholds.yaml rename to configs/object_performance_plots/V27/scaling_thresholds.yaml diff --git a/objectPerformance/cfg_plots/V27/tau_matching.yaml b/configs/object_performance_plots/V27/tau_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/tau_matching.yaml rename to configs/object_performance_plots/V27/tau_matching.yaml diff --git a/objectPerformance/cfg_plots/V27/tau_matching_wHH.yaml b/configs/object_performance_plots/V27/tau_matching_wHH.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/tau_matching_wHH.yaml rename to configs/object_performance_plots/V27/tau_matching_wHH.yaml diff --git a/objectPerformance/cfg_plots/V27/tau_trigger.yaml b/configs/object_performance_plots/V27/tau_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/tau_trigger.yaml rename to configs/object_performance_plots/V27/tau_trigger.yaml diff --git a/objectPerformance/cfg_plots/V27/version_comparison.yaml b/configs/object_performance_plots/V27/version_comparison.yaml similarity index 100% rename from objectPerformance/cfg_plots/V27/version_comparison.yaml rename to configs/object_performance_plots/V27/version_comparison.yaml diff --git a/objectPerformance/cfg_plots/V28/electron_iso.yaml b/configs/object_performance_plots/V28/electron_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/electron_iso.yaml rename to configs/object_performance_plots/V28/electron_iso.yaml diff --git a/objectPerformance/cfg_plots/V28/electron_matching.yaml b/configs/object_performance_plots/V28/electron_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/electron_matching.yaml rename to configs/object_performance_plots/V28/electron_matching.yaml diff --git a/objectPerformance/cfg_plots/V28/electron_matching_eta b/configs/object_performance_plots/V28/electron_matching_eta similarity index 100% rename from objectPerformance/cfg_plots/V28/electron_matching_eta rename to configs/object_performance_plots/V28/electron_matching_eta diff --git a/objectPerformance/cfg_plots/V28/electron_matching_eta.yaml b/configs/object_performance_plots/V28/electron_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/electron_matching_eta.yaml rename to configs/object_performance_plots/V28/electron_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V28/electron_matching_eta_test.yaml b/configs/object_performance_plots/V28/electron_matching_eta_test.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/electron_matching_eta_test.yaml rename to configs/object_performance_plots/V28/electron_matching_eta_test.yaml diff --git a/objectPerformance/cfg_plots/V28/electron_matching_new.yaml b/configs/object_performance_plots/V28/electron_matching_new.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/electron_matching_new.yaml rename to configs/object_performance_plots/V28/electron_matching_new.yaml diff --git a/objectPerformance/cfg_plots/V28/electron_trigger.yaml b/configs/object_performance_plots/V28/electron_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/electron_trigger.yaml rename to configs/object_performance_plots/V28/electron_trigger.yaml diff --git a/objectPerformance/cfg_plots/V28/jets_matching.yaml b/configs/object_performance_plots/V28/jets_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/jets_matching.yaml rename to configs/object_performance_plots/V28/jets_matching.yaml diff --git a/objectPerformance/cfg_plots/V28/jets_matching_eta.yaml b/configs/object_performance_plots/V28/jets_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/jets_matching_eta.yaml rename to configs/object_performance_plots/V28/jets_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V28/jets_trigger.yaml b/configs/object_performance_plots/V28/jets_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/jets_trigger.yaml rename to configs/object_performance_plots/V28/jets_trigger.yaml diff --git a/objectPerformance/cfg_plots/V28/jets_trigger_fwd.yaml b/configs/object_performance_plots/V28/jets_trigger_fwd.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/jets_trigger_fwd.yaml rename to configs/object_performance_plots/V28/jets_trigger_fwd.yaml diff --git a/objectPerformance/cfg_plots/V28/met_ht_mht.yaml b/configs/object_performance_plots/V28/met_ht_mht.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/met_ht_mht.yaml rename to configs/object_performance_plots/V28/met_ht_mht.yaml diff --git a/objectPerformance/cfg_plots/V28/muon_matching.yaml b/configs/object_performance_plots/V28/muon_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/muon_matching.yaml rename to configs/object_performance_plots/V28/muon_matching.yaml diff --git a/objectPerformance/cfg_plots/V28/muon_matching_eta.yaml b/configs/object_performance_plots/V28/muon_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/muon_matching_eta.yaml rename to configs/object_performance_plots/V28/muon_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V28/muon_trigger.yaml b/configs/object_performance_plots/V28/muon_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/muon_trigger.yaml rename to configs/object_performance_plots/V28/muon_trigger.yaml diff --git a/objectPerformance/cfg_plots/V28/photon_iso.yaml b/configs/object_performance_plots/V28/photon_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/photon_iso.yaml rename to configs/object_performance_plots/V28/photon_iso.yaml diff --git a/objectPerformance/cfg_plots/V28/photons_matching.yaml b/configs/object_performance_plots/V28/photons_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/photons_matching.yaml rename to configs/object_performance_plots/V28/photons_matching.yaml diff --git a/objectPerformance/cfg_plots/V28/photons_matching_eta.yaml b/configs/object_performance_plots/V28/photons_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/photons_matching_eta.yaml rename to configs/object_performance_plots/V28/photons_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V28/photons_matching_eta_IDtest.yaml b/configs/object_performance_plots/V28/photons_matching_eta_IDtest.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/photons_matching_eta_IDtest.yaml rename to configs/object_performance_plots/V28/photons_matching_eta_IDtest.yaml diff --git a/objectPerformance/cfg_plots/V28/photons_matching_eta_iso.yaml b/configs/object_performance_plots/V28/photons_matching_eta_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/photons_matching_eta_iso.yaml rename to configs/object_performance_plots/V28/photons_matching_eta_iso.yaml diff --git a/objectPerformance/cfg_plots/V28/photons_trigger.yaml b/configs/object_performance_plots/V28/photons_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/photons_trigger.yaml rename to configs/object_performance_plots/V28/photons_trigger.yaml diff --git a/objectPerformance/cfg_plots/V28/scaling_thresholds.yaml b/configs/object_performance_plots/V28/scaling_thresholds.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/scaling_thresholds.yaml rename to configs/object_performance_plots/V28/scaling_thresholds.yaml diff --git a/objectPerformance/cfg_plots/V28/tau_matching.yaml b/configs/object_performance_plots/V28/tau_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/tau_matching.yaml rename to configs/object_performance_plots/V28/tau_matching.yaml diff --git a/objectPerformance/cfg_plots/V28/tau_matching_wHH.yaml b/configs/object_performance_plots/V28/tau_matching_wHH.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/tau_matching_wHH.yaml rename to configs/object_performance_plots/V28/tau_matching_wHH.yaml diff --git a/objectPerformance/cfg_plots/V28/tau_trigger.yaml b/configs/object_performance_plots/V28/tau_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/tau_trigger.yaml rename to configs/object_performance_plots/V28/tau_trigger.yaml diff --git a/objectPerformance/cfg_plots/V28/version_comparison.yaml b/configs/object_performance_plots/V28/version_comparison.yaml similarity index 100% rename from objectPerformance/cfg_plots/V28/version_comparison.yaml rename to configs/object_performance_plots/V28/version_comparison.yaml diff --git a/objectPerformance/cfg_plots/V29/bJetEff.yaml b/configs/object_performance_plots/V29/bJetEff.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/bJetEff.yaml rename to configs/object_performance_plots/V29/bJetEff.yaml diff --git a/objectPerformance/cfg_plots/V29/electron_iso.yaml b/configs/object_performance_plots/V29/electron_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/electron_iso.yaml rename to configs/object_performance_plots/V29/electron_iso.yaml diff --git a/objectPerformance/cfg_plots/V29/electron_matching.yaml b/configs/object_performance_plots/V29/electron_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/electron_matching.yaml rename to configs/object_performance_plots/V29/electron_matching.yaml diff --git a/objectPerformance/cfg_plots/V29/electron_matching_eta.yaml b/configs/object_performance_plots/V29/electron_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/electron_matching_eta.yaml rename to configs/object_performance_plots/V29/electron_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V29/electron_trigger.yaml b/configs/object_performance_plots/V29/electron_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/electron_trigger.yaml rename to configs/object_performance_plots/V29/electron_trigger.yaml diff --git a/objectPerformance/cfg_plots/V29/jets_matching.yaml b/configs/object_performance_plots/V29/jets_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/jets_matching.yaml rename to configs/object_performance_plots/V29/jets_matching.yaml diff --git a/objectPerformance/cfg_plots/V29/jets_matching_eta.yaml b/configs/object_performance_plots/V29/jets_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/jets_matching_eta.yaml rename to configs/object_performance_plots/V29/jets_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V29/jets_matching_wBTag.yaml b/configs/object_performance_plots/V29/jets_matching_wBTag.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/jets_matching_wBTag.yaml rename to configs/object_performance_plots/V29/jets_matching_wBTag.yaml diff --git a/objectPerformance/cfg_plots/V29/jets_trigger.yaml b/configs/object_performance_plots/V29/jets_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/jets_trigger.yaml rename to configs/object_performance_plots/V29/jets_trigger.yaml diff --git a/objectPerformance/cfg_plots/V29/jets_trigger_fwd.yaml b/configs/object_performance_plots/V29/jets_trigger_fwd.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/jets_trigger_fwd.yaml rename to configs/object_performance_plots/V29/jets_trigger_fwd.yaml diff --git a/objectPerformance/cfg_plots/V29/met_ht_mht.yaml b/configs/object_performance_plots/V29/met_ht_mht.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/met_ht_mht.yaml rename to configs/object_performance_plots/V29/met_ht_mht.yaml diff --git a/objectPerformance/cfg_plots/V29/mht.yaml b/configs/object_performance_plots/V29/mht.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/mht.yaml rename to configs/object_performance_plots/V29/mht.yaml diff --git a/objectPerformance/cfg_plots/V29/muon_matching.yaml b/configs/object_performance_plots/V29/muon_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/muon_matching.yaml rename to configs/object_performance_plots/V29/muon_matching.yaml diff --git a/objectPerformance/cfg_plots/V29/muon_matching_eta.yaml b/configs/object_performance_plots/V29/muon_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/muon_matching_eta.yaml rename to configs/object_performance_plots/V29/muon_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V29/muon_trigger.yaml b/configs/object_performance_plots/V29/muon_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/muon_trigger.yaml rename to configs/object_performance_plots/V29/muon_trigger.yaml diff --git a/objectPerformance/cfg_plots/V29/photon_iso.yaml b/configs/object_performance_plots/V29/photon_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/photon_iso.yaml rename to configs/object_performance_plots/V29/photon_iso.yaml diff --git a/objectPerformance/cfg_plots/V29/photons_matching.yaml b/configs/object_performance_plots/V29/photons_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/photons_matching.yaml rename to configs/object_performance_plots/V29/photons_matching.yaml diff --git a/objectPerformance/cfg_plots/V29/photons_matching_eta.yaml b/configs/object_performance_plots/V29/photons_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/photons_matching_eta.yaml rename to configs/object_performance_plots/V29/photons_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V29/photons_trigger.yaml b/configs/object_performance_plots/V29/photons_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/photons_trigger.yaml rename to configs/object_performance_plots/V29/photons_trigger.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/.backups/.cele.yaml~ b/configs/object_performance_plots/V29/slim/.backups/.cele.yaml~ similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/.backups/.cele.yaml~ rename to configs/object_performance_plots/V29/slim/.backups/.cele.yaml~ diff --git a/objectPerformance/cfg_plots/V29/slim/cele.yaml b/configs/object_performance_plots/V29/slim/cele.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/cele.yaml rename to configs/object_performance_plots/V29/slim/cele.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/cjet.yaml b/configs/object_performance_plots/V29/slim/cjet.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/cjet.yaml rename to configs/object_performance_plots/V29/slim/cjet.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/compare_gammas.yaml b/configs/object_performance_plots/V29/slim/compare_gammas.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/compare_gammas.yaml rename to configs/object_performance_plots/V29/slim/compare_gammas.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/compare_jets.yaml b/configs/object_performance_plots/V29/slim/compare_jets.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/compare_jets.yaml rename to configs/object_performance_plots/V29/slim/compare_jets.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/compare_mus.yaml b/configs/object_performance_plots/V29/slim/compare_mus.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/compare_mus.yaml rename to configs/object_performance_plots/V29/slim/compare_mus.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/comparisons.yaml b/configs/object_performance_plots/V29/slim/comparisons.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/comparisons.yaml rename to configs/object_performance_plots/V29/slim/comparisons.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/egamma_trigger_inclusive.yaml b/configs/object_performance_plots/V29/slim/egamma_trigger_inclusive.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/egamma_trigger_inclusive.yaml rename to configs/object_performance_plots/V29/slim/egamma_trigger_inclusive.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/egamma_trigger_tkiso_inclusive.yaml b/configs/object_performance_plots/V29/slim/egamma_trigger_tkiso_inclusive.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/egamma_trigger_tkiso_inclusive.yaml rename to configs/object_performance_plots/V29/slim/egamma_trigger_tkiso_inclusive.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/ele_test.yaml b/configs/object_performance_plots/V29/slim/ele_test.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/ele_test.yaml rename to configs/object_performance_plots/V29/slim/ele_test.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/electron_matching.yaml b/configs/object_performance_plots/V29/slim/electron_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/electron_matching.yaml rename to configs/object_performance_plots/V29/slim/electron_matching.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/electrons_comparisons.yaml b/configs/object_performance_plots/V29/slim/electrons_comparisons.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/electrons_comparisons.yaml rename to configs/object_performance_plots/V29/slim/electrons_comparisons.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/jets_matching.yaml b/configs/object_performance_plots/V29/slim/jets_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/jets_matching.yaml rename to configs/object_performance_plots/V29/slim/jets_matching.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/jets_matching_eta.yaml b/configs/object_performance_plots/V29/slim/jets_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/jets_matching_eta.yaml rename to configs/object_performance_plots/V29/slim/jets_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/jets_trigger_inclusive.yaml b/configs/object_performance_plots/V29/slim/jets_trigger_inclusive.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/jets_trigger_inclusive.yaml rename to configs/object_performance_plots/V29/slim/jets_trigger_inclusive.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/jets_trigger_sc_inclusive.yaml b/configs/object_performance_plots/V29/slim/jets_trigger_sc_inclusive.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/jets_trigger_sc_inclusive.yaml rename to configs/object_performance_plots/V29/slim/jets_trigger_sc_inclusive.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/met.yaml b/configs/object_performance_plots/V29/slim/met.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/met.yaml rename to configs/object_performance_plots/V29/slim/met.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/muon_matching.yaml b/configs/object_performance_plots/V29/slim/muon_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/muon_matching.yaml rename to configs/object_performance_plots/V29/slim/muon_matching.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/muon_trigger_gmtTK_inclusive.yaml b/configs/object_performance_plots/V29/slim/muon_trigger_gmtTK_inclusive.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/muon_trigger_gmtTK_inclusive.yaml rename to configs/object_performance_plots/V29/slim/muon_trigger_gmtTK_inclusive.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/muon_trigger_inclusive.yaml b/configs/object_performance_plots/V29/slim/muon_trigger_inclusive.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/muon_trigger_inclusive.yaml rename to configs/object_performance_plots/V29/slim/muon_trigger_inclusive.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/pho_test.yaml b/configs/object_performance_plots/V29/slim/pho_test.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/pho_test.yaml rename to configs/object_performance_plots/V29/slim/pho_test.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/photons_matching.yaml b/configs/object_performance_plots/V29/slim/photons_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/photons_matching.yaml rename to configs/object_performance_plots/V29/slim/photons_matching.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/tau_matching.yaml b/configs/object_performance_plots/V29/slim/tau_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/tau_matching.yaml rename to configs/object_performance_plots/V29/slim/tau_matching.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/tau_matching_eta.yaml b/configs/object_performance_plots/V29/slim/tau_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/tau_matching_eta.yaml rename to configs/object_performance_plots/V29/slim/tau_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V29/slim/tau_trigger_inclusive.yaml b/configs/object_performance_plots/V29/slim/tau_trigger_inclusive.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/slim/tau_trigger_inclusive.yaml rename to configs/object_performance_plots/V29/slim/tau_trigger_inclusive.yaml diff --git a/objectPerformance/cfg_plots/V29/tau_matching.yaml b/configs/object_performance_plots/V29/tau_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/tau_matching.yaml rename to configs/object_performance_plots/V29/tau_matching.yaml diff --git a/objectPerformance/cfg_plots/V29/tau_matching_wHH.yaml b/configs/object_performance_plots/V29/tau_matching_wHH.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/tau_matching_wHH.yaml rename to configs/object_performance_plots/V29/tau_matching_wHH.yaml diff --git a/objectPerformance/cfg_plots/V29/tau_trigger.yaml b/configs/object_performance_plots/V29/tau_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/tau_trigger.yaml rename to configs/object_performance_plots/V29/tau_trigger.yaml diff --git a/objectPerformance/cfg_plots/V29/version_comparison.yaml b/configs/object_performance_plots/V29/version_comparison.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29/version_comparison.yaml rename to configs/object_performance_plots/V29/version_comparison.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/bJetEff.yaml b/configs/object_performance_plots/V29_13X/bJetEff.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/bJetEff.yaml rename to configs/object_performance_plots/V29_13X/bJetEff.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/electron_iso.yaml b/configs/object_performance_plots/V29_13X/electron_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/electron_iso.yaml rename to configs/object_performance_plots/V29_13X/electron_iso.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/electron_matching.yaml b/configs/object_performance_plots/V29_13X/electron_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/electron_matching.yaml rename to configs/object_performance_plots/V29_13X/electron_matching.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/electron_matching_eta.yaml b/configs/object_performance_plots/V29_13X/electron_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/electron_matching_eta.yaml rename to configs/object_performance_plots/V29_13X/electron_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/electron_trigger.yaml b/configs/object_performance_plots/V29_13X/electron_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/electron_trigger.yaml rename to configs/object_performance_plots/V29_13X/electron_trigger.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/ht_test.yaml b/configs/object_performance_plots/V29_13X/ht_test.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/ht_test.yaml rename to configs/object_performance_plots/V29_13X/ht_test.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/jets_matching.yaml b/configs/object_performance_plots/V29_13X/jets_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/jets_matching.yaml rename to configs/object_performance_plots/V29_13X/jets_matching.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/jets_matching_eta.yaml b/configs/object_performance_plots/V29_13X/jets_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/jets_matching_eta.yaml rename to configs/object_performance_plots/V29_13X/jets_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/jets_trigger.yaml b/configs/object_performance_plots/V29_13X/jets_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/jets_trigger.yaml rename to configs/object_performance_plots/V29_13X/jets_trigger.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/jets_trigger_fwd.yaml b/configs/object_performance_plots/V29_13X/jets_trigger_fwd.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/jets_trigger_fwd.yaml rename to configs/object_performance_plots/V29_13X/jets_trigger_fwd.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/met_ht_mht.yaml b/configs/object_performance_plots/V29_13X/met_ht_mht.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/met_ht_mht.yaml rename to configs/object_performance_plots/V29_13X/met_ht_mht.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/mht.yaml b/configs/object_performance_plots/V29_13X/mht.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/mht.yaml rename to configs/object_performance_plots/V29_13X/mht.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/muon_matching.yaml b/configs/object_performance_plots/V29_13X/muon_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/muon_matching.yaml rename to configs/object_performance_plots/V29_13X/muon_matching.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/muon_matching_eta.yaml b/configs/object_performance_plots/V29_13X/muon_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/muon_matching_eta.yaml rename to configs/object_performance_plots/V29_13X/muon_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/muon_trigger.yaml b/configs/object_performance_plots/V29_13X/muon_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/muon_trigger.yaml rename to configs/object_performance_plots/V29_13X/muon_trigger.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/photon_iso.yaml b/configs/object_performance_plots/V29_13X/photon_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/photon_iso.yaml rename to configs/object_performance_plots/V29_13X/photon_iso.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/photons_matching.yaml b/configs/object_performance_plots/V29_13X/photons_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/photons_matching.yaml rename to configs/object_performance_plots/V29_13X/photons_matching.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/photons_matching_eta.yaml b/configs/object_performance_plots/V29_13X/photons_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/photons_matching_eta.yaml rename to configs/object_performance_plots/V29_13X/photons_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/photons_trigger.yaml b/configs/object_performance_plots/V29_13X/photons_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/photons_trigger.yaml rename to configs/object_performance_plots/V29_13X/photons_trigger.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/tau_matching.yaml b/configs/object_performance_plots/V29_13X/tau_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/tau_matching.yaml rename to configs/object_performance_plots/V29_13X/tau_matching.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/tau_trigger.yaml b/configs/object_performance_plots/V29_13X/tau_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/tau_trigger.yaml rename to configs/object_performance_plots/V29_13X/tau_trigger.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/tests/electron_iso_Hgg.yaml b/configs/object_performance_plots/V29_13X/tests/electron_iso_Hgg.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/tests/electron_iso_Hgg.yaml rename to configs/object_performance_plots/V29_13X/tests/electron_iso_Hgg.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/tests/tau_matching_TT.yaml b/configs/object_performance_plots/V29_13X/tests/tau_matching_TT.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/tests/tau_matching_TT.yaml rename to configs/object_performance_plots/V29_13X/tests/tau_matching_TT.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/tests/tau_trigger_TT.yaml b/configs/object_performance_plots/V29_13X/tests/tau_trigger_TT.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/tests/tau_trigger_TT.yaml rename to configs/object_performance_plots/V29_13X/tests/tau_trigger_TT.yaml diff --git a/objectPerformance/cfg_plots/V29_13X/version_comparison.yaml b/configs/object_performance_plots/V29_13X/version_comparison.yaml similarity index 100% rename from objectPerformance/cfg_plots/V29_13X/version_comparison.yaml rename to configs/object_performance_plots/V29_13X/version_comparison.yaml diff --git a/objectPerformance/cfg_plots/V30/bJetEff.yaml b/configs/object_performance_plots/V30/bJetEff.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/bJetEff.yaml rename to configs/object_performance_plots/V30/bJetEff.yaml diff --git a/objectPerformance/cfg_plots/V30/electron_iso.yaml b/configs/object_performance_plots/V30/electron_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/electron_iso.yaml rename to configs/object_performance_plots/V30/electron_iso.yaml diff --git a/objectPerformance/cfg_plots/V30/electron_matching.yaml b/configs/object_performance_plots/V30/electron_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/electron_matching.yaml rename to configs/object_performance_plots/V30/electron_matching.yaml diff --git a/objectPerformance/cfg_plots/V30/electron_matching_eta.yaml b/configs/object_performance_plots/V30/electron_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/electron_matching_eta.yaml rename to configs/object_performance_plots/V30/electron_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V30/electron_trigger.yaml b/configs/object_performance_plots/V30/electron_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/electron_trigger.yaml rename to configs/object_performance_plots/V30/electron_trigger.yaml diff --git a/objectPerformance/cfg_plots/V30/ht_test.yaml b/configs/object_performance_plots/V30/ht_test.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/ht_test.yaml rename to configs/object_performance_plots/V30/ht_test.yaml diff --git a/objectPerformance/cfg_plots/V30/jets_matching.yaml b/configs/object_performance_plots/V30/jets_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/jets_matching.yaml rename to configs/object_performance_plots/V30/jets_matching.yaml diff --git a/objectPerformance/cfg_plots/V30/jets_matching_eta.yaml b/configs/object_performance_plots/V30/jets_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/jets_matching_eta.yaml rename to configs/object_performance_plots/V30/jets_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V30/jets_matching_wBTag.yaml b/configs/object_performance_plots/V30/jets_matching_wBTag.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/jets_matching_wBTag.yaml rename to configs/object_performance_plots/V30/jets_matching_wBTag.yaml diff --git a/objectPerformance/cfg_plots/V30/jets_trigger.yaml b/configs/object_performance_plots/V30/jets_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/jets_trigger.yaml rename to configs/object_performance_plots/V30/jets_trigger.yaml diff --git a/objectPerformance/cfg_plots/V30/jets_trigger_fwd.yaml b/configs/object_performance_plots/V30/jets_trigger_fwd.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/jets_trigger_fwd.yaml rename to configs/object_performance_plots/V30/jets_trigger_fwd.yaml diff --git a/objectPerformance/cfg_plots/V30/met_ht_mht.yaml b/configs/object_performance_plots/V30/met_ht_mht.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/met_ht_mht.yaml rename to configs/object_performance_plots/V30/met_ht_mht.yaml diff --git a/objectPerformance/cfg_plots/V30/mht.yaml b/configs/object_performance_plots/V30/mht.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/mht.yaml rename to configs/object_performance_plots/V30/mht.yaml diff --git a/objectPerformance/cfg_plots/V30/muon_matching.yaml b/configs/object_performance_plots/V30/muon_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/muon_matching.yaml rename to configs/object_performance_plots/V30/muon_matching.yaml diff --git a/objectPerformance/cfg_plots/V30/muon_matching_eta.yaml b/configs/object_performance_plots/V30/muon_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/muon_matching_eta.yaml rename to configs/object_performance_plots/V30/muon_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V30/muon_trigger.yaml b/configs/object_performance_plots/V30/muon_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/muon_trigger.yaml rename to configs/object_performance_plots/V30/muon_trigger.yaml diff --git a/objectPerformance/cfg_plots/V30/photon_iso.yaml b/configs/object_performance_plots/V30/photon_iso.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/photon_iso.yaml rename to configs/object_performance_plots/V30/photon_iso.yaml diff --git a/objectPerformance/cfg_plots/V30/photons_matching.yaml b/configs/object_performance_plots/V30/photons_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/photons_matching.yaml rename to configs/object_performance_plots/V30/photons_matching.yaml diff --git a/objectPerformance/cfg_plots/V30/photons_matching_eta.yaml b/configs/object_performance_plots/V30/photons_matching_eta.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/photons_matching_eta.yaml rename to configs/object_performance_plots/V30/photons_matching_eta.yaml diff --git a/objectPerformance/cfg_plots/V30/photons_trigger.yaml b/configs/object_performance_plots/V30/photons_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/photons_trigger.yaml rename to configs/object_performance_plots/V30/photons_trigger.yaml diff --git a/objectPerformance/cfg_plots/V30/tau_matching.yaml b/configs/object_performance_plots/V30/tau_matching.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/tau_matching.yaml rename to configs/object_performance_plots/V30/tau_matching.yaml diff --git a/objectPerformance/cfg_plots/V30/tau_matching_wHH.yaml b/configs/object_performance_plots/V30/tau_matching_wHH.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/tau_matching_wHH.yaml rename to configs/object_performance_plots/V30/tau_matching_wHH.yaml diff --git a/objectPerformance/cfg_plots/V30/tau_trigger.yaml b/configs/object_performance_plots/V30/tau_trigger.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/tau_trigger.yaml rename to configs/object_performance_plots/V30/tau_trigger.yaml diff --git a/objectPerformance/cfg_plots/V30/version_comparison.yaml b/configs/object_performance_plots/V30/version_comparison.yaml similarity index 100% rename from objectPerformance/cfg_plots/V30/version_comparison.yaml rename to configs/object_performance_plots/V30/version_comparison.yaml diff --git a/objectPerformance/cfg_plots/scaling_thresholds.yaml b/configs/object_performance_plots/scaling_thresholds.yaml similarity index 100% rename from objectPerformance/cfg_plots/scaling_thresholds.yaml rename to configs/object_performance_plots/scaling_thresholds.yaml diff --git a/objectPerformance/Details.md b/docs/object-performance-details.md similarity index 100% rename from objectPerformance/Details.md rename to docs/object-performance-details.md diff --git a/objectPerformance/README.md b/docs/object-performance.md similarity index 100% rename from objectPerformance/README.md rename to docs/object-performance.md diff --git a/objectPerformance/src/cache_objects.py b/menu_tools/caching/cache_objects.py similarity index 100% rename from objectPerformance/src/cache_objects.py rename to menu_tools/caching/cache_objects.py diff --git a/objectPerformance/src/__init__.py b/menu_tools/object_performance/__init__.py similarity index 100% rename from objectPerformance/src/__init__.py rename to menu_tools/object_performance/__init__.py diff --git a/objectPerformance/src/compare_json.ipynb b/menu_tools/object_performance/compare_json.ipynb similarity index 100% rename from objectPerformance/src/compare_json.ipynb rename to menu_tools/object_performance/compare_json.ipynb diff --git a/objectPerformance/src/compare_plots.py b/menu_tools/object_performance/compare_plots.py similarity index 100% rename from objectPerformance/src/compare_plots.py rename to menu_tools/object_performance/compare_plots.py diff --git a/objectPerformance/src/plotBTagEfficiency.py b/menu_tools/object_performance/plotBTagEfficiency.py similarity index 100% rename from objectPerformance/src/plotBTagEfficiency.py rename to menu_tools/object_performance/plotBTagEfficiency.py diff --git a/objectPerformance/src/plot_config.py b/menu_tools/object_performance/plot_config.py similarity index 100% rename from objectPerformance/src/plot_config.py rename to menu_tools/object_performance/plot_config.py diff --git a/objectPerformance/src/plotter.py b/menu_tools/object_performance/plotter.py similarity index 100% rename from objectPerformance/src/plotter.py rename to menu_tools/object_performance/plotter.py diff --git a/objectPerformance/src/quality_obj.py b/menu_tools/object_performance/quality_obj.py similarity index 100% rename from objectPerformance/src/quality_obj.py rename to menu_tools/object_performance/quality_obj.py diff --git a/objectPerformance/src/scaling_collection.py b/menu_tools/object_performance/scaling_collection.py similarity index 100% rename from objectPerformance/src/scaling_collection.py rename to menu_tools/object_performance/scaling_collection.py diff --git a/objectPerformance/tests/__init__.py b/menu_tools/object_performance/tests/__init__.py similarity index 100% rename from objectPerformance/tests/__init__.py rename to menu_tools/object_performance/tests/__init__.py diff --git a/objectPerformance/tests/conftest.py b/menu_tools/object_performance/tests/conftest.py similarity index 100% rename from objectPerformance/tests/conftest.py rename to menu_tools/object_performance/tests/conftest.py diff --git a/objectPerformance/tests/test_integration.py b/menu_tools/object_performance/tests/test_integration.py similarity index 100% rename from objectPerformance/tests/test_integration.py rename to menu_tools/object_performance/tests/test_integration.py diff --git a/objectPerformance/tests/test_turnon_collection.py b/menu_tools/object_performance/tests/test_turnon_collection.py similarity index 100% rename from objectPerformance/tests/test_turnon_collection.py rename to menu_tools/object_performance/tests/test_turnon_collection.py diff --git a/objectPerformance/tests/test_utils.py b/menu_tools/object_performance/tests/test_utils.py similarity index 100% rename from objectPerformance/tests/test_utils.py rename to menu_tools/object_performance/tests/test_utils.py diff --git a/objectPerformance/src/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py similarity index 100% rename from objectPerformance/src/turnon_collection.py rename to menu_tools/object_performance/turnon_collection.py diff --git a/objectPerformance/src/utils.py b/menu_tools/utils/utils.py similarity index 100% rename from objectPerformance/src/utils.py rename to menu_tools/utils/utils.py diff --git a/objectPerformance/pyproject.toml b/pyproject.toml similarity index 100% rename from objectPerformance/pyproject.toml rename to pyproject.toml From 514558a84b64d5705f045602d99c0479d26eedb2 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 15 Jan 2024 17:23:45 +0100 Subject: [PATCH 022/140] fix caching after move to menu_tools submodule --- menu_tools/caching/__init__.py | 0 menu_tools/caching/cache_objects.py | 13 +++++-------- 2 files changed, 5 insertions(+), 8 deletions(-) create mode 100644 menu_tools/caching/__init__.py diff --git a/menu_tools/caching/__init__.py b/menu_tools/caching/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/menu_tools/caching/cache_objects.py b/menu_tools/caching/cache_objects.py index 07ce9ebf..28b8b179 100755 --- a/menu_tools/caching/cache_objects.py +++ b/menu_tools/caching/cache_objects.py @@ -9,9 +9,7 @@ import vector import yaml -from utils import get_pdg_id -from utils import get_branches -from utils import timer +from menu_tools.utils import utils vector.register_awkward() @@ -38,7 +36,7 @@ def __init__(self, version, sample, obj, tree, branches, cfg_file, self._dryrun = dryrun # Get Branches if not isinstance(branches, list): - self._branches = get_branches(self._ntuple_path, tree, obj) + self._branches = utils.get_branches(self._ntuple_path, tree, obj) else: self._branches = branches self.cache_out_path = f"cache/{version}/" @@ -169,7 +167,7 @@ def _filter_genpart_branches(self, all_arrays): Filter genparticle branches by Id. """ partId = abs(all_arrays["Id"]) - sel_id = (partId == get_pdg_id(self._part_type)) + sel_id = (partId == utils.get_pdg_id(self._part_type)) for branch in all_arrays: all_arrays[branch] = all_arrays[branch][sel_id] all_arrays[branch] = ak.fill_none(all_arrays[branch], -999) @@ -263,7 +261,7 @@ def _ak_array_in_chunk(self, arr, chunk_array, branches): ) return arr - @timer("Loading objects files") + @utils.timer("Loading objects files") def _concat_array_from_ntuples(self): fnames = glob.glob(self._ntuple_path)[:] bar = IncrementalBar("Progress", max=len(fnames)) @@ -343,8 +341,7 @@ def load(self): parser = argparse.ArgumentParser() parser.add_argument( "cfg", - default="cfg_caching/V22.yaml", - help="" + help="Path to the config file in yaml format. Defaults in `configs/caching`." ) parser.add_argument( "--dry-run", From ce5332f71842f7d24f9d065b3b475f1b795ae4b7 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 15 Jan 2024 17:44:52 +0100 Subject: [PATCH 023/140] fix object performance plotting after move to menu_tools submodule --- .gitignore | 5 ++- .../object_performance/compare_plots.py | 8 ++--- .../object_performance/plotBTagEfficiency.py | 2 +- menu_tools/object_performance/plotter.py | 34 +++++++++++-------- .../object_performance/scaling_collection.py | 4 +-- .../object_performance/turnon_collection.py | 6 ++-- 6 files changed, 31 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index 1d9df5e1..f47363bb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,10 +2,9 @@ **/*.png **/.DS_Store **/*.parquet -**/rates.py -objectPerformance/**/*.root -objectPerformance/outputs/**/* +**/*.root rates/table/out/* rates/table/cache/**/* rates/table/lib/* **/tmp/* +outputs diff --git a/menu_tools/object_performance/compare_plots.py b/menu_tools/object_performance/compare_plots.py index 54f69f6e..1cdd70ba 100755 --- a/menu_tools/object_performance/compare_plots.py +++ b/menu_tools/object_performance/compare_plots.py @@ -9,10 +9,10 @@ import yaml import json -from turnon_collection import TurnOnCollection -from scaling_collection import ScalingCollection -from plotter import Plotter -import utils +from menu_tools.object_performance.turnon_collection import TurnOnCollection +from menu_tools.object_performance.scaling_collection import ScalingCollection +from menu_tools.object_performance.plotter import Plotter +from menu_tools.utils import utils plt.style.use(hep.style.CMS) diff --git a/menu_tools/object_performance/plotBTagEfficiency.py b/menu_tools/object_performance/plotBTagEfficiency.py index 6123c22a..2b43f586 100755 --- a/menu_tools/object_performance/plotBTagEfficiency.py +++ b/menu_tools/object_performance/plotBTagEfficiency.py @@ -8,7 +8,7 @@ import yaml import json -from plotter import Plotter +from menu_tools.object_performance.plotter import Plotter plt.style.use(hep.style.CMS) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index c08a09ef..b8a568ea 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -9,9 +9,9 @@ import yaml import json -from turnon_collection import TurnOnCollection -from scaling_collection import ScalingCollection -import utils +from menu_tools.object_performance.turnon_collection import TurnOnCollection +from menu_tools.object_performance.scaling_collection import ScalingCollection +from menu_tools.utils import utils plt.style.use(hep.style.CMS) @@ -19,10 +19,12 @@ class Plotter(): + outdir = "outputs/object_performance/" + def _make_output_dirs(self, version: str): - os.makedirs(f"outputs/{version}/turnons", exist_ok=True) - os.makedirs(f"outputs/{version}/distributions", exist_ok=True) - os.makedirs(f"outputs/{version}/scalings", exist_ok=True) + os.makedirs(f"{self.outdir}/{version}/turnons", exist_ok=True) + os.makedirs(f"{self.outdir}/{version}/distributions", exist_ok=True) + os.makedirs(f"{self.outdir}/{version}/scalings", exist_ok=True) def _create_new_plot(self): fig, ax = plt.subplots(figsize=(10, 10)) @@ -151,7 +153,7 @@ def _plot_efficiency_curve(self): self._style_plot(fig, ax) ax.set_ylim(0, 1.1) - plot_fname = f"outputs/{self.version}/turnons/{self.plot_name}_{self.turnon_collection.threshold}_{self.version}" + plot_fname = f"{self.outdir}/{self.version}/turnons/{self.plot_name}_{self.turnon_collection.threshold}_{self.version}" for ext in [".png",".pdf"]: plt.savefig(f"{plot_fname}{ext}") self._save_json(f"{plot_fname}.json") @@ -184,7 +186,7 @@ def _plot_iso_vs_efficiency_curve(self): self._style_plot(fig, ax) - plot_fname = f"outputs/{self.version}/turnons/{self.plot_name}_{self.turnon_collection.threshold}_{self.version}" + plot_fname = f"{self.outdir}/{self.version}/turnons/{self.plot_name}_{self.turnon_collection.threshold}_{self.version}" for ext in [".png",".pdf"]: plt.savefig(f"{plot_fname}{ext}") self._save_json(f"{plot_fname}.json") @@ -222,7 +224,7 @@ def _plot_raw_counts(self): color=test_hist[0].get_color(), **err_kwargs) self._style_plot(fig, ax) - plot_fname = f"outputs/{self.version}/distributions/{self.plot_name}_{self.turnon_collection.threshold}_dist_{self.version}" + plot_fname = f"{self.outdir}/{self.version}/distributions/{self.plot_name}_{self.turnon_collection.threshold}_dist_{self.version}" for ext in [".png",".pdf"]: plt.savefig(f"{plot_fname}{ext}") #self._save_json(f"{plot_fname}.json") @@ -308,7 +310,7 @@ def _set_plot_ranges(self, ax): ax.set_ylim(0, ymax) def _save_json(self, file_name): - # file_name = = f"outputs/{self.version}/scalings/{self.plot_name}.json" + # file_name = = f"{self.outdir}/{self.version}/scalings/{self.plot_name}.json" plot = {} watermark = f"{self.version}_{self.plot_name}" @@ -360,7 +362,7 @@ def plot(self): self._set_plot_ranges(ax) fig.tight_layout() - plot_fname = f"outputs/{self.version}/scalings/{self.plot_name}_{self.version}" + plot_fname = f"{self.outdir}/{self.version}/scalings/{self.plot_name}_{self.version}" for ext in [".png",".pdf"]: plt.savefig(f"{plot_fname}{ext}") self._save_json(f"{plot_fname}.json") @@ -372,12 +374,14 @@ def plot(self): plt.close() -class ScalingCentral(): +class ScalingCentral: + + outdir = "outputs/object_performance/" def __init__(self, cfg_plots_path): with open(cfg_plots_path, 'r') as f: self.cfg_plots = yaml.safe_load(f) - with open("./cfg_plots/scaling_thresholds.yaml", 'r') as f: + with open("./configs/object_performance_plots/scaling_thresholds.yaml", 'r') as f: self.scaling_thresholds = yaml.safe_load(f) def _get_scaling_thresholds(self, cfg_plot, test_obj): @@ -411,10 +415,10 @@ def _write_scalings_to_file(self, plot_name: str, version: str, params: dict): - with open(f"outputs/{version}/scalings/{plot_name}_scalings_{version}.txt", 'w+') as f: + with open(f"{self.outdir}/{version}/scalings/{plot_name}_scalings_{version}.txt", 'w+') as f: f.write('') - with open(f"outputs/{version}/scalings/{plot_name}_scalings_{version}.txt", 'a') as f: + with open(f"{self.outdir}/{version}/scalings/{plot_name}_scalings_{version}.txt", 'a') as f: for obj, obj_params in params.items(): a, b = obj_params f.write(self._rate_config_function(obj, a, b) + "\n") diff --git a/menu_tools/object_performance/scaling_collection.py b/menu_tools/object_performance/scaling_collection.py index a3f3cee0..3fab8a95 100644 --- a/menu_tools/object_performance/scaling_collection.py +++ b/menu_tools/object_performance/scaling_collection.py @@ -2,8 +2,8 @@ from scipy.optimize import curve_fit import numpy as np -from plot_config import PlotConfig -import utils +from menu_tools.object_performance.plot_config import PlotConfig +from menu_tools.utils import utils class ScalingCollection(): diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index 4741e37f..38806cfe 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -4,9 +4,9 @@ import numpy as np import vector -from plot_config import PlotConfig -from quality_obj import Quality, L1IsoCut -import utils +from menu_tools.object_performance.plot_config import PlotConfig +from menu_tools.object_performance.quality_obj import Quality, L1IsoCut +from menu_tools.utils import utils vector.register_awkward() From adc2df34c7dce626b8591f395402b5b4b19ed107 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 15 Jan 2024 18:05:02 +0100 Subject: [PATCH 024/140] move caching yamls to dir where version dir is on higher level --- configs/{caching/V22.yaml => V22/caching.yaml} | 0 configs/{caching/V26.yaml => V26/caching.yaml} | 0 configs/{caching/V27.yaml => V27/caching.yaml} | 0 configs/{caching/V27_bTagNN.yaml => V27/caching_bTagNN.yaml} | 0 configs/{caching/V28.yaml => V28/caching.yaml} | 0 configs/{caching/V29.yaml => V29/caching.yaml} | 0 configs/{caching/V29_13X.yaml => V29_13X/caching.yaml} | 0 configs/{caching/V30.yaml => V30/caching.yaml} | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename configs/{caching/V22.yaml => V22/caching.yaml} (100%) rename configs/{caching/V26.yaml => V26/caching.yaml} (100%) rename configs/{caching/V27.yaml => V27/caching.yaml} (100%) rename configs/{caching/V27_bTagNN.yaml => V27/caching_bTagNN.yaml} (100%) rename configs/{caching/V28.yaml => V28/caching.yaml} (100%) rename configs/{caching/V29.yaml => V29/caching.yaml} (100%) rename configs/{caching/V29_13X.yaml => V29_13X/caching.yaml} (100%) rename configs/{caching/V30.yaml => V30/caching.yaml} (100%) diff --git a/configs/caching/V22.yaml b/configs/V22/caching.yaml similarity index 100% rename from configs/caching/V22.yaml rename to configs/V22/caching.yaml diff --git a/configs/caching/V26.yaml b/configs/V26/caching.yaml similarity index 100% rename from configs/caching/V26.yaml rename to configs/V26/caching.yaml diff --git a/configs/caching/V27.yaml b/configs/V27/caching.yaml similarity index 100% rename from configs/caching/V27.yaml rename to configs/V27/caching.yaml diff --git a/configs/caching/V27_bTagNN.yaml b/configs/V27/caching_bTagNN.yaml similarity index 100% rename from configs/caching/V27_bTagNN.yaml rename to configs/V27/caching_bTagNN.yaml diff --git a/configs/caching/V28.yaml b/configs/V28/caching.yaml similarity index 100% rename from configs/caching/V28.yaml rename to configs/V28/caching.yaml diff --git a/configs/caching/V29.yaml b/configs/V29/caching.yaml similarity index 100% rename from configs/caching/V29.yaml rename to configs/V29/caching.yaml diff --git a/configs/caching/V29_13X.yaml b/configs/V29_13X/caching.yaml similarity index 100% rename from configs/caching/V29_13X.yaml rename to configs/V29_13X/caching.yaml diff --git a/configs/caching/V30.yaml b/configs/V30/caching.yaml similarity index 100% rename from configs/caching/V30.yaml rename to configs/V30/caching.yaml From 26163008016e7ad4411a07c31fb1dd793b7acbd1 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 15 Jan 2024 18:14:32 +0100 Subject: [PATCH 025/140] move object performance yamls to dir where version dir is on higher level --- .../V22 => V22/object_performance}/electron_iso.yaml | 0 .../V22 => V22/object_performance}/electron_matching.yaml | 0 .../V22 => V22/object_performance}/electron_matching_eta.yaml | 0 .../V22 => V22/object_performance}/electron_trigger.yaml | 0 .../V22 => V22/object_performance}/jets_matching_eta.yaml | 0 .../V22 => V22/object_performance}/jets_trigger.yaml | 0 .../V22 => V22/object_performance}/met_ht_mht.yaml | 0 .../V22 => V22/object_performance}/met_ht_mht_trigger.yaml | 0 .../V22 => V22/object_performance}/mht.yaml | 0 .../V22 => V22/object_performance}/mht_comparison.yaml | 0 .../V22 => V22/object_performance}/muon_matching.yaml | 0 .../V22 => V22/object_performance}/muon_matching_eta.yaml | 0 .../V22 => V22/object_performance}/muon_trigger.yaml | 0 .../V22 => V22/object_performance}/photon_iso.yaml | 0 .../V22 => V22/object_performance}/tau_matching.yaml | 0 .../V22 => V22/object_performance}/tau_matching_GG_VBF.yaml | 0 .../V22 => V22/object_performance}/tau_trigger.yaml | 0 .../V22 => V22/object_performance}/version_comparison.yaml | 0 .../V26 => V26/object_performance}/electron_iso.yaml | 0 .../V26 => V26/object_performance}/electron_matching.yaml | 0 .../V26 => V26/object_performance}/electron_matching_eta.yaml | 0 .../object_performance}/electron_matching_eta_test.yaml | 0 .../V26 => V26/object_performance}/electron_trigger.yaml | 0 .../V26 => V26/object_performance}/jets_matching_eta.yaml | 0 .../V26 => V26/object_performance}/jets_trigger.yaml | 0 .../V26 => V26/object_performance}/met_ht_mht.yaml | 0 .../V26 => V26/object_performance}/muon_matching.yaml | 0 .../V26 => V26/object_performance}/muon_matching_eta.yaml | 0 .../V26 => V26/object_performance}/muon_trigger.yaml | 0 .../V26 => V26/object_performance}/photon_iso.yaml | 0 .../V26 => V26/object_performance}/photons_matching_eta.yaml | 0 .../object_performance}/photons_matching_eta_iso.yaml | 0 .../V26 => V26/object_performance}/scaling_thresholds.yaml | 0 .../V26 => V26/object_performance}/tau_matching.yaml | 0 .../V26 => V26/object_performance}/tau_trigger.yaml | 0 .../V27 => V27/object_performance}/electron_iso.yaml | 0 .../V27 => V27/object_performance}/electron_matching.yaml | 0 .../V27 => V27/object_performance}/electron_matching_eta.yaml | 0 .../object_performance}/electron_matching_eta_test.yaml | 0 .../V27 => V27/object_performance}/electron_trigger.yaml | 0 .../V27 => V27/object_performance}/jets_matching.yaml | 0 .../V27 => V27/object_performance}/jets_matching_eta.yaml | 0 .../V27 => V27/object_performance}/jets_trigger.yaml | 0 .../V27 => V27/object_performance}/jets_trigger_fwd.yaml | 0 .../V27 => V27/object_performance}/met_ht_mht.yaml | 0 .../V27 => V27/object_performance}/mht.yaml | 0 .../V27 => V27/object_performance}/muon_matching.yaml | 0 .../V27 => V27/object_performance}/muon_matching_eta.yaml | 0 .../V27 => V27/object_performance}/muon_trigger.yaml | 0 .../V27 => V27/object_performance}/photon_iso.yaml | 0 .../V27 => V27/object_performance}/photons_matching.yaml | 0 .../V27 => V27/object_performance}/photons_matching_eta.yaml | 0 .../object_performance}/photons_matching_eta_iso.yaml | 0 .../V27 => V27/object_performance}/photons_trigger.yaml | 0 .../V27 => V27/object_performance}/scaling_thresholds.yaml | 0 .../V27 => V27/object_performance}/tau_matching.yaml | 0 .../V27 => V27/object_performance}/tau_matching_wHH.yaml | 0 .../V27 => V27/object_performance}/tau_trigger.yaml | 0 .../V27 => V27/object_performance}/version_comparison.yaml | 0 .../V28 => V28/object_performance}/electron_iso.yaml | 0 .../V28 => V28/object_performance}/electron_matching.yaml | 0 .../V28 => V28/object_performance}/electron_matching_eta | 0 .../V28 => V28/object_performance}/electron_matching_eta.yaml | 0 .../object_performance}/electron_matching_eta_test.yaml | 0 .../V28 => V28/object_performance}/electron_matching_new.yaml | 0 .../V28 => V28/object_performance}/electron_trigger.yaml | 0 .../V28 => V28/object_performance}/jets_matching.yaml | 0 .../V28 => V28/object_performance}/jets_matching_eta.yaml | 0 .../V28 => V28/object_performance}/jets_trigger.yaml | 0 .../V28 => V28/object_performance}/jets_trigger_fwd.yaml | 0 .../V28 => V28/object_performance}/met_ht_mht.yaml | 0 .../V28 => V28/object_performance}/muon_matching.yaml | 0 .../V28 => V28/object_performance}/muon_matching_eta.yaml | 0 .../V28 => V28/object_performance}/muon_trigger.yaml | 0 .../V28 => V28/object_performance}/photon_iso.yaml | 0 .../V28 => V28/object_performance}/photons_matching.yaml | 0 .../V28 => V28/object_performance}/photons_matching_eta.yaml | 0 .../object_performance}/photons_matching_eta_IDtest.yaml | 0 .../object_performance}/photons_matching_eta_iso.yaml | 0 .../V28 => V28/object_performance}/photons_trigger.yaml | 0 .../V28 => V28/object_performance}/scaling_thresholds.yaml | 0 .../V28 => V28/object_performance}/tau_matching.yaml | 0 .../V28 => V28/object_performance}/tau_matching_wHH.yaml | 0 .../V28 => V28/object_performance}/tau_trigger.yaml | 0 .../V28 => V28/object_performance}/version_comparison.yaml | 0 .../V29 => V29/object_performance}/bJetEff.yaml | 0 .../V29 => V29/object_performance}/electron_iso.yaml | 0 .../V29 => V29/object_performance}/electron_matching.yaml | 0 .../V29 => V29/object_performance}/electron_matching_eta.yaml | 0 .../V29 => V29/object_performance}/electron_trigger.yaml | 0 .../V29 => V29/object_performance}/jets_matching.yaml | 0 .../V29 => V29/object_performance}/jets_matching_eta.yaml | 0 .../V29 => V29/object_performance}/jets_matching_wBTag.yaml | 0 .../V29 => V29/object_performance}/jets_trigger.yaml | 0 .../V29 => V29/object_performance}/jets_trigger_fwd.yaml | 0 .../V29 => V29/object_performance}/met_ht_mht.yaml | 0 .../V29 => V29/object_performance}/mht.yaml | 0 .../V29 => V29/object_performance}/muon_matching.yaml | 0 .../V29 => V29/object_performance}/muon_matching_eta.yaml | 0 .../V29 => V29/object_performance}/muon_trigger.yaml | 0 .../V29 => V29/object_performance}/photon_iso.yaml | 0 .../V29 => V29/object_performance}/photons_matching.yaml | 0 .../V29 => V29/object_performance}/photons_matching_eta.yaml | 0 .../V29 => V29/object_performance}/photons_trigger.yaml | 0 .../V29 => V29/object_performance}/slim/.backups/.cele.yaml~ | 0 .../V29 => V29/object_performance}/slim/cele.yaml | 0 .../V29 => V29/object_performance}/slim/cjet.yaml | 0 .../V29 => V29/object_performance}/slim/compare_gammas.yaml | 0 .../V29 => V29/object_performance}/slim/compare_jets.yaml | 0 .../V29 => V29/object_performance}/slim/compare_mus.yaml | 0 .../V29 => V29/object_performance}/slim/comparisons.yaml | 0 .../object_performance}/slim/egamma_trigger_inclusive.yaml | 0 .../slim/egamma_trigger_tkiso_inclusive.yaml | 0 .../V29 => V29/object_performance}/slim/ele_test.yaml | 0 .../V29 => V29/object_performance}/slim/electron_matching.yaml | 0 .../object_performance}/slim/electrons_comparisons.yaml | 0 .../V29 => V29/object_performance}/slim/jets_matching.yaml | 0 .../V29 => V29/object_performance}/slim/jets_matching_eta.yaml | 0 .../object_performance}/slim/jets_trigger_inclusive.yaml | 0 .../object_performance}/slim/jets_trigger_sc_inclusive.yaml | 0 .../V29 => V29/object_performance}/slim/met.yaml | 0 .../V29 => V29/object_performance}/slim/muon_matching.yaml | 0 .../object_performance}/slim/muon_trigger_gmtTK_inclusive.yaml | 0 .../object_performance}/slim/muon_trigger_inclusive.yaml | 0 .../V29 => V29/object_performance}/slim/pho_test.yaml | 0 .../V29 => V29/object_performance}/slim/photons_matching.yaml | 0 .../V29 => V29/object_performance}/slim/tau_matching.yaml | 0 .../V29 => V29/object_performance}/slim/tau_matching_eta.yaml | 0 .../object_performance}/slim/tau_trigger_inclusive.yaml | 0 .../V29 => V29/object_performance}/tau_matching.yaml | 0 .../V29 => V29/object_performance}/tau_matching_wHH.yaml | 0 .../V29 => V29/object_performance}/tau_trigger.yaml | 0 .../V29 => V29/object_performance}/version_comparison.yaml | 0 .../V29_13X => V29_13X/object_performance}/bJetEff.yaml | 0 .../V29_13X => V29_13X/object_performance}/electron_iso.yaml | 0 .../object_performance}/electron_matching.yaml | 0 .../object_performance}/electron_matching_eta.yaml | 0 .../object_performance}/electron_trigger.yaml | 0 .../V29_13X => V29_13X/object_performance}/ht_test.yaml | 0 .../V29_13X => V29_13X/object_performance}/jets_matching.yaml | 0 .../object_performance}/jets_matching_eta.yaml | 0 .../V29_13X => V29_13X/object_performance}/jets_trigger.yaml | 0 .../object_performance}/jets_trigger_fwd.yaml | 0 .../V29_13X => V29_13X/object_performance}/met_ht_mht.yaml | 0 .../V29_13X => V29_13X/object_performance}/mht.yaml | 0 .../V29_13X => V29_13X/object_performance}/muon_matching.yaml | 0 .../object_performance}/muon_matching_eta.yaml | 0 .../V29_13X => V29_13X/object_performance}/muon_trigger.yaml | 0 .../V29_13X => V29_13X/object_performance}/photon_iso.yaml | 0 .../object_performance}/photons_matching.yaml | 0 .../object_performance}/photons_matching_eta.yaml | 0 .../V29_13X => V29_13X/object_performance}/photons_trigger.yaml | 0 .../V29_13X => V29_13X/object_performance}/tau_matching.yaml | 0 .../V29_13X => V29_13X/object_performance}/tau_trigger.yaml | 0 .../object_performance}/tests/electron_iso_Hgg.yaml | 0 .../object_performance}/tests/tau_matching_TT.yaml | 0 .../object_performance}/tests/tau_trigger_TT.yaml | 0 .../object_performance}/version_comparison.yaml | 0 .../V30 => V30/object_performance}/bJetEff.yaml | 0 .../V30 => V30/object_performance}/electron_iso.yaml | 0 .../V30 => V30/object_performance}/electron_matching.yaml | 0 .../V30 => V30/object_performance}/electron_matching_eta.yaml | 0 .../V30 => V30/object_performance}/electron_trigger.yaml | 0 .../V30 => V30/object_performance}/ht_test.yaml | 0 .../V30 => V30/object_performance}/jets_matching.yaml | 0 .../V30 => V30/object_performance}/jets_matching_eta.yaml | 0 .../V30 => V30/object_performance}/jets_matching_wBTag.yaml | 0 .../V30 => V30/object_performance}/jets_trigger.yaml | 0 .../V30 => V30/object_performance}/jets_trigger_fwd.yaml | 0 .../V30 => V30/object_performance}/met_ht_mht.yaml | 0 .../V30 => V30/object_performance}/mht.yaml | 0 .../V30 => V30/object_performance}/muon_matching.yaml | 0 .../V30 => V30/object_performance}/muon_matching_eta.yaml | 0 .../V30 => V30/object_performance}/muon_trigger.yaml | 0 .../V30 => V30/object_performance}/photon_iso.yaml | 0 .../V30 => V30/object_performance}/photons_matching.yaml | 0 .../V30 => V30/object_performance}/photons_matching_eta.yaml | 0 .../V30 => V30/object_performance}/photons_trigger.yaml | 0 .../V30 => V30/object_performance}/tau_matching.yaml | 0 .../V30 => V30/object_performance}/tau_matching_wHH.yaml | 0 .../V30 => V30/object_performance}/tau_trigger.yaml | 0 .../V30 => V30/object_performance}/version_comparison.yaml | 0 configs/{object_performance_plots => }/scaling_thresholds.yaml | 0 menu_tools/object_performance/plotter.py | 2 +- 184 files changed, 1 insertion(+), 1 deletion(-) rename configs/{object_performance_plots/V22 => V22/object_performance}/electron_iso.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/electron_matching.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/electron_matching_eta.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/electron_trigger.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/jets_matching_eta.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/jets_trigger.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/met_ht_mht.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/met_ht_mht_trigger.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/mht.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/mht_comparison.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/muon_matching.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/muon_matching_eta.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/muon_trigger.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/photon_iso.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/tau_matching.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/tau_matching_GG_VBF.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/tau_trigger.yaml (100%) rename configs/{object_performance_plots/V22 => V22/object_performance}/version_comparison.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/electron_iso.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/electron_matching.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/electron_matching_eta.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/electron_matching_eta_test.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/electron_trigger.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/jets_matching_eta.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/jets_trigger.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/met_ht_mht.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/muon_matching.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/muon_matching_eta.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/muon_trigger.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/photon_iso.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/photons_matching_eta.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/photons_matching_eta_iso.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/scaling_thresholds.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/tau_matching.yaml (100%) rename configs/{object_performance_plots/V26 => V26/object_performance}/tau_trigger.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/electron_iso.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/electron_matching.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/electron_matching_eta.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/electron_matching_eta_test.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/electron_trigger.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/jets_matching.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/jets_matching_eta.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/jets_trigger.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/jets_trigger_fwd.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/met_ht_mht.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/mht.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/muon_matching.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/muon_matching_eta.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/muon_trigger.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/photon_iso.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/photons_matching.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/photons_matching_eta.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/photons_matching_eta_iso.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/photons_trigger.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/scaling_thresholds.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/tau_matching.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/tau_matching_wHH.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/tau_trigger.yaml (100%) rename configs/{object_performance_plots/V27 => V27/object_performance}/version_comparison.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/electron_iso.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/electron_matching.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/electron_matching_eta (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/electron_matching_eta.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/electron_matching_eta_test.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/electron_matching_new.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/electron_trigger.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/jets_matching.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/jets_matching_eta.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/jets_trigger.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/jets_trigger_fwd.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/met_ht_mht.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/muon_matching.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/muon_matching_eta.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/muon_trigger.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/photon_iso.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/photons_matching.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/photons_matching_eta.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/photons_matching_eta_IDtest.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/photons_matching_eta_iso.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/photons_trigger.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/scaling_thresholds.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/tau_matching.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/tau_matching_wHH.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/tau_trigger.yaml (100%) rename configs/{object_performance_plots/V28 => V28/object_performance}/version_comparison.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/bJetEff.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/electron_iso.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/electron_matching.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/electron_matching_eta.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/electron_trigger.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/jets_matching.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/jets_matching_eta.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/jets_matching_wBTag.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/jets_trigger.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/jets_trigger_fwd.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/met_ht_mht.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/mht.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/muon_matching.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/muon_matching_eta.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/muon_trigger.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/photon_iso.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/photons_matching.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/photons_matching_eta.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/photons_trigger.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/.backups/.cele.yaml~ (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/cele.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/cjet.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/compare_gammas.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/compare_jets.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/compare_mus.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/comparisons.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/egamma_trigger_inclusive.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/egamma_trigger_tkiso_inclusive.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/ele_test.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/electron_matching.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/electrons_comparisons.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/jets_matching.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/jets_matching_eta.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/jets_trigger_inclusive.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/jets_trigger_sc_inclusive.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/met.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/muon_matching.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/muon_trigger_gmtTK_inclusive.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/muon_trigger_inclusive.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/pho_test.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/photons_matching.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/tau_matching.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/tau_matching_eta.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/slim/tau_trigger_inclusive.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/tau_matching.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/tau_matching_wHH.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/tau_trigger.yaml (100%) rename configs/{object_performance_plots/V29 => V29/object_performance}/version_comparison.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/bJetEff.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/electron_iso.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/electron_matching.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/electron_matching_eta.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/electron_trigger.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/ht_test.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/jets_matching.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/jets_matching_eta.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/jets_trigger.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/jets_trigger_fwd.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/met_ht_mht.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/mht.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/muon_matching.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/muon_matching_eta.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/muon_trigger.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/photon_iso.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/photons_matching.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/photons_matching_eta.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/photons_trigger.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/tau_matching.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/tau_trigger.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/tests/electron_iso_Hgg.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/tests/tau_matching_TT.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/tests/tau_trigger_TT.yaml (100%) rename configs/{object_performance_plots/V29_13X => V29_13X/object_performance}/version_comparison.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/bJetEff.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/electron_iso.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/electron_matching.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/electron_matching_eta.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/electron_trigger.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/ht_test.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/jets_matching.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/jets_matching_eta.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/jets_matching_wBTag.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/jets_trigger.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/jets_trigger_fwd.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/met_ht_mht.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/mht.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/muon_matching.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/muon_matching_eta.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/muon_trigger.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/photon_iso.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/photons_matching.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/photons_matching_eta.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/photons_trigger.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/tau_matching.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/tau_matching_wHH.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/tau_trigger.yaml (100%) rename configs/{object_performance_plots/V30 => V30/object_performance}/version_comparison.yaml (100%) rename configs/{object_performance_plots => }/scaling_thresholds.yaml (100%) diff --git a/configs/object_performance_plots/V22/electron_iso.yaml b/configs/V22/object_performance/electron_iso.yaml similarity index 100% rename from configs/object_performance_plots/V22/electron_iso.yaml rename to configs/V22/object_performance/electron_iso.yaml diff --git a/configs/object_performance_plots/V22/electron_matching.yaml b/configs/V22/object_performance/electron_matching.yaml similarity index 100% rename from configs/object_performance_plots/V22/electron_matching.yaml rename to configs/V22/object_performance/electron_matching.yaml diff --git a/configs/object_performance_plots/V22/electron_matching_eta.yaml b/configs/V22/object_performance/electron_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V22/electron_matching_eta.yaml rename to configs/V22/object_performance/electron_matching_eta.yaml diff --git a/configs/object_performance_plots/V22/electron_trigger.yaml b/configs/V22/object_performance/electron_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V22/electron_trigger.yaml rename to configs/V22/object_performance/electron_trigger.yaml diff --git a/configs/object_performance_plots/V22/jets_matching_eta.yaml b/configs/V22/object_performance/jets_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V22/jets_matching_eta.yaml rename to configs/V22/object_performance/jets_matching_eta.yaml diff --git a/configs/object_performance_plots/V22/jets_trigger.yaml b/configs/V22/object_performance/jets_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V22/jets_trigger.yaml rename to configs/V22/object_performance/jets_trigger.yaml diff --git a/configs/object_performance_plots/V22/met_ht_mht.yaml b/configs/V22/object_performance/met_ht_mht.yaml similarity index 100% rename from configs/object_performance_plots/V22/met_ht_mht.yaml rename to configs/V22/object_performance/met_ht_mht.yaml diff --git a/configs/object_performance_plots/V22/met_ht_mht_trigger.yaml b/configs/V22/object_performance/met_ht_mht_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V22/met_ht_mht_trigger.yaml rename to configs/V22/object_performance/met_ht_mht_trigger.yaml diff --git a/configs/object_performance_plots/V22/mht.yaml b/configs/V22/object_performance/mht.yaml similarity index 100% rename from configs/object_performance_plots/V22/mht.yaml rename to configs/V22/object_performance/mht.yaml diff --git a/configs/object_performance_plots/V22/mht_comparison.yaml b/configs/V22/object_performance/mht_comparison.yaml similarity index 100% rename from configs/object_performance_plots/V22/mht_comparison.yaml rename to configs/V22/object_performance/mht_comparison.yaml diff --git a/configs/object_performance_plots/V22/muon_matching.yaml b/configs/V22/object_performance/muon_matching.yaml similarity index 100% rename from configs/object_performance_plots/V22/muon_matching.yaml rename to configs/V22/object_performance/muon_matching.yaml diff --git a/configs/object_performance_plots/V22/muon_matching_eta.yaml b/configs/V22/object_performance/muon_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V22/muon_matching_eta.yaml rename to configs/V22/object_performance/muon_matching_eta.yaml diff --git a/configs/object_performance_plots/V22/muon_trigger.yaml b/configs/V22/object_performance/muon_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V22/muon_trigger.yaml rename to configs/V22/object_performance/muon_trigger.yaml diff --git a/configs/object_performance_plots/V22/photon_iso.yaml b/configs/V22/object_performance/photon_iso.yaml similarity index 100% rename from configs/object_performance_plots/V22/photon_iso.yaml rename to configs/V22/object_performance/photon_iso.yaml diff --git a/configs/object_performance_plots/V22/tau_matching.yaml b/configs/V22/object_performance/tau_matching.yaml similarity index 100% rename from configs/object_performance_plots/V22/tau_matching.yaml rename to configs/V22/object_performance/tau_matching.yaml diff --git a/configs/object_performance_plots/V22/tau_matching_GG_VBF.yaml b/configs/V22/object_performance/tau_matching_GG_VBF.yaml similarity index 100% rename from configs/object_performance_plots/V22/tau_matching_GG_VBF.yaml rename to configs/V22/object_performance/tau_matching_GG_VBF.yaml diff --git a/configs/object_performance_plots/V22/tau_trigger.yaml b/configs/V22/object_performance/tau_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V22/tau_trigger.yaml rename to configs/V22/object_performance/tau_trigger.yaml diff --git a/configs/object_performance_plots/V22/version_comparison.yaml b/configs/V22/object_performance/version_comparison.yaml similarity index 100% rename from configs/object_performance_plots/V22/version_comparison.yaml rename to configs/V22/object_performance/version_comparison.yaml diff --git a/configs/object_performance_plots/V26/electron_iso.yaml b/configs/V26/object_performance/electron_iso.yaml similarity index 100% rename from configs/object_performance_plots/V26/electron_iso.yaml rename to configs/V26/object_performance/electron_iso.yaml diff --git a/configs/object_performance_plots/V26/electron_matching.yaml b/configs/V26/object_performance/electron_matching.yaml similarity index 100% rename from configs/object_performance_plots/V26/electron_matching.yaml rename to configs/V26/object_performance/electron_matching.yaml diff --git a/configs/object_performance_plots/V26/electron_matching_eta.yaml b/configs/V26/object_performance/electron_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V26/electron_matching_eta.yaml rename to configs/V26/object_performance/electron_matching_eta.yaml diff --git a/configs/object_performance_plots/V26/electron_matching_eta_test.yaml b/configs/V26/object_performance/electron_matching_eta_test.yaml similarity index 100% rename from configs/object_performance_plots/V26/electron_matching_eta_test.yaml rename to configs/V26/object_performance/electron_matching_eta_test.yaml diff --git a/configs/object_performance_plots/V26/electron_trigger.yaml b/configs/V26/object_performance/electron_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V26/electron_trigger.yaml rename to configs/V26/object_performance/electron_trigger.yaml diff --git a/configs/object_performance_plots/V26/jets_matching_eta.yaml b/configs/V26/object_performance/jets_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V26/jets_matching_eta.yaml rename to configs/V26/object_performance/jets_matching_eta.yaml diff --git a/configs/object_performance_plots/V26/jets_trigger.yaml b/configs/V26/object_performance/jets_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V26/jets_trigger.yaml rename to configs/V26/object_performance/jets_trigger.yaml diff --git a/configs/object_performance_plots/V26/met_ht_mht.yaml b/configs/V26/object_performance/met_ht_mht.yaml similarity index 100% rename from configs/object_performance_plots/V26/met_ht_mht.yaml rename to configs/V26/object_performance/met_ht_mht.yaml diff --git a/configs/object_performance_plots/V26/muon_matching.yaml b/configs/V26/object_performance/muon_matching.yaml similarity index 100% rename from configs/object_performance_plots/V26/muon_matching.yaml rename to configs/V26/object_performance/muon_matching.yaml diff --git a/configs/object_performance_plots/V26/muon_matching_eta.yaml b/configs/V26/object_performance/muon_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V26/muon_matching_eta.yaml rename to configs/V26/object_performance/muon_matching_eta.yaml diff --git a/configs/object_performance_plots/V26/muon_trigger.yaml b/configs/V26/object_performance/muon_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V26/muon_trigger.yaml rename to configs/V26/object_performance/muon_trigger.yaml diff --git a/configs/object_performance_plots/V26/photon_iso.yaml b/configs/V26/object_performance/photon_iso.yaml similarity index 100% rename from configs/object_performance_plots/V26/photon_iso.yaml rename to configs/V26/object_performance/photon_iso.yaml diff --git a/configs/object_performance_plots/V26/photons_matching_eta.yaml b/configs/V26/object_performance/photons_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V26/photons_matching_eta.yaml rename to configs/V26/object_performance/photons_matching_eta.yaml diff --git a/configs/object_performance_plots/V26/photons_matching_eta_iso.yaml b/configs/V26/object_performance/photons_matching_eta_iso.yaml similarity index 100% rename from configs/object_performance_plots/V26/photons_matching_eta_iso.yaml rename to configs/V26/object_performance/photons_matching_eta_iso.yaml diff --git a/configs/object_performance_plots/V26/scaling_thresholds.yaml b/configs/V26/object_performance/scaling_thresholds.yaml similarity index 100% rename from configs/object_performance_plots/V26/scaling_thresholds.yaml rename to configs/V26/object_performance/scaling_thresholds.yaml diff --git a/configs/object_performance_plots/V26/tau_matching.yaml b/configs/V26/object_performance/tau_matching.yaml similarity index 100% rename from configs/object_performance_plots/V26/tau_matching.yaml rename to configs/V26/object_performance/tau_matching.yaml diff --git a/configs/object_performance_plots/V26/tau_trigger.yaml b/configs/V26/object_performance/tau_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V26/tau_trigger.yaml rename to configs/V26/object_performance/tau_trigger.yaml diff --git a/configs/object_performance_plots/V27/electron_iso.yaml b/configs/V27/object_performance/electron_iso.yaml similarity index 100% rename from configs/object_performance_plots/V27/electron_iso.yaml rename to configs/V27/object_performance/electron_iso.yaml diff --git a/configs/object_performance_plots/V27/electron_matching.yaml b/configs/V27/object_performance/electron_matching.yaml similarity index 100% rename from configs/object_performance_plots/V27/electron_matching.yaml rename to configs/V27/object_performance/electron_matching.yaml diff --git a/configs/object_performance_plots/V27/electron_matching_eta.yaml b/configs/V27/object_performance/electron_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V27/electron_matching_eta.yaml rename to configs/V27/object_performance/electron_matching_eta.yaml diff --git a/configs/object_performance_plots/V27/electron_matching_eta_test.yaml b/configs/V27/object_performance/electron_matching_eta_test.yaml similarity index 100% rename from configs/object_performance_plots/V27/electron_matching_eta_test.yaml rename to configs/V27/object_performance/electron_matching_eta_test.yaml diff --git a/configs/object_performance_plots/V27/electron_trigger.yaml b/configs/V27/object_performance/electron_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V27/electron_trigger.yaml rename to configs/V27/object_performance/electron_trigger.yaml diff --git a/configs/object_performance_plots/V27/jets_matching.yaml b/configs/V27/object_performance/jets_matching.yaml similarity index 100% rename from configs/object_performance_plots/V27/jets_matching.yaml rename to configs/V27/object_performance/jets_matching.yaml diff --git a/configs/object_performance_plots/V27/jets_matching_eta.yaml b/configs/V27/object_performance/jets_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V27/jets_matching_eta.yaml rename to configs/V27/object_performance/jets_matching_eta.yaml diff --git a/configs/object_performance_plots/V27/jets_trigger.yaml b/configs/V27/object_performance/jets_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V27/jets_trigger.yaml rename to configs/V27/object_performance/jets_trigger.yaml diff --git a/configs/object_performance_plots/V27/jets_trigger_fwd.yaml b/configs/V27/object_performance/jets_trigger_fwd.yaml similarity index 100% rename from configs/object_performance_plots/V27/jets_trigger_fwd.yaml rename to configs/V27/object_performance/jets_trigger_fwd.yaml diff --git a/configs/object_performance_plots/V27/met_ht_mht.yaml b/configs/V27/object_performance/met_ht_mht.yaml similarity index 100% rename from configs/object_performance_plots/V27/met_ht_mht.yaml rename to configs/V27/object_performance/met_ht_mht.yaml diff --git a/configs/object_performance_plots/V27/mht.yaml b/configs/V27/object_performance/mht.yaml similarity index 100% rename from configs/object_performance_plots/V27/mht.yaml rename to configs/V27/object_performance/mht.yaml diff --git a/configs/object_performance_plots/V27/muon_matching.yaml b/configs/V27/object_performance/muon_matching.yaml similarity index 100% rename from configs/object_performance_plots/V27/muon_matching.yaml rename to configs/V27/object_performance/muon_matching.yaml diff --git a/configs/object_performance_plots/V27/muon_matching_eta.yaml b/configs/V27/object_performance/muon_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V27/muon_matching_eta.yaml rename to configs/V27/object_performance/muon_matching_eta.yaml diff --git a/configs/object_performance_plots/V27/muon_trigger.yaml b/configs/V27/object_performance/muon_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V27/muon_trigger.yaml rename to configs/V27/object_performance/muon_trigger.yaml diff --git a/configs/object_performance_plots/V27/photon_iso.yaml b/configs/V27/object_performance/photon_iso.yaml similarity index 100% rename from configs/object_performance_plots/V27/photon_iso.yaml rename to configs/V27/object_performance/photon_iso.yaml diff --git a/configs/object_performance_plots/V27/photons_matching.yaml b/configs/V27/object_performance/photons_matching.yaml similarity index 100% rename from configs/object_performance_plots/V27/photons_matching.yaml rename to configs/V27/object_performance/photons_matching.yaml diff --git a/configs/object_performance_plots/V27/photons_matching_eta.yaml b/configs/V27/object_performance/photons_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V27/photons_matching_eta.yaml rename to configs/V27/object_performance/photons_matching_eta.yaml diff --git a/configs/object_performance_plots/V27/photons_matching_eta_iso.yaml b/configs/V27/object_performance/photons_matching_eta_iso.yaml similarity index 100% rename from configs/object_performance_plots/V27/photons_matching_eta_iso.yaml rename to configs/V27/object_performance/photons_matching_eta_iso.yaml diff --git a/configs/object_performance_plots/V27/photons_trigger.yaml b/configs/V27/object_performance/photons_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V27/photons_trigger.yaml rename to configs/V27/object_performance/photons_trigger.yaml diff --git a/configs/object_performance_plots/V27/scaling_thresholds.yaml b/configs/V27/object_performance/scaling_thresholds.yaml similarity index 100% rename from configs/object_performance_plots/V27/scaling_thresholds.yaml rename to configs/V27/object_performance/scaling_thresholds.yaml diff --git a/configs/object_performance_plots/V27/tau_matching.yaml b/configs/V27/object_performance/tau_matching.yaml similarity index 100% rename from configs/object_performance_plots/V27/tau_matching.yaml rename to configs/V27/object_performance/tau_matching.yaml diff --git a/configs/object_performance_plots/V27/tau_matching_wHH.yaml b/configs/V27/object_performance/tau_matching_wHH.yaml similarity index 100% rename from configs/object_performance_plots/V27/tau_matching_wHH.yaml rename to configs/V27/object_performance/tau_matching_wHH.yaml diff --git a/configs/object_performance_plots/V27/tau_trigger.yaml b/configs/V27/object_performance/tau_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V27/tau_trigger.yaml rename to configs/V27/object_performance/tau_trigger.yaml diff --git a/configs/object_performance_plots/V27/version_comparison.yaml b/configs/V27/object_performance/version_comparison.yaml similarity index 100% rename from configs/object_performance_plots/V27/version_comparison.yaml rename to configs/V27/object_performance/version_comparison.yaml diff --git a/configs/object_performance_plots/V28/electron_iso.yaml b/configs/V28/object_performance/electron_iso.yaml similarity index 100% rename from configs/object_performance_plots/V28/electron_iso.yaml rename to configs/V28/object_performance/electron_iso.yaml diff --git a/configs/object_performance_plots/V28/electron_matching.yaml b/configs/V28/object_performance/electron_matching.yaml similarity index 100% rename from configs/object_performance_plots/V28/electron_matching.yaml rename to configs/V28/object_performance/electron_matching.yaml diff --git a/configs/object_performance_plots/V28/electron_matching_eta b/configs/V28/object_performance/electron_matching_eta similarity index 100% rename from configs/object_performance_plots/V28/electron_matching_eta rename to configs/V28/object_performance/electron_matching_eta diff --git a/configs/object_performance_plots/V28/electron_matching_eta.yaml b/configs/V28/object_performance/electron_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V28/electron_matching_eta.yaml rename to configs/V28/object_performance/electron_matching_eta.yaml diff --git a/configs/object_performance_plots/V28/electron_matching_eta_test.yaml b/configs/V28/object_performance/electron_matching_eta_test.yaml similarity index 100% rename from configs/object_performance_plots/V28/electron_matching_eta_test.yaml rename to configs/V28/object_performance/electron_matching_eta_test.yaml diff --git a/configs/object_performance_plots/V28/electron_matching_new.yaml b/configs/V28/object_performance/electron_matching_new.yaml similarity index 100% rename from configs/object_performance_plots/V28/electron_matching_new.yaml rename to configs/V28/object_performance/electron_matching_new.yaml diff --git a/configs/object_performance_plots/V28/electron_trigger.yaml b/configs/V28/object_performance/electron_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V28/electron_trigger.yaml rename to configs/V28/object_performance/electron_trigger.yaml diff --git a/configs/object_performance_plots/V28/jets_matching.yaml b/configs/V28/object_performance/jets_matching.yaml similarity index 100% rename from configs/object_performance_plots/V28/jets_matching.yaml rename to configs/V28/object_performance/jets_matching.yaml diff --git a/configs/object_performance_plots/V28/jets_matching_eta.yaml b/configs/V28/object_performance/jets_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V28/jets_matching_eta.yaml rename to configs/V28/object_performance/jets_matching_eta.yaml diff --git a/configs/object_performance_plots/V28/jets_trigger.yaml b/configs/V28/object_performance/jets_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V28/jets_trigger.yaml rename to configs/V28/object_performance/jets_trigger.yaml diff --git a/configs/object_performance_plots/V28/jets_trigger_fwd.yaml b/configs/V28/object_performance/jets_trigger_fwd.yaml similarity index 100% rename from configs/object_performance_plots/V28/jets_trigger_fwd.yaml rename to configs/V28/object_performance/jets_trigger_fwd.yaml diff --git a/configs/object_performance_plots/V28/met_ht_mht.yaml b/configs/V28/object_performance/met_ht_mht.yaml similarity index 100% rename from configs/object_performance_plots/V28/met_ht_mht.yaml rename to configs/V28/object_performance/met_ht_mht.yaml diff --git a/configs/object_performance_plots/V28/muon_matching.yaml b/configs/V28/object_performance/muon_matching.yaml similarity index 100% rename from configs/object_performance_plots/V28/muon_matching.yaml rename to configs/V28/object_performance/muon_matching.yaml diff --git a/configs/object_performance_plots/V28/muon_matching_eta.yaml b/configs/V28/object_performance/muon_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V28/muon_matching_eta.yaml rename to configs/V28/object_performance/muon_matching_eta.yaml diff --git a/configs/object_performance_plots/V28/muon_trigger.yaml b/configs/V28/object_performance/muon_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V28/muon_trigger.yaml rename to configs/V28/object_performance/muon_trigger.yaml diff --git a/configs/object_performance_plots/V28/photon_iso.yaml b/configs/V28/object_performance/photon_iso.yaml similarity index 100% rename from configs/object_performance_plots/V28/photon_iso.yaml rename to configs/V28/object_performance/photon_iso.yaml diff --git a/configs/object_performance_plots/V28/photons_matching.yaml b/configs/V28/object_performance/photons_matching.yaml similarity index 100% rename from configs/object_performance_plots/V28/photons_matching.yaml rename to configs/V28/object_performance/photons_matching.yaml diff --git a/configs/object_performance_plots/V28/photons_matching_eta.yaml b/configs/V28/object_performance/photons_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V28/photons_matching_eta.yaml rename to configs/V28/object_performance/photons_matching_eta.yaml diff --git a/configs/object_performance_plots/V28/photons_matching_eta_IDtest.yaml b/configs/V28/object_performance/photons_matching_eta_IDtest.yaml similarity index 100% rename from configs/object_performance_plots/V28/photons_matching_eta_IDtest.yaml rename to configs/V28/object_performance/photons_matching_eta_IDtest.yaml diff --git a/configs/object_performance_plots/V28/photons_matching_eta_iso.yaml b/configs/V28/object_performance/photons_matching_eta_iso.yaml similarity index 100% rename from configs/object_performance_plots/V28/photons_matching_eta_iso.yaml rename to configs/V28/object_performance/photons_matching_eta_iso.yaml diff --git a/configs/object_performance_plots/V28/photons_trigger.yaml b/configs/V28/object_performance/photons_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V28/photons_trigger.yaml rename to configs/V28/object_performance/photons_trigger.yaml diff --git a/configs/object_performance_plots/V28/scaling_thresholds.yaml b/configs/V28/object_performance/scaling_thresholds.yaml similarity index 100% rename from configs/object_performance_plots/V28/scaling_thresholds.yaml rename to configs/V28/object_performance/scaling_thresholds.yaml diff --git a/configs/object_performance_plots/V28/tau_matching.yaml b/configs/V28/object_performance/tau_matching.yaml similarity index 100% rename from configs/object_performance_plots/V28/tau_matching.yaml rename to configs/V28/object_performance/tau_matching.yaml diff --git a/configs/object_performance_plots/V28/tau_matching_wHH.yaml b/configs/V28/object_performance/tau_matching_wHH.yaml similarity index 100% rename from configs/object_performance_plots/V28/tau_matching_wHH.yaml rename to configs/V28/object_performance/tau_matching_wHH.yaml diff --git a/configs/object_performance_plots/V28/tau_trigger.yaml b/configs/V28/object_performance/tau_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V28/tau_trigger.yaml rename to configs/V28/object_performance/tau_trigger.yaml diff --git a/configs/object_performance_plots/V28/version_comparison.yaml b/configs/V28/object_performance/version_comparison.yaml similarity index 100% rename from configs/object_performance_plots/V28/version_comparison.yaml rename to configs/V28/object_performance/version_comparison.yaml diff --git a/configs/object_performance_plots/V29/bJetEff.yaml b/configs/V29/object_performance/bJetEff.yaml similarity index 100% rename from configs/object_performance_plots/V29/bJetEff.yaml rename to configs/V29/object_performance/bJetEff.yaml diff --git a/configs/object_performance_plots/V29/electron_iso.yaml b/configs/V29/object_performance/electron_iso.yaml similarity index 100% rename from configs/object_performance_plots/V29/electron_iso.yaml rename to configs/V29/object_performance/electron_iso.yaml diff --git a/configs/object_performance_plots/V29/electron_matching.yaml b/configs/V29/object_performance/electron_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29/electron_matching.yaml rename to configs/V29/object_performance/electron_matching.yaml diff --git a/configs/object_performance_plots/V29/electron_matching_eta.yaml b/configs/V29/object_performance/electron_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V29/electron_matching_eta.yaml rename to configs/V29/object_performance/electron_matching_eta.yaml diff --git a/configs/object_performance_plots/V29/electron_trigger.yaml b/configs/V29/object_performance/electron_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V29/electron_trigger.yaml rename to configs/V29/object_performance/electron_trigger.yaml diff --git a/configs/object_performance_plots/V29/jets_matching.yaml b/configs/V29/object_performance/jets_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29/jets_matching.yaml rename to configs/V29/object_performance/jets_matching.yaml diff --git a/configs/object_performance_plots/V29/jets_matching_eta.yaml b/configs/V29/object_performance/jets_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V29/jets_matching_eta.yaml rename to configs/V29/object_performance/jets_matching_eta.yaml diff --git a/configs/object_performance_plots/V29/jets_matching_wBTag.yaml b/configs/V29/object_performance/jets_matching_wBTag.yaml similarity index 100% rename from configs/object_performance_plots/V29/jets_matching_wBTag.yaml rename to configs/V29/object_performance/jets_matching_wBTag.yaml diff --git a/configs/object_performance_plots/V29/jets_trigger.yaml b/configs/V29/object_performance/jets_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V29/jets_trigger.yaml rename to configs/V29/object_performance/jets_trigger.yaml diff --git a/configs/object_performance_plots/V29/jets_trigger_fwd.yaml b/configs/V29/object_performance/jets_trigger_fwd.yaml similarity index 100% rename from configs/object_performance_plots/V29/jets_trigger_fwd.yaml rename to configs/V29/object_performance/jets_trigger_fwd.yaml diff --git a/configs/object_performance_plots/V29/met_ht_mht.yaml b/configs/V29/object_performance/met_ht_mht.yaml similarity index 100% rename from configs/object_performance_plots/V29/met_ht_mht.yaml rename to configs/V29/object_performance/met_ht_mht.yaml diff --git a/configs/object_performance_plots/V29/mht.yaml b/configs/V29/object_performance/mht.yaml similarity index 100% rename from configs/object_performance_plots/V29/mht.yaml rename to configs/V29/object_performance/mht.yaml diff --git a/configs/object_performance_plots/V29/muon_matching.yaml b/configs/V29/object_performance/muon_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29/muon_matching.yaml rename to configs/V29/object_performance/muon_matching.yaml diff --git a/configs/object_performance_plots/V29/muon_matching_eta.yaml b/configs/V29/object_performance/muon_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V29/muon_matching_eta.yaml rename to configs/V29/object_performance/muon_matching_eta.yaml diff --git a/configs/object_performance_plots/V29/muon_trigger.yaml b/configs/V29/object_performance/muon_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V29/muon_trigger.yaml rename to configs/V29/object_performance/muon_trigger.yaml diff --git a/configs/object_performance_plots/V29/photon_iso.yaml b/configs/V29/object_performance/photon_iso.yaml similarity index 100% rename from configs/object_performance_plots/V29/photon_iso.yaml rename to configs/V29/object_performance/photon_iso.yaml diff --git a/configs/object_performance_plots/V29/photons_matching.yaml b/configs/V29/object_performance/photons_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29/photons_matching.yaml rename to configs/V29/object_performance/photons_matching.yaml diff --git a/configs/object_performance_plots/V29/photons_matching_eta.yaml b/configs/V29/object_performance/photons_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V29/photons_matching_eta.yaml rename to configs/V29/object_performance/photons_matching_eta.yaml diff --git a/configs/object_performance_plots/V29/photons_trigger.yaml b/configs/V29/object_performance/photons_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V29/photons_trigger.yaml rename to configs/V29/object_performance/photons_trigger.yaml diff --git a/configs/object_performance_plots/V29/slim/.backups/.cele.yaml~ b/configs/V29/object_performance/slim/.backups/.cele.yaml~ similarity index 100% rename from configs/object_performance_plots/V29/slim/.backups/.cele.yaml~ rename to configs/V29/object_performance/slim/.backups/.cele.yaml~ diff --git a/configs/object_performance_plots/V29/slim/cele.yaml b/configs/V29/object_performance/slim/cele.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/cele.yaml rename to configs/V29/object_performance/slim/cele.yaml diff --git a/configs/object_performance_plots/V29/slim/cjet.yaml b/configs/V29/object_performance/slim/cjet.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/cjet.yaml rename to configs/V29/object_performance/slim/cjet.yaml diff --git a/configs/object_performance_plots/V29/slim/compare_gammas.yaml b/configs/V29/object_performance/slim/compare_gammas.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/compare_gammas.yaml rename to configs/V29/object_performance/slim/compare_gammas.yaml diff --git a/configs/object_performance_plots/V29/slim/compare_jets.yaml b/configs/V29/object_performance/slim/compare_jets.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/compare_jets.yaml rename to configs/V29/object_performance/slim/compare_jets.yaml diff --git a/configs/object_performance_plots/V29/slim/compare_mus.yaml b/configs/V29/object_performance/slim/compare_mus.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/compare_mus.yaml rename to configs/V29/object_performance/slim/compare_mus.yaml diff --git a/configs/object_performance_plots/V29/slim/comparisons.yaml b/configs/V29/object_performance/slim/comparisons.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/comparisons.yaml rename to configs/V29/object_performance/slim/comparisons.yaml diff --git a/configs/object_performance_plots/V29/slim/egamma_trigger_inclusive.yaml b/configs/V29/object_performance/slim/egamma_trigger_inclusive.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/egamma_trigger_inclusive.yaml rename to configs/V29/object_performance/slim/egamma_trigger_inclusive.yaml diff --git a/configs/object_performance_plots/V29/slim/egamma_trigger_tkiso_inclusive.yaml b/configs/V29/object_performance/slim/egamma_trigger_tkiso_inclusive.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/egamma_trigger_tkiso_inclusive.yaml rename to configs/V29/object_performance/slim/egamma_trigger_tkiso_inclusive.yaml diff --git a/configs/object_performance_plots/V29/slim/ele_test.yaml b/configs/V29/object_performance/slim/ele_test.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/ele_test.yaml rename to configs/V29/object_performance/slim/ele_test.yaml diff --git a/configs/object_performance_plots/V29/slim/electron_matching.yaml b/configs/V29/object_performance/slim/electron_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/electron_matching.yaml rename to configs/V29/object_performance/slim/electron_matching.yaml diff --git a/configs/object_performance_plots/V29/slim/electrons_comparisons.yaml b/configs/V29/object_performance/slim/electrons_comparisons.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/electrons_comparisons.yaml rename to configs/V29/object_performance/slim/electrons_comparisons.yaml diff --git a/configs/object_performance_plots/V29/slim/jets_matching.yaml b/configs/V29/object_performance/slim/jets_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/jets_matching.yaml rename to configs/V29/object_performance/slim/jets_matching.yaml diff --git a/configs/object_performance_plots/V29/slim/jets_matching_eta.yaml b/configs/V29/object_performance/slim/jets_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/jets_matching_eta.yaml rename to configs/V29/object_performance/slim/jets_matching_eta.yaml diff --git a/configs/object_performance_plots/V29/slim/jets_trigger_inclusive.yaml b/configs/V29/object_performance/slim/jets_trigger_inclusive.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/jets_trigger_inclusive.yaml rename to configs/V29/object_performance/slim/jets_trigger_inclusive.yaml diff --git a/configs/object_performance_plots/V29/slim/jets_trigger_sc_inclusive.yaml b/configs/V29/object_performance/slim/jets_trigger_sc_inclusive.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/jets_trigger_sc_inclusive.yaml rename to configs/V29/object_performance/slim/jets_trigger_sc_inclusive.yaml diff --git a/configs/object_performance_plots/V29/slim/met.yaml b/configs/V29/object_performance/slim/met.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/met.yaml rename to configs/V29/object_performance/slim/met.yaml diff --git a/configs/object_performance_plots/V29/slim/muon_matching.yaml b/configs/V29/object_performance/slim/muon_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/muon_matching.yaml rename to configs/V29/object_performance/slim/muon_matching.yaml diff --git a/configs/object_performance_plots/V29/slim/muon_trigger_gmtTK_inclusive.yaml b/configs/V29/object_performance/slim/muon_trigger_gmtTK_inclusive.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/muon_trigger_gmtTK_inclusive.yaml rename to configs/V29/object_performance/slim/muon_trigger_gmtTK_inclusive.yaml diff --git a/configs/object_performance_plots/V29/slim/muon_trigger_inclusive.yaml b/configs/V29/object_performance/slim/muon_trigger_inclusive.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/muon_trigger_inclusive.yaml rename to configs/V29/object_performance/slim/muon_trigger_inclusive.yaml diff --git a/configs/object_performance_plots/V29/slim/pho_test.yaml b/configs/V29/object_performance/slim/pho_test.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/pho_test.yaml rename to configs/V29/object_performance/slim/pho_test.yaml diff --git a/configs/object_performance_plots/V29/slim/photons_matching.yaml b/configs/V29/object_performance/slim/photons_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/photons_matching.yaml rename to configs/V29/object_performance/slim/photons_matching.yaml diff --git a/configs/object_performance_plots/V29/slim/tau_matching.yaml b/configs/V29/object_performance/slim/tau_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/tau_matching.yaml rename to configs/V29/object_performance/slim/tau_matching.yaml diff --git a/configs/object_performance_plots/V29/slim/tau_matching_eta.yaml b/configs/V29/object_performance/slim/tau_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/tau_matching_eta.yaml rename to configs/V29/object_performance/slim/tau_matching_eta.yaml diff --git a/configs/object_performance_plots/V29/slim/tau_trigger_inclusive.yaml b/configs/V29/object_performance/slim/tau_trigger_inclusive.yaml similarity index 100% rename from configs/object_performance_plots/V29/slim/tau_trigger_inclusive.yaml rename to configs/V29/object_performance/slim/tau_trigger_inclusive.yaml diff --git a/configs/object_performance_plots/V29/tau_matching.yaml b/configs/V29/object_performance/tau_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29/tau_matching.yaml rename to configs/V29/object_performance/tau_matching.yaml diff --git a/configs/object_performance_plots/V29/tau_matching_wHH.yaml b/configs/V29/object_performance/tau_matching_wHH.yaml similarity index 100% rename from configs/object_performance_plots/V29/tau_matching_wHH.yaml rename to configs/V29/object_performance/tau_matching_wHH.yaml diff --git a/configs/object_performance_plots/V29/tau_trigger.yaml b/configs/V29/object_performance/tau_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V29/tau_trigger.yaml rename to configs/V29/object_performance/tau_trigger.yaml diff --git a/configs/object_performance_plots/V29/version_comparison.yaml b/configs/V29/object_performance/version_comparison.yaml similarity index 100% rename from configs/object_performance_plots/V29/version_comparison.yaml rename to configs/V29/object_performance/version_comparison.yaml diff --git a/configs/object_performance_plots/V29_13X/bJetEff.yaml b/configs/V29_13X/object_performance/bJetEff.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/bJetEff.yaml rename to configs/V29_13X/object_performance/bJetEff.yaml diff --git a/configs/object_performance_plots/V29_13X/electron_iso.yaml b/configs/V29_13X/object_performance/electron_iso.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/electron_iso.yaml rename to configs/V29_13X/object_performance/electron_iso.yaml diff --git a/configs/object_performance_plots/V29_13X/electron_matching.yaml b/configs/V29_13X/object_performance/electron_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/electron_matching.yaml rename to configs/V29_13X/object_performance/electron_matching.yaml diff --git a/configs/object_performance_plots/V29_13X/electron_matching_eta.yaml b/configs/V29_13X/object_performance/electron_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/electron_matching_eta.yaml rename to configs/V29_13X/object_performance/electron_matching_eta.yaml diff --git a/configs/object_performance_plots/V29_13X/electron_trigger.yaml b/configs/V29_13X/object_performance/electron_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/electron_trigger.yaml rename to configs/V29_13X/object_performance/electron_trigger.yaml diff --git a/configs/object_performance_plots/V29_13X/ht_test.yaml b/configs/V29_13X/object_performance/ht_test.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/ht_test.yaml rename to configs/V29_13X/object_performance/ht_test.yaml diff --git a/configs/object_performance_plots/V29_13X/jets_matching.yaml b/configs/V29_13X/object_performance/jets_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/jets_matching.yaml rename to configs/V29_13X/object_performance/jets_matching.yaml diff --git a/configs/object_performance_plots/V29_13X/jets_matching_eta.yaml b/configs/V29_13X/object_performance/jets_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/jets_matching_eta.yaml rename to configs/V29_13X/object_performance/jets_matching_eta.yaml diff --git a/configs/object_performance_plots/V29_13X/jets_trigger.yaml b/configs/V29_13X/object_performance/jets_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/jets_trigger.yaml rename to configs/V29_13X/object_performance/jets_trigger.yaml diff --git a/configs/object_performance_plots/V29_13X/jets_trigger_fwd.yaml b/configs/V29_13X/object_performance/jets_trigger_fwd.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/jets_trigger_fwd.yaml rename to configs/V29_13X/object_performance/jets_trigger_fwd.yaml diff --git a/configs/object_performance_plots/V29_13X/met_ht_mht.yaml b/configs/V29_13X/object_performance/met_ht_mht.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/met_ht_mht.yaml rename to configs/V29_13X/object_performance/met_ht_mht.yaml diff --git a/configs/object_performance_plots/V29_13X/mht.yaml b/configs/V29_13X/object_performance/mht.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/mht.yaml rename to configs/V29_13X/object_performance/mht.yaml diff --git a/configs/object_performance_plots/V29_13X/muon_matching.yaml b/configs/V29_13X/object_performance/muon_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/muon_matching.yaml rename to configs/V29_13X/object_performance/muon_matching.yaml diff --git a/configs/object_performance_plots/V29_13X/muon_matching_eta.yaml b/configs/V29_13X/object_performance/muon_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/muon_matching_eta.yaml rename to configs/V29_13X/object_performance/muon_matching_eta.yaml diff --git a/configs/object_performance_plots/V29_13X/muon_trigger.yaml b/configs/V29_13X/object_performance/muon_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/muon_trigger.yaml rename to configs/V29_13X/object_performance/muon_trigger.yaml diff --git a/configs/object_performance_plots/V29_13X/photon_iso.yaml b/configs/V29_13X/object_performance/photon_iso.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/photon_iso.yaml rename to configs/V29_13X/object_performance/photon_iso.yaml diff --git a/configs/object_performance_plots/V29_13X/photons_matching.yaml b/configs/V29_13X/object_performance/photons_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/photons_matching.yaml rename to configs/V29_13X/object_performance/photons_matching.yaml diff --git a/configs/object_performance_plots/V29_13X/photons_matching_eta.yaml b/configs/V29_13X/object_performance/photons_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/photons_matching_eta.yaml rename to configs/V29_13X/object_performance/photons_matching_eta.yaml diff --git a/configs/object_performance_plots/V29_13X/photons_trigger.yaml b/configs/V29_13X/object_performance/photons_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/photons_trigger.yaml rename to configs/V29_13X/object_performance/photons_trigger.yaml diff --git a/configs/object_performance_plots/V29_13X/tau_matching.yaml b/configs/V29_13X/object_performance/tau_matching.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/tau_matching.yaml rename to configs/V29_13X/object_performance/tau_matching.yaml diff --git a/configs/object_performance_plots/V29_13X/tau_trigger.yaml b/configs/V29_13X/object_performance/tau_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/tau_trigger.yaml rename to configs/V29_13X/object_performance/tau_trigger.yaml diff --git a/configs/object_performance_plots/V29_13X/tests/electron_iso_Hgg.yaml b/configs/V29_13X/object_performance/tests/electron_iso_Hgg.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/tests/electron_iso_Hgg.yaml rename to configs/V29_13X/object_performance/tests/electron_iso_Hgg.yaml diff --git a/configs/object_performance_plots/V29_13X/tests/tau_matching_TT.yaml b/configs/V29_13X/object_performance/tests/tau_matching_TT.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/tests/tau_matching_TT.yaml rename to configs/V29_13X/object_performance/tests/tau_matching_TT.yaml diff --git a/configs/object_performance_plots/V29_13X/tests/tau_trigger_TT.yaml b/configs/V29_13X/object_performance/tests/tau_trigger_TT.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/tests/tau_trigger_TT.yaml rename to configs/V29_13X/object_performance/tests/tau_trigger_TT.yaml diff --git a/configs/object_performance_plots/V29_13X/version_comparison.yaml b/configs/V29_13X/object_performance/version_comparison.yaml similarity index 100% rename from configs/object_performance_plots/V29_13X/version_comparison.yaml rename to configs/V29_13X/object_performance/version_comparison.yaml diff --git a/configs/object_performance_plots/V30/bJetEff.yaml b/configs/V30/object_performance/bJetEff.yaml similarity index 100% rename from configs/object_performance_plots/V30/bJetEff.yaml rename to configs/V30/object_performance/bJetEff.yaml diff --git a/configs/object_performance_plots/V30/electron_iso.yaml b/configs/V30/object_performance/electron_iso.yaml similarity index 100% rename from configs/object_performance_plots/V30/electron_iso.yaml rename to configs/V30/object_performance/electron_iso.yaml diff --git a/configs/object_performance_plots/V30/electron_matching.yaml b/configs/V30/object_performance/electron_matching.yaml similarity index 100% rename from configs/object_performance_plots/V30/electron_matching.yaml rename to configs/V30/object_performance/electron_matching.yaml diff --git a/configs/object_performance_plots/V30/electron_matching_eta.yaml b/configs/V30/object_performance/electron_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V30/electron_matching_eta.yaml rename to configs/V30/object_performance/electron_matching_eta.yaml diff --git a/configs/object_performance_plots/V30/electron_trigger.yaml b/configs/V30/object_performance/electron_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V30/electron_trigger.yaml rename to configs/V30/object_performance/electron_trigger.yaml diff --git a/configs/object_performance_plots/V30/ht_test.yaml b/configs/V30/object_performance/ht_test.yaml similarity index 100% rename from configs/object_performance_plots/V30/ht_test.yaml rename to configs/V30/object_performance/ht_test.yaml diff --git a/configs/object_performance_plots/V30/jets_matching.yaml b/configs/V30/object_performance/jets_matching.yaml similarity index 100% rename from configs/object_performance_plots/V30/jets_matching.yaml rename to configs/V30/object_performance/jets_matching.yaml diff --git a/configs/object_performance_plots/V30/jets_matching_eta.yaml b/configs/V30/object_performance/jets_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V30/jets_matching_eta.yaml rename to configs/V30/object_performance/jets_matching_eta.yaml diff --git a/configs/object_performance_plots/V30/jets_matching_wBTag.yaml b/configs/V30/object_performance/jets_matching_wBTag.yaml similarity index 100% rename from configs/object_performance_plots/V30/jets_matching_wBTag.yaml rename to configs/V30/object_performance/jets_matching_wBTag.yaml diff --git a/configs/object_performance_plots/V30/jets_trigger.yaml b/configs/V30/object_performance/jets_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V30/jets_trigger.yaml rename to configs/V30/object_performance/jets_trigger.yaml diff --git a/configs/object_performance_plots/V30/jets_trigger_fwd.yaml b/configs/V30/object_performance/jets_trigger_fwd.yaml similarity index 100% rename from configs/object_performance_plots/V30/jets_trigger_fwd.yaml rename to configs/V30/object_performance/jets_trigger_fwd.yaml diff --git a/configs/object_performance_plots/V30/met_ht_mht.yaml b/configs/V30/object_performance/met_ht_mht.yaml similarity index 100% rename from configs/object_performance_plots/V30/met_ht_mht.yaml rename to configs/V30/object_performance/met_ht_mht.yaml diff --git a/configs/object_performance_plots/V30/mht.yaml b/configs/V30/object_performance/mht.yaml similarity index 100% rename from configs/object_performance_plots/V30/mht.yaml rename to configs/V30/object_performance/mht.yaml diff --git a/configs/object_performance_plots/V30/muon_matching.yaml b/configs/V30/object_performance/muon_matching.yaml similarity index 100% rename from configs/object_performance_plots/V30/muon_matching.yaml rename to configs/V30/object_performance/muon_matching.yaml diff --git a/configs/object_performance_plots/V30/muon_matching_eta.yaml b/configs/V30/object_performance/muon_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V30/muon_matching_eta.yaml rename to configs/V30/object_performance/muon_matching_eta.yaml diff --git a/configs/object_performance_plots/V30/muon_trigger.yaml b/configs/V30/object_performance/muon_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V30/muon_trigger.yaml rename to configs/V30/object_performance/muon_trigger.yaml diff --git a/configs/object_performance_plots/V30/photon_iso.yaml b/configs/V30/object_performance/photon_iso.yaml similarity index 100% rename from configs/object_performance_plots/V30/photon_iso.yaml rename to configs/V30/object_performance/photon_iso.yaml diff --git a/configs/object_performance_plots/V30/photons_matching.yaml b/configs/V30/object_performance/photons_matching.yaml similarity index 100% rename from configs/object_performance_plots/V30/photons_matching.yaml rename to configs/V30/object_performance/photons_matching.yaml diff --git a/configs/object_performance_plots/V30/photons_matching_eta.yaml b/configs/V30/object_performance/photons_matching_eta.yaml similarity index 100% rename from configs/object_performance_plots/V30/photons_matching_eta.yaml rename to configs/V30/object_performance/photons_matching_eta.yaml diff --git a/configs/object_performance_plots/V30/photons_trigger.yaml b/configs/V30/object_performance/photons_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V30/photons_trigger.yaml rename to configs/V30/object_performance/photons_trigger.yaml diff --git a/configs/object_performance_plots/V30/tau_matching.yaml b/configs/V30/object_performance/tau_matching.yaml similarity index 100% rename from configs/object_performance_plots/V30/tau_matching.yaml rename to configs/V30/object_performance/tau_matching.yaml diff --git a/configs/object_performance_plots/V30/tau_matching_wHH.yaml b/configs/V30/object_performance/tau_matching_wHH.yaml similarity index 100% rename from configs/object_performance_plots/V30/tau_matching_wHH.yaml rename to configs/V30/object_performance/tau_matching_wHH.yaml diff --git a/configs/object_performance_plots/V30/tau_trigger.yaml b/configs/V30/object_performance/tau_trigger.yaml similarity index 100% rename from configs/object_performance_plots/V30/tau_trigger.yaml rename to configs/V30/object_performance/tau_trigger.yaml diff --git a/configs/object_performance_plots/V30/version_comparison.yaml b/configs/V30/object_performance/version_comparison.yaml similarity index 100% rename from configs/object_performance_plots/V30/version_comparison.yaml rename to configs/V30/object_performance/version_comparison.yaml diff --git a/configs/object_performance_plots/scaling_thresholds.yaml b/configs/scaling_thresholds.yaml similarity index 100% rename from configs/object_performance_plots/scaling_thresholds.yaml rename to configs/scaling_thresholds.yaml diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index b8a568ea..eaf2caa2 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -381,7 +381,7 @@ class ScalingCentral: def __init__(self, cfg_plots_path): with open(cfg_plots_path, 'r') as f: self.cfg_plots = yaml.safe_load(f) - with open("./configs/object_performance_plots/scaling_thresholds.yaml", 'r') as f: + with open("./configs/scaling_thresholds.yaml", 'r') as f: self.scaling_thresholds = yaml.safe_load(f) def _get_scaling_thresholds(self, cfg_plot, test_obj): From dbc97b7bb64338e06ae6b6216f35bd7b86fbf523 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 16 Jan 2024 10:32:39 +0100 Subject: [PATCH 026/140] add explicit commands for venv setup to README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c5e9cf8e..c49cd4d7 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,13 @@ A standard venv with Python3.11 can be created on lxplus via `python3.11 -m venv ` and all necessary - dependencies installed via `pip install -r requirements.txt`. + dependencies installed via `pip install -r requirements.txt`: + + ```bash + python3.11 -m venv + source /bin/activate + pip install -r requirements.txt + ``` You can then execute the scripts either with `python .py` or by modifying the [shebang](https://en.wikipedia.org/wiki/Shebang_%28Unix%29). From c5b64d37d3de0665edbc220d35840378180141e2 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 16 Jan 2024 10:55:15 +0100 Subject: [PATCH 027/140] update dead link to Wiki --- docs/object-performance.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/object-performance.md b/docs/object-performance.md index 005462fe..eb202bff 100644 --- a/docs/object-performance.md +++ b/docs/object-performance.md @@ -6,7 +6,7 @@ The definition of each object to be tested is detailed in this [TWiki page](https://twiki.cern.ch/twiki/bin/view/CMS/PhaseIIL1TriggerMenuTools). - A detailed description of each step, together with instructions on how to set up the configuration files for the cache and plotting steps, is given in [the Wiki pages](https://github.com/bonanomi/Phase2-L1MenuTools/wiki/Cache-objects-and-performance-plots). + A detailed description of each step, together with instructions on how to set up the configuration files for the cache and plotting steps, is given in [the Wiki pages](https://github.com/cms-l1-dpg/Phase2-L1MenuTools/wiki). The following presents the minimal set of commands to be run to produce the standard set of validation plots (cf. [these slides](https://twiki.cern.ch/twiki/pub/CMS/PhaseIIL1TriggerMenuTools/Phase2Menu_validation123x-3.pdf)). @@ -71,4 +71,4 @@ * `turnons`: plots of the matching efficiencies and L1 turn-on efficiency curves. - * `scalings`: plots of the scalings, i.e. position of the turnon point (often 95% location) as a function of different threshold cuts on L1 objects. \ No newline at end of file + * `scalings`: plots of the scalings, i.e. position of the turnon point (often 95% location) as a function of different threshold cuts on L1 objects. From f640cd0e04fe6685f65de0e0342e8001011eee4a Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 16 Jan 2024 11:21:44 +0100 Subject: [PATCH 028/140] move installation requirements to pyproject.toml using poetry and remove shebangs --- README.md | 15 ++---- menu_tools/caching/cache_objects.py | 1 - .../object_performance/compare_plots.py | 1 - .../object_performance/plotBTagEfficiency.py | 1 - menu_tools/object_performance/plotter.py | 1 - pyproject.toml | 39 ++++++++++++++-- requirements.txt | 46 ------------------- 7 files changed, 41 insertions(+), 63 deletions(-) delete mode 100644 requirements.txt diff --git a/README.md b/README.md index c49cd4d7..dd6960cc 100644 --- a/README.md +++ b/README.md @@ -23,16 +23,11 @@ ```bash python3.11 -m venv source /bin/activate - pip install -r requirements.txt + pip install . ``` - You can then execute the scripts either with `python .py` - or by modifying the [shebang](https://en.wikipedia.org/wiki/Shebang_%28Unix%29). - (the very first line of the executable `.py` files which starts - with `#!`) to point - to your newly set up Python installation. To find the path run + You can then execute the tools (e.g. for object performance) via - source /bin/activate - which python - - and replace the current path in the shebang with the output. + ```python + python -m menu_tools.object_performance.plotter + ``` diff --git a/menu_tools/caching/cache_objects.py b/menu_tools/caching/cache_objects.py index 28b8b179..be2d0bbf 100755 --- a/menu_tools/caching/cache_objects.py +++ b/menu_tools/caching/cache_objects.py @@ -1,4 +1,3 @@ -#!/afs/cern.ch/user/d/dhundhau/Phase2-L1MenuTools/pyenv-ak2.0/bin/python import argparse import glob import os diff --git a/menu_tools/object_performance/compare_plots.py b/menu_tools/object_performance/compare_plots.py index 1cdd70ba..cadd39de 100755 --- a/menu_tools/object_performance/compare_plots.py +++ b/menu_tools/object_performance/compare_plots.py @@ -1,4 +1,3 @@ -#!/afs/cern.ch/user/d/dhundhau/Phase2-L1MenuTools/pyenv-ak2.0/bin/python import argparse import os diff --git a/menu_tools/object_performance/plotBTagEfficiency.py b/menu_tools/object_performance/plotBTagEfficiency.py index 2b43f586..402d3ee6 100755 --- a/menu_tools/object_performance/plotBTagEfficiency.py +++ b/menu_tools/object_performance/plotBTagEfficiency.py @@ -1,4 +1,3 @@ -#!/afs/cern.ch/user/d/dhundhau/Phase2-L1MenuTools/pyenv-ak2.0/bin/python import argparse import os diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index eaf2caa2..2ba3bbf2 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -1,4 +1,3 @@ -#!/afs/cern.ch/user/d/dhundhau/Phase2-L1MenuTools/pyenv-ak2.0/bin/python import argparse import os diff --git a/pyproject.toml b/pyproject.toml index 54fecf98..d2032d0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,46 @@ # pyproject.toml +[build-system] +build-backend = 'poetry.core.masonry.api' +requires = [ + "poetry-core~=1.0" +] + [tool.poetry] -name = "object-performance" -version = "0.0.1" -description = "" +name = "menu-tools" +version = "0.1.0" +description = "Tools to evaluate performance of L1 objects and triggers in the menu for Phase-II." +license = "MIT" authors = [ "Matteo Bonanomi ", "Daniel Hundhausen ", + "Artur Lobanov ", +] +readme = "README.md" +packages = [ + { include = "menu_tools" }, ] +[tool.poetry.dependencies] +python = "^3.11.0" +awkward = "2.1.0" +pyyaml = "6.0.1" +matplotlib = "3.8.2" +mplhep = "0.3.31" +numpy = "1.23.5" +pandas = "2.1.4" +progress = "1.6" +pyarrow = "14.0.2" +scipy = "1.10.1" +uproot = "5.0.4" +vector = "1.1.1.post1" + +[tool.poetry.group.dev.dependencies] +black = "23.12.1" +mypy = "1.8.0" + +[tool.poetry.group.test.dependencies] +pytest = "7.4.3" + [tool.pytest.ini_options] filterwarnings = [ "error", diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 5690dcf2..00000000 --- a/requirements.txt +++ /dev/null @@ -1,46 +0,0 @@ -awkward==2.1.0 -awkward-cpp==12 -black==23.12.1 -certifi==2023.11.17 -charset-normalizer==3.3.2 -click==8.1.7 -contourpy==1.2.0 -cycler==0.12.1 -docopt==0.6.2 -fonttools==4.47.0 -fsspec==2023.12.2 -idna==3.6 -importlib-metadata==7.0.1 -iniconfig==2.0.0 -kiwisolver==1.4.5 -matplotlib==3.8.2 -mplhep==0.3.31 -mplhep-data==0.0.3 -mypy==1.8.0 -mypy-extensions==1.0.0 -numpy==1.23.5 -packaging==23.2 -pandas==2.1.4 -pathspec==0.12.1 -Pillow==10.1.0 -pipreqs==0.4.13 -platformdirs==4.1.0 -pluggy==1.3.0 -progress==1.6 -pyarrow==14.0.2 -pyparsing==3.1.1 -pytest==7.4.3 -python-dateutil==2.8.2 -pytz==2023.3.post1 -PyYAML==6.0.1 -requests==2.31.0 -scipy==1.10.1 -six==1.16.0 -typing_extensions==4.9.0 -tzdata==2023.4 -uhi==0.4.0 -uproot==5.0.4 -urllib3==2.1.0 -vector==1.1.1.post1 -yarg==0.1.9 -zipp==3.17.0 From 90de61c976944e4ad38aaa05fd34ae9c642c6b4c Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 16 Jan 2024 13:01:34 +0100 Subject: [PATCH 029/140] add missing fsspec dependency of awkward --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d2032d0a..7d898768 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,11 +22,12 @@ packages = [ [tool.poetry.dependencies] python = "^3.11.0" -awkward = "2.1.0" +awkward = "2.5.2" +fsspec = "2023.12.2" pyyaml = "6.0.1" matplotlib = "3.8.2" mplhep = "0.3.31" -numpy = "1.23.5" +numpy = "^1.23.0" pandas = "2.1.4" progress = "1.6" pyarrow = "14.0.2" From 36b3d54370054d71e5dae13835f7798a43e9c8e9 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen <33727991+danielhundhausen@users.noreply.github.com> Date: Wed, 17 Jan 2024 14:06:57 +0100 Subject: [PATCH 030/140] Fix CI and add basic code quality functionality (#53) * fix python version compatibilty; add mypy config in pyproject.toml * make mypy ignore untyped imports * Fix Python version in workflow and add mypy and black checks; remove flake8 * update actions * run balck (code formatter) on menu_tools * reintroduce flake8; consolidate github actions * fix mypy issues * fix mypy not found in CI --- .flake8 | 4 +- .github/workflows/action.yml | 25 -- .github/workflows/code_quality.yml | 41 +++ menu_tools/caching/cache_objects.py | 109 ++++--- .../object_performance/compare_plots.py | 49 ++-- .../object_performance/plotBTagEfficiency.py | 53 ++-- menu_tools/object_performance/plot_config.py | 11 +- menu_tools/object_performance/plotter.py | 273 ++++++++++-------- menu_tools/object_performance/quality_obj.py | 143 +++++---- .../object_performance/scaling_collection.py | 122 +++----- .../object_performance/tests/conftest.py | 103 +++++-- .../tests/test_integration.py | 41 ++- .../tests/test_turnon_collection.py | 15 +- .../object_performance/tests/test_utils.py | 22 +- .../object_performance/turnon_collection.py | 82 +++--- menu_tools/utils/utils.py | 40 +-- pyproject.toml | 13 +- 17 files changed, 629 insertions(+), 517 deletions(-) delete mode 100644 .github/workflows/action.yml create mode 100644 .github/workflows/code_quality.yml diff --git a/.flake8 b/.flake8 index d9b24d51..c90c600d 100644 --- a/.flake8 +++ b/.flake8 @@ -1,3 +1,5 @@ [flake8] ignore = W391, W503 -max-line-length = 79 +max-line-length = 88 +extend-ignore = E203, E704, E266 +exclude = menu_tools/object_performance/quality_obj.py diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml deleted file mode 100644 index cd6a33e8..00000000 --- a/.github/workflows/action.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Python Tests -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: '3.10' - architecture: 'x64' - - name: Install dependencies - run: | - python -m pip install --upgrade pip wheel setuptools==65.5.1 - pip install flake8 pytest - if [ -f objectPerformance/requirements.txt ]; then pip install -r objectPerformance/requirements.txt; fi - - name: Run Flake8 - run: flake8 objectPerformance - - name: Run Tests - run: | - cd objectPerformance - python -m pytest - diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml new file mode 100644 index 00000000..87d97b29 --- /dev/null +++ b/.github/workflows/code_quality.yml @@ -0,0 +1,41 @@ +name: Code quality +on: [push, pull_request, workflow_dispatch] + +jobs: + black-lint: + runs-on: ubuntu-latest + name: black + steps: + - uses: actions/checkout@v3 + - uses: psf/black@stable + with: + options: "--check --verbose" + src: "./menu_tools" + version: "~= 23.12" + flake8-lint: + runs-on: ubuntu-latest + name: flake8 + steps: + - name: Check out source repository + uses: actions/checkout@v3 + - name: Set up Python environment + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: flake8 Lint + uses: py-actions/flake8@v2 + with: + path: "./menu_tools" + mypy-type-check: + runs-on: ubuntu-latest + name: mypy + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.11' + architecture: 'x64' + - run: | + python -m pip install --upgrade pip poetry + poetry install + poetry run mypy diff --git a/menu_tools/caching/cache_objects.py b/menu_tools/caching/cache_objects.py index be2d0bbf..fdddf135 100755 --- a/menu_tools/caching/cache_objects.py +++ b/menu_tools/caching/cache_objects.py @@ -14,22 +14,18 @@ vector.register_awkward() -class ObjectCacher(): - - def __init__(self, version, sample, obj, tree, branches, cfg_file, - dryrun=False): +class ObjectCacher: + def __init__(self, version, sample, obj, tree, branches, cfg_file, dryrun=False): self._version = version self._sample = sample self._cfg_file = cfg_file - self._object = obj.split('_')[0] + self._object = obj.split("_")[0] self._tree = tree self._final_ak_array = None self._ref_part_iso_dR_vals = [0.1, 0.15, 0.2, 0.3, 1.5] - self._ref_part_iso = { - f"dr_{dR}": [] for dR in self._ref_part_iso_dR_vals - } + self._ref_part_iso = {f"dr_{dR}": [] for dR in self._ref_part_iso_dR_vals} try: - self._part_type = obj.split('_')[1] + self._part_type = obj.split("_")[1] except IndexError: self._part_type = "" self._dryrun = dryrun @@ -47,11 +43,7 @@ def parquet_fname(self): Returns the name of the output file that the object will produce. """ - fname = ( - self._version - + '_' + self._sample - + "_" + self._object - ) + fname = self._version + "_" + self._sample + "_" + self._object if self._part_type: fname += "_" + self._part_type return fname @@ -65,7 +57,7 @@ def _ntuple_path(self): if glob.glob(local_ntuple_path): return local_ntuple_path - with open(self._cfg_file, 'r') as f: + with open(self._cfg_file, "r") as f: cfg = yaml.safe_load(f)[self._version][self._sample] return cfg["ntuple_path"] @@ -86,10 +78,10 @@ def _p4_sum(self, array, axis=-1): "E": ak.sum(array.E, axis=axis, keepdims=True), }, with_name="Momentum4D", - behavior=array.behavior + behavior=array.behavior, ) - def _get_visible_taus(self, all_parts, status_check = True): + def _get_visible_taus(self, all_parts, status_check=True): """ Create a collection of gen-level taus. Leptonic taus are discarded. @@ -99,15 +91,17 @@ def _get_visible_taus(self, all_parts, status_check = True): all_parts = ak.zip({k.lower(): all_parts[k] for k in all_parts.keys()}) if status_check: - - sel = ( (all_parts.id == 15) & - (all_parts.stat == 2) - ) + sel = (all_parts.id == 15) & (all_parts.stat == 2) is_tau = ak.any(sel, axis=-1) all_parts = ak.where(is_tau, all_parts, ak.full_like(all_parts, -1000)) - all_parts = {f: field for f, field in zip(['Id','Stat','Pt','Eta','Phi','Parent','E'],ak.unzip(all_parts))} + all_parts = { + f: field + for f, field in zip( + ["Id", "Stat", "Pt", "Eta", "Phi", "Parent", "E"], ak.unzip(all_parts) + ) + } sel_no_nu_e = abs(all_parts["Id"]) != 12 sel_no_nu_mu = abs(all_parts["Id"]) != 14 @@ -120,11 +114,11 @@ def _get_visible_taus(self, all_parts, status_check = True): all_tau_p = all_parts.copy() all_tau_m = all_parts.copy() - sel = all_tau_p['Parent'] == 15 + sel = all_tau_p["Parent"] == 15 for branch in all_tau_p: all_tau_p[branch] = all_tau_p[branch][sel] - sel = all_tau_m['Parent'] == -15 + sel = all_tau_m["Parent"] == -15 for branch in all_tau_m: all_tau_m[branch] = all_tau_m[branch][sel] @@ -134,13 +128,13 @@ def _get_visible_taus(self, all_parts, status_check = True): all_tau_p = ak.zip({k.lower(): all_tau_p[k] for k in all_tau_p.keys()}) all_tau_p = ak.with_name(all_tau_p, "Momentum4D") - sel_ele = ak.any(abs(all_tau_p['id']) == 11, axis=-1) - sel_mu = ak.any(abs(all_tau_p['id']) == 13, axis=-1) + sel_ele = ak.any(abs(all_tau_p["id"]) == 11, axis=-1) + sel_mu = ak.any(abs(all_tau_p["id"]) == 13, axis=-1) sel_lep = sel_ele | sel_mu all_tau_p = ak.mask(all_tau_p, sel_lep, valid_when=False) - sel_ele = ak.any(abs(all_tau_m['id']) == 11, axis=-1) - sel_mu = ak.any(abs(all_tau_m['id']) == 13, axis=-1) + sel_ele = ak.any(abs(all_tau_m["id"]) == 11, axis=-1) + sel_mu = ak.any(abs(all_tau_m["id"]) == 13, axis=-1) sel_lep = sel_ele | sel_mu all_tau_m = ak.mask(all_tau_m, sel_lep, valid_when=False) @@ -150,13 +144,13 @@ def _get_visible_taus(self, all_parts, status_check = True): # Parent, Id and Stat are dummy branches, only needed # for technical consistency. final_taus = { - 'Pt': ak.concatenate([fs_tau_p.pt, fs_tau_m.pt], axis=-1), - 'Eta': ak.concatenate([fs_tau_p.eta, fs_tau_m.eta], axis=-1), - 'Phi': ak.concatenate([fs_tau_p.phi, fs_tau_m.phi], axis=-1), - 'E': ak.concatenate([fs_tau_p.E, fs_tau_m.E], axis=-1), - 'Parent': ak.concatenate([fs_tau_p.E, fs_tau_m.E], axis=-1), - 'Id': ak.concatenate([fs_tau_p.E, fs_tau_m.E], axis=-1), - 'Stat': ak.concatenate([fs_tau_p.E, fs_tau_m.E], axis=-1) + "Pt": ak.concatenate([fs_tau_p.pt, fs_tau_m.pt], axis=-1), + "Eta": ak.concatenate([fs_tau_p.eta, fs_tau_m.eta], axis=-1), + "Phi": ak.concatenate([fs_tau_p.phi, fs_tau_m.phi], axis=-1), + "E": ak.concatenate([fs_tau_p.E, fs_tau_m.E], axis=-1), + "Parent": ak.concatenate([fs_tau_p.E, fs_tau_m.E], axis=-1), + "Id": ak.concatenate([fs_tau_p.E, fs_tau_m.E], axis=-1), + "Stat": ak.concatenate([fs_tau_p.E, fs_tau_m.E], axis=-1), } return final_taus @@ -166,14 +160,14 @@ def _filter_genpart_branches(self, all_arrays): Filter genparticle branches by Id. """ partId = abs(all_arrays["Id"]) - sel_id = (partId == utils.get_pdg_id(self._part_type)) + sel_id = partId == utils.get_pdg_id(self._part_type) for branch in all_arrays: all_arrays[branch] = all_arrays[branch][sel_id] all_arrays[branch] = ak.fill_none(all_arrays[branch], -999) return all_arrays - def _filter_fspart_branches(self, all_parts, status_check = True): + def _filter_fspart_branches(self, all_parts, status_check=True): """ Select all the final state particles. This collection is used only for dR matching @@ -183,15 +177,17 @@ def _filter_fspart_branches(self, all_parts, status_check = True): all_parts = ak.zip({k.lower(): all_parts[k] for k in all_parts.keys()}) if status_check: - - sel = ( (all_parts.id == 15) & - (all_parts.stat == 2) - ) + sel = (all_parts.id == 15) & (all_parts.stat == 2) is_tau = ak.any(sel, axis=-1) all_parts = ak.where(is_tau, all_parts, ak.full_like(all_parts, -1000)) - all_parts = {f: field for f, field in zip(['Id','Stat','Pt','Eta','Phi','Parent','E'],ak.unzip(all_parts))} + all_parts = { + f: field + for f, field in zip( + ["Id", "Stat", "Pt", "Eta", "Phi", "Parent", "E"], ak.unzip(all_parts) + ) + } sel_no_nu_e = abs(all_parts["Id"]) != 12 sel_no_nu_mu = abs(all_parts["Id"]) != 14 @@ -255,9 +251,7 @@ def _load_branches_from_ntuple(self, chunk_array, arr, branches): def _ak_array_in_chunk(self, arr, chunk_array, branches): for branch in branches: branch_key = branch.removeprefix("part") - arr[branch_key] = ak.concatenate( - [arr[branch_key], chunk_array[branch_key]] - ) + arr[branch_key] = ak.concatenate([arr[branch_key], chunk_array[branch_key]]) return arr @utils.timer("Loading objects files") @@ -274,21 +268,19 @@ def _concat_array_from_ntuples(self): # Read files in chunks to avoid issues with large size files chunk_name = f"{fname}:{self._tree}" - for array in uproot.iterate(chunk_name, filter_name = branches, step_size="100 MB"): + for array in uproot.iterate( + chunk_name, filter_name=branches, step_size="100 MB" + ): chunk_array = {x.removeprefix("part"): [] for x in branches} chunk_array = self._load_branches_from_ntuple( chunk_array, array, branches ) chunk_array = self._postprocess_branches(chunk_array) - new_array = self._ak_array_in_chunk( - new_array, chunk_array, branches - ) + new_array = self._ak_array_in_chunk(new_array, chunk_array, branches) # Concatenate array from "fname file" to all_arrays - all_arrays = self._ak_array_in_chunk( - all_arrays, new_array, branches - ) + all_arrays = self._ak_array_in_chunk(all_arrays, new_array, branches) bar.finish() @@ -314,11 +306,11 @@ def _save_array_to_parquet(self): """ ak.to_parquet( self._final_ak_array, - destination=self.cache_out_path + f"{self.parquet_fname}.parquet" + destination=self.cache_out_path + f"{self.parquet_fname}.parquet", ) def load(self): - #print(f"Process {self._object + self._part_type} object...") + # print(f"Process {self._object + self._part_type} object...") if self._cache_file_exists(): return @@ -336,21 +328,20 @@ def load(self): if __name__ == "__main__": - parser = argparse.ArgumentParser() parser.add_argument( "cfg", - help="Path to the config file in yaml format. Defaults in `configs/caching`." + help="Path to the config file in yaml format. Defaults in `configs/caching`.", ) parser.add_argument( "--dry-run", "-d", action="store_true", - help="Only do print-out of objects and branches to be loaded." + help="Only do print-out of objects and branches to be loaded.", ) args = parser.parse_args() - with open(args.cfg, 'r') as f: + with open(args.cfg, "r") as f: cfg = yaml.safe_load(f) for version, samples in cfg.items(): print("Processing: version", version) @@ -368,6 +359,6 @@ def load(self): obj=obj, branches=branches, cfg_file=args.cfg, - dryrun=args.dry_run + dryrun=args.dry_run, ) loader.load() diff --git a/menu_tools/object_performance/compare_plots.py b/menu_tools/object_performance/compare_plots.py index cadd39de..06f8d3a0 100755 --- a/menu_tools/object_performance/compare_plots.py +++ b/menu_tools/object_performance/compare_plots.py @@ -3,37 +3,32 @@ import matplotlib.pyplot as plt import mplhep as hep -import numpy as np -from progress.bar import IncrementalBar import yaml import json -from menu_tools.object_performance.turnon_collection import TurnOnCollection -from menu_tools.object_performance.scaling_collection import ScalingCollection from menu_tools.object_performance.plotter import Plotter -from menu_tools.utils import utils plt.style.use(hep.style.CMS) class ComparisonCentral(Plotter): - def __init__(self, cfg_plots_path): - with open(cfg_plots_path, 'r') as f: + with open(cfg_plots_path, "r") as f: self.cfg_plots = yaml.safe_load(f) for plot_name, cfg_plot in self.cfg_plots.items(): self.plot_name = plot_name self.cfg = self.cfg_plots[self.plot_name] self.save_dir = self.cfg["save_dir"] - if not os.path.exists(self.save_dir): os.makedirs(self.save_dir) + if not os.path.exists(self.save_dir): + os.makedirs(self.save_dir) @property def _get_watermark(self): - try: - return self.cfg["watermark"] - except KeyError: - return " " + try: + return self.cfg["watermark"] + except KeyError: + return " " @property def _get_files(self): @@ -55,15 +50,20 @@ def _style_plot(self, fig, ax, legend_loc="lower right"): ax.set_ylabel(rf"{ylabel}") ax.set_ylim(0.0, 1) ax.tick_params(direction="in") - ax.text(0, -0.1, self._get_watermark, - color="grey", alpha=0.2, - fontsize=20, - transform=ax.transAxes) + ax.text( + 0, + -0.1, + self._get_watermark, + color="grey", + alpha=0.2, + fontsize=20, + transform=ax.transAxes, + ) fig.tight_layout() def run(self): files = self._get_files - fig, ax = self._create_new_plot() + fig, ax = self._create_new_plot() for file in files: fname = os.path.join(files[file]["dir"], file) test_object = files[file]["object"] @@ -75,24 +75,27 @@ def run(self): err_kwargs = dict_to_plot[test_object]["err_kwargs"] - ax.errorbar(dict_to_plot[test_object]["xbins"], - dict_to_plot[test_object]["efficiency"], - yerr = dict_to_plot[test_object]["efficiency_err"], - label = label, **err_kwargs) + ax.errorbar( + dict_to_plot[test_object]["xbins"], + dict_to_plot[test_object]["efficiency"], + yerr=dict_to_plot[test_object]["efficiency_err"], + label=label, + **err_kwargs, + ) self._style_plot(fig, ax) plt.savefig(f"{self.save_dir}/{self.plot_name}.png") plt.savefig(f"{self.save_dir}/{self.plot_name}.pdf") + if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( "cfg_plots", default="cfg_plots/version_comparison.yaml", - help="Path of YAML file specifying the desired plots." + help="Path of YAML file specifying the desired plots.", ) args = parser.parse_args() plotter = ComparisonCentral(args.cfg_plots) plotter.run() - diff --git a/menu_tools/object_performance/plotBTagEfficiency.py b/menu_tools/object_performance/plotBTagEfficiency.py index 402d3ee6..2b4e6160 100755 --- a/menu_tools/object_performance/plotBTagEfficiency.py +++ b/menu_tools/object_performance/plotBTagEfficiency.py @@ -3,7 +3,6 @@ import matplotlib.pyplot as plt import mplhep as hep -import numpy as np import yaml import json @@ -13,23 +12,23 @@ class ComparisonCentral(Plotter): - def __init__(self, cfg_plots_path): - with open(cfg_plots_path, 'r') as f: + with open(cfg_plots_path, "r") as f: self.cfg_plots = yaml.safe_load(f) self.cfgs = {} for plot_name, cfg_plot in self.cfg_plots.items(): - print (plot_name) + print(plot_name) self.cfgs[plot_name] = cfg_plot - if not os.path.exists(cfg_plot['save_dir']): os.makedirs(cfg_plot['save_dir']) + if not os.path.exists(cfg_plot["save_dir"]): + os.makedirs(cfg_plot["save_dir"]) - def _get_watermark(self,cfg): - try: - return cfg["watermark"] - except KeyError: - return " " + def _get_watermark(self, cfg): + try: + return cfg["watermark"] + except KeyError: + return " " - def _get_files(self,cfg): + def _get_files(self, cfg): try: return cfg["files"] except KeyError: @@ -48,16 +47,21 @@ def _style_plot(self, cfg, fig, ax, legend_loc="upper right"): ax.set_ylabel(rf"{ylabel}") ax.set_ylim(0.0, 1) ax.tick_params(direction="in") - ax.text(0, -0.1, self._get_watermark(cfg), - color="grey", alpha=0.2, - fontsize=20, - transform=ax.transAxes) + ax.text( + 0, + -0.1, + self._get_watermark(cfg), + color="grey", + alpha=0.2, + fontsize=20, + transform=ax.transAxes, + ) fig.tight_layout() def run(self): for plot_name, cfg in self.cfgs.items(): files = self._get_files(cfg) - fig, ax = self._create_new_plot() + fig, ax = self._create_new_plot() for file in files: fname = os.path.join(files[file]["dir"], file) test_object = files[file]["object"] @@ -69,25 +73,28 @@ def run(self): err_kwargs = dict_to_plot[test_object]["err_kwargs"] - ax.errorbar(dict_to_plot[test_object]["xbins"], - dict_to_plot[test_object]["efficiency"], - yerr = dict_to_plot[test_object]["efficiency_err"], - label = label, **err_kwargs) + ax.errorbar( + dict_to_plot[test_object]["xbins"], + dict_to_plot[test_object]["efficiency"], + yerr=dict_to_plot[test_object]["efficiency_err"], + label=label, + **err_kwargs, + ) self._style_plot(cfg, fig, ax) - print ("Saving plot to : ",plot_name) + print("Saving plot to : ", plot_name) plt.savefig(f"{cfg['save_dir']}/{plot_name}.png") plt.savefig(f"{cfg['save_dir']}/{plot_name}.pdf") + if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( "cfg_plots", default="cfg_plots/bJetEff.yaml", - help="Path of YAML file specifying the desired plots." + help="Path of YAML file specifying the desired plots.", ) args = parser.parse_args() plotter = ComparisonCentral(args.cfg_plots) plotter.run() - diff --git a/menu_tools/object_performance/plot_config.py b/menu_tools/object_performance/plot_config.py index 4f30ce3c..d4189494 100644 --- a/menu_tools/object_performance/plot_config.py +++ b/menu_tools/object_performance/plot_config.py @@ -1,10 +1,12 @@ -class PlotConfig(): +from typing import Any - def __init__(self, cfg: dict): + +class PlotConfig: + def __init__(self, cfg: dict[str, Any]): self._cfg = cfg @property - def sample(self): + def sample(self) -> str: return self._cfg["sample"] @property @@ -49,7 +51,7 @@ def reference_trafo(self): return None @property - def test_objects(self): + def test_objects(self) -> dict[str, dict]: return self._cfg["test_objects"] def get_match_dR(self, test_obj): @@ -150,4 +152,3 @@ def get_l1_iso(self, obj): return self._cfg["test_objects"][obj]["iso_branch"] except KeyError: return None - diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 2ba3bbf2..f20663e5 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -1,4 +1,5 @@ import argparse +from typing import Any import os import matplotlib.pyplot as plt @@ -16,60 +17,64 @@ plt.style.use(hep.style.CMS) -class Plotter(): +class Plotter: + outdir_base = "outputs/object_performance/" - outdir = "outputs/object_performance/" - - def _make_output_dirs(self, version: str): - os.makedirs(f"{self.outdir}/{version}/turnons", exist_ok=True) - os.makedirs(f"{self.outdir}/{version}/distributions", exist_ok=True) - os.makedirs(f"{self.outdir}/{version}/scalings", exist_ok=True) + def _make_output_dirs(self, version: str) -> None: + os.makedirs(f"{self.outdir_base}/{version}/turnons", exist_ok=True) + os.makedirs(f"{self.outdir_base}/{version}/distributions", exist_ok=True) + os.makedirs(f"{self.outdir_base}/{version}/scalings", exist_ok=True) - def _create_new_plot(self): + def _create_new_plot(self) -> tuple[plt.Figure, plt.Axes]: fig, ax = plt.subplots(figsize=(10, 10)) hep.cms.label(ax=ax, llabel="Phase-2 Simulation", com=14) return fig, ax class EfficiencyPlotter(Plotter): - def __init__(self, name, cfg, turnon_collection): self.plot_name = name self.cfg = cfg self.turnon_collection = turnon_collection self.version = self.turnon_collection.version + self.threshold = self.turnon_collection.threshold self.bin_width = turnon_collection.cfg_plot.bin_width + @property + def _outdir_turnons(self) -> str: + return os.path.join(self.outdir_base, self.version, "turnons") + + @property + def _outdir_distributions(self) -> str: + return os.path.join(self.outdir_base, self.version, "distributions") + def _style_plot(self, fig, ax, legend_loc="lower right"): - ax.axvline(self.turnon_collection.threshold, ls=":", c="k") + ax.axvline(self.threshold, ls=":", c="k") ax.axhline(1, ls=":", c="k") ax.legend(loc=legend_loc, frameon=False) ax.set_xlabel(rf"{self.cfg['xlabel']}") - ylabel = self.cfg["ylabel"].replace( - "", - str(self.turnon_collection.threshold) - ) + ylabel = self.cfg["ylabel"].replace("", str(self.threshold)) ax.set_ylabel(rf"{ylabel}") ax.set_xlim(self.cfg["binning"]["min"], self.cfg["binning"]["max"]) ax.tick_params(direction="in") - watermark = f"{self.version}_{self.plot_name}_"\ - f"{self.turnon_collection.threshold}" - ax.text(0, -0.1, watermark, - color="grey", alpha=0.2, - fontsize=20, - transform=ax.transAxes) + watermark = f"{self.version}_{self.plot_name}_" f"{self.threshold}" + ax.text( + 0, + -0.1, + watermark, + color="grey", + alpha=0.2, + fontsize=20, + transform=ax.transAxes, + ) fig.tight_layout() def _save_json(self, file_name): plot = {} xlabel = self.cfg["xlabel"] - ylabel = self.cfg["ylabel"].replace( - "", - str(self.turnon_collection.threshold) - ) - watermark = f"{self.version}_{self.plot_name}_"\ - f"{self.turnon_collection.threshold}" + ylabel = self.cfg["ylabel"].replace("", str(self.threshold)) + watermark = f"{self.version}_{self.plot_name}_" f"{self.threshold}" plot["xlabel"] = xlabel plot["ylabel"] = ylabel @@ -92,8 +97,9 @@ def _save_json(self, file_name): efficiency, yerr = self.turnon_collection.get_efficiency(obj_key) xerr = self.turnon_collection.xerr(obj_key) - yerr = np.array([yerr[0][~np.isnan(efficiency)], - yerr[1][~np.isnan(efficiency)]]) + yerr = np.array( + [yerr[0][~np.isnan(efficiency)], yerr[1][~np.isnan(efficiency)]] + ) xerr = xerr[~np.isnan(efficiency)] xbins = xbins[~np.isnan(efficiency)] efficiency = efficiency[~np.isnan(efficiency)] @@ -105,8 +111,7 @@ def _save_json(self, file_name): label = self.cfg["test_objects"][obj_key]["label"] - err_kwargs = {"xerr": xerr, - "capsize": 3, "marker": 'o', "markersize": 8} + err_kwargs = {"xerr": xerr, "capsize": 3, "marker": "o", "markersize": 8} _object["label"] = label _object["efficiency"] = efficiency @@ -145,21 +150,26 @@ def _plot_efficiency_curve(self): label = self.cfg["test_objects"][obj_key]["label"] - err_kwargs = {"xerr": self.turnon_collection.xerr(obj_key), - "capsize": 3, "marker": 'o', "markersize": 8} - ax.errorbar(xbins, efficiency, yerr=yerr, label=label, - **err_kwargs) + err_kwargs = { + "xerr": self.turnon_collection.xerr(obj_key), + "capsize": 3, + "marker": "o", + "markersize": 8, + } + ax.errorbar(xbins, efficiency, yerr=yerr, label=label, **err_kwargs) self._style_plot(fig, ax) ax.set_ylim(0, 1.1) - plot_fname = f"{self.outdir}/{self.version}/turnons/{self.plot_name}_{self.turnon_collection.threshold}_{self.version}" - for ext in [".png",".pdf"]: - plt.savefig(f"{plot_fname}{ext}") - self._save_json(f"{plot_fname}.json") - ## save config - with open(f"{plot_fname}.yaml", "w") as outfile: - yaml.dump({self.plot_name:self.cfg}, outfile, default_flow_style=False) + # Save figure + plot_fname = f"{self.plot_name}_{self.threshold}_{self.version}" + plt.savefig(os.path.join(self._outdir_turnons, f"{plot_fname}.png")) + plt.savefig(os.path.join(self._outdir_turnons, f"{plot_fname}.pdf")) + self._save_json(os.path.join(self._outdir_turnons, f"{plot_fname}.json")) + + # Save config + with open(os.path.join(self._outdir_turnons, f"{plot_fname}.json"), "w") as f: + yaml.dump({self.plot_name: self.cfg}, f, default_flow_style=False) plt.close() @@ -179,20 +189,20 @@ def _plot_iso_vs_efficiency_curve(self): # yerr = np.sqrt(iso_vs_eff_hist) # TODO: Possibly introduce errors label = self.cfg["test_objects"][obj_key]["label"] - err_kwargs = {"capsize": 3, "marker": 'o', "markersize": 8} + err_kwargs = {"capsize": 3, "marker": "o", "markersize": 8} ax.errorbar(xbins, iso_vs_eff_hist, label=label, **err_kwargs) self._style_plot(fig, ax) + # Save figure + plot_fname = f"{self.plot_name}_{self.threshold}_{self.version}" + plt.savefig(os.path.join(self._outdir_turnons, f"{plot_fname}.png")) + plt.savefig(os.path.join(self._outdir_turnons, f"{plot_fname}.pdf")) + self._save_json(os.path.join(self._outdir_turnons, f"{plot_fname}.json")) - plot_fname = f"{self.outdir}/{self.version}/turnons/{self.plot_name}_{self.turnon_collection.threshold}_{self.version}" - for ext in [".png",".pdf"]: - plt.savefig(f"{plot_fname}{ext}") - self._save_json(f"{plot_fname}.json") - - ## save config - with open(f"{plot_fname}.yaml", "w") as outfile: - yaml.dump({self.plot_name:self.cfg}, outfile, default_flow_style=False) + # Save config + with open(os.path.join(self._outdir_turnons, f"{plot_fname}.json"), "w") as f: + yaml.dump({self.plot_name: self.cfg}, f, default_flow_style=False) plt.close() @@ -206,11 +216,22 @@ def _plot_raw_counts(self): xbins = 0.5 * (xbins[1:] + xbins[:-1]) for obj_key, ref_hist in self.turnon_collection.hists["ref"].items(): - err_kwargs = {"xerr": self.turnon_collection.xerr(obj_key), - "capsize": 1, "marker": 'o', "markersize": 2, - "linestyle": "None"} - - ref_hist = ax.step(xbins, ref_hist[0], where="mid", label = "ref: " + obj_key , ls = "--", color = "k") + err_kwargs = { + "xerr": self.turnon_collection.xerr(obj_key), + "capsize": 1, + "marker": "o", + "markersize": 2, + "linestyle": "None", + } + + ref_hist = ax.step( + xbins, + ref_hist[0], + where="mid", + label="ref: " + obj_key, + ls="--", + color="k", + ) label = self.cfg["reference_object"]["label"] for obj_key, gen_hist_trig in self.turnon_collection.hists.items(): @@ -219,14 +240,20 @@ def _plot_raw_counts(self): yerr = np.sqrt(gen_hist_trig[0]) label = self.cfg["test_objects"][obj_key]["label"] test_hist = ax.step(xbins, gen_hist_trig[0], where="mid") - ax.errorbar(xbins, gen_hist_trig[0], yerr=yerr, label=label, - color=test_hist[0].get_color(), **err_kwargs) + ax.errorbar( + xbins, + gen_hist_trig[0], + yerr=yerr, + label=label, + color=test_hist[0].get_color(), + **err_kwargs, + ) self._style_plot(fig, ax) - plot_fname = f"{self.outdir}/{self.version}/distributions/{self.plot_name}_{self.turnon_collection.threshold}_dist_{self.version}" - for ext in [".png",".pdf"]: - plt.savefig(f"{plot_fname}{ext}") - #self._save_json(f"{plot_fname}.json") + # Save figure + plot_fname = f"{self.plot_name}_{self.threshold}_dist_{self.version}" + plt.savefig(os.path.join(self._outdir_distributions, f"{plot_fname}.png")) + plt.savefig(os.path.join(self._outdir_distributions, f"{plot_fname}.pdf")) plt.close() @@ -239,13 +266,13 @@ def plot(self): self._plot_raw_counts() -class EfficiencyCentral(): +class EfficiencyCentral: """ Class that orchestrates the plotting of """ def __init__(self, cfg_plots_path): - with open(cfg_plots_path, 'r') as f: + with open(cfg_plots_path, "r") as f: self.cfg_plots = yaml.safe_load(f) def get_thresholds(self, cfg_plot: dict): @@ -275,15 +302,20 @@ def run(self): turnon_collection = TurnOnCollection(cfg_plot, threshold) turnon_collection.create_hists() - plotter = EfficiencyPlotter(plot_name, cfg_plot, - turnon_collection) + plotter = EfficiencyPlotter(plot_name, cfg_plot, turnon_collection) plotter.plot() class ScalingPlotter(Plotter): - - def __init__(self, plot_name: str, cfg_plot: dict, scalings: dict, - scaling_pct: float, version: str, params: dict): + def __init__( + self, + plot_name: str, + cfg_plot: dict, + scalings: dict, + scaling_pct: float, + version: str, + params: dict, + ): self.plot_name = plot_name self.cfg_plot = cfg_plot self.scalings = scalings @@ -294,7 +326,7 @@ def __init__(self, plot_name: str, cfg_plot: dict, scalings: dict, def _params_to_func_str(self, obj): a = round(self.params[obj][0], 3) b = round(self.params[obj][1], 3) - pm = '+' if b > 0 else '-' + pm = "+" if b > 0 else "-" return f"y = {a} x {pm} {abs(b)}" def _set_plot_ranges(self, ax): @@ -308,21 +340,19 @@ def _set_plot_ranges(self, ax): ax.set_xlim(0, xmax) ax.set_ylim(0, ymax) - def _save_json(self, file_name): - # file_name = = f"{self.outdir}/{self.version}/scalings/{self.plot_name}.json" - plot = {} - - watermark = f"{self.version}_{self.plot_name}" - plot["watermark"] = watermark + def _save_json(self, fpath: str) -> None: + plot: dict[str, Any] = {"watermark": f"{self.version}_{self.plot_name}"} for obj, points in self.scalings.items(): _object = {} x_points = list(points.keys()) y_points = list(points.values()) - label = (self.cfg_plot["test_objects"][obj]["label"] - + ", " - + self._params_to_func_str(obj)) + label = ( + self.cfg_plot["test_objects"][obj]["label"] + + ", " + + self._params_to_func_str(obj) + ) _object["xvals"] = x_points _object["yvals"] = y_points @@ -330,7 +360,7 @@ def _save_json(self, file_name): plot[obj] = _object - with open(f"{file_name}", "w") as outfile: + with open(fpath, "w") as outfile: outfile.write(json.dumps(plot, indent=4)) def plot(self): @@ -340,11 +370,13 @@ def plot(self): for obj, points in self.scalings.items(): x_points = np.array(list(points.keys())) y_points = np.array(list(points.values())) - pts = ax.plot(x_points, y_points, 'o') + pts = ax.plot(x_points, y_points, "o") - label = (self.cfg_plot["test_objects"][obj]["label"] - + ", " - + self._params_to_func_str(obj)) + label = ( + self.cfg_plot["test_objects"][obj]["label"] + + ", " + + self._params_to_func_str(obj) + ) a, b = self.params[obj] x = np.linspace(0, 2500, 20) y = utils.scaling_func(x, a, b) @@ -354,33 +386,41 @@ def plot(self): ax.set_xlabel("L1 threshold [GeV]") ax.set_ylabel(f"{int(self.scaling_pct*100)}% Location (gen, GeV)") watermark = f"{self.version}_{self.plot_name}" - ax.text(0, -0.1, watermark, - color="grey", alpha=0.2, - fontsize=20, - transform=ax.transAxes) + ax.text( + 0, + -0.1, + watermark, + color="grey", + alpha=0.2, + fontsize=20, + transform=ax.transAxes, + ) self._set_plot_ranges(ax) fig.tight_layout() - plot_fname = f"{self.outdir}/{self.version}/scalings/{self.plot_name}_{self.version}" - for ext in [".png",".pdf"]: + plot_fname = ( + f"{self.outdir}/{self.version}/scalings/{self.plot_name}_{self.version}" + ) + for ext in [".png", ".pdf"]: plt.savefig(f"{plot_fname}{ext}") self._save_json(f"{plot_fname}.json") ## save config with open(f"{plot_fname}.yaml", "w") as outfile: - yaml.dump({self.plot_name:self.cfg_plot}, outfile, default_flow_style=False) + yaml.dump( + {self.plot_name: self.cfg_plot}, outfile, default_flow_style=False + ) plt.close() class ScalingCentral: - outdir = "outputs/object_performance/" def __init__(self, cfg_plots_path): - with open(cfg_plots_path, 'r') as f: + with open(cfg_plots_path, "r") as f: self.cfg_plots = yaml.safe_load(f) - with open("./configs/scaling_thresholds.yaml", 'r') as f: + with open("./configs/scaling_thresholds.yaml", "r") as f: self.scaling_thresholds = yaml.safe_load(f) def _get_scaling_thresholds(self, cfg_plot, test_obj): @@ -400,24 +440,25 @@ def _get_scaling_thresholds(self, cfg_plot, test_obj): return self.scaling_thresholds["Tau"] if any("Jet" in x for x in cfg_plot["test_objects"]): return self.scaling_thresholds["Jet"] - raise RuntimeError( - "Failed to find thresholds in cfg_scaling_thresholds!" - ) + raise RuntimeError("Failed to find thresholds in cfg_scaling_thresholds!") def _rate_config_function(self, name: str, a: float, b: float): - pm = '+' if b < 0 else '' - f_string = (f"function :: {name}OfflineEtCut :: " - f"args:=(offline); lambda:=(offline{pm}{-b:.3f})/{a:.3f}") + pm = "+" if b < 0 else "" + f_string = ( + f"function :: {name}OfflineEtCut :: " + f"args:=(offline); lambda:=(offline{pm}{-b:.3f})/{a:.3f}" + ) return f_string - def _write_scalings_to_file(self, - plot_name: str, - version: str, - params: dict): - with open(f"{self.outdir}/{version}/scalings/{plot_name}_scalings_{version}.txt", 'w+') as f: - f.write('') + def _write_scalings_to_file(self, plot_name: str, version: str, params: dict): + with open( + f"{self.outdir}/{version}/scalings/{plot_name}_scalings_{version}.txt", "w+" + ) as f: + f.write("") - with open(f"{self.outdir}/{version}/scalings/{plot_name}_scalings_{version}.txt", 'a') as f: + with open( + f"{self.outdir}/{version}/scalings/{plot_name}_scalings_{version}.txt", "a" + ) as f: for obj, obj_params in params.items(): a, b = obj_params f.write(self._rate_config_function(obj, a, b) + "\n") @@ -440,22 +481,19 @@ def run(self): turnon_collection.create_hists() scaling_pct = turnon_collection.cfg_plot.scaling_pct method = turnon_collection.cfg_plot.scaling_method - scaling_collect = ScalingCollection(cfg_plot, - method, - scaling_pct) + scaling_collect = ScalingCollection(cfg_plot, method, scaling_pct) version = turnon_collection.version - scal = scaling_collect._compute_scalings(turnon_collection, - test_obj, - scal, - scaling_pct, - method) + scal = scaling_collect._compute_scalings( + turnon_collection, test_obj, scal, scaling_pct, method + ) bar.finish() scalings[test_obj] = scal[test_obj] params = scaling_collect._fit_linear_functions(scalings) if params: - plotter = ScalingPlotter(plot_name, cfg_plot, scalings, - scaling_pct, version, params) + plotter = ScalingPlotter( + plot_name, cfg_plot, scalings, scaling_pct, version, params + ) plotter.plot() self._write_scalings_to_file(plot_name, version, params) @@ -465,7 +503,7 @@ def run(self): parser.add_argument( "cfg_plots", default="cfg_plots/muons.yaml", - help="Path of YAML file specifying the desired plots." + help="Path of YAML file specifying the desired plots.", ) args = parser.parse_args() @@ -474,4 +512,3 @@ def run(self): scalings = ScalingCentral(args.cfg_plots) scalings.run() - diff --git a/menu_tools/object_performance/quality_obj.py b/menu_tools/object_performance/quality_obj.py index 8d256b68..66cbab36 100644 --- a/menu_tools/object_performance/quality_obj.py +++ b/menu_tools/object_performance/quality_obj.py @@ -1,27 +1,28 @@ -class L1IsoCut(): - +class L1IsoCut: def __init__(self, ak_arrays, obj: str, IsoBB=-1, IsoEE=-1, l1_iso="iso"): ak_arrays = ak_arrays[obj] # TODO: remove obj arg self.IsoBB = IsoBB self.IsoEE = IsoEE self.l1_iso = l1_iso - self.sel_iso_BB = ak_arrays['eta'] > -100 - self.sel_iso_EE = ak_arrays['eta'] > -100 + self.sel_iso_BB = ak_arrays["eta"] > -100 + self.sel_iso_EE = ak_arrays["eta"] > -100 if self.IsoBB >= 0: - self.sel_iso_BB = ((abs(ak_arrays['eta']) < 1.479) - & (ak_arrays[self.l1_iso] > self.IsoBB)) + self.sel_iso_BB = (abs(ak_arrays["eta"]) < 1.479) & ( + ak_arrays[self.l1_iso] > self.IsoBB + ) if self.IsoEE >= 0: - self.sel_iso_EE = ((abs(ak_arrays['eta']) > 1.479) - & (ak_arrays[self.l1_iso] > self.IsoEE)) + self.sel_iso_EE = (abs(ak_arrays["eta"]) > 1.479) & ( + ak_arrays[self.l1_iso] > self.IsoEE + ) @property def ISO_EEBB(self): return self.sel_iso_EE | self.sel_iso_BB -class Quality(): +class Quality: """ Class implementing the L1 quality criteria. Hardware criteria to be decide with Menu team. @@ -29,73 +30,83 @@ class Quality(): def __init__(self, ak_arrays, obj: str): ak_arrays = ak_arrays[obj] # TODO: remove obj arg - #print("Computing quality for ", obj) - - self.sel_lowEta = ((abs(ak_arrays['eta']) < 0.9) - & (ak_arrays['region'] != 1)) - self.sel_midEta = ((abs(ak_arrays['eta']) > 0.9) - & (abs(ak_arrays['eta']) < 1.2) - & (ak_arrays['region'] != 2)) - self.sel_highEta = ((abs(ak_arrays['eta']) > 1.2) - & (ak_arrays['region'] != 3)) - - self.sel_qualities = ((ak_arrays['quality'] != 11) - & (ak_arrays['quality'] != 13) - & (ak_arrays['quality'] != 14) - & (ak_arrays['quality'] != 15) - & (ak_arrays['region'] == 3)) - self.sel_qual_12 = ((ak_arrays['quality'] < 12) - & (ak_arrays['region'] == 2)) - self.sel_qual_0 = ((ak_arrays['quality'] == 0) - & (ak_arrays['region'] == 3)) - self.sel_qual_1 = ((ak_arrays['quality'] < 2) - & (ak_arrays['region'] == 1)) - self.sel_qual_3 = ((ak_arrays['quality'] != 3) - & (ak_arrays['region'] == 1)) - self.sel_qual_5 = ((ak_arrays['quality'] != 5) - & (ak_arrays['region'] == 1)) - self.sel_qualOnly_12 = (ak_arrays['quality'] < 12) - - self.sel_midEta_qual = ((abs(ak_arrays['eta']) > 0.9) - & (abs(ak_arrays['eta']) < 1.2) - & (ak_arrays['region'] == 3)) - - self.sel_odd = (ak_arrays['quality'] % 2 == 0) - self.sel_odd_type = ((ak_arrays['quality'] % 2 == 0) - & (ak_arrays['region'] == 1)) - self.sel_not_4 = (ak_arrays['region'] == 4) - + # print("Computing quality for ", obj) + + self.sel_lowEta = (abs(ak_arrays["eta"]) < 0.9) & (ak_arrays["region"] != 1) + self.sel_midEta = ( + (abs(ak_arrays["eta"]) > 0.9) + & (abs(ak_arrays["eta"]) < 1.2) + & (ak_arrays["region"] != 2) + ) + self.sel_highEta = (abs(ak_arrays["eta"]) > 1.2) & (ak_arrays["region"] != 3) + + self.sel_qualities = ( + (ak_arrays["quality"] != 11) + & (ak_arrays["quality"] != 13) + & (ak_arrays["quality"] != 14) + & (ak_arrays["quality"] != 15) + & (ak_arrays["region"] == 3) + ) + self.sel_qual_12 = (ak_arrays["quality"] < 12) & (ak_arrays["region"] == 2) + self.sel_qual_0 = (ak_arrays["quality"] == 0) & (ak_arrays["region"] == 3) + self.sel_qual_1 = (ak_arrays["quality"] < 2) & (ak_arrays["region"] == 1) + self.sel_qual_3 = (ak_arrays["quality"] != 3) & (ak_arrays["region"] == 1) + self.sel_qual_5 = (ak_arrays["quality"] != 5) & (ak_arrays["region"] == 1) + self.sel_qualOnly_12 = ak_arrays["quality"] < 12 + + self.sel_midEta_qual = ( + (abs(ak_arrays["eta"]) > 0.9) + & (abs(ak_arrays["eta"]) < 1.2) + & (ak_arrays["region"] == 3) + ) + + self.sel_odd = ak_arrays["quality"] % 2 == 0 + self.sel_odd_type = (ak_arrays["quality"] % 2 == 0) & (ak_arrays["region"] == 1) + self.sel_not_4 = ak_arrays["region"] == 4 ### EG IDs from 123x - self.sel_tkIsoPho_123 = ((ak_arrays['quality'] > 0 ) & (abs(ak_arrays['eta']) < 1.479)) | ((ak_arrays['quality'] == 3 ) & (abs(ak_arrays['eta']) >= 1.479)) - + self.sel_tkIsoPho_123 = ( + (ak_arrays["quality"] > 0) & (abs(ak_arrays["eta"]) < 1.479) + ) | ((ak_arrays["quality"] == 3) & (abs(ak_arrays["eta"]) >= 1.479)) ## EG IDs from 125x # for EG: region == HGC if "passeseleid" in ak_arrays.fields: - self.sel_EG_barrelID = (ak_arrays['region'] == 0) & (ak_arrays['passeseleid'] == 1) + self.sel_EG_barrelID = (ak_arrays["region"] == 0) & ( + ak_arrays["passeseleid"] == 1 + ) else: - self.sel_EG_barrelID = (ak_arrays['region'] == 0) & (((ak_arrays['quality'] >> 1)&1) > 0) + self.sel_EG_barrelID = (ak_arrays["region"] == 0) & ( + ((ak_arrays["quality"] >> 1) & 1) > 0 + ) if "passessaid" in ak_arrays.fields: - self.sel_EG_endcapID = (ak_arrays['region'] == 1) & (ak_arrays['passessaid'] == 1) + self.sel_EG_endcapID = (ak_arrays["region"] == 1) & ( + ak_arrays["passessaid"] == 1 + ) else: - self.sel_EG_endcapID = (ak_arrays['region'] == 1) & (((ak_arrays['quality'] >> 0)&1) > 0) + self.sel_EG_endcapID = (ak_arrays["region"] == 1) & ( + ((ak_arrays["quality"] >> 0) & 1) > 0 + ) # for EG: quality = HwQual, alt approach: use HW qual bits directly instead of the menu ntuple variables: bit0: SA, 1: Ele, 2: Pho - #self.sel_EG_barrelID = (ak_arrays['region'] == 0) & (((ak_arrays['quality'] >> 1)&1) > 0) - #self.sel_EG_endcapID = (ak_arrays['region'] == 1) & (((ak_arrays['quality'] >> 0)&1) > 0) + # self.sel_EG_barrelID = (ak_arrays['region'] == 0) & (((ak_arrays['quality'] >> 1)&1) > 0) + # self.sel_EG_endcapID = (ak_arrays['region'] == 1) & (((ak_arrays['quality'] >> 0)&1) > 0) ## tkPhoton from 125x - #self.sel_tkPho_barrelID = (ak_arrays['region'] == 0) & (ak_arrays['passeseleid'] == 1) - #self.sel_tkPho_endcapID = (ak_arrays['region'] == 1) & (ak_arrays['passesphoid'] == 1) + # self.sel_tkPho_barrelID = (ak_arrays['region'] == 0) & (ak_arrays['passeseleid'] == 1) + # self.sel_tkPho_endcapID = (ak_arrays['region'] == 1) & (ak_arrays['passesphoid'] == 1) if "passesphoid" in ak_arrays.fields: - self.sel_tkPho_endcapID = (ak_arrays['region'] == 1) & (ak_arrays['passesphoid'] == 1) + self.sel_tkPho_endcapID = (ak_arrays["region"] == 1) & ( + ak_arrays["passesphoid"] == 1 + ) else: - self.sel_tkPho_endcapID = (ak_arrays['region'] == 1) & (((ak_arrays['quality'] >> 2)&1) > 0) + self.sel_tkPho_endcapID = (ak_arrays["region"] == 1) & ( + ((ak_arrays["quality"] >> 2) & 1) > 0 + ) - #self.sel_tkPho_barrelID = (ak_arrays['region'] == 0) & (((ak_arrays['quality'] >> 1)&1) > 0) - #self.sel_tkPho_endcapID = (ak_arrays['region'] == 1) & (((ak_arrays['quality'] >> 2)&1) > 0) + # self.sel_tkPho_barrelID = (ak_arrays['region'] == 0) & (((ak_arrays['quality'] >> 1)&1) > 0) + # self.sel_tkPho_endcapID = (ak_arrays['region'] == 1) & (((ak_arrays['quality'] >> 2)&1) > 0) @property def QUAL_125x_EGID(self): @@ -103,7 +114,7 @@ def QUAL_125x_EGID(self): @property def QUAL_125x_tkPhoID(self): - #return ~(self.sel_tkPho_barrelID | self.sel_tkPho_endcapID) + # return ~(self.sel_tkPho_barrelID | self.sel_tkPho_endcapID) return ~(self.sel_EG_barrelID | self.sel_tkPho_endcapID) @property @@ -136,8 +147,7 @@ def QUAL_CorrectRegion(self): @property def QUAL_Endcap1CorrectRegion(self): - return (self.sel_lowEta | self.sel_midEta | self.sel_highEta - | self.sel_qual_0) + return self.sel_lowEta | self.sel_midEta | self.sel_highEta | self.sel_qual_0 @property def QUAL_BarrelOddEndcap2(self): @@ -161,8 +171,13 @@ def QUAL_Odd(self): @property def QUAL_Overlap12Endcap1CorrectRegion(self): - return (self.sel_lowEta | self.sel_midEta | self.sel_highEta - | self.sel_qual_12 | self.sel_qual_0) + return ( + self.sel_lowEta + | self.sel_midEta + | self.sel_highEta + | self.sel_qual_12 + | self.sel_qual_0 + ) @property def QUAL_12(self): diff --git a/menu_tools/object_performance/scaling_collection.py b/menu_tools/object_performance/scaling_collection.py index 3fab8a95..f219d200 100644 --- a/menu_tools/object_performance/scaling_collection.py +++ b/menu_tools/object_performance/scaling_collection.py @@ -6,7 +6,7 @@ from menu_tools.utils import utils -class ScalingCollection(): +class ScalingCollection: """ Collection of scaling values corresponding to one scaling plot. This requires the input of multiple @@ -14,14 +14,11 @@ class ScalingCollection(): objects. """ - def __init__(self, - cfg: PlotConfig, - method: str, - plateau_pct: float = 0.95): + def __init__(self, cfg: PlotConfig, method: str, plateau_pct: float = 0.95): self.cfg = cfg self.method = method self.plateau_pct = plateau_pct - self.scalings = {x: {} for x in self.cfg["test_objects"]} + self.scalings: dict[str, dict] = {x: {} for x in self.cfg["test_objects"]} self.fit_function_params = None def _find_percentage_point(self, hist, bins, scaling_pct): @@ -38,30 +35,29 @@ def _find_turnon_cut(self, graph_x, graph_y, Target): L = 0 R = np.max(graph_x) - while (R - L > 0.0001): + while R - L > 0.0001: C = (L + R) / 2 V = self._get_point_on_curve(C, graph_x, graph_y) - if (V < Target): + if V < Target: L = C else: R = C - return (R + L) / 2. + return (R + L) / 2.0 def _find_turnon_fit(self, function, popt, _min, _max, target): - if ((function(_min, *popt) > target) - | (function(_max, *popt) < target)): + if (function(_min, *popt) > target) | (function(_max, *popt) < target): return -1000 L = _min R = _max - while (R - L > 0.0001): + while R - L > 0.0001: C = (L + R) / 2 V = function(C, *popt) - if (V < target): + if V < target: L = C else: R = C @@ -69,10 +65,7 @@ def _find_turnon_fit(self, function, popt, _min, _max, target): return (R + L) / 2 @utils.ignore_warnings - def _compute_value_of_tanh_at_threshold(self, - efficiency, - bins, - threshold): + def _compute_value_of_tanh_at_threshold(self, efficiency, bins, threshold): xvals = np.array(bins) efficiency = np.array(efficiency) @@ -88,29 +81,28 @@ def _compute_value_of_tanh_at_threshold(self, return s_val @utils.ignore_warnings - def _compute_value_of_errf_at_threshold(self, - efficiency, - bins, - scaling_pct): + def _compute_value_of_errf_at_threshold(self, efficiency, bins, scaling_pct): xvals = np.array(bins) efficiency = np.array(efficiency) xvals = xvals[~np.isnan(efficiency)] efficiency = efficiency[~np.isnan(efficiency)] - popt, pcov = curve_fit(utils.errf, xvals, efficiency, - p0=[0.02, 80, 20, 1, np.min(efficiency)] - ) + popt, pcov = curve_fit( + utils.errf, xvals, efficiency, p0=[0.02, 80, 20, 1, np.min(efficiency)] + ) - s_val = self._find_turnon_fit(utils.errf, popt, - np.min(xvals), np.max(xvals) * 10, - scaling_pct * utils.errf(10000, *popt) - ) + s_val = self._find_turnon_fit( + utils.errf, + popt, + np.min(xvals), + np.max(xvals) * 10, + scaling_pct * utils.errf(10000, *popt), + ) return s_val def _interpolate(self, H, K1, K2): - A = np.ones(len(K1)) * (-K2) B = [k1i + 2 * K2 for k1i in K1] C = np.ones(len(K1)) * (-K2) @@ -141,11 +133,10 @@ def _interpolate(self, H, K1, K2): return Y def _get_point_on_curve(self, x, graph_x, graph_y): - - if (x < graph_x[0]): + if x < graph_x[0]: return 0 - if (x >= graph_x[len(graph_x) - 1]): + if x >= graph_x[len(graph_x) - 1]: return 1 xr = graph_x[0] @@ -155,22 +146,20 @@ def _get_point_on_curve(self, x, graph_x, graph_y): yl = yr xr = graph_x[i + 1] yr = graph_y[i + 1] - if ((x < xr) & (x >= xl)): + if (x < xr) & (x >= xl): return yl + (yr - yl) / (xr - xl) * (x - xl) return -1 - def _compute_scalings_naive(self, - turnon_collection, - test_obj, - scalings, - scaling_pct): + def _compute_scalings_naive( + self, turnon_collection, test_obj, scalings, scaling_pct + ): bins = turnon_collection.bins bins = 0.5 * (bins[1:] + bins[:-1]) threshold = turnon_collection.threshold for obj_key, gen_hist_trig in turnon_collection.hists.items(): - if ((obj_key == "ref") | (obj_key != test_obj)): + if (obj_key == "ref") | (obj_key != test_obj): continue efficiency, yerr = turnon_collection.get_efficiency(obj_key) @@ -187,84 +176,68 @@ def _compute_scalings_naive(self, K1.append(1 / (er_dn[i] + er_up[i]) / (er_up[i] + er_dn[i])) percentage_point = self._find_turnon_cut( - xbins, - self._interpolate(efficiency, K1, 100), - scaling_pct + xbins, self._interpolate(efficiency, K1, 100), scaling_pct ) if percentage_point: scalings[obj_key][threshold] = percentage_point return scalings - def _compute_scalings_tanh(self, - turnon_collection, - test_obj, - scalings, - scaling_pct): + def _compute_scalings_tanh( + self, turnon_collection, test_obj, scalings, scaling_pct + ): bins = turnon_collection.bins bins = 0.5 * (bins[1:] + bins[:-1]) threshold = turnon_collection.threshold for obj_key, gen_hist_trig in turnon_collection.hists.items(): - if ((obj_key == "ref") | (obj_key != test_obj)): + if (obj_key == "ref") | (obj_key != test_obj): continue efficiency, _ = turnon_collection.get_efficiency(obj_key) percentage_point = self._compute_value_of_tanh_at_threshold( - efficiency, - bins, - scaling_pct + efficiency, bins, scaling_pct ) if percentage_point: scalings[obj_key][threshold] = percentage_point return scalings - def _compute_scalings_errf(self, - turnon_collection, - test_obj, - scalings, - scaling_pct): + def _compute_scalings_errf( + self, turnon_collection, test_obj, scalings, scaling_pct + ): bins = turnon_collection.bins bins = 0.5 * (bins[1:] + bins[:-1]) threshold = turnon_collection.threshold for obj_key, gen_hist_trig in turnon_collection.hists.items(): - if ((obj_key == "ref") | (obj_key != test_obj)): + if (obj_key == "ref") | (obj_key != test_obj): continue efficiency, _ = turnon_collection.get_efficiency(obj_key) percentage_point = self._compute_value_of_errf_at_threshold( - efficiency, - bins, - scaling_pct + efficiency, bins, scaling_pct ) if percentage_point: scalings[obj_key][threshold] = percentage_point return scalings - def _compute_scalings(self, turnon_collection, test_obj, scalings, - scaling_pct, method="tanh") -> dict: + def _compute_scalings( + self, turnon_collection, test_obj, scalings, scaling_pct, method="tanh" + ) -> dict: if method == "tanh": return self._compute_scalings_tanh( - turnon_collection, - test_obj, - scalings, - scaling_pct + turnon_collection, test_obj, scalings, scaling_pct ) if method == "errf": return self._compute_scalings_errf( - turnon_collection, - test_obj, - scalings, - scaling_pct + turnon_collection, test_obj, scalings, scaling_pct ) if method == "naive": return self._compute_scalings_naive( - turnon_collection, - test_obj, - scalings, - scaling_pct + turnon_collection, test_obj, scalings, scaling_pct ) + else: + raise ValueError(f"`{method}` is not a valid scaling method!") def _fit_linear_functions(self, scalings): params = {} @@ -280,4 +253,3 @@ def _fit_linear_functions(self, scalings): if __name__ == "__main__": pass - diff --git a/menu_tools/object_performance/tests/conftest.py b/menu_tools/object_performance/tests/conftest.py index 620881ce..ed782f48 100644 --- a/menu_tools/object_performance/tests/conftest.py +++ b/menu_tools/object_performance/tests/conftest.py @@ -6,30 +6,89 @@ def met_config(): cfg_plot = { "sample": "TT", "default_version": "V22", - "reference_object": { - "object": "genMetTrue", - "suffix": "", - "label": "Gen MET" - }, + "reference_object": {"object": "genMetTrue", "suffix": "", "label": "Gen MET"}, "test_objects": { - "trackerMET": { - "suffix": "", - "label": "Tracker MET" - }, - "puppiMET": { - "suffix": "Et", - "label": "Puppi MET" - }, + "trackerMET": {"suffix": "", "label": "Tracker MET"}, + "puppiMET": {"suffix": "Et", "label": "Puppi MET"}, }, "binning": {"min": 0, "max": 500, "step": 20}, - "trackerMETTruth": [17671, 8214, 6463, 5321, 4212, 3308, 2453, 1811, - 1146, 759, 482, 307, 261, 154, 93, 73, 61, 32, 22, - 18, 20, 14, 8, 7], - "puppiMETTruth": [31222, 14025, 13874, 13621, 11387, 8429, 5670, 3644, - 2133, 1306, 766, 460, 352, 222, 145, 98, 81, 45, 29, - 21, 24, 15, 9, 7], - "genMETTruth": [130238, 51518, 40197, 29181, 18620, 11269, 6729, 3975, - 2255, 1353, 791, 470, 355, 225, 148, 98, 81, 45, 30, - 21, 25, 15, 9, 7], + "trackerMETTruth": [ + 17671, + 8214, + 6463, + 5321, + 4212, + 3308, + 2453, + 1811, + 1146, + 759, + 482, + 307, + 261, + 154, + 93, + 73, + 61, + 32, + 22, + 18, + 20, + 14, + 8, + 7, + ], + "puppiMETTruth": [ + 31222, + 14025, + 13874, + 13621, + 11387, + 8429, + 5670, + 3644, + 2133, + 1306, + 766, + 460, + 352, + 222, + 145, + 98, + 81, + 45, + 29, + 21, + 24, + 15, + 9, + 7, + ], + "genMETTruth": [ + 130238, + 51518, + 40197, + 29181, + 18620, + 11269, + 6729, + 3975, + 2255, + 1353, + 791, + 470, + 355, + 225, + 148, + 98, + 81, + 45, + 30, + 21, + 25, + 15, + 9, + 7, + ], } return cfg_plot diff --git a/menu_tools/object_performance/tests/test_integration.py b/menu_tools/object_performance/tests/test_integration.py index e2c04709..e0d2e7e7 100644 --- a/menu_tools/object_performance/tests/test_integration.py +++ b/menu_tools/object_performance/tests/test_integration.py @@ -1,4 +1,4 @@ -from turnon_collection import TurnOnCollection +from menu_tools.object_performance.turnon_collection import TurnOnCollection def off_test_turnon_collection_met(met_config): @@ -11,18 +11,31 @@ def off_test_turnon_collection_met(met_config): turnon_collection = TurnOnCollection(met_config, 70) turnon_collection.create_hists() - assert all([x == y for x, y in zip( - list(turnon_collection.hists["trackerMET"][0]), - met_config["trackerMETTruth"] - )]) + assert all( + [ + x == y + for x, y in zip( + list(turnon_collection.hists["trackerMET"][0]), + met_config["trackerMETTruth"], + ) + ] + ) - assert all([x == y for x, y in zip( - list(turnon_collection.hists["puppiMET"][0]), - met_config["puppiMETTruth"] - )]) - - assert all([x == y for x, y in zip( - list(turnon_collection.hists["ref"][0]), - met_config["genMETTruth"] - )]) + assert all( + [ + x == y + for x, y in zip( + list(turnon_collection.hists["puppiMET"][0]), + met_config["puppiMETTruth"], + ) + ] + ) + assert all( + [ + x == y + for x, y in zip( + list(turnon_collection.hists["ref"][0]), met_config["genMETTruth"] + ) + ] + ) diff --git a/menu_tools/object_performance/tests/test_turnon_collection.py b/menu_tools/object_performance/tests/test_turnon_collection.py index b887d795..5ee90a70 100644 --- a/menu_tools/object_performance/tests/test_turnon_collection.py +++ b/menu_tools/object_performance/tests/test_turnon_collection.py @@ -2,7 +2,7 @@ import awkward as ak -from turnon_collection import TurnOnCollection +from menu_tools.object_performance.turnon_collection import TurnOnCollection def test_select_highest_pt_ref_object(): @@ -17,16 +17,13 @@ def test_select_highest_pt_ref_object(): TurnOnCollection._set_bins = MagicMock() turnon_collection = TurnOnCollection(None, None) arr_content = [[], [None]] + [ - [float(f"{i}.{k}") for k in range(3)] - for i in range(5) + [float(f"{i}.{k}") for k in range(3)] for i in range(5) ] - idx_empty = [i for i, x in enumerate(arr_content) - if len(x) == 0 or x[0] is None] + idx_empty = [i for i, x in enumerate(arr_content) if len(x) == 0 or x[0] is None] turnon_collection.ak_arrays = {} - turnon_collection.ak_arrays["ref"] = ak.Array({ - "pt": arr_content, - "other": arr_content - }) + turnon_collection.ak_arrays["ref"] = ak.Array( + {"pt": arr_content, "other": arr_content} + ) # Execute selection of highest pt reference object turnon_collection._select_highest_pt_ref_object() diff --git a/menu_tools/object_performance/tests/test_utils.py b/menu_tools/object_performance/tests/test_utils.py index 80c39253..7df338ed 100644 --- a/menu_tools/object_performance/tests/test_utils.py +++ b/menu_tools/object_performance/tests/test_utils.py @@ -1,11 +1,11 @@ -import utils +from menu_tools.object_performance.utils import utils def test_get_pdg_id(): - electrons = ['e', 'ele', 'electron'] - muons = ['mu', 'muon'] - taus = ['tau'] - photons = ['photon', 'gamma'] + electrons = ["e", "ele", "electron"] + muons = ["mu", "muon"] + taus = ["tau"] + photons = ["photon", "gamma"] for particle in electrons: assert utils.get_pdg_id(particle) == 11 @@ -21,12 +21,12 @@ def test_get_pdg_id(): def test_str_to_op(): - op_less_than = utils.str_to_op('<') - op_less_equal = utils.str_to_op('<=') - op_equal = utils.str_to_op('==') - op_unequal = utils.str_to_op('!=') - op_greater_than = utils.str_to_op('>') - op_greater_equal = utils.str_to_op('>=') + op_less_than = utils.str_to_op("<") + op_less_equal = utils.str_to_op("<=") + op_equal = utils.str_to_op("==") + op_unequal = utils.str_to_op("!=") + op_greater_than = utils.str_to_op(">") + op_greater_equal = utils.str_to_op(">=") assert op_less_than(2, 5) assert not op_less_than(5, 2) diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index 38806cfe..5d785c40 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -12,8 +12,7 @@ vector.register_awkward() -class ArrayLoader(): - +class ArrayLoader: def __init__(self, turnon_collection): self.turnon_collection = turnon_collection @@ -36,8 +35,8 @@ def _map_region(self, test_array, obj: str): Needed from V25 after the barrel and endcap collections have been merged. """ - if 'hgc' in test_array.fields: - test_array["region"] = (ak.where(abs(test_array["eta"]) > 1.479, 1, 0)) + if "hgc" in test_array.fields: + test_array["region"] = ak.where(abs(test_array["eta"]) > 1.479, 1, 0) return test_array @@ -55,10 +54,7 @@ def _load_array_from_parquet(self, obj: str): f"{obj}.parquet" ) array = ak.from_parquet(fname) - array_dict = { - self._transform_key(key, obj): array[key] - for key in array.fields - } + array_dict = {self._transform_key(key, obj): array[key] for key in array.fields} if self.turnon_collection.cfg_plot.reference_trafo: array = ak.Array(array_dict) else: @@ -95,8 +91,7 @@ def load_arrays(self): self._load_test_branches() -class TurnOnCollection(): - +class TurnOnCollection: def __init__(self, cfg_plot, threshold): self.cfg_plot = PlotConfig(cfg_plot) self.version = self.cfg_plot.version_ref_object @@ -131,19 +126,25 @@ def _match_test_to_ref(self): for test_obj, obj_cfg in self.cfg_plot.test_objects.items(): suffix = obj_cfg["suffix"].lower() ref_test = ak.cartesian( - {"ref": self.ak_arrays["ref"], - "test": self.ak_arrays[test_obj]}, - nested=True + {"ref": self.ak_arrays["ref"], "test": self.ak_arrays[test_obj]}, + nested=True, ) js, gs = ak.unzip(ref_test) dR = gs.deltaR(js) pass_dR = dR < self.cfg_plot.get_match_dR(test_obj) - pt_max = ak.argmax(ref_test["test"]["pt"][pass_dR], axis=-1, - keepdims=True) - if ("iso" not in suffix): - self.numerators["ref"][test_obj] = ref_test["ref"][suffix][pass_dR][pt_max][:, :, 0] # noqa - self.numerators["test"][test_obj] = ref_test["test"][suffix][pass_dR][pt_max][:, :, 0] # noqa + pt_max = ak.argmax(ref_test["test"]["pt"][pass_dR], axis=-1, keepdims=True) + if "iso" not in suffix: + self.numerators["ref"][test_obj] = ref_test["ref"][suffix][pass_dR][ + pt_max + ][ + :, :, 0 + ] # noqa + self.numerators["test"][test_obj] = ref_test["test"][suffix][pass_dR][ + pt_max + ][ + :, :, 0 + ] # noqa def _flatten_array(self, ak_array, ak_to_np=False): """ @@ -170,8 +171,8 @@ def _compute_MHT(self): _px = self.ak_arrays["ref"].px _py = self.ak_arrays["ref"].py _mht = np.sqrt( - ak.sum(_px[:, :], axis=-1, keepdims=True)**2 - + ak.sum(_py[:, :], axis=-1, keepdims=True)**2 + ak.sum(_px[:, :], axis=-1, keepdims=True) ** 2 + + ak.sum(_py[:, :], axis=-1, keepdims=True) ** 2 ) return _mht @@ -186,8 +187,7 @@ def _reduce_to_per_event(self): field = cfg["suffix"].lower() try: self.ak_arrays[test_obj][field] = ak.max( - self.ak_arrays[test_obj][field], - axis=1 + self.ak_arrays[test_obj][field], axis=1 ) except ValueError: pass @@ -202,10 +202,7 @@ def _apply_reference_trafo(self): return if trafo == "HT": - self.ak_arrays["ref"]["HT"] = ak.sum( - self.ak_arrays["ref"]["pt"], - axis=-1 - ) + self.ak_arrays["ref"]["HT"] = ak.sum(self.ak_arrays["ref"]["pt"], axis=-1) if trafo == "MHT": gen_mht = self._compute_MHT() @@ -225,7 +222,9 @@ def _apply_quality_cuts(self): return ## force quality bit to be int! - self.ak_arrays[test_obj]["quality"] = ak.values_astype(self.ak_arrays[test_obj]["quality"], np.int32) + self.ak_arrays[test_obj]["quality"] = ak.values_astype( + self.ak_arrays[test_obj]["quality"], np.int32 + ) quality = Quality(self.ak_arrays, test_obj) sel = ~getattr(quality, quality_id) @@ -242,11 +241,10 @@ def _apply_L1_isolation_cuts(self): iso_EE = self.cfg_plot.get_iso_EE(test_obj) l1_iso = self.cfg_plot.get_l1_iso(test_obj) - if ((iso_BB == -1) & (iso_EE == -1)): + if (iso_BB == -1) & (iso_EE == -1): continue - isolation = L1IsoCut(self.ak_arrays, test_obj, - iso_BB, iso_EE, l1_iso) + isolation = L1IsoCut(self.ak_arrays, test_obj, iso_BB, iso_EE, l1_iso) sel = ~getattr(isolation, "ISO_EEBB") self.ak_arrays[test_obj] = self.ak_arrays[test_obj][sel] @@ -262,9 +260,7 @@ def _select_highest_pt_ref_object(self): def _apply_list_of_reference_cuts(self, cut_list): for cut in cut_list: - cut = re.sub(r"{([^&|]*)}", - r"self.ak_arrays['ref']['\1']", - cut) + cut = re.sub(r"{([^&|]*)}", r"self.ak_arrays['ref']['\1']", cut) sel = eval(cut) self.ak_arrays["ref"] = self.ak_arrays["ref"][sel] @@ -301,28 +297,23 @@ def _apply_test_obj_cuts(self): if not (cuts := self.cfg_plot.get_object_cuts(test_obj)): continue for cut in cuts: - cut = re.sub(r"{([^&|]*)}", - r"self.ak_arrays[test_obj]['\1']", - cut) + cut = re.sub(r"{([^&|]*)}", r"self.ak_arrays[test_obj]['\1']", cut) sel = eval(cut) self.ak_arrays[test_obj] = self.ak_arrays[test_obj][sel] def _skim_to_hists(self): ref_field = self.cfg_plot.reference_field - if (trafo := self.cfg_plot.reference_trafo): + if trafo := self.cfg_plot.reference_trafo: ref_field = trafo for test_obj, cfg in self.cfg_plot.test_objects.items(): field = cfg["suffix"].lower() sel = self.ak_arrays[test_obj][field] > self.threshold - ak_array = self._flatten_array( - self.ak_arrays["ref"][sel][ref_field] - ) + ak_array = self._flatten_array(self.ak_arrays["ref"][sel][ref_field]) self.hists[test_obj] = np.histogram(ak_array, bins=self.bins) self.hists["ref"][test_obj] = np.histogram( - self._flatten_array(self.ak_arrays["ref"][ref_field]), - bins=self.bins + self._flatten_array(self.ak_arrays["ref"][ref_field]), bins=self.bins ) def _remove_inner_nones_zeros(self, arr): @@ -334,9 +325,7 @@ def _remove_inner_nones_zeros(self, arr): def _skim_to_hists_dR_matched(self): ref_field = self.cfg_plot.reference_field - ref_obj = self._remove_inner_nones_zeros( - self.ak_arrays["ref"][ref_field] - ) + ref_obj = self._remove_inner_nones_zeros(self.ak_arrays["ref"][ref_field]) for test_obj, cfg in self.cfg_plot.test_objects.items(): sel_threshold = self.numerators["test"][test_obj] >= self.threshold @@ -352,8 +341,7 @@ def _skim_to_hists_dR_matched(self): ref_obj = self.numerators["ref"][test_obj] ref_obj = self._remove_inner_nones_zeros(ref_obj) ref_flat_np = self._flatten_array(ref_obj, ak_to_np=True) - self.hists["ref"][test_obj] = np.histogram(ref_flat_np, - bins=self.bins) + self.hists["ref"][test_obj] = np.histogram(ref_flat_np, bins=self.bins) def _skim_to_hists_dR_matched_Iso(self): for test_obj, cfg in self.cfg_plot.test_objects.items(): diff --git a/menu_tools/utils/utils.py b/menu_tools/utils/utils.py index 8459458f..576cf067 100644 --- a/menu_tools/utils/utils.py +++ b/menu_tools/utils/utils.py @@ -12,12 +12,12 @@ def str_to_op(x: str): op_map = { - '<': operator.lt, - '<=': operator.le, - '==': operator.eq, - '!=': operator.ne, - '>=': operator.ge, - '>': operator.gt, + "<": operator.lt, + "<=": operator.le, + "==": operator.eq, + "!=": operator.ne, + ">=": operator.ge, + ">": operator.gt, } return op_map[x] @@ -38,14 +38,14 @@ def clopper_pearson_err(x_hist, n_hist, alpha=1 - 0.68, warn="ignore"): def get_pdg_id(particle: str): id_map = { - 'e': 11, - 'ele': 11, - 'electron': 11, - 'mu': 13, - 'muon': 13, - 'tau': 15, - 'photon': 22, - 'gamma': 22, + "e": 11, + "ele": 11, + "electron": 11, + "mu": 13, + "muon": 13, + "tau": 15, + "photon": 22, + "gamma": 22, } return id_map[particle.lower()] @@ -63,9 +63,7 @@ def get_branches(ntuple_path: str, tree: str, obj: str): else: prefix = "L1PhaseII/" - obj_branches = [ - x.removeprefix(prefix + obj) for x in all_branches if obj in x - ] + obj_branches = [x.removeprefix(prefix + obj) for x in all_branches if obj in x] return obj_branches @@ -90,6 +88,7 @@ def errf(x: float, a: float, b: float, c: float, d: float, e: float): _cdf_back = norm.cdf(a * (x - b), a * a * c * c, a * c) * (d - e) + e return _cdf_front - _exp_turnon * _cdf_back + ############## # Decorators # ############## @@ -100,6 +99,7 @@ def wrapper(*args, **kwargs): with warnings.catch_warnings(): warnings.simplefilter("ignore") return func(*args, **kwargs) + return wrapper @@ -110,9 +110,9 @@ def wrapper(*args, **kwargs): t0 = time.time() result = func(*args, **kwargs) t1 = time.time() - print(f"{task} completed in " - f"{timedelta(seconds=round(t1 - t0, 0))}s") + print(f"{task} completed in " f"{timedelta(seconds=round(t1 - t0, 0))}s") return result + return wrapper - return decorator + return decorator diff --git a/pyproject.toml b/pyproject.toml index 7d898768..974033f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ packages = [ ] [tool.poetry.dependencies] -python = "^3.11.0" +python = "~3.11.0" awkward = "2.5.2" fsspec = "2023.12.2" pyyaml = "6.0.1" @@ -38,6 +38,7 @@ vector = "1.1.1.post1" [tool.poetry.group.dev.dependencies] black = "23.12.1" mypy = "1.8.0" +flake8 = "^7.0.0" [tool.poetry.group.test.dependencies] pytest = "7.4.3" @@ -54,3 +55,13 @@ pythonpath = [ testpaths = [ "tests", ] + +[tool.mypy] +files = [ + "menu_tools" +] +disable_error_code = [ + "import-untyped", + "index" +] +explicit_package_bases = true From 5e1cb0bcaaaf6c457efa612d85f09d4a1280bea7 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 17 Jan 2024 15:55:56 +0100 Subject: [PATCH 031/140] add working version of objects class utility and electron configuration --- configs/V29/objects/electrons.yaml | 51 ++++++++++++++ menu_tools/utils/objects.py | 103 +++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 configs/V29/objects/electrons.yaml create mode 100644 menu_tools/utils/objects.py diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml new file mode 100644 index 00000000..235840eb --- /dev/null +++ b/configs/V29/objects/electrons.yaml @@ -0,0 +1,51 @@ +part_e: + label: "Gen Electron" + eta_ranges: + range_0: [0, 5] + ids: + gen_electron_default: + cuts: + range_0: + - "{dr_0.3} < 0.15" + +# full obj name: tkElectron_NoIso, tkElectron_Iso +tkElectron: + match_dR: 0.15 + eta_ranges: + range_0: [0, 5] + range_1: [0, 1.479] + range_2: [1.479, 5] + ids: + NoIso: + label: "TkElectron" + cuts: + eta_range_0: + - "abs({eta}) < 2.4" + - "{passeseleid} == 1" + Iso: + label: "TkIsoElectron" + cuts: + range_0: + - "abs({eta}) < 2.4" # electron_trigger.yaml: 2.8, in menu two uses w/o eta cut and w/ cut@2.4 + - "{passeseleid} == 1" + range_1: + - "abs({trkiso}) > 0.13" + range_2: + - "abs({trkiso}) > 0.28" + +EG: + match_dR: 0.2 + eta_ranges: + range_0: [0, 5] + range_1: [0, 1.479] + range_2: [1.479, 2.4] + label: "EG" + ids: + default: + cuts: + range_0: + - "abs({eta}) < 2.4" + range_1: + - "{passeseleid} == 0" + range_2: + - "{passessaid} == 0" diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py new file mode 100644 index 00000000..bb43d0e2 --- /dev/null +++ b/menu_tools/utils/objects.py @@ -0,0 +1,103 @@ +import glob +import yaml + + +class Object: + """This class represents a physics object. + + The objects are configurable under `configs//objects`. + + Attributes: + eta_ranges: ranges with different cuts/quality criteria + cuts: the cuts to be applied in the different eta ranges + version: version of the menu + """ + + def __init__(self, nano_obj_name: str, obj_id_name: str, version: str) -> None: + """Initializes an Object loading the parameters from the + corresponding config file. + + Args: + nano_obj_name: name of the physics object in the l1 ntuples + obj_id_name: name of the l1 object id as defined in `configs` + version: version of the menu + """ + self.nano_obj_name = nano_obj_name + self.obj_id_name = obj_id_name + self.version = version + self.obj_name = f"{nano_obj_name}_{obj_id_name}" + + @property + def _nano_obj(self) -> dict[str, dict]: + """ + Loads all object configuration files from self.version, + merges them and returns the configuration of self.nano_obj_name. + + Returns: + nano_obj_configs: dictionary containing the object parameters and ids + """ + nano_obj_configs = {} + config_path = f"configs/{self.version}/objects/e*.y*ml" + config_files = glob.glob(config_path) + + for config in config_files: + with open(config, "r") as f: + _conf_dict = yaml.safe_load(f) + nano_obj_configs = nano_obj_configs | _conf_dict + + return nano_obj_configs[self.nano_obj_name] + + def _get_object_default_params(self) -> dict: + """Get default paramters of the object. + + Returns: + default_object_params: dict contianing all parameters of the nano + object except ids. + """ + default_object_params = {x: y for x, y in self._nano_obj.items() if x != "ids"} + return default_object_params + + def _get_object_id_params(self) -> dict: + """Get the specific parameters specified in the object id. + + Returns: + id_params: parameters specifically definied for the object id. + """ + id_params = self._nano_obj["ids"][self.obj_id_name] + return id_params + + @property + def _object_params(self) -> dict: + """ + Returns: + object_parameters: Parameters of the objects as a dict where + defaults are overwritten if id specific params are configured. + """ + defaults = self._get_object_default_params() + id_specific = self._get_object_id_params() + object_parameters = defaults | id_specific + return object_parameters + + @property + def match_dR(self) -> float: + return self._object_params["match_dR"] + + @property + def plot_label(self) -> str: + return self._object_params["label"] + + @property + def eta_ranges(self) -> dict[str, tuple]: + return self._object_params["eta_ranges"] + + @property + def cuts(self) -> dict[str, list[str]]: + return self._object_params["cuts"] + + +if __name__ == "__main__": + x = Object("tkElectron", "Iso", "V29") + print(x.match_dR) + print(x.plot_label) + print(x.eta_ranges) + print(x.cuts) From 8b500e44ce340e039a42ba9a0fb02fb7232e222f Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 17 Jan 2024 21:23:11 +0100 Subject: [PATCH 032/140] develop objects --- configs/V29/objects/electrons.yaml | 5 +- menu_tools/object_performance/plot_config.py | 104 ++------- menu_tools/object_performance/plotter.py | 10 +- .../object_performance/turnon_collection.py | 216 ++++++++---------- menu_tools/utils/objects.py | 16 +- 5 files changed, 137 insertions(+), 214 deletions(-) diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index 235840eb..0caabbdf 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -1,4 +1,5 @@ part_e: + sample: DYLL_M50 label: "Gen Electron" eta_ranges: range_0: [0, 5] @@ -10,6 +11,7 @@ part_e: # full obj name: tkElectron_NoIso, tkElectron_Iso tkElectron: + sample: DYLL_M50 match_dR: 0.15 eta_ranges: range_0: [0, 5] @@ -19,7 +21,7 @@ tkElectron: NoIso: label: "TkElectron" cuts: - eta_range_0: + range_0: - "abs({eta}) < 2.4" - "{passeseleid} == 1" Iso: @@ -34,6 +36,7 @@ tkElectron: - "abs({trkiso}) > 0.28" EG: + sample: DYLL_M50 match_dR: 0.2 eta_ranges: range_0: [0, 5] diff --git a/menu_tools/object_performance/plot_config.py b/menu_tools/object_performance/plot_config.py index d4189494..9dfaf5c9 100644 --- a/menu_tools/object_performance/plot_config.py +++ b/menu_tools/object_performance/plot_config.py @@ -2,21 +2,12 @@ class PlotConfig: - def __init__(self, cfg: dict[str, Any]): + def __init__(self, cfg: dict[str, Any]) -> None: self._cfg = cfg @property - def sample(self) -> str: - return self._cfg["sample"] - - @property - def version_ref_object(self): - try: - return self._cfg["reference_object"]["version"] - except KeyError: - return self._cfg["default_version"] - except TypeError: - return None + def version(self) -> str: + return self._cfg["version"] @property def iso_vs_eff_plot(self): @@ -29,6 +20,10 @@ def iso_vs_eff_plot(self): def reference_object(self): return self._cfg["reference_object"]["object"] + @property + def reference_object_sample(self): + return self._cfg["reference_object"]["sample"] + @property def reference_event_cuts(self): try: @@ -51,43 +46,25 @@ def reference_trafo(self): return None @property - def test_objects(self) -> dict[str, dict]: - return self._cfg["test_objects"] + def test_objects(self) -> dict[str, str]: + test_obj = { + x: {"base_obj": x.split("-")[0], "id": x.split("-")[1], "x_arg": x_arg} + for x, x_arg in self._cfg["test_objects"].items() + } + return test_obj - def get_match_dR(self, test_obj): + @property + def matching(self): try: - return self._cfg["test_objects"][test_obj]["match_dR"] + return self._cfg["match_test_to_ref"] except KeyError: - return self._cfg["match_dR"] - - @property - def matching_configured(self): - if "match_dR" in self._cfg.keys(): - return True - for test_obj in self._cfg["test_objects"].values(): - test_keys = test_obj.keys() - if "match_dR" not in test_keys: - return False - return True - - @property - def reference_object_field(self): - ref_obj = self._cfg["reference_object"]["object"] - field = self._cfg["reference_object"]["suffix"] - return ref_obj + field + return False @property def reference_field(self): - field = self._cfg["reference_object"]["suffix"] + field = self._cfg["reference_object"]["x_arg"] return field.lower() - @property - def reference_iso_threshold(self): - try: - return self._cfg["reference_object"]["iso_threshold"] - except KeyError: - return None - @property def bin_width(self): return self._cfg["binning"]["step"] @@ -107,48 +84,3 @@ def scaling_pct(self): @property def scaling_method(self): return self._cfg["scalings"]["method"] - - def get_object_cuts(self, obj): - obj_cfg = self._cfg["test_objects"][obj] - try: - return obj_cfg["cuts"] - except KeyError: - return None - - def get_test_object_version(self, obj): - obj_cfg = self._cfg["test_objects"][obj] - - try: - return obj_cfg["version"] - except KeyError: - return self._cfg["default_version"] - - def get_quality_id(self, obj): - try: - return self._cfg["test_objects"][obj]["quality_id"] - except KeyError: - return None - - def get_base_obj(self, obj): - try: - return self._cfg["test_objects"][obj]["base_obj"] - except KeyError: - return obj - - def get_iso_BB(self, obj): - try: - return self._cfg["test_objects"][obj]["iso_BB"] - except KeyError: - return -1 - - def get_iso_EE(self, obj): - try: - return self._cfg["test_objects"][obj]["iso_EE"] - except KeyError: - return -1 - - def get_l1_iso(self, obj): - try: - return self._cfg["test_objects"][obj]["iso_branch"] - except KeyError: - return None diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index f20663e5..f586d712 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -109,7 +109,7 @@ def _save_json(self, file_name): xbins = xbins.tolist() efficiency = efficiency.tolist() - label = self.cfg["test_objects"][obj_key]["label"] + label = "foo" # TODO: FIX THIS!!! self.cfg["test_objects"][obj_key]["label"] err_kwargs = {"xerr": xerr, "capsize": 3, "marker": "o", "markersize": 8} @@ -148,7 +148,7 @@ def _plot_efficiency_curve(self): continue efficiency, yerr = self.turnon_collection.get_efficiency(obj_key) - label = self.cfg["test_objects"][obj_key]["label"] + label = "foo" # TODO: fix this! self.cfg["test_objects"][obj_key]["label"] err_kwargs = { "xerr": self.turnon_collection.xerr(obj_key), @@ -188,7 +188,7 @@ def _plot_iso_vs_efficiency_curve(self): iso_vs_eff_hist = self._get_iso_vs_eff_hist(gen_hist_trig[0]) # yerr = np.sqrt(iso_vs_eff_hist) # TODO: Possibly introduce errors - label = self.cfg["test_objects"][obj_key]["label"] + label = "foo" # TODO: fix -- self.cfg["test_objects"][obj_key]["label"] err_kwargs = {"capsize": 3, "marker": "o", "markersize": 8} ax.errorbar(xbins, iso_vs_eff_hist, label=label, **err_kwargs) @@ -238,7 +238,7 @@ def _plot_raw_counts(self): if obj_key == "ref": continue yerr = np.sqrt(gen_hist_trig[0]) - label = self.cfg["test_objects"][obj_key]["label"] + label = "foo" # TODO: fix this!!! -- self.cfg["test_objects"][obj_key]["label"] test_hist = ax.step(xbins, gen_hist_trig[0], where="mid") ax.errorbar( xbins, @@ -259,7 +259,7 @@ def _plot_raw_counts(self): def plot(self): self._make_output_dirs(self.version) - if "Iso" in self.cfg["xlabel"]: + if "iso" in self.cfg["xlabel"].lower(): self._plot_iso_vs_efficiency_curve() else: self._plot_efficiency_curve() diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index 5d785c40..abe4c39f 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -5,16 +5,17 @@ import vector from menu_tools.object_performance.plot_config import PlotConfig -from menu_tools.object_performance.quality_obj import Quality, L1IsoCut from menu_tools.utils import utils +from menu_tools.utils.objects import Object vector.register_awkward() class ArrayLoader: - def __init__(self, turnon_collection): + def __init__(self, turnon_collection, cfg_plot: PlotConfig): self.turnon_collection = turnon_collection + self.cfg_plot = cfg_plot def _transform_key(self, raw_key: str, obj: str): """ @@ -28,19 +29,7 @@ def _transform_key(self, raw_key: str, obj: str): else: return key - def _map_region(self, test_array, obj: str): - """ - This method serves to map a 'region' branch - to the correct eta region in the detector. - Needed from V25 after the barrel and endcap - collections have been merged. - """ - if "hgc" in test_array.fields: - test_array["region"] = ak.where(abs(test_array["eta"]) > 1.479, 1, 0) - - return test_array - - def _load_array_from_parquet(self, obj: str): + def _load_array_from_parquet(self, obj: str, sample: str): """ Loads the specified parquet file into an ak array. The keys are @@ -48,42 +37,41 @@ def _load_array_from_parquet(self, obj: str): in self._transform_key(). """ fname = ( - f"cache/{self.turnon_collection.cfg_plot.version_ref_object}/" - f"{self.turnon_collection.cfg_plot.version_ref_object}_" - f"{self.turnon_collection.cfg_plot.sample}_" + f"cache/{self.cfg_plot.version}/" + f"{self.cfg_plot.version}_" + f"{sample}_" f"{obj}.parquet" ) array = ak.from_parquet(fname) array_dict = {self._transform_key(key, obj): array[key] for key in array.fields} - if self.turnon_collection.cfg_plot.reference_trafo: + if self.cfg_plot.reference_trafo: array = ak.Array(array_dict) else: array = ak.zip(array_dict) return array - def _load_ref_branches(self): + def _load_ref_branches(self) -> None: """ Load reference object. """ ref_array = self._load_array_from_parquet( - self.turnon_collection.cfg_plot.reference_object + self.cfg_plot.reference_object, self.cfg_plot.reference_object_sample ) ref_array = ak.with_name(ref_array, "Momentum4D") self.turnon_collection.ak_arrays["ref"] = ref_array - def _load_test_branches(self): + def _load_test_branches(self) -> None: """ Load test objects. """ - test_objects = self.turnon_collection.cfg_plot.test_objects + test_objects = self.cfg_plot.test_objects for test_obj, obj_cfg in test_objects.items(): - obj_name = self.turnon_collection.cfg_plot.get_base_obj(test_obj) - test_array = self._load_array_from_parquet(obj_name) + obj = Object(obj_cfg["base_obj"], obj_cfg["id"], self.cfg_plot.version) + test_array = self._load_array_from_parquet(obj.nano_obj_name, obj.sample) test_array = ak.with_name(test_array, "Momentum4D") - test_array = self._map_region(test_array, test_obj) - self.turnon_collection.ak_arrays[test_obj] = test_array + self.turnon_collection.ak_arrays[obj.name] = test_array - def load_arrays(self): + def load_arrays(self) -> None: """ Load ak arrays from cache (parquet) files. """ @@ -92,16 +80,33 @@ def load_arrays(self): class TurnOnCollection: - def __init__(self, cfg_plot, threshold): + def __init__(self, cfg_plot: dict, threshold: float): self.cfg_plot = PlotConfig(cfg_plot) - self.version = self.cfg_plot.version_ref_object + self.version = self.cfg_plot.version self.threshold = threshold self.ak_arrays = {} self.numerators = {"ref": {}, "test": {}} self.hists = {"ref": {}} @property - def bins(self): + def test_objects(self) -> list[tuple[Object, str]]: + """Instantiates all test objects. + + Returns: + obj_args: list containig tuples of test objects and their x_args. + """ + obj_args = [] + + test_objects = self.cfg_plot.test_objects + for test_obj, obj_cfg in test_objects.items(): + obj = Object(obj_cfg["base_obj"], obj_cfg["id"], self.cfg_plot.version) + x_arg = obj_cfg["x_arg"].lower() + obj_args.append((obj, x_arg)) + + return obj_args + + @property + def bins(self) -> np.ndarray: """ Set bins according to configuration. """ @@ -110,11 +115,11 @@ def bins(self): xmin = self.cfg_plot.bin_min return np.arange(xmin, xmax, bin_width) - def _load_arrays(self): + def _load_arrays(self) -> None: """ Load ak arrays from cache (parquet) files. """ - loader = ArrayLoader(self) + loader = ArrayLoader(self, self.cfg_plot) loader.load_arrays() def _match_test_to_ref(self): @@ -123,28 +128,23 @@ def _match_test_to_ref(self): to reference objects. Selects highest pT deltaR-matched reco lepton. """ - for test_obj, obj_cfg in self.cfg_plot.test_objects.items(): - suffix = obj_cfg["suffix"].lower() + for test_obj, x_arg in self.test_objects: ref_test = ak.cartesian( - {"ref": self.ak_arrays["ref"], "test": self.ak_arrays[test_obj]}, + {"ref": self.ak_arrays["ref"], "test": self.ak_arrays[test_obj.name]}, nested=True, ) js, gs = ak.unzip(ref_test) dR = gs.deltaR(js) - pass_dR = dR < self.cfg_plot.get_match_dR(test_obj) + pass_dR = dR < test_obj.match_dR pt_max = ak.argmax(ref_test["test"]["pt"][pass_dR], axis=-1, keepdims=True) - if "iso" not in suffix: - self.numerators["ref"][test_obj] = ref_test["ref"][suffix][pass_dR][ + if "iso" not in x_arg: + self.numerators["ref"][test_obj.name] = ref_test["ref"][x_arg][pass_dR][ pt_max - ][ - :, :, 0 - ] # noqa - self.numerators["test"][test_obj] = ref_test["test"][suffix][pass_dR][ + ][:, :, 0] + self.numerators["test"][test_obj.name] = ref_test["test"][x_arg][pass_dR][ pt_max - ][ - :, :, 0 - ] # noqa + ][:, :, 0] def _flatten_array(self, ak_array, ak_to_np=False): """ @@ -183,11 +183,10 @@ def _reduce_to_per_event(self): for some of which one number per event is stored in the branches and for some of which one number per jet is stored. """ - for test_obj, cfg in self.cfg_plot.test_objects.items(): - field = cfg["suffix"].lower() + for test_obj, x_arg in self.test_objects: try: - self.ak_arrays[test_obj][field] = ak.max( - self.ak_arrays[test_obj][field], axis=1 + self.ak_arrays[test_obj.name][x_arg] = ak.max( + self.ak_arrays[test_obj.name][x_arg], axis=1 ) except ValueError: pass @@ -211,43 +210,6 @@ def _apply_reference_trafo(self): if trafo: self._reduce_to_per_event() - def _apply_quality_cuts(self): - """ - Function to implement quality criteria. - Events not fulfilling L1 hardware quality - criteria are filtered out. - """ - for test_obj in self.cfg_plot.test_objects: - if not (quality_id := self.cfg_plot.get_quality_id(test_obj)): - return - - ## force quality bit to be int! - self.ak_arrays[test_obj]["quality"] = ak.values_astype( - self.ak_arrays[test_obj]["quality"], np.int32 - ) - - quality = Quality(self.ak_arrays, test_obj) - sel = ~getattr(quality, quality_id) - self.ak_arrays[test_obj] = self.ak_arrays[test_obj][sel] - - def _apply_L1_isolation_cuts(self): - """ - Function to implement isolation criteria. - Events not fulfilling L1 Iso EE/BB quality - criteria are filtered out. - """ - for test_obj in self.cfg_plot.test_objects: - iso_BB = self.cfg_plot.get_iso_BB(test_obj) - iso_EE = self.cfg_plot.get_iso_EE(test_obj) - l1_iso = self.cfg_plot.get_l1_iso(test_obj) - - if (iso_BB == -1) & (iso_EE == -1): - continue - - isolation = L1IsoCut(self.ak_arrays, test_obj, iso_BB, iso_EE, l1_iso) - sel = ~getattr(isolation, "ISO_EEBB") - self.ak_arrays[test_obj] = self.ak_arrays[test_obj][sel] - def _select_highest_pt_ref_object(self): """ The raw cached arrays of the reference still contain @@ -264,11 +226,11 @@ def _apply_list_of_reference_cuts(self, cut_list): sel = eval(cut) self.ak_arrays["ref"] = self.ak_arrays["ref"][sel] - def _apply_reference_cuts(self): - """ - Applies configured cuts on reference objects. Should be - applied before any matching and before the selection of - the highest pT object. + def _apply_reference_cuts(self) -> None: + """Applies configured cuts on reference objects. + + Should be applied before any matching and before the + selection of the highest pT object. """ if self.cfg_plot.reference_trafo: ref_object_cuts = self.cfg_plot.reference_object_cuts @@ -288,31 +250,49 @@ def _apply_reference_cuts(self): self._apply_list_of_reference_cuts(ref_event_cuts) def _apply_test_obj_cuts(self): - """ - Applies configured cuts on all configured - test objects. + """Applies configured cuts on all configured test objects. + Should be applied before any matching. """ - for test_obj in self.cfg_plot.test_objects: - if not (cuts := self.cfg_plot.get_object_cuts(test_obj)): + for test_obj, _ in self.test_objects: + if not test_obj.cuts: continue - for cut in cuts: - cut = re.sub(r"{([^&|]*)}", r"self.ak_arrays[test_obj]['\1']", cut) - sel = eval(cut) - self.ak_arrays[test_obj] = self.ak_arrays[test_obj][sel] + for range_i, range_cuts in test_obj.cuts.items(): + for cut in range_cuts: + cut = re.sub( + r"{([^&|]*)}", r"self.ak_arrays[test_obj.name]['\1']", cut + ) + eta_sel = ( + self.ak_arrays[test_obj.name]["eta"] + > test_obj.eta_ranges[range_i][0] + ) & ( + self.ak_arrays[test_obj.name]["eta"] + < test_obj.eta_ranges[range_i][1] + ) + print(test_obj.eta_ranges[range_i], cut, " with `test_obj.name=", test_obj.name) + + sel = eval(cut) | ~eta_sel + self.ak_arrays[test_obj.name] = self.ak_arrays[test_obj.name][sel] + print(test_obj.name) + print(np.sum(ak.any(self.ak_arrays[test_obj.name]["pt"], axis=-1))) + # assert ak.all(self.ak_arrays["caloJet_default"]["eta"] < 5) + # print("assert passed") def _skim_to_hists(self): ref_field = self.cfg_plot.reference_field if trafo := self.cfg_plot.reference_trafo: ref_field = trafo - for test_obj, cfg in self.cfg_plot.test_objects.items(): - field = cfg["suffix"].lower() - sel = self.ak_arrays[test_obj][field] > self.threshold - ak_array = self._flatten_array(self.ak_arrays["ref"][sel][ref_field]) - self.hists[test_obj] = np.histogram(ak_array, bins=self.bins) + for test_obj, x_arg in self.test_objects: + sel = self.ak_arrays[test_obj.name][x_arg] > self.threshold + # for i in range(200): + # print(sel[i], self.ak_arrays["ref"][ref_field][i]) + sel = [False if not ak.any(x) else True for x in sel] # TODO: FIX THIS !!!! + self.ak_arrays["ref"][ref_field] + ak_array = self._flatten_array(self.ak_arrays["ref"][ref_field][sel]) + self.hists[test_obj.name] = np.histogram(ak_array, bins=self.bins) - self.hists["ref"][test_obj] = np.histogram( + self.hists["ref"][test_obj.name] = np.histogram( self._flatten_array(self.ak_arrays["ref"][ref_field]), bins=self.bins ) @@ -327,30 +307,30 @@ def _skim_to_hists_dR_matched(self): ref_obj = self._remove_inner_nones_zeros(self.ak_arrays["ref"][ref_field]) - for test_obj, cfg in self.cfg_plot.test_objects.items(): - sel_threshold = self.numerators["test"][test_obj] >= self.threshold - numerator = self.numerators["ref"][test_obj][sel_threshold] + for test_obj, _ in self.test_objects: + sel_threshold = self.numerators["test"][test_obj.name] >= self.threshold + numerator = self.numerators["ref"][test_obj.name][sel_threshold] numerator = self._remove_inner_nones_zeros(numerator) numerator = self._flatten_array(numerator, ak_to_np=True) # Create Test Object(s) Numpy Histogram - self.hists[test_obj] = np.histogram(numerator, bins=self.bins) + self.hists[test_obj.name] = np.histogram(numerator, bins=self.bins) # Create Reference Numpy Histogram if self.threshold >= 0: - ref_obj = self.numerators["ref"][test_obj] + ref_obj = self.numerators["ref"][test_obj.name] ref_obj = self._remove_inner_nones_zeros(ref_obj) ref_flat_np = self._flatten_array(ref_obj, ak_to_np=True) - self.hists["ref"][test_obj] = np.histogram(ref_flat_np, bins=self.bins) + self.hists["ref"][test_obj.name] = np.histogram(ref_flat_np, bins=self.bins) def _skim_to_hists_dR_matched_Iso(self): - for test_obj, cfg in self.cfg_plot.test_objects.items(): - numerator = self.numerators["test"][test_obj] + for test_obj, _ in self.test_objects: + numerator = self.numerators["test"][test_obj.name] numerator = self._remove_inner_nones_zeros(numerator) numerator = self._flatten_array(numerator, ak_to_np=True) # Create Test Object(s) Numpy Histogram - self.hists[test_obj] = np.histogram(numerator, bins=self.bins) + self.hists[test_obj.name] = np.histogram(numerator, bins=self.bins) def xerr(self, obj_key: str): ref_vals = self.hists["ref"][obj_key][0] @@ -374,14 +354,12 @@ def _apply_cuts(self): self._apply_reference_cuts() self._apply_reference_trafo() # Apply cuts on test objects - self._apply_quality_cuts() - self._apply_L1_isolation_cuts() self._apply_test_obj_cuts() def create_hists(self): self._load_arrays() self._apply_cuts() - if not self.cfg_plot.matching_configured: + if not self.cfg_plot.matching: self._skim_to_hists() else: self._match_test_to_ref() diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index bb43d0e2..6e4de344 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -25,7 +25,7 @@ def __init__(self, nano_obj_name: str, obj_id_name: str, version: str) -> None: self.nano_obj_name = nano_obj_name self.obj_id_name = obj_id_name self.version = version - self.obj_name = f"{nano_obj_name}_{obj_id_name}" + self.name = f"{nano_obj_name}_{obj_id_name}" @property def _nano_obj(self) -> dict[str, dict]: @@ -37,7 +37,7 @@ def _nano_obj(self) -> dict[str, dict]: nano_obj_configs: dictionary containing the object parameters and ids """ nano_obj_configs = {} - config_path = f"configs/{self.version}/objects/e*.y*ml" + config_path = f"configs/{self.version}/objects/*.y*ml" config_files = glob.glob(config_path) for config in config_files: @@ -92,12 +92,22 @@ def eta_ranges(self) -> dict[str, tuple]: @property def cuts(self) -> dict[str, list[str]]: - return self._object_params["cuts"] + try: + return self._object_params["cuts"] + except KeyError: + return None + + @property + def sample(self) -> str: + return self._object_params["sample"] if __name__ == "__main__": x = Object("tkElectron", "Iso", "V29") + x = Object("caloJet", "default", "V29") + print(x.name) print(x.match_dR) print(x.plot_label) print(x.eta_ranges) print(x.cuts) + print(x.sample) From f76232f9a69567e7b4e42b2710b20ca981d974d5 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 17 Jan 2024 22:01:39 +0100 Subject: [PATCH 033/140] fix jets_matching plots; remove old versions --- configs/V22/caching.yaml | 75 -------- .../V22/object_performance/electron_iso.yaml | 58 ------ .../object_performance/electron_matching.yaml | 94 ---------- .../electron_matching_eta.yaml | 96 ---------- .../object_performance/electron_trigger.yaml | 100 ----------- .../object_performance/jets_matching_eta.yaml | 88 --------- .../V22/object_performance/jets_trigger.yaml | 137 -------------- .../V22/object_performance/met_ht_mht.yaml | 169 ------------------ .../met_ht_mht_trigger.yaml | 114 ------------ configs/V22/object_performance/mht.yaml | 32 ---- .../object_performance/mht_comparison.yaml | 12 -- .../V22/object_performance/muon_matching.yaml | 101 ----------- .../object_performance/muon_matching_eta.yaml | 58 ------ .../V22/object_performance/muon_trigger.yaml | 140 --------------- .../V22/object_performance/photon_iso.yaml | 60 ------- .../V22/object_performance/tau_matching.yaml | 67 ------- .../tau_matching_GG_VBF.yaml | 55 ------ .../V22/object_performance/tau_trigger.yaml | 75 -------- .../version_comparison.yaml | 14 -- configs/V26/caching.yaml | 53 ------ .../V26/object_performance/electron_iso.yaml | 29 --- .../object_performance/electron_matching.yaml | 80 --------- .../electron_matching_eta.yaml | 72 -------- .../electron_matching_eta_test.yaml | 36 ---- .../object_performance/electron_trigger.yaml | 79 -------- .../object_performance/jets_matching_eta.yaml | 76 -------- .../V26/object_performance/jets_trigger.yaml | 113 ------------ .../V26/object_performance/met_ht_mht.yaml | 108 ----------- .../V26/object_performance/muon_matching.yaml | 101 ----------- .../object_performance/muon_matching_eta.yaml | 50 ------ .../V26/object_performance/muon_trigger.yaml | 35 ---- .../V26/object_performance/photon_iso.yaml | 58 ------ .../photons_matching_eta.yaml | 145 --------------- .../photons_matching_eta_iso.yaml | 161 ----------------- .../scaling_thresholds.yaml | 5 - .../V26/object_performance/tau_matching.yaml | 67 ------- .../V26/object_performance/tau_trigger.yaml | 75 -------- configs/V27/caching.yaml | 89 --------- configs/V27/caching_bTagNN.yaml | 10 -- .../V27/object_performance/electron_iso.yaml | 58 ------ .../object_performance/electron_matching.yaml | 92 ---------- .../electron_matching_eta.yaml | 92 ---------- .../electron_matching_eta_test.yaml | 34 ---- .../object_performance/electron_trigger.yaml | 99 ---------- .../V27/object_performance/jets_matching.yaml | 164 ----------------- .../object_performance/jets_matching_eta.yaml | 163 ----------------- .../V27/object_performance/jets_trigger.yaml | 137 -------------- .../object_performance/jets_trigger_fwd.yaml | 41 ----- .../V27/object_performance/met_ht_mht.yaml | 169 ------------------ configs/V27/object_performance/mht.yaml | 32 ---- .../V27/object_performance/muon_matching.yaml | 101 ----------- .../object_performance/muon_matching_eta.yaml | 58 ------ .../V27/object_performance/muon_trigger.yaml | 140 --------------- .../V27/object_performance/photon_iso.yaml | 60 ------- .../object_performance/photons_matching.yaml | 92 ---------- .../photons_matching_eta.yaml | 99 ---------- .../photons_matching_eta_iso.yaml | 161 ----------------- .../object_performance/photons_trigger.yaml | 100 ----------- .../scaling_thresholds.yaml | 5 - .../V27/object_performance/tau_matching.yaml | 67 ------- .../object_performance/tau_matching_wHH.yaml | 67 ------- .../V27/object_performance/tau_trigger.yaml | 151 ---------------- .../version_comparison.yaml | 44 ----- configs/V28/caching.yaml | 75 -------- .../V28/object_performance/electron_iso.yaml | 29 --- .../object_performance/electron_matching.yaml | 92 ---------- .../object_performance/electron_matching_eta | 88 --------- .../electron_matching_eta.yaml | 92 ---------- .../electron_matching_eta_test.yaml | 34 ---- .../electron_matching_new.yaml | 87 --------- .../object_performance/electron_trigger.yaml | 99 ---------- .../V28/object_performance/jets_matching.yaml | 164 ----------------- .../object_performance/jets_matching_eta.yaml | 163 ----------------- .../V28/object_performance/jets_trigger.yaml | 137 -------------- .../object_performance/jets_trigger_fwd.yaml | 41 ----- .../V28/object_performance/met_ht_mht.yaml | 114 ------------ .../V28/object_performance/muon_matching.yaml | 101 ----------- .../object_performance/muon_matching_eta.yaml | 58 ------ .../V28/object_performance/muon_trigger.yaml | 140 --------------- .../V28/object_performance/photon_iso.yaml | 58 ------ .../object_performance/photons_matching.yaml | 92 ---------- .../photons_matching_eta.yaml | 99 ---------- .../photons_matching_eta_IDtest.yaml | 156 ---------------- .../photons_matching_eta_iso.yaml | 161 ----------------- .../object_performance/photons_trigger.yaml | 100 ----------- .../scaling_thresholds.yaml | 5 - .../V28/object_performance/tau_matching.yaml | 67 ------- .../object_performance/tau_matching_wHH.yaml | 67 ------- .../V28/object_performance/tau_trigger.yaml | 75 -------- .../version_comparison.yaml | 44 ----- .../V29/object_performance/jets_matching.yaml | 122 +++---------- configs/V29/objects/jets.yaml | 56 ++++++ menu_tools/object_performance/plotter.py | 8 +- .../object_performance/turnon_collection.py | 13 +- 94 files changed, 88 insertions(+), 7762 deletions(-) delete mode 100644 configs/V22/caching.yaml delete mode 100644 configs/V22/object_performance/electron_iso.yaml delete mode 100644 configs/V22/object_performance/electron_matching.yaml delete mode 100644 configs/V22/object_performance/electron_matching_eta.yaml delete mode 100644 configs/V22/object_performance/electron_trigger.yaml delete mode 100644 configs/V22/object_performance/jets_matching_eta.yaml delete mode 100644 configs/V22/object_performance/jets_trigger.yaml delete mode 100644 configs/V22/object_performance/met_ht_mht.yaml delete mode 100644 configs/V22/object_performance/met_ht_mht_trigger.yaml delete mode 100644 configs/V22/object_performance/mht.yaml delete mode 100644 configs/V22/object_performance/mht_comparison.yaml delete mode 100644 configs/V22/object_performance/muon_matching.yaml delete mode 100644 configs/V22/object_performance/muon_matching_eta.yaml delete mode 100644 configs/V22/object_performance/muon_trigger.yaml delete mode 100644 configs/V22/object_performance/photon_iso.yaml delete mode 100644 configs/V22/object_performance/tau_matching.yaml delete mode 100644 configs/V22/object_performance/tau_matching_GG_VBF.yaml delete mode 100644 configs/V22/object_performance/tau_trigger.yaml delete mode 100644 configs/V22/object_performance/version_comparison.yaml delete mode 100644 configs/V26/caching.yaml delete mode 100644 configs/V26/object_performance/electron_iso.yaml delete mode 100644 configs/V26/object_performance/electron_matching.yaml delete mode 100644 configs/V26/object_performance/electron_matching_eta.yaml delete mode 100644 configs/V26/object_performance/electron_matching_eta_test.yaml delete mode 100644 configs/V26/object_performance/electron_trigger.yaml delete mode 100644 configs/V26/object_performance/jets_matching_eta.yaml delete mode 100644 configs/V26/object_performance/jets_trigger.yaml delete mode 100644 configs/V26/object_performance/met_ht_mht.yaml delete mode 100644 configs/V26/object_performance/muon_matching.yaml delete mode 100644 configs/V26/object_performance/muon_matching_eta.yaml delete mode 100644 configs/V26/object_performance/muon_trigger.yaml delete mode 100644 configs/V26/object_performance/photon_iso.yaml delete mode 100644 configs/V26/object_performance/photons_matching_eta.yaml delete mode 100644 configs/V26/object_performance/photons_matching_eta_iso.yaml delete mode 100644 configs/V26/object_performance/scaling_thresholds.yaml delete mode 100644 configs/V26/object_performance/tau_matching.yaml delete mode 100644 configs/V26/object_performance/tau_trigger.yaml delete mode 100644 configs/V27/caching.yaml delete mode 100644 configs/V27/caching_bTagNN.yaml delete mode 100644 configs/V27/object_performance/electron_iso.yaml delete mode 100644 configs/V27/object_performance/electron_matching.yaml delete mode 100644 configs/V27/object_performance/electron_matching_eta.yaml delete mode 100644 configs/V27/object_performance/electron_matching_eta_test.yaml delete mode 100644 configs/V27/object_performance/electron_trigger.yaml delete mode 100644 configs/V27/object_performance/jets_matching.yaml delete mode 100644 configs/V27/object_performance/jets_matching_eta.yaml delete mode 100644 configs/V27/object_performance/jets_trigger.yaml delete mode 100644 configs/V27/object_performance/jets_trigger_fwd.yaml delete mode 100644 configs/V27/object_performance/met_ht_mht.yaml delete mode 100644 configs/V27/object_performance/mht.yaml delete mode 100644 configs/V27/object_performance/muon_matching.yaml delete mode 100644 configs/V27/object_performance/muon_matching_eta.yaml delete mode 100644 configs/V27/object_performance/muon_trigger.yaml delete mode 100644 configs/V27/object_performance/photon_iso.yaml delete mode 100644 configs/V27/object_performance/photons_matching.yaml delete mode 100644 configs/V27/object_performance/photons_matching_eta.yaml delete mode 100644 configs/V27/object_performance/photons_matching_eta_iso.yaml delete mode 100644 configs/V27/object_performance/photons_trigger.yaml delete mode 100644 configs/V27/object_performance/scaling_thresholds.yaml delete mode 100644 configs/V27/object_performance/tau_matching.yaml delete mode 100644 configs/V27/object_performance/tau_matching_wHH.yaml delete mode 100644 configs/V27/object_performance/tau_trigger.yaml delete mode 100644 configs/V27/object_performance/version_comparison.yaml delete mode 100644 configs/V28/caching.yaml delete mode 100644 configs/V28/object_performance/electron_iso.yaml delete mode 100644 configs/V28/object_performance/electron_matching.yaml delete mode 100644 configs/V28/object_performance/electron_matching_eta delete mode 100644 configs/V28/object_performance/electron_matching_eta.yaml delete mode 100644 configs/V28/object_performance/electron_matching_eta_test.yaml delete mode 100644 configs/V28/object_performance/electron_matching_new.yaml delete mode 100644 configs/V28/object_performance/electron_trigger.yaml delete mode 100644 configs/V28/object_performance/jets_matching.yaml delete mode 100644 configs/V28/object_performance/jets_matching_eta.yaml delete mode 100644 configs/V28/object_performance/jets_trigger.yaml delete mode 100644 configs/V28/object_performance/jets_trigger_fwd.yaml delete mode 100644 configs/V28/object_performance/met_ht_mht.yaml delete mode 100644 configs/V28/object_performance/muon_matching.yaml delete mode 100644 configs/V28/object_performance/muon_matching_eta.yaml delete mode 100644 configs/V28/object_performance/muon_trigger.yaml delete mode 100644 configs/V28/object_performance/photon_iso.yaml delete mode 100644 configs/V28/object_performance/photons_matching.yaml delete mode 100644 configs/V28/object_performance/photons_matching_eta.yaml delete mode 100644 configs/V28/object_performance/photons_matching_eta_IDtest.yaml delete mode 100644 configs/V28/object_performance/photons_matching_eta_iso.yaml delete mode 100644 configs/V28/object_performance/photons_trigger.yaml delete mode 100644 configs/V28/object_performance/scaling_thresholds.yaml delete mode 100644 configs/V28/object_performance/tau_matching.yaml delete mode 100644 configs/V28/object_performance/tau_matching_wHH.yaml delete mode 100644 configs/V28/object_performance/tau_trigger.yaml delete mode 100644 configs/V28/object_performance/version_comparison.yaml create mode 100644 configs/V29/objects/jets.yaml diff --git a/configs/V22/caching.yaml b/configs/V22/caching.yaml deleted file mode 100644 index 6340be58..00000000 --- a/configs/V22/caching.yaml +++ /dev/null @@ -1,75 +0,0 @@ -V22: - DY: - ntuple_path: /eos/cms/store/cmst3/group/l1tr/phase2Menu/EmuDev/DYToLL_M-50_TuneCP5_14TeV-pythia8/DY_PU200_v22/220407_094155/0000//L1NtuplePhaseII_Step1_*.root - trees_branches: - genTree/L1GenTree: - part_e: [Id, Stat, Pt, Eta, Phi] - part_mu: [Id, Stat, Pt, Eta, Phi] - l1PhaseIITree/L1PhaseIITree: - tkMuon: [Pt, Eta, Phi, Chg, TrkIso, Bx, Qual, zVtx, MuRefPt, MuRefPhi, MuRefEta, DRMuTrack, NMatchedTracks, MuRefChg, Region] - globalMuon: [Pt, Eta, Phi, EtaAtVtx, PhiAtVtx, IEt, IEta, IPhi, IEtaAtVtx, IPhiAtVtx, IDEta, IDPhi, Chg, Iso, Qual, TfMuonIdx, Bx] - tkGlbMuon: [Pt, Eta, Phi, Chg, TrkIso, Bx, Qual, zVtx, MuRefPt, MuRefPhi, MuRefEta, DRMuTrack, NMatchedTracks] - gmtMuon: [Pt, Eta, Phi, Z0, D0, IPt, IEta, IPhi, IZ0, ID0, Chg, Iso, Qual, Beta, Bx] - gmtTkMuon: [Pt, Eta, Phi, Z0, D0, IPt, IEta, IPhi, IZ0, ID0, Chg, Iso, Qual, Beta, NStubs, Bx] - tkElectron: [Pt, Et, Eta, Phi, Chg, Bx, TrkIso, PfIso, PuppiIso, zVtx, HwQual, EGRefPt, EGRefEta, EGRefPhi, HGC, PassesLooseTrackID, PassesPhotonID] - EG: [Pt, Et, Eta, Phi, Bx, Iso, HwQual, HGC, PassesPhotonID, PassesLooseTrackID] - TT: - ntuple_path: /eos/cms/store/cmst3/group/l1tr/phase2Menu/EmuDev/TT_TuneCP5_14TeV-powheg-pythia8/TT_PU200_v22/220407_094308/0000//L1NtuplePhaseII_Step1_*.root - trees_branches: - genTree/L1GenTree: - genMetTrue: "all" - jet: "all" - l1PhaseIITree/L1PhaseIITree: - trackerMET: "all" - puppiMET: "all" - phase1PuppiMHT: "all" - trackerHT: "all" - phase1PuppiHT: "all" - phase1PuppiJet: "all" - seededConePuppiHT: "all" - seededConePuppiMHT: "all" - seededConePuppiJet: [Pt, Et, Eta, Phi] - trackerJet: [Pt, Eta, Phi] - caloJet: [Et, Pt, Eta, Phi] - VBFHToTauTau: - ntuple_path: /eos/cms/store/cmst3/group/l1tr/phase2Menu/EmuDev/VBFHToTauTau_M125_14TeV_powheg_pythia8_correctedGridpack_tuneCP5/VBFToTauTau_PU200_v22/220407_095503/0000//L1NtuplePhaseII_Step1_*.root - trees_branches: - genTree/L1GenTree: - part_tau: [Id, Stat, Pt, Eta, Phi, Parent, E] - l1PhaseIITree/L1PhaseIITree: - nnTau: [Et, Eta, Pt, Phi, FullIso, Z0, PassTightNN, Chg, DXY, PassLooseNN] - caloTau: [Et, Eta, Pt, Phi, Iso, HwQual, Bx] - GluGluToGG: - ntuple_path: /eos/cms/store/cmst3/group/l1tr/phase2Menu/EmuDev/GluGluHToGG_M125_14TeV_powheg_pythia8_TuneCP5/HGG_PU200_v22/220407_094856/0000//L1NtuplePhaseII_Step1_*.root - trees_branches: - genTree/L1GenTree: - part_gamma: [Id, Stat, Pt, Eta, Phi] - l1PhaseIITree/L1PhaseIITree: - tkPhoton: [Pt, Et, Eta, Phi, Bx, TrkIso, HwQual, HGC, PassesPhotonID] - GluGluToHHTo2B2Tau: - ntuple_path: /eos/cms/store/cmst3/group/l1tr/phase2Menu/EmuDev/GluGluToHHTo2B2Tau_node_SM_TuneCP5_14TeV-madgraph-pythia8/GGToHHTo2B2Tau_PU200_v22/220408_073133/0000//L1NtuplePhaseII_Step1_*.root - trees_branches: - genTree/L1GenTree: - part_tau: [Id, Stat, Pt, Eta, Phi, Parent, E] - l1PhaseIITree/L1PhaseIITree: - nnTau: [Et, Eta, Pt, Phi, FullIso, Z0, PassTightNN, Chg, DXY, PassLooseNN] - caloTau: [Et, Eta, Pt, Phi, Iso, HwQual, Bx] - MinBias: - ntuple_path: /eos/cms/store/cmst3/group/l1tr/phase2Menu/EmuDev/minbias_merged_nTuplesEmu_v22_2.root - trees_branches: - l1PhaseIITree/L1PhaseIITree: - # trackerMET: "all" - puppiMET: "all" - phase1PuppiMHT: "all" - # trackerHT: "all" - phase1PuppiHT: "all" - phase1PuppiJet: "all" - seededConePuppiJet: [Pt, Et, Eta, Phi] - trackerJet: [Pt, Eta, Phi] - caloJet: [Et, Pt, Eta, Phi] - nnTau: [Et, Eta, Pt, Phi, FullIso, Z0, PassTightNN, Chg, DXY, PassLooseNN] - caloTau: [Et, Eta, Pt, Phi, Iso, HwQual, Bx] - tkPhoton: [Pt, Et, Eta, Phi, Bx, TrkIso, HwQual, HGC, PassesPhotonID] - gmtTkMuon: [Pt, Eta, Phi, Z0, D0, IPt, IEta, IPhi, IZ0, ID0, Chg, Iso, Qual, Beta, NStubs, Bx] - tkElectron: [Pt, Et, Eta, Phi, Chg, Bx, TrkIso, PfIso, PuppiIso, zVtx, HwQual, EGRefPt, EGRefEta, EGRefPhi, HGC, PassesLooseTrackID, PassesPhotonID] - EG: [Pt, Et, Eta, Phi, Bx, Iso, HwQual, HGC, PassesPhotonID, PassesLooseTrackID] diff --git a/configs/V22/object_performance/electron_iso.yaml b/configs/V22/object_performance/electron_iso.yaml deleted file mode 100644 index 1814c1c4..00000000 --- a/configs/V22/object_performance/electron_iso.yaml +++ /dev/null @@ -1,58 +0,0 @@ -ElectronsIsolation_Barrel: - sample: DY - default_version: V22 - iso_vs_efficiency: True - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.479" - object: - - "abs({eta}) < 1.479" - test_objects: - tkElectron: - suffix: "trkiso" - label: "TkElectron" - match_dR: 0.15 - quality_id: "QUAL_BarrelNoneEndcap3" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Isolation" - ylabel: "Efficiency (Barrel)" - binning: - min: 0 - max: 0.5 - step: 0.005 - -ElectronsIsolation_Endcap: - sample: DY - default_version: V22 - iso_vs_efficiency: True - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.479" - object: - - "abs({eta}) < 2.4" - test_objects: - tkElectron: - suffix: "trkiso" - label: "TkElectron" - match_dR: 0.15 - quality_id: "QUAL_BarrelNoneEndcap3" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Isolation" - ylabel: "Efficiency (Endcap)" - binning: - min: 0 - max: 0.5 - step: 0.005 - diff --git a/configs/V22/object_performance/electron_matching.yaml b/configs/V22/object_performance/electron_matching.yaml deleted file mode 100644 index 92a9df39..00000000 --- a/configs/V22/object_performance/electron_matching.yaml +++ /dev/null @@ -1,94 +0,0 @@ -ElectronsMatchingBarrel: - sample: DY - default_version: V22 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - cuts: - - "abs({eta}) < 2.4" - - "{passesloosetrackid} == 1" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passesloosetrackid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - quality_id: "QUAL_BarrelNoneEndcap3" - cuts: - - "abs({eta}) < 2.4" - # - "{passesloosetrackid} == 1" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 3 - -ElectronsMatchingEndcap: - sample: DY - default_version: V22 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - cuts: - - "abs({eta}) < 2.4" - - "{passesloosetrackid} == 1" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passesloosetrackid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - quality_id: "QUAL_BarrelNoneEndcap3" - cuts: - - "abs({eta}) < 2.4" - - "{passesloosetrackid} == 1" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 3 - diff --git a/configs/V22/object_performance/electron_matching_eta.yaml b/configs/V22/object_performance/electron_matching_eta.yaml deleted file mode 100644 index 1b1f28a2..00000000 --- a/configs/V22/object_performance/electron_matching_eta.yaml +++ /dev/null @@ -1,96 +0,0 @@ -ElectronsMatching_Eta_Pt10to25: - sample: DY - default_version: V22 - reference_object: - object: "part_e" - suffix: "Eta" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} < 25" - - "{pt} > 10" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG Electron" - match_dR: 0.2 - cuts: - - "abs({eta}) < 3.0" - - "{passesloosetrackid} == 1" - tkElectron: - match_dR: 0.15 - suffix: "Eta" - label: "TkElectron" - quality_id: "QUAL_BarrelNoneEndcap3" - cuts: - - "abs({eta}) < 3.0" - - "{passesloosetrackid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Eta" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - quality_id: "QUAL_BarrelNoneEndcap3" - cuts: - - "abs({eta}) < 2.4" - - "{passesloosetrackid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -ElectronsMatching_Eta_Pt25toInf: - sample: DY - default_version: V22 - reference_object: - object: "part_e" - suffix: "Eta" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG Electron" - match_dR: 0.2 - cuts: - - "abs({eta}) < 3.0" - - "{passesloosetrackid} == 1" - tkElectron: - suffix: "Eta" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 3.0" - - "{passesloosetrackid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Eta" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - quality_id: "QUAL_BarrelNoneEndcap3" - cuts: - - "abs({eta}) < 2.4" - - "{passesloosetrackid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - diff --git a/configs/V22/object_performance/electron_trigger.yaml b/configs/V22/object_performance/electron_trigger.yaml deleted file mode 100644 index 904e5b2a..00000000 --- a/configs/V22/object_performance/electron_trigger.yaml +++ /dev/null @@ -1,100 +0,0 @@ -ElectronsTriggerBarrel: - sample: DY - default_version: V22 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.8" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - cuts: - - "abs({eta}) < 2.8" - - "{passesloosetrackid} == 1" - tkElectron: - suffix: "Pt" - label: "tkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.8" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "tkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - quality_id: "QUAL_BarrelNoneEndcap3" - cuts: - - "abs({eta}) < 2.4" - - "{passesloosetrackid} == 1" - thresholds: [30] #10, 20, 30, 40] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" - binning: - min: 0 - max: 150 - step: 1.5 - -ElectronsTriggerEndcap: - sample: DY - default_version: V22 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.8" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - cuts: - - "abs({eta}) < 2.8" - - "{passesloosetrackid} == 1" - tkElectron: - suffix: "Pt" - label: "tkElectron" - match_dR: 0.15 - cuts: - - "{passesloosetrackid} == 1" - - "abs({eta}) < 2.8" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "tkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - quality_id: "QUAL_BarrelNoneEndcap3" - cuts: - - "abs({eta}) < 2.4" - - "{passesloosetrackid} == 1" - thresholds: [30] #10, 20, 30, 40] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" - binning: - min: 0 - max: 150 - step: 1.5 diff --git a/configs/V22/object_performance/jets_matching_eta.yaml b/configs/V22/object_performance/jets_matching_eta.yaml deleted file mode 100644 index b0ea9071..00000000 --- a/configs/V22/object_performance/jets_matching_eta.yaml +++ /dev/null @@ -1,88 +0,0 @@ -JetMatching_Eta_Pt40To100: - sample: TT - default_version: V22 - reference_object: - object: "jet" - suffix: "Eta" - label: "Gen Jets" - cuts: - event: - - "{pt} > 40" - - "{pt} < 100" - object: - - "abs({eta}) < 5" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Eta" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - trackerJet: - match_dR: 0.4 - suffix: "Eta" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (40-100 GeV)" - binning: - min: -5 - max: 5 - step: 0.25 - -JetMatching_Eta_Pt100ToInf: - sample: TT - default_version: V22 - reference_object: - object: "jet" - suffix: "Eta" - label: "Gen Jets" - cuts: - event: - - "{pt} > 100" - object: - - "abs({eta}) < 5" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Eta" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - trackerJet: - match_dR: 0.4 - suffix: "Eta" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (>100 GeV)" - binning: - min: -5 - max: 5 - step: 0.25 diff --git a/configs/V22/object_performance/jets_trigger.yaml b/configs/V22/object_performance/jets_trigger.yaml deleted file mode 100644 index a3eba075..00000000 --- a/configs/V22/object_performance/jets_trigger.yaml +++ /dev/null @@ -1,137 +0,0 @@ -JetTurnonBarrel: - sample: TT - default_version: V22 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 2.4" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - thresholds: [50] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, barrel)" - binning: - min: 0 - max: 700 - step: 10 - -JetTurnonEndcap: - sample: TT - default_version: V22 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 2.4" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - thresholds: [50] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, endcap)" - binning: - min: 0 - max: 900 - step: 20 - -JetTurnonForward: - sample: TT - default_version: V22 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 2.4" - object: - - "abs({eta}) < 5" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - thresholds: [50] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, forward)" - binning: - min: 0 - max: 700 - step: 10 diff --git a/configs/V22/object_performance/met_ht_mht.yaml b/configs/V22/object_performance/met_ht_mht.yaml deleted file mode 100644 index 0b44e045..00000000 --- a/configs/V22/object_performance/met_ht_mht.yaml +++ /dev/null @@ -1,169 +0,0 @@ -HT_90perc: - sample: TT - default_version: V22 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen HT" - trafo: "HT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - test_objects: - trackerHT: - suffix: "" - label: "Tracker HT" - phase1PuppiHT: - suffix: "" - label: "Histogrammed Puppi HT" - thresholds: [350] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. HT (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 750 - step: 20 - -HT_50perc: - sample: TT - default_version: V22 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen HT" - trafo: "HT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - test_objects: - trackerHT: - suffix: "" - label: "Tracker HT" - phase1PuppiHT: - suffix: "" - label: "Histogrammed Puppi HT" - thresholds: [350] - scalings: - method: "naive" - threshold: 0.50 - xlabel: "Gen. HT (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 750 - step: 20 - -MHT_50perc: - sample: TT - default_version: V22 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen MHT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - trafo: "MHT" - test_objects: - trackerMHT: - suffix: "" - label: "Tracker MHT" - phase1PuppiMHT: - suffix: "et" - label: "Histogrammed Puppi MHT" - thresholds: [70, 150] - scalings: - method: "naive" - threshold: 0.50 - xlabel: "Gen. MHT30 (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 500 - step: 20 - -MHT_90perc: - sample: TT - default_version: V22 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen MHT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - trafo: "MHT" - test_objects: - trackerMHT: - suffix: "" - label: "Tracker MHT" - phase1PuppiMHT: - suffix: "et" - label: "Histogrammed Puppi MHT" - thresholds: [70, 150] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. MHT30 (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 500 - step: 20 - -MET_90perc: - sample: TT - default_version: V22 - reference_object: - object: "genMetTrue" - suffix: "" - label: "Gen MET" - test_objects: - trackerMET: - suffix: "" - label: "Tracker MET" - puppiMET: - suffix: "et" - label: "Puppi MET" - thresholds: [150] - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - scalings: - method: "naive" - threshold: 0.90 - binning: - min: 0 - max: 500 - step: 20 - -MET_50perc: - sample: TT - default_version: V22 - reference_object: - object: "genMetTrue" - suffix: "" - label: "Gen MET" - test_objects: - trackerMET: - suffix: "" - label: "Tracker MET" - puppiMET: - suffix: "et" - label: "Puppi MET" - thresholds: [150] - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - scalings: - method: "naive" - threshold: 0.50 - binning: - min: 0 - max: 500 - step: 20 diff --git a/configs/V22/object_performance/met_ht_mht_trigger.yaml b/configs/V22/object_performance/met_ht_mht_trigger.yaml deleted file mode 100644 index af00c209..00000000 --- a/configs/V22/object_performance/met_ht_mht_trigger.yaml +++ /dev/null @@ -1,114 +0,0 @@ -HT: - sample: TT - default_version: V22 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen HT" - trafo: "HT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - test_objects: - trackerHT: - suffix: "" - label: "Tracker HT" - phase1PuppiHT: - suffix: "" - label: "Histogrammed Puppi HT" - seededConePuppiHT: - suffix: "" - label: "SeededCone HT" - thresholds: [350] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 750 - step: 20 - -MHT30: - sample: TT - default_version: V22 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen MHT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - trafo: "MHT" - test_objects: - trackerMHT: - suffix: "" - label: "Tracker MHT" - thresholds: [70, 150] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 500 - step: 20 - -MHT15: - sample: TT - default_version: V22 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen MHT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 15" - trafo: "MHT" - test_objects: - phase1PuppiMHT: - suffix: "et" - label: "Histogrammed Puppi MHT" - seededConePuppiMHT: - suffix: "et" - label: "SeededCone MHT" - thresholds: [70, 150] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 500 - step: 12 - -MET: - sample: TT - default_version: V22 - reference_object: - object: "genMetTrue" - suffix: "" - label: "Gen MET" - test_objects: - trackerMET: - suffix: "" - label: "Tracker MET" - puppiMET: - suffix: "et" - label: "Puppi MET" - thresholds: [150] - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - scalings: - method: "naive" - threshold: 0.90 - binning: - min: 0 - max: 500 - step: 20 diff --git a/configs/V22/object_performance/mht.yaml b/configs/V22/object_performance/mht.yaml deleted file mode 100644 index 4eacd1bf..00000000 --- a/configs/V22/object_performance/mht.yaml +++ /dev/null @@ -1,32 +0,0 @@ -MHT30: - sample: TT - default_version: V22 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen MHT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - trafo: "MHT" - test_objects: - phase1PuppiMHT: - suffix: "et" - label: "Histogrammed Puppi MHT" - seededConePuppiMHT: - suffix: "et" - label: "SeededCone MHT" - trackerMHT: - suffix: "" - label: "Tracker MHT" - thresholds: [70, 150] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. MHT30 (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 500 - step: 20 diff --git a/configs/V22/object_performance/mht_comparison.yaml b/configs/V22/object_performance/mht_comparison.yaml deleted file mode 100644 index b4f2c2ea..00000000 --- a/configs/V22/object_performance/mht_comparison.yaml +++ /dev/null @@ -1,12 +0,0 @@ -MHT_150_V22: - files: - MHT30_150: - object: trackerMHT - dir: outputs/V22/turnons/ - MHT15_150: - object: phase1PuppiMHT - dir: outputs/V22/turnons/ - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - watermark: "V22_MHTBarrel" - save_dir: "outputs/V22/turnons" \ No newline at end of file diff --git a/configs/V22/object_performance/muon_matching.yaml b/configs/V22/object_performance/muon_matching.yaml deleted file mode 100644 index 755b08e2..00000000 --- a/configs/V22/object_performance/muon_matching.yaml +++ /dev/null @@ -1,101 +0,0 @@ -MuonsMatchingBarrel: - sample: DY - default_version: V22 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) < 0.83" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) < 0.83" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (barrel)" - binning: - min: 0 - max: 150 - step: 3 - -MuonsMatchingOverlap: - sample: DY - default_version: V22 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (overlap)" - binning: - min: 0 - max: 150 - step: 3 - -MuonsMatchingEndcap: - sample: DY - default_version: V22 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (endcap)" - binning: - min: 0 - max: 150 - step: 3 \ No newline at end of file diff --git a/configs/V22/object_performance/muon_matching_eta.yaml b/configs/V22/object_performance/muon_matching_eta.yaml deleted file mode 100644 index 29637b1d..00000000 --- a/configs/V22/object_performance/muon_matching_eta.yaml +++ /dev/null @@ -1,58 +0,0 @@ -MuonsMatching_Eta_Pt2to5: - sample: DY - default_version: V22 - reference_object: - object: "part_mu" - suffix: "Eta" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 2" - - "{pt} < 5" - object: - - "abs({eta}) < 2.4" - test_objects: - gmtMuon: - suffix: "Eta" - label: "GMT Muon" - match_dR: 0.3 - gmtTkMuon: - suffix: "Eta" - label: "GMT TkMuon" - match_dR: 0.1 - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (2-5 GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -MuonsMatching_Eta_Pt15toInf: - sample: DY - default_version: V22 - reference_object: - object: "part_mu" - suffix: "Eta" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 15" - object: - - "abs({eta}) < 2.4" - test_objects: - gmtMuon: - suffix: "Eta" - label: "GMT Muon" - match_dR: 0.3 - gmtTkMuon: - suffix: "Eta" - label: "GMT TkMuon" - match_dR: 0.1 - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (>15 GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V22/object_performance/muon_trigger.yaml b/configs/V22/object_performance/muon_trigger.yaml deleted file mode 100644 index ac707213..00000000 --- a/configs/V22/object_performance/muon_trigger.yaml +++ /dev/null @@ -1,140 +0,0 @@ -MuonsTrigger: - sample: DY - default_version: V22 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > 20$ GeV)" - thresholds: [20, 25] - scalings: - method: "naive" - threshold: 0.95 - binning: - min: 0 - max: 50 - step: 1.5 - -MuonsTrigger_Barrel: - sample: DY - default_version: V22 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) < 0.83" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > 20$ GeV)" - thresholds: [20, 25] - scalings: - method: "naive" - threshold: 0.95 - binning: - min: 0 - max: 50 - step: 1.5 - -MuonsTrigger_Overlap: - sample: DY - default_version: V22 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (overlap, L1 $p_T > 20$ GeV)" - thresholds: [20, 25] - scalings: - method: "naive" - threshold: 0.95 - binning: - min: 0 - max: 50 - step: 1.5 - -MuonsTrigger_Endcap: - sample: DY - default_version: V22 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 1.24" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 1.24" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 1.24" - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > 20$ GeV)" - thresholds: [20, 25] - scalings: - method: "naive" - threshold: 0.95 - binning: - min: 0 - max: 50 - step: 1.5 diff --git a/configs/V22/object_performance/photon_iso.yaml b/configs/V22/object_performance/photon_iso.yaml deleted file mode 100644 index fdd1d2ef..00000000 --- a/configs/V22/object_performance/photon_iso.yaml +++ /dev/null @@ -1,60 +0,0 @@ -PhotonIsolation_Barrel: - sample: GluGluToGG - default_version: V22 - iso_vs_efficiency: True - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.479" - object: - - "abs({eta}) < 1.479" - test_objects: - tkPhoton: - suffix: "trkiso" - label: "TkPhoton" - match_dR: 0.15 - quality_id: "QUAL_123x_tkPhoID" - cuts: - - "abs({eta}) < 1.479" - xlabel: "Isolation" - ylabel: "Efficiency (Barrel)" - binning: - min: 0 - max: 0.5 - step: 0.005 - -PhotonIsolation_Endcap: - sample: GluGluToGG - default_version: V22 - iso_vs_efficiency: True - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.479" - - "abs({eta}) < 2.4" - object: - - "abs({eta}) > 1.479" - test_objects: - tkPhoton: - suffix: "trkiso" - label: "TkPhoton" - match_dR: 0.15 - quality_id: "QUAL_123x_tkPhoID" - cuts: - - "abs({eta}) > 1.479" - - "abs({eta}) < 2.4" - xlabel: "Isolation" - ylabel: "Efficiency (Endcap)" - binning: - min: 0 - max: 0.5 - step: 0.005 - diff --git a/configs/V22/object_performance/tau_matching.yaml b/configs/V22/object_performance/tau_matching.yaml deleted file mode 100644 index 11bc09e0..00000000 --- a/configs/V22/object_performance/tau_matching.yaml +++ /dev/null @@ -1,67 +0,0 @@ -TausMatchingBarrel: - sample: GluGluToHHTo2B2Tau - default_version: V22 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 6 - -TausMatchingEndcap: - sample: GluGluToHHTo2B2Tau - default_version: V22 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 6 diff --git a/configs/V22/object_performance/tau_matching_GG_VBF.yaml b/configs/V22/object_performance/tau_matching_GG_VBF.yaml deleted file mode 100644 index 146c767d..00000000 --- a/configs/V22/object_performance/tau_matching_GG_VBF.yaml +++ /dev/null @@ -1,55 +0,0 @@ -TausMatchingBarrel_HH: - sample: GluGluToHHTo2B2Tau - default_version: V22 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau (HH)" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 6 - -TausMatchingBarrel_H: - sample: VBFHToTauTau - default_version: V22 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau (H)" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 6 diff --git a/configs/V22/object_performance/tau_trigger.yaml b/configs/V22/object_performance/tau_trigger.yaml deleted file mode 100644 index 0f143826..00000000 --- a/configs/V22/object_performance/tau_trigger.yaml +++ /dev/null @@ -1,75 +0,0 @@ -TauTriggerBarrel: - sample: GluGluToHHTo2B2Tau - default_version: V22 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" - thresholds: [20, 30] - scalings: - method: "naive" - threshold: 0.90 - binning: - min: 0 - max: 150 - step: 6 - -TauTriggerEndcap: - sample: GluGluToHHTo2B2Tau - default_version: V22 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" - thresholds: [20, 30] - scalings: - method: "naive" - threshold: 0.90 - binning: - min: 0 - max: 150 - step: 6 diff --git a/configs/V22/object_performance/version_comparison.yaml b/configs/V22/object_performance/version_comparison.yaml deleted file mode 100644 index 26147cca..00000000 --- a/configs/V22/object_performance/version_comparison.yaml +++ /dev/null @@ -1,14 +0,0 @@ -V22_V26_ElectronsBarrel_Comparison: - files: - ElectronsTriggerBarrel_30_V22: - object: tkElectron - dir: outputs/V22/turnons/ - label: "tkElectron (V22)" - ElectronsTriggerBarrel_30_V26: - object: tkElectron - dir: outputs/V26/turnons/ - label: "tkElectron (V26)" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - watermark: "V22_V26_EGBarrel_Comp" - save_dir: "outputs/V22/turnons" \ No newline at end of file diff --git a/configs/V26/caching.yaml b/configs/V26/caching.yaml deleted file mode 100644 index eb6b7c17..00000000 --- a/configs/V26/caching.yaml +++ /dev/null @@ -1,53 +0,0 @@ -V26: - Zmm: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/RelVal/CMSSW_12_5_1/Zmm_1251_200PU_condor/NTP/v26_PU200_fixGenMET_EGID/*.root - trees_branches: - genTree/L1GenTree: - part_mu: [Id, Stat, Pt, Eta, Phi] - l1PhaseIITree/L1PhaseIITree: - #tkMuon: [Pt, Eta, Phi, Chg, TrkIso, Bx, Qual, zVtx, MuRefPt, MuRefPhi, MuRefEta, DRMuTrack, NMatchedTracks, MuRefChg, Region] - #globalMuon: [Pt, Eta, Phi, EtaAtVtx, PhiAtVtx, IEt, IEta, IPhi, IEtaAtVtx, IPhiAtVtx, IDEta, IDPhi, Chg, Iso, Qual, TfMuonIdx, Bx] - #tkGlbMuon: [Pt, Eta, Phi, Chg, TrkIso, Bx, Qual, zVtx, MuRefPt, MuRefPhi, MuRefEta, DRMuTrack, NMatchedTracks] - gmtMuon: [Pt, Eta, Phi, Z0, D0, IPt, IEta, IPhi, IZ0, ID0, Chg, Iso, Qual, Beta, Bx] - gmtTkMuon: [Pt, Eta, Phi, Z0, D0, IPt, IEta, IPhi, IZ0, ID0, Chg, Iso, Qual, Beta, NStubs, Bx] - Zee: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/RelVal/CMSSW_12_5_1/Zee_1251_200PU_condor/NTP/v26_PU200_fixGenMET_EGID/*.root - trees_branches: - genTree/L1GenTree: - part_e: [Id, Stat, Pt, Eta, Phi] - l1PhaseIITree/L1PhaseIITree: - tkElectron: [Pt, Et, Eta, Phi, Chg, Bx, TrkIso, PfIso, PuppiIso, zVtx, HwQual, EGRefPt, EGRefEta, EGRefPhi, HGC, PassesEleID, PassesPhoID] - EG: [Pt, Et, Eta, Phi, Bx, Iso, HwQual, HGC, PassesEleID, PassesSaID] - TT: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/RelVal/CMSSW_12_5_1/TTbar_1251_200PU_condor/NTP/v26_PU200_fixGenMET_EGID/*.root - trees_branches: - genTree/L1GenTree: - genMetTrue: "all" - jet: "all" - l1PhaseIITree/L1PhaseIITree: - trackerMET: "all" - trackerMHT: "all" - puppiMET: "all" - phase1PuppiMHT: "all" - trackerHT: "all" - phase1PuppiHT: "all" - seededConePuppiJet: [Pt, Et, Eta, Phi] - trackerJet: [Pt, Eta, Phi] - phase1PuppiJet: "all" - # caloJet: "all" - Ztt: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/RelVal/CMSSW_12_5_1/Ztt_1251_200PU_condor/NTP/v26_PU200_fixGenMET_EGID/*.root - trees_branches: - genTree/L1GenTree: - part_tau: [Id, Stat, Pt, Eta, Phi, Parent, E] - l1PhaseIITree/L1PhaseIITree: - nnTau: [Et, Eta, Pt, Phi, FullIso, Z0, PassTightNN, Chg, DXY, PassLooseNN] - caloTau: [Et, Eta, Pt, Phi, Iso, HwQual, Bx] - Hgg: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/RelVal/CMSSW_12_5_1/Hgg_1251_200PU_condor/NTP/v26_PU200_fixGenMET_EGID/*.root - trees_branches: - genTree/L1GenTree: - part_gamma: [Id, Stat, Pt, Eta, Phi] - l1PhaseIITree/L1PhaseIITree: - tkPhoton: [Pt, Et, Eta, Phi, Bx, TrkIso, HwQual, HGC, PassesEleID, PassesPhoID] - EG: [Pt, Et, Eta, Phi, Bx, Iso, HwQual, HGC, PassesEleID, PassesSaID] diff --git a/configs/V26/object_performance/electron_iso.yaml b/configs/V26/object_performance/electron_iso.yaml deleted file mode 100644 index e66f0572..00000000 --- a/configs/V26/object_performance/electron_iso.yaml +++ /dev/null @@ -1,29 +0,0 @@ -ElectronsIsolation: - sample: Zee - default_version: V26 - iso_vs_efficiency: True - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - tkElectron: - suffix: "trkiso" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Isolation" - ylabel: "Efficiency" - binning: - min: 0 - max: 0.5 - step: 0.005 - diff --git a/configs/V26/object_performance/electron_matching.yaml b/configs/V26/object_performance/electron_matching.yaml deleted file mode 100644 index 28fa6ed3..00000000 --- a/configs/V26/object_performance/electron_matching.yaml +++ /dev/null @@ -1,80 +0,0 @@ -ElectronsMatchingBarrel: - sample: Zee - default_version: V26 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.4" - # - "{passeseleid} == 1" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - #tkElectronIso: - # suffix: "Pt" - # label: "TkElectron Iso" - # iso_BB: 0.13 - # iso_EE: 0.28 - # iso_branch: "trkiso" - # quality_id: "QUAL_BarrelNoneEndcap3" - # cuts: - # - "abs({eta}) < 2.4" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 3 - -ElectronsMatchingEndcap: - sample: Zee - default_version: V26 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.4" - # - "{passessaid} == 1" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 3 diff --git a/configs/V26/object_performance/electron_matching_eta.yaml b/configs/V26/object_performance/electron_matching_eta.yaml deleted file mode 100644 index 75dc9f6b..00000000 --- a/configs/V26/object_performance/electron_matching_eta.yaml +++ /dev/null @@ -1,72 +0,0 @@ -ElectronsMatching_Eta_Pt10to25: - sample: Zee - default_version: V26 - reference_object: - object: "part_e" - suffix: "Eta" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} < 25" - - "{pt} > 10" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3.0" -# - "{passeseleid} == 1" - tkElectron: - match_dR: 0.15 - suffix: "Eta" - label: "TkElectron" - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -ElectronsMatching_Eta_Pt25toInf: - sample: Zee - default_version: V26 - reference_object: - object: "part_e" - suffix: "Eta" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3.0" -# - "{passeseleid} == 1" - tkElectron: - suffix: "Eta" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V26/object_performance/electron_matching_eta_test.yaml b/configs/V26/object_performance/electron_matching_eta_test.yaml deleted file mode 100644 index 82be91b1..00000000 --- a/configs/V26/object_performance/electron_matching_eta_test.yaml +++ /dev/null @@ -1,36 +0,0 @@ -ElectronsMatching_Eta_Pt10to25: - sample: Zee - default_version: V26 - reference_object: - object: "part_e" - suffix: "Eta" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} < 25" - - "{pt} > 10" - object: - - "abs({eta}) < 2.8" - test_objects: - EG: - suffix: "Eta" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - # - "{passeseleid} == 1" - tkElectron: - match_dR: 0.15 - suffix: "Eta" - label: "TkElectron" - cuts: - - "abs({eta}) < 2.8" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V26/object_performance/electron_trigger.yaml b/configs/V26/object_performance/electron_trigger.yaml deleted file mode 100644 index 5cd2a8f1..00000000 --- a/configs/V26/object_performance/electron_trigger.yaml +++ /dev/null @@ -1,79 +0,0 @@ -ElectronsTriggerBarrel: - sample: Zee - default_version: V26 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.8" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.8" - # - "{passeseleid} == 1" - tkElectron: - suffix: "Pt" - label: "tkElectron" - match_dR: 0.15 - cuts: - - "{passeseleid} == 1" - - "abs({eta}) < 2.8" - thresholds: [10, 20, 30, 40] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" - binning: - min: 0 - max: 150 - step: 1.5 - -ElectronsTriggerEndcap: - sample: Zee - default_version: V26 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.8" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.8" - # - "{passessaid} == 1" - tkElectron: - suffix: "Pt" - label: "tkElectron" - match_dR: 0.15 - cuts: - - "{passeseleid} == 1" - - "abs({eta}) < 2.8" - thresholds: [10, 20, 30, 40] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" - binning: - min: 0 - max: 150 - step: 1.5 diff --git a/configs/V26/object_performance/jets_matching_eta.yaml b/configs/V26/object_performance/jets_matching_eta.yaml deleted file mode 100644 index de51ebd9..00000000 --- a/configs/V26/object_performance/jets_matching_eta.yaml +++ /dev/null @@ -1,76 +0,0 @@ -JetMatching_Eta_Pt40To100: - sample: TT - default_version: V26 - reference_object: - object: "jet" - suffix: "Eta" - label: "Gen Jets" - cuts: - event: - - "{pt} > 40" - - "{pt} < 100" - object: - - "abs({eta}) < 5" - test_objects: - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - trackerJet: - match_dR: 0.4 - suffix: "Eta" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (40-100 GeV)" - binning: - min: -5 - max: 5 - step: 0.25 - -JetMatching_Eta_Pt100ToInf: - sample: TT - default_version: V26 - reference_object: - object: "jet" - suffix: "Eta" - label: "Gen Jets" - cuts: - event: - - "{pt} > 100" - object: - - "abs({eta}) < 2.5" - test_objects: - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - trackerJet: - match_dR: 0.4 - suffix: "Eta" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (>100 GeV)" - binning: - min: -5 - max: 5 - step: 0.25 diff --git a/configs/V26/object_performance/jets_trigger.yaml b/configs/V26/object_performance/jets_trigger.yaml deleted file mode 100644 index 7037b7a1..00000000 --- a/configs/V26/object_performance/jets_trigger.yaml +++ /dev/null @@ -1,113 +0,0 @@ -JetTurnonBarrel: - sample: TT - default_version: V26 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - thresholds: [50] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, barrel)" - binning: - min: 0 - max: 700 - step: 10 - -JetTurnonEndcap: - sample: TT - default_version: V26 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - thresholds: [50] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, endcap)" - binning: - min: 0 - max: 900 - step: 20 - -JetTurnonForward: - sample: TT - default_version: V26 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 2.4" - object: - - "abs({eta}) < 5" - test_objects: - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - thresholds: [50] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, forward)" - binning: - min: 0 - max: 700 - step: 10 diff --git a/configs/V26/object_performance/met_ht_mht.yaml b/configs/V26/object_performance/met_ht_mht.yaml deleted file mode 100644 index 9de0740f..00000000 --- a/configs/V26/object_performance/met_ht_mht.yaml +++ /dev/null @@ -1,108 +0,0 @@ -HT: - sample: TT - default_version: V26 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen HT" - trafo: "HT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - test_objects: - trackerHT: - suffix: "" - label: "Tracker HT" - phase1PuppiHT: - suffix: "" - label: "Histogrammed Puppi HT" - thresholds: [350] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 750 - step: 20 - -MHT30: - sample: TT - default_version: V26 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen MHT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - trafo: "MHT" - test_objects: - trackerMHT: - suffix: "" - label: "Tracker MHT" - thresholds: [70, 150] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV, barrel)" - binning: - min: 0 - max: 500 - step: 20 - -MHT15: - sample: TT - default_version: V26 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen MHT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 15" - trafo: "MHT" - test_objects: - phase1PuppiMHT: - suffix: "et" - label: "Histogrammed Puppi MHT" - thresholds: [70, 150] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV, barrel)" - binning: - min: 0 - max: 500 - step: 12 - -MET: - sample: TT - default_version: V26 - reference_object: - object: "genMetTrue" - suffix: "" - label: "Gen MET" - test_objects: - trackerMET: - suffix: "" - label: "Tracker MET" - puppiMET: - suffix: "et" - label: "Puppi MET" - thresholds: [150] - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - scalings: - method: "naive" - threshold: 0.90 - binning: - min: 0 - max: 500 - step: 20 diff --git a/configs/V26/object_performance/muon_matching.yaml b/configs/V26/object_performance/muon_matching.yaml deleted file mode 100644 index de945fe3..00000000 --- a/configs/V26/object_performance/muon_matching.yaml +++ /dev/null @@ -1,101 +0,0 @@ -MuonsMatchingBarrel: - sample: Zmm - default_version: V26 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) < 0.83" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) < 0.83" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (barrel)" - binning: - min: 0 - max: 150 - step: 3 - -MuonsMatchingOverlap: - sample: Zmm - default_version: V26 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (overlap)" - binning: - min: 0 - max: 150 - step: 3 - -MuonsMatchingEndcap: - sample: Zmm - default_version: V26 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (endcap)" - binning: - min: 0 - max: 150 - step: 3 \ No newline at end of file diff --git a/configs/V26/object_performance/muon_matching_eta.yaml b/configs/V26/object_performance/muon_matching_eta.yaml deleted file mode 100644 index cb34ec16..00000000 --- a/configs/V26/object_performance/muon_matching_eta.yaml +++ /dev/null @@ -1,50 +0,0 @@ -MuonsMatching_Eta_Pt2to5: - sample: Zmm - default_version: V26 - reference_object: - object: "part_mu" - suffix: "Eta" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 2" - - "{pt} < 5" - object: - - "abs({eta}) < 2.4" - test_objects: - gmtTkMuon: - suffix: "Eta" - label: "GMT TkMuon" - match_dR: 0.1 - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (2-5 GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -MuonsMatching_Eta_Pt15toInf: - sample: Zmm - default_version: V26 - reference_object: - object: "part_mu" - suffix: "Eta" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 15" - object: - - "abs({eta}) < 2.4" - test_objects: - gmtTkMuon: - suffix: "Eta" - label: "GMT TkMuon" - match_dR: 0.1 - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (>15 GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V26/object_performance/muon_trigger.yaml b/configs/V26/object_performance/muon_trigger.yaml deleted file mode 100644 index b5dc8678..00000000 --- a/configs/V26/object_performance/muon_trigger.yaml +++ /dev/null @@ -1,35 +0,0 @@ -MuonsTrigger: - sample: Zmm - default_version: V26 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) < 0.83" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > 20$ GeV)" - thresholds: [20, 25] - scalings: - method: "naive" - threshold: 0.95 - binning: - min: 0 - max: 50 - step: 1.5 diff --git a/configs/V26/object_performance/photon_iso.yaml b/configs/V26/object_performance/photon_iso.yaml deleted file mode 100644 index da1f8aab..00000000 --- a/configs/V26/object_performance/photon_iso.yaml +++ /dev/null @@ -1,58 +0,0 @@ -PhotonIsolation_Barrel: - sample: Hgg - default_version: V26 - iso_vs_efficiency: True - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 1.5" - test_objects: - tkPhoton: - suffix: "trkiso" - label: "TkPhoton" - match_dR: 0.15 - cuts: - - "abs({eta}) < 1.5" - - "{passesphoid} == 1" - xlabel: "Isolation" - ylabel: "Efficiency" - binning: - min: 0 - max: 0.5 - step: 0.005 - -PhotonIsolation_Endcap: - sample: Hgg - default_version: V26 - iso_vs_efficiency: True - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) > 1.5" - test_objects: - tkPhoton: - suffix: "trkiso" - label: "TkPhoton" - match_dR: 0.15 - cuts: - - "abs({eta}) > 1.5" - - "{passesphoid} == 1" - xlabel: "Isolation" - ylabel: "Efficiency" - binning: - min: 0 - max: 0.5 - step: 0.005 - diff --git a/configs/V26/object_performance/photons_matching_eta.yaml b/configs/V26/object_performance/photons_matching_eta.yaml deleted file mode 100644 index 5670e196..00000000 --- a/configs/V26/object_performance/photons_matching_eta.yaml +++ /dev/null @@ -1,145 +0,0 @@ -PhotonsMatching_Eta_Pt10to25_PassEleID: - sample: Hgg - default_version: V26 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} < 25" - - "{pt} > 10" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG EleID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton EleID" - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt10to25_PassSa_PhoID: - sample: Hgg - default_version: V26 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} < 25" - - "{pt} > 10" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG SaID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passessaid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton PhoID" - cuts: - - "abs({eta}) < 3.0" - - "{passesphoid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt25_PassEleID: - sample: Hgg - default_version: V26 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG EleID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton EleID" - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt25_PassSa_PhoID: - sample: Hgg - default_version: V26 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG SaID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passessaid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton PhoID" - cuts: - - "abs({eta}) < 3.0" - - "{passesphoid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V26/object_performance/photons_matching_eta_iso.yaml b/configs/V26/object_performance/photons_matching_eta_iso.yaml deleted file mode 100644 index f6bb7503..00000000 --- a/configs/V26/object_performance/photons_matching_eta_iso.yaml +++ /dev/null @@ -1,161 +0,0 @@ -PhotonsMatching_Eta_Pt25_PassSa_NOPhoID_iso0p2: - sample: Hgg - default_version: V26 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton NO PhoID" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - #quality_id: "QUAL_TkPho" - cuts: - - "abs({eta}) < 3.0" - # - "{passesphoid} == 1" - EG: - suffix: "Eta" - label: "EG SaID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passessaid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt15to25_PassEleID_iso0p2: - sample: Hgg - default_version: V26 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 15" - - "{pt} < 25" - object: - - "abs({eta}) < 3.0" - test_objects: - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton EleID" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - #quality_id: "QUAL_TkPho" - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - EG: - suffix: "Eta" - label: "EG EleID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($15 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt25_PassEleID_iso0p2: - sample: Hgg - default_version: V26 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton EleID" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - #quality_id: "QUAL_TkPho" - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - EG: - suffix: "Eta" - label: "EG EleID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt25_PassSa_PhoID_iso0p2: - sample: Hgg - default_version: V26 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton PhoID" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - #quality_id: "QUAL_TkPho" - cuts: - - "abs({eta}) < 3.0" - - "{passesphoid} == 1" - EG: - suffix: "Eta" - label: "EG SaID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passessaid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - diff --git a/configs/V26/object_performance/scaling_thresholds.yaml b/configs/V26/object_performance/scaling_thresholds.yaml deleted file mode 100644 index 838980ea..00000000 --- a/configs/V26/object_performance/scaling_thresholds.yaml +++ /dev/null @@ -1,5 +0,0 @@ -Jet: {25, 30, 35, 40, 45, 50, 55, 60, 70, 75, 80, 85, 90, 100, 120, 125, 130, 140, 150, 175} -Muon: {7, 9, 10, 12, 14, 15, 17, 20, 26, 25, 27, 30} -Tau: {27, 30, 40, 50, 60, 70} -EG: {7, 9, 12, 14, 15, 17, 20, 26, 25, 27, 30, 40, 50} -HT: {70, 80, 90, 100, 125, 150, 175} diff --git a/configs/V26/object_performance/tau_matching.yaml b/configs/V26/object_performance/tau_matching.yaml deleted file mode 100644 index f71ece7a..00000000 --- a/configs/V26/object_performance/tau_matching.yaml +++ /dev/null @@ -1,67 +0,0 @@ -TausMatchingBarrel: - sample: Ztt - default_version: V26 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 6 - -TausMatchingEndcap: - sample: Ztt - default_version: V26 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 6 diff --git a/configs/V26/object_performance/tau_trigger.yaml b/configs/V26/object_performance/tau_trigger.yaml deleted file mode 100644 index a1d59a92..00000000 --- a/configs/V26/object_performance/tau_trigger.yaml +++ /dev/null @@ -1,75 +0,0 @@ -TauTriggerBarrel: - sample: Ztt - default_version: V26 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" - thresholds: [20, 30] - scalings: - method: "naive" - threshold: 0.90 - binning: - min: 0 - max: 150 - step: 6 - -TauTriggerEndcap: - sample: Ztt - default_version: V26 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" - thresholds: [20, 30] - scalings: - method: "naive" - threshold: 0.90 - binning: - min: 0 - max: 150 - step: 6 \ No newline at end of file diff --git a/configs/V27/caching.yaml b/configs/V27/caching.yaml deleted file mode 100644 index d8d03eb2..00000000 --- a/configs/V27/caching.yaml +++ /dev/null @@ -1,89 +0,0 @@ -V27: - DYLL_M10to50: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/DY_M10to50_1252_200PU_condor/NTP/v27_PU200/*.root - trees_branches: - genTree/L1GenTree: - part_mu: [Id, Stat, Pt, Eta, Phi] - part_e: [Id, Stat, Pt, Eta, Phi] - part_tau: [Id, Stat, Pt, Eta, Phi, Parent, E] - l1PhaseIITree/L1PhaseIITree: - tkElectron: [Pt, Et, Eta, Phi, Chg, Bx, TrkIso, PfIso, PuppiIso, zVtx, HwQual, EGRefPt, EGRefEta, EGRefPhi, HGC, PassesEleID, PassesPhoID] - EG: [Pt, Et, Eta, Phi, Bx, Iso, HwQual, HGC, PassesEleID, PassesSaID] - gmtMuon: [Pt, Eta, Phi, Z0, D0, IPt, IEta, IPhi, IZ0, ID0, Chg, Iso, Qual, Beta, Bx] - gmtTkMuon: [Pt, Eta, Phi, Z0, D0, IPt, IEta, IPhi, IZ0, ID0, Chg, Iso, Qual, Beta, NStubs, Bx] - nnTau: [Et, Eta, Pt, Phi, FullIso, Z0, PassTightNN, Chg, DXY, PassLooseNN] - caloTau: [Et, Eta, Pt, Phi, Iso, HwQual, Bx] - DYLL_M50: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/DY_M50_1252_200PU/NTP/v27_PU200/*.root - trees_branches: - genTree/L1GenTree: - part_mu: [Id, Stat, Pt, Eta, Phi] - part_e: [Id, Stat, Pt, Eta, Phi] - l1PhaseIITree/L1PhaseIITree: - tkElectron: [Pt, Et, Eta, Phi, Chg, Bx, TrkIso, PfIso, PuppiIso, zVtx, HwQual, EGRefPt, EGRefEta, EGRefPhi, HGC, PassesEleID, PassesPhoID] - EG: [Pt, Et, Eta, Phi, Bx, Iso, HwQual, HGC, PassesEleID, PassesSaID] - gmtMuon: [Pt, Eta, Phi, Z0, D0, IPt, IEta, IPhi, IZ0, ID0, Chg, Iso, Qual, Beta, Bx] - gmtTkMuon: [Pt, Eta, Phi, Z0, D0, IPt, IEta, IPhi, IZ0, ID0, Chg, Iso, Qual, Beta, NStubs, Bx] - TT: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/TT_1252_200PU/NTP/v27_PU200/*.root - trees_branches: - genTree/L1GenTree: - genMetTrue: "all" - jet: "all" - l1PhaseIITree/L1PhaseIITree: - trackerMET: "all" - trackerMHT: "all" - puppiMET: "all" - phase1PuppiMHT: "all" - trackerHT: "all" - phase1PuppiHT: "all" - seededConePuppiJet: [Pt, Et, Eta, Phi] - seededConePuppiHT: "all" - seededConePuppiMHT: "all" - trackerJet: [Pt, Eta, Phi] - phase1PuppiJet: "all" - # caloJet: "all" - caloJet: [Et, Pt, Eta, Phi] - VBFHToTauTau: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/VBFHToTauTau_1252_200PU/NTP/v27_PU200/*.root - trees_branches: - genTree/L1GenTree: - part_tau: [Id, Stat, Pt, Eta, Phi, Parent, E] - l1PhaseIITree/L1PhaseIITree: - nnTau: [Et, Eta, Pt, Phi, FullIso, Z0, PassTightNN, Chg, DXY, PassLooseNN] - caloTau: [Et, Eta, Pt, Phi, Iso, HwQual, Bx] - HHToTauTau: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/GluGluToHHTo2B2Tau_node_SM_TuneCP5_14TeV-madgraph-pythia8/HHToTauTau_1252_200PU_crab_v27_PU200_fixHwQual/230320_095340/0000/L1NtuplePhaseII_Step1_1.root - trees_branches: - genTree/L1GenTree: - part_tau: [Id, Stat, Pt, Eta, Phi, Parent, E] - l1PhaseIITree/L1PhaseIITree: - nnTau: [Et, Eta, Pt, Phi, FullIso, Z0, PassTightNN, Chg, DXY, PassLooseNN] - caloTau: [Et, Eta, Pt, Phi, Iso, HwQual] - Hgg: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/GluGluHToGG_1252_200PU/NTP/v27_PU200/*.root - trees_branches: - genTree/L1GenTree: - part_gamma: [Id, Stat, Pt, Eta, Phi] - l1PhaseIITree/L1PhaseIITree: - tkPhoton: [Pt, Et, Eta, Phi, Bx, TrkIso, HwQual, HGC, PassesEleID, PassesPhoID] - EG: [Pt, Et, Eta, Phi, Bx, Iso, HwQual, HGC, PassesEleID, PassesSaID] - MinBias: - #ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/MinBias_TuneCP5_14TeV-pythia8/MinBias_1252_200PU_crb_v27_PU200/230213_192753/0000/L1NtuplePhaseII_Step1*.root - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/MinBias_TuneCP5_14TeV-pythia8/MinBias_1252_200PU_crb_v27_PU200/230213_192753/L1NtuplePhaseII_Step1.root - trees_branches: - l1PhaseIITree/L1PhaseIITree: - puppiMET: "all" - phase1PuppiJet: "all" - phase1PuppiMHT: "all" - phase1PuppiHT: "all" - seededConePuppiJet: [Pt, Et, Eta, Phi] - seededConePuppiHT: "all" - seededConePuppiMHT: "all" - tkElectron: [Pt, Et, Eta, Phi, Chg, Bx, TrkIso, PfIso, PuppiIso, zVtx, HwQual, HGC, PassesEleID, PassesPhoID] - EG: [Pt, Et, Eta, Phi, Bx, Iso, HwQual, HGC, PassesEleID, PassesSaID] - gmtTkMuon: [Pt, Eta, Phi, Z0, D0, IPt, IEta, IPhi, IZ0, ID0, Chg, Iso, Qual, Beta, NStubs, Bx] - nnTau: [Et, Eta, Pt, Phi, FullIso, Z0, PassTightNN, Chg, DXY, PassLooseNN] - tkPhoton: [Pt, Et, Eta, Phi, Bx, TrkIso, HwQual, HGC, PassesEleID, PassesPhoID] - z0L1TkPV: "all" - diff --git a/configs/V27/caching_bTagNN.yaml b/configs/V27/caching_bTagNN.yaml deleted file mode 100644 index 7e6aea5a..00000000 --- a/configs/V27/caching_bTagNN.yaml +++ /dev/null @@ -1,10 +0,0 @@ -V27: - TT: - ntuple_path: /afs/cern.ch/work/e/ejclemen/TJM/BJetNN/Phase2-L1MenuTools/ntuples_dr4.root - trees_branches: - genTree/L1GenTree: - genMetTrue: "all" - jet: "all" - l1PhaseIITree/L1PhaseIITree: - seededConeExtendedPuppiJet: [Pt, Et, Eta, Phi, BJetNN] - seededConePuppiJet: [Pt, Et, Eta, Phi] diff --git a/configs/V27/object_performance/electron_iso.yaml b/configs/V27/object_performance/electron_iso.yaml deleted file mode 100644 index 2e276ef0..00000000 --- a/configs/V27/object_performance/electron_iso.yaml +++ /dev/null @@ -1,58 +0,0 @@ -ElectronsIsolation_Barrel: - sample: DYLL_M50 - default_version: V27 - iso_vs_efficiency: True - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.479" - object: - - "abs({eta}) < 1.479" - test_objects: - tkElectron: - suffix: "trkiso" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Isolation" - ylabel: "Efficiency (Barrel)" - binning: - min: 0 - max: 0.5 - step: 0.005 - -ElectronsIsolation_Endcap: - sample: DYLL_M50 - default_version: V27 - iso_vs_efficiency: True - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.479" - object: - - "abs({eta}) < 2.4" - test_objects: - tkElectron: - suffix: "trkiso" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - #- "{passeseleid} == 1" - xlabel: "Isolation" - ylabel: "Efficiency (Endcap)" - binning: - min: 0 - max: 0.5 - step: 0.005 - diff --git a/configs/V27/object_performance/electron_matching.yaml b/configs/V27/object_performance/electron_matching.yaml deleted file mode 100644 index 35b9d2c6..00000000 --- a/configs/V27/object_performance/electron_matching.yaml +++ /dev/null @@ -1,92 +0,0 @@ -ElectronsMatchingBarrel: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.4" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 3 - -ElectronsMatchingEndcap: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.4" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 3 - diff --git a/configs/V27/object_performance/electron_matching_eta.yaml b/configs/V27/object_performance/electron_matching_eta.yaml deleted file mode 100644 index ec66ff33..00000000 --- a/configs/V27/object_performance/electron_matching_eta.yaml +++ /dev/null @@ -1,92 +0,0 @@ -ElectronsMatching_Eta_Pt10to25: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_e" - suffix: "Eta" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} < 25" - - "{pt} > 10" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3.0" - tkElectron: - match_dR: 0.15 - suffix: "Eta" - label: "TkElectron" - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Eta" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -ElectronsMatching_Eta_Pt25toInf: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_e" - suffix: "Eta" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3.0" - tkElectron: - suffix: "Eta" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Eta" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V27/object_performance/electron_matching_eta_test.yaml b/configs/V27/object_performance/electron_matching_eta_test.yaml deleted file mode 100644 index 6d23f019..00000000 --- a/configs/V27/object_performance/electron_matching_eta_test.yaml +++ /dev/null @@ -1,34 +0,0 @@ -ElectronsMatching_Eta_Pt25toInf_fixEGID: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_e" - suffix: "Eta" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3.0" - tkElectron: - suffix: "Eta" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V27/object_performance/electron_trigger.yaml b/configs/V27/object_performance/electron_trigger.yaml deleted file mode 100644 index 22846aa0..00000000 --- a/configs/V27/object_performance/electron_trigger.yaml +++ /dev/null @@ -1,99 +0,0 @@ -ElectronsTriggerBarrel: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.8" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.8" - tkElectron: - suffix: "Pt" - label: "tkElectron" - match_dR: 0.15 - cuts: - - "{passeseleid} == 1" - - "abs({eta}) < 2.8" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "tkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.8" - - "{passeseleid} == 1" - thresholds: [10, 20, 30, 40] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" - binning: - min: 0 - max: 150 - step: 1.5 - -ElectronsTriggerEndcap: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.8" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.8" - tkElectron: - suffix: "Pt" - label: "tkElectron" - match_dR: 0.15 - cuts: - - "{passeseleid} == 1" - - "abs({eta}) < 2.8" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "tkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.8" - - "{passeseleid} == 1" - thresholds: [10, 20, 30, 40] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" - binning: - min: 0 - max: 150 - step: 1.5 diff --git a/configs/V27/object_performance/jets_matching.yaml b/configs/V27/object_performance/jets_matching.yaml deleted file mode 100644 index 1b53f5b8..00000000 --- a/configs/V27/object_performance/jets_matching.yaml +++ /dev/null @@ -1,164 +0,0 @@ -JetMatchingForward_3p7to7: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 3.7" - object: - - "abs({eta}) < 5" - test_objects: - # phase1PuppiJet: - # match_dR: 0.3 - # suffix: "Pt" - # label: "Histogrammed PuppiJet" - # cuts: - # - "abs({eta}) < 7" - # seededConePuppiJet: - # match_dR: 0.35 - # suffix: "Pt" - # label: "Seeded Cone PuppiJet" - # cuts: - # - "abs({eta}) < 7" - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 7" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, forward)" - binning: - min: 0 - max: 300 - step: 5 - -JetMatchingBarrel: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 2.5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, barrel)" - binning: - min: 0 - max: 700 - step: 10 - -JetMatchingEndcap: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, endcap)" - binning: - min: 0 - max: 900 - step: 20 - -JetMatchingForward: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 2.4" - object: - - "abs({eta}) < 5" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, forward)" - binning: - min: 0 - max: 700 - step: 10 - diff --git a/configs/V27/object_performance/jets_matching_eta.yaml b/configs/V27/object_performance/jets_matching_eta.yaml deleted file mode 100644 index cdc1749b..00000000 --- a/configs/V27/object_performance/jets_matching_eta.yaml +++ /dev/null @@ -1,163 +0,0 @@ -JetMatching_Eta_Pt40To100: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Eta" - label: "Gen Jets" - cuts: - event: - - "{pt} > 40" - - "{pt} < 100" - object: - - "abs({eta}) < 5" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Eta" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - trackerJet: - match_dR: 0.4 - suffix: "Eta" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (40-100 GeV)" - binning: - min: -5 - max: 5 - step: 0.25 - -JetMatching_Eta_Pt100ToInf: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Eta" - label: "Gen Jets" - cuts: - event: - - "{pt} > 100" - object: - - "abs({eta}) < 5" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Eta" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - trackerJet: - match_dR: 0.4 - suffix: "Eta" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (>100 GeV)" - binning: - min: -5 - max: 5 - step: 0.25 - -JetMatching_Eta_Pt100ToInf_extEta: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Eta" - label: "Gen Jets" - cuts: - event: - - "{pt} > 100" - object: - - "abs({eta}) < 7" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 7" - # phase1PuppiJet: - # match_dR: 0.3 - # suffix: "Eta" - # label: "Histogrammed PuppiJet" - # cuts: - # - "abs({eta}) < 7" - # seededConePuppiJet: - # match_dR: 0.35 - # suffix: "Eta" - # label: "Seeded Cone PuppiJet" - # cuts: - # - "abs({eta}) < 7" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (>100 GeV)" - binning: - min: -5.5 - max: 5.5 - step: 0.25 -JetMatching_Eta_Pt100ToInf_extEta: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Eta" - label: "Gen Jets" - cuts: - event: - - "{pt} > 100" - object: - - "abs({eta}) < 7" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 7" - # phase1PuppiJet: - # match_dR: 0.3 - # suffix: "Eta" - # label: "Histogrammed PuppiJet" - # cuts: - # - "abs({eta}) < 7" - # seededConePuppiJet: - # match_dR: 0.35 - # suffix: "Eta" - # label: "Seeded Cone PuppiJet" - # cuts: - # - "abs({eta}) < 7" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (>100 GeV)" - binning: - min: -7 - max: 7 - step: 0.25 diff --git a/configs/V27/object_performance/jets_trigger.yaml b/configs/V27/object_performance/jets_trigger.yaml deleted file mode 100644 index cc1665c4..00000000 --- a/configs/V27/object_performance/jets_trigger.yaml +++ /dev/null @@ -1,137 +0,0 @@ -JetTurnonBarrel: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 2.5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - thresholds: [50,100] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, barrel)" - binning: - min: 0 - max: 700 - step: 10 - -JetTurnonEndcap: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - thresholds: [50] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, endcap)" - binning: - min: 0 - max: 900 - step: 20 - -JetTurnonForward: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 2.4" - object: - - "abs({eta}) < 5" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - thresholds: [50,100] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, forward)" - binning: - min: 0 - max: 700 - step: 10 diff --git a/configs/V27/object_performance/jets_trigger_fwd.yaml b/configs/V27/object_performance/jets_trigger_fwd.yaml deleted file mode 100644 index cdf184c6..00000000 --- a/configs/V27/object_performance/jets_trigger_fwd.yaml +++ /dev/null @@ -1,41 +0,0 @@ -JetTurnonFwd_3p7to7: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 3.7" - object: - - "abs({eta}) < 7" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 7" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 7" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 7" - thresholds: [50,100] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: r'Trigger Efficiency ( GeV, $3.6<\eta<6$)' - binning: - min: 0 - max: 300 - step: 10 diff --git a/configs/V27/object_performance/met_ht_mht.yaml b/configs/V27/object_performance/met_ht_mht.yaml deleted file mode 100644 index cca4063d..00000000 --- a/configs/V27/object_performance/met_ht_mht.yaml +++ /dev/null @@ -1,169 +0,0 @@ -HT_90perc: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen HT" - trafo: "HT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - test_objects: - trackerHT: - suffix: "" - label: "Tracker HT" - phase1PuppiHT: - suffix: "" - label: "Histogrammed Puppi HT" - thresholds: [350] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. HT (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 750 - step: 20 - -HT_50perc: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen HT" - trafo: "HT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - test_objects: - trackerHT: - suffix: "" - label: "Tracker HT" - phase1PuppiHT: - suffix: "" - label: "Histogrammed Puppi HT" - thresholds: [350] - scalings: - method: "naive" - threshold: 0.50 - xlabel: "Gen. HT (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 750 - step: 20 - -MHT_50perc: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen MHT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - trafo: "MHT" - test_objects: - trackerMHT: - suffix: "" - label: "Tracker MHT" - phase1PuppiMHT: - suffix: "et" - label: "Histogrammed Puppi MHT" - thresholds: [70, 150] - scalings: - method: "naive" - threshold: 0.50 - xlabel: "Gen. MHT30 (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 500 - step: 20 - -MHT_90perc: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen MHT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - trafo: "MHT" - test_objects: - trackerMHT: - suffix: "" - label: "Tracker MHT" - phase1PuppiMHT: - suffix: "et" - label: "Histogrammed Puppi MHT" - thresholds: [70, 150] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. MHT30 (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 500 - step: 20 - -MET_90perc: - sample: TT - default_version: V27 - reference_object: - object: "genMetTrue" - suffix: "" - label: "Gen MET" - test_objects: - trackerMET: - suffix: "" - label: "Tracker MET" - puppiMET: - suffix: "et" - label: "Puppi MET" - thresholds: [150] - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - scalings: - method: "naive" - threshold: 0.90 - binning: - min: 0 - max: 500 - step: 20 - -MET_50perc: - sample: TT - default_version: V27 - reference_object: - object: "genMetTrue" - suffix: "" - label: "Gen MET" - test_objects: - trackerMET: - suffix: "" - label: "Tracker MET" - puppiMET: - suffix: "et" - label: "Puppi MET" - thresholds: [150] - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - scalings: - method: "naive" - threshold: 0.50 - binning: - min: 0 - max: 500 - step: 20 diff --git a/configs/V27/object_performance/mht.yaml b/configs/V27/object_performance/mht.yaml deleted file mode 100644 index 61b7f512..00000000 --- a/configs/V27/object_performance/mht.yaml +++ /dev/null @@ -1,32 +0,0 @@ -MHT30: - sample: TT - default_version: V27 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen MHT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - trafo: "MHT" - test_objects: - phase1PuppiMHT: - suffix: "et" - label: "Histogrammed Puppi MHT" - seededConePuppiMHT: - suffix: "et" - label: "SeededCone MHT" - trackerMHT: - suffix: "" - label: "Tracker MHT" - thresholds: [70, 150] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. MHT30 (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 500 - step: 20 diff --git a/configs/V27/object_performance/muon_matching.yaml b/configs/V27/object_performance/muon_matching.yaml deleted file mode 100644 index 6297051f..00000000 --- a/configs/V27/object_performance/muon_matching.yaml +++ /dev/null @@ -1,101 +0,0 @@ -MuonsMatchingBarrel: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) < 0.83" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) < 0.83" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (barrel)" - binning: - min: 0 - max: 150 - step: 3 - -MuonsMatchingOverlap: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (overlap)" - binning: - min: 0 - max: 150 - step: 3 - -MuonsMatchingEndcap: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (endcap)" - binning: - min: 0 - max: 150 - step: 3 \ No newline at end of file diff --git a/configs/V27/object_performance/muon_matching_eta.yaml b/configs/V27/object_performance/muon_matching_eta.yaml deleted file mode 100644 index 911d057e..00000000 --- a/configs/V27/object_performance/muon_matching_eta.yaml +++ /dev/null @@ -1,58 +0,0 @@ -MuonsMatching_Eta_Pt2to5: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_mu" - suffix: "Eta" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 2" - - "{pt} < 5" - object: - - "abs({eta}) < 2.4" - test_objects: - gmtMuon: - suffix: "Eta" - label: "GMT Muon" - match_dR: 0.3 - gmtTkMuon: - suffix: "Eta" - label: "GMT TkMuon" - match_dR: 0.1 - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (2-5 GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -MuonsMatching_Eta_Pt15toInf: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_mu" - suffix: "Eta" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 15" - object: - - "abs({eta}) < 2.4" - test_objects: - gmtMuon: - suffix: "Eta" - label: "GMT Muon" - match_dR: 0.3 - gmtTkMuon: - suffix: "Eta" - label: "GMT TkMuon" - match_dR: 0.1 - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (>15 GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V27/object_performance/muon_trigger.yaml b/configs/V27/object_performance/muon_trigger.yaml deleted file mode 100644 index 8290ea61..00000000 --- a/configs/V27/object_performance/muon_trigger.yaml +++ /dev/null @@ -1,140 +0,0 @@ -# MuonsTrigger: -# sample: DYLL_M50 -# default_version: V27 -# reference_object: -# object: "part_mu" -# suffix: "Pt" -# label: "Gen Muons" -# cuts: -# event: -# - "{dr_0.3} < 0.15" -# test_objects: -# gmtMuon: -# suffix: "Pt" -# label: "GMT Muon" -# match_dR: 0.3 -# gmtTkMuon: -# suffix: "Pt" -# label: "GMT TkMuon" -# match_dR: 0.3 -# xlabel: "Gen. pT (GeV)" -# ylabel: "Trigger Efficiency (barrel, L1 $p_T > 20$ GeV)" -# thresholds: [20, 25] -# scalings: -# method: "naive" -# threshold: 0.95 -# binning: -# min: 0 -# max: 50 -# step: 1.5 - -MuonsTrigger_Barrel: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) < 0.83" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > 20$ GeV)" - thresholds: [20, 25] - scalings: - method: "naive" - threshold: 0.95 - binning: - min: 0 - max: 50 - step: 1.5 - -MuonsTrigger_Overlap: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (overlap, L1 $p_T > 20$ GeV)" - thresholds: [20, 25] - scalings: - method: "naive" - threshold: 0.95 - binning: - min: 0 - max: 50 - step: 1.5 - -MuonsTrigger_Endcap: - sample: DYLL_M50 - default_version: V27 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 1.24" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 1.24" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 1.24" - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > 20$ GeV)" - thresholds: [20, 25] - scalings: - method: "naive" - threshold: 0.95 - binning: - min: 0 - max: 50 - step: 1.5 diff --git a/configs/V27/object_performance/photon_iso.yaml b/configs/V27/object_performance/photon_iso.yaml deleted file mode 100644 index 498abd0c..00000000 --- a/configs/V27/object_performance/photon_iso.yaml +++ /dev/null @@ -1,60 +0,0 @@ -PhotonIsolation_Barrel: - sample: Hgg - default_version: V27 - iso_vs_efficiency: True - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.479" - object: - - "abs({eta}) < 1.479" - test_objects: - tkPhoton: - suffix: "trkiso" - label: "TkPhoton" - match_dR: 0.15 - cuts: - - "abs({eta}) < 1.479" - - "{passeseleid} == 1" - xlabel: "Isolation" - ylabel: "Efficiency (Barrel)" - binning: - min: 0 - max: 0.5 - step: 0.005 - -PhotonIsolation_Endcap: - sample: Hgg - default_version: V27 - iso_vs_efficiency: True - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.479" - object: - - "abs({eta}) < 2.4" - - "abs({eta}) > 1.479" - test_objects: - tkPhoton: - suffix: "trkiso" - label: "TkPhoton" - match_dR: 0.15 - cuts: - - "abs({eta}) > 1.479" - - "abs({eta}) < 2.4" - - "{passesphoid} == 1" - xlabel: "Isolation" - ylabel: "Efficiency (Endcap)" - binning: - min: 0 - max: 0.5 - step: 0.005 - diff --git a/configs/V27/object_performance/photons_matching.yaml b/configs/V27/object_performance/photons_matching.yaml deleted file mode 100644 index 756f3654..00000000 --- a/configs/V27/object_performance/photons_matching.yaml +++ /dev/null @@ -1,92 +0,0 @@ -PhotonsMatching_Barrel: - sample: Hgg - default_version: V27 - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Photon" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - tkPhoton: - match_dR: 0.15 - suffix: "Pt" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Pt" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 3 - -PhotonsMatching_Endcap: - sample: Hgg - default_version: V27 - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Photon" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Pt" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Pt" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 3 diff --git a/configs/V27/object_performance/photons_matching_eta.yaml b/configs/V27/object_performance/photons_matching_eta.yaml deleted file mode 100644 index 792cecc4..00000000 --- a/configs/V27/object_performance/photons_matching_eta.yaml +++ /dev/null @@ -1,99 +0,0 @@ -PhotonsMatching_Eta_Pt10to25: - sample: Hgg - default_version: V27 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} < 25" - - "{pt} > 10" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG Photon" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - #- "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - #- "({quality} // 4) == 1" - #- "{passeseleid} == 1" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Eta" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - #- "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt25: - sample: Hgg - default_version: V27 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} >= 25" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG EleID" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - #- "{passeseleid} == 1" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Eta" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - #- "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V27/object_performance/photons_matching_eta_iso.yaml b/configs/V27/object_performance/photons_matching_eta_iso.yaml deleted file mode 100644 index 0e9940a1..00000000 --- a/configs/V27/object_performance/photons_matching_eta_iso.yaml +++ /dev/null @@ -1,161 +0,0 @@ -PhotonsMatching_Eta_Pt25_PassSa_NOPhoID_iso0p2: - sample: Hgg - default_version: V27 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton NO PhoID" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - #quality_id: "QUAL_TkPho" - cuts: - - "abs({eta}) < 3.0" - # - "{passesphoid} == 1" - EG: - suffix: "Eta" - label: "EG SaID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passessaid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt15to25_PassEleID_iso0p2: - sample: Hgg - default_version: V27 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 15" - - "{pt} < 25" - object: - - "abs({eta}) < 3.0" - test_objects: - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton EleID" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - #quality_id: "QUAL_TkPho" - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - EG: - suffix: "Eta" - label: "EG EleID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($15 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt25_PassEleID_iso0p2: - sample: Hgg - default_version: V27 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton EleID" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - #quality_id: "QUAL_TkPho" - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - EG: - suffix: "Eta" - label: "EG EleID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt25_PassSa_PhoID_iso0p2: - sample: Hgg - default_version: V27 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton PhoID" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - #quality_id: "QUAL_TkPho" - cuts: - - "abs({eta}) < 3.0" - - "{passesphoid} == 1" - EG: - suffix: "Eta" - label: "EG SaID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passessaid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - diff --git a/configs/V27/object_performance/photons_trigger.yaml b/configs/V27/object_performance/photons_trigger.yaml deleted file mode 100644 index b2eb22a9..00000000 --- a/configs/V27/object_performance/photons_trigger.yaml +++ /dev/null @@ -1,100 +0,0 @@ -PhotonsTrigger_Barrel: - sample: Hgg - default_version: V27 - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Photon" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - tkPhoton: - match_dR: 0.15 - suffix: "Pt" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Pt" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - thresholds: [10, 20, 30, 40] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" - binning: - min: 0 - max: 150 - step: 1.5 - -PhotonsTrigger_Endcap: - sample: Hgg - default_version: V27 - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Photon" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Pt" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Pt" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - thresholds: [10, 20, 30, 40] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" - binning: - min: 0 - max: 150 - step: 1.5 diff --git a/configs/V27/object_performance/scaling_thresholds.yaml b/configs/V27/object_performance/scaling_thresholds.yaml deleted file mode 100644 index 838980ea..00000000 --- a/configs/V27/object_performance/scaling_thresholds.yaml +++ /dev/null @@ -1,5 +0,0 @@ -Jet: {25, 30, 35, 40, 45, 50, 55, 60, 70, 75, 80, 85, 90, 100, 120, 125, 130, 140, 150, 175} -Muon: {7, 9, 10, 12, 14, 15, 17, 20, 26, 25, 27, 30} -Tau: {27, 30, 40, 50, 60, 70} -EG: {7, 9, 12, 14, 15, 17, 20, 26, 25, 27, 30, 40, 50} -HT: {70, 80, 90, 100, 125, 150, 175} diff --git a/configs/V27/object_performance/tau_matching.yaml b/configs/V27/object_performance/tau_matching.yaml deleted file mode 100644 index cad1e11a..00000000 --- a/configs/V27/object_performance/tau_matching.yaml +++ /dev/null @@ -1,67 +0,0 @@ -TausMatchingBarrel: - sample: VBFHToTauTau - default_version: V27 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 6 - -TausMatchingEndcap: - sample: VBFHToTauTau - default_version: V27 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 6 diff --git a/configs/V27/object_performance/tau_matching_wHH.yaml b/configs/V27/object_performance/tau_matching_wHH.yaml deleted file mode 100644 index 3868ee93..00000000 --- a/configs/V27/object_performance/tau_matching_wHH.yaml +++ /dev/null @@ -1,67 +0,0 @@ -HHTausMatchingBarrel: - sample: HHToTauTau - default_version: V27 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 6 - -HHTausMatchingEndcap: - sample: HHToTauTau - default_version: V27 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 6 diff --git a/configs/V27/object_performance/tau_trigger.yaml b/configs/V27/object_performance/tau_trigger.yaml deleted file mode 100644 index 16634a8f..00000000 --- a/configs/V27/object_performance/tau_trigger.yaml +++ /dev/null @@ -1,151 +0,0 @@ -TauTriggerBarrel_90perc: - sample: VBFHToTauTau - default_version: V27 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" - thresholds: [20, 30] - scalings: - method: "naive" - threshold: 0.90 - binning: - min: 0 - max: 150 - step: 6 - -TauTriggerEndcap_90perc: - sample: VBFHToTauTau - default_version: V27 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" - thresholds: [20, 30] - scalings: - method: "naive" - threshold: 0.90 - binning: - min: 0 - max: 150 - step: 6 - -TauTriggerBarrel_50perc: - sample: VBFHToTauTau - default_version: V27 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" - thresholds: [20, 30] - scalings: - method: "naive" - threshold: 0.50 - binning: - min: 0 - max: 150 - step: 6 - -TauTriggerEndcap_50perc: - sample: VBFHToTauTau - default_version: V27 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" - thresholds: [20, 30] - scalings: - method: "naive" - threshold: 0.50 - binning: - min: 0 - max: 150 - step: 6 diff --git a/configs/V27/object_performance/version_comparison.yaml b/configs/V27/object_performance/version_comparison.yaml deleted file mode 100644 index 3aeeab6e..00000000 --- a/configs/V27/object_performance/version_comparison.yaml +++ /dev/null @@ -1,44 +0,0 @@ -V22_V27_GMTMuonsBarrel_Comparison: - files: - MuonsTrigger_20_V22: - object: gmtMuon - dir: outputs/V22/turnons/ - label: "GMT Muon (V22)" - MuonsTrigger_20_V27: - object: gmtMuon - dir: outputs/V27/turnons/ - label: "GMT Muon (V27)" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - watermark: "V22_V27_gmtMuonBarrel_Comp" - save_dir: "outputs/V22vs27/turnons" - -V22_V27_ElectronsBarrel_Comparison: - files: - ElectronsTriggerBarrel_30_V22: - object: tkElectron - dir: outputs/V22/turnons/ - label: "tkElectron (V22)" - ElectronsTriggerBarrel_30_V27: - object: tkElectron - dir: outputs/V27/turnons/ - label: "tkElectron (V27)" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - watermark: "V22_V27_EGBarrel_Comp" - save_dir: "outputs/V22vs27/turnons" - -V22_V27_GMTtkMuonsBarrel_Comparison: - files: - MuonsTrigger_20_V22: - object: gmtMuon - dir: outputs/V22/turnons/ - label: "GMT tkMuon (V22)" - MuonsTrigger_20_V27: - object: gmtMuon - dir: outputs/V27/turnons/ - label: "GMT tkMuon (V27)" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - watermark: "V22_V27_gmtTkMuonBarrel_Comp" - save_dir: "outputs/V22vs27/turnons" diff --git a/configs/V28/caching.yaml b/configs/V28/caching.yaml deleted file mode 100644 index 69c40fe1..00000000 --- a/configs/V28/caching.yaml +++ /dev/null @@ -1,75 +0,0 @@ -V28: - DYLL_M50: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/v28/DYToLL_M-50_TuneCP5_14TeV-pythia8/DY_M50_1252_crab_v28_v0/230412_202821/0000/*.root - trees_branches: - genTree/L1GenTree: - part_mu: [Id, Stat, Pt, Eta, Phi] - part_e: [Id, Stat, Pt, Eta, Phi] - l1PhaseIITree/L1PhaseIITree: - tkElectron: [Pt, Et, Eta, Phi, Chg, Bx, TrkIso, PfIso, PuppiIso, zVtx, HwQual, EGRefPt, EGRefEta, EGRefPhi, HGC, PassesEleID, PassesPhoID] - EG: [Pt, Et, Eta, Phi, Bx, Iso, HwQual, HGC, PassesEleID, PassesSaID] - gmtMuon: [Pt, Eta, Phi, Z0, D0, IPt, IEta, IPhi, IZ0, ID0, Chg, Iso, Qual, Beta, Bx] - gmtTkMuon: [Pt, Eta, Phi, Z0, D0, IPt, IEta, IPhi, IZ0, ID0, Chg, Iso, Qual, Beta, NStubs, Bx] - TT: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/v28/TT_TuneCP5_14TeV-powheg-pythia8/TT_1252_crab_v28_v0/230412_194315/0000/*.root - trees_branches: - genTree/L1GenTree: - genMetTrue: "all" - jet: "all" - l1PhaseIITree/L1PhaseIITree: - trackerMET: "all" - trackerMHT: "all" - puppiMET: "all" - phase1PuppiMHT: "all" - trackerHT: "all" - phase1PuppiHT: "all" - seededConePuppiJet: [Pt, Et, Eta, Phi] - seededConeExtendedPuppiJet: [Pt, Et, Eta, Phi, BJetNN] - seededConePuppiHT: "all" - seededConePuppiMHT: "all" - trackerJet: [Pt, Eta, Phi] - phase1PuppiJet: "all" - # caloJet: "all" - caloJet: [Et, Pt, Eta, Phi] - # VBFHToTauTau: - # ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/VBFHToTauTau_1252_200PU/NTP/v27_PU200/*.root - # trees_branches: - # genTree/L1GenTree: - # part_tau: [Id, Stat, Pt, Eta, Phi, Parent, E] - # l1PhaseIITree/L1PhaseIITree: - # nnTau: [Et, Eta, Pt, Phi, FullIso, Z0, PassTightNN, Chg, DXY, PassLooseNN] - # caloTau: [Et, Eta, Pt, Phi, Iso, HwQual, Bx] - # HHToTauTau: - # ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/GluGluToHHTo2B2Tau_node_SM_TuneCP5_14TeV-madgraph-pythia8/HHToTauTau_1252_200PU_crab_v27_PU200_fixHwQual/230320_095340/0000/L1NtuplePhaseII_Step1_1.root - # trees_branches: - # genTree/L1GenTree: - # part_tau: [Id, Stat, Pt, Eta, Phi, Parent, E] - # l1PhaseIITree/L1PhaseIITree: - # nnTau: [Et, Eta, Pt, Phi, FullIso, Z0, PassTightNN, Chg, DXY, PassLooseNN] - # caloTau: [Et, Eta, Pt, Phi, Iso, HwQual] - Hgg: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/v28/GluGluHToGG_M-125_TuneCP5_14TeV-powheg-pythia8/GluGluHToGG_1252_crab_v28_v0/230412_202835/0000/*.root - trees_branches: - genTree/L1GenTree: - part_gamma: [Id, Stat, Pt, Eta, Phi] - l1PhaseIITree/L1PhaseIITree: - tkPhoton: [Pt, Et, Eta, Phi, Bx, TrkIso, HwQual, HGC, PassesEleID, PassesPhoID] - EG: [Pt, Et, Eta, Phi, Bx, Iso, HwQual, HGC, PassesEleID, PassesSaID] - MinBias: - ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/v28/MinBias_TuneCP5_14TeV-pythia8/MinBias_1252_crb_v28_v0/230412_203649/*/*.root - trees_branches: - l1PhaseIITree/L1PhaseIITree: - puppiMET: "all" - phase1PuppiJet: "all" - phase1PuppiMHT: "all" - phase1PuppiHT: "all" - seededConePuppiJet: [Pt, Et, Eta, Phi] - seededConePuppiHT: "all" - seededConePuppiMHT: "all" - tkElectron: [Pt, Et, Eta, Phi, Chg, Bx, TrkIso, PfIso, PuppiIso, zVtx, HwQual, HGC, PassesEleID, PassesPhoID] - EG: [Pt, Et, Eta, Phi, Bx, Iso, HwQual, HGC, PassesEleID, PassesSaID] - gmtTkMuon: [Pt, Eta, Phi, Z0, D0, IPt, IEta, IPhi, IZ0, ID0, Chg, Iso, Qual, Beta, NStubs, Bx] - nnTau: [Et, Eta, Pt, Phi, FullIso, Z0, PassTightNN, Chg, DXY, PassLooseNN] - tkPhoton: [Pt, Et, Eta, Phi, Bx, TrkIso, HwQual, HGC, PassesEleID, PassesPhoID] - z0L1TkPV: "all" - diff --git a/configs/V28/object_performance/electron_iso.yaml b/configs/V28/object_performance/electron_iso.yaml deleted file mode 100644 index 5f2a9c69..00000000 --- a/configs/V28/object_performance/electron_iso.yaml +++ /dev/null @@ -1,29 +0,0 @@ -ElectronsIsolation: - sample: DYLL_M50 - default_version: V28 - iso_vs_efficiency: True - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - tkElectron: - suffix: "trkiso" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Isolation" - ylabel: "Efficiency" - binning: - min: 0 - max: 0.5 - step: 0.005 - diff --git a/configs/V28/object_performance/electron_matching.yaml b/configs/V28/object_performance/electron_matching.yaml deleted file mode 100644 index 897ff250..00000000 --- a/configs/V28/object_performance/electron_matching.yaml +++ /dev/null @@ -1,92 +0,0 @@ -ElectronsMatchingBarrel: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.4" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 3 - -ElectronsMatchingEndcap: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.4" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 3 - diff --git a/configs/V28/object_performance/electron_matching_eta b/configs/V28/object_performance/electron_matching_eta deleted file mode 100644 index be17de22..00000000 --- a/configs/V28/object_performance/electron_matching_eta +++ /dev/null @@ -1,88 +0,0 @@ -ElectronsMatchingBarrel: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.4" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - tkElectronIso: - suffix: "Pt" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 3 - -ElectronsMatchingEndcap: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.4" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - tkElectronIso: - suffix: "Pt" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 3 - diff --git a/configs/V28/object_performance/electron_matching_eta.yaml b/configs/V28/object_performance/electron_matching_eta.yaml deleted file mode 100644 index 7cb7753e..00000000 --- a/configs/V28/object_performance/electron_matching_eta.yaml +++ /dev/null @@ -1,92 +0,0 @@ -ElectronsMatching_Eta_Pt10to25: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_e" - suffix: "Eta" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} < 25" - - "{pt} > 10" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3.0" - tkElectron: - match_dR: 0.15 - suffix: "Eta" - label: "TkElectron" - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Eta" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -ElectronsMatching_Eta_Pt25toInf: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_e" - suffix: "Eta" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3.0" - tkElectron: - suffix: "Eta" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Eta" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V28/object_performance/electron_matching_eta_test.yaml b/configs/V28/object_performance/electron_matching_eta_test.yaml deleted file mode 100644 index d2122814..00000000 --- a/configs/V28/object_performance/electron_matching_eta_test.yaml +++ /dev/null @@ -1,34 +0,0 @@ -ElectronsMatching_Eta_Pt25toInf_fixEGID: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_e" - suffix: "Eta" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3.0" - tkElectron: - suffix: "Eta" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V28/object_performance/electron_matching_new.yaml b/configs/V28/object_performance/electron_matching_new.yaml deleted file mode 100644 index b54780c2..00000000 --- a/configs/V28/object_performance/electron_matching_new.yaml +++ /dev/null @@ -1,87 +0,0 @@ -ElectronsMatchingBarrel: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.4" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - tkElectronIso: - suffix: "Pt" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 3 - -ElectronsMatchingEndcap: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.4" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - tkElectronIso: - suffix: "Pt" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 3 diff --git a/configs/V28/object_performance/electron_trigger.yaml b/configs/V28/object_performance/electron_trigger.yaml deleted file mode 100644 index 2d2a48ba..00000000 --- a/configs/V28/object_performance/electron_trigger.yaml +++ /dev/null @@ -1,99 +0,0 @@ -ElectronsTriggerBarrel: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.8" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.8" - tkElectron: - suffix: "Pt" - label: "tkElectron" - match_dR: 0.15 - cuts: - - "{passeseleid} == 1" - - "abs({eta}) < 2.8" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "tkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.8" - - "{passeseleid} == 1" - thresholds: [10, 20, 30, 40] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" - binning: - min: 0 - max: 150 - step: 1.5 - -ElectronsTriggerEndcap: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_e" - suffix: "Pt" - label: "Gen Electrons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.8" - test_objects: - EG: - suffix: "Pt" - label: "EG Electron" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.8" - tkElectron: - suffix: "Pt" - label: "tkElectron" - match_dR: 0.15 - cuts: - - "{passeseleid} == 1" - - "abs({eta}) < 2.8" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "tkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.8" - - "{passeseleid} == 1" - thresholds: [10, 20, 30, 40] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" - binning: - min: 0 - max: 150 - step: 1.5 diff --git a/configs/V28/object_performance/jets_matching.yaml b/configs/V28/object_performance/jets_matching.yaml deleted file mode 100644 index f41f1b01..00000000 --- a/configs/V28/object_performance/jets_matching.yaml +++ /dev/null @@ -1,164 +0,0 @@ -JetMatchingForward_3p7to7: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 3.7" - object: - - "abs({eta}) < 5" - test_objects: - # phase1PuppiJet: - # match_dR: 0.3 - # suffix: "Pt" - # label: "Histogrammed PuppiJet" - # cuts: - # - "abs({eta}) < 7" - # seededConePuppiJet: - # match_dR: 0.35 - # suffix: "Pt" - # label: "Seeded Cone PuppiJet" - # cuts: - # - "abs({eta}) < 7" - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 7" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, forward)" - binning: - min: 0 - max: 300 - step: 5 - -JetMatchingBarrel: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 2.5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, barrel)" - binning: - min: 0 - max: 700 - step: 10 - -JetMatchingEndcap: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, endcap)" - binning: - min: 0 - max: 900 - step: 20 - -JetMatchingForward: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 2.4" - object: - - "abs({eta}) < 5" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, forward)" - binning: - min: 0 - max: 700 - step: 10 - diff --git a/configs/V28/object_performance/jets_matching_eta.yaml b/configs/V28/object_performance/jets_matching_eta.yaml deleted file mode 100644 index 5ed773e9..00000000 --- a/configs/V28/object_performance/jets_matching_eta.yaml +++ /dev/null @@ -1,163 +0,0 @@ -JetMatching_Eta_Pt40To100: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Eta" - label: "Gen Jets" - cuts: - event: - - "{pt} > 40" - - "{pt} < 100" - object: - - "abs({eta}) < 5" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Eta" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - trackerJet: - match_dR: 0.4 - suffix: "Eta" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (40-100 GeV)" - binning: - min: -5 - max: 5 - step: 0.25 - -JetMatching_Eta_Pt100ToInf: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Eta" - label: "Gen Jets" - cuts: - event: - - "{pt} > 100" - object: - - "abs({eta}) < 5" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Eta" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - trackerJet: - match_dR: 0.4 - suffix: "Eta" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (>100 GeV)" - binning: - min: -5 - max: 5 - step: 0.25 - -JetMatching_Eta_Pt100ToInf_extEta: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Eta" - label: "Gen Jets" - cuts: - event: - - "{pt} > 100" - object: - - "abs({eta}) < 7" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 7" - # phase1PuppiJet: - # match_dR: 0.3 - # suffix: "Eta" - # label: "Histogrammed PuppiJet" - # cuts: - # - "abs({eta}) < 7" - # seededConePuppiJet: - # match_dR: 0.35 - # suffix: "Eta" - # label: "Seeded Cone PuppiJet" - # cuts: - # - "abs({eta}) < 7" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (>100 GeV)" - binning: - min: -5.5 - max: 5.5 - step: 0.25 -JetMatching_Eta_Pt100ToInf_extEta: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Eta" - label: "Gen Jets" - cuts: - event: - - "{pt} > 100" - object: - - "abs({eta}) < 7" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 7" - # phase1PuppiJet: - # match_dR: 0.3 - # suffix: "Eta" - # label: "Histogrammed PuppiJet" - # cuts: - # - "abs({eta}) < 7" - # seededConePuppiJet: - # match_dR: 0.35 - # suffix: "Eta" - # label: "Seeded Cone PuppiJet" - # cuts: - # - "abs({eta}) < 7" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (>100 GeV)" - binning: - min: -7 - max: 7 - step: 0.25 diff --git a/configs/V28/object_performance/jets_trigger.yaml b/configs/V28/object_performance/jets_trigger.yaml deleted file mode 100644 index 8b85e29f..00000000 --- a/configs/V28/object_performance/jets_trigger.yaml +++ /dev/null @@ -1,137 +0,0 @@ -JetTurnonBarrel: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 2.5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - thresholds: [50,100] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, barrel)" - binning: - min: 0 - max: 700 - step: 10 - -JetTurnonEndcap: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" - thresholds: [50] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, endcap)" - binning: - min: 0 - max: 900 - step: 20 - -JetTurnonForward: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 2.4" - object: - - "abs({eta}) < 5" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - thresholds: [50,100] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Trigger Efficiency ( GeV, forward)" - binning: - min: 0 - max: 700 - step: 10 diff --git a/configs/V28/object_performance/jets_trigger_fwd.yaml b/configs/V28/object_performance/jets_trigger_fwd.yaml deleted file mode 100644 index e568ed61..00000000 --- a/configs/V28/object_performance/jets_trigger_fwd.yaml +++ /dev/null @@ -1,41 +0,0 @@ -JetTurnonFwd_3p7to7: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen Jets" - cuts: - event: - - "abs({eta}) > 3.7" - object: - - "abs({eta}) < 7" - test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 7" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 7" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 7" - thresholds: [50,100] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: r'Trigger Efficiency ( GeV, $3.6<\eta<6$)' - binning: - min: 0 - max: 300 - step: 10 diff --git a/configs/V28/object_performance/met_ht_mht.yaml b/configs/V28/object_performance/met_ht_mht.yaml deleted file mode 100644 index 49a68cfa..00000000 --- a/configs/V28/object_performance/met_ht_mht.yaml +++ /dev/null @@ -1,114 +0,0 @@ -HT: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen HT" - trafo: "HT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - test_objects: - trackerHT: - suffix: "" - label: "Tracker HT" - phase1PuppiHT: - suffix: "" - label: "Histogrammed Puppi HT" - seededConePuppiHT: - suffix: "" - label: "SeededCone HT" - thresholds: [350] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 750 - step: 20 - -MHT30: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen MHT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 30" - trafo: "MHT" - test_objects: - trackerMHT: - suffix: "" - label: "Tracker MHT" - thresholds: [70, 150] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 500 - step: 20 - -MHT15: - sample: TT - default_version: V28 - reference_object: - object: "jet" - suffix: "Pt" - label: "Gen MHT" - cuts: - object: - - "abs({eta}) < 2.4" - - "{pt} > 15" - trafo: "MHT" - test_objects: - phase1PuppiMHT: - suffix: "et" - label: "Histogrammed Puppi MHT" - seededConePuppiMHT: - suffix: "et" - label: "SeededCone MHT" - thresholds: [70, 150] - scalings: - method: "naive" - threshold: 0.90 - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - binning: - min: 0 - max: 500 - step: 12 - -MET: - sample: TT - default_version: V28 - reference_object: - object: "genMetTrue" - suffix: "" - label: "Gen MET" - test_objects: - trackerMET: - suffix: "" - label: "Tracker MET" - puppiMET: - suffix: "et" - label: "Puppi MET" - thresholds: [150] - xlabel: "Gen. MET (GeV)" - ylabel: "Trigger Efficiency ( GeV)" - scalings: - method: "naive" - threshold: 0.90 - binning: - min: 0 - max: 500 - step: 20 diff --git a/configs/V28/object_performance/muon_matching.yaml b/configs/V28/object_performance/muon_matching.yaml deleted file mode 100644 index 5513e074..00000000 --- a/configs/V28/object_performance/muon_matching.yaml +++ /dev/null @@ -1,101 +0,0 @@ -MuonsMatchingBarrel: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) < 0.83" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) < 0.83" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (barrel)" - binning: - min: 0 - max: 150 - step: 3 - -MuonsMatchingOverlap: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (overlap)" - binning: - min: 0 - max: 150 - step: 3 - -MuonsMatchingEndcap: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (endcap)" - binning: - min: 0 - max: 150 - step: 3 \ No newline at end of file diff --git a/configs/V28/object_performance/muon_matching_eta.yaml b/configs/V28/object_performance/muon_matching_eta.yaml deleted file mode 100644 index 7f2f2b38..00000000 --- a/configs/V28/object_performance/muon_matching_eta.yaml +++ /dev/null @@ -1,58 +0,0 @@ -MuonsMatching_Eta_Pt2to5: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_mu" - suffix: "Eta" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 2" - - "{pt} < 5" - object: - - "abs({eta}) < 2.4" - test_objects: - gmtMuon: - suffix: "Eta" - label: "GMT Muon" - match_dR: 0.3 - gmtTkMuon: - suffix: "Eta" - label: "GMT TkMuon" - match_dR: 0.1 - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (2-5 GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -MuonsMatching_Eta_Pt15toInf: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_mu" - suffix: "Eta" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 15" - object: - - "abs({eta}) < 2.4" - test_objects: - gmtMuon: - suffix: "Eta" - label: "GMT Muon" - match_dR: 0.3 - gmtTkMuon: - suffix: "Eta" - label: "GMT TkMuon" - match_dR: 0.1 - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency (>15 GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V28/object_performance/muon_trigger.yaml b/configs/V28/object_performance/muon_trigger.yaml deleted file mode 100644 index 513d3566..00000000 --- a/configs/V28/object_performance/muon_trigger.yaml +++ /dev/null @@ -1,140 +0,0 @@ -# MuonsTrigger: -# sample: DYLL_M50 -# default_version: V28 -# reference_object: -# object: "part_mu" -# suffix: "Pt" -# label: "Gen Muons" -# cuts: -# event: -# - "{dr_0.3} < 0.15" -# test_objects: -# gmtMuon: -# suffix: "Pt" -# label: "GMT Muon" -# match_dR: 0.3 -# gmtTkMuon: -# suffix: "Pt" -# label: "GMT TkMuon" -# match_dR: 0.3 -# xlabel: "Gen. pT (GeV)" -# ylabel: "Trigger Efficiency (barrel, L1 $p_T > 20$ GeV)" -# thresholds: [20, 25] -# scalings: -# method: "naive" -# threshold: 0.95 -# binning: -# min: 0 -# max: 50 -# step: 1.5 - -MuonsTrigger_Barrel: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) < 0.83" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > 20$ GeV)" - thresholds: [20, 25] - scalings: - method: "naive" - threshold: 0.95 - binning: - min: 0 - max: 50 - step: 1.5 - -MuonsTrigger_Overlap: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (overlap, L1 $p_T > 20$ GeV)" - thresholds: [20, 25] - scalings: - method: "naive" - threshold: 0.95 - binning: - min: 0 - max: 50 - step: 1.5 - -MuonsTrigger_Endcap: - sample: DYLL_M50 - default_version: V28 - reference_object: - object: "part_mu" - suffix: "Pt" - label: "Gen Muons" - cuts: - event: - - "{dr_0.3} < 0.15" - object: - - "abs({eta}) > 1.24" - test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 1.24" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 1.24" - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > 20$ GeV)" - thresholds: [20, 25] - scalings: - method: "naive" - threshold: 0.95 - binning: - min: 0 - max: 50 - step: 1.5 diff --git a/configs/V28/object_performance/photon_iso.yaml b/configs/V28/object_performance/photon_iso.yaml deleted file mode 100644 index bed6af45..00000000 --- a/configs/V28/object_performance/photon_iso.yaml +++ /dev/null @@ -1,58 +0,0 @@ -PhotonIsolation_Barrel: - sample: Hgg - default_version: V28 - iso_vs_efficiency: True - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 1.5" - test_objects: - tkPhoton: - suffix: "trkiso" - label: "TkPhoton" - match_dR: 0.15 - cuts: - - "abs({eta}) < 1.5" - - "{passesphoid} == 1" - xlabel: "Isolation" - ylabel: "Efficiency" - binning: - min: 0 - max: 0.5 - step: 0.005 - -PhotonIsolation_Endcap: - sample: Hgg - default_version: V28 - iso_vs_efficiency: True - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) > 1.5" - test_objects: - tkPhoton: - suffix: "trkiso" - label: "TkPhoton" - match_dR: 0.15 - cuts: - - "abs({eta}) > 1.5" - - "{passesphoid} == 1" - xlabel: "Isolation" - ylabel: "Efficiency" - binning: - min: 0 - max: 0.5 - step: 0.005 - diff --git a/configs/V28/object_performance/photons_matching.yaml b/configs/V28/object_performance/photons_matching.yaml deleted file mode 100644 index 5c95d869..00000000 --- a/configs/V28/object_performance/photons_matching.yaml +++ /dev/null @@ -1,92 +0,0 @@ -PhotonsMatching_Barrel: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Photon" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - tkPhoton: - match_dR: 0.15 - suffix: "Pt" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Pt" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 3 - -PhotonsMatching_Endcap: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Photon" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Pt" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Pt" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 3 diff --git a/configs/V28/object_performance/photons_matching_eta.yaml b/configs/V28/object_performance/photons_matching_eta.yaml deleted file mode 100644 index bd7fa469..00000000 --- a/configs/V28/object_performance/photons_matching_eta.yaml +++ /dev/null @@ -1,99 +0,0 @@ -PhotonsMatching_Eta_Pt10to25: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} < 25" - - "{pt} > 10" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG Photon" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - #- "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - #- "({quality} // 4) == 1" - #- "{passeseleid} == 1" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Eta" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - #- "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt25: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} >= 25" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG EleID" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - #- "{passeseleid} == 1" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Eta" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - #- "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V28/object_performance/photons_matching_eta_IDtest.yaml b/configs/V28/object_performance/photons_matching_eta_IDtest.yaml deleted file mode 100644 index 69f8f06d..00000000 --- a/configs/V28/object_performance/photons_matching_eta_IDtest.yaml +++ /dev/null @@ -1,156 +0,0 @@ -PhotonsMatching_Eta_Pt10to25_PassEleID: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} < 25" - - "{pt} > 10" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG EleID" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton" - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Eta" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt10to25_PassSa_PhoID: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} < 25" - - "{pt} > 10" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG SaID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passessaid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton PhoID" - cuts: - - "abs({eta}) < 3.0" - - "{passesphoid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt25_PassEleID: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG EleID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton EleID" - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt25_PassSa_PhoID: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - EG: - suffix: "Eta" - label: "EG SaID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passessaid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton PhoID" - cuts: - - "abs({eta}) < 3.0" - - "{passesphoid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 diff --git a/configs/V28/object_performance/photons_matching_eta_iso.yaml b/configs/V28/object_performance/photons_matching_eta_iso.yaml deleted file mode 100644 index 09ed7b18..00000000 --- a/configs/V28/object_performance/photons_matching_eta_iso.yaml +++ /dev/null @@ -1,161 +0,0 @@ -PhotonsMatching_Eta_Pt25_PassSa_NOPhoID_iso0p2: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton NO PhoID" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - #quality_id: "QUAL_TkPho" - cuts: - - "abs({eta}) < 3.0" - # - "{passesphoid} == 1" - EG: - suffix: "Eta" - label: "EG SaID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passessaid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt15to25_PassEleID_iso0p2: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 15" - - "{pt} < 25" - object: - - "abs({eta}) < 3.0" - test_objects: - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton EleID" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - #quality_id: "QUAL_TkPho" - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - EG: - suffix: "Eta" - label: "EG EleID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($15 < p_T < 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt25_PassEleID_iso0p2: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton EleID" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - #quality_id: "QUAL_TkPho" - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - EG: - suffix: "Eta" - label: "EG EleID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - -PhotonsMatching_Eta_Pt25_PassSa_PhoID_iso0p2: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Eta" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "{pt} > 25" - object: - - "abs({eta}) < 3.0" - test_objects: - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "TkPhoton PhoID" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - #quality_id: "QUAL_TkPho" - cuts: - - "abs({eta}) < 3.0" - - "{passesphoid} == 1" - EG: - suffix: "Eta" - label: "EG SaID" - match_dR: 0.2 - #quality_id: "QUAL_EG" - cuts: - - "abs({eta}) < 3" - - "{passessaid} == 1" - xlabel: "Gen. $\\eta$" - ylabel: "Matching Efficiency ($p_T > 25$ GeV)" - binning: - min: -3 - max: 3 - step: 0.2 - diff --git a/configs/V28/object_performance/photons_trigger.yaml b/configs/V28/object_performance/photons_trigger.yaml deleted file mode 100644 index 3403aeb5..00000000 --- a/configs/V28/object_performance/photons_trigger.yaml +++ /dev/null @@ -1,100 +0,0 @@ -PhotonsTrigger_Barrel: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Photon" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - tkPhoton: - match_dR: 0.15 - suffix: "Pt" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Pt" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - thresholds: [10, 20, 30, 40] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" - binning: - min: 0 - max: 150 - step: 1.5 - -PhotonsTrigger_Endcap: - sample: Hgg - default_version: V28 - reference_object: - object: "part_gamma" - suffix: "Pt" - label: "Gen Photons" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - EG: - suffix: "Pt" - label: "EG Photon" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Pt" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Pt" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - thresholds: [10, 20, 30, 40] - scalings: - method: "naive" - threshold: 0.95 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" - binning: - min: 0 - max: 150 - step: 1.5 diff --git a/configs/V28/object_performance/scaling_thresholds.yaml b/configs/V28/object_performance/scaling_thresholds.yaml deleted file mode 100644 index 838980ea..00000000 --- a/configs/V28/object_performance/scaling_thresholds.yaml +++ /dev/null @@ -1,5 +0,0 @@ -Jet: {25, 30, 35, 40, 45, 50, 55, 60, 70, 75, 80, 85, 90, 100, 120, 125, 130, 140, 150, 175} -Muon: {7, 9, 10, 12, 14, 15, 17, 20, 26, 25, 27, 30} -Tau: {27, 30, 40, 50, 60, 70} -EG: {7, 9, 12, 14, 15, 17, 20, 26, 25, 27, 30, 40, 50} -HT: {70, 80, 90, 100, 125, 150, 175} diff --git a/configs/V28/object_performance/tau_matching.yaml b/configs/V28/object_performance/tau_matching.yaml deleted file mode 100644 index 081bdf31..00000000 --- a/configs/V28/object_performance/tau_matching.yaml +++ /dev/null @@ -1,67 +0,0 @@ -TausMatchingBarrel: - sample: VBFHToTauTau - default_version: V28 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 6 - -TausMatchingEndcap: - sample: VBFHToTauTau - default_version: V28 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 6 diff --git a/configs/V28/object_performance/tau_matching_wHH.yaml b/configs/V28/object_performance/tau_matching_wHH.yaml deleted file mode 100644 index 93508232..00000000 --- a/configs/V28/object_performance/tau_matching_wHH.yaml +++ /dev/null @@ -1,67 +0,0 @@ -HHTausMatchingBarrel: - sample: HHToTauTau - default_version: V28 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - binning: - min: 0 - max: 150 - step: 6 - -HHTausMatchingEndcap: - sample: HHToTauTau - default_version: V28 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Endcap)" - binning: - min: 0 - max: 150 - step: 6 diff --git a/configs/V28/object_performance/tau_trigger.yaml b/configs/V28/object_performance/tau_trigger.yaml deleted file mode 100644 index c5ac4e62..00000000 --- a/configs/V28/object_performance/tau_trigger.yaml +++ /dev/null @@ -1,75 +0,0 @@ -TauTriggerBarrel: - sample: VBFHToTauTau - default_version: V28 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) < 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" - thresholds: [20, 30] - scalings: - method: "naive" - threshold: 0.90 - binning: - min: 0 - max: 150 - step: 6 - -TauTriggerEndcap: - sample: VBFHToTauTau - default_version: V28 - reference_object: - object: "part_tau" - suffix: "Pt" - label: "Gen Taus" - cuts: - event: - - "{dr_0.3} < 0.15" - - "abs({eta}) > 1.5" - object: - - "abs({eta}) < 2.4" - test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 - xlabel: "Gen. pT (GeV)" - ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" - thresholds: [20, 30] - scalings: - method: "naive" - threshold: 0.90 - binning: - min: 0 - max: 150 - step: 6 \ No newline at end of file diff --git a/configs/V28/object_performance/version_comparison.yaml b/configs/V28/object_performance/version_comparison.yaml deleted file mode 100644 index 9ad12bd4..00000000 --- a/configs/V28/object_performance/version_comparison.yaml +++ /dev/null @@ -1,44 +0,0 @@ -V22_V28_GMTMuonsBarrel_Comparison: - files: - MuonsTrigger_20_V22: - object: gmtMuon - dir: outputs/V22/turnons/ - label: "GMT Muon (V22)" - MuonsTrigger_20_V28: - object: gmtMuon - dir: outputs/V28/turnons/ - label: "GMT Muon (V28)" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - watermark: "V22_V28_gmtMuonBarrel_Comp" - save_dir: "outputs/V22vs27/turnons" - -V22_V28_ElectronsBarrel_Comparison: - files: - ElectronsTriggerBarrel_30_V22: - object: tkElectron - dir: outputs/V22/turnons/ - label: "tkElectron (V22)" - ElectronsTriggerBarrel_30_V28: - object: tkElectron - dir: outputs/V28/turnons/ - label: "tkElectron (V28)" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - watermark: "V22_V28_EGBarrel_Comp" - save_dir: "outputs/V22vs27/turnons" - -V22_V28_GMTtkMuonsBarrel_Comparison: - files: - MuonsTrigger_20_V22: - object: gmtMuon - dir: outputs/V22/turnons/ - label: "GMT tkMuon (V22)" - MuonsTrigger_20_V28: - object: gmtMuon - dir: outputs/V28/turnons/ - label: "GMT tkMuon (V28)" - xlabel: "Gen. $p_T$ (GeV)" - ylabel: "Matching Efficiency (Barrel)" - watermark: "V22_V28_gmtTkMuonBarrel_Comp" - save_dir: "outputs/V22vs27/turnons" diff --git a/configs/V29/object_performance/jets_matching.yaml b/configs/V29/object_performance/jets_matching.yaml index b979ebdb..a499dc14 100644 --- a/configs/V29/object_performance/jets_matching.yaml +++ b/configs/V29/object_performance/jets_matching.yaml @@ -1,9 +1,10 @@ JetMatchingForward_3p7to7: - sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Pt" + sample: TT + x_arg: "Pt" label: "Gen Jets" cuts: event: @@ -11,24 +12,7 @@ JetMatchingForward_3p7to7: object: - "abs({eta}) < 5" test_objects: - # phase1PuppiJet: - # match_dR: 0.3 - # suffix: "Pt" - # label: "Histogrammed PuppiJet" - # cuts: - # - "abs({eta}) < 7" - # seededConePuppiJet: - # match_dR: 0.35 - # suffix: "Pt" - # label: "Seeded Cone PuppiJet" - # cuts: - # - "abs({eta}) < 7" - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 7" + caloJet-default: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Trigger Efficiency ( GeV, forward)" binning: @@ -37,11 +21,12 @@ JetMatchingForward_3p7to7: step: 5 JetMatchingBarrel: - sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Pt" + sample: TT + x_arg: "Pt" label: "Gen Jets" cuts: event: @@ -49,30 +34,9 @@ JetMatchingBarrel: object: - "abs({eta}) < 2.4" test_objects: - # caloJet: - # match_dR: 0.3 - # suffix: "Pt" - # label: "Calo Jet" - # cuts: - # - "abs({eta}) < 2.5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" + phase1PuppiJet-barrel: "Pt" + seededConePuppiJet-barrel: "Pt" + trackerJet-barrel: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Trigger Efficiency ( GeV, barrel)" binning: @@ -81,11 +45,12 @@ JetMatchingBarrel: step: 10 JetMatchingEndcap: - sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Pt" + sample: TT + x_arg: "Pt" label: "Gen Jets" cuts: event: @@ -93,30 +58,9 @@ JetMatchingEndcap: object: - "abs({eta}) < 2.4" test_objects: - # caloJet: - # match_dR: 0.3 - # suffix: "Pt" - # label: "Calo Jet" - # cuts: - # - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" + phase1PuppiJet-barrel: "Pt" + seededConePuppiJet-barrel: "Pt" + trackerJet-barrel: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Trigger Efficiency ( GeV, endcap)" binning: @@ -125,11 +69,12 @@ JetMatchingEndcap: step: 10 JetMatchingForward: - sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Pt" + sample: TT + x_arg: "Pt" label: "Gen Jets" cuts: event: @@ -137,28 +82,11 @@ JetMatchingForward: object: - "abs({eta}) < 5" test_objects: - # caloJet: - # match_dR: 0.3 - # suffix: "Pt" - # label: "Calo Jet" - # cuts: - # - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" + phase1PuppiJet-forward: "Pt" + seededConePuppiJet-forward: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Trigger Efficiency ( GeV, forward)" binning: min: 0 max: 500 step: 10 - diff --git a/configs/V29/objects/jets.yaml b/configs/V29/objects/jets.yaml new file mode 100644 index 00000000..01ea0317 --- /dev/null +++ b/configs/V29/objects/jets.yaml @@ -0,0 +1,56 @@ +caloJet: + sample: TT + match_dR: 0.3 + label: "Calo Jet" + eta_ranges: + range0: [0, 7] + cuts: + range0: + - "abs({eta}) < 7" + ids: + default: + sample: TT + +phase1PuppiJet: + sample: TT + match_dR: 0.3 + label: "Histogrammed PuppiJet" + eta_ranges: + range0: [0, 7] + ids: + barrel: + cuts: + range0: + - "abs({eta}) < 2.4" + forward: + cuts: + range0: + - "abs({eta}) < 5" + +seededConePuppiJet: + sample: TT + match_dR: 0.35 + label: "Seeded Cone PuppiJet" + eta_ranges: + range0: [0, 7] + ids: + barrel: + cuts: + range0: + - "abs({eta}) < 2.4" + forward: + cuts: + range0: + - "abs({eta}) < 5" + +trackerJet: + sample: TT + match_dR: 0.4 + label: "Tracker Jet" + eta_ranges: + range0: [0, 7] + ids: + barrel: + cuts: + range0: + - "abs({eta}) < 2.4" diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index f586d712..edd79f47 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -109,7 +109,7 @@ def _save_json(self, file_name): xbins = xbins.tolist() efficiency = efficiency.tolist() - label = "foo" # TODO: FIX THIS!!! self.cfg["test_objects"][obj_key]["label"] + label = obj_key # TODO: FIX THIS!!! self.cfg["test_objects"][obj_key]["label"] err_kwargs = {"xerr": xerr, "capsize": 3, "marker": "o", "markersize": 8} @@ -148,7 +148,7 @@ def _plot_efficiency_curve(self): continue efficiency, yerr = self.turnon_collection.get_efficiency(obj_key) - label = "foo" # TODO: fix this! self.cfg["test_objects"][obj_key]["label"] + label = obj_key # TODO: fix this! self.cfg["test_objects"][obj_key]["label"] err_kwargs = { "xerr": self.turnon_collection.xerr(obj_key), @@ -188,7 +188,7 @@ def _plot_iso_vs_efficiency_curve(self): iso_vs_eff_hist = self._get_iso_vs_eff_hist(gen_hist_trig[0]) # yerr = np.sqrt(iso_vs_eff_hist) # TODO: Possibly introduce errors - label = "foo" # TODO: fix -- self.cfg["test_objects"][obj_key]["label"] + label = obj_key # TODO: fix -- self.cfg["test_objects"][obj_key]["label"] err_kwargs = {"capsize": 3, "marker": "o", "markersize": 8} ax.errorbar(xbins, iso_vs_eff_hist, label=label, **err_kwargs) @@ -238,7 +238,7 @@ def _plot_raw_counts(self): if obj_key == "ref": continue yerr = np.sqrt(gen_hist_trig[0]) - label = "foo" # TODO: fix this!!! -- self.cfg["test_objects"][obj_key]["label"] + label = obj_key # TODO: fix this!!! -- self.cfg["test_objects"][obj_key]["label"] test_hist = ax.step(xbins, gen_hist_trig[0], where="mid") ax.errorbar( xbins, diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index abe4c39f..016a14ee 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -263,20 +263,15 @@ def _apply_test_obj_cuts(self): r"{([^&|]*)}", r"self.ak_arrays[test_obj.name]['\1']", cut ) eta_sel = ( - self.ak_arrays[test_obj.name]["eta"] + abs(self.ak_arrays[test_obj.name]["eta"]) > test_obj.eta_ranges[range_i][0] ) & ( - self.ak_arrays[test_obj.name]["eta"] + abs(self.ak_arrays[test_obj.name]["eta"]) < test_obj.eta_ranges[range_i][1] ) - print(test_obj.eta_ranges[range_i], cut, " with `test_obj.name=", test_obj.name) - sel = eval(cut) | ~eta_sel + sel = eval(cut) + ~eta_sel self.ak_arrays[test_obj.name] = self.ak_arrays[test_obj.name][sel] - print(test_obj.name) - print(np.sum(ak.any(self.ak_arrays[test_obj.name]["pt"], axis=-1))) - # assert ak.all(self.ak_arrays["caloJet_default"]["eta"] < 5) - # print("assert passed") def _skim_to_hists(self): ref_field = self.cfg_plot.reference_field @@ -285,8 +280,6 @@ def _skim_to_hists(self): for test_obj, x_arg in self.test_objects: sel = self.ak_arrays[test_obj.name][x_arg] > self.threshold - # for i in range(200): - # print(sel[i], self.ak_arrays["ref"][ref_field][i]) sel = [False if not ak.any(x) else True for x in sel] # TODO: FIX THIS !!!! self.ak_arrays["ref"][ref_field] ak_array = self._flatten_array(self.ak_arrays["ref"][ref_field][sel]) From 73b9f29afb85774ab7d39657baeba059b3df5c4c Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 17 Jan 2024 22:09:50 +0100 Subject: [PATCH 034/140] edit jets trigger config to fit new object style --- .../V29/object_performance/jets_trigger.yaml | 95 ++++--------------- 1 file changed, 20 insertions(+), 75 deletions(-) diff --git a/configs/V29/object_performance/jets_trigger.yaml b/configs/V29/object_performance/jets_trigger.yaml index 73bdfb45..ed6f23e0 100644 --- a/configs/V29/object_performance/jets_trigger.yaml +++ b/configs/V29/object_performance/jets_trigger.yaml @@ -1,9 +1,10 @@ JetTurnonBarrel: - sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Pt" + sample: TT + x_arg: "Pt" label: "Gen Jets" cuts: event: @@ -11,30 +12,9 @@ JetTurnonBarrel: object: - "abs({eta}) < 2.4" test_objects: - # caloJet: - # match_dR: 0.3 - # suffix: "Pt" - # label: "Calo Jet" - # cuts: - # - "abs({eta}) < 2.5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" + phase1PuppiJet-barrel: "Pt" + seededConePuppiJet-barrel: "Pt" + trackerJet-barrel: "Pt" thresholds: [50,100] scalings: method: "naive" @@ -47,11 +27,12 @@ JetTurnonBarrel: step: 10 JetTurnonEndcap: - sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Pt" + sample: TT + x_arg: "Pt" label: "Gen Jets" cuts: event: @@ -59,30 +40,9 @@ JetTurnonEndcap: object: - "abs({eta}) < 2.4" test_objects: - # caloJet: - # match_dR: 0.3 - # suffix: "Pt" - # label: "Calo Jet" - # cuts: - # - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 2.4" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 2.4" - trackerJet: - match_dR: 0.4 - suffix: "Pt" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" + phase1PuppiJet-barrel: "Pt" + seededConePuppiJet-barrel: "Pt" + trackerJet-barrel: "Pt" thresholds: [50] scalings: method: "naive" @@ -95,11 +55,12 @@ JetTurnonEndcap: step: 10 JetTurnonForward: - sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: + sample: TT object: "jet" - suffix: "Pt" + x_arg: "Pt" label: "Gen Jets" cuts: event: @@ -107,24 +68,8 @@ JetTurnonForward: object: - "abs({eta}) < 5" test_objects: - # caloJet: - # match_dR: 0.3 - # suffix: "Pt" - # label: "Calo Jet" - # cuts: - # - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" + phase1PuppiJet-forward: "Pt" + seededConePuppiJet-forward: "Pt" thresholds: [50,100] scalings: method: "naive" From f464ac47202abc08ccaf7ba01ea043e13def9ef8 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 17 Jan 2024 22:30:21 +0100 Subject: [PATCH 035/140] fix code quality issues --- menu_tools/object_performance/plot_config.py | 2 +- menu_tools/object_performance/plotter.py | 11 ++++++++--- menu_tools/object_performance/turnon_collection.py | 7 ++++--- menu_tools/utils/objects.py | 5 +++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/menu_tools/object_performance/plot_config.py b/menu_tools/object_performance/plot_config.py index 9dfaf5c9..c350a8a9 100644 --- a/menu_tools/object_performance/plot_config.py +++ b/menu_tools/object_performance/plot_config.py @@ -46,7 +46,7 @@ def reference_trafo(self): return None @property - def test_objects(self) -> dict[str, str]: + def test_objects(self) -> dict[str, Any]: test_obj = { x: {"base_obj": x.split("-")[0], "id": x.split("-")[1], "x_arg": x_arg} for x, x_arg in self._cfg["test_objects"].items() diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index edd79f47..036a9f9a 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -109,7 +109,9 @@ def _save_json(self, file_name): xbins = xbins.tolist() efficiency = efficiency.tolist() - label = obj_key # TODO: FIX THIS!!! self.cfg["test_objects"][obj_key]["label"] + label = ( + obj_key # TODO: FIX THIS!!! self.cfg["test_objects"][obj_key]["label"] + ) err_kwargs = {"xerr": xerr, "capsize": 3, "marker": "o", "markersize": 8} @@ -148,7 +150,9 @@ def _plot_efficiency_curve(self): continue efficiency, yerr = self.turnon_collection.get_efficiency(obj_key) - label = obj_key # TODO: fix this! self.cfg["test_objects"][obj_key]["label"] + label = ( + obj_key # TODO: fix this! self.cfg["test_objects"][obj_key]["label"] + ) err_kwargs = { "xerr": self.turnon_collection.xerr(obj_key), @@ -238,7 +242,8 @@ def _plot_raw_counts(self): if obj_key == "ref": continue yerr = np.sqrt(gen_hist_trig[0]) - label = obj_key # TODO: fix this!!! -- self.cfg["test_objects"][obj_key]["label"] + label = obj_key # TODO: fix this!!! + # self.cfg["test_objects"][obj_key]["label"] test_hist = ax.step(xbins, gen_hist_trig[0], where="mid") ax.errorbar( xbins, diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index 016a14ee..d50927fa 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -1,3 +1,4 @@ +from typing import Any import re import awkward as ak @@ -84,9 +85,9 @@ def __init__(self, cfg_plot: dict, threshold: float): self.cfg_plot = PlotConfig(cfg_plot) self.version = self.cfg_plot.version self.threshold = threshold - self.ak_arrays = {} - self.numerators = {"ref": {}, "test": {}} - self.hists = {"ref": {}} + self.ak_arrays: dict[str, Any] = {} + self.numerators: dict[str, Any] = {"ref": {}, "test": {}} + self.hists: dict[str, Any] = {"ref": {}} @property def test_objects(self) -> list[tuple[Object, str]]: diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index 6e4de344..6f38c4bb 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -1,4 +1,5 @@ import glob +from typing import Optional import yaml @@ -36,7 +37,7 @@ def _nano_obj(self) -> dict[str, dict]: Returns: nano_obj_configs: dictionary containing the object parameters and ids """ - nano_obj_configs = {} + nano_obj_configs: dict[str, dict] = {} config_path = f"configs/{self.version}/objects/*.y*ml" config_files = glob.glob(config_path) @@ -91,7 +92,7 @@ def eta_ranges(self) -> dict[str, tuple]: return self._object_params["eta_ranges"] @property - def cuts(self) -> dict[str, list[str]]: + def cuts(self) -> Optional[dict[str, list[str]]]: try: return self._object_params["cuts"] except KeyError: From 609a6615d269606543b5511159d1b1b65a248652 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 11:21:09 +0100 Subject: [PATCH 036/140] remove from object config and put it back into plot configuration --- configs/V29/objects/electrons.yaml | 6 +----- menu_tools/object_performance/plot_config.py | 8 ++++---- .../object_performance/turnon_collection.py | 16 +++++++++------- menu_tools/utils/objects.py | 5 ----- 4 files changed, 14 insertions(+), 21 deletions(-) diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index 0caabbdf..b657a9dd 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -1,5 +1,4 @@ part_e: - sample: DYLL_M50 label: "Gen Electron" eta_ranges: range_0: [0, 5] @@ -9,9 +8,7 @@ part_e: range_0: - "{dr_0.3} < 0.15" -# full obj name: tkElectron_NoIso, tkElectron_Iso tkElectron: - sample: DYLL_M50 match_dR: 0.15 eta_ranges: range_0: [0, 5] @@ -28,7 +25,7 @@ tkElectron: label: "TkIsoElectron" cuts: range_0: - - "abs({eta}) < 2.4" # electron_trigger.yaml: 2.8, in menu two uses w/o eta cut and w/ cut@2.4 + - "abs({eta}) < 2.4" - "{passeseleid} == 1" range_1: - "abs({trkiso}) > 0.13" @@ -36,7 +33,6 @@ tkElectron: - "abs({trkiso}) > 0.28" EG: - sample: DYLL_M50 match_dR: 0.2 eta_ranges: range_0: [0, 5] diff --git a/menu_tools/object_performance/plot_config.py b/menu_tools/object_performance/plot_config.py index c350a8a9..f0dfdb02 100644 --- a/menu_tools/object_performance/plot_config.py +++ b/menu_tools/object_performance/plot_config.py @@ -5,6 +5,10 @@ class PlotConfig: def __init__(self, cfg: dict[str, Any]) -> None: self._cfg = cfg + @property + def sample(self): + return self._cfg["sample"] + @property def version(self) -> str: return self._cfg["version"] @@ -20,10 +24,6 @@ def iso_vs_eff_plot(self): def reference_object(self): return self._cfg["reference_object"]["object"] - @property - def reference_object_sample(self): - return self._cfg["reference_object"]["sample"] - @property def reference_event_cuts(self): try: diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index d50927fa..e19b5982 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -30,7 +30,7 @@ def _transform_key(self, raw_key: str, obj: str): else: return key - def _load_array_from_parquet(self, obj: str, sample: str): + def _load_array_from_parquet(self, obj: str): """ Loads the specified parquet file into an ak array. The keys are @@ -40,7 +40,7 @@ def _load_array_from_parquet(self, obj: str, sample: str): fname = ( f"cache/{self.cfg_plot.version}/" f"{self.cfg_plot.version}_" - f"{sample}_" + f"{self.cfg_plot.sample}_" f"{obj}.parquet" ) array = ak.from_parquet(fname) @@ -55,9 +55,7 @@ def _load_ref_branches(self) -> None: """ Load reference object. """ - ref_array = self._load_array_from_parquet( - self.cfg_plot.reference_object, self.cfg_plot.reference_object_sample - ) + ref_array = self._load_array_from_parquet(self.cfg_plot.reference_object) ref_array = ak.with_name(ref_array, "Momentum4D") self.turnon_collection.ak_arrays["ref"] = ref_array @@ -68,7 +66,7 @@ def _load_test_branches(self) -> None: test_objects = self.cfg_plot.test_objects for test_obj, obj_cfg in test_objects.items(): obj = Object(obj_cfg["base_obj"], obj_cfg["id"], self.cfg_plot.version) - test_array = self._load_array_from_parquet(obj.nano_obj_name, obj.sample) + test_array = self._load_array_from_parquet(obj.nano_obj_name) test_array = ak.with_name(test_array, "Momentum4D") self.turnon_collection.ak_arrays[obj.name] = test_array @@ -274,13 +272,17 @@ def _apply_test_obj_cuts(self): sel = eval(cut) + ~eta_sel self.ak_arrays[test_obj.name] = self.ak_arrays[test_obj.name][sel] - def _skim_to_hists(self): + def _skim_to_hists(self) -> None: + """ + TODO! + """ ref_field = self.cfg_plot.reference_field if trafo := self.cfg_plot.reference_trafo: ref_field = trafo for test_obj, x_arg in self.test_objects: sel = self.ak_arrays[test_obj.name][x_arg] > self.threshold + # print(sel) sel = [False if not ak.any(x) else True for x in sel] # TODO: FIX THIS !!!! self.ak_arrays["ref"][ref_field] ak_array = self._flatten_array(self.ak_arrays["ref"][ref_field][sel]) diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index 6f38c4bb..6a0c0072 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -98,10 +98,6 @@ def cuts(self) -> Optional[dict[str, list[str]]]: except KeyError: return None - @property - def sample(self) -> str: - return self._object_params["sample"] - if __name__ == "__main__": x = Object("tkElectron", "Iso", "V29") @@ -111,4 +107,3 @@ def sample(self) -> str: print(x.plot_label) print(x.eta_ranges) print(x.cuts) - print(x.sample) From dd8b511d6c9fe80c952772ad7ce2a9f12b67d2bb Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 14:11:05 +0100 Subject: [PATCH 037/140] fix instructions wrongly referring to requirements.txt --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dd6960cc..cddd10bd 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ A standard venv with Python3.11 can be created on lxplus via `python3.11 -m venv ` and all necessary - dependencies installed via `pip install -r requirements.txt`: + dependencies installed via `pip install .`: ```bash python3.11 -m venv From 8ddbd0c1201057a0ee0eb8c113d4eb464e02192d Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 14:58:00 +0100 Subject: [PATCH 038/140] fix electron isolation plots --- .../V29/object_performance/electron_iso.yaml | 26 ++--- .../V29/object_performance/jets_matching.yaml | 24 ++--- configs/V29/objects/electrons.yaml | 8 +- configs/V29/objects/jets.yaml | 24 ++--- menu_tools/object_performance/plot_config.py | 37 ++++++-- menu_tools/object_performance/plotter.py | 95 ++++++++++--------- .../object_performance/turnon_collection.py | 4 +- 7 files changed, 114 insertions(+), 104 deletions(-) diff --git a/configs/V29/object_performance/electron_iso.yaml b/configs/V29/object_performance/electron_iso.yaml index d87d8937..53bcc7ca 100644 --- a/configs/V29/object_performance/electron_iso.yaml +++ b/configs/V29/object_performance/electron_iso.yaml @@ -1,10 +1,11 @@ ElectronsIsolation_Barrel: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True iso_vs_efficiency: True reference_object: object: "part_e" - suffix: "Pt" + x_arg: "Pt" label: "Gen Electrons" cuts: event: @@ -13,13 +14,7 @@ ElectronsIsolation_Barrel: object: - "abs({eta}) < 1.479" test_objects: - tkElectron: - suffix: "trkiso" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" + tkElectron:NoIso: "trkiso" xlabel: "Isolation" ylabel: "Efficiency (Barrel)" binning: @@ -29,11 +24,12 @@ ElectronsIsolation_Barrel: ElectronsIsolation_Endcap: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True iso_vs_efficiency: True reference_object: object: "part_e" - suffix: "Pt" + x_arg: "Pt" label: "Gen Electrons" cuts: event: @@ -42,13 +38,7 @@ ElectronsIsolation_Endcap: object: - "abs({eta}) < 2.4" test_objects: - tkElectron: - suffix: "trkiso" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - #- "{passeseleid} == 1" + tkElectron:Iso: "trkiso" xlabel: "Isolation" ylabel: "Efficiency (Endcap)" binning: diff --git a/configs/V29/object_performance/jets_matching.yaml b/configs/V29/object_performance/jets_matching.yaml index a499dc14..6931ae66 100644 --- a/configs/V29/object_performance/jets_matching.yaml +++ b/configs/V29/object_performance/jets_matching.yaml @@ -1,9 +1,9 @@ JetMatchingForward_3p7to7: + sample: TT version: V29 match_test_to_ref: True reference_object: object: "jet" - sample: TT x_arg: "Pt" label: "Gen Jets" cuts: @@ -12,7 +12,7 @@ JetMatchingForward_3p7to7: object: - "abs({eta}) < 5" test_objects: - caloJet-default: "Pt" + caloJet:default: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Trigger Efficiency ( GeV, forward)" binning: @@ -21,11 +21,11 @@ JetMatchingForward_3p7to7: step: 5 JetMatchingBarrel: + sample: TT version: V29 match_test_to_ref: True reference_object: object: "jet" - sample: TT x_arg: "Pt" label: "Gen Jets" cuts: @@ -34,9 +34,9 @@ JetMatchingBarrel: object: - "abs({eta}) < 2.4" test_objects: - phase1PuppiJet-barrel: "Pt" - seededConePuppiJet-barrel: "Pt" - trackerJet-barrel: "Pt" + phase1PuppiJet:default: "Pt" + seededConePuppiJet:default: "Pt" + trackerJet:default: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Trigger Efficiency ( GeV, barrel)" binning: @@ -45,11 +45,11 @@ JetMatchingBarrel: step: 10 JetMatchingEndcap: + sample: TT version: V29 match_test_to_ref: True reference_object: object: "jet" - sample: TT x_arg: "Pt" label: "Gen Jets" cuts: @@ -58,9 +58,9 @@ JetMatchingEndcap: object: - "abs({eta}) < 2.4" test_objects: - phase1PuppiJet-barrel: "Pt" - seededConePuppiJet-barrel: "Pt" - trackerJet-barrel: "Pt" + phase1PuppiJet:default: "Pt" + seededConePuppiJet:default: "Pt" + trackerJet:default: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Trigger Efficiency ( GeV, endcap)" binning: @@ -82,8 +82,8 @@ JetMatchingForward: object: - "abs({eta}) < 5" test_objects: - phase1PuppiJet-forward: "Pt" - seededConePuppiJet-forward: "Pt" + phase1PuppiJet:default: "Pt" + seededConePuppiJet:default: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Trigger Efficiency ( GeV, forward)" binning: diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index b657a9dd..062b2340 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -28,9 +28,9 @@ tkElectron: - "abs({eta}) < 2.4" - "{passeseleid} == 1" range_1: - - "abs({trkiso}) > 0.13" + - "abs({trkiso}) < 0.13" range_2: - - "abs({trkiso}) > 0.28" + - "abs({trkiso}) < 0.28" EG: match_dR: 0.2 @@ -45,6 +45,6 @@ EG: range_0: - "abs({eta}) < 2.4" range_1: - - "{passeseleid} == 0" + - "{passeseleid} == 1" range_2: - - "{passessaid} == 0" + - "{passessaid} == 1" diff --git a/configs/V29/objects/jets.yaml b/configs/V29/objects/jets.yaml index 01ea0317..b21d59be 100644 --- a/configs/V29/objects/jets.yaml +++ b/configs/V29/objects/jets.yaml @@ -9,7 +9,9 @@ caloJet: - "abs({eta}) < 7" ids: default: - sample: TT + cuts: + range0: + - "abs({eta}) < 7" phase1PuppiJet: sample: TT @@ -18,14 +20,10 @@ phase1PuppiJet: eta_ranges: range0: [0, 7] ids: - barrel: - cuts: - range0: - - "abs({eta}) < 2.4" - forward: + default: cuts: range0: - - "abs({eta}) < 5" + - "abs({eta}) < 7" seededConePuppiJet: sample: TT @@ -34,14 +32,10 @@ seededConePuppiJet: eta_ranges: range0: [0, 7] ids: - barrel: - cuts: - range0: - - "abs({eta}) < 2.4" - forward: + default: cuts: range0: - - "abs({eta}) < 5" + - "abs({eta}) < 7" trackerJet: sample: TT @@ -50,7 +44,7 @@ trackerJet: eta_ranges: range0: [0, 7] ids: - barrel: + default: cuts: range0: - - "abs({eta}) < 2.4" + - "abs({eta}) < 7" diff --git a/menu_tools/object_performance/plot_config.py b/menu_tools/object_performance/plot_config.py index f0dfdb02..145e9dd7 100644 --- a/menu_tools/object_performance/plot_config.py +++ b/menu_tools/object_performance/plot_config.py @@ -1,10 +1,14 @@ -from typing import Any +from typing import Any, Optional class PlotConfig: def __init__(self, cfg: dict[str, Any]) -> None: self._cfg = cfg + @property + def config_dict(self) -> dict[str, Any]: + return self._cfg + @property def sample(self): return self._cfg["sample"] @@ -39,16 +43,23 @@ def reference_object_cuts(self): return [] @property - def reference_trafo(self): + def reference_trafo(self) -> Optional[str]: try: return self._cfg["reference_object"]["trafo"] except KeyError: return None + @property + def reference_label(self) -> str: + try: + return self._cfg["reference_object"]["label"] + except KeyError: + raise KeyError("No label defined for reference object!") + @property def test_objects(self) -> dict[str, Any]: test_obj = { - x: {"base_obj": x.split("-")[0], "id": x.split("-")[1], "x_arg": x_arg} + x: {"base_obj": x.split(":")[0], "id": x.split(":")[1], "x_arg": x_arg} for x, x_arg in self._cfg["test_objects"].items() } return test_obj @@ -66,16 +77,16 @@ def reference_field(self): return field.lower() @property - def bin_width(self): - return self._cfg["binning"]["step"] + def bin_width(self) -> float: + return float(self._cfg["binning"]["step"]) @property - def bin_min(self): - return self._cfg["binning"]["min"] + def bin_min(self) -> float: + return float(self._cfg["binning"]["min"]) @property - def bin_max(self): - return self._cfg["binning"]["max"] + def bin_max(self) -> float: + return float(self._cfg["binning"]["max"]) @property def scaling_pct(self): @@ -84,3 +95,11 @@ def scaling_pct(self): @property def scaling_method(self): return self._cfg["scalings"]["method"] + + @property + def xlabel(self): + return self._cfg["xlabel"] + + @property + def ylabel(self): + return self._cfg["ylabel"] diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 036a9f9a..3cd76c3d 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -10,8 +10,9 @@ import json from menu_tools.object_performance.turnon_collection import TurnOnCollection +from menu_tools.object_performance.plot_config import PlotConfig from menu_tools.object_performance.scaling_collection import ScalingCollection -from menu_tools.utils import utils +from menu_tools.utils import utils, objects plt.style.use(hep.style.CMS) @@ -34,7 +35,7 @@ def _create_new_plot(self) -> tuple[plt.Figure, plt.Axes]: class EfficiencyPlotter(Plotter): def __init__(self, name, cfg, turnon_collection): self.plot_name = name - self.cfg = cfg + self.cfg = PlotConfig(cfg) self.turnon_collection = turnon_collection self.version = self.turnon_collection.version self.threshold = self.turnon_collection.threshold @@ -52,10 +53,10 @@ def _style_plot(self, fig, ax, legend_loc="lower right"): ax.axvline(self.threshold, ls=":", c="k") ax.axhline(1, ls=":", c="k") ax.legend(loc=legend_loc, frameon=False) - ax.set_xlabel(rf"{self.cfg['xlabel']}") - ylabel = self.cfg["ylabel"].replace("", str(self.threshold)) + ax.set_xlabel(rf"{self.cfg.xlabel}") + ylabel = self.cfg.ylabel.replace("", str(self.threshold)) ax.set_ylabel(rf"{ylabel}") - ax.set_xlim(self.cfg["binning"]["min"], self.cfg["binning"]["max"]) + ax.set_xlim(self.cfg.bin_min, self.cfg.bin_max) ax.tick_params(direction="in") watermark = f"{self.version}_{self.plot_name}_" f"{self.threshold}" ax.text( @@ -71,25 +72,23 @@ def _style_plot(self, fig, ax, legend_loc="lower right"): def _save_json(self, file_name): plot = {} - - xlabel = self.cfg["xlabel"] - ylabel = self.cfg["ylabel"].replace("", str(self.threshold)) - watermark = f"{self.version}_{self.plot_name}_" f"{self.threshold}" - - plot["xlabel"] = xlabel - plot["ylabel"] = ylabel - plot["watermark"] = watermark + plot["xlabel"] = self.cfg.xlabel + plot["ylabel"] = self.cfg.ylabel.replace("", str(self.threshold)) + plot["watermark"] = f"{self.version}_{self.plot_name}_" f"{self.threshold}" for obj_key, gen_hist_trig in self.turnon_collection.hists.items(): if obj_key == "ref": continue - - _object = {} + obj = objects.Object( + nano_obj_name=obj_key.split("_")[0], + obj_id_name=obj_key.split("_")[1], + version=self.version, + ) xbins = self.turnon_collection.bins xbins = 0.5 * (xbins[1:] + xbins[:-1]) - if "Iso" in self.cfg["xlabel"]: + if self.cfg.iso_vs_eff_plot: efficiency = self._get_iso_vs_eff_hist(gen_hist_trig[0]) yerr = np.zeros((2, len(efficiency))) xerr = np.zeros(len(efficiency)) @@ -100,28 +99,26 @@ def _save_json(self, file_name): yerr = np.array( [yerr[0][~np.isnan(efficiency)], yerr[1][~np.isnan(efficiency)]] ) - xerr = xerr[~np.isnan(efficiency)] - xbins = xbins[~np.isnan(efficiency)] - efficiency = efficiency[~np.isnan(efficiency)] + xerr = xerr[np.isfinite(efficiency)] + xbins = xbins[np.isfinite(efficiency)] + efficiency = efficiency[np.isfinite(efficiency)] xerr = xerr.tolist() yerr = yerr.tolist() xbins = xbins.tolist() efficiency = efficiency.tolist() - label = ( - obj_key # TODO: FIX THIS!!! self.cfg["test_objects"][obj_key]["label"] - ) - - err_kwargs = {"xerr": xerr, "capsize": 3, "marker": "o", "markersize": 8} - - _object["label"] = label - _object["efficiency"] = efficiency - _object["efficiency_err"] = yerr - _object["xbins"] = xbins - _object["err_kwargs"] = err_kwargs - - plot[obj_key] = _object + plot[obj_key] = {} + plot[obj_key]["label"] = obj.plot_label + plot[obj_key]["efficiency"] = efficiency + plot[obj_key]["efficiency_err"] = yerr + plot[obj_key]["xbins"] = xbins + plot[obj_key]["err_kwargs"] = { + "xerr": xerr, + "capsize": 3, + "marker": "o", + "markersize": 8, + } with open(f"{file_name}", "w") as outfile: outfile.write(json.dumps(plot, indent=4)) @@ -131,7 +128,7 @@ def _get_iso_vs_eff_hist(self, test_hist): Cumulative ratio of efficiency vs L1 Iso histogram. """ - l1_isolation_histogram = sum(test_hist) + l1_isolation_histogram = np.sum(test_hist) l1_cumulative_sum = np.cumsum(test_hist) / l1_isolation_histogram return l1_cumulative_sum @@ -150,8 +147,10 @@ def _plot_efficiency_curve(self): continue efficiency, yerr = self.turnon_collection.get_efficiency(obj_key) - label = ( - obj_key # TODO: fix this! self.cfg["test_objects"][obj_key]["label"] + obj = objects.Object( + nano_obj_name=obj_key.split("_")[0], + obj_id_name=obj_key.split("_")[1], + version=self.version, ) err_kwargs = { @@ -160,7 +159,9 @@ def _plot_efficiency_curve(self): "marker": "o", "markersize": 8, } - ax.errorbar(xbins, efficiency, yerr=yerr, label=label, **err_kwargs) + ax.errorbar( + xbins, efficiency, yerr=yerr, label=obj.plot_label, **err_kwargs + ) self._style_plot(fig, ax) ax.set_ylim(0, 1.1) @@ -173,7 +174,9 @@ def _plot_efficiency_curve(self): # Save config with open(os.path.join(self._outdir_turnons, f"{plot_fname}.json"), "w") as f: - yaml.dump({self.plot_name: self.cfg}, f, default_flow_style=False) + yaml.dump( + {self.plot_name: self.cfg.config_dict}, f, default_flow_style=False + ) plt.close() @@ -191,10 +194,15 @@ def _plot_iso_vs_efficiency_curve(self): continue iso_vs_eff_hist = self._get_iso_vs_eff_hist(gen_hist_trig[0]) + obj = objects.Object( + nano_obj_name=obj_key.split("_")[0], + obj_id_name=obj_key.split("_")[1], + version=self.version, + ) + # yerr = np.sqrt(iso_vs_eff_hist) # TODO: Possibly introduce errors - label = obj_key # TODO: fix -- self.cfg["test_objects"][obj_key]["label"] err_kwargs = {"capsize": 3, "marker": "o", "markersize": 8} - ax.errorbar(xbins, iso_vs_eff_hist, label=label, **err_kwargs) + ax.errorbar(xbins, iso_vs_eff_hist, label=obj.plot_label, **err_kwargs) self._style_plot(fig, ax) @@ -206,7 +214,9 @@ def _plot_iso_vs_efficiency_curve(self): # Save config with open(os.path.join(self._outdir_turnons, f"{plot_fname}.json"), "w") as f: - yaml.dump({self.plot_name: self.cfg}, f, default_flow_style=False) + yaml.dump( + {self.plot_name: self.cfg.config_dict}, f, default_flow_style=False + ) plt.close() @@ -242,8 +252,7 @@ def _plot_raw_counts(self): if obj_key == "ref": continue yerr = np.sqrt(gen_hist_trig[0]) - label = obj_key # TODO: fix this!!! - # self.cfg["test_objects"][obj_key]["label"] + label = obj_key test_hist = ax.step(xbins, gen_hist_trig[0], where="mid") ax.errorbar( xbins, @@ -264,7 +273,7 @@ def _plot_raw_counts(self): def plot(self): self._make_output_dirs(self.version) - if "iso" in self.cfg["xlabel"].lower(): + if self.cfg.iso_vs_eff_plot: self._plot_iso_vs_efficiency_curve() else: self._plot_efficiency_curve() diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index e19b5982..5f5c5d57 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -282,9 +282,6 @@ def _skim_to_hists(self) -> None: for test_obj, x_arg in self.test_objects: sel = self.ak_arrays[test_obj.name][x_arg] > self.threshold - # print(sel) - sel = [False if not ak.any(x) else True for x in sel] # TODO: FIX THIS !!!! - self.ak_arrays["ref"][ref_field] ak_array = self._flatten_array(self.ak_arrays["ref"][ref_field][sel]) self.hists[test_obj.name] = np.histogram(ak_array, bins=self.bins) @@ -321,6 +318,7 @@ def _skim_to_hists_dR_matched(self): def _skim_to_hists_dR_matched_Iso(self): for test_obj, _ in self.test_objects: + print(test_obj.name) numerator = self.numerators["test"][test_obj.name] numerator = self._remove_inner_nones_zeros(numerator) numerator = self._flatten_array(numerator, ak_to_np=True) From 9d628c883f9409d86a923abd9e5a6bb41a13bc4f Mon Sep 17 00:00:00 2001 From: mbonanom Date: Mon, 22 Jan 2024 15:02:33 +0100 Subject: [PATCH 039/140] [rates] Validation with ak2. Remove shebangs --- .gitignore | 1 + README.md | 2 +- .../cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml | 41 ++++++++++--------- rates/table/cfg/v29/v29_cfg.yml | 5 ++- rates/table/menu_table.py | 1 - rates/table/rate_table.py | 3 +- rates/table/scaler.py | 2 - 7 files changed, 28 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index b9e9614d..d53d829e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,6 @@ rates/table/out/* rates/table/cache/**/* rates/table/lib/* +rates/table/rates_tables/* **/tmp/* outputs diff --git a/README.md b/README.md index dd6960cc..2a216319 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ A standard venv with Python3.11 can be created on lxplus via `python3.11 -m venv ` and all necessary - dependencies installed via `pip install -r requirements.txt`: + dependencies installed via `pip install .` as follows`: ```bash python3.11 -m venv diff --git a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml index ee00e269..e35d80e5 100644 --- a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml +++ b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml @@ -57,34 +57,35 @@ L1_DoubleTkEle: obj: tkElectron L1_DoubleTkEle_PFHTT: cross_masks: - - abs(leg2.zvtx-leg1.et)<1 - - abs(leg3.zvtx-leg1.et)<1 + - (abs(leg2.zvtx-leg1.et)<1 & (leg2.deltaR(leg3)>0)) + - (abs(leg3.zvtx-leg1.et)<1 & (leg2.deltaR(leg3)>0)) + - (leg3.deltaR(leg2)>0) leg1: leg_mask: - leg1.et>-99999.0 obj: z0L1TkPV leg2: leg_mask: - - leg2.offline_pt >= 8.0 + - leg2.offline_pt > 8.0 - abs(leg2.eta)<2.5 - leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479) obj: tkElectron leg3: leg_mask: - - leg3.offline_pt >= 8.0 + - leg3.offline_pt > 8.0 - abs(leg3.eta)<2.5 - leg3.passeseleid * (abs(leg3.eta)<1.479) + (abs(leg3.eta)>1.479) obj: tkElectron leg4: leg_mask: - - leg4.offline_pt >= 390.0 + - leg4.offline_pt > 390.0 obj: seededConePuppiHT L1_DoubleTkMu: cross_masks: - - abs(leg1.z0-leg2.z0)<1 + - ((abs(leg1.z0-leg2.z0)<1) & (leg1.deltaR(leg2)>0)) leg1: leg_mask: - - leg1.offline_pt >= 15.0 + - leg1.offline_pt > 15.0 - abs(leg1.eta)<2.4 obj: gmtTkMuon leg2: @@ -95,9 +96,10 @@ L1_DoubleTkMu: obj: gmtTkMuon L1_DoubleTkMu0er1p5_SQ_OS_dR_Max1p4: cross_masks: - - leg1.deltaR(leg2)<1.4 - - leg1.chg*leg2.chg<0.0 - - abs(leg2.z0-leg1.z0)<1 + - ((leg1.deltaR(leg2)<1.4)) + - ((leg1.chg*leg2.chg<0.0)) + - ((abs(leg2.z0-leg1.z0)<1)) + - ((leg1.deltaR(leg2)>0)) leg1: leg_mask: - abs(leg1.eta)<1.5 @@ -110,9 +112,9 @@ L1_DoubleTkMu0er1p5_SQ_OS_dR_Max1p4: obj: gmtTkMuon L1_DoubleTkMu4_SQ_OS_dR_Max1p2: cross_masks: - - leg1.deltaR(leg2)<1.2 - - leg1.chg*leg2.chg<0.0 - - abs(leg2.z0-leg1.z0)<1 + - ((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: leg_mask: - leg1.pt>4 @@ -127,10 +129,10 @@ L1_DoubleTkMu4_SQ_OS_dR_Max1p2: obj: gmtTkMuon L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18: cross_masks: - - pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)>7.0 - - pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)<18.0 - - leg1.chg*leg2.chg<0.0 - - abs(leg2.z0-leg1.z0)<1 + - ((pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)>7.0) & (leg1.deltaR(leg2)>0)) + - ((pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)<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: leg_mask: - leg1.pt>4.5 @@ -145,8 +147,9 @@ L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18: obj: gmtTkMuon L1_DoubleTkMu_PfHTT: cross_masks: - - abs(leg2.z0-leg1.et)<1 - - abs(leg3.z0-leg1.et)<1 + - (abs(leg2.z0-leg1.et)<1 & (leg3.deltaR(leg2)>0)) + - (abs(leg3.z0-leg1.et)<1 & (leg3.deltaR(leg2)>0)) + - (leg3.deltaR(leg2)>0) leg1: leg_mask: - leg1.et>-99999.0 diff --git a/rates/table/cfg/v29/v29_cfg.yml b/rates/table/cfg/v29/v29_cfg.yml index e464ec13..ed20e206 100644 --- a/rates/table/cfg/v29/v29_cfg.yml +++ b/rates/table/cfg/v29/v29_cfg.yml @@ -1,6 +1,6 @@ MenuV29: version: "V29" - sample: "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/13X/v29_RelVal/RelValTTbar_14TeV/RelVal_13X_TT_200PU_crab_v29_13X_RelVal_FixGenTree/230710_081407/L1NtuplePhaseII_Step1_hadd.root" + sample: "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/v29/MinBias_1.root" menu_config: "cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml" scalings: scalings_path: "/eos/user/m/mbonanom/www/Postdoc/L1PhaseII/V29/scalings/" @@ -9,4 +9,5 @@ MenuV29: scalings_file: "scalings.yml" table: table_fname: "rates_full_Final" - table_outdir: "rates_tables/V29" \ No newline at end of file + table_outdir: "rates_tables/V29" + diff --git a/rates/table/menu_table.py b/rates/table/menu_table.py index dd2de591..03a9602e 100644 --- a/rates/table/menu_table.py +++ b/rates/table/menu_table.py @@ -1,4 +1,3 @@ -#!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python import numpy as np from glob import glob diff --git a/rates/table/rate_table.py b/rates/table/rate_table.py index 96ae2fd6..0d6801d8 100755 --- a/rates/table/rate_table.py +++ b/rates/table/rate_table.py @@ -1,4 +1,3 @@ -#!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python import argparse import yaml @@ -28,4 +27,4 @@ table = menu_config.make_table() menu_config.dump_table(table) - menu_config.dump_masks() \ No newline at end of file + menu_config.dump_masks() diff --git a/rates/table/scaler.py b/rates/table/scaler.py index ea67902a..cf7aa4fb 100644 --- a/rates/table/scaler.py +++ b/rates/table/scaler.py @@ -1,5 +1,3 @@ -#!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python - import os, yaml from glob import glob from menu_config import MenuConfig From e895b3786d874555628a5c021f26e56f6fa0b5fc Mon Sep 17 00:00:00 2001 From: mbonanom Date: Mon, 22 Jan 2024 15:14:59 +0100 Subject: [PATCH 040/140] Fix typo and add venv to gitignore --- .gitignore | 1 + README.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d53d829e..76b5cf82 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ **/__pycache__/* *.pyc +pyenv/* **/*.png **/.DS_Store **/*.parquet diff --git a/README.md b/README.md index 2a216319..a15a2c07 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,10 @@ A standard venv with Python3.11 can be created on lxplus via `python3.11 -m venv ` and all necessary - dependencies installed via `pip install .` as follows`: + dependencies installed via `pip install .` as follows: ```bash - python3.11 -m venv + python3.11 -m venv pyenv source /bin/activate pip install . ``` From edcd6936bc43baea7c9f00d58c8b539bc51391ba Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 15:17:34 +0100 Subject: [PATCH 041/140] update ele matching eta plots to use central objects; bugfix --- .../electron_matching_eta.yaml | 66 ++++--------------- configs/V29/objects/electrons.yaml | 2 +- menu_tools/object_performance/plotter.py | 1 - 3 files changed, 13 insertions(+), 56 deletions(-) diff --git a/configs/V29/object_performance/electron_matching_eta.yaml b/configs/V29/object_performance/electron_matching_eta.yaml index d2c46d18..5584d0a2 100644 --- a/configs/V29/object_performance/electron_matching_eta.yaml +++ b/configs/V29/object_performance/electron_matching_eta.yaml @@ -1,9 +1,10 @@ ElectronsMatching_Eta_Pt10to25: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_e" - suffix: "Eta" + x_arg: "Eta" label: "Gen Electrons" cuts: event: @@ -13,31 +14,9 @@ ElectronsMatching_Eta_Pt10to25: object: - "abs({eta}) < 3.0" test_objects: - EG: - suffix: "Eta" - label: "EG" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3.0" - tkElectron: - match_dR: 0.15 - suffix: "Eta" - label: "TkElectron" - cuts: - - "abs({eta}) < 3.0" - #- "{passeseleid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Eta" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - #- "{passeseleid} == 1" + EG:default: "Eta" + tkElectron:NoIso: "Eta" + tkElectron:Iso: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" binning: @@ -47,10 +26,11 @@ ElectronsMatching_Eta_Pt10to25: ElectronsMatching_Eta_Pt25toInf: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_e" - suffix: "Eta" + x_arg: "Eta" label: "Gen Electrons" cuts: event: @@ -59,31 +39,9 @@ ElectronsMatching_Eta_Pt25toInf: object: - "abs({eta}) < 3.0" test_objects: - EG: - suffix: "Eta" - label: "EG" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3.0" - tkElectron: - suffix: "Eta" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Eta" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" + EG:default: "Eta" + tkElectron:NoIso: "Eta" + tkElectron:Iso: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency ($p_T > 25$ GeV)" binning: diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index 062b2340..9fd54b90 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -43,7 +43,7 @@ EG: default: cuts: range_0: - - "abs({eta}) < 2.4" + - "abs({eta}) < 3.0" range_1: - "{passeseleid} == 1" range_2: diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 3cd76c3d..2064ced1 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -246,7 +246,6 @@ def _plot_raw_counts(self): ls="--", color="k", ) - label = self.cfg["reference_object"]["label"] for obj_key, gen_hist_trig in self.turnon_collection.hists.items(): if obj_key == "ref": From 417df36b941c72b5b4a717295b5706dd072d73ca Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 15:37:01 +0100 Subject: [PATCH 042/140] update remaining electron obj perf configs to use central objects; add more parsing/warnings to config class --- .../object_performance/electron_matching.yaml | 66 ++++--------------- .../object_performance/electron_trigger.yaml | 66 ++++--------------- menu_tools/object_performance/plot_config.py | 13 +++- 3 files changed, 36 insertions(+), 109 deletions(-) diff --git a/configs/V29/object_performance/electron_matching.yaml b/configs/V29/object_performance/electron_matching.yaml index 7ca9cf12..94877ba3 100644 --- a/configs/V29/object_performance/electron_matching.yaml +++ b/configs/V29/object_performance/electron_matching.yaml @@ -1,9 +1,10 @@ ElectronsMatchingBarrel: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_e" - suffix: "Pt" + x_arg: "Pt" label: "Gen Electrons" cuts: event: @@ -12,31 +13,9 @@ ElectronsMatchingBarrel: object: - "abs({eta}) < 2.4" test_objects: - EG: - suffix: "Pt" - label: "EG" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.4" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" + EG:default: "Pt" + tkElectron:NoIso: "Pt" + tkElectron:Iso: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (Barrel)" binning: @@ -46,10 +25,11 @@ ElectronsMatchingBarrel: ElectronsMatchingEndcap: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_e" - suffix: "Pt" + x_arg: "Pt" label: "Gen Electrons" cuts: event: @@ -58,31 +38,9 @@ ElectronsMatchingEndcap: object: - "abs({eta}) < 2.4" test_objects: - EG: - suffix: "Pt" - label: "EG" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.4" - tkElectron: - suffix: "Pt" - label: "TkElectron" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "TkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.4" - - "{passeseleid} == 1" + EG:default: "Pt" + tkElectron:NoIso: "Pt" + tkElectron:Iso: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (Endcap)" binning: diff --git a/configs/V29/object_performance/electron_trigger.yaml b/configs/V29/object_performance/electron_trigger.yaml index 2e615595..4e123f65 100644 --- a/configs/V29/object_performance/electron_trigger.yaml +++ b/configs/V29/object_performance/electron_trigger.yaml @@ -1,9 +1,10 @@ ElectronsTriggerBarrel: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_e" - suffix: "Pt" + x_arg: "Pt" label: "Gen Electrons" cuts: event: @@ -12,31 +13,9 @@ ElectronsTriggerBarrel: object: - "abs({eta}) < 2.8" test_objects: - EG: - suffix: "Pt" - label: "EG" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.8" - tkElectron: - suffix: "Pt" - label: "tkElectron" - match_dR: 0.15 - cuts: - - "{passeseleid} == 1" - - "abs({eta}) < 2.8" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "tkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.8" - - "{passeseleid} == 1" + EG:default: "Pt" + tkElectron:NoIso: "Pt" + tkElectron:Iso: "Pt" thresholds: [10, 20, 30, 40] scalings: method: "naive" @@ -50,10 +29,11 @@ ElectronsTriggerBarrel: ElectronsTriggerEndcap: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_e" - suffix: "Pt" + x_arg: "Pt" label: "Gen Electrons" cuts: event: @@ -62,31 +42,9 @@ ElectronsTriggerEndcap: object: - "abs({eta}) < 2.8" test_objects: - EG: - suffix: "Pt" - label: "EG" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 2.8" - tkElectron: - suffix: "Pt" - label: "tkElectron" - match_dR: 0.15 - cuts: - - "{passeseleid} == 1" - - "abs({eta}) < 2.8" - tkIsoElectron: - base_obj: "tkElectron" - suffix: "Pt" - label: "tkIsoElectron" - iso_BB: 0.13 - iso_EE: 0.28 - iso_branch: "trkiso" - match_dR: 0.15 - cuts: - - "abs({eta}) < 2.8" - - "{passeseleid} == 1" + EG:default: "Pt" + tkElectron:NoIso: "Pt" + tkElectron:Iso: "Pt" thresholds: [10, 20, 30, 40] scalings: method: "naive" diff --git a/menu_tools/object_performance/plot_config.py b/menu_tools/object_performance/plot_config.py index 145e9dd7..78e90a54 100644 --- a/menu_tools/object_performance/plot_config.py +++ b/menu_tools/object_performance/plot_config.py @@ -15,7 +15,10 @@ def sample(self): @property def version(self) -> str: - return self._cfg["version"] + try: + return self._cfg["version"] + except KeyError: + raise KeyError("No version configured for plot!") @property def iso_vs_eff_plot(self): @@ -58,10 +61,18 @@ def reference_label(self) -> str: @property def test_objects(self) -> dict[str, Any]: + + # Parse to detect faulty config + if not all([":" in x for x in self._cfg["test_objects"]]): + raise ValueError("Misconfigured obj:id key!") + if not all([x for x in self._cfg["test_objects"].values()]): + raise ValueError("Misconfigured x variable in test objects!") + test_obj = { x: {"base_obj": x.split(":")[0], "id": x.split(":")[1], "x_arg": x_arg} for x, x_arg in self._cfg["test_objects"].items() } + return test_obj @property From 358bb3977228558004624f6c5bdbc34e503c1ec1 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 15:42:22 +0100 Subject: [PATCH 043/140] add name of plot that is misconfigured to exception messages in plot config --- menu_tools/object_performance/plot_config.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/menu_tools/object_performance/plot_config.py b/menu_tools/object_performance/plot_config.py index 78e90a54..2431d777 100644 --- a/menu_tools/object_performance/plot_config.py +++ b/menu_tools/object_performance/plot_config.py @@ -3,6 +3,7 @@ class PlotConfig: def __init__(self, cfg: dict[str, Any]) -> None: + self.plot_name = list(cfg.keys())[0] self._cfg = cfg @property @@ -18,7 +19,7 @@ def version(self) -> str: try: return self._cfg["version"] except KeyError: - raise KeyError("No version configured for plot!") + raise KeyError("No version configured for {self.plot_name}!") @property def iso_vs_eff_plot(self): @@ -57,16 +58,17 @@ def reference_label(self) -> str: try: return self._cfg["reference_object"]["label"] except KeyError: - raise KeyError("No label defined for reference object!") + raise KeyError("No label defined for reference object in {self.plot_name}!") @property def test_objects(self) -> dict[str, Any]: - # Parse to detect faulty config if not all([":" in x for x in self._cfg["test_objects"]]): - raise ValueError("Misconfigured obj:id key!") + raise ValueError("Misconfigured obj:id key in {self.plot_name}!") if not all([x for x in self._cfg["test_objects"].values()]): - raise ValueError("Misconfigured x variable in test objects!") + raise ValueError( + "Misconfigured x variable in test objects in {self.plot_name}!" + ) test_obj = { x: {"base_obj": x.split(":")[0], "id": x.split(":")[1], "x_arg": x_arg} From d3f8946b9e565ad10cef34b715aafde202c903de Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 16:21:22 +0100 Subject: [PATCH 044/140] fixes; more config parsing; jet config adaptation --- .../object_performance/jets_matching_eta.yaml | 113 ++++-------------- .../jets_matching_wBTag.yaml | 95 ++++----------- configs/V29/objects/jets.yaml | 20 +++- menu_tools/object_performance/plot_config.py | 6 +- menu_tools/object_performance/plotter.py | 4 +- .../object_performance/turnon_collection.py | 6 +- menu_tools/utils/objects.py | 6 + 7 files changed, 77 insertions(+), 173 deletions(-) diff --git a/configs/V29/object_performance/jets_matching_eta.yaml b/configs/V29/object_performance/jets_matching_eta.yaml index a0bf6e5d..cad33a1e 100644 --- a/configs/V29/object_performance/jets_matching_eta.yaml +++ b/configs/V29/object_performance/jets_matching_eta.yaml @@ -1,9 +1,10 @@ JetMatching_Eta_Pt40To100: sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Eta" + x_arg: "Eta" label: "Gen Jets" cuts: event: @@ -12,30 +13,9 @@ JetMatching_Eta_Pt40To100: object: - "abs({eta}) < 5" test_objects: - # caloJet: - # match_dR: 0.3 - # suffix: "Eta" - # label: "Calo Jet" - # cuts: - # - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Eta" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - trackerJet: - match_dR: 0.4 - suffix: "Eta" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" + phase1PuppiJet:default: "Eta" + seededConePuppiJet:default: "Eta" + trackerJet:default: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency (40-100 GeV)" binning: @@ -45,10 +25,11 @@ JetMatching_Eta_Pt40To100: JetMatching_Eta_Pt100ToInf: sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Eta" + x_arg: "Eta" label: "Gen Jets" cuts: event: @@ -56,30 +37,9 @@ JetMatching_Eta_Pt100ToInf: object: - "abs({eta}) < 5" test_objects: - # caloJet: - # match_dR: 0.3 - # suffix: "Eta" - # label: "Calo Jet" - # cuts: - # - "abs({eta}) < 5" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Eta" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - trackerJet: - match_dR: 0.4 - suffix: "Eta" - label: "Tracker Jet" - cuts: - - "abs({eta}) < 2.4" + phase1PuppiJet:default: "Eta" + seededConePuppiJet:default: "Eta" + trackerJet:default: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency (>100 GeV)" binning: @@ -89,10 +49,11 @@ JetMatching_Eta_Pt100ToInf: JetMatching_Eta_Pt100ToInf_extEta: sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Eta" + x_arg: "Eta" label: "Gen Jets" cuts: event: @@ -100,36 +61,21 @@ JetMatching_Eta_Pt100ToInf_extEta: object: - "abs({eta}) < 7" test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 7" - # phase1PuppiJet: - # match_dR: 0.3 - # suffix: "Eta" - # label: "Histogrammed PuppiJet" - # cuts: - # - "abs({eta}) < 7" - # seededConePuppiJet: - # match_dR: 0.35 - # suffix: "Eta" - # label: "Seeded Cone PuppiJet" - # cuts: - # - "abs({eta}) < 7" + caloJet:default: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency (>100 GeV)" binning: min: -5.5 max: 5.5 step: 0.25 + JetMatching_Eta_Pt100ToInf_extEta: sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Eta" + x_arg: "Eta" label: "Gen Jets" cuts: event: @@ -137,24 +83,7 @@ JetMatching_Eta_Pt100ToInf_extEta: object: - "abs({eta}) < 7" test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 7" - # phase1PuppiJet: - # match_dR: 0.3 - # suffix: "Eta" - # label: "Histogrammed PuppiJet" - # cuts: - # - "abs({eta}) < 7" - # seededConePuppiJet: - # match_dR: 0.35 - # suffix: "Eta" - # label: "Seeded Cone PuppiJet" - # cuts: - # - "abs({eta}) < 7" + caloJet:default: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency (>100 GeV)" binning: diff --git a/configs/V29/object_performance/jets_matching_wBTag.yaml b/configs/V29/object_performance/jets_matching_wBTag.yaml index 34a1d08f..e8a35ec5 100644 --- a/configs/V29/object_performance/jets_matching_wBTag.yaml +++ b/configs/V29/object_performance/jets_matching_wBTag.yaml @@ -1,9 +1,10 @@ JetMatching_Eta_Pt40To100_ExtendedVsRegular: sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Eta" + x_arg: "Eta" label: "Gen Jets" cuts: event: @@ -12,18 +13,8 @@ JetMatching_Eta_Pt40To100_ExtendedVsRegular: object: - "abs({eta}) < 5" test_objects: - seededConePuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConeExtendedPuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone Extended PuppiJet" - cuts: - - "abs({eta}) < 5" + seededConePuppiJet:default: "Eta" + seededConeExtendedPuppiJet:default: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency (40-100 GeV)" binning: @@ -33,10 +24,11 @@ JetMatching_Eta_Pt40To100_ExtendedVsRegular: JetMatching_Eta_Pt100ToInf_ExtendedVsRegular: sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Eta" + x_arg: "Eta" label: "Gen Jets" cuts: event: @@ -44,18 +36,8 @@ JetMatching_Eta_Pt100ToInf_ExtendedVsRegular: object: - "abs({eta}) < 5" test_objects: - seededConePuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 5" - seededConeExtendedPuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone Extended PuppiJet" - cuts: - - "abs({eta}) < 5" + seededConePuppiJet:default: "Eta" + seededConeExtendedPuppiJet:default: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency (>100 GeV)" binning: @@ -65,10 +47,11 @@ JetMatching_Eta_Pt100ToInf_ExtendedVsRegular: JetMatching_Eta_Pt30ToInf_genBJets: sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Eta" + x_arg: "Eta" label: "Gen Jets" cuts: event: @@ -77,16 +60,9 @@ JetMatching_Eta_Pt30ToInf_genBJets: object: - "abs({eta}) < 2.4" test_objects: - seededConeExtendedPuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone Extended PuppiJet" - cuts: - - "abs({eta}) < 5" - - "{bjetnn}>0.71" + seededConeExtendedPuppiJet:bjetnn: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency (>30 GeV)" - # thresholds: [0.0,0.5,0.7,0.71,0.72] binning: min: -2.4 max: 2.4 @@ -94,10 +70,11 @@ JetMatching_Eta_Pt30ToInf_genBJets: JetMatching_Eta_Pt30ToInf_genNotBJets: sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Eta" + x_arg: "Eta" label: "Gen Jets" cuts: event: @@ -106,16 +83,9 @@ JetMatching_Eta_Pt30ToInf_genNotBJets: object: - "abs({eta}) < 2.4" test_objects: - seededConeExtendedPuppiJet: - match_dR: 0.35 - suffix: "Eta" - label: "Seeded Cone Extended PuppiJet" - cuts: - - "abs({eta}) < 5" - - "{bjetnn}>0.71" + seededConeExtendedPuppiJet:bjetnn: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency (>30 GeV)" - # thresholds: [0.0,0.5,0.7,0.71,0.72] binning: min: -2.4 max: 2.4 @@ -123,10 +93,11 @@ JetMatching_Eta_Pt30ToInf_genNotBJets: JetMatching_Pt_Pt30ToInf_genBJets: sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Pt" + x_arg: "Pt" label: "Gen Jets" cuts: event: @@ -134,17 +105,9 @@ JetMatching_Pt_Pt30ToInf_genBJets: object: - "abs({eta}) < 2.4" test_objects: - seededConeExtendedPuppiJet: - match_dR: 0.4 - suffix: "Pt" - label: "Seeded Cone Extended PuppiJet" - cuts: - - "abs({eta}) < 5" - - "{bjetnn}>0.71" + seededConeExtendedPuppiJet:bjetnn: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency" - # thresholds: [-999,0,0.5,0.68,0.71,0.74,0.9] - # thresholds: [0.0,0.5,0.7,0.71,0.72] binning: min: 30 max: 200 @@ -152,10 +115,11 @@ JetMatching_Pt_Pt30ToInf_genBJets: JetMatching_Pt_Pt30ToInf_genNotBJets: sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Pt" + x_arg: "Pt" label: "Gen Jets" cuts: event: @@ -163,16 +127,9 @@ JetMatching_Pt_Pt30ToInf_genNotBJets: object: - "abs({eta}) < 2.4" test_objects: - seededConeExtendedPuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone Extended PuppiJet" - cuts: - - "abs({eta}) < 5" - - "{bjetnn}>0.71" + seededConeExtendedPuppiJet:bjetnn: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency" - # thresholds: [0.0,0.5,0.7,0.71,0.72] binning: min: 30 max: 200 diff --git a/configs/V29/objects/jets.yaml b/configs/V29/objects/jets.yaml index b21d59be..3ccebb27 100644 --- a/configs/V29/objects/jets.yaml +++ b/configs/V29/objects/jets.yaml @@ -1,5 +1,4 @@ caloJet: - sample: TT match_dR: 0.3 label: "Calo Jet" eta_ranges: @@ -13,8 +12,23 @@ caloJet: range0: - "abs({eta}) < 7" +seededConeExtendedPuppiJet: + match_dR: 0.35 + label: "Seeded Cone Extended PuppiJet" + eta_ranges: + range0: [0, 7] + ids: + default: + cuts: + range0: + - "abs({eta}) < 5" + bjetnn: + cuts: + range0: + - "abs({eta}) < 2.4" + - "{bjetnn} > 0.71" + phase1PuppiJet: - sample: TT match_dR: 0.3 label: "Histogrammed PuppiJet" eta_ranges: @@ -26,7 +40,6 @@ phase1PuppiJet: - "abs({eta}) < 7" seededConePuppiJet: - sample: TT match_dR: 0.35 label: "Seeded Cone PuppiJet" eta_ranges: @@ -38,7 +51,6 @@ seededConePuppiJet: - "abs({eta}) < 7" trackerJet: - sample: TT match_dR: 0.4 label: "Tracker Jet" eta_ranges: diff --git a/menu_tools/object_performance/plot_config.py b/menu_tools/object_performance/plot_config.py index 2431d777..1d129c41 100644 --- a/menu_tools/object_performance/plot_config.py +++ b/menu_tools/object_performance/plot_config.py @@ -2,9 +2,9 @@ class PlotConfig: - def __init__(self, cfg: dict[str, Any]) -> None: - self.plot_name = list(cfg.keys())[0] + def __init__(self, cfg: dict[str, Any], name: Optional[str] = None) -> None: self._cfg = cfg + self.plot_name = name @property def config_dict(self) -> dict[str, Any]: @@ -19,7 +19,7 @@ def version(self) -> str: try: return self._cfg["version"] except KeyError: - raise KeyError("No version configured for {self.plot_name}!") + raise KeyError(f"No version configured for {self.plot_name}!") @property def iso_vs_eff_plot(self): diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 2064ced1..c59cae47 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -35,7 +35,7 @@ def _create_new_plot(self) -> tuple[plt.Figure, plt.Axes]: class EfficiencyPlotter(Plotter): def __init__(self, name, cfg, turnon_collection): self.plot_name = name - self.cfg = PlotConfig(cfg) + self.cfg = PlotConfig(cfg, name) self.turnon_collection = turnon_collection self.version = self.turnon_collection.version self.threshold = self.turnon_collection.threshold @@ -312,7 +312,7 @@ def run(self): for plot_name, cfg_plot in self.cfg_plots.items(): for threshold in self.get_thresholds(cfg_plot): print(f">>> Turn On {plot_name} ({threshold} GeV) <<<") - turnon_collection = TurnOnCollection(cfg_plot, threshold) + turnon_collection = TurnOnCollection(cfg_plot, threshold, plot_name) turnon_collection.create_hists() plotter = EfficiencyPlotter(plot_name, cfg_plot, turnon_collection) diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index 5f5c5d57..2ab70467 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional import re import awkward as ak @@ -79,8 +79,8 @@ def load_arrays(self) -> None: class TurnOnCollection: - def __init__(self, cfg_plot: dict, threshold: float): - self.cfg_plot = PlotConfig(cfg_plot) + def __init__(self, cfg_plot: dict, threshold: float, plot_name: Optional[str] = None): + self.cfg_plot = PlotConfig(cfg_plot, plot_name) self.version = self.cfg_plot.version self.threshold = threshold self.ak_arrays: dict[str, Any] = {} diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index 6a0c0072..7e2c099b 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -1,4 +1,5 @@ import glob +import re from typing import Optional import yaml @@ -94,8 +95,13 @@ def eta_ranges(self) -> dict[str, tuple]: @property def cuts(self) -> Optional[dict[str, list[str]]]: try: + if not all([re.match(r"^range\d", x) for x in self._object_params["cuts"]]): + raise ValueError( + "Cuts for objects have to be specified eta ranges `range0/1/2` ..." + ) return self._object_params["cuts"] except KeyError: + print(f"No cuts will be applied for {self.name}!") return None From 89403216b2217602aa3a1fbb1cb6d69c21d9e949 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 17:14:12 +0100 Subject: [PATCH 045/140] write jet and met/mht configs to use central objects --- .../V29/object_performance/jets_trigger.yaml | 26 +++--- .../object_performance/jets_trigger_fwd.yaml | 25 ++---- .../V29/object_performance/met_ht_mht.yaml | 84 ++++++------------- configs/V29/object_performance/mht.yaml | 28 ++----- configs/V29/objects/met_ht_mht.yaml | 39 +++++++++ menu_tools/object_performance/plot_config.py | 6 +- menu_tools/object_performance/plotter.py | 15 ++-- .../object_performance/turnon_collection.py | 4 +- 8 files changed, 104 insertions(+), 123 deletions(-) create mode 100644 configs/V29/objects/met_ht_mht.yaml diff --git a/configs/V29/object_performance/jets_trigger.yaml b/configs/V29/object_performance/jets_trigger.yaml index ed6f23e0..93c4f3d6 100644 --- a/configs/V29/object_performance/jets_trigger.yaml +++ b/configs/V29/object_performance/jets_trigger.yaml @@ -1,9 +1,9 @@ JetTurnonBarrel: version: V29 + sample: TT match_test_to_ref: True reference_object: object: "jet" - sample: TT x_arg: "Pt" label: "Gen Jets" cuts: @@ -12,10 +12,10 @@ JetTurnonBarrel: object: - "abs({eta}) < 2.4" test_objects: - phase1PuppiJet-barrel: "Pt" - seededConePuppiJet-barrel: "Pt" - trackerJet-barrel: "Pt" - thresholds: [50,100] + phase1PuppiJet:default: "Pt" + seededConePuppiJet:default: "Pt" + trackerJet:default: "Pt" + thresholds: [50, 100] scalings: method: "naive" threshold: 0.95 @@ -28,10 +28,10 @@ JetTurnonBarrel: JetTurnonEndcap: version: V29 + sample: TT match_test_to_ref: True reference_object: object: "jet" - sample: TT x_arg: "Pt" label: "Gen Jets" cuts: @@ -40,9 +40,9 @@ JetTurnonEndcap: object: - "abs({eta}) < 2.4" test_objects: - phase1PuppiJet-barrel: "Pt" - seededConePuppiJet-barrel: "Pt" - trackerJet-barrel: "Pt" + phase1PuppiJet:default: "Pt" + seededConePuppiJet:default: "Pt" + trackerJet:default: "Pt" thresholds: [50] scalings: method: "naive" @@ -56,9 +56,9 @@ JetTurnonEndcap: JetTurnonForward: version: V29 + sample: TT match_test_to_ref: True reference_object: - sample: TT object: "jet" x_arg: "Pt" label: "Gen Jets" @@ -68,9 +68,9 @@ JetTurnonForward: object: - "abs({eta}) < 5" test_objects: - phase1PuppiJet-forward: "Pt" - seededConePuppiJet-forward: "Pt" - thresholds: [50,100] + phase1PuppiJet:default: "Pt" + seededConePuppiJet:default: "Pt" + thresholds: [50, 100] scalings: method: "naive" threshold: 0.95 diff --git a/configs/V29/object_performance/jets_trigger_fwd.yaml b/configs/V29/object_performance/jets_trigger_fwd.yaml index bfc26425..b1818c46 100644 --- a/configs/V29/object_performance/jets_trigger_fwd.yaml +++ b/configs/V29/object_performance/jets_trigger_fwd.yaml @@ -1,9 +1,10 @@ JetTurnonFwd_3p7to7: sample: TT - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "jet" - suffix: "Pt" + x_arg: "Pt" label: "Gen Jets" cuts: event: @@ -11,24 +12,8 @@ JetTurnonFwd_3p7to7: object: - "abs({eta}) < 7" test_objects: - # caloJet: - # match_dR: 0.3 - # suffix: "Pt" - # label: "Calo Jet" - # cuts: - # - "abs({eta}) < 7" - phase1PuppiJet: - match_dR: 0.3 - suffix: "Pt" - label: "Histogrammed PuppiJet" - cuts: - - "abs({eta}) < 7" - seededConePuppiJet: - match_dR: 0.35 - suffix: "Pt" - label: "Seeded Cone PuppiJet" - cuts: - - "abs({eta}) < 7" + phase1PuppiJet:default: "Pt" + seededConePuppiJet:default: "Pt" thresholds: [50,100] scalings: method: "naive" diff --git a/configs/V29/object_performance/met_ht_mht.yaml b/configs/V29/object_performance/met_ht_mht.yaml index 06653174..8f2ec36c 100644 --- a/configs/V29/object_performance/met_ht_mht.yaml +++ b/configs/V29/object_performance/met_ht_mht.yaml @@ -1,9 +1,9 @@ HT_90perc: sample: TT - default_version: V29 + version: V29 reference_object: object: "jet" - suffix: "Pt" + x_arg: "Pt" label: "Gen HT" trafo: "HT" cuts: @@ -11,15 +11,9 @@ HT_90perc: - "abs({eta}) < 2.4" - "{pt} > 30" test_objects: - trackerHT: - suffix: "" - label: "Tracker HT" - phase1PuppiHT: - suffix: "" - label: "Histogrammed Puppi HT" - seededConePuppiHT: - suffix: "" - label: "SeededCone HT" + trackerHT:default: "" + phase1PuppiHT:default: "" + seededConePuppiHT:default: "" thresholds: [350] scalings: method: "naive" @@ -33,10 +27,10 @@ HT_90perc: HT_50perc: sample: TT - default_version: V29 + version: V29 reference_object: object: "jet" - suffix: "Pt" + x_arg: "Pt" label: "Gen HT" trafo: "HT" cuts: @@ -44,15 +38,9 @@ HT_50perc: - "abs({eta}) < 2.4" - "{pt} > 30" test_objects: - trackerHT: - suffix: "" - label: "Tracker HT" - phase1PuppiHT: - suffix: "" - label: "Histogrammed Puppi HT" - seededConePuppiHT: - suffix: "" - label: "SeededCone HT" + trackerHT:default: "" + phase1PuppiHT:default: "" + seededConePuppiHT:default: "" thresholds: [350] scalings: method: "naive" @@ -66,10 +54,10 @@ HT_50perc: MHT_50perc: sample: TT - default_version: V29 + version: V29 reference_object: object: "jet" - suffix: "Pt" + x_arg: "Pt" label: "Gen MHT" cuts: object: @@ -77,15 +65,9 @@ MHT_50perc: - "{pt} > 30" trafo: "MHT" test_objects: - trackerMHT: - suffix: "" - label: "Tracker MHT" - phase1PuppiMHT: - suffix: "et" - label: "Phase1 Puppi MHT" - seededConePuppiMHT: - suffix: "et" - label: "SeededCone MHT" + trackerMHT:default: "" + phase1PuppiMHT:default: "et" + seededConePuppiMHT:default: "et" thresholds: [70, 150] scalings: method: "naive" @@ -99,10 +81,10 @@ MHT_50perc: MHT_90perc: sample: TT - default_version: V29 + version: V29 reference_object: object: "jet" - suffix: "Pt" + x_arg: "Pt" label: "Gen MHT" cuts: object: @@ -110,15 +92,9 @@ MHT_90perc: - "{pt} > 30" trafo: "MHT" test_objects: - trackerMHT: - suffix: "" - label: "Tracker MHT" - phase1PuppiMHT: - suffix: "et" - label: "Phase1 Puppi MHT" - seededConePuppiMHT: - suffix: "et" - label: "SeededCone MHT" + trackerMHT:default: "" + phase1PuppiMHT:default: "et" + seededConePuppiMHT:default: "et" thresholds: [70, 150] scalings: method: "naive" @@ -135,15 +111,11 @@ MET_90perc: default_version: V29 reference_object: object: "genMetTrue" - suffix: "" + x_arg: "" label: "Gen MET" test_objects: - trackerMET: - suffix: "" - label: "Tracker MET" - puppiMET: - suffix: "et" - label: "Puppi MET" + trackerMET:default: "" + puppiMET:default: "et" thresholds: [150] xlabel: "Gen. MET (GeV)" ylabel: "Trigger Efficiency ( GeV)" @@ -160,15 +132,11 @@ MET_50perc: default_version: V29 reference_object: object: "genMetTrue" - suffix: "" + x_arg: "" label: "Gen MET" test_objects: - trackerMET: - suffix: "" - label: "Tracker MET" - puppiMET: - suffix: "et" - label: "Puppi MET" + trackerMET:default: "" + puppiMET:default: "et" thresholds: [150] xlabel: "Gen. MET (GeV)" ylabel: "Trigger Efficiency ( GeV)" diff --git a/configs/V29/object_performance/mht.yaml b/configs/V29/object_performance/mht.yaml index 65ff7df2..a85d166b 100644 --- a/configs/V29/object_performance/mht.yaml +++ b/configs/V29/object_performance/mht.yaml @@ -1,9 +1,9 @@ MHT30_90perc: sample: TT - default_version: V29 + version: V29 reference_object: object: "jet" - suffix: "Pt" + x_arg: "Pt" label: "Gen MHT" cuts: object: @@ -11,12 +11,8 @@ MHT30_90perc: - "{pt} > 30" trafo: "MHT" test_objects: - phase1PuppiMHT: - suffix: "et" - label: "Phase1 Puppi MHT" - seededConePuppiMHT: - suffix: "et" - label: "SeededCone MHT" + phase1PuppiMHT:default: "et" + seededConePuppiMHT:default: "et" thresholds: [70, 150] scalings: method: "naive" @@ -30,10 +26,10 @@ MHT30_90perc: MHT30_50perc: sample: TT - default_version: V29 + version: V29 reference_object: object: "jet" - suffix: "Pt" + x_arg: "Pt" label: "Gen MHT" cuts: object: @@ -41,15 +37,9 @@ MHT30_50perc: - "{pt} > 30" trafo: "MHT" test_objects: - phase1PuppiMHT: - suffix: "et" - label: "Phase1 Puppi MHT" - seededConePuppiMHT: - suffix: "et" - label: "SeededCone MHT" - trackerMHT: - suffix: "" - label: "Tracker MHT" + phase1PuppiMHT:default: "et" + seededConePuppiMHT:default: "et" + trackerMHT:default: "" thresholds: [70, 150] scalings: method: "naive" diff --git a/configs/V29/objects/met_ht_mht.yaml b/configs/V29/objects/met_ht_mht.yaml new file mode 100644 index 00000000..8e0a6e45 --- /dev/null +++ b/configs/V29/objects/met_ht_mht.yaml @@ -0,0 +1,39 @@ +phase1PuppiHT: + label: "Histogrammed Puppi HT" + ids: + default: {} + +phase1PuppiMHT: + label: "Phase1 Puppi MHT" + ids: + default: {} + +puppiMET: + label: "Puppi MET" + ids: + default: {} + +seededConePuppiHT: + label: "SeededCone HT" + ids: + default: {} + +seededConePuppiMHT: + label: "SeededCone MHT" + ids: + default: {} + +trackerHT: + label: "Tracker HT" + ids: + default: {} + +trackerMET: + label: "Tracker MET" + ids: + default: {} + +trackerMHT: + label: "Tracker MHT" + ids: + default: {} diff --git a/menu_tools/object_performance/plot_config.py b/menu_tools/object_performance/plot_config.py index 1d129c41..2d771bba 100644 --- a/menu_tools/object_performance/plot_config.py +++ b/menu_tools/object_performance/plot_config.py @@ -64,11 +64,7 @@ def reference_label(self) -> str: def test_objects(self) -> dict[str, Any]: # Parse to detect faulty config if not all([":" in x for x in self._cfg["test_objects"]]): - raise ValueError("Misconfigured obj:id key in {self.plot_name}!") - if not all([x for x in self._cfg["test_objects"].values()]): - raise ValueError( - "Misconfigured x variable in test objects in {self.plot_name}!" - ) + raise ValueError(f"Misconfigured obj:id key in {self.plot_name}!") test_obj = { x: {"base_obj": x.split(":")[0], "id": x.split(":")[1], "x_arg": x_arg} diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index c59cae47..783751c6 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -397,7 +397,7 @@ def plot(self): ax.legend(loc="lower right") ax.set_xlabel("L1 threshold [GeV]") - ax.set_ylabel(f"{int(self.scaling_pct*100)}% Location (gen, GeV)") + ax.set_ylabel(f"{int(self.scaling_pct * 100)}% Location (gen, GeV)") watermark = f"{self.version}_{self.plot_name}" ax.text( 0, @@ -455,7 +455,7 @@ def _get_scaling_thresholds(self, cfg_plot, test_obj): return self.scaling_thresholds["Jet"] raise RuntimeError("Failed to find thresholds in cfg_scaling_thresholds!") - def _rate_config_function(self, name: str, a: float, b: float): + def _LEGACY_rate_config_function(self, name: str, a: float, b: float): pm = "+" if b < 0 else "" f_string = ( f"function :: {name}OfflineEtCut :: " @@ -463,7 +463,9 @@ def _rate_config_function(self, name: str, a: float, b: float): ) return f_string - def _write_scalings_to_file(self, plot_name: str, version: str, params: dict): + def _LEGACY_write_scalings_to_file( + self, plot_name: str, version: str, params: dict + ): with open( f"{self.outdir}/{version}/scalings/{plot_name}_scalings_{version}.txt", "w+" ) as f: @@ -474,7 +476,7 @@ def _write_scalings_to_file(self, plot_name: str, version: str, params: dict): ) as f: for obj, obj_params in params.items(): a, b = obj_params - f.write(self._rate_config_function(obj, a, b) + "\n") + f.write(self._LEGACY_rate_config_function(obj, a, b) + "\n") def run(self): for plot_name, cfg_plot in self.cfg_plots.items(): @@ -508,15 +510,14 @@ def run(self): plot_name, cfg_plot, scalings, scaling_pct, version, params ) plotter.plot() - self._write_scalings_to_file(plot_name, version, params) + self._LEGACY_write_scalings_to_file(plot_name, version, params) if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( "cfg_plots", - default="cfg_plots/muons.yaml", - help="Path of YAML file specifying the desired plots.", + help="Path of YAML configuration file specifying the desired plots.", ) args = parser.parse_args() diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index 2ab70467..3f8a5357 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -79,7 +79,9 @@ def load_arrays(self) -> None: class TurnOnCollection: - def __init__(self, cfg_plot: dict, threshold: float, plot_name: Optional[str] = None): + def __init__( + self, cfg_plot: dict, threshold: float, plot_name: Optional[str] = None + ): self.cfg_plot = PlotConfig(cfg_plot, plot_name) self.version = self.cfg_plot.version self.threshold = threshold From c200899115ef8a4cacb19eda4042b641803af8e9 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 18:38:03 +0100 Subject: [PATCH 046/140] fix sample configuration in jet_matching V29 --- configs/V29/object_performance/jets_matching.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/V29/object_performance/jets_matching.yaml b/configs/V29/object_performance/jets_matching.yaml index 6931ae66..c6cecbaf 100644 --- a/configs/V29/object_performance/jets_matching.yaml +++ b/configs/V29/object_performance/jets_matching.yaml @@ -70,10 +70,10 @@ JetMatchingEndcap: JetMatchingForward: version: V29 + sample: TT match_test_to_ref: True reference_object: object: "jet" - sample: TT x_arg: "Pt" label: "Gen Jets" cuts: From 2853202a57b288ccb19f24b040d756d8f2011f58 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 19:51:49 +0100 Subject: [PATCH 047/140] fix mht plots by converting to Mementum4D after cutting --- .../object_performance/turnon_collection.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index 3f8a5357..7046b0e1 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -226,6 +226,10 @@ def _apply_list_of_reference_cuts(self, cut_list): cut = re.sub(r"{([^&|]*)}", r"self.ak_arrays['ref']['\1']", cut) sel = eval(cut) self.ak_arrays["ref"] = self.ak_arrays["ref"][sel] + if not isinstance( + self.ak_arrays["ref"], vector.backends.awkward.MomentumArray4D + ): + self.ak_arrays["ref"] = ak.with_name(self.ak_arrays["ref"], "Momentum4D") def _apply_reference_cuts(self) -> None: """Applies configured cuts on reference objects. @@ -233,21 +237,19 @@ def _apply_reference_cuts(self) -> None: Should be applied before any matching and before the selection of the highest pT object. """ - if self.cfg_plot.reference_trafo: - ref_object_cuts = self.cfg_plot.reference_object_cuts - ref_event_cuts = self.cfg_plot.reference_event_cuts - - self._apply_list_of_reference_cuts(ref_object_cuts) - return if "met" in self.cfg_plot.reference_object.lower(): # TODO: Maybe we want to modify it and allow possible cuts on MET return ref_object_cuts = self.cfg_plot.reference_object_cuts - ref_event_cuts = self.cfg_plot.reference_event_cuts - self._apply_list_of_reference_cuts(ref_object_cuts) + + if self.cfg_plot.reference_trafo: + # In this case each event is reduced to a single value already + return None + self._select_highest_pt_ref_object() + ref_event_cuts = self.cfg_plot.reference_event_cuts self._apply_list_of_reference_cuts(ref_event_cuts) def _apply_test_obj_cuts(self): @@ -320,7 +322,6 @@ def _skim_to_hists_dR_matched(self): def _skim_to_hists_dR_matched_Iso(self): for test_obj, _ in self.test_objects: - print(test_obj.name) numerator = self.numerators["test"][test_obj.name] numerator = self._remove_inner_nones_zeros(numerator) numerator = self._flatten_array(numerator, ak_to_np=True) From b9d2f148d04674d8ea1fed01b7e2ccb8ef44b45e Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 19:58:33 +0100 Subject: [PATCH 048/140] configure muon matching with central obj definitions --- .../V29/object_performance/muon_matching.yaml | 64 +++++-------------- .../object_performance/muon_matching_eta.yaml | 36 ++++------- 2 files changed, 26 insertions(+), 74 deletions(-) diff --git a/configs/V29/object_performance/muon_matching.yaml b/configs/V29/object_performance/muon_matching.yaml index 3a70ec76..e9415a2d 100644 --- a/configs/V29/object_performance/muon_matching.yaml +++ b/configs/V29/object_performance/muon_matching.yaml @@ -1,9 +1,10 @@ MuonsMatchingBarrel: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_mu" - suffix: "Pt" + x_arg: "Pt" label: "Gen Muons" cuts: event: @@ -11,19 +12,8 @@ MuonsMatchingBarrel: object: - "abs({eta}) < 0.83" test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) < 0.83" - - "({quality}) > 0" + gmtMuon:barrel: "Pt" + gmtTkMuon:barrel: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (barrel)" binning: @@ -33,10 +23,11 @@ MuonsMatchingBarrel: MuonsMatchingOverlap: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_mu" - suffix: "Pt" + x_arg: "Pt" label: "Gen Muons" cuts: event: @@ -45,21 +36,8 @@ MuonsMatchingOverlap: - "abs({eta}) > 0.83" - "abs({eta}) < 1.24" test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "({quality}) > 0" - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" + gmtMuon:overlap: "Pt" + gmtTkMuon:overlap: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (overlap)" binning: @@ -69,10 +47,11 @@ MuonsMatchingOverlap: MuonsMatchingEndcap: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_mu" - suffix: "Pt" + x_arg: "Pt" label: "Gen Muons" cuts: event: @@ -81,21 +60,8 @@ MuonsMatchingEndcap: - "abs({eta}) > 1.24" - "abs({eta}) < 2.4" test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - - "({quality}) > 0" + gmtMuon:endcap: "Pt" + gmtTkMuon:endcap: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (endcap)" binning: diff --git a/configs/V29/object_performance/muon_matching_eta.yaml b/configs/V29/object_performance/muon_matching_eta.yaml index 1ac547d8..8940c722 100644 --- a/configs/V29/object_performance/muon_matching_eta.yaml +++ b/configs/V29/object_performance/muon_matching_eta.yaml @@ -1,9 +1,10 @@ MuonsMatching_Eta_Pt2to5: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_mu" - suffix: "Eta" + x_arg: "Eta" label: "Gen Muons" cuts: event: @@ -13,16 +14,8 @@ MuonsMatching_Eta_Pt2to5: object: - "abs({eta}) < 2.4" test_objects: - gmtMuon: - suffix: "Eta" - label: "GMT Muon" - match_dR: 0.3 - gmtTkMuon: - suffix: "Eta" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "({quality}) > 0" + gmtMuon:default: "Eta" + gmtTkMuon:default: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency (2-5 GeV)" binning: @@ -32,10 +25,11 @@ MuonsMatching_Eta_Pt2to5: MuonsMatching_Eta_Pt15toInf: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_mu" - suffix: "Eta" + x_arg: "Eta" label: "Gen Muons" cuts: event: @@ -44,19 +38,11 @@ MuonsMatching_Eta_Pt15toInf: object: - "abs({eta}) < 2.4" test_objects: - gmtMuon: - suffix: "Eta" - label: "GMT Muon" - match_dR: 0.3 - gmtTkMuon: - suffix: "Eta" - label: "GMT TkMuon" - match_dR: 0.1 - cuts: - - "({quality}) > 0" + gmtMuon:default: "Eta" + gmtTkMuon:default: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency (>15 GeV)" binning: min: -3 max: 3 - step: 0.2 \ No newline at end of file + step: 0.2 From 78c21632e628a408455fdf491c2fb0452e299f7b Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 20:10:36 +0100 Subject: [PATCH 049/140] finish re-configuration of muons with central objects --- .../V29/object_performance/met_ht_mht.yaml | 4 +- .../V29/object_performance/muon_trigger.yaml | 94 ++++--------------- configs/V29/objects/muons.yaml | 50 ++++++++++ 3 files changed, 68 insertions(+), 80 deletions(-) create mode 100644 configs/V29/objects/muons.yaml diff --git a/configs/V29/object_performance/met_ht_mht.yaml b/configs/V29/object_performance/met_ht_mht.yaml index 8f2ec36c..68dc5a98 100644 --- a/configs/V29/object_performance/met_ht_mht.yaml +++ b/configs/V29/object_performance/met_ht_mht.yaml @@ -108,7 +108,7 @@ MHT_90perc: MET_90perc: sample: TT - default_version: V29 + version: V29 reference_object: object: "genMetTrue" x_arg: "" @@ -129,7 +129,7 @@ MET_90perc: MET_50perc: sample: TT - default_version: V29 + version: V29 reference_object: object: "genMetTrue" x_arg: "" diff --git a/configs/V29/object_performance/muon_trigger.yaml b/configs/V29/object_performance/muon_trigger.yaml index 8e55207d..232b3ceb 100644 --- a/configs/V29/object_performance/muon_trigger.yaml +++ b/configs/V29/object_performance/muon_trigger.yaml @@ -1,39 +1,10 @@ -# MuonsTrigger: -# sample: DYLL_M50 -# default_version: V29 -# reference_object: -# object: "part_mu" -# suffix: "Pt" -# label: "Gen Muons" -# cuts: -# event: -# - "{dr_0.3} < 0.15" -# test_objects: -# gmtMuon: -# suffix: "Pt" -# label: "GMT Muon" -# match_dR: 0.3 -# gmtTkMuon: -# suffix: "Pt" -# label: "GMT TkMuon" -# match_dR: 0.3 -# xlabel: "Gen. pT (GeV)" -# ylabel: "Trigger Efficiency (barrel, L1 $p_T > 20$ GeV)" -# thresholds: [20, 25] -# scalings: -# method: "naive" -# threshold: 0.95 -# binning: -# min: 0 -# max: 50 -# step: 1.5 - MuonsTrigger_Barrel: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_mu" - suffix: "Pt" + x_arg: "Pt" label: "Gen Muons" cuts: event: @@ -41,19 +12,8 @@ MuonsTrigger_Barrel: object: - "abs({eta}) < 0.83" test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) < 0.83" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - cuts: - - "({quality}) > 0" - - "abs({eta}) < 0.83" + gmtMuon:barrel: "Pt" + gmtTkMuon:barrel: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (barrel, L1 $p_T > 20$ GeV)" thresholds: [20, 25] @@ -67,10 +27,11 @@ MuonsTrigger_Barrel: MuonsTrigger_Overlap: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_mu" - suffix: "Pt" + x_arg: "Pt" label: "Gen Muons" cuts: event: @@ -79,21 +40,8 @@ MuonsTrigger_Overlap: - "abs({eta}) > 0.83" - "abs({eta}) < 1.24" test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - cuts: - - "({quality}) > 0" - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" + gmtMuon:overlap: "Pt" + gmtTkMuon:overlap: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (overlap, L1 $p_T > 20$ GeV)" thresholds: [20, 25] @@ -107,10 +55,11 @@ MuonsTrigger_Overlap: MuonsTrigger_Endcap: sample: DYLL_M50 - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_mu" - suffix: "Pt" + x_arg: "Pt" label: "Gen Muons" cuts: event: @@ -118,19 +67,8 @@ MuonsTrigger_Endcap: object: - "abs({eta}) > 1.24" test_objects: - gmtMuon: - suffix: "Pt" - label: "GMT Muon" - match_dR: 0.3 - cuts: - - "abs({eta}) > 1.24" - gmtTkMuon: - suffix: "Pt" - label: "GMT TkMuon" - match_dR: 0.3 - cuts: - - "({quality}) > 0" - - "abs({eta}) > 1.24" + gmtMuon:endcap: "Pt" + gmtTkMuon:endcap: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (endcap, L1 $p_T > 20$ GeV)" thresholds: [20, 25] @@ -140,4 +78,4 @@ MuonsTrigger_Endcap: binning: min: 0 max: 50 - step: 1.5 \ No newline at end of file + step: 1.5 diff --git a/configs/V29/objects/muons.yaml b/configs/V29/objects/muons.yaml new file mode 100644 index 00000000..a5fafce1 --- /dev/null +++ b/configs/V29/objects/muons.yaml @@ -0,0 +1,50 @@ +gmtMuon: + label: "GMT Muon" + match_dR: 0.3 + eta_ranges: + range0: [0, 5] + ids: + default: {} + barrel: + cuts: + range0: + - "abs({eta}) < 0.83" + overlap: + cuts: + range0: + - "abs({eta}) > 0.83" + - "abs({eta}) < 1.24" + endcap: + cuts: + range0: + - "abs({eta}) > 1.24" + - "abs({eta}) < 2.4" + + +gmtTkMuon: + label: "GMT TkMuon" + match_dR: 0.1 + eta_ranges: + range0: [0, 5] + cuts: + range0: + - "{quality} > 0" + ids: + default: {} + barrel: + cuts: + range0: + - "abs({eta}) < 0.83" + - "{quality} > 0" + overlap: + cuts: + range0: + - "abs({eta}) > 0.83" + - "abs({eta}) < 1.24" + - "{quality} > 0" + endcap: + cuts: + range0: + - "abs({eta}) > 1.24" + - "abs({eta}) < 2.4" + - "{quality} > 0" From 68ffbe5f0943fe26c4bd2343b5f58cffeb22f492 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 20:18:51 +0100 Subject: [PATCH 050/140] reconfigure photon iso reproducing iso plots --- .../V29/object_performance/photon_iso.yaml | 27 ++++++------------- configs/V29/objects/photons.yaml | 18 +++++++++++++ 2 files changed, 26 insertions(+), 19 deletions(-) create mode 100644 configs/V29/objects/photons.yaml diff --git a/configs/V29/object_performance/photon_iso.yaml b/configs/V29/object_performance/photon_iso.yaml index 9d9aa4e6..f4170ed2 100644 --- a/configs/V29/object_performance/photon_iso.yaml +++ b/configs/V29/object_performance/photon_iso.yaml @@ -1,10 +1,11 @@ PhotonIsolation_Barrel: sample: Hgg - default_version: V29 + version: V29 iso_vs_efficiency: True + match_test_to_ref: True reference_object: object: "part_gamma" - suffix: "Pt" + x_arg: "Pt" label: "Gen Photons" cuts: event: @@ -13,13 +14,7 @@ PhotonIsolation_Barrel: object: - "abs({eta}) < 1.479" test_objects: - tkPhoton: - suffix: "trkiso" - label: "TkPhoton" - match_dR: 0.15 - cuts: - - "abs({eta}) < 1.479" - - "{passeseleid} == 1" + tkPhoton:barrel: "trkiso" xlabel: "Isolation" ylabel: "Efficiency (Barrel)" binning: @@ -29,11 +24,12 @@ PhotonIsolation_Barrel: PhotonIsolation_Endcap: sample: Hgg - default_version: V29 + version: V29 iso_vs_efficiency: True + match_test_to_ref: True reference_object: object: "part_gamma" - suffix: "Pt" + x_arg: "Pt" label: "Gen Photons" cuts: event: @@ -43,14 +39,7 @@ PhotonIsolation_Endcap: object: - "abs({eta}) > 1.479" test_objects: - tkPhoton: - suffix: "trkiso" - label: "TkPhoton" - match_dR: 0.15 - cuts: - - "abs({eta}) > 1.479" - - "abs({eta}) < 2.4" - - "{passesphoid} == 1" + tkPhoton:endcap: "trkiso" xlabel: "Isolation" ylabel: "Efficiency (Endcap)" binning: diff --git a/configs/V29/objects/photons.yaml b/configs/V29/objects/photons.yaml new file mode 100644 index 00000000..0eec956d --- /dev/null +++ b/configs/V29/objects/photons.yaml @@ -0,0 +1,18 @@ +tkPhoton: + match_dR: 0.15 + eta_ranges: + range0: [0, 5] + ids: + barrel: + label: "TkPhoton" + cuts: + range0: + - "abs({eta}) < 1.479" + - "{passeseleid} == 1" + endcap: + label: "TkIsoPhoton" + cuts: + range0: + - "abs({eta}) > 1.479" + - "abs({eta}) < 2.4" + - "{passesphoid} == 1" From ea09f82efde1e2c1a0149087a411b52fc663a224 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 20:27:58 +0100 Subject: [PATCH 051/140] continue photon configuration --- .../photons_matching_eta.yaml | 73 +++---------------- configs/V29/objects/photons.yaml | 17 +++++ 2 files changed, 29 insertions(+), 61 deletions(-) diff --git a/configs/V29/object_performance/photons_matching_eta.yaml b/configs/V29/object_performance/photons_matching_eta.yaml index aa067474..7d160276 100644 --- a/configs/V29/object_performance/photons_matching_eta.yaml +++ b/configs/V29/object_performance/photons_matching_eta.yaml @@ -1,9 +1,10 @@ PhotonsMatching_Eta_Pt10to25: sample: Hgg - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_gamma" - suffix: "Eta" + x_arg: "Eta" label: "Gen Photons" cuts: event: @@ -13,35 +14,9 @@ PhotonsMatching_Eta_Pt10to25: object: - "abs({eta}) < 3.0" test_objects: - EG: - suffix: "Eta" - label: "EG" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - #- "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - #- "({quality} // 4) == 1" - #- "{passeseleid} == 1" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Eta" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - #- "{passeseleid} == 1" + EG:default: "Eta" + tkPhoton:NoIso: "Eta" + tkIsoPhoton:Iso: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" binning: @@ -51,10 +26,11 @@ PhotonsMatching_Eta_Pt10to25: PhotonsMatching_Eta_Pt25toInf: sample: Hgg - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_gamma" - suffix: "Eta" + x_arg: "Eta" label: "Gen Photons" cuts: event: @@ -63,34 +39,9 @@ PhotonsMatching_Eta_Pt25toInf: object: - "abs({eta}) < 3.0" test_objects: - EG: - suffix: "Eta" - label: "EG" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - #- "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Eta" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - #- "{passeseleid} == 1" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Eta" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - #- "{passeseleid} == 1" + EG:default: "Eta" + tkPhoton:NoIso: "Eta" + tkPhoton:Iso: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" binning: diff --git a/configs/V29/objects/photons.yaml b/configs/V29/objects/photons.yaml index 0eec956d..342fde36 100644 --- a/configs/V29/objects/photons.yaml +++ b/configs/V29/objects/photons.yaml @@ -2,7 +2,23 @@ tkPhoton: match_dR: 0.15 eta_ranges: range0: [0, 5] + range1: [0, 1.479] + range2: [1.479, 5] ids: + NoIso: + label: "tkPhoton" + cuts: + range0: + - "abs({eta}) < 3.0" # TODO: implement QUAL 125x tkPhoID here in default!! + Iso: + label: "tkIsoPhoton" + cuts: + range0: + - "abs({eta}) < 3.0" # TODO: implement QUAL 125x tkPhoID here in default!! + range1: + - "abs({trkiso}) < 0.2" + range2: + - "abs({trkiso}) < 0.2" barrel: label: "TkPhoton" cuts: @@ -16,3 +32,4 @@ tkPhoton: - "abs({eta}) > 1.479" - "abs({eta}) < 2.4" - "{passesphoid} == 1" + From b5750d8f470e34dca5a8dd4590d881815b0b32e9 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 20:30:59 +0100 Subject: [PATCH 052/140] reconfigure photon matching with central objects --- .../object_performance/photons_matching.yaml | 67 ++++--------------- configs/V29/objects/electrons.yaml | 7 ++ 2 files changed, 19 insertions(+), 55 deletions(-) diff --git a/configs/V29/object_performance/photons_matching.yaml b/configs/V29/object_performance/photons_matching.yaml index 2fa9e3bc..35a1704f 100644 --- a/configs/V29/object_performance/photons_matching.yaml +++ b/configs/V29/object_performance/photons_matching.yaml @@ -1,9 +1,10 @@ PhotonsMatching_Barrel: sample: Hgg - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_gamma" - suffix: "Pt" + x_arg: "Pt" label: "Gen Photons" cuts: event: @@ -12,31 +13,9 @@ PhotonsMatching_Barrel: object: - "abs({eta}) < 2.4" test_objects: - EG: - suffix: "Pt" - label: "EG" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - tkPhoton: - match_dR: 0.15 - suffix: "Pt" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Pt" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" + EG:default: "Pt" + tkPhoton:NoIso: "Pt" + tkPhoton:Iso: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (Barrel)" binning: @@ -46,10 +25,11 @@ PhotonsMatching_Barrel: PhotonsMatching_Endcap: sample: Hgg - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_gamma" - suffix: "Pt" + x_arg: "Pt" label: "Gen Photons" cuts: event: @@ -58,32 +38,9 @@ PhotonsMatching_Endcap: object: - "abs({eta}) < 2.4" test_objects: - EG: - suffix: "Pt" - label: "EG" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Pt" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Pt" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" + EG:eleid: "Pt" + tkPhoton:NoIso: "Pt" + tkPhoton:Iso: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (Endcap)" binning: diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index 9fd54b90..5d0b7e13 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -48,3 +48,10 @@ EG: - "{passeseleid} == 1" range_2: - "{passessaid} == 1" + eleid: + cuts: + range_0: + - "abs({eta}) < 3.0" + - "{passeseleid} == 1" + range_2: + - "{passessaid} == 1" From 0546a05482bfe696ce443a9680a745a8bc41a334 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 20:33:08 +0100 Subject: [PATCH 053/140] reconfigure photon trigger plots with central objects --- .../object_performance/photons_trigger.yaml | 66 ++++--------------- 1 file changed, 11 insertions(+), 55 deletions(-) diff --git a/configs/V29/object_performance/photons_trigger.yaml b/configs/V29/object_performance/photons_trigger.yaml index 65cc3b0e..5eb41e45 100644 --- a/configs/V29/object_performance/photons_trigger.yaml +++ b/configs/V29/object_performance/photons_trigger.yaml @@ -1,9 +1,10 @@ PhotonsTrigger_Barrel: sample: Hgg - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_gamma" - suffix: "Pt" + x_arg: "Pt" label: "Gen Photons" cuts: event: @@ -12,31 +13,9 @@ PhotonsTrigger_Barrel: object: - "abs({eta}) < 2.4" test_objects: - EG: - suffix: "Pt" - label: "EG" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - tkPhoton: - match_dR: 0.15 - suffix: "Pt" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Pt" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" + EG:default: "Pt" + tkPhoton:NoIso: "Pt" + tkPhoton:Iso: "Pt" thresholds: [10, 20, 30, 40] scalings: method: "naive" @@ -50,10 +29,10 @@ PhotonsTrigger_Barrel: PhotonsTrigger_Endcap: sample: Hgg - default_version: V29 + version: V29 reference_object: object: "part_gamma" - suffix: "Pt" + x_arg: "Pt" label: "Gen Photons" cuts: event: @@ -62,32 +41,9 @@ PhotonsTrigger_Endcap: object: - "abs({eta}) < 2.4" test_objects: - EG: - suffix: "Pt" - label: "EG" - match_dR: 0.2 - quality_id: "QUAL_125x_EGID" - cuts: - - "abs({eta}) < 3" - - "{passeseleid} == 1" - tkPhoton: - match_dR: 0.15 - suffix: "Pt" - label: "tkPhoton" - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" - tkIsoPhoton: - base_obj: "tkPhoton" - match_dR: 0.15 - suffix: "Pt" - label: "tkIsoPhoton" - iso_EE: 0.2 - iso_BB: 0.2 - iso_branch: trkiso - quality_id: "QUAL_125x_tkPhoID" - cuts: - - "abs({eta}) < 3.0" + EG:eleid: "Pt" + tkPhoton:NoIso: "Pt" + tkPhoton:Iso: "Pt" thresholds: [10, 20, 30, 40] scalings: method: "naive" From 3c9f5b1bd2ace7ff156aff5dda759b355eb749bc Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 20:49:19 +0100 Subject: [PATCH 054/140] Fix range nameing convention in electron objects and implement phton qual125 --- .../photons_matching_eta.yaml | 2 +- .../object_performance/photons_trigger.yaml | 1 + configs/V29/objects/electrons.yaml | 34 +++++++++---------- configs/V29/objects/photons.yaml | 12 +++++-- 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/configs/V29/object_performance/photons_matching_eta.yaml b/configs/V29/object_performance/photons_matching_eta.yaml index 7d160276..cda31e40 100644 --- a/configs/V29/object_performance/photons_matching_eta.yaml +++ b/configs/V29/object_performance/photons_matching_eta.yaml @@ -16,7 +16,7 @@ PhotonsMatching_Eta_Pt10to25: test_objects: EG:default: "Eta" tkPhoton:NoIso: "Eta" - tkIsoPhoton:Iso: "Eta" + tkPhoton:Iso: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" binning: diff --git a/configs/V29/object_performance/photons_trigger.yaml b/configs/V29/object_performance/photons_trigger.yaml index 5eb41e45..13467506 100644 --- a/configs/V29/object_performance/photons_trigger.yaml +++ b/configs/V29/object_performance/photons_trigger.yaml @@ -30,6 +30,7 @@ PhotonsTrigger_Barrel: PhotonsTrigger_Endcap: sample: Hgg version: V29 + match_test_to_ref: True reference_object: object: "part_gamma" x_arg: "Pt" diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index 5d0b7e13..5319719d 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -1,57 +1,57 @@ part_e: label: "Gen Electron" eta_ranges: - range_0: [0, 5] + range0: [0, 5] ids: gen_electron_default: cuts: - range_0: + range0: - "{dr_0.3} < 0.15" tkElectron: match_dR: 0.15 eta_ranges: - range_0: [0, 5] - range_1: [0, 1.479] - range_2: [1.479, 5] + range0: [0, 5] + range1: [0, 1.479] + range2: [1.479, 5] ids: NoIso: label: "TkElectron" cuts: - range_0: + range0: - "abs({eta}) < 2.4" - "{passeseleid} == 1" Iso: label: "TkIsoElectron" cuts: - range_0: + range0: - "abs({eta}) < 2.4" - "{passeseleid} == 1" - range_1: + range1: - "abs({trkiso}) < 0.13" - range_2: + range2: - "abs({trkiso}) < 0.28" EG: match_dR: 0.2 eta_ranges: - range_0: [0, 5] - range_1: [0, 1.479] - range_2: [1.479, 2.4] + range0: [0, 5] + range1: [0, 1.479] + range2: [1.479, 2.4] label: "EG" ids: default: cuts: - range_0: + range0: - "abs({eta}) < 3.0" - range_1: + range1: - "{passeseleid} == 1" - range_2: + range2: - "{passessaid} == 1" eleid: cuts: - range_0: + range0: - "abs({eta}) < 3.0" - "{passeseleid} == 1" - range_2: + range2: - "{passessaid} == 1" diff --git a/configs/V29/objects/photons.yaml b/configs/V29/objects/photons.yaml index 342fde36..ef53a01b 100644 --- a/configs/V29/objects/photons.yaml +++ b/configs/V29/objects/photons.yaml @@ -3,22 +3,28 @@ tkPhoton: eta_ranges: range0: [0, 5] range1: [0, 1.479] - range2: [1.479, 5] + range2: [1.479, 2.4] ids: NoIso: label: "tkPhoton" cuts: range0: - - "abs({eta}) < 3.0" # TODO: implement QUAL 125x tkPhoID here in default!! + - "abs({eta}) < 3.0" + range1: + - "{passeseleid} == 1" + range2: + - "{passesphoid} == 1" Iso: label: "tkIsoPhoton" cuts: range0: - - "abs({eta}) < 3.0" # TODO: implement QUAL 125x tkPhoID here in default!! + - "abs({eta}) < 3.0" range1: - "abs({trkiso}) < 0.2" + - "{passeseleid} == 1" range2: - "abs({trkiso}) < 0.2" + - "{passesphoid} == 1" barrel: label: "TkPhoton" cuts: From 46ebe5fa562992c629aeb4cdab7d42370df49eb3 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 21:00:05 +0100 Subject: [PATCH 055/140] reconfigure tau machting wHH with central tau objects --- .../object_performance/tau_matching_wHH.yaml | 40 +++++-------------- configs/V29/objects/taus.yaml | 22 ++++++++++ 2 files changed, 32 insertions(+), 30 deletions(-) create mode 100644 configs/V29/objects/taus.yaml diff --git a/configs/V29/object_performance/tau_matching_wHH.yaml b/configs/V29/object_performance/tau_matching_wHH.yaml index fc60c249..5f9f7aa4 100644 --- a/configs/V29/object_performance/tau_matching_wHH.yaml +++ b/configs/V29/object_performance/tau_matching_wHH.yaml @@ -1,9 +1,10 @@ HHTausMatchingBarrel: sample: HHToTauTau - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_tau" - suffix: "Pt" + x_arg: "Pt" label: "Gen Taus" cuts: event: @@ -12,19 +13,8 @@ HHTausMatchingBarrel: object: - "abs({eta}) < 2.4" test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 + nnTau:default: "Pt" + caloTau:default: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (Barrel)" binning: @@ -34,10 +24,11 @@ HHTausMatchingBarrel: HHTausMatchingEndcap: sample: HHToTauTau - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_tau" - suffix: "Pt" + x_arg: "Pt" label: "Gen Taus" cuts: event: @@ -46,19 +37,8 @@ HHTausMatchingEndcap: object: - "abs({eta}) < 2.4" test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 + nnTau:default: "Pt" + caloTau:default: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (Endcap)" binning: diff --git a/configs/V29/objects/taus.yaml b/configs/V29/objects/taus.yaml new file mode 100644 index 00000000..90f6cb62 --- /dev/null +++ b/configs/V29/objects/taus.yaml @@ -0,0 +1,22 @@ +nnTau: + label: "NN Tau" + match_dR: 0.1 + eta_ranges: + range0: [0, 5] + cuts: + range0: + - "abs({eta}) < 2.4" + - "{passloosenn}==1" + ids: + default: {} + +caloTau: + label: "Calo Tau" + match_dR: 0.3 + eta_ranges: + range0: [0, 5] + cuts: + range0: + - "abs({eta}) < 2.4" + ids: + default: {} From 16563cc4c59b942f663a407a8a2ebc0f06f0bb69 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 21:07:50 +0100 Subject: [PATCH 056/140] finish taus --- .../V29/object_performance/tau_matching.yaml | 40 +++------- .../V29/object_performance/tau_trigger.yaml | 80 +++++-------------- 2 files changed, 30 insertions(+), 90 deletions(-) diff --git a/configs/V29/object_performance/tau_matching.yaml b/configs/V29/object_performance/tau_matching.yaml index a35e41e6..f0468abd 100644 --- a/configs/V29/object_performance/tau_matching.yaml +++ b/configs/V29/object_performance/tau_matching.yaml @@ -1,9 +1,10 @@ TausMatchingBarrel: sample: VBFHToTauTau - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_tau" - suffix: "Pt" + x_arg: "Pt" label: "Gen Taus" cuts: event: @@ -12,19 +13,8 @@ TausMatchingBarrel: object: - "abs({eta}) < 2.4" test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 + nnTau:default: "Pt" + caloTau:default: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (Barrel)" binning: @@ -34,10 +24,11 @@ TausMatchingBarrel: TausMatchingEndcap: sample: VBFHToTauTau - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_tau" - suffix: "Pt" + x_arg: "Pt" label: "Gen Taus" cuts: event: @@ -46,19 +37,8 @@ TausMatchingEndcap: object: - "abs({eta}) < 2.4" test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 + nnTau:default: "Pt" + caloTau:default: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (Endcap)" binning: diff --git a/configs/V29/object_performance/tau_trigger.yaml b/configs/V29/object_performance/tau_trigger.yaml index a89c2bcb..72fe096f 100644 --- a/configs/V29/object_performance/tau_trigger.yaml +++ b/configs/V29/object_performance/tau_trigger.yaml @@ -1,9 +1,10 @@ TauTriggerBarrel_90perc: sample: VBFHToTauTau - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_tau" - suffix: "Pt" + x_arg: "Pt" label: "Gen Taus" cuts: event: @@ -12,19 +13,8 @@ TauTriggerBarrel_90perc: object: - "abs({eta}) < 2.4" test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 + nnTau:default: "Pt" + caloTau:default: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" thresholds: [20, 30] @@ -38,10 +28,11 @@ TauTriggerBarrel_90perc: TauTriggerEndcap_90perc: sample: VBFHToTauTau - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_tau" - suffix: "Pt" + x_arg: "Pt" label: "Gen Taus" cuts: event: @@ -50,19 +41,8 @@ TauTriggerEndcap_90perc: object: - "abs({eta}) < 2.4" test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 + nnTau:default: "Pt" + caloTau:default: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" thresholds: [20, 30] @@ -76,10 +56,11 @@ TauTriggerEndcap_90perc: TauTriggerBarrel_50perc: sample: VBFHToTauTau - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_tau" - suffix: "Pt" + x_arg: "Pt" label: "Gen Taus" cuts: event: @@ -88,19 +69,8 @@ TauTriggerBarrel_50perc: object: - "abs({eta}) < 2.4" test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 + nnTau:default: "Pt" + caloTau:default: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" thresholds: [20, 30] @@ -114,10 +84,11 @@ TauTriggerBarrel_50perc: TauTriggerEndcap_50perc: sample: VBFHToTauTau - default_version: V29 + version: V29 + match_test_to_ref: True reference_object: object: "part_tau" - suffix: "Pt" + x_arg: "Pt" label: "Gen Taus" cuts: event: @@ -126,19 +97,8 @@ TauTriggerEndcap_50perc: object: - "abs({eta}) < 2.4" test_objects: - nnTau: - suffix: "Pt" - label: "NN Tau" - cuts: - - "abs({eta}) < 2.4" - - "{passloosenn}==1" - match_dR: 0.1 - caloTau: - suffix: "Pt" - label: "Calo Tau" - cuts: - - "abs({eta}) < 2.4" - match_dR: 0.3 + nnTau:default: "Pt" + caloTau:default: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" thresholds: [20, 30] From 5260a71f6dbb4b24f12b0cb13c86d932cb734567 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 22 Jan 2024 21:08:18 +0100 Subject: [PATCH 057/140] add poetry.lock files as recommended by poetry docs --- poetry.lock | 1229 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1229 insertions(+) create mode 100644 poetry.lock diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 00000000..e72abf79 --- /dev/null +++ b/poetry.lock @@ -0,0 +1,1229 @@ +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. + +[[package]] +name = "awkward" +version = "2.5.2" +description = "Manipulate JSON-like data with NumPy-like idioms." +optional = false +python-versions = ">=3.8" +files = [ + {file = "awkward-2.5.2-py3-none-any.whl", hash = "sha256:6b6cbb62cdafb65457c4672980735a2b2e635a5eda5570a51459b4e42359ceb5"}, + {file = "awkward-2.5.2.tar.gz", hash = "sha256:34f4b440684b2e20f23b1a406aa3da4ecdf4fdb5fa0e076d5d337e955dee8ab6"}, +] + +[package.dependencies] +awkward-cpp = "28" +importlib-metadata = {version = ">=4.13.0", markers = "python_version < \"3.12\""} +numpy = ">=1.18.0" +packaging = "*" + +[[package]] +name = "awkward-cpp" +version = "28" +description = "CPU kernels and compiled extensions for Awkward Array" +optional = false +python-versions = ">=3.8" +files = [ + {file = "awkward-cpp-28.tar.gz", hash = "sha256:304ebbf900c577368fd3c491a4ddfe6a5790bdec76a2b06bdcc4728176264592"}, + {file = "awkward_cpp-28-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d7f995056387fb3d004d45012fd15eccdedee5613a331c18941caf9c2670353d"}, + {file = "awkward_cpp-28-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d8540242144067b2ef76eae0bcfa4ae7ac188f3b6160c815ce8cb95ef5fdad32"}, + {file = "awkward_cpp-28-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45b0cff5955e78f4208735e95c9f6ef5c79f9c0df857baa418ff9f0386c71af6"}, + {file = "awkward_cpp-28-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c7c726430b328aa1e3d82af5fbf25e78ab1088f3ea9cfb752efffa4ca812496"}, + {file = "awkward_cpp-28-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:31069d5d0c26be0086a5b37c9c4212b9d232c9d54a16ec4b47292bd0ebd085df"}, + {file = "awkward_cpp-28-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8f2136fa34837632ecc4d68bae41d2518bb92b60ca52aa2f5d3f3a7c0017c6a2"}, + {file = "awkward_cpp-28-cp310-cp310-win_amd64.whl", hash = "sha256:312360d76888b5114a38bcbd9ad5179e939acc0873033cf08cb8c272a15fa6e9"}, + {file = "awkward_cpp-28-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ff429cc7fedc1fddbe9726256ea03265c0ab14fb200ae5d787bb2bed149cf592"}, + {file = "awkward_cpp-28-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:14ed98a25528e2517ca660638ca72217441b3817d59cf78ea10ccac9230f3749"}, + {file = "awkward_cpp-28-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26d21c444e5a83c0e4fa74f1cf1505f7c4083e23be1af2cd8191b9e181b181b4"}, + {file = "awkward_cpp-28-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cbc55e27117bf5ab26b514ddd11a0cadd847eec50dd4b8833fd65be126f46d5"}, + {file = "awkward_cpp-28-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4737ea0c337b35ee586078bc2ba41eb2f4b771108f551bc63fab6c73d2a9fc5e"}, + {file = "awkward_cpp-28-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:286f5288ad21f0296a8c4182a360c141c8dd000b6eb2fa03696ba5f2c632bd95"}, + {file = "awkward_cpp-28-cp311-cp311-win_amd64.whl", hash = "sha256:0be97d9ca36068878b18a307f919e55bb4e9538fb46432c7492bab3e64bc8251"}, + {file = "awkward_cpp-28-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:d5cc1a7a6871dcaba33986bb634c9d4e6e58c6f3324f58db1884a171d1b74d11"}, + {file = "awkward_cpp-28-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:4ce8def0cd6df1507876664a1714242016e52265fd715eaba57b8fe9dd978e40"}, + {file = "awkward_cpp-28-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e4419c82cdd6095471334b0bdb197c507598ffdb89b01e0bae2f04077a77b1b"}, + {file = "awkward_cpp-28-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f38e6198a9dcc4693b347c035db996f89d4407a3f6cf4cbae7d00aa8eedf8f57"}, + {file = "awkward_cpp-28-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:facc2c40ed566fe25f376eae9743ad147d900c1beb7d3dc3f592669907314a1f"}, + {file = "awkward_cpp-28-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9f0cceb35aeee70f53f03814c3a3dac06c3514eec3149e09dbd0b9e723215145"}, + {file = "awkward_cpp-28-cp312-cp312-win_amd64.whl", hash = "sha256:59ec43807b8f999c855250f464316e4ecb2e3737feb26bd996df281032c7eabc"}, + {file = "awkward_cpp-28-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:cc28f0a4528ac722979efcf970ff82fd2bcf9fa74ea70b9e3797de9182f2cd6b"}, + {file = "awkward_cpp-28-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2991ca89342e1b7ff1a803335506ead04fc83232bb1610de5321823158b18792"}, + {file = "awkward_cpp-28-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c8d4f7da0d48a8e612b43b14f679a5546b758e2fea66bbb2fd515c410055c9be"}, + {file = "awkward_cpp-28-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ccfc10ee04d29de244a76b9cc5f2855a1a1aa73aba1a60ab68279fa085fae583"}, + {file = "awkward_cpp-28-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cb6e81d67f40bac7d2335e6169f1065bd53af055f952347428ea7470b08f32ec"}, + {file = "awkward_cpp-28-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:17074f0354faa956aab651b578658e2d988a3974a7b0b57c54a377451240cf25"}, + {file = "awkward_cpp-28-cp38-cp38-win32.whl", hash = "sha256:2d4d40d8656f93d9df388c98083f135764bea66f7501ecf4b674427a17625aae"}, + {file = "awkward_cpp-28-cp38-cp38-win_amd64.whl", hash = "sha256:f7ce31e9c46f50adf534ca8c95a2fc97dd4e2409a95047785c84558a35996208"}, + {file = "awkward_cpp-28-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:504c1827dc301b43e80fa2223f22c7c4a30d45799fe07a5f921858d78081fd2f"}, + {file = "awkward_cpp-28-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:dba4f11f362ace07820ad0340a4d94a8a08aad9b57e44839dd6ba76761e90bab"}, + {file = "awkward_cpp-28-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a787dbd2882c232cf61c76caf13610334de5d5badff269fc49c4f6a7e13a87cd"}, + {file = "awkward_cpp-28-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eaf046c3ea8b65e9340e88483271c8540e1d3c76d41afa495574e2b47117cc6"}, + {file = "awkward_cpp-28-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:22ce5406055bcc73720f76ae0dc1a12fbaaa22b00ca924688478d413a3ebfa7f"}, + {file = "awkward_cpp-28-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7d9407d051272c020c6ffea0a51a062bc44c8b5fda6e911f38faee0126d9e624"}, + {file = "awkward_cpp-28-cp39-cp39-win32.whl", hash = "sha256:26afc25e86c3631999f4188d5e173ce60ffc0125d1c69b17136d1fade3748fdf"}, + {file = "awkward_cpp-28-cp39-cp39-win_amd64.whl", hash = "sha256:4098c799897a94fdf26224a8e57064096e5918c44a2c33f280641970a595186c"}, + {file = "awkward_cpp-28-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b16a452644db24544403cb8a9fe4f47a63841f7625b9febf021a70f2331dd12e"}, + {file = "awkward_cpp-28-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:abb01c5abc00cb77225f64c205da5b05a1a9a7544c388c0d3a1c811e0d1dfe18"}, + {file = "awkward_cpp-28-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9dc49bffe7f096708b3e2b1455df1d1ba3e999c6bcd3b186873d13fb015fc090"}, + {file = "awkward_cpp-28-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66d3171519caab2b10161b682839b59155b7001b1d1199230d9e137b309e5caa"}, + {file = "awkward_cpp-28-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:240479e25e83f08fe6cf93e6abb6eed1b83bf6cbf1a8ed894b2b4568ba17250f"}, + {file = "awkward_cpp-28-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dda7cebbafa71742d65f9ad10f4820ec12c257cb3ac3e250698d8b2e4acb9491"}, +] + +[package.dependencies] +numpy = ">=1.18.0" + +[[package]] +name = "black" +version = "23.12.1" +description = "The uncompromising code formatter." +optional = false +python-versions = ">=3.8" +files = [ + {file = "black-23.12.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0aaf6041986767a5e0ce663c7a2f0e9eaf21e6ff87a5f95cbf3675bfd4c41d2"}, + {file = "black-23.12.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c88b3711d12905b74206227109272673edce0cb29f27e1385f33b0163c414bba"}, + {file = "black-23.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a920b569dc6b3472513ba6ddea21f440d4b4c699494d2e972a1753cdc25df7b0"}, + {file = "black-23.12.1-cp310-cp310-win_amd64.whl", hash = "sha256:3fa4be75ef2a6b96ea8d92b1587dd8cb3a35c7e3d51f0738ced0781c3aa3a5a3"}, + {file = "black-23.12.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8d4df77958a622f9b5a4c96edb4b8c0034f8434032ab11077ec6c56ae9f384ba"}, + {file = "black-23.12.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:602cfb1196dc692424c70b6507593a2b29aac0547c1be9a1d1365f0d964c353b"}, + {file = "black-23.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c4352800f14be5b4864016882cdba10755bd50805c95f728011bcb47a4afd59"}, + {file = "black-23.12.1-cp311-cp311-win_amd64.whl", hash = "sha256:0808494f2b2df923ffc5723ed3c7b096bd76341f6213989759287611e9837d50"}, + {file = "black-23.12.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:25e57fd232a6d6ff3f4478a6fd0580838e47c93c83eaf1ccc92d4faf27112c4e"}, + {file = "black-23.12.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2d9e13db441c509a3763a7a3d9a49ccc1b4e974a47be4e08ade2a228876500ec"}, + {file = "black-23.12.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1bd9c210f8b109b1762ec9fd36592fdd528485aadb3f5849b2740ef17e674e"}, + {file = "black-23.12.1-cp312-cp312-win_amd64.whl", hash = "sha256:ae76c22bde5cbb6bfd211ec343ded2163bba7883c7bc77f6b756a1049436fbb9"}, + {file = "black-23.12.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1fa88a0f74e50e4487477bc0bb900c6781dbddfdfa32691e780bf854c3b4a47f"}, + {file = "black-23.12.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a4d6a9668e45ad99d2f8ec70d5c8c04ef4f32f648ef39048d010b0689832ec6d"}, + {file = "black-23.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b18fb2ae6c4bb63eebe5be6bd869ba2f14fd0259bda7d18a46b764d8fb86298a"}, + {file = "black-23.12.1-cp38-cp38-win_amd64.whl", hash = "sha256:c04b6d9d20e9c13f43eee8ea87d44156b8505ca8a3c878773f68b4e4812a421e"}, + {file = "black-23.12.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3e1b38b3135fd4c025c28c55ddfc236b05af657828a8a6abe5deec419a0b7055"}, + {file = "black-23.12.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4f0031eaa7b921db76decd73636ef3a12c942ed367d8c3841a0739412b260a54"}, + {file = "black-23.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97e56155c6b737854e60a9ab1c598ff2533d57e7506d97af5481141671abf3ea"}, + {file = "black-23.12.1-cp39-cp39-win_amd64.whl", hash = "sha256:dd15245c8b68fe2b6bd0f32c1556509d11bb33aec9b5d0866dd8e2ed3dba09c2"}, + {file = "black-23.12.1-py3-none-any.whl", hash = "sha256:78baad24af0f033958cad29731e27363183e140962595def56423e626f4bee3e"}, + {file = "black-23.12.1.tar.gz", hash = "sha256:4ce3ef14ebe8d9509188014d96af1c456a910d5b5cbf434a09fef7e024b3d0d5"}, +] + +[package.dependencies] +click = ">=8.0.0" +mypy-extensions = ">=0.4.3" +packaging = ">=22.0" +pathspec = ">=0.9.0" +platformdirs = ">=2" + +[package.extras] +colorama = ["colorama (>=0.4.3)"] +d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] +jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] +uvloop = ["uvloop (>=0.15.2)"] + +[[package]] +name = "click" +version = "8.1.7" +description = "Composable command line interface toolkit" +optional = false +python-versions = ">=3.7" +files = [ + {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, + {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "contourpy" +version = "1.2.0" +description = "Python library for calculating contours of 2D quadrilateral grids" +optional = false +python-versions = ">=3.9" +files = [ + {file = "contourpy-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0274c1cb63625972c0c007ab14dd9ba9e199c36ae1a231ce45d725cbcbfd10a8"}, + {file = "contourpy-1.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ab459a1cbbf18e8698399c595a01f6dcc5c138220ca3ea9e7e6126232d102bb4"}, + {file = "contourpy-1.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fdd887f17c2f4572ce548461e4f96396681212d858cae7bd52ba3310bc6f00f"}, + {file = "contourpy-1.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d16edfc3fc09968e09ddffada434b3bf989bf4911535e04eada58469873e28e"}, + {file = "contourpy-1.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c203f617abc0dde5792beb586f827021069fb6d403d7f4d5c2b543d87edceb9"}, + {file = "contourpy-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b69303ceb2e4d4f146bf82fda78891ef7bcd80c41bf16bfca3d0d7eb545448aa"}, + {file = "contourpy-1.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:884c3f9d42d7218304bc74a8a7693d172685c84bd7ab2bab1ee567b769696df9"}, + {file = "contourpy-1.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4a1b1208102be6e851f20066bf0e7a96b7d48a07c9b0cfe6d0d4545c2f6cadab"}, + {file = "contourpy-1.2.0-cp310-cp310-win32.whl", hash = "sha256:34b9071c040d6fe45d9826cbbe3727d20d83f1b6110d219b83eb0e2a01d79488"}, + {file = "contourpy-1.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:bd2f1ae63998da104f16a8b788f685e55d65760cd1929518fd94cd682bf03e41"}, + {file = "contourpy-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:dd10c26b4eadae44783c45ad6655220426f971c61d9b239e6f7b16d5cdaaa727"}, + {file = "contourpy-1.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5c6b28956b7b232ae801406e529ad7b350d3f09a4fde958dfdf3c0520cdde0dd"}, + {file = "contourpy-1.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebeac59e9e1eb4b84940d076d9f9a6cec0064e241818bcb6e32124cc5c3e377a"}, + {file = "contourpy-1.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:139d8d2e1c1dd52d78682f505e980f592ba53c9f73bd6be102233e358b401063"}, + {file = "contourpy-1.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1e9dc350fb4c58adc64df3e0703ab076f60aac06e67d48b3848c23647ae4310e"}, + {file = "contourpy-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18fc2b4ed8e4a8fe849d18dce4bd3c7ea637758c6343a1f2bae1e9bd4c9f4686"}, + {file = "contourpy-1.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:16a7380e943a6d52472096cb7ad5264ecee36ed60888e2a3d3814991a0107286"}, + {file = "contourpy-1.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8d8faf05be5ec8e02a4d86f616fc2a0322ff4a4ce26c0f09d9f7fb5330a35c95"}, + {file = "contourpy-1.2.0-cp311-cp311-win32.whl", hash = "sha256:67b7f17679fa62ec82b7e3e611c43a016b887bd64fb933b3ae8638583006c6d6"}, + {file = "contourpy-1.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:99ad97258985328b4f207a5e777c1b44a83bfe7cf1f87b99f9c11d4ee477c4de"}, + {file = "contourpy-1.2.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:575bcaf957a25d1194903a10bc9f316c136c19f24e0985a2b9b5608bdf5dbfe0"}, + {file = "contourpy-1.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9e6c93b5b2dbcedad20a2f18ec22cae47da0d705d454308063421a3b290d9ea4"}, + {file = "contourpy-1.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:464b423bc2a009088f19bdf1f232299e8b6917963e2b7e1d277da5041f33a779"}, + {file = "contourpy-1.2.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:68ce4788b7d93e47f84edd3f1f95acdcd142ae60bc0e5493bfd120683d2d4316"}, + {file = "contourpy-1.2.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d7d1f8871998cdff5d2ff6a087e5e1780139abe2838e85b0b46b7ae6cc25399"}, + {file = "contourpy-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e739530c662a8d6d42c37c2ed52a6f0932c2d4a3e8c1f90692ad0ce1274abe0"}, + {file = "contourpy-1.2.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:247b9d16535acaa766d03037d8e8fb20866d054d3c7fbf6fd1f993f11fc60ca0"}, + {file = "contourpy-1.2.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:461e3ae84cd90b30f8d533f07d87c00379644205b1d33a5ea03381edc4b69431"}, + {file = "contourpy-1.2.0-cp312-cp312-win32.whl", hash = "sha256:1c2559d6cffc94890b0529ea7eeecc20d6fadc1539273aa27faf503eb4656d8f"}, + {file = "contourpy-1.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:491b1917afdd8638a05b611a56d46587d5a632cabead889a5440f7c638bc6ed9"}, + {file = "contourpy-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5fd1810973a375ca0e097dee059c407913ba35723b111df75671a1976efa04bc"}, + {file = "contourpy-1.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:999c71939aad2780f003979b25ac5b8f2df651dac7b38fb8ce6c46ba5abe6ae9"}, + {file = "contourpy-1.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b7caf9b241464c404613512d5594a6e2ff0cc9cb5615c9475cc1d9b514218ae8"}, + {file = "contourpy-1.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:266270c6f6608340f6c9836a0fb9b367be61dde0c9a9a18d5ece97774105ff3e"}, + {file = "contourpy-1.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbd50d0a0539ae2e96e537553aff6d02c10ed165ef40c65b0e27e744a0f10af8"}, + {file = "contourpy-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11f8d2554e52f459918f7b8e6aa20ec2a3bce35ce95c1f0ef4ba36fbda306df5"}, + {file = "contourpy-1.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ce96dd400486e80ac7d195b2d800b03e3e6a787e2a522bfb83755938465a819e"}, + {file = "contourpy-1.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6d3364b999c62f539cd403f8123ae426da946e142312a514162adb2addd8d808"}, + {file = "contourpy-1.2.0-cp39-cp39-win32.whl", hash = "sha256:1c88dfb9e0c77612febebb6ac69d44a8d81e3dc60f993215425b62c1161353f4"}, + {file = "contourpy-1.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:78e6ad33cf2e2e80c5dfaaa0beec3d61face0fb650557100ee36db808bfa6843"}, + {file = "contourpy-1.2.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:be16975d94c320432657ad2402f6760990cb640c161ae6da1363051805fa8108"}, + {file = "contourpy-1.2.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b95a225d4948b26a28c08307a60ac00fb8671b14f2047fc5476613252a129776"}, + {file = "contourpy-1.2.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:0d7e03c0f9a4f90dc18d4e77e9ef4ec7b7bbb437f7f675be8e530d65ae6ef956"}, + {file = "contourpy-1.2.0.tar.gz", hash = "sha256:171f311cb758de7da13fc53af221ae47a5877be5a0843a9fe150818c51ed276a"}, +] + +[package.dependencies] +numpy = ">=1.20,<2.0" + +[package.extras] +bokeh = ["bokeh", "selenium"] +docs = ["furo", "sphinx (>=7.2)", "sphinx-copybutton"] +mypy = ["contourpy[bokeh,docs]", "docutils-stubs", "mypy (==1.6.1)", "types-Pillow"] +test = ["Pillow", "contourpy[test-no-images]", "matplotlib"] +test-no-images = ["pytest", "pytest-cov", "pytest-xdist", "wurlitzer"] + +[[package]] +name = "cycler" +version = "0.12.1" +description = "Composable style cycles" +optional = false +python-versions = ">=3.8" +files = [ + {file = "cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30"}, + {file = "cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c"}, +] + +[package.extras] +docs = ["ipython", "matplotlib", "numpydoc", "sphinx"] +tests = ["pytest", "pytest-cov", "pytest-xdist"] + +[[package]] +name = "flake8" +version = "7.0.0" +description = "the modular source code checker: pep8 pyflakes and co" +optional = false +python-versions = ">=3.8.1" +files = [ + {file = "flake8-7.0.0-py2.py3-none-any.whl", hash = "sha256:a6dfbb75e03252917f2473ea9653f7cd799c3064e54d4c8140044c5c065f53c3"}, + {file = "flake8-7.0.0.tar.gz", hash = "sha256:33f96621059e65eec474169085dc92bf26e7b2d47366b70be2f67ab80dc25132"}, +] + +[package.dependencies] +mccabe = ">=0.7.0,<0.8.0" +pycodestyle = ">=2.11.0,<2.12.0" +pyflakes = ">=3.2.0,<3.3.0" + +[[package]] +name = "fonttools" +version = "4.47.2" +description = "Tools to manipulate font files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "fonttools-4.47.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3b629108351d25512d4ea1a8393a2dba325b7b7d7308116b605ea3f8e1be88df"}, + {file = "fonttools-4.47.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c19044256c44fe299d9a73456aabee4b4d06c6b930287be93b533b4737d70aa1"}, + {file = "fonttools-4.47.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b8be28c036b9f186e8c7eaf8a11b42373e7e4949f9e9f370202b9da4c4c3f56c"}, + {file = "fonttools-4.47.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f83a4daef6d2a202acb9bf572958f91cfde5b10c8ee7fb1d09a4c81e5d851fd8"}, + {file = "fonttools-4.47.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4a5a5318ba5365d992666ac4fe35365f93004109d18858a3e18ae46f67907670"}, + {file = "fonttools-4.47.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8f57ecd742545362a0f7186774b2d1c53423ed9ece67689c93a1055b236f638c"}, + {file = "fonttools-4.47.2-cp310-cp310-win32.whl", hash = "sha256:a1c154bb85dc9a4cf145250c88d112d88eb414bad81d4cb524d06258dea1bdc0"}, + {file = "fonttools-4.47.2-cp310-cp310-win_amd64.whl", hash = "sha256:3e2b95dce2ead58fb12524d0ca7d63a63459dd489e7e5838c3cd53557f8933e1"}, + {file = "fonttools-4.47.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:29495d6d109cdbabe73cfb6f419ce67080c3ef9ea1e08d5750240fd4b0c4763b"}, + {file = "fonttools-4.47.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0a1d313a415eaaba2b35d6cd33536560deeebd2ed758b9bfb89ab5d97dc5deac"}, + {file = "fonttools-4.47.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:90f898cdd67f52f18049250a6474185ef6544c91f27a7bee70d87d77a8daf89c"}, + {file = "fonttools-4.47.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3480eeb52770ff75140fe7d9a2ec33fb67b07efea0ab5129c7e0c6a639c40c70"}, + {file = "fonttools-4.47.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0255dbc128fee75fb9be364806b940ed450dd6838672a150d501ee86523ac61e"}, + {file = "fonttools-4.47.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f791446ff297fd5f1e2247c188de53c1bfb9dd7f0549eba55b73a3c2087a2703"}, + {file = "fonttools-4.47.2-cp311-cp311-win32.whl", hash = "sha256:740947906590a878a4bde7dd748e85fefa4d470a268b964748403b3ab2aeed6c"}, + {file = "fonttools-4.47.2-cp311-cp311-win_amd64.whl", hash = "sha256:63fbed184979f09a65aa9c88b395ca539c94287ba3a364517698462e13e457c9"}, + {file = "fonttools-4.47.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:4ec558c543609e71b2275c4894e93493f65d2f41c15fe1d089080c1d0bb4d635"}, + {file = "fonttools-4.47.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e040f905d542362e07e72e03612a6270c33d38281fd573160e1003e43718d68d"}, + {file = "fonttools-4.47.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6dd58cc03016b281bd2c74c84cdaa6bd3ce54c5a7f47478b7657b930ac3ed8eb"}, + {file = "fonttools-4.47.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:32ab2e9702dff0dd4510c7bb958f265a8d3dd5c0e2547e7b5f7a3df4979abb07"}, + {file = "fonttools-4.47.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:3a808f3c1d1df1f5bf39be869b6e0c263570cdafb5bdb2df66087733f566ea71"}, + {file = "fonttools-4.47.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ac71e2e201df041a2891067dc36256755b1229ae167edbdc419b16da78732c2f"}, + {file = "fonttools-4.47.2-cp312-cp312-win32.whl", hash = "sha256:69731e8bea0578b3c28fdb43dbf95b9386e2d49a399e9a4ad736b8e479b08085"}, + {file = "fonttools-4.47.2-cp312-cp312-win_amd64.whl", hash = "sha256:b3e1304e5f19ca861d86a72218ecce68f391646d85c851742d265787f55457a4"}, + {file = "fonttools-4.47.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:254d9a6f7be00212bf0c3159e0a420eb19c63793b2c05e049eb337f3023c5ecc"}, + {file = "fonttools-4.47.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:eabae77a07c41ae0b35184894202305c3ad211a93b2eb53837c2a1143c8bc952"}, + {file = "fonttools-4.47.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a86a5ab2873ed2575d0fcdf1828143cfc6b977ac448e3dc616bb1e3d20efbafa"}, + {file = "fonttools-4.47.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13819db8445a0cec8c3ff5f243af6418ab19175072a9a92f6cc8ca7d1452754b"}, + {file = "fonttools-4.47.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4e743935139aa485fe3253fc33fe467eab6ea42583fa681223ea3f1a93dd01e6"}, + {file = "fonttools-4.47.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d49ce3ea7b7173faebc5664872243b40cf88814ca3eb135c4a3cdff66af71946"}, + {file = "fonttools-4.47.2-cp38-cp38-win32.whl", hash = "sha256:94208ea750e3f96e267f394d5588579bb64cc628e321dbb1d4243ffbc291b18b"}, + {file = "fonttools-4.47.2-cp38-cp38-win_amd64.whl", hash = "sha256:0f750037e02beb8b3569fbff701a572e62a685d2a0e840d75816592280e5feae"}, + {file = "fonttools-4.47.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3d71606c9321f6701642bd4746f99b6089e53d7e9817fc6b964e90d9c5f0ecc6"}, + {file = "fonttools-4.47.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:86e0427864c6c91cf77f16d1fb9bf1bbf7453e824589e8fb8461b6ee1144f506"}, + {file = "fonttools-4.47.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a00bd0e68e88987dcc047ea31c26d40a3c61185153b03457956a87e39d43c37"}, + {file = "fonttools-4.47.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5d77479fb885ef38a16a253a2f4096bc3d14e63a56d6246bfdb56365a12b20c"}, + {file = "fonttools-4.47.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5465df494f20a7d01712b072ae3ee9ad2887004701b95cb2cc6dcb9c2c97a899"}, + {file = "fonttools-4.47.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4c811d3c73b6abac275babb8aa439206288f56fdb2c6f8835e3d7b70de8937a7"}, + {file = "fonttools-4.47.2-cp39-cp39-win32.whl", hash = "sha256:5b60e3afa9635e3dfd3ace2757039593e3bd3cf128be0ddb7a1ff4ac45fa5a50"}, + {file = "fonttools-4.47.2-cp39-cp39-win_amd64.whl", hash = "sha256:7ee48bd9d6b7e8f66866c9090807e3a4a56cf43ffad48962725a190e0dd774c8"}, + {file = "fonttools-4.47.2-py3-none-any.whl", hash = "sha256:7eb7ad665258fba68fd22228a09f347469d95a97fb88198e133595947a20a184"}, + {file = "fonttools-4.47.2.tar.gz", hash = "sha256:7df26dd3650e98ca45f1e29883c96a0b9f5bb6af8d632a6a108bc744fa0bd9b3"}, +] + +[package.extras] +all = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "fs (>=2.2.0,<3)", "lxml (>=4.0,<5)", "lz4 (>=1.7.4.2)", "matplotlib", "munkres", "pycairo", "scipy", "skia-pathops (>=0.5.0)", "sympy", "uharfbuzz (>=0.23.0)", "unicodedata2 (>=15.1.0)", "xattr", "zopfli (>=0.1.4)"] +graphite = ["lz4 (>=1.7.4.2)"] +interpolatable = ["munkres", "pycairo", "scipy"] +lxml = ["lxml (>=4.0,<5)"] +pathops = ["skia-pathops (>=0.5.0)"] +plot = ["matplotlib"] +repacker = ["uharfbuzz (>=0.23.0)"] +symfont = ["sympy"] +type1 = ["xattr"] +ufo = ["fs (>=2.2.0,<3)"] +unicode = ["unicodedata2 (>=15.1.0)"] +woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] + +[[package]] +name = "fsspec" +version = "2023.12.2" +description = "File-system specification" +optional = false +python-versions = ">=3.8" +files = [ + {file = "fsspec-2023.12.2-py3-none-any.whl", hash = "sha256:d800d87f72189a745fa3d6b033b9dc4a34ad069f60ca60b943a63599f5501960"}, + {file = "fsspec-2023.12.2.tar.gz", hash = "sha256:8548d39e8810b59c38014934f6b31e57f40c1b20f911f4cc2b85389c7e9bf0cb"}, +] + +[package.extras] +abfs = ["adlfs"] +adl = ["adlfs"] +arrow = ["pyarrow (>=1)"] +dask = ["dask", "distributed"] +devel = ["pytest", "pytest-cov"] +dropbox = ["dropbox", "dropboxdrivefs", "requests"] +full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"] +fuse = ["fusepy"] +gcs = ["gcsfs"] +git = ["pygit2"] +github = ["requests"] +gs = ["gcsfs"] +gui = ["panel"] +hdfs = ["pyarrow (>=1)"] +http = ["aiohttp (!=4.0.0a0,!=4.0.0a1)", "requests"] +libarchive = ["libarchive-c"] +oci = ["ocifs"] +s3 = ["s3fs"] +sftp = ["paramiko"] +smb = ["smbprotocol"] +ssh = ["paramiko"] +tqdm = ["tqdm"] + +[[package]] +name = "importlib-metadata" +version = "7.0.1" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "importlib_metadata-7.0.1-py3-none-any.whl", hash = "sha256:4805911c3a4ec7c3966410053e9ec6a1fecd629117df5adee56dfc9432a1081e"}, + {file = "importlib_metadata-7.0.1.tar.gz", hash = "sha256:f238736bb06590ae52ac1fab06a3a9ef1d8dce2b7a35b5ab329371d6c8f5d2cc"}, +] + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] + +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + +[[package]] +name = "kiwisolver" +version = "1.4.5" +description = "A fast implementation of the Cassowary constraint solver" +optional = false +python-versions = ">=3.7" +files = [ + {file = "kiwisolver-1.4.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:05703cf211d585109fcd72207a31bb170a0f22144d68298dc5e61b3c946518af"}, + {file = "kiwisolver-1.4.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:146d14bebb7f1dc4d5fbf74f8a6cb15ac42baadee8912eb84ac0b3b2a3dc6ac3"}, + {file = "kiwisolver-1.4.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6ef7afcd2d281494c0a9101d5c571970708ad911d028137cd558f02b851c08b4"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:9eaa8b117dc8337728e834b9c6e2611f10c79e38f65157c4c38e9400286f5cb1"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ec20916e7b4cbfb1f12380e46486ec4bcbaa91a9c448b97023fde0d5bbf9e4ff"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39b42c68602539407884cf70d6a480a469b93b81b7701378ba5e2328660c847a"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aa12042de0171fad672b6c59df69106d20d5596e4f87b5e8f76df757a7c399aa"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2a40773c71d7ccdd3798f6489aaac9eee213d566850a9533f8d26332d626b82c"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:19df6e621f6d8b4b9c4d45f40a66839294ff2bb235e64d2178f7522d9170ac5b"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:83d78376d0d4fd884e2c114d0621624b73d2aba4e2788182d286309ebdeed770"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e391b1f0a8a5a10ab3b9bb6afcfd74f2175f24f8975fb87ecae700d1503cdee0"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:852542f9481f4a62dbb5dd99e8ab7aedfeb8fb6342349a181d4036877410f525"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59edc41b24031bc25108e210c0def6f6c2191210492a972d585a06ff246bb79b"}, + {file = "kiwisolver-1.4.5-cp310-cp310-win32.whl", hash = "sha256:a6aa6315319a052b4ee378aa171959c898a6183f15c1e541821c5c59beaa0238"}, + {file = "kiwisolver-1.4.5-cp310-cp310-win_amd64.whl", hash = "sha256:d0ef46024e6a3d79c01ff13801cb19d0cad7fd859b15037aec74315540acc276"}, + {file = "kiwisolver-1.4.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:11863aa14a51fd6ec28688d76f1735f8f69ab1fabf388851a595d0721af042f5"}, + {file = "kiwisolver-1.4.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8ab3919a9997ab7ef2fbbed0cc99bb28d3c13e6d4b1ad36e97e482558a91be90"}, + {file = "kiwisolver-1.4.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fcc700eadbbccbf6bc1bcb9dbe0786b4b1cb91ca0dcda336eef5c2beed37b797"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dfdd7c0b105af050eb3d64997809dc21da247cf44e63dc73ff0fd20b96be55a9"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76c6a5964640638cdeaa0c359382e5703e9293030fe730018ca06bc2010c4437"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bbea0db94288e29afcc4c28afbf3a7ccaf2d7e027489c449cf7e8f83c6346eb9"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ceec1a6bc6cab1d6ff5d06592a91a692f90ec7505d6463a88a52cc0eb58545da"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:040c1aebeda72197ef477a906782b5ab0d387642e93bda547336b8957c61022e"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f91de7223d4c7b793867797bacd1ee53bfe7359bd70d27b7b58a04efbb9436c8"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:faae4860798c31530dd184046a900e652c95513796ef51a12bc086710c2eec4d"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:b0157420efcb803e71d1b28e2c287518b8808b7cf1ab8af36718fd0a2c453eb0"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:06f54715b7737c2fecdbf140d1afb11a33d59508a47bf11bb38ecf21dc9ab79f"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fdb7adb641a0d13bdcd4ef48e062363d8a9ad4a182ac7647ec88f695e719ae9f"}, + {file = "kiwisolver-1.4.5-cp311-cp311-win32.whl", hash = "sha256:bb86433b1cfe686da83ce32a9d3a8dd308e85c76b60896d58f082136f10bffac"}, + {file = "kiwisolver-1.4.5-cp311-cp311-win_amd64.whl", hash = "sha256:6c08e1312a9cf1074d17b17728d3dfce2a5125b2d791527f33ffbe805200a355"}, + {file = "kiwisolver-1.4.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:32d5cf40c4f7c7b3ca500f8985eb3fb3a7dfc023215e876f207956b5ea26632a"}, + {file = "kiwisolver-1.4.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f846c260f483d1fd217fe5ed7c173fb109efa6b1fc8381c8b7552c5781756192"}, + {file = "kiwisolver-1.4.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5ff5cf3571589b6d13bfbfd6bcd7a3f659e42f96b5fd1c4830c4cf21d4f5ef45"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7269d9e5f1084a653d575c7ec012ff57f0c042258bf5db0954bf551c158466e7"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da802a19d6e15dffe4b0c24b38b3af68e6c1a68e6e1d8f30148c83864f3881db"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3aba7311af82e335dd1e36ffff68aaca609ca6290c2cb6d821a39aa075d8e3ff"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:763773d53f07244148ccac5b084da5adb90bfaee39c197554f01b286cf869228"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2270953c0d8cdab5d422bee7d2007f043473f9d2999631c86a223c9db56cbd16"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d099e745a512f7e3bbe7249ca835f4d357c586d78d79ae8f1dcd4d8adeb9bda9"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:74db36e14a7d1ce0986fa104f7d5637aea5c82ca6326ed0ec5694280942d1162"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:7e5bab140c309cb3a6ce373a9e71eb7e4873c70c2dda01df6820474f9889d6d4"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:0f114aa76dc1b8f636d077979c0ac22e7cd8f3493abbab152f20eb8d3cda71f3"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:88a2df29d4724b9237fc0c6eaf2a1adae0cdc0b3e9f4d8e7dc54b16812d2d81a"}, + {file = "kiwisolver-1.4.5-cp312-cp312-win32.whl", hash = "sha256:72d40b33e834371fd330fb1472ca19d9b8327acb79a5821d4008391db8e29f20"}, + {file = "kiwisolver-1.4.5-cp312-cp312-win_amd64.whl", hash = "sha256:2c5674c4e74d939b9d91dda0fae10597ac7521768fec9e399c70a1f27e2ea2d9"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3a2b053a0ab7a3960c98725cfb0bf5b48ba82f64ec95fe06f1d06c99b552e130"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3cd32d6c13807e5c66a7cbb79f90b553642f296ae4518a60d8d76243b0ad2898"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:59ec7b7c7e1a61061850d53aaf8e93db63dce0c936db1fda2658b70e4a1be709"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:da4cfb373035def307905d05041c1d06d8936452fe89d464743ae7fb8371078b"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2400873bccc260b6ae184b2b8a4fec0e4082d30648eadb7c3d9a13405d861e89"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:1b04139c4236a0f3aff534479b58f6f849a8b351e1314826c2d230849ed48985"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:4e66e81a5779b65ac21764c295087de82235597a2293d18d943f8e9e32746265"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:7931d8f1f67c4be9ba1dd9c451fb0eeca1a25b89e4d3f89e828fe12a519b782a"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:b3f7e75f3015df442238cca659f8baa5f42ce2a8582727981cbfa15fee0ee205"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:bbf1d63eef84b2e8c89011b7f2235b1e0bf7dacc11cac9431fc6468e99ac77fb"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:4c380469bd3f970ef677bf2bcba2b6b0b4d5c75e7a020fb863ef75084efad66f"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-win32.whl", hash = "sha256:9408acf3270c4b6baad483865191e3e582b638b1654a007c62e3efe96f09a9a3"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-win_amd64.whl", hash = "sha256:5b94529f9b2591b7af5f3e0e730a4e0a41ea174af35a4fd067775f9bdfeee01a"}, + {file = "kiwisolver-1.4.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:11c7de8f692fc99816e8ac50d1d1aef4f75126eefc33ac79aac02c099fd3db71"}, + {file = "kiwisolver-1.4.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:53abb58632235cd154176ced1ae8f0d29a6657aa1aa9decf50b899b755bc2b93"}, + {file = "kiwisolver-1.4.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:88b9f257ca61b838b6f8094a62418421f87ac2a1069f7e896c36a7d86b5d4c29"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3195782b26fc03aa9c6913d5bad5aeb864bdc372924c093b0f1cebad603dd712"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fc579bf0f502e54926519451b920e875f433aceb4624a3646b3252b5caa9e0b6"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a580c91d686376f0f7c295357595c5a026e6cbc3d77b7c36e290201e7c11ecb"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cfe6ab8da05c01ba6fbea630377b5da2cd9bcbc6338510116b01c1bc939a2c18"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:d2e5a98f0ec99beb3c10e13b387f8db39106d53993f498b295f0c914328b1333"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a51a263952b1429e429ff236d2f5a21c5125437861baeed77f5e1cc2d2c7c6da"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:3edd2fa14e68c9be82c5b16689e8d63d89fe927e56debd6e1dbce7a26a17f81b"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:74d1b44c6cfc897df648cc9fdaa09bc3e7679926e6f96df05775d4fb3946571c"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:76d9289ed3f7501012e05abb8358bbb129149dbd173f1f57a1bf1c22d19ab7cc"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:92dea1ffe3714fa8eb6a314d2b3c773208d865a0e0d35e713ec54eea08a66250"}, + {file = "kiwisolver-1.4.5-cp38-cp38-win32.whl", hash = "sha256:5c90ae8c8d32e472be041e76f9d2f2dbff4d0b0be8bd4041770eddb18cf49a4e"}, + {file = "kiwisolver-1.4.5-cp38-cp38-win_amd64.whl", hash = "sha256:c7940c1dc63eb37a67721b10d703247552416f719c4188c54e04334321351ced"}, + {file = "kiwisolver-1.4.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:9407b6a5f0d675e8a827ad8742e1d6b49d9c1a1da5d952a67d50ef5f4170b18d"}, + {file = "kiwisolver-1.4.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:15568384086b6df3c65353820a4473575dbad192e35010f622c6ce3eebd57af9"}, + {file = "kiwisolver-1.4.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0dc9db8e79f0036e8173c466d21ef18e1befc02de8bf8aa8dc0813a6dc8a7046"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:cdc8a402aaee9a798b50d8b827d7ecf75edc5fb35ea0f91f213ff927c15f4ff0"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6c3bd3cde54cafb87d74d8db50b909705c62b17c2099b8f2e25b461882e544ff"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:955e8513d07a283056b1396e9a57ceddbd272d9252c14f154d450d227606eb54"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:346f5343b9e3f00b8db8ba359350eb124b98c99efd0b408728ac6ebf38173958"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b9098e0049e88c6a24ff64545cdfc50807818ba6c1b739cae221bbbcbc58aad3"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:00bd361b903dc4bbf4eb165f24d1acbee754fce22ded24c3d56eec268658a5cf"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7b8b454bac16428b22560d0a1cf0a09875339cab69df61d7805bf48919415901"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:f1d072c2eb0ad60d4c183f3fb44ac6f73fb7a8f16a2694a91f988275cbf352f9"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:31a82d498054cac9f6d0b53d02bb85811185bcb477d4b60144f915f3b3126342"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6512cb89e334e4700febbffaaa52761b65b4f5a3cf33f960213d5656cea36a77"}, + {file = "kiwisolver-1.4.5-cp39-cp39-win32.whl", hash = "sha256:9db8ea4c388fdb0f780fe91346fd438657ea602d58348753d9fb265ce1bca67f"}, + {file = "kiwisolver-1.4.5-cp39-cp39-win_amd64.whl", hash = "sha256:59415f46a37f7f2efeec758353dd2eae1b07640d8ca0f0c42548ec4125492635"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:5c7b3b3a728dc6faf3fc372ef24f21d1e3cee2ac3e9596691d746e5a536de920"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:620ced262a86244e2be10a676b646f29c34537d0d9cc8eb26c08f53d98013390"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:378a214a1e3bbf5ac4a8708304318b4f890da88c9e6a07699c4ae7174c09a68d"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaf7be1207676ac608a50cd08f102f6742dbfc70e8d60c4db1c6897f62f71523"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:ba55dce0a9b8ff59495ddd050a0225d58bd0983d09f87cfe2b6aec4f2c1234e4"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:fd32ea360bcbb92d28933fc05ed09bffcb1704ba3fc7942e81db0fd4f81a7892"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5e7139af55d1688f8b960ee9ad5adafc4ac17c1c473fe07133ac092310d76544"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:dced8146011d2bc2e883f9bd68618b8247387f4bbec46d7392b3c3b032640126"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9bf3325c47b11b2e51bca0824ea217c7cd84491d8ac4eefd1e409705ef092bd"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:5794cf59533bc3f1b1c821f7206a3617999db9fbefc345360aafe2e067514929"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e368f200bbc2e4f905b8e71eb38b3c04333bddaa6a2464a6355487b02bb7fb09"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e5d706eba36b4c4d5bc6c6377bb6568098765e990cfc21ee16d13963fab7b3e7"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85267bd1aa8880a9c88a8cb71e18d3d64d2751a790e6ca6c27b8ccc724bcd5ad"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:210ef2c3a1f03272649aff1ef992df2e724748918c4bc2d5a90352849eb40bea"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:11d011a7574eb3b82bcc9c1a1d35c1d7075677fdd15de527d91b46bd35e935ee"}, + {file = "kiwisolver-1.4.5.tar.gz", hash = "sha256:e57e563a57fb22a142da34f38acc2fc1a5c864bc29ca1517a88abc963e60d6ec"}, +] + +[[package]] +name = "matplotlib" +version = "3.8.2" +description = "Python plotting package" +optional = false +python-versions = ">=3.9" +files = [ + {file = "matplotlib-3.8.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:09796f89fb71a0c0e1e2f4bdaf63fb2cefc84446bb963ecdeb40dfee7dfa98c7"}, + {file = "matplotlib-3.8.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6f9c6976748a25e8b9be51ea028df49b8e561eed7809146da7a47dbecebab367"}, + {file = "matplotlib-3.8.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b78e4f2cedf303869b782071b55fdde5987fda3038e9d09e58c91cc261b5ad18"}, + {file = "matplotlib-3.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e208f46cf6576a7624195aa047cb344a7f802e113bb1a06cfd4bee431de5e31"}, + {file = "matplotlib-3.8.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:46a569130ff53798ea5f50afce7406e91fdc471ca1e0e26ba976a8c734c9427a"}, + {file = "matplotlib-3.8.2-cp310-cp310-win_amd64.whl", hash = "sha256:830f00640c965c5b7f6bc32f0d4ce0c36dfe0379f7dd65b07a00c801713ec40a"}, + {file = "matplotlib-3.8.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d86593ccf546223eb75a39b44c32788e6f6440d13cfc4750c1c15d0fcb850b63"}, + {file = "matplotlib-3.8.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9a5430836811b7652991939012f43d2808a2db9b64ee240387e8c43e2e5578c8"}, + {file = "matplotlib-3.8.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9576723858a78751d5aacd2497b8aef29ffea6d1c95981505877f7ac28215c6"}, + {file = "matplotlib-3.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ba9cbd8ac6cf422f3102622b20f8552d601bf8837e49a3afed188d560152788"}, + {file = "matplotlib-3.8.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:03f9d160a29e0b65c0790bb07f4f45d6a181b1ac33eb1bb0dd225986450148f0"}, + {file = "matplotlib-3.8.2-cp311-cp311-win_amd64.whl", hash = "sha256:3773002da767f0a9323ba1a9b9b5d00d6257dbd2a93107233167cfb581f64717"}, + {file = "matplotlib-3.8.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:4c318c1e95e2f5926fba326f68177dee364aa791d6df022ceb91b8221bd0a627"}, + {file = "matplotlib-3.8.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:091275d18d942cf1ee9609c830a1bc36610607d8223b1b981c37d5c9fc3e46a4"}, + {file = "matplotlib-3.8.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b0f3b8ea0e99e233a4bcc44590f01604840d833c280ebb8fe5554fd3e6cfe8d"}, + {file = "matplotlib-3.8.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7b1704a530395aaf73912be741c04d181f82ca78084fbd80bc737be04848331"}, + {file = "matplotlib-3.8.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:533b0e3b0c6768eef8cbe4b583731ce25a91ab54a22f830db2b031e83cca9213"}, + {file = "matplotlib-3.8.2-cp312-cp312-win_amd64.whl", hash = "sha256:0f4fc5d72b75e2c18e55eb32292659cf731d9d5b312a6eb036506304f4675630"}, + {file = "matplotlib-3.8.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:deaed9ad4da0b1aea77fe0aa0cebb9ef611c70b3177be936a95e5d01fa05094f"}, + {file = "matplotlib-3.8.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:172f4d0fbac3383d39164c6caafd3255ce6fa58f08fc392513a0b1d3b89c4f89"}, + {file = "matplotlib-3.8.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7d36c2209d9136cd8e02fab1c0ddc185ce79bc914c45054a9f514e44c787917"}, + {file = "matplotlib-3.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5864bdd7da445e4e5e011b199bb67168cdad10b501750367c496420f2ad00843"}, + {file = "matplotlib-3.8.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ef8345b48e95cee45ff25192ed1f4857273117917a4dcd48e3905619bcd9c9b8"}, + {file = "matplotlib-3.8.2-cp39-cp39-win_amd64.whl", hash = "sha256:7c48d9e221b637c017232e3760ed30b4e8d5dfd081daf327e829bf2a72c731b4"}, + {file = "matplotlib-3.8.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:aa11b3c6928a1e496c1a79917d51d4cd5d04f8a2e75f21df4949eeefdf697f4b"}, + {file = "matplotlib-3.8.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d1095fecf99eeb7384dabad4bf44b965f929a5f6079654b681193edf7169ec20"}, + {file = "matplotlib-3.8.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:bddfb1db89bfaa855912261c805bd0e10218923cc262b9159a49c29a7a1c1afa"}, + {file = "matplotlib-3.8.2.tar.gz", hash = "sha256:01a978b871b881ee76017152f1f1a0cbf6bd5f7b8ff8c96df0df1bd57d8755a1"}, +] + +[package.dependencies] +contourpy = ">=1.0.1" +cycler = ">=0.10" +fonttools = ">=4.22.0" +kiwisolver = ">=1.3.1" +numpy = ">=1.21,<2" +packaging = ">=20.0" +pillow = ">=8" +pyparsing = ">=2.3.1" +python-dateutil = ">=2.7" + +[[package]] +name = "mccabe" +version = "0.7.0" +description = "McCabe checker, plugin for flake8" +optional = false +python-versions = ">=3.6" +files = [ + {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, + {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, +] + +[[package]] +name = "mplhep" +version = "0.3.31" +description = "Matplotlib styles for HEP" +optional = false +python-versions = ">=3.8" +files = [ + {file = "mplhep-0.3.31-py3-none-any.whl", hash = "sha256:60511b210051d389fbce47ecb10737f09d4c5ba1deb588366c440e536240b74c"}, + {file = "mplhep-0.3.31.tar.gz", hash = "sha256:699c1acdb0e58d19dc076a7ba83f790a6b34b90054f2d72252b5dc2a9b325533"}, +] + +[package.dependencies] +matplotlib = ">=3.4" +mplhep-data = "*" +numpy = ">=1.16.0" +packaging = "*" +uhi = ">=0.2.0" + +[package.extras] +all = ["black", "boost-histogram", "bumpversion", "flake8", "hist", "jupyter", "nteract-scrapbook (>=0.3,<1.0)", "papermill (>=1.0,<2.0)", "pre-commit", "pytest (>=6.0)", "pytest-mock", "pytest-mpl", "scikit-hep-testdata", "scipy (>=1.1.0)", "twine", "uproot", "uproot4"] +dev = ["black", "bumpversion", "flake8", "jupyter", "pre-commit", "twine"] +test = ["boost-histogram", "hist", "nteract-scrapbook (>=0.3,<1.0)", "papermill (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-mock", "pytest-mpl", "scikit-hep-testdata", "scipy (>=1.1.0)", "uproot", "uproot4"] + +[[package]] +name = "mplhep-data" +version = "0.0.3" +description = "Font (Data) sub-package for mplhep" +optional = false +python-versions = ">=3.7" +files = [ + {file = "mplhep_data-0.0.3-py3-none-any.whl", hash = "sha256:a1eba7727fab31902e6fcd113c8f4b12ff3fb0666781e7514f8b79093cdc1c65"}, + {file = "mplhep_data-0.0.3.tar.gz", hash = "sha256:b54d257f3f53c93a442cda7a6681ce267277e09173c0b41fd78820f78321772f"}, +] + +[package.extras] +dev = ["pytest (>=4.6)"] +test = ["pytest (>=4.6)"] + +[[package]] +name = "mypy" +version = "1.8.0" +description = "Optional static typing for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "mypy-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:485a8942f671120f76afffff70f259e1cd0f0cfe08f81c05d8816d958d4577d3"}, + {file = "mypy-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:df9824ac11deaf007443e7ed2a4a26bebff98d2bc43c6da21b2b64185da011c4"}, + {file = "mypy-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2afecd6354bbfb6e0160f4e4ad9ba6e4e003b767dd80d85516e71f2e955ab50d"}, + {file = "mypy-1.8.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8963b83d53ee733a6e4196954502b33567ad07dfd74851f32be18eb932fb1cb9"}, + {file = "mypy-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:e46f44b54ebddbeedbd3d5b289a893219065ef805d95094d16a0af6630f5d410"}, + {file = "mypy-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:855fe27b80375e5c5878492f0729540db47b186509c98dae341254c8f45f42ae"}, + {file = "mypy-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4c886c6cce2d070bd7df4ec4a05a13ee20c0aa60cb587e8d1265b6c03cf91da3"}, + {file = "mypy-1.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d19c413b3c07cbecf1f991e2221746b0d2a9410b59cb3f4fb9557f0365a1a817"}, + {file = "mypy-1.8.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9261ed810972061388918c83c3f5cd46079d875026ba97380f3e3978a72f503d"}, + {file = "mypy-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:51720c776d148bad2372ca21ca29256ed483aa9a4cdefefcef49006dff2a6835"}, + {file = "mypy-1.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:52825b01f5c4c1c4eb0db253ec09c7aa17e1a7304d247c48b6f3599ef40db8bd"}, + {file = "mypy-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f5ac9a4eeb1ec0f1ccdc6f326bcdb464de5f80eb07fb38b5ddd7b0de6bc61e55"}, + {file = "mypy-1.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afe3fe972c645b4632c563d3f3eff1cdca2fa058f730df2b93a35e3b0c538218"}, + {file = "mypy-1.8.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:42c6680d256ab35637ef88891c6bd02514ccb7e1122133ac96055ff458f93fc3"}, + {file = "mypy-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:720a5ca70e136b675af3af63db533c1c8c9181314d207568bbe79051f122669e"}, + {file = "mypy-1.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:028cf9f2cae89e202d7b6593cd98db6759379f17a319b5faf4f9978d7084cdc6"}, + {file = "mypy-1.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4e6d97288757e1ddba10dd9549ac27982e3e74a49d8d0179fc14d4365c7add66"}, + {file = "mypy-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f1478736fcebb90f97e40aff11a5f253af890c845ee0c850fe80aa060a267c6"}, + {file = "mypy-1.8.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42419861b43e6962a649068a61f4a4839205a3ef525b858377a960b9e2de6e0d"}, + {file = "mypy-1.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:2b5b6c721bd4aabaadead3a5e6fa85c11c6c795e0c81a7215776ef8afc66de02"}, + {file = "mypy-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5c1538c38584029352878a0466f03a8ee7547d7bd9f641f57a0f3017a7c905b8"}, + {file = "mypy-1.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ef4be7baf08a203170f29e89d79064463b7fc7a0908b9d0d5114e8009c3a259"}, + {file = "mypy-1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7178def594014aa6c35a8ff411cf37d682f428b3b5617ca79029d8ae72f5402b"}, + {file = "mypy-1.8.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ab3c84fa13c04aeeeabb2a7f67a25ef5d77ac9d6486ff33ded762ef353aa5592"}, + {file = "mypy-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:99b00bc72855812a60d253420d8a2eae839b0afa4938f09f4d2aa9bb4654263a"}, + {file = "mypy-1.8.0-py3-none-any.whl", hash = "sha256:538fd81bb5e430cc1381a443971c0475582ff9f434c16cd46d2c66763ce85d9d"}, + {file = "mypy-1.8.0.tar.gz", hash = "sha256:6ff8b244d7085a0b425b56d327b480c3b29cafbd2eff27316a004f9a7391ae07"}, +] + +[package.dependencies] +mypy-extensions = ">=1.0.0" +typing-extensions = ">=4.1.0" + +[package.extras] +dmypy = ["psutil (>=4.0)"] +install-types = ["pip"] +mypyc = ["setuptools (>=50)"] +reports = ["lxml"] + +[[package]] +name = "mypy-extensions" +version = "1.0.0" +description = "Type system extensions for programs checked with the mypy type checker." +optional = false +python-versions = ">=3.5" +files = [ + {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, + {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, +] + +[[package]] +name = "numpy" +version = "1.26.3" +description = "Fundamental package for array computing in Python" +optional = false +python-versions = ">=3.9" +files = [ + {file = "numpy-1.26.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:806dd64230dbbfaca8a27faa64e2f414bf1c6622ab78cc4264f7f5f028fee3bf"}, + {file = "numpy-1.26.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02f98011ba4ab17f46f80f7f8f1c291ee7d855fcef0a5a98db80767a468c85cd"}, + {file = "numpy-1.26.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d45b3ec2faed4baca41c76617fcdcfa4f684ff7a151ce6fc78ad3b6e85af0a6"}, + {file = "numpy-1.26.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bdd2b45bf079d9ad90377048e2747a0c82351989a2165821f0c96831b4a2a54b"}, + {file = "numpy-1.26.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:211ddd1e94817ed2d175b60b6374120244a4dd2287f4ece45d49228b4d529178"}, + {file = "numpy-1.26.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b1240f767f69d7c4c8a29adde2310b871153df9b26b5cb2b54a561ac85146485"}, + {file = "numpy-1.26.3-cp310-cp310-win32.whl", hash = "sha256:21a9484e75ad018974a2fdaa216524d64ed4212e418e0a551a2d83403b0531d3"}, + {file = "numpy-1.26.3-cp310-cp310-win_amd64.whl", hash = "sha256:9e1591f6ae98bcfac2a4bbf9221c0b92ab49762228f38287f6eeb5f3f55905ce"}, + {file = "numpy-1.26.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b831295e5472954104ecb46cd98c08b98b49c69fdb7040483aff799a755a7374"}, + {file = "numpy-1.26.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9e87562b91f68dd8b1c39149d0323b42e0082db7ddb8e934ab4c292094d575d6"}, + {file = "numpy-1.26.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c66d6fec467e8c0f975818c1796d25c53521124b7cfb760114be0abad53a0a2"}, + {file = "numpy-1.26.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f25e2811a9c932e43943a2615e65fc487a0b6b49218899e62e426e7f0a57eeda"}, + {file = "numpy-1.26.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:af36e0aa45e25c9f57bf684b1175e59ea05d9a7d3e8e87b7ae1a1da246f2767e"}, + {file = "numpy-1.26.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:51c7f1b344f302067b02e0f5b5d2daa9ed4a721cf49f070280ac202738ea7f00"}, + {file = "numpy-1.26.3-cp311-cp311-win32.whl", hash = "sha256:7ca4f24341df071877849eb2034948459ce3a07915c2734f1abb4018d9c49d7b"}, + {file = "numpy-1.26.3-cp311-cp311-win_amd64.whl", hash = "sha256:39763aee6dfdd4878032361b30b2b12593fb445ddb66bbac802e2113eb8a6ac4"}, + {file = "numpy-1.26.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:a7081fd19a6d573e1a05e600c82a1c421011db7935ed0d5c483e9dd96b99cf13"}, + {file = "numpy-1.26.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:12c70ac274b32bc00c7f61b515126c9205323703abb99cd41836e8125ea0043e"}, + {file = "numpy-1.26.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f784e13e598e9594750b2ef6729bcd5a47f6cfe4a12cca13def35e06d8163e3"}, + {file = "numpy-1.26.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f24750ef94d56ce6e33e4019a8a4d68cfdb1ef661a52cdaee628a56d2437419"}, + {file = "numpy-1.26.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:77810ef29e0fb1d289d225cabb9ee6cf4d11978a00bb99f7f8ec2132a84e0166"}, + {file = "numpy-1.26.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8ed07a90f5450d99dad60d3799f9c03c6566709bd53b497eb9ccad9a55867f36"}, + {file = "numpy-1.26.3-cp312-cp312-win32.whl", hash = "sha256:f73497e8c38295aaa4741bdfa4fda1a5aedda5473074369eca10626835445511"}, + {file = "numpy-1.26.3-cp312-cp312-win_amd64.whl", hash = "sha256:da4b0c6c699a0ad73c810736303f7fbae483bcb012e38d7eb06a5e3b432c981b"}, + {file = "numpy-1.26.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1666f634cb3c80ccbd77ec97bc17337718f56d6658acf5d3b906ca03e90ce87f"}, + {file = "numpy-1.26.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:18c3319a7d39b2c6a9e3bb75aab2304ab79a811ac0168a671a62e6346c29b03f"}, + {file = "numpy-1.26.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b7e807d6888da0db6e7e75838444d62495e2b588b99e90dd80c3459594e857b"}, + {file = "numpy-1.26.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4d362e17bcb0011738c2d83e0a65ea8ce627057b2fdda37678f4374a382a137"}, + {file = "numpy-1.26.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b8c275f0ae90069496068c714387b4a0eba5d531aace269559ff2b43655edd58"}, + {file = "numpy-1.26.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cc0743f0302b94f397a4a65a660d4cd24267439eb16493fb3caad2e4389bccbb"}, + {file = "numpy-1.26.3-cp39-cp39-win32.whl", hash = "sha256:9bc6d1a7f8cedd519c4b7b1156d98e051b726bf160715b769106661d567b3f03"}, + {file = "numpy-1.26.3-cp39-cp39-win_amd64.whl", hash = "sha256:867e3644e208c8922a3be26fc6bbf112a035f50f0a86497f98f228c50c607bb2"}, + {file = "numpy-1.26.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:3c67423b3703f8fbd90f5adaa37f85b5794d3366948efe9a5190a5f3a83fc34e"}, + {file = "numpy-1.26.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46f47ee566d98849323f01b349d58f2557f02167ee301e5e28809a8c0e27a2d0"}, + {file = "numpy-1.26.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a8474703bffc65ca15853d5fd4d06b18138ae90c17c8d12169968e998e448bb5"}, + {file = "numpy-1.26.3.tar.gz", hash = "sha256:697df43e2b6310ecc9d95f05d5ef20eacc09c7c4ecc9da3f235d39e71b7da1e4"}, +] + +[[package]] +name = "packaging" +version = "23.2" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.7" +files = [ + {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, + {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, +] + +[[package]] +name = "pandas" +version = "2.1.4" +description = "Powerful data structures for data analysis, time series, and statistics" +optional = false +python-versions = ">=3.9" +files = [ + {file = "pandas-2.1.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bdec823dc6ec53f7a6339a0e34c68b144a7a1fd28d80c260534c39c62c5bf8c9"}, + {file = "pandas-2.1.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:294d96cfaf28d688f30c918a765ea2ae2e0e71d3536754f4b6de0ea4a496d034"}, + {file = "pandas-2.1.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b728fb8deba8905b319f96447a27033969f3ea1fea09d07d296c9030ab2ed1d"}, + {file = "pandas-2.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00028e6737c594feac3c2df15636d73ace46b8314d236100b57ed7e4b9ebe8d9"}, + {file = "pandas-2.1.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:426dc0f1b187523c4db06f96fb5c8d1a845e259c99bda74f7de97bd8a3bb3139"}, + {file = "pandas-2.1.4-cp310-cp310-win_amd64.whl", hash = "sha256:f237e6ca6421265643608813ce9793610ad09b40154a3344a088159590469e46"}, + {file = "pandas-2.1.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b7d852d16c270e4331f6f59b3e9aa23f935f5c4b0ed2d0bc77637a8890a5d092"}, + {file = "pandas-2.1.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bd7d5f2f54f78164b3d7a40f33bf79a74cdee72c31affec86bfcabe7e0789821"}, + {file = "pandas-2.1.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0aa6e92e639da0d6e2017d9ccff563222f4eb31e4b2c3cf32a2a392fc3103c0d"}, + {file = "pandas-2.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d797591b6846b9db79e65dc2d0d48e61f7db8d10b2a9480b4e3faaddc421a171"}, + {file = "pandas-2.1.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d2d3e7b00f703aea3945995ee63375c61b2e6aa5aa7871c5d622870e5e137623"}, + {file = "pandas-2.1.4-cp311-cp311-win_amd64.whl", hash = "sha256:dc9bf7ade01143cddc0074aa6995edd05323974e6e40d9dbde081021ded8510e"}, + {file = "pandas-2.1.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:482d5076e1791777e1571f2e2d789e940dedd927325cc3cb6d0800c6304082f6"}, + {file = "pandas-2.1.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8a706cfe7955c4ca59af8c7a0517370eafbd98593155b48f10f9811da440248b"}, + {file = "pandas-2.1.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b0513a132a15977b4a5b89aabd304647919bc2169eac4c8536afb29c07c23540"}, + {file = "pandas-2.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9f17f2b6fc076b2a0078862547595d66244db0f41bf79fc5f64a5c4d635bead"}, + {file = "pandas-2.1.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:45d63d2a9b1b37fa6c84a68ba2422dc9ed018bdaa668c7f47566a01188ceeec1"}, + {file = "pandas-2.1.4-cp312-cp312-win_amd64.whl", hash = "sha256:f69b0c9bb174a2342818d3e2778584e18c740d56857fc5cdb944ec8bbe4082cf"}, + {file = "pandas-2.1.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3f06bda01a143020bad20f7a85dd5f4a1600112145f126bc9e3e42077c24ef34"}, + {file = "pandas-2.1.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ab5796839eb1fd62a39eec2916d3e979ec3130509930fea17fe6f81e18108f6a"}, + {file = "pandas-2.1.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edbaf9e8d3a63a9276d707b4d25930a262341bca9874fcb22eff5e3da5394732"}, + {file = "pandas-2.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ebfd771110b50055712b3b711b51bee5d50135429364d0498e1213a7adc2be8"}, + {file = "pandas-2.1.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8ea107e0be2aba1da619cc6ba3f999b2bfc9669a83554b1904ce3dd9507f0860"}, + {file = "pandas-2.1.4-cp39-cp39-win_amd64.whl", hash = "sha256:d65148b14788b3758daf57bf42725caa536575da2b64df9964c563b015230984"}, + {file = "pandas-2.1.4.tar.gz", hash = "sha256:fcb68203c833cc735321512e13861358079a96c174a61f5116a1de89c58c0ef7"}, +] + +[package.dependencies] +numpy = {version = ">=1.23.2,<2", markers = "python_version == \"3.11\""} +python-dateutil = ">=2.8.2" +pytz = ">=2020.1" +tzdata = ">=2022.1" + +[package.extras] +all = ["PyQt5 (>=5.15.6)", "SQLAlchemy (>=1.4.36)", "beautifulsoup4 (>=4.11.1)", "bottleneck (>=1.3.4)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=0.8.1)", "fsspec (>=2022.05.0)", "gcsfs (>=2022.05.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.8.0)", "matplotlib (>=3.6.1)", "numba (>=0.55.2)", "numexpr (>=2.8.0)", "odfpy (>=1.4.1)", "openpyxl (>=3.0.10)", "pandas-gbq (>=0.17.5)", "psycopg2 (>=2.9.3)", "pyarrow (>=7.0.0)", "pymysql (>=1.0.2)", "pyreadstat (>=1.1.5)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)", "pyxlsb (>=1.0.9)", "qtpy (>=2.2.0)", "s3fs (>=2022.05.0)", "scipy (>=1.8.1)", "tables (>=3.7.0)", "tabulate (>=0.8.10)", "xarray (>=2022.03.0)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.3)", "zstandard (>=0.17.0)"] +aws = ["s3fs (>=2022.05.0)"] +clipboard = ["PyQt5 (>=5.15.6)", "qtpy (>=2.2.0)"] +compression = ["zstandard (>=0.17.0)"] +computation = ["scipy (>=1.8.1)", "xarray (>=2022.03.0)"] +consortium-standard = ["dataframe-api-compat (>=0.1.7)"] +excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.0.10)", "pyxlsb (>=1.0.9)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.3)"] +feather = ["pyarrow (>=7.0.0)"] +fss = ["fsspec (>=2022.05.0)"] +gcp = ["gcsfs (>=2022.05.0)", "pandas-gbq (>=0.17.5)"] +hdf5 = ["tables (>=3.7.0)"] +html = ["beautifulsoup4 (>=4.11.1)", "html5lib (>=1.1)", "lxml (>=4.8.0)"] +mysql = ["SQLAlchemy (>=1.4.36)", "pymysql (>=1.0.2)"] +output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.8.10)"] +parquet = ["pyarrow (>=7.0.0)"] +performance = ["bottleneck (>=1.3.4)", "numba (>=0.55.2)", "numexpr (>=2.8.0)"] +plot = ["matplotlib (>=3.6.1)"] +postgresql = ["SQLAlchemy (>=1.4.36)", "psycopg2 (>=2.9.3)"] +spss = ["pyreadstat (>=1.1.5)"] +sql-other = ["SQLAlchemy (>=1.4.36)"] +test = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)"] +xml = ["lxml (>=4.8.0)"] + +[[package]] +name = "pathspec" +version = "0.12.1" +description = "Utility library for gitignore style pattern matching of file paths." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, + {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, +] + +[[package]] +name = "pillow" +version = "10.2.0" +description = "Python Imaging Library (Fork)" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pillow-10.2.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:7823bdd049099efa16e4246bdf15e5a13dbb18a51b68fa06d6c1d4d8b99a796e"}, + {file = "pillow-10.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:83b2021f2ade7d1ed556bc50a399127d7fb245e725aa0113ebd05cfe88aaf588"}, + {file = "pillow-10.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fad5ff2f13d69b7e74ce5b4ecd12cc0ec530fcee76356cac6742785ff71c452"}, + {file = "pillow-10.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da2b52b37dad6d9ec64e653637a096905b258d2fc2b984c41ae7d08b938a67e4"}, + {file = "pillow-10.2.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:47c0995fc4e7f79b5cfcab1fc437ff2890b770440f7696a3ba065ee0fd496563"}, + {file = "pillow-10.2.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:322bdf3c9b556e9ffb18f93462e5f749d3444ce081290352c6070d014c93feb2"}, + {file = "pillow-10.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:51f1a1bffc50e2e9492e87d8e09a17c5eea8409cda8d3f277eb6edc82813c17c"}, + {file = "pillow-10.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:69ffdd6120a4737710a9eee73e1d2e37db89b620f702754b8f6e62594471dee0"}, + {file = "pillow-10.2.0-cp310-cp310-win32.whl", hash = "sha256:c6dafac9e0f2b3c78df97e79af707cdc5ef8e88208d686a4847bab8266870023"}, + {file = "pillow-10.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:aebb6044806f2e16ecc07b2a2637ee1ef67a11840a66752751714a0d924adf72"}, + {file = "pillow-10.2.0-cp310-cp310-win_arm64.whl", hash = "sha256:7049e301399273a0136ff39b84c3678e314f2158f50f517bc50285fb5ec847ad"}, + {file = "pillow-10.2.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:35bb52c37f256f662abdfa49d2dfa6ce5d93281d323a9af377a120e89a9eafb5"}, + {file = "pillow-10.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9c23f307202661071d94b5e384e1e1dc7dfb972a28a2310e4ee16103e66ddb67"}, + {file = "pillow-10.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:773efe0603db30c281521a7c0214cad7836c03b8ccff897beae9b47c0b657d61"}, + {file = "pillow-10.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11fa2e5984b949b0dd6d7a94d967743d87c577ff0b83392f17cb3990d0d2fd6e"}, + {file = "pillow-10.2.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:716d30ed977be8b37d3ef185fecb9e5a1d62d110dfbdcd1e2a122ab46fddb03f"}, + {file = "pillow-10.2.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:a086c2af425c5f62a65e12fbf385f7c9fcb8f107d0849dba5839461a129cf311"}, + {file = "pillow-10.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c8de2789052ed501dd829e9cae8d3dcce7acb4777ea4a479c14521c942d395b1"}, + {file = "pillow-10.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:609448742444d9290fd687940ac0b57fb35e6fd92bdb65386e08e99af60bf757"}, + {file = "pillow-10.2.0-cp311-cp311-win32.whl", hash = "sha256:823ef7a27cf86df6597fa0671066c1b596f69eba53efa3d1e1cb8b30f3533068"}, + {file = "pillow-10.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:1da3b2703afd040cf65ec97efea81cfba59cdbed9c11d8efc5ab09df9509fc56"}, + {file = "pillow-10.2.0-cp311-cp311-win_arm64.whl", hash = "sha256:edca80cbfb2b68d7b56930b84a0e45ae1694aeba0541f798e908a49d66b837f1"}, + {file = "pillow-10.2.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:1b5e1b74d1bd1b78bc3477528919414874748dd363e6272efd5abf7654e68bef"}, + {file = "pillow-10.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0eae2073305f451d8ecacb5474997c08569fb4eb4ac231ffa4ad7d342fdc25ac"}, + {file = "pillow-10.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b7c2286c23cd350b80d2fc9d424fc797575fb16f854b831d16fd47ceec078f2c"}, + {file = "pillow-10.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e23412b5c41e58cec602f1135c57dfcf15482013ce6e5f093a86db69646a5aa"}, + {file = "pillow-10.2.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:52a50aa3fb3acb9cf7213573ef55d31d6eca37f5709c69e6858fe3bc04a5c2a2"}, + {file = "pillow-10.2.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:127cee571038f252a552760076407f9cff79761c3d436a12af6000cd182a9d04"}, + {file = "pillow-10.2.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:8d12251f02d69d8310b046e82572ed486685c38f02176bd08baf216746eb947f"}, + {file = "pillow-10.2.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:54f1852cd531aa981bc0965b7d609f5f6cc8ce8c41b1139f6ed6b3c54ab82bfb"}, + {file = "pillow-10.2.0-cp312-cp312-win32.whl", hash = "sha256:257d8788df5ca62c980314053197f4d46eefedf4e6175bc9412f14412ec4ea2f"}, + {file = "pillow-10.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:154e939c5f0053a383de4fd3d3da48d9427a7e985f58af8e94d0b3c9fcfcf4f9"}, + {file = "pillow-10.2.0-cp312-cp312-win_arm64.whl", hash = "sha256:f379abd2f1e3dddb2b61bc67977a6b5a0a3f7485538bcc6f39ec76163891ee48"}, + {file = "pillow-10.2.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:8373c6c251f7ef8bda6675dd6d2b3a0fcc31edf1201266b5cf608b62a37407f9"}, + {file = "pillow-10.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:870ea1ada0899fd0b79643990809323b389d4d1d46c192f97342eeb6ee0b8483"}, + {file = "pillow-10.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4b6b1e20608493548b1f32bce8cca185bf0480983890403d3b8753e44077129"}, + {file = "pillow-10.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3031709084b6e7852d00479fd1d310b07d0ba82765f973b543c8af5061cf990e"}, + {file = "pillow-10.2.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:3ff074fc97dd4e80543a3e91f69d58889baf2002b6be64347ea8cf5533188213"}, + {file = "pillow-10.2.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:cb4c38abeef13c61d6916f264d4845fab99d7b711be96c326b84df9e3e0ff62d"}, + {file = "pillow-10.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b1b3020d90c2d8e1dae29cf3ce54f8094f7938460fb5ce8bc5c01450b01fbaf6"}, + {file = "pillow-10.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:170aeb00224ab3dc54230c797f8404507240dd868cf52066f66a41b33169bdbe"}, + {file = "pillow-10.2.0-cp38-cp38-win32.whl", hash = "sha256:c4225f5220f46b2fde568c74fca27ae9771536c2e29d7c04f4fb62c83275ac4e"}, + {file = "pillow-10.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:0689b5a8c5288bc0504d9fcee48f61a6a586b9b98514d7d29b840143d6734f39"}, + {file = "pillow-10.2.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:b792a349405fbc0163190fde0dc7b3fef3c9268292586cf5645598b48e63dc67"}, + {file = "pillow-10.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c570f24be1e468e3f0ce7ef56a89a60f0e05b30a3669a459e419c6eac2c35364"}, + {file = "pillow-10.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8ecd059fdaf60c1963c58ceb8997b32e9dc1b911f5da5307aab614f1ce5c2fb"}, + {file = "pillow-10.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c365fd1703040de1ec284b176d6af5abe21b427cb3a5ff68e0759e1e313a5e7e"}, + {file = "pillow-10.2.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:70c61d4c475835a19b3a5aa42492409878bbca7438554a1f89d20d58a7c75c01"}, + {file = "pillow-10.2.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:b6f491cdf80ae540738859d9766783e3b3c8e5bd37f5dfa0b76abdecc5081f13"}, + {file = "pillow-10.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9d189550615b4948f45252d7f005e53c2040cea1af5b60d6f79491a6e147eef7"}, + {file = "pillow-10.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:49d9ba1ed0ef3e061088cd1e7538a0759aab559e2e0a80a36f9fd9d8c0c21591"}, + {file = "pillow-10.2.0-cp39-cp39-win32.whl", hash = "sha256:babf5acfede515f176833ed6028754cbcd0d206f7f614ea3447d67c33be12516"}, + {file = "pillow-10.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:0304004f8067386b477d20a518b50f3fa658a28d44e4116970abfcd94fac34a8"}, + {file = "pillow-10.2.0-cp39-cp39-win_arm64.whl", hash = "sha256:0fb3e7fc88a14eacd303e90481ad983fd5b69c761e9e6ef94c983f91025da869"}, + {file = "pillow-10.2.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:322209c642aabdd6207517e9739c704dc9f9db943015535783239022002f054a"}, + {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3eedd52442c0a5ff4f887fab0c1c0bb164d8635b32c894bc1faf4c618dd89df2"}, + {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cb28c753fd5eb3dd859b4ee95de66cc62af91bcff5db5f2571d32a520baf1f04"}, + {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:33870dc4653c5017bf4c8873e5488d8f8d5f8935e2f1fb9a2208c47cdd66efd2"}, + {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3c31822339516fb3c82d03f30e22b1d038da87ef27b6a78c9549888f8ceda39a"}, + {file = "pillow-10.2.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a2b56ba36e05f973d450582fb015594aaa78834fefe8dfb8fcd79b93e64ba4c6"}, + {file = "pillow-10.2.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:d8e6aeb9201e655354b3ad049cb77d19813ad4ece0df1249d3c793de3774f8c7"}, + {file = "pillow-10.2.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:2247178effb34a77c11c0e8ac355c7a741ceca0a732b27bf11e747bbc950722f"}, + {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15587643b9e5eb26c48e49a7b33659790d28f190fc514a322d55da2fb5c2950e"}, + {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753cd8f2086b2b80180d9b3010dd4ed147efc167c90d3bf593fe2af21265e5a5"}, + {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:7c8f97e8e7a9009bcacbe3766a36175056c12f9a44e6e6f2d5caad06dcfbf03b"}, + {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:d1b35bcd6c5543b9cb547dee3150c93008f8dd0f1fef78fc0cd2b141c5baf58a"}, + {file = "pillow-10.2.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:fe4c15f6c9285dc54ce6553a3ce908ed37c8f3825b5a51a15c91442bb955b868"}, + {file = "pillow-10.2.0.tar.gz", hash = "sha256:e87f0b2c78157e12d7686b27d63c070fd65d994e8ddae6f328e0dcf4a0cd007e"}, +] + +[package.extras] +docs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-removed-in", "sphinxext-opengraph"] +fpx = ["olefile"] +mic = ["olefile"] +tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] +typing = ["typing-extensions"] +xmp = ["defusedxml"] + +[[package]] +name = "platformdirs" +version = "4.1.0" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +optional = false +python-versions = ">=3.8" +files = [ + {file = "platformdirs-4.1.0-py3-none-any.whl", hash = "sha256:11c8f37bcca40db96d8144522d925583bdb7a31f7b0e37e3ed4318400a8e2380"}, + {file = "platformdirs-4.1.0.tar.gz", hash = "sha256:906d548203468492d432bcb294d4bc2fff751bf84971fbb2c10918cc206ee420"}, +] + +[package.extras] +docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"] + +[[package]] +name = "pluggy" +version = "1.3.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pluggy-1.3.0-py3-none-any.whl", hash = "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7"}, + {file = "pluggy-1.3.0.tar.gz", hash = "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12"}, +] + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "progress" +version = "1.6" +description = "Easy to use progress bars" +optional = false +python-versions = "*" +files = [ + {file = "progress-1.6.tar.gz", hash = "sha256:c9c86e98b5c03fa1fe11e3b67c1feda4788b8d0fe7336c2ff7d5644ccfba34cd"}, +] + +[[package]] +name = "pyarrow" +version = "14.0.2" +description = "Python library for Apache Arrow" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pyarrow-14.0.2-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:ba9fe808596c5dbd08b3aeffe901e5f81095baaa28e7d5118e01354c64f22807"}, + {file = "pyarrow-14.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:22a768987a16bb46220cef490c56c671993fbee8fd0475febac0b3e16b00a10e"}, + {file = "pyarrow-14.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2dbba05e98f247f17e64303eb876f4a80fcd32f73c7e9ad975a83834d81f3fda"}, + {file = "pyarrow-14.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a898d134d00b1eca04998e9d286e19653f9d0fcb99587310cd10270907452a6b"}, + {file = "pyarrow-14.0.2-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:87e879323f256cb04267bb365add7208f302df942eb943c93a9dfeb8f44840b1"}, + {file = "pyarrow-14.0.2-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:76fc257559404ea5f1306ea9a3ff0541bf996ff3f7b9209fc517b5e83811fa8e"}, + {file = "pyarrow-14.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:b0c4a18e00f3a32398a7f31da47fefcd7a927545b396e1f15d0c85c2f2c778cd"}, + {file = "pyarrow-14.0.2-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:87482af32e5a0c0cce2d12eb3c039dd1d853bd905b04f3f953f147c7a196915b"}, + {file = "pyarrow-14.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:059bd8f12a70519e46cd64e1ba40e97eae55e0cbe1695edd95384653d7626b23"}, + {file = "pyarrow-14.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f16111f9ab27e60b391c5f6d197510e3ad6654e73857b4e394861fc79c37200"}, + {file = "pyarrow-14.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06ff1264fe4448e8d02073f5ce45a9f934c0f3db0a04460d0b01ff28befc3696"}, + {file = "pyarrow-14.0.2-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:6dd4f4b472ccf4042f1eab77e6c8bce574543f54d2135c7e396f413046397d5a"}, + {file = "pyarrow-14.0.2-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:32356bfb58b36059773f49e4e214996888eeea3a08893e7dbde44753799b2a02"}, + {file = "pyarrow-14.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:52809ee69d4dbf2241c0e4366d949ba035cbcf48409bf404f071f624ed313a2b"}, + {file = "pyarrow-14.0.2-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:c87824a5ac52be210d32906c715f4ed7053d0180c1060ae3ff9b7e560f53f944"}, + {file = "pyarrow-14.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a25eb2421a58e861f6ca91f43339d215476f4fe159eca603c55950c14f378cc5"}, + {file = "pyarrow-14.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c1da70d668af5620b8ba0a23f229030a4cd6c5f24a616a146f30d2386fec422"}, + {file = "pyarrow-14.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2cc61593c8e66194c7cdfae594503e91b926a228fba40b5cf25cc593563bcd07"}, + {file = "pyarrow-14.0.2-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:78ea56f62fb7c0ae8ecb9afdd7893e3a7dbeb0b04106f5c08dbb23f9c0157591"}, + {file = "pyarrow-14.0.2-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:37c233ddbce0c67a76c0985612fef27c0c92aef9413cf5aa56952f359fcb7379"}, + {file = "pyarrow-14.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:e4b123ad0f6add92de898214d404e488167b87b5dd86e9a434126bc2b7a5578d"}, + {file = "pyarrow-14.0.2-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:e354fba8490de258be7687f341bc04aba181fc8aa1f71e4584f9890d9cb2dec2"}, + {file = "pyarrow-14.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:20e003a23a13da963f43e2b432483fdd8c38dc8882cd145f09f21792e1cf22a1"}, + {file = "pyarrow-14.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc0de7575e841f1595ac07e5bc631084fd06ca8b03c0f2ecece733d23cd5102a"}, + {file = "pyarrow-14.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66e986dc859712acb0bd45601229021f3ffcdfc49044b64c6d071aaf4fa49e98"}, + {file = "pyarrow-14.0.2-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:f7d029f20ef56673a9730766023459ece397a05001f4e4d13805111d7c2108c0"}, + {file = "pyarrow-14.0.2-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:209bac546942b0d8edc8debda248364f7f668e4aad4741bae58e67d40e5fcf75"}, + {file = "pyarrow-14.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:1e6987c5274fb87d66bb36816afb6f65707546b3c45c44c28e3c4133c010a881"}, + {file = "pyarrow-14.0.2-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:a01d0052d2a294a5f56cc1862933014e696aa08cc7b620e8c0cce5a5d362e976"}, + {file = "pyarrow-14.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a51fee3a7db4d37f8cda3ea96f32530620d43b0489d169b285d774da48ca9785"}, + {file = "pyarrow-14.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64df2bf1ef2ef14cee531e2dfe03dd924017650ffaa6f9513d7a1bb291e59c15"}, + {file = "pyarrow-14.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c0fa3bfdb0305ffe09810f9d3e2e50a2787e3a07063001dcd7adae0cee3601a"}, + {file = "pyarrow-14.0.2-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:c65bf4fd06584f058420238bc47a316e80dda01ec0dfb3044594128a6c2db794"}, + {file = "pyarrow-14.0.2-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:63ac901baec9369d6aae1cbe6cca11178fb018a8d45068aaf5bb54f94804a866"}, + {file = "pyarrow-14.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:75ee0efe7a87a687ae303d63037d08a48ef9ea0127064df18267252cfe2e9541"}, + {file = "pyarrow-14.0.2.tar.gz", hash = "sha256:36cef6ba12b499d864d1def3e990f97949e0b79400d08b7cf74504ffbd3eb025"}, +] + +[package.dependencies] +numpy = ">=1.16.6" + +[[package]] +name = "pycodestyle" +version = "2.11.1" +description = "Python style guide checker" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pycodestyle-2.11.1-py2.py3-none-any.whl", hash = "sha256:44fe31000b2d866f2e41841b18528a505fbd7fef9017b04eff4e2648a0fadc67"}, + {file = "pycodestyle-2.11.1.tar.gz", hash = "sha256:41ba0e7afc9752dfb53ced5489e89f8186be00e599e712660695b7a75ff2663f"}, +] + +[[package]] +name = "pyflakes" +version = "3.2.0" +description = "passive checker of Python programs" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pyflakes-3.2.0-py2.py3-none-any.whl", hash = "sha256:84b5be138a2dfbb40689ca07e2152deb896a65c3a3e24c251c5c62489568074a"}, + {file = "pyflakes-3.2.0.tar.gz", hash = "sha256:1c61603ff154621fb2a9172037d84dca3500def8c8b630657d1701f026f8af3f"}, +] + +[[package]] +name = "pyparsing" +version = "3.1.1" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" +optional = false +python-versions = ">=3.6.8" +files = [ + {file = "pyparsing-3.1.1-py3-none-any.whl", hash = "sha256:32c7c0b711493c72ff18a981d24f28aaf9c1fb7ed5e9667c9e84e3db623bdbfb"}, + {file = "pyparsing-3.1.1.tar.gz", hash = "sha256:ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db"}, +] + +[package.extras] +diagrams = ["jinja2", "railroad-diagrams"] + +[[package]] +name = "pytest" +version = "7.4.3" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-7.4.3-py3-none-any.whl", hash = "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac"}, + {file = "pytest-7.4.3.tar.gz", hash = "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" + +[package.extras] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + +[[package]] +name = "python-dateutil" +version = "2.8.2" +description = "Extensions to the standard Python datetime module" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +files = [ + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, +] + +[package.dependencies] +six = ">=1.5" + +[[package]] +name = "pytz" +version = "2023.3.post1" +description = "World timezone definitions, modern and historical" +optional = false +python-versions = "*" +files = [ + {file = "pytz-2023.3.post1-py2.py3-none-any.whl", hash = "sha256:ce42d816b81b68506614c11e8937d3aa9e41007ceb50bfdcb0749b921bf646c7"}, + {file = "pytz-2023.3.post1.tar.gz", hash = "sha256:7b4fddbeb94a1eba4b557da24f19fdf9db575192544270a9101d8509f9f43d7b"}, +] + +[[package]] +name = "pyyaml" +version = "6.0.1" +description = "YAML parser and emitter for Python" +optional = false +python-versions = ">=3.6" +files = [ + {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, + {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, + {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, + {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, + {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, + {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, + {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, + {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, + {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, + {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, + {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, + {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, + {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, + {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, +] + +[[package]] +name = "scipy" +version = "1.10.1" +description = "Fundamental algorithms for scientific computing in Python" +optional = false +python-versions = "<3.12,>=3.8" +files = [ + {file = "scipy-1.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e7354fd7527a4b0377ce55f286805b34e8c54b91be865bac273f527e1b839019"}, + {file = "scipy-1.10.1-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:4b3f429188c66603a1a5c549fb414e4d3bdc2a24792e061ffbd607d3d75fd84e"}, + {file = "scipy-1.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1553b5dcddd64ba9a0d95355e63fe6c3fc303a8fd77c7bc91e77d61363f7433f"}, + {file = "scipy-1.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c0ff64b06b10e35215abce517252b375e580a6125fd5fdf6421b98efbefb2d2"}, + {file = "scipy-1.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:fae8a7b898c42dffe3f7361c40d5952b6bf32d10c4569098d276b4c547905ee1"}, + {file = "scipy-1.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0f1564ea217e82c1bbe75ddf7285ba0709ecd503f048cb1236ae9995f64217bd"}, + {file = "scipy-1.10.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:d925fa1c81b772882aa55bcc10bf88324dadb66ff85d548c71515f6689c6dac5"}, + {file = "scipy-1.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaea0a6be54462ec027de54fca511540980d1e9eea68b2d5c1dbfe084797be35"}, + {file = "scipy-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15a35c4242ec5f292c3dd364a7c71a61be87a3d4ddcc693372813c0b73c9af1d"}, + {file = "scipy-1.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:43b8e0bcb877faf0abfb613d51026cd5cc78918e9530e375727bf0625c82788f"}, + {file = "scipy-1.10.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5678f88c68ea866ed9ebe3a989091088553ba12c6090244fdae3e467b1139c35"}, + {file = "scipy-1.10.1-cp38-cp38-macosx_12_0_arm64.whl", hash = "sha256:39becb03541f9e58243f4197584286e339029e8908c46f7221abeea4b749fa88"}, + {file = "scipy-1.10.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bce5869c8d68cf383ce240e44c1d9ae7c06078a9396df68ce88a1230f93a30c1"}, + {file = "scipy-1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07c3457ce0b3ad5124f98a86533106b643dd811dd61b548e78cf4c8786652f6f"}, + {file = "scipy-1.10.1-cp38-cp38-win_amd64.whl", hash = "sha256:049a8bbf0ad95277ffba9b3b7d23e5369cc39e66406d60422c8cfef40ccc8415"}, + {file = "scipy-1.10.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cd9f1027ff30d90618914a64ca9b1a77a431159df0e2a195d8a9e8a04c78abf9"}, + {file = "scipy-1.10.1-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:79c8e5a6c6ffaf3a2262ef1be1e108a035cf4f05c14df56057b64acc5bebffb6"}, + {file = "scipy-1.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51af417a000d2dbe1ec6c372dfe688e041a7084da4fdd350aeb139bd3fb55353"}, + {file = "scipy-1.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1b4735d6c28aad3cdcf52117e0e91d6b39acd4272f3f5cd9907c24ee931ad601"}, + {file = "scipy-1.10.1-cp39-cp39-win_amd64.whl", hash = "sha256:7ff7f37b1bf4417baca958d254e8e2875d0cc23aaadbe65b3d5b3077b0eb23ea"}, + {file = "scipy-1.10.1.tar.gz", hash = "sha256:2cf9dfb80a7b4589ba4c40ce7588986d6d5cebc5457cad2c2880f6bc2d42f3a5"}, +] + +[package.dependencies] +numpy = ">=1.19.5,<1.27.0" + +[package.extras] +dev = ["click", "doit (>=0.36.0)", "flake8", "mypy", "pycodestyle", "pydevtool", "rich-click", "typing_extensions"] +doc = ["matplotlib (>2)", "numpydoc", "pydata-sphinx-theme (==0.9.0)", "sphinx (!=4.1.0)", "sphinx-design (>=0.2.0)"] +test = ["asv", "gmpy2", "mpmath", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] + +[[package]] +name = "typing-extensions" +version = "4.9.0" +description = "Backported and Experimental Type Hints for Python 3.8+" +optional = false +python-versions = ">=3.8" +files = [ + {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, + {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, +] + +[[package]] +name = "tzdata" +version = "2023.4" +description = "Provider of IANA time zone data" +optional = false +python-versions = ">=2" +files = [ + {file = "tzdata-2023.4-py2.py3-none-any.whl", hash = "sha256:aa3ace4329eeacda5b7beb7ea08ece826c28d761cda36e747cfbf97996d39bf3"}, + {file = "tzdata-2023.4.tar.gz", hash = "sha256:dd54c94f294765522c77399649b4fefd95522479a664a0cec87f41bebc6148c9"}, +] + +[[package]] +name = "uhi" +version = "0.4.0" +description = "Unified Histogram Interface: tools to help library authors work with histograms" +optional = false +python-versions = ">=3.7" +files = [ + {file = "uhi-0.4.0-py3-none-any.whl", hash = "sha256:c7e82826314c66b8e7fee7869b75eb038f500b034f5371ef928def41c8db70bc"}, + {file = "uhi-0.4.0.tar.gz", hash = "sha256:0dcb6b19775087d38a31ee388cb2c70f2ecfe04c4ffe2ca63223410cae5beefa"}, +] + +[package.dependencies] +numpy = ">=1.13.3" + +[package.extras] +docs = ["furo", "myst-parser", "sphinx (>=4.0)", "sphinx-copybutton (>=0.3.1)", "sphinx-github-changelog"] +test = ["boost-histogram (>=1.0)", "importlib-metadata (>=1.0)", "pytest (>=6)"] + +[[package]] +name = "uproot" +version = "5.0.4" +description = "ROOT I/O in pure Python and NumPy." +optional = false +python-versions = ">=3.7" +files = [ + {file = "uproot-5.0.4-py3-none-any.whl", hash = "sha256:5a4a526fbec5d5bb3c439dcee0876bc689d42a36627a4a89105924afc3b3ec24"}, + {file = "uproot-5.0.4.tar.gz", hash = "sha256:c4ea1af198e3292a4649e3fe789d11b038c1ed57c10f167fc3f52100300c2eea"}, +] + +[package.dependencies] +awkward = ">=2.0.0" +numpy = "*" +packaging = "*" + +[package.extras] +dev = ["awkward (>=2.0.0)", "awkward-pandas", "boost-histogram (>=0.13)", "dask-awkward (>=2022.12a3)", "dask[array]", "hist (>=1.2)", "pandas"] +test = ["awkward (>=2.0.0)", "lz4", "pytest (>=6)", "pytest-rerunfailures", "pytest-timeout", "requests", "scikit-hep-testdata", "xxhash"] + +[[package]] +name = "vector" +version = "1.1.1.post1" +description = "Vector classes and utilities" +optional = false +python-versions = ">=3.8" +files = [ + {file = "vector-1.1.1.post1-py3-none-any.whl", hash = "sha256:f7683f9fb14be481ea9b562180fbc4cfe09e61168511e05646c2047f4f458282"}, + {file = "vector-1.1.1.post1.tar.gz", hash = "sha256:7a55ae549816e5fca0e52fab8cc66d4b0e4bb3b7753933e85b4167657940372b"}, +] + +[package.dependencies] +numpy = ">=1.13.3" +packaging = ">=19" + +[package.extras] +awkward = ["awkward (>=1.2)"] +dev = ["awkward (>=1.2)", "numba (>=0.57)", "papermill (>=2.4)", "pytest (>=6)", "pytest-cov (>=3)", "xdoctest (>=1)"] +docs = ["awkward (>=1.2)", "ipykernel", "myst-parser (>0.13)", "nbsphinx", "sphinx (>=4)", "sphinx-book-theme (>=0.0.42)", "sphinx-copybutton", "sphinx-math-dollar"] +test = ["papermill (>=2.4)", "pytest (>=6)", "pytest-cov (>=3)", "xdoctest (>=1)"] +test-extras = ["spark-parser", "uncompyle6"] + +[[package]] +name = "zipp" +version = "3.17.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, + {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] + +[metadata] +lock-version = "2.0" +python-versions = "~3.11.0" +content-hash = "5ea2af5e1e8b732add60fa9a7df5db6bfc904aed929688a73de25b68fe7bf78f" From e245145c605fd1f217f9dcaae60b4060405a85a2 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 23 Jan 2024 09:45:21 +0100 Subject: [PATCH 058/140] fix suffix of config dump that lead to overwriting plot jsons --- menu_tools/object_performance/plotter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 783751c6..96b92761 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -173,7 +173,7 @@ def _plot_efficiency_curve(self): self._save_json(os.path.join(self._outdir_turnons, f"{plot_fname}.json")) # Save config - with open(os.path.join(self._outdir_turnons, f"{plot_fname}.json"), "w") as f: + with open(os.path.join(self._outdir_turnons, f"{plot_fname}.yaml"), "w") as f: yaml.dump( {self.plot_name: self.cfg.config_dict}, f, default_flow_style=False ) @@ -213,7 +213,7 @@ def _plot_iso_vs_efficiency_curve(self): self._save_json(os.path.join(self._outdir_turnons, f"{plot_fname}.json")) # Save config - with open(os.path.join(self._outdir_turnons, f"{plot_fname}.json"), "w") as f: + with open(os.path.join(self._outdir_turnons, f"{plot_fname}.yaml"), "w") as f: yaml.dump( {self.plot_name: self.cfg.config_dict}, f, default_flow_style=False ) From 128237e69bc50a140a632b35533a1c29fdc8bdf9 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 23 Jan 2024 11:25:22 +0100 Subject: [PATCH 059/140] enable wildcard for object performance plotting solving #47 --- menu_tools/object_performance/plotter.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 96b92761..4f69e62a 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -513,16 +513,23 @@ def run(self): self._LEGACY_write_scalings_to_file(plot_name, version, params) -if __name__ == "__main__": +def run(): parser = argparse.ArgumentParser() parser.add_argument( "cfg_plots", + nargs="+", + type=str, help="Path of YAML configuration file specifying the desired plots.", ) args = parser.parse_args() - plotter = EfficiencyCentral(args.cfg_plots) - plotter.run() + for path_cfg_plot in args.cfg_plots: + plotter = EfficiencyCentral(path_cfg_plot) + plotter.run() + + scalings = ScalingCentral(path_cfg_plot) + scalings.run() - scalings = ScalingCentral(args.cfg_plots) - scalings.run() + +if __name__ == "__main__": + run() From 4a52791eeb04562271bea510f75597b45a89e7b4 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 23 Jan 2024 13:30:28 +0100 Subject: [PATCH 060/140] fix isoloation electron plots --- configs/V29/object_performance/electron_iso.yaml | 2 +- configs/V29/objects/electrons.yaml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/configs/V29/object_performance/electron_iso.yaml b/configs/V29/object_performance/electron_iso.yaml index 53bcc7ca..771386f3 100644 --- a/configs/V29/object_performance/electron_iso.yaml +++ b/configs/V29/object_performance/electron_iso.yaml @@ -38,7 +38,7 @@ ElectronsIsolation_Endcap: object: - "abs({eta}) < 2.4" test_objects: - tkElectron:Iso: "trkiso" + tkElectron:NoIsoForIso: "trkiso" xlabel: "Isolation" ylabel: "Efficiency (Endcap)" binning: diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index 5319719d..da2f3f1c 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -21,6 +21,15 @@ tkElectron: range0: - "abs({eta}) < 2.4" - "{passeseleid} == 1" + NoIsoForIso: + # This id is exclusively used for the + # isoloation wp derivation + label: "TkElectron id in barrel" + cuts: + range0: + - "abs({eta}) < 2.4" + range1: + - "{passeseleid} == 1" Iso: label: "TkIsoElectron" cuts: From 28d8a6cdeb02ca87f7a3523d35cbbaddeb125206 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 23 Jan 2024 13:55:37 +0100 Subject: [PATCH 061/140] fixes in electrons config --- configs/V29/objects/electrons.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index da2f3f1c..805a90ba 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -20,7 +20,7 @@ tkElectron: cuts: range0: - "abs({eta}) < 2.4" - - "{passeseleid} == 1" + - "({passeseleid} == 1) | ({pt} < 25)" NoIsoForIso: # This id is exclusively used for the # isoloation wp derivation @@ -35,9 +35,9 @@ tkElectron: cuts: range0: - "abs({eta}) < 2.4" - - "{passeseleid} == 1" range1: - "abs({trkiso}) < 0.13" + - "{passeseleid} == 1" range2: - "abs({trkiso}) < 0.28" @@ -46,7 +46,7 @@ EG: eta_ranges: range0: [0, 5] range1: [0, 1.479] - range2: [1.479, 2.4] + range2: [1.479, 3.0] label: "EG" ids: default: From e8fc897f075adec615f01e341919ce27cdd4abab Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 23 Jan 2024 14:30:08 +0100 Subject: [PATCH 062/140] copy rate plot code and config from --- configs/V29/rate_plots/test.yaml | 22 +++ menu_tools/rate_plots/__init__.py | 0 menu_tools/rate_plots/config.py | 61 ++++++ menu_tools/rate_plots/plotter.py | 301 ++++++++++++++++++++++++++++++ 4 files changed, 384 insertions(+) create mode 100644 configs/V29/rate_plots/test.yaml create mode 100644 menu_tools/rate_plots/__init__.py create mode 100644 menu_tools/rate_plots/config.py create mode 100644 menu_tools/rate_plots/plotter.py diff --git a/configs/V29/rate_plots/test.yaml b/configs/V29/rate_plots/test.yaml new file mode 100644 index 00000000..fab2b27a --- /dev/null +++ b/configs/V29/rate_plots/test.yaml @@ -0,0 +1,22 @@ +ElectronsTriggerBarrel: + sample: DYLL_M50 + versions: V30 + test_objects: + EG:default: + tkElectron:NoIso: + binning: + min: 0 + max: 100 + step: 10 + +ElectronsTriggerBarrelV29vsV30: + sample: DYLL_M50 + versions: + - V29 + - V30 + objects: + EG:default: + binning: + min: 0 + max: 100 + step: 10 diff --git a/menu_tools/rate_plots/__init__.py b/menu_tools/rate_plots/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/menu_tools/rate_plots/config.py b/menu_tools/rate_plots/config.py new file mode 100644 index 00000000..c790439e --- /dev/null +++ b/menu_tools/rate_plots/config.py @@ -0,0 +1,61 @@ +class RatePlotConfig: + def __init__(self, name: str, cfg: dict): + self._name = name + self._cfg = cfg + + @property + def plot_name(self) -> str: + return self._name + + @property + def sample(self) -> str: + return self._cfg["sample"] + + @property + def bin_width(self): + return self._cfg["binning"]["step"] + + @property + def xmin(self): + return self._cfg["binning"]["min"] + + @property + def xmax(self): + return self._cfg["binning"]["max"] + + @property + def compare_versions(self) -> bool: + """ + Returns a boolean specifying if a plot comparing two versions + is to be produced. If a list of two versions is given this is true. + """ + + return len(self.versions) == 2 + + @property + def versions(self): + try: + versions = self._cfg["versions"] + except KeyError: + raise ValueError( + "`versions` must be specified as either a single" + "version (e.g. `V30`) or a list of exactly two versions" + "(e.g. [`V29`, `V30`])." + ) + if isinstance(versions, str): + return [versions] + if isinstance(versions, list): + assert ( + len(versions) == 2 + ), "To compare versions, exactly two must be specified." + return versions + + @property + def version(self) -> str: + version = self._cfg["versions"] + assert isinstance(version, str) + return version + + @property + def objects(self): + return self._cfg["objects"] diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py new file mode 100644 index 00000000..a65f7f33 --- /dev/null +++ b/menu_tools/rate_plots/plotter.py @@ -0,0 +1,301 @@ +#!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python +import argparse +import os +import warnings + +import awkward as ak +import matplotlib.pyplot as plt +import mplhep as hep +import numpy as np +import yaml + +from menu_tools.utils import scalings +from menu_tools.rate_plots.config import RatePlotConfig + +plt.style.use(hep.style.CMS) + + +class RatePlotter: + # Common plot properties + _figsize = (10, 10) + _llabel = "Phase-2 Simulation" + _com = 14 + _outdir = "outputs/rate_plots/" + + def __init__(self, cfg, data, offline_pt: bool): + self.cfg = cfg + self.data = data + self.offline_pt = offline_pt + + @property + def _online_offline(self): + if self.offline_pt: + return "Offline" + return "Online" + + def _style_plot(self, fig, ax0, ax1=None, legend_loc="upper right"): + ax0.legend(loc=legend_loc, frameon=False) + ax0.set_ylabel("Rate [kHz]") + ax0.set_yscale("log") + ax0.grid() + ax0.tick_params(direction="in") + if ax1: + ax1.set_xlabel(rf"{self._online_offline} $p_T$ [GeV]") + ax1.grid() + else: + ax0.set_xlabel(rf"{self._online_offline} $p_T$ [GeV]") + fig.tight_layout() + + def _plot_single_version_rate_curves(self): + """ + TODO: Write description! + """ + version = self.cfg.version + fig, ax = plt.subplots(figsize=self._figsize) + hep.cms.label(ax=ax, llabel=self._llabel, com=self._com) + + for obj_key, rate_values in self.data.items(): + rate_values = rate_values[ + version + ] # TODO: This is not ideal. Think of a more elegant way to pass the data. + ax.plot( + list(rate_values.keys()), + list(rate_values.values()), + marker="o", + label=f"{obj_key} @ {version}", + ) + + self._style_plot(fig, ax) + + # Save plot + fname = os.path.join( + self._outdir, + version, + f"{version}_{self._online_offline}_{self.cfg.plot_name}", + ) + plt.savefig(fname + ".png") + plt.savefig(fname + ".pdf") + + # TODO: Add styling + plt.close() + + def _plot_version_comparsion_rate_curves(self): + """ + TODO: Write description! + """ + v1, v2 = self.cfg.versions + fig, axs = plt.subplots( + 2, + 1, + figsize=self._figsize, + sharex=True, + gridspec_kw={"height_ratios": [3, 1]}, + ) + hep.cms.label(ax=axs[0], llabel=self._llabel, com=self._com) + + for obj_key, rate_values in self.data.items(): + xvalues = np.fromiter(rate_values[v1].keys(), dtype=float) + v1_values = np.fromiter(rate_values[v1].values(), dtype=float) + v2_values = np.fromiter(rate_values[v2].values(), dtype=float) + p = axs[0].plot( + xvalues, + v1_values, + marker="o", + linestyle="solid", + label=f"{obj_key} @ {v1}", + ) + axs[0].plot( + xvalues, + v2_values, + marker="o", + linestyle="dashed", + label=f"{obj_key} @ {v2}", + color=p[0].get_color(), + ) + axs[1].plot( + xvalues, + v1_values / v2_values, + marker="o", + linestyle="dotted", + label=f"({obj_key} @ {v1}) / ({obj_key} @ {v2})", + ) + axs[1].axhline(1, alpha=0.6, color="black") + + self._style_plot(fig, axs[0], axs[1]) + fname = os.path.join( + self._outdir, f"{v1}-vs-{v2}_{self._online_offline}_{self.cfg.plot_name}" + ) + plt.savefig(fname + ".png") + plt.savefig(fname + ".pdf") + + plt.close() + + def plot(self): + os.makedirs(self._outdir, exist_ok=True) + if self.cfg.compare_versions: + self._plot_version_comparsion_rate_curves() + else: + self._plot_single_version_rate_curves() + + +class RateComputer: + def __init__( + self, + obj: str, + obj_cuts: list, + sample: str, + version: str, + apply_offline_conversion: bool, + ): + self.object = obj + self.cuts = obj_cuts + self.sample = sample + self.version = version + self.apply_offline_conversion = apply_offline_conversion + if self.apply_offline_conversion: + self.scaling_params = self._load_scalings() + self.arrays = self._load_cached_arrays() + + def _load_scalings(self): + try: + scaling_params = scalings.load_scaling_params(self.object, self.version) + except FileNotFoundError: + warnings.warn_explicit( + ( + f"No file was found at " + f"`outputs/scalings/{self.version}/{self.object}.yaml`!" + ), + UserWarning, + filename="plotter.py", + lineno=159, + ) + raise UserWarning + return scaling_params + + def _load_cached_arrays(self): + """ + Loads array for specified object/version combination + from the cached parquet file. + """ + fpath = os.path.join( + "cache", self.version, f"{self.version}_{self.sample}_{self.object}.parquet" + ) + arr = ak.from_parquet(fpath) + + # Remove object name prefix from array fields + arr = ak.zip( + {var.replace(self.object, "").lower(): arr[var] for var in arr.fields} + ) + + # Apply scalings if so configured + if self.apply_offline_conversion: + arr["pt"] = scalings.compute_offline_pt(arr, self.scaling_params, "pt") + + return arr + + def compute_rate(self, thr: float) -> float: + """ + Computes rate at `thr` after application of all cuts specified in the + object definition. + """ + mask = self.arrays.pt > 0 + # TODO: Create Object object from utils and iterate over cuts from + # there. Load object definitons as a function of version. + for cut in self.cuts: + mask = mask & eval(cut.replace("{", "self.arrays.").replace("}", "")) + mask = mask & (self.arrays.pt >= thr) + return ak.sum(ak.any(mask, axis=1)) / len(self.arrays) + + +class RatePlotCentral: + """ + Class that orchestrates the creation of the rate plots + (pt thresholds vs. rate). + """ + + def __init__(self, cfg_plots_path: str): + with open(cfg_plots_path, "r") as f: + self.cfg_plots = yaml.safe_load(f) + + def get_bins(self, plot_config: RatePlotConfig) -> np.ndarray: + """ + Set bins according to configuration. + """ + bin_width = plot_config.bin_width + xmax = plot_config.xmax + 1e-5 + xmin = plot_config.xmin + return np.arange(xmin, xmax, bin_width) + + def _compute_rates( + self, + plot_config: RatePlotConfig, + obj_name: str, + obj_properties: dict, + apply_offline_conversion: bool, + ) -> dict: + """ + This function orchestrates the computations of + the rates at the different thresholds that are + to be plotted. Instances of RateComputer are created + and called for this purpose. + """ + rate_data: dict[str, dict] = {} + + # Iterate over version(s) + for version in plot_config.versions: + rate_data[version] = {} + rate_computer = RateComputer( + obj_name, + obj_properties["cuts"], + plot_config.sample, + version, + apply_offline_conversion, + ) + + # Iterate over thresholds + for thr in self.get_bins(plot_config): + rate_data[version][thr] = rate_computer.compute_rate(thr) + + return rate_data + + def run(self, apply_offline_conversion: bool = False): + """ + This function iterates over all plots defined + in the configuration file, computes the rates + at the configured thresholds and passes it to + the RatePlotter for plotting. + """ + # Iterate over plots + for plot_name, cfg_plot in self.cfg_plots.items(): + print("Plotting ", plot_name) + plot_config = RatePlotConfig(plot_name, cfg_plot) + rate_plot_data = {} + + # Iterate over objects in plot + for obj_name, obj_properties in plot_config.objects.items(): + # TODO: Only iterate over object names and load object + # properties from somewhere else, ideally a central place. + try: + rate_plot_data[obj_name] = self._compute_rates( + plot_config, obj_name, obj_properties, apply_offline_conversion + ) + except UserWarning: + # Return without creating a plot if a warning was raised. + # This applies to no scalings being found for an object. + return None + + # Plot Rate vs. Threshold after all data has been aggregated + plotter = RatePlotter(plot_config, rate_plot_data, apply_offline_conversion) + plotter.plot() + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument( + "cfg_plots", help="Path of YAML file specifying the desired plots." + ) + args = parser.parse_args() + + plotter = RatePlotCentral(args.cfg_plots) + plotter.run() + plotter.run(apply_offline_conversion=True) From 55b5816936e4d055e887340dee5268d4de8abd4a Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 23 Jan 2024 17:05:07 +0100 Subject: [PATCH 063/140] many fixes for rate plots; remove object.name in favor of overwriting __str__ in Object class; add constants.py with rate norm factor --- configs/V29/rate_plots/test.yaml | 23 +--- .../object_performance/turnon_collection.py | 21 ++-- menu_tools/rate_plots/config.py | 25 ++++- menu_tools/rate_plots/plotter.py | 104 +++++++++++------- menu_tools/utils/constants.py | 3 + menu_tools/utils/objects.py | 49 ++++++++- menu_tools/utils/scalings.py | 58 ++++++++++ 7 files changed, 210 insertions(+), 73 deletions(-) create mode 100644 menu_tools/utils/constants.py create mode 100644 menu_tools/utils/scalings.py diff --git a/configs/V29/rate_plots/test.yaml b/configs/V29/rate_plots/test.yaml index fab2b27a..7d8fd3fb 100644 --- a/configs/V29/rate_plots/test.yaml +++ b/configs/V29/rate_plots/test.yaml @@ -1,22 +1,11 @@ -ElectronsTriggerBarrel: - sample: DYLL_M50 - versions: V30 +TestRatePlot: + sample: MinBias + versions: V29 test_objects: - EG:default: - tkElectron:NoIso: + - phase1PuppiJet:default + # - tkElectron:NoIso + # - puppiMET:default -- TODO: fix threshold applied on pt which does not exist here! binning: min: 0 max: 100 step: 10 - -ElectronsTriggerBarrelV29vsV30: - sample: DYLL_M50 - versions: - - V29 - - V30 - objects: - EG:default: - binning: - min: 0 - max: 100 - step: 10 diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index 7046b0e1..165a76a0 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -68,7 +68,7 @@ def _load_test_branches(self) -> None: obj = Object(obj_cfg["base_obj"], obj_cfg["id"], self.cfg_plot.version) test_array = self._load_array_from_parquet(obj.nano_obj_name) test_array = ak.with_name(test_array, "Momentum4D") - self.turnon_collection.ak_arrays[obj.name] = test_array + self.turnon_collection.ak_arrays[str(obj)] = test_array def load_arrays(self) -> None: """ @@ -260,21 +260,24 @@ def _apply_test_obj_cuts(self): for test_obj, _ in self.test_objects: if not test_obj.cuts: continue - for range_i, range_cuts in test_obj.cuts.items(): + for ( + range_i, + range_cuts, + ) in test_obj.cuts.items(): # TODO: use the version from utils for cut in range_cuts: cut = re.sub( - r"{([^&|]*)}", r"self.ak_arrays[test_obj.name]['\1']", cut + r"{([^&|]*)}", r"self.ak_arrays[str(test_obj)]['\1']", cut ) eta_sel = ( - abs(self.ak_arrays[test_obj.name]["eta"]) + abs(self.ak_arrays[str(test_obj)]["eta"]) > test_obj.eta_ranges[range_i][0] ) & ( - abs(self.ak_arrays[test_obj.name]["eta"]) + abs(self.ak_arrays[str(test_obj)]["eta"]) < test_obj.eta_ranges[range_i][1] ) sel = eval(cut) + ~eta_sel - self.ak_arrays[test_obj.name] = self.ak_arrays[test_obj.name][sel] + self.ak_arrays[str(test_obj)] = self.ak_arrays[str(test_obj)][sel] def _skim_to_hists(self) -> None: """ @@ -285,11 +288,11 @@ def _skim_to_hists(self) -> None: ref_field = trafo for test_obj, x_arg in self.test_objects: - sel = self.ak_arrays[test_obj.name][x_arg] > self.threshold + sel = self.ak_arrays[str(test_obj)][x_arg] > self.threshold ak_array = self._flatten_array(self.ak_arrays["ref"][ref_field][sel]) - self.hists[test_obj.name] = np.histogram(ak_array, bins=self.bins) + self.hists[str(test_obj)] = np.histogram(ak_array, bins=self.bins) - self.hists["ref"][test_obj.name] = np.histogram( + self.hists["ref"][str(test_obj)] = np.histogram( self._flatten_array(self.ak_arrays["ref"][ref_field]), bins=self.bins ) diff --git a/menu_tools/rate_plots/config.py b/menu_tools/rate_plots/config.py index c790439e..39ef22cf 100644 --- a/menu_tools/rate_plots/config.py +++ b/menu_tools/rate_plots/config.py @@ -1,3 +1,6 @@ +from menu_tools.utils.objects import Object + + class RatePlotConfig: def __init__(self, name: str, cfg: dict): self._name = name @@ -52,10 +55,28 @@ def versions(self): @property def version(self) -> str: + """ + Returns the version if only one version is configured. + This property should only be used when a single version + is specified and not a list of two versions for a comparison + plot. + """ version = self._cfg["versions"] assert isinstance(version, str) return version @property - def objects(self): - return self._cfg["objects"] + def test_objects(self) -> list: + return self._cfg["test_objects"] + + @property + def test_object_instances(self) -> dict[str, dict[str, Object]]: + test_objects: dict[str, dict[str, Object]] = {} + for obj in self._cfg["test_objects"]: + nano_obj_name = obj.split(":")[0] + obj_id_name = obj.split(":")[1] + test_objects[obj] = {} + for version in self.versions: + test_objects[obj][version] = Object(nano_obj_name, obj_id_name, version) + print(test_objects) + return test_objects diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index a65f7f33..4967ed4b 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -1,4 +1,3 @@ -#!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python import argparse import os import warnings @@ -9,7 +8,10 @@ import numpy as np import yaml +from menu_tools.utils import constants +from menu_tools.utils import objects from menu_tools.utils import scalings +from menu_tools.utils.objects import Object from menu_tools.rate_plots.config import RatePlotConfig plt.style.use(hep.style.CMS) @@ -54,15 +56,13 @@ def _plot_single_version_rate_curves(self): fig, ax = plt.subplots(figsize=self._figsize) hep.cms.label(ax=ax, llabel=self._llabel, com=self._com) - for obj_key, rate_values in self.data.items(): - rate_values = rate_values[ - version - ] # TODO: This is not ideal. Think of a more elegant way to pass the data. + for obj_specifier, obj_instances in self.cfg.test_object_instances.items(): + rate_values = self.data[obj_specifier][version] ax.plot( list(rate_values.keys()), list(rate_values.values()), marker="o", - label=f"{obj_key} @ {version}", + label=f"{obj_instances[version].plot_label} @ {version}", ) self._style_plot(fig, ax) @@ -70,7 +70,6 @@ def _plot_single_version_rate_curves(self): # Save plot fname = os.path.join( self._outdir, - version, f"{version}_{self._online_offline}_{self.cfg.plot_name}", ) plt.savefig(fname + ".png") @@ -141,14 +140,12 @@ def plot(self): class RateComputer: def __init__( self, - obj: str, - obj_cuts: list, + obj: Object, sample: str, version: str, apply_offline_conversion: bool, ): self.object = obj - self.cuts = obj_cuts self.sample = sample self.version = version self.apply_offline_conversion = apply_offline_conversion @@ -156,36 +153,58 @@ def __init__( self.scaling_params = self._load_scalings() self.arrays = self._load_cached_arrays() - def _load_scalings(self): + def _load_scalings(self) -> dict: try: - scaling_params = scalings.load_scaling_params(self.object, self.version) + scaling_params = scalings.load_scaling_params(self.object) except FileNotFoundError: + fpath = f"outputs/scalings/{self.version}/{self.object.nano_obj_name}.yaml!" + warnings.warn_explicit( + ( + f"No file was found at `{fpath}`" + ), + UserWarning, + filename="plotter.py", + lineno=158, + ) + raise UserWarning + except KeyError: warnings.warn_explicit( ( - f"No file was found at " - f"`outputs/scalings/{self.version}/{self.object}.yaml`!" + f"Scalings for {self.object.obj_id_name} were found in `{fpath}`" ), UserWarning, filename="plotter.py", - lineno=159, + lineno=171, ) raise UserWarning return scaling_params + def _transform_key(self, raw_key: str) -> str: + """Maps to . + + Returns: + key: string of with the l1 object name prefix removed, qual + transformed to quality + """ + key = raw_key.removeprefix(self.object.nano_obj_name).lower() + if "qual" in key: + return "quality" + return key + def _load_cached_arrays(self): """ Loads array for specified object/version combination from the cached parquet file. """ fpath = os.path.join( - "cache", self.version, f"{self.version}_{self.sample}_{self.object}.parquet" + "cache", + self.version, + f"{self.version}_{self.sample}_{self.object.nano_obj_name}.parquet", ) arr = ak.from_parquet(fpath) # Remove object name prefix from array fields - arr = ak.zip( - {var.replace(self.object, "").lower(): arr[var] for var in arr.fields} - ) + arr = ak.zip({self._transform_key(var): arr[var] for var in arr.fields}) # Apply scalings if so configured if self.apply_offline_conversion: @@ -193,18 +212,18 @@ def _load_cached_arrays(self): return arr - def compute_rate(self, thr: float) -> float: - """ - Computes rate at `thr` after application of all cuts specified in the - object definition. + def compute_rate(self, threshold: float) -> float: + """Computes rate at threhold after application of all object cuts. + + threshold: pt threshold for which to compute rate + + Returns: + rate: rate computed after all object cuts are applied """ - mask = self.arrays.pt > 0 - # TODO: Create Object object from utils and iterate over cuts from - # there. Load object definitons as a function of version. - for cut in self.cuts: - mask = mask & eval(cut.replace("{", "self.arrays.").replace("}", "")) - mask = mask & (self.arrays.pt >= thr) - return ak.sum(ak.any(mask, axis=1)) / len(self.arrays) + mask = objects.compute_selection_mask_for_object_cuts(self.object, self.arrays) + mask = mask & (self.arrays.pt >= threshold) + rate = ak.sum(ak.any(mask, axis=1)) / len(mask) * constants.RATE_NORM_FACTOR + return rate class RatePlotCentral: @@ -229,8 +248,8 @@ def get_bins(self, plot_config: RatePlotConfig) -> np.ndarray: def _compute_rates( self, plot_config: RatePlotConfig, - obj_name: str, - obj_properties: dict, + obj_specifier: str, + obj_instances: dict[str, Object], apply_offline_conversion: bool, ) -> dict: """ @@ -245,8 +264,7 @@ def _compute_rates( for version in plot_config.versions: rate_data[version] = {} rate_computer = RateComputer( - obj_name, - obj_properties["cuts"], + obj_instances[version], plot_config.sample, version, apply_offline_conversion, @@ -258,7 +276,7 @@ def _compute_rates( return rate_data - def run(self, apply_offline_conversion: bool = False): + def run(self, apply_offline_conversion: bool = False) -> None: """ This function iterates over all plots defined in the configuration file, computes the rates @@ -271,13 +289,17 @@ def run(self, apply_offline_conversion: bool = False): plot_config = RatePlotConfig(plot_name, cfg_plot) rate_plot_data = {} - # Iterate over objects in plot - for obj_name, obj_properties in plot_config.objects.items(): - # TODO: Only iterate over object names and load object - # properties from somewhere else, ideally a central place. + # Iterate over test objects in plot + for ( + obj_specifier, + obj_instances, + ) in plot_config.test_object_instances.items(): try: - rate_plot_data[obj_name] = self._compute_rates( - plot_config, obj_name, obj_properties, apply_offline_conversion + rate_plot_data[obj_specifier] = self._compute_rates( + plot_config, + obj_specifier, + obj_instances, + apply_offline_conversion, ) except UserWarning: # Return without creating a plot if a warning was raised. diff --git a/menu_tools/utils/constants.py b/menu_tools/utils/constants.py new file mode 100644 index 00000000..d17d803f --- /dev/null +++ b/menu_tools/utils/constants.py @@ -0,0 +1,3 @@ +N_BUNCHES = 2760 +REVOLUTION_FREQUENCY = 11246 +RATE_NORM_FACTOR = N_BUNCHES * REVOLUTION_FREQUENCY / 1000 # in kHz diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index 7e2c099b..37ad6cf6 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -3,6 +3,8 @@ from typing import Optional import yaml +import awkward as ak + class Object: """This class represents a physics object. @@ -27,7 +29,10 @@ def __init__(self, nano_obj_name: str, obj_id_name: str, version: str) -> None: self.nano_obj_name = nano_obj_name self.obj_id_name = obj_id_name self.version = version - self.name = f"{nano_obj_name}_{obj_id_name}" + self._nano_obj # fail early if no config can be found + + def __str__(self) -> str: + return f"{self.nano_obj_name}_{self.obj_id_name}" @property def _nano_obj(self) -> dict[str, dict]: @@ -37,6 +42,7 @@ def _nano_obj(self) -> dict[str, dict]: Returns: nano_obj_configs: dictionary containing the object parameters and ids + or None if no configuration is found. """ nano_obj_configs: dict[str, dict] = {} config_path = f"configs/{self.version}/objects/*.y*ml" @@ -47,7 +53,12 @@ def _nano_obj(self) -> dict[str, dict]: _conf_dict = yaml.safe_load(f) nano_obj_configs = nano_obj_configs | _conf_dict - return nano_obj_configs[self.nano_obj_name] + try: + return nano_obj_configs[self.nano_obj_name] + except KeyError: + raise FileNotFoundError( + f"No config file found for {self.nano_obj_name}:{self.obj_id_name}!" + ) def _get_object_default_params(self) -> dict: """Get default paramters of the object. @@ -101,14 +112,44 @@ def cuts(self) -> Optional[dict[str, list[str]]]: ) return self._object_params["cuts"] except KeyError: - print(f"No cuts will be applied for {self.name}!") + print(f"No cuts will be applied for {self}!") return None +def compute_selection_mask_for_object_cuts(obj: Object, ak_array: ak.Array) -> ak.Array: + """Compute selection mask for object cuts on array + + obj: Object that specifies the cuts to be applied + ak_array: array on which the selection is evaluated + + Returns: + sel: boolean selection mask for entries passing all cuts form obj + """ + # Initialize mask with True everywhere + sel = abs(ak_array["phi"]) > 0 + + # If no cut are specified in object return true everywhere + if not obj.cuts: + return sel + + for range_i, range_cuts in obj.cuts.items(): + # Initialize temporary mask (for rangei) with True everywhere + _sel = abs(ak_array["phi"]) > 0 + for cut in range_cuts: + cut = re.sub(r"{([^&|]*)}", r"ak_array['\1']", cut) + eta_sel = (abs(ak_array["eta"]) > obj.eta_ranges[range_i][0]) & ( + abs(ak_array["eta"]) < obj.eta_ranges[range_i][1] + ) + _sel = _sel & (eval(cut) + ~eta_sel) + # apply OR logic + sel = sel & _sel + return sel + + if __name__ == "__main__": x = Object("tkElectron", "Iso", "V29") x = Object("caloJet", "default", "V29") - print(x.name) + print(x) print(x.match_dR) print(x.plot_label) print(x.eta_ranges) diff --git a/menu_tools/utils/scalings.py b/menu_tools/utils/scalings.py new file mode 100644 index 00000000..640f5811 --- /dev/null +++ b/menu_tools/utils/scalings.py @@ -0,0 +1,58 @@ +from typing import Optional + +import awkward as ak +import yaml + +from menu_tools.utils.objects import Object + + +def load_scaling_params(obj: Object) -> dict: + fpath = f"outputs/scalings/{obj.version}/{obj.nano_obj_name}.yaml" + with open(fpath, "r") as f: + return yaml.safe_load(f)[obj.obj_id_name] + + +def compute_offline_pt( + arr: ak.Array, obj_scaling_params: dict, pt_var: Optional[str] = None +) -> ak.Array: + # initialise array of zeros identical to the original pt + if pt_var is not None: + pt_orig = arr[pt_var] + elif "et" in arr.fields: + pt_orig = arr.et + elif "pt" in arr.fields: + pt_orig = arr.pt + elif "" in arr.fields: + pt_orig = arr[""][:, 0] + else: + raise ValueError( + "No branch to which to apply the scalings." + " One of `et`, `pt` or `` must exist to compute offline pt/et." + ) + new_pt = ak.zeros_like(pt_orig) + + # loop through eta regions with its scaling parameters + for region, values in obj_scaling_params.items(): + # create eta mask for this eta region + eta_mask = (abs(arr.eta) >= values["eta_min"]) & ( + abs(arr.eta) < values["eta_max"] + ) + # scale pt for non-masked elements of this eta region + new_pt = new_pt + eta_mask * (pt_orig * values["slope"] + values["offset"]) + + return new_pt + + +def add_offline_pt( + arr: ak.Array, obj_scaling_params: dict, pt_var: Optional[str] = None +) -> ak.Array: + """ + Use the scalings to convert online pT to offline pT. + The `pt_var` argument can be used to specify which observables + should be used as "pT" for a given object. + If `pt_var` is not specified, `pt` or `et` are used. + For each object, a dedicated scaling in the barrel/endcap regions + is applied to the online pT. + """ + new_pt = compute_offline_pt(arr, obj_scaling_params, pt_var) + return ak.with_field(arr, new_pt, "offline_pt") From 1b62ef2e223c963302fa3c521d427ba3a7927427 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 23 Jan 2024 17:52:58 +0100 Subject: [PATCH 064/140] add test to reproduce electron iso @ V29 --- menu_tools/object_performance/plotter.py | 7 +- .../object_performance/tests/conftest.py | 94 ---- .../ElectronsIsolation_Barrel_-999_V29.json | 525 ++++++++++++++++++ .../ElectronsIsolation_Barrel_-999_V29.yaml | 23 + .../tests/test_electron_v29.py | 35 ++ .../tests/test_integration.py | 41 -- .../tests/test_turnon_collection.py | 40 -- .../tests/test_utils.py | 2 +- 8 files changed, 588 insertions(+), 179 deletions(-) delete mode 100644 menu_tools/object_performance/tests/conftest.py create mode 100644 menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json create mode 100644 menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.yaml create mode 100644 menu_tools/object_performance/tests/test_electron_v29.py delete mode 100644 menu_tools/object_performance/tests/test_integration.py delete mode 100644 menu_tools/object_performance/tests/test_turnon_collection.py rename menu_tools/{object_performance => utils}/tests/test_utils.py (95%) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 4f69e62a..965a168e 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -1,13 +1,14 @@ import argparse -from typing import Any +import json import os +import yaml +import sys +from typing import Any import matplotlib.pyplot as plt import mplhep as hep import numpy as np from progress.bar import IncrementalBar -import yaml -import json from menu_tools.object_performance.turnon_collection import TurnOnCollection from menu_tools.object_performance.plot_config import PlotConfig diff --git a/menu_tools/object_performance/tests/conftest.py b/menu_tools/object_performance/tests/conftest.py deleted file mode 100644 index ed782f48..00000000 --- a/menu_tools/object_performance/tests/conftest.py +++ /dev/null @@ -1,94 +0,0 @@ -import pytest - - -@pytest.fixture -def met_config(): - cfg_plot = { - "sample": "TT", - "default_version": "V22", - "reference_object": {"object": "genMetTrue", "suffix": "", "label": "Gen MET"}, - "test_objects": { - "trackerMET": {"suffix": "", "label": "Tracker MET"}, - "puppiMET": {"suffix": "Et", "label": "Puppi MET"}, - }, - "binning": {"min": 0, "max": 500, "step": 20}, - "trackerMETTruth": [ - 17671, - 8214, - 6463, - 5321, - 4212, - 3308, - 2453, - 1811, - 1146, - 759, - 482, - 307, - 261, - 154, - 93, - 73, - 61, - 32, - 22, - 18, - 20, - 14, - 8, - 7, - ], - "puppiMETTruth": [ - 31222, - 14025, - 13874, - 13621, - 11387, - 8429, - 5670, - 3644, - 2133, - 1306, - 766, - 460, - 352, - 222, - 145, - 98, - 81, - 45, - 29, - 21, - 24, - 15, - 9, - 7, - ], - "genMETTruth": [ - 130238, - 51518, - 40197, - 29181, - 18620, - 11269, - 6729, - 3975, - 2255, - 1353, - 791, - 470, - 355, - 225, - 148, - 98, - 81, - 45, - 30, - 21, - 25, - 15, - 9, - 7, - ], - } - return cfg_plot diff --git a/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json b/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json new file mode 100644 index 00000000..b2973374 --- /dev/null +++ b/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json @@ -0,0 +1,525 @@ +{ + "xlabel": "Isolation", + "ylabel": "Efficiency (Barrel)", + "watermark": "V29_ElectronsIsolation_Barrel_-999", + "tkElectron_NoIso": { + "label": "TkElectron", + "efficiency": [ + 0.9405951546885947, + 0.9405951546885947, + 0.9405951546885947, + 0.9407426527526827, + 0.9408901508167705, + 0.9415170175891442, + 0.9424388804896936, + 0.9435451159703528, + 0.9458682104797375, + 0.9487075482134297, + 0.9522106272355175, + 0.9551237140012537, + 0.9584792949592537, + 0.9614292562410118, + 0.9640104723625502, + 0.9662966923559129, + 0.9684354142851875, + 0.9704266381503742, + 0.9721228658873853, + 0.9735240974962204, + 0.975662819425495, + 0.977322172646484, + 0.9786865297392972, + 0.9800877613481324, + 0.9810464987647037, + 0.9820421106972971, + 0.9828533500497806, + 0.9838489619823739, + 0.9851026955271212, + 0.9859508093956267, + 0.9865039271359564, + 0.987093919392308, + 0.9879051587447915, + 0.9884951510011432, + 0.9889007706773849, + 0.9895645119657804, + 0.9900807551900881, + 0.9906338729304178, + 0.9912238651867694, + 0.9915926103469892, + 0.9922932261514068, + 0.9924407242154947, + 0.9928463438917364, + 0.9932888380840001, + 0.993546959696154, + 0.9938419558243298, + 0.9941369519525056, + 0.9944319480806815, + 0.9945794461447693, + 0.9946163206607913, + 0.9948006932409013, + 0.995058814853055, + 0.995243187433165, + 0.9953538109812309, + 0.9954644345292968, + 0.9957963051734946, + 0.9959069287215605, + 0.9960544267856485, + 0.9963494229138242, + 0.9964600464618902, + 0.9965337954939342, + 0.9966075445259781, + 0.9968287916221099, + 0.9969762896861979, + 0.9971606622663077, + 0.9973081603303957, + 0.9973450348464177, + 0.9975294074265275, + 0.9976400309745934, + 0.9977506545226594, + 0.9978244035547034, + 0.9979719016187912, + 0.9980456506508352, + 0.9981193996828792, + 0.9982668977469671, + 0.9984512703270769, + 0.9985987683911649, + 0.9987093919392308, + 0.9987831409712747, + 0.9988568900033187, + 0.9989306390353626, + 0.9990781370994506, + 0.9991887606475165, + 0.9991887606475165, + 0.9992993841955824, + 0.9993362587116044, + 0.9994100077436484, + 0.9994100077436484, + 0.9994837567756923, + 0.9994837567756923, + 0.9994837567756923, + 0.9995575058077363, + 0.9995575058077363, + 0.9996312548397802, + 0.9996312548397802, + 0.9997787529038681, + 0.9998525019359121, + 0.999963125483978, + 0.999963125483978, + 1.0 + ], + "efficiency_err": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + ], + "xbins": [ + 0.0025, + 0.0075, + 0.0125, + 0.0175, + 0.0225, + 0.0275, + 0.0325, + 0.037500000000000006, + 0.042499999999999996, + 0.0475, + 0.052500000000000005, + 0.057499999999999996, + 0.0625, + 0.0675, + 0.07250000000000001, + 0.0775, + 0.0825, + 0.0875, + 0.0925, + 0.0975, + 0.10250000000000001, + 0.1075, + 0.1125, + 0.1175, + 0.1225, + 0.1275, + 0.1325, + 0.1375, + 0.14250000000000002, + 0.1475, + 0.1525, + 0.1575, + 0.1625, + 0.1675, + 0.17250000000000001, + 0.1775, + 0.1825, + 0.1875, + 0.1925, + 0.1975, + 0.2025, + 0.20750000000000002, + 0.2125, + 0.2175, + 0.2225, + 0.2275, + 0.2325, + 0.2375, + 0.2425, + 0.2475, + 0.2525, + 0.2575, + 0.2625, + 0.2675, + 0.2725, + 0.2775, + 0.28250000000000003, + 0.2875, + 0.2925, + 0.2975, + 0.3025, + 0.3075, + 0.3125, + 0.3175, + 0.3225, + 0.3275, + 0.3325, + 0.3375, + 0.3425, + 0.34750000000000003, + 0.35250000000000004, + 0.3575, + 0.3625, + 0.3675, + 0.3725, + 0.3775, + 0.3825, + 0.3875, + 0.3925, + 0.3975, + 0.4025, + 0.40750000000000003, + 0.41250000000000003, + 0.4175, + 0.4225, + 0.4275, + 0.4325, + 0.4375, + 0.4425, + 0.4475, + 0.4525, + 0.4575, + 0.4625, + 0.4675, + 0.47250000000000003, + 0.47750000000000004, + 0.4825, + 0.4875, + 0.4925, + 0.4975 + ], + "err_kwargs": { + "xerr": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + "capsize": 3, + "marker": "o", + "markersize": 8 + } + } +} \ No newline at end of file diff --git a/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.yaml b/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.yaml new file mode 100644 index 00000000..7ad771c0 --- /dev/null +++ b/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.yaml @@ -0,0 +1,23 @@ +ElectronsIsolation_Barrel: + binning: + max: 0.5 + min: 0 + step: 0.005 + iso_vs_efficiency: true + match_test_to_ref: true + reference_object: + cuts: + event: + - '{dr_0.3} < 0.15' + - abs({eta}) < 1.479 + object: + - abs({eta}) < 1.479 + label: Gen Electrons + object: part_e + x_arg: Pt + sample: DYLL_M50 + test_objects: + tkElectron:NoIso: trkiso + version: V29 + xlabel: Isolation + ylabel: Efficiency (Barrel) diff --git a/menu_tools/object_performance/tests/test_electron_v29.py b/menu_tools/object_performance/tests/test_electron_v29.py new file mode 100644 index 00000000..a9e12a49 --- /dev/null +++ b/menu_tools/object_performance/tests/test_electron_v29.py @@ -0,0 +1,35 @@ +""" +These tests check if V29 electron object performance plots can be reproduced. +""" +import json +from unittest.mock import patch +import sys + +import numpy as np + +from menu_tools.object_performance import plotter + + +def test_isolation_barrel(): + # Prepare patching of the command line arguments for argparse + testargs = ['foo', "menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.yaml"] + + # Run Plotting + with patch.object(sys, 'argv', testargs): + plotter.run() + + # Load result and assert correct outcome + with open("outputs/object_performance/V29/turnons/ElectronsIsolation_Barrel_-999_V29.json", "r") as f: + test_result = json.load(f) + with open("menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json", "r") as f: + reference_data = json.load(f) + + for key, val in reference_data.items(): + if isinstance(val, dict): + efficiencies_test = np.array(test_result[key]["efficiency"], dtype=np.float64) + efficiencies_reference = np.array(val["efficiency"], dtype=np.float64) + print(efficiencies_reference) + differences = efficiencies_test - efficiencies_reference + assert not np.any(abs(differences) > 1e-4) + else: + assert val == test_result[key] diff --git a/menu_tools/object_performance/tests/test_integration.py b/menu_tools/object_performance/tests/test_integration.py deleted file mode 100644 index e0d2e7e7..00000000 --- a/menu_tools/object_performance/tests/test_integration.py +++ /dev/null @@ -1,41 +0,0 @@ -from menu_tools.object_performance.turnon_collection import TurnOnCollection - - -def off_test_turnon_collection_met(met_config): - """ - This integration test tests whether the MET histograms for the - MET plots for V22 are produced as expected. The cache files - included in the test directory should lead to the bin values - specified below. - """ - turnon_collection = TurnOnCollection(met_config, 70) - turnon_collection.create_hists() - - assert all( - [ - x == y - for x, y in zip( - list(turnon_collection.hists["trackerMET"][0]), - met_config["trackerMETTruth"], - ) - ] - ) - - assert all( - [ - x == y - for x, y in zip( - list(turnon_collection.hists["puppiMET"][0]), - met_config["puppiMETTruth"], - ) - ] - ) - - assert all( - [ - x == y - for x, y in zip( - list(turnon_collection.hists["ref"][0]), met_config["genMETTruth"] - ) - ] - ) diff --git a/menu_tools/object_performance/tests/test_turnon_collection.py b/menu_tools/object_performance/tests/test_turnon_collection.py deleted file mode 100644 index 5ee90a70..00000000 --- a/menu_tools/object_performance/tests/test_turnon_collection.py +++ /dev/null @@ -1,40 +0,0 @@ -from unittest.mock import MagicMock - -import awkward as ak - -from menu_tools.object_performance.turnon_collection import TurnOnCollection - - -def test_select_highest_pt_ref_object(): - """ - Tests that no more than one reference object per event is - selected. If there are multiple reference objects in the event - the highest pt one should be selected. If there are no reference - objects in the event, the selection should yield an empty array - element. - """ - # Set up mock TurnOnCollection object - TurnOnCollection._set_bins = MagicMock() - turnon_collection = TurnOnCollection(None, None) - arr_content = [[], [None]] + [ - [float(f"{i}.{k}") for k in range(3)] for i in range(5) - ] - idx_empty = [i for i, x in enumerate(arr_content) if len(x) == 0 or x[0] is None] - turnon_collection.ak_arrays = {} - turnon_collection.ak_arrays["ref"] = ak.Array( - {"pt": arr_content, "other": arr_content} - ) - - # Execute selection of highest pt reference object - turnon_collection._select_highest_pt_ref_object() - ref_objects = turnon_collection.ak_arrays["ref"] - - # Assert outcome of selection as expected - # The number of events should remain unchanged in all variables - assert len(arr_content) == len(ref_objects["pt"]) - assert len(arr_content) == len(ref_objects["other"]) - # Each event should contain exactly one refernce object or a None entry - assert all(ak.num(ref_objects["pt"], axis=-1) == 1) - assert all(ak.num(ref_objects["other"], axis=-1) == 1) - # Events without reference objects should contain a None entry - assert all([not ref_objects["pt"][i] for i in idx_empty]) diff --git a/menu_tools/object_performance/tests/test_utils.py b/menu_tools/utils/tests/test_utils.py similarity index 95% rename from menu_tools/object_performance/tests/test_utils.py rename to menu_tools/utils/tests/test_utils.py index 7df338ed..e4fdb1b2 100644 --- a/menu_tools/object_performance/tests/test_utils.py +++ b/menu_tools/utils/tests/test_utils.py @@ -1,4 +1,4 @@ -from menu_tools.object_performance.utils import utils +from menu_tools.utils import utils def test_get_pdg_id(): From e07f6d844f1277361f074dd10b739d9a8b2f0fbb Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 23 Jan 2024 17:59:40 +0100 Subject: [PATCH 065/140] fix code quality stuff --- .flake8 | 2 +- menu_tools/object_performance/plotter.py | 1 - .../tests/test_electron_v29.py | 23 ++++++++++++++----- pyproject.toml | 3 +++ 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.flake8 b/.flake8 index c90c600d..8521cd87 100644 --- a/.flake8 +++ b/.flake8 @@ -2,4 +2,4 @@ ignore = W391, W503 max-line-length = 88 extend-ignore = E203, E704, E266 -exclude = menu_tools/object_performance/quality_obj.py +exclude = menu_tools/object_performance/quality_obj.py,menu_tools/**/test_*.py diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 965a168e..550b14bd 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -2,7 +2,6 @@ import json import os import yaml -import sys from typing import Any import matplotlib.pyplot as plt diff --git a/menu_tools/object_performance/tests/test_electron_v29.py b/menu_tools/object_performance/tests/test_electron_v29.py index a9e12a49..f667102b 100644 --- a/menu_tools/object_performance/tests/test_electron_v29.py +++ b/menu_tools/object_performance/tests/test_electron_v29.py @@ -12,24 +12,35 @@ def test_isolation_barrel(): # Prepare patching of the command line arguments for argparse - testargs = ['foo', "menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.yaml"] + testargs = [ + "foo", + "menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.yaml", + ] # Run Plotting - with patch.object(sys, 'argv', testargs): + with patch.object(sys, "argv", testargs): plotter.run() # Load result and assert correct outcome - with open("outputs/object_performance/V29/turnons/ElectronsIsolation_Barrel_-999_V29.json", "r") as f: + with open( + "outputs/object_performance/V29/turnons/ElectronsIsolation_Barrel_-999_V29.json", + "r", + ) as f: test_result = json.load(f) - with open("menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json", "r") as f: + with open( + "menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json", + "r", + ) as f: reference_data = json.load(f) for key, val in reference_data.items(): if isinstance(val, dict): - efficiencies_test = np.array(test_result[key]["efficiency"], dtype=np.float64) + efficiencies_test = np.array( + test_result[key]["efficiency"], dtype=np.float64 + ) efficiencies_reference = np.array(val["efficiency"], dtype=np.float64) print(efficiencies_reference) - differences = efficiencies_test - efficiencies_reference + differences = efficiencies_test - efficiencies_reference assert not np.any(abs(differences) > 1e-4) else: assert val == test_result[key] diff --git a/pyproject.toml b/pyproject.toml index 974033f1..2a7ec612 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,6 +57,9 @@ testpaths = [ ] [tool.mypy] +exclude = [ + "**/tests" +] files = [ "menu_tools" ] From abaf2b217960beaf5e4a9da91f8db6c169d56973 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 23 Jan 2024 18:06:09 +0100 Subject: [PATCH 066/140] fix .name references on Object --- .../object_performance/turnon_collection.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index 165a76a0..7ea78edc 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -131,7 +131,7 @@ def _match_test_to_ref(self): """ for test_obj, x_arg in self.test_objects: ref_test = ak.cartesian( - {"ref": self.ak_arrays["ref"], "test": self.ak_arrays[test_obj.name]}, + {"ref": self.ak_arrays["ref"], "test": self.ak_arrays[str(test_obj)]}, nested=True, ) js, gs = ak.unzip(ref_test) @@ -140,10 +140,10 @@ def _match_test_to_ref(self): pass_dR = dR < test_obj.match_dR pt_max = ak.argmax(ref_test["test"]["pt"][pass_dR], axis=-1, keepdims=True) if "iso" not in x_arg: - self.numerators["ref"][test_obj.name] = ref_test["ref"][x_arg][pass_dR][ + self.numerators["ref"][str(test_obj)] = ref_test["ref"][x_arg][pass_dR][ pt_max ][:, :, 0] - self.numerators["test"][test_obj.name] = ref_test["test"][x_arg][pass_dR][ + self.numerators["test"][str(test_obj)] = ref_test["test"][x_arg][pass_dR][ pt_max ][:, :, 0] @@ -186,8 +186,8 @@ def _reduce_to_per_event(self): """ for test_obj, x_arg in self.test_objects: try: - self.ak_arrays[test_obj.name][x_arg] = ak.max( - self.ak_arrays[test_obj.name][x_arg], axis=1 + self.ak_arrays[str(test_obj)][x_arg] = ak.max( + self.ak_arrays[str(test_obj)][x_arg], axis=1 ) except ValueError: pass @@ -308,29 +308,29 @@ def _skim_to_hists_dR_matched(self): ref_obj = self._remove_inner_nones_zeros(self.ak_arrays["ref"][ref_field]) for test_obj, _ in self.test_objects: - sel_threshold = self.numerators["test"][test_obj.name] >= self.threshold - numerator = self.numerators["ref"][test_obj.name][sel_threshold] + sel_threshold = self.numerators["test"][str(test_obj)] >= self.threshold + numerator = self.numerators["ref"][str(test_obj)][sel_threshold] numerator = self._remove_inner_nones_zeros(numerator) numerator = self._flatten_array(numerator, ak_to_np=True) # Create Test Object(s) Numpy Histogram - self.hists[test_obj.name] = np.histogram(numerator, bins=self.bins) + self.hists[str(test_obj)] = np.histogram(numerator, bins=self.bins) # Create Reference Numpy Histogram if self.threshold >= 0: - ref_obj = self.numerators["ref"][test_obj.name] + ref_obj = self.numerators["ref"][str(test_obj)] ref_obj = self._remove_inner_nones_zeros(ref_obj) ref_flat_np = self._flatten_array(ref_obj, ak_to_np=True) - self.hists["ref"][test_obj.name] = np.histogram(ref_flat_np, bins=self.bins) + self.hists["ref"][str(test_obj)] = np.histogram(ref_flat_np, bins=self.bins) def _skim_to_hists_dR_matched_Iso(self): for test_obj, _ in self.test_objects: - numerator = self.numerators["test"][test_obj.name] + numerator = self.numerators["test"][str(test_obj)] numerator = self._remove_inner_nones_zeros(numerator) numerator = self._flatten_array(numerator, ak_to_np=True) # Create Test Object(s) Numpy Histogram - self.hists[test_obj.name] = np.histogram(numerator, bins=self.bins) + self.hists[str(test_obj)] = np.histogram(numerator, bins=self.bins) def xerr(self, obj_key: str): ref_vals = self.hists["ref"][obj_key][0] From cbbd9093077b063030f0612542825b87a02e288d Mon Sep 17 00:00:00 2001 From: mbonanom Date: Wed, 24 Jan 2024 13:44:09 +0100 Subject: [PATCH 067/140] [v29 rates] Update config to use explicit definition of pairinvmass --- .../table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml index e35d80e5..c51a450b 100644 --- a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml +++ b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml @@ -15,7 +15,7 @@ L1_DoubleEGEle: obj: EG L1_DoublePFJet_MassMin: cross_masks: - - pairinvmass(leg2.et,leg1.et,leg2.eta,leg1.eta,leg2.phi,leg1.phi)>620.0 + - np.sqrt(2.0*leg2.et*leg1.et*(np.cosh(leg2.eta-leg1.eta)-np.cos(leg2.phi-leg1.phi)))>620.0 leg1: leg_mask: - leg1.offline_pt >= 160.0 @@ -129,8 +129,8 @@ L1_DoubleTkMu4_SQ_OS_dR_Max1p2: obj: gmtTkMuon L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18: cross_masks: - - ((pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)>7.0) & (leg1.deltaR(leg2)>0)) - - ((pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)<18.0) & (leg1.deltaR(leg2)>0)) + - ((np.sqrt(2.0*leg2.et*leg1.et*(np.cosh(leg2.eta-leg1.eta)-np.cos(leg2.phi-leg1.phi)))>7.0) & (leg1.deltaR(leg2)>0)) + - ((np.sqrt(2.0*leg2.et*leg1.et*(np.cosh(leg2.eta-leg1.eta)-np.cos(leg2.phi-leg1.phi)))<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: @@ -637,7 +637,7 @@ L1_TripleTkMu: obj: gmtTkMuon L1_TripleTkMu_5SQ_3SQ_0OQ_DoubleMu_5_3_SQ_OS_Mass_Max9: cross_masks: - - pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)<9.0 + - np.sqrt(2.0*leg2.et*leg1.et*(np.cosh(leg2.eta-leg1.eta)-np.cos(leg2.phi-leg1.phi)))<9.0 - leg1.chg*leg2.chg<0.0 - abs(leg2.z0-leg1.z0)<1 - abs(leg3.z0-leg1.z0)<1 @@ -663,8 +663,8 @@ L1_TripleTkMu_5_3p5_2p5_OS_Mass_5to17: cross_masks: - abs(leg2.z0-leg1.z0)<1 - leg1.chg*leg3.chg<0.0 - - pairinvmass(leg3.pt,leg1.pt,leg3.eta,leg1.eta,leg3.phi,leg1.phi)>5.0 - - pairinvmass(leg3.pt,leg1.pt,leg3.eta,leg1.eta,leg3.phi,leg1.phi)<17.0 + - np.sqrt(2.0*leg3.et*leg1.et*(np.cosh(leg3.eta-leg1.eta)-np.cos(leg3.phi-leg1.phi)))>5.0 + - np.sqrt(2.0*leg3.et*leg1.et*(np.cosh(leg3.eta-leg1.eta)-np.cos(leg3.phi-leg1.phi)))<17.0 - abs(leg3.z0-leg1.z0)<1 leg1: leg_mask: From f271ec3dd1924af3f37662dfe3aa77376bd979d7 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 24 Jan 2024 13:44:30 +0100 Subject: [PATCH 068/140] abstract baseconfig --- .../{plot_config.py => config.py} | 34 +-- menu_tools/object_performance/plotter.py | 4 +- menu_tools/object_performance/quality_obj.py | 200 ------------------ .../object_performance/scaling_collection.py | 11 +- .../object_performance/turnon_collection.py | 6 +- menu_tools/rate_plots/config.py | 55 +---- menu_tools/rate_plots/plotter.py | 14 +- pyproject.toml | 4 +- 8 files changed, 25 insertions(+), 303 deletions(-) rename menu_tools/object_performance/{plot_config.py => config.py} (75%) delete mode 100644 menu_tools/object_performance/quality_obj.py diff --git a/menu_tools/object_performance/plot_config.py b/menu_tools/object_performance/config.py similarity index 75% rename from menu_tools/object_performance/plot_config.py rename to menu_tools/object_performance/config.py index 2d771bba..72f9394a 100644 --- a/menu_tools/object_performance/plot_config.py +++ b/menu_tools/object_performance/config.py @@ -1,25 +1,11 @@ from typing import Any, Optional +from menu_tools.utils.config import BasePlotConfig -class PlotConfig: - def __init__(self, cfg: dict[str, Any], name: Optional[str] = None) -> None: - self._cfg = cfg - self.plot_name = name - - @property - def config_dict(self) -> dict[str, Any]: - return self._cfg - - @property - def sample(self): - return self._cfg["sample"] - @property - def version(self) -> str: - try: - return self._cfg["version"] - except KeyError: - raise KeyError(f"No version configured for {self.plot_name}!") +class PerformancePlotConfig(BasePlotConfig): + def __init__(self, cfg: dict[str, Any], name: Optional[str] = None) -> None: + super().__init__(cfg, name) @property def iso_vs_eff_plot(self): @@ -85,18 +71,6 @@ def reference_field(self): field = self._cfg["reference_object"]["x_arg"] return field.lower() - @property - def bin_width(self) -> float: - return float(self._cfg["binning"]["step"]) - - @property - def bin_min(self) -> float: - return float(self._cfg["binning"]["min"]) - - @property - def bin_max(self) -> float: - return float(self._cfg["binning"]["max"]) - @property def scaling_pct(self): return self._cfg["scalings"]["threshold"] diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 550b14bd..f4f76d35 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -10,7 +10,7 @@ from progress.bar import IncrementalBar from menu_tools.object_performance.turnon_collection import TurnOnCollection -from menu_tools.object_performance.plot_config import PlotConfig +from menu_tools.object_performance.config import PerformancePlotConfig from menu_tools.object_performance.scaling_collection import ScalingCollection from menu_tools.utils import utils, objects @@ -35,7 +35,7 @@ def _create_new_plot(self) -> tuple[plt.Figure, plt.Axes]: class EfficiencyPlotter(Plotter): def __init__(self, name, cfg, turnon_collection): self.plot_name = name - self.cfg = PlotConfig(cfg, name) + self.cfg = PerformancePlotConfig(cfg, name) self.turnon_collection = turnon_collection self.version = self.turnon_collection.version self.threshold = self.turnon_collection.threshold diff --git a/menu_tools/object_performance/quality_obj.py b/menu_tools/object_performance/quality_obj.py deleted file mode 100644 index 66cbab36..00000000 --- a/menu_tools/object_performance/quality_obj.py +++ /dev/null @@ -1,200 +0,0 @@ -class L1IsoCut: - def __init__(self, ak_arrays, obj: str, IsoBB=-1, IsoEE=-1, l1_iso="iso"): - ak_arrays = ak_arrays[obj] # TODO: remove obj arg - self.IsoBB = IsoBB - self.IsoEE = IsoEE - self.l1_iso = l1_iso - - self.sel_iso_BB = ak_arrays["eta"] > -100 - self.sel_iso_EE = ak_arrays["eta"] > -100 - - if self.IsoBB >= 0: - self.sel_iso_BB = (abs(ak_arrays["eta"]) < 1.479) & ( - ak_arrays[self.l1_iso] > self.IsoBB - ) - if self.IsoEE >= 0: - self.sel_iso_EE = (abs(ak_arrays["eta"]) > 1.479) & ( - ak_arrays[self.l1_iso] > self.IsoEE - ) - - @property - def ISO_EEBB(self): - return self.sel_iso_EE | self.sel_iso_BB - - -class Quality: - """ - Class implementing the L1 quality criteria. - Hardware criteria to be decide with Menu team. - """ - - def __init__(self, ak_arrays, obj: str): - ak_arrays = ak_arrays[obj] # TODO: remove obj arg - # print("Computing quality for ", obj) - - self.sel_lowEta = (abs(ak_arrays["eta"]) < 0.9) & (ak_arrays["region"] != 1) - self.sel_midEta = ( - (abs(ak_arrays["eta"]) > 0.9) - & (abs(ak_arrays["eta"]) < 1.2) - & (ak_arrays["region"] != 2) - ) - self.sel_highEta = (abs(ak_arrays["eta"]) > 1.2) & (ak_arrays["region"] != 3) - - self.sel_qualities = ( - (ak_arrays["quality"] != 11) - & (ak_arrays["quality"] != 13) - & (ak_arrays["quality"] != 14) - & (ak_arrays["quality"] != 15) - & (ak_arrays["region"] == 3) - ) - self.sel_qual_12 = (ak_arrays["quality"] < 12) & (ak_arrays["region"] == 2) - self.sel_qual_0 = (ak_arrays["quality"] == 0) & (ak_arrays["region"] == 3) - self.sel_qual_1 = (ak_arrays["quality"] < 2) & (ak_arrays["region"] == 1) - self.sel_qual_3 = (ak_arrays["quality"] != 3) & (ak_arrays["region"] == 1) - self.sel_qual_5 = (ak_arrays["quality"] != 5) & (ak_arrays["region"] == 1) - self.sel_qualOnly_12 = ak_arrays["quality"] < 12 - - self.sel_midEta_qual = ( - (abs(ak_arrays["eta"]) > 0.9) - & (abs(ak_arrays["eta"]) < 1.2) - & (ak_arrays["region"] == 3) - ) - - self.sel_odd = ak_arrays["quality"] % 2 == 0 - self.sel_odd_type = (ak_arrays["quality"] % 2 == 0) & (ak_arrays["region"] == 1) - self.sel_not_4 = ak_arrays["region"] == 4 - - ### EG IDs from 123x - self.sel_tkIsoPho_123 = ( - (ak_arrays["quality"] > 0) & (abs(ak_arrays["eta"]) < 1.479) - ) | ((ak_arrays["quality"] == 3) & (abs(ak_arrays["eta"]) >= 1.479)) - - ## EG IDs from 125x - # for EG: region == HGC - if "passeseleid" in ak_arrays.fields: - self.sel_EG_barrelID = (ak_arrays["region"] == 0) & ( - ak_arrays["passeseleid"] == 1 - ) - else: - self.sel_EG_barrelID = (ak_arrays["region"] == 0) & ( - ((ak_arrays["quality"] >> 1) & 1) > 0 - ) - - if "passessaid" in ak_arrays.fields: - self.sel_EG_endcapID = (ak_arrays["region"] == 1) & ( - ak_arrays["passessaid"] == 1 - ) - else: - self.sel_EG_endcapID = (ak_arrays["region"] == 1) & ( - ((ak_arrays["quality"] >> 0) & 1) > 0 - ) - - # for EG: quality = HwQual, alt approach: use HW qual bits directly instead of the menu ntuple variables: bit0: SA, 1: Ele, 2: Pho - # self.sel_EG_barrelID = (ak_arrays['region'] == 0) & (((ak_arrays['quality'] >> 1)&1) > 0) - # self.sel_EG_endcapID = (ak_arrays['region'] == 1) & (((ak_arrays['quality'] >> 0)&1) > 0) - - ## tkPhoton from 125x - # self.sel_tkPho_barrelID = (ak_arrays['region'] == 0) & (ak_arrays['passeseleid'] == 1) - # self.sel_tkPho_endcapID = (ak_arrays['region'] == 1) & (ak_arrays['passesphoid'] == 1) - if "passesphoid" in ak_arrays.fields: - self.sel_tkPho_endcapID = (ak_arrays["region"] == 1) & ( - ak_arrays["passesphoid"] == 1 - ) - else: - self.sel_tkPho_endcapID = (ak_arrays["region"] == 1) & ( - ((ak_arrays["quality"] >> 2) & 1) > 0 - ) - - # self.sel_tkPho_barrelID = (ak_arrays['region'] == 0) & (((ak_arrays['quality'] >> 1)&1) > 0) - # self.sel_tkPho_endcapID = (ak_arrays['region'] == 1) & (((ak_arrays['quality'] >> 2)&1) > 0) - - @property - def QUAL_125x_EGID(self): - return ~(self.sel_EG_barrelID | self.sel_EG_endcapID) - - @property - def QUAL_125x_tkPhoID(self): - # return ~(self.sel_tkPho_barrelID | self.sel_tkPho_endcapID) - return ~(self.sel_EG_barrelID | self.sel_tkPho_endcapID) - - @property - def QUAL_123x_tkPhoID(self): - return ~(self.sel_tkIsoPho_123) - - @property - def QUAL_Overlap12EndcapJaana1345(self): - return self.sel_qual_12 | self.sel_qualities - - @property - def QUAL_OverlapNotRegion3(self): - return self.sel_midEta_qual - - @property - def QUAL_Endcap1OverlapNotRegion3(self): - return self.sel_midEta_qual | self.sel_qual_0 - - @property - def QUAL_Overlap12(self): - return self.sel_qual_12 - - @property - def QUAL_BarrelNoneEndcap3(self): - return self.sel_qual_3 - - @property - def QUAL_CorrectRegion(self): - return self.sel_lowEta | self.sel_midEta | self.sel_highEta - - @property - def QUAL_Endcap1CorrectRegion(self): - return self.sel_lowEta | self.sel_midEta | self.sel_highEta | self.sel_qual_0 - - @property - def QUAL_BarrelOddEndcap2(self): - return self.sel_odd_type | self.sel_qual_1 - - @property - def QUAL_BarrelNoneEndcap5(self): - return self.sel_qual_5 - - @property - def QUAL_Overlap12Endcap1(self): - return self.sel_qual_12 | self.sel_qual_0 - - @property - def QUAL_Endcap1(self): - return self.sel_qual_0 - - @property - def QUAL_Odd(self): - return self.sel_odd - - @property - def QUAL_Overlap12Endcap1CorrectRegion(self): - return ( - self.sel_lowEta - | self.sel_midEta - | self.sel_highEta - | self.sel_qual_12 - | self.sel_qual_0 - ) - - @property - def QUAL_12(self): - return self.sel_qualOnly_12 - - @property - def QUAL_RegionNotFour(self): - return self.sel_not_4 - - @property - def QUAL_Overlap12Endcap1OverlapNotRegion3(self): - return self.sel_midEta_qual | self.sel_qual_12 | self.sel_qual_0 - - @property - def QUAL_BarrelNoneEndcap2(self): - return self.sel_qual_1 - - @property - def QUAL_EndcapJaana1345(self): - return self.sel_qualities diff --git a/menu_tools/object_performance/scaling_collection.py b/menu_tools/object_performance/scaling_collection.py index f219d200..b94bff2b 100644 --- a/menu_tools/object_performance/scaling_collection.py +++ b/menu_tools/object_performance/scaling_collection.py @@ -1,8 +1,7 @@ -#!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python from scipy.optimize import curve_fit import numpy as np -from menu_tools.object_performance.plot_config import PlotConfig +from menu_tools.object_performance.config import PerformancePlotConfig from menu_tools.utils import utils @@ -14,7 +13,9 @@ class ScalingCollection: objects. """ - def __init__(self, cfg: PlotConfig, method: str, plateau_pct: float = 0.95): + def __init__( + self, cfg: PerformancePlotConfig, method: str, plateau_pct: float = 0.95 + ): self.cfg = cfg self.method = method self.plateau_pct = plateau_pct @@ -249,7 +250,3 @@ def _fit_linear_functions(self, scalings): popt, pcov = curve_fit(utils.scaling_func, xdata, ydata) params[obj] = popt return params - - -if __name__ == "__main__": - pass diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index 7ea78edc..c62a0416 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -5,7 +5,7 @@ import numpy as np import vector -from menu_tools.object_performance.plot_config import PlotConfig +from menu_tools.object_performance.config import PerformancePlotConfig from menu_tools.utils import utils from menu_tools.utils.objects import Object @@ -14,7 +14,7 @@ class ArrayLoader: - def __init__(self, turnon_collection, cfg_plot: PlotConfig): + def __init__(self, turnon_collection, cfg_plot: PerformancePlotConfig): self.turnon_collection = turnon_collection self.cfg_plot = cfg_plot @@ -82,7 +82,7 @@ class TurnOnCollection: def __init__( self, cfg_plot: dict, threshold: float, plot_name: Optional[str] = None ): - self.cfg_plot = PlotConfig(cfg_plot, plot_name) + self.cfg_plot = PerformancePlotConfig(cfg_plot, plot_name) self.version = self.cfg_plot.version self.threshold = threshold self.ak_arrays: dict[str, Any] = {} diff --git a/menu_tools/rate_plots/config.py b/menu_tools/rate_plots/config.py index 39ef22cf..7fee93f3 100644 --- a/menu_tools/rate_plots/config.py +++ b/menu_tools/rate_plots/config.py @@ -1,30 +1,9 @@ -from menu_tools.utils.objects import Object +from menu_tools.utils.config import BasePlotConfig -class RatePlotConfig: - def __init__(self, name: str, cfg: dict): - self._name = name - self._cfg = cfg - - @property - def plot_name(self) -> str: - return self._name - - @property - def sample(self) -> str: - return self._cfg["sample"] - - @property - def bin_width(self): - return self._cfg["binning"]["step"] - - @property - def xmin(self): - return self._cfg["binning"]["min"] - - @property - def xmax(self): - return self._cfg["binning"]["max"] +class RatePlotConfig(BasePlotConfig): + def __init__(self, cfg: dict, name: str): + super().__init__(cfg, name) @property def compare_versions(self) -> bool: @@ -36,7 +15,7 @@ def compare_versions(self) -> bool: return len(self.versions) == 2 @property - def versions(self): + def versions(self) -> list[str]: try: versions = self._cfg["versions"] except KeyError: @@ -53,30 +32,6 @@ def versions(self): ), "To compare versions, exactly two must be specified." return versions - @property - def version(self) -> str: - """ - Returns the version if only one version is configured. - This property should only be used when a single version - is specified and not a list of two versions for a comparison - plot. - """ - version = self._cfg["versions"] - assert isinstance(version, str) - return version - @property def test_objects(self) -> list: return self._cfg["test_objects"] - - @property - def test_object_instances(self) -> dict[str, dict[str, Object]]: - test_objects: dict[str, dict[str, Object]] = {} - for obj in self._cfg["test_objects"]: - nano_obj_name = obj.split(":")[0] - obj_id_name = obj.split(":")[1] - test_objects[obj] = {} - for version in self.versions: - test_objects[obj][version] = Object(nano_obj_name, obj_id_name, version) - print(test_objects) - return test_objects diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index 4967ed4b..f149deb2 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -159,9 +159,7 @@ def _load_scalings(self) -> dict: except FileNotFoundError: fpath = f"outputs/scalings/{self.version}/{self.object.nano_obj_name}.yaml!" warnings.warn_explicit( - ( - f"No file was found at `{fpath}`" - ), + (f"No file was found at `{fpath}`"), UserWarning, filename="plotter.py", lineno=158, @@ -169,9 +167,7 @@ def _load_scalings(self) -> dict: raise UserWarning except KeyError: warnings.warn_explicit( - ( - f"Scalings for {self.object.obj_id_name} were found in `{fpath}`" - ), + (f"Scalings for {self.object.obj_id_name} were found in `{fpath}`"), UserWarning, filename="plotter.py", lineno=171, @@ -241,8 +237,8 @@ def get_bins(self, plot_config: RatePlotConfig) -> np.ndarray: Set bins according to configuration. """ bin_width = plot_config.bin_width - xmax = plot_config.xmax + 1e-5 - xmin = plot_config.xmin + xmax = plot_config.bin_max + 1e-5 + xmin = plot_config.bin_min return np.arange(xmin, xmax, bin_width) def _compute_rates( @@ -286,7 +282,7 @@ def run(self, apply_offline_conversion: bool = False) -> None: # Iterate over plots for plot_name, cfg_plot in self.cfg_plots.items(): print("Plotting ", plot_name) - plot_config = RatePlotConfig(plot_name, cfg_plot) + plot_config = RatePlotConfig(cfg_plot, plot_name) rate_plot_data = {} # Iterate over test objects in plot diff --git a/pyproject.toml b/pyproject.toml index 2a7ec612..36320c81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,10 +58,10 @@ testpaths = [ [tool.mypy] exclude = [ - "**/tests" + "**/tests", ] files = [ - "menu_tools" + "menu_tools/utils" ] disable_error_code = [ "import-untyped", From 42d07d6c84d4dd056bcd6d9dacc6a1207dd1d5ca Mon Sep 17 00:00:00 2001 From: mbonanom Date: Wed, 24 Jan 2024 14:14:06 +0100 Subject: [PATCH 069/140] [v29 rates] Add mass dimension and call mass in config --- .../table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml | 12 ++++++------ rates/table/menu_table.py | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml index c51a450b..edcf4879 100644 --- a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml +++ b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml @@ -15,7 +15,7 @@ L1_DoubleEGEle: obj: EG L1_DoublePFJet_MassMin: cross_masks: - - np.sqrt(2.0*leg2.et*leg1.et*(np.cosh(leg2.eta-leg1.eta)-np.cos(leg2.phi-leg1.phi)))>620.0 + - (leg1+leg2).mass>620 leg1: leg_mask: - leg1.offline_pt >= 160.0 @@ -129,8 +129,8 @@ L1_DoubleTkMu4_SQ_OS_dR_Max1p2: obj: gmtTkMuon L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18: cross_masks: - - ((np.sqrt(2.0*leg2.et*leg1.et*(np.cosh(leg2.eta-leg1.eta)-np.cos(leg2.phi-leg1.phi)))>7.0) & (leg1.deltaR(leg2)>0)) - - ((np.sqrt(2.0*leg2.et*leg1.et*(np.cosh(leg2.eta-leg1.eta)-np.cos(leg2.phi-leg1.phi)))<18.0) & (leg1.deltaR(leg2)>0)) + - ((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: @@ -637,7 +637,7 @@ L1_TripleTkMu: obj: gmtTkMuon L1_TripleTkMu_5SQ_3SQ_0OQ_DoubleMu_5_3_SQ_OS_Mass_Max9: cross_masks: - - np.sqrt(2.0*leg2.et*leg1.et*(np.cosh(leg2.eta-leg1.eta)-np.cos(leg2.phi-leg1.phi)))<9.0 + - (leg1+leg2).mass<9.0 - leg1.chg*leg2.chg<0.0 - abs(leg2.z0-leg1.z0)<1 - abs(leg3.z0-leg1.z0)<1 @@ -663,8 +663,8 @@ L1_TripleTkMu_5_3p5_2p5_OS_Mass_5to17: cross_masks: - abs(leg2.z0-leg1.z0)<1 - leg1.chg*leg3.chg<0.0 - - np.sqrt(2.0*leg3.et*leg1.et*(np.cosh(leg3.eta-leg1.eta)-np.cos(leg3.phi-leg1.phi)))>5.0 - - np.sqrt(2.0*leg3.et*leg1.et*(np.cosh(leg3.eta-leg1.eta)-np.cos(leg3.phi-leg1.phi)))<17.0 + - (leg1+leg3).mass>5.0 + - (leg1+leg3).mass<17.0 - abs(leg3.z0-leg1.z0)<1 leg1: leg_mask: diff --git a/rates/table/menu_table.py b/rates/table/menu_table.py index 03a9602e..da198b55 100644 --- a/rates/table/menu_table.py +++ b/rates/table/menu_table.py @@ -116,7 +116,9 @@ def scale_pt(self, obj, arr): arr["pt"] = arr[""] arr["offline_pt"] = arr.pt - if "eta" in arr.fields: arr = ak.with_name(arr, "Momentum3D") + if "eta" in arr.fields: + arr["mass"] = 0.0*ak.ones_like(arr["eta"]) + arr = ak.with_name(arr, "Momentum4D") arr["idx"] = ak.local_index(arr) return arr From a38dc19124244bba05fde8f9d8c25a0795ce64b8 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 24 Jan 2024 16:02:06 +0100 Subject: [PATCH 070/140] Fix ID in tkIsoElectron --- configs/V29/objects/electrons.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index 805a90ba..02bfd1d1 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -29,7 +29,7 @@ tkElectron: range0: - "abs({eta}) < 2.4" range1: - - "{passeseleid} == 1" + - "({passeseleid} == 1) | ({pt} < 25)" Iso: label: "TkIsoElectron" cuts: @@ -37,7 +37,7 @@ tkElectron: - "abs({eta}) < 2.4" range1: - "abs({trkiso}) < 0.13" - - "{passeseleid} == 1" + - "({passeseleid} == 1) | ({pt} < 25)" range2: - "abs({trkiso}) < 0.28" From ead897fcefd5c73379a77f128ccac86698c24b27 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 24 Jan 2024 16:14:46 +0100 Subject: [PATCH 071/140] fix scalings --- menu_tools/object_performance/config.py | 14 ++ menu_tools/object_performance/plotter.py | 83 ++++++------ .../object_performance/scaling_collection.py | 121 ++++++++---------- .../object_performance/turnon_collection.py | 10 +- menu_tools/rate_plots/config.py | 12 ++ 5 files changed, 120 insertions(+), 120 deletions(-) diff --git a/menu_tools/object_performance/config.py b/menu_tools/object_performance/config.py index 72f9394a..d5da2b62 100644 --- a/menu_tools/object_performance/config.py +++ b/menu_tools/object_performance/config.py @@ -1,6 +1,7 @@ from typing import Any, Optional from menu_tools.utils.config import BasePlotConfig +from menu_tools.utils.objects import Object class PerformancePlotConfig(BasePlotConfig): @@ -71,6 +72,10 @@ def reference_field(self): field = self._cfg["reference_object"]["x_arg"] return field.lower() + @property + def compute_scalings(self) -> bool: + return "scalings" in self._cfg.keys() + @property def scaling_pct(self): return self._cfg["scalings"]["threshold"] @@ -86,3 +91,12 @@ def xlabel(self): @property def ylabel(self): return self._cfg["ylabel"] + + @property + def test_object_instances(self) -> list: + test_objects = [] + for obj in self._cfg["test_objects"]: + nano_obj_name = obj.split(":")[0] + obj_id_name = obj.split(":")[1] + test_objects.append(Object(nano_obj_name, obj_id_name, self.version)) + return test_objects diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index f4f76d35..b92e9128 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -327,7 +327,7 @@ def __init__( scalings: dict, scaling_pct: float, version: str, - params: dict, + params: dict[str, np.array], ): self.plot_name = plot_name self.cfg_plot = cfg_plot @@ -342,17 +342,6 @@ def _params_to_func_str(self, obj): pm = "+" if b > 0 else "-" return f"y = {a} x {pm} {abs(b)}" - def _set_plot_ranges(self, ax): - xmax = 0 - ymax = 0 - for points in self.scalings.values(): - x_points = np.array(list(points.keys()) + [xmax]) - y_points = np.array(list(points.values()) + [ymax]) - xmax = np.max(x_points) - ymax = np.max(y_points) - ax.set_xlim(0, xmax) - ax.set_ylim(0, ymax) - def _save_json(self, fpath: str) -> None: plot: dict[str, Any] = {"watermark": f"{self.version}_{self.plot_name}"} @@ -361,11 +350,7 @@ def _save_json(self, fpath: str) -> None: x_points = list(points.keys()) y_points = list(points.values()) - label = ( - self.cfg_plot["test_objects"][obj]["label"] - + ", " - + self._params_to_func_str(obj) - ) + label = obj + ", " + self._params_to_func_str(obj) _object["xvals"] = x_points _object["yvals"] = y_points @@ -385,11 +370,7 @@ def plot(self): y_points = np.array(list(points.values())) pts = ax.plot(x_points, y_points, "o") - label = ( - self.cfg_plot["test_objects"][obj]["label"] - + ", " - + self._params_to_func_str(obj) - ) + label = obj + ", " + self._params_to_func_str(obj) # TODO: Fix label! a, b = self.params[obj] x = np.linspace(0, 2500, 20) y = utils.scaling_func(x, a, b) @@ -408,14 +389,19 @@ def plot(self): fontsize=20, transform=ax.transAxes, ) - self._set_plot_ranges(ax) fig.tight_layout() - - plot_fname = ( - f"{self.outdir}/{self.version}/scalings/{self.plot_name}_{self.version}" + ax.set_xlim(0, np.max(x_points)) + ax.set_ylim(0, np.max(y_points)) + + plot_fname = os.path.join( + self.outdir_base, + self.version, + "scalings", + f"{self.plot_name}_{self.version}", ) - for ext in [".png", ".pdf"]: - plt.savefig(f"{plot_fname}{ext}") + print(plot_fname) + plt.savefig(f"{plot_fname}.png") + plt.savefig(f"{plot_fname}.pdf") self._save_json(f"{plot_fname}.json") ## save config @@ -480,14 +466,15 @@ def _LEGACY_write_scalings_to_file( def run(self): for plot_name, cfg_plot in self.cfg_plots.items(): - if "scalings" not in cfg_plot: + plot_config = PerformancePlotConfig(cfg_plot, plot_name) + if not plot_config.compute_scalings: continue print(f">>> Scalings {plot_name} <<<") - scalings = {x: {} for x in cfg_plot["test_objects"]} + scalings = {} - for test_obj in cfg_plot["test_objects"]: - scal = {test_obj: {}} + for test_obj in plot_config.test_object_instances: + scalings[str(test_obj)] = {} thds = self._get_scaling_thresholds(cfg_plot, test_obj) bar = IncrementalBar("Progress", max=len(thds)) for threshold in thds: @@ -496,21 +483,29 @@ def run(self): turnon_collection.create_hists() scaling_pct = turnon_collection.cfg_plot.scaling_pct method = turnon_collection.cfg_plot.scaling_method - scaling_collect = ScalingCollection(cfg_plot, method, scaling_pct) - version = turnon_collection.version - scal = scaling_collect._compute_scalings( - turnon_collection, test_obj, scal, scaling_pct, method + scaling_collection = ScalingCollection( + cfg_plot, method, scaling_pct + ) + scalings[str(test_obj)][ + threshold + ] = scaling_collection._compute_scalings( + turnon_collection, test_obj, scaling_pct, method ) bar.finish() - scalings[test_obj] = scal[test_obj] - params = scaling_collect._fit_linear_functions(scalings) - if params: - plotter = ScalingPlotter( - plot_name, cfg_plot, scalings, scaling_pct, version, params - ) - plotter.plot() - self._LEGACY_write_scalings_to_file(plot_name, version, params) + params = scaling_collection._fit_linear_functions(scalings) + plotter = ScalingPlotter( + plot_name, + cfg_plot, + scalings, + scaling_pct, + turnon_collection.version, + params, + ) + plotter.plot() + self._LEGACY_write_scalings_to_file( + plot_name, turnon_collection.version, params + ) def run(): diff --git a/menu_tools/object_performance/scaling_collection.py b/menu_tools/object_performance/scaling_collection.py index b94bff2b..3a52eb95 100644 --- a/menu_tools/object_performance/scaling_collection.py +++ b/menu_tools/object_performance/scaling_collection.py @@ -2,7 +2,9 @@ import numpy as np from menu_tools.object_performance.config import PerformancePlotConfig +from menu_tools.object_performance.turnon_collection import TurnOnCollection from menu_tools.utils import utils +from menu_tools.utils.objects import Object class ScalingCollection: @@ -32,7 +34,7 @@ def _find_percentage_point(self, hist, bins, scaling_pct): if is_point: return bins[i + 1] - def _find_turnon_cut(self, graph_x, graph_y, Target): + def _find_turnon_cut(self, graph_x, graph_y, Target) -> float: L = 0 R = np.max(graph_x) @@ -153,100 +155,77 @@ def _get_point_on_curve(self, x, graph_x, graph_y): return -1 def _compute_scalings_naive( - self, turnon_collection, test_obj, scalings, scaling_pct - ): + self, turnon_collection: TurnOnCollection, test_obj: Object, scaling_pct: float + ) -> float: bins = turnon_collection.bins bins = 0.5 * (bins[1:] + bins[:-1]) - threshold = turnon_collection.threshold - - for obj_key, gen_hist_trig in turnon_collection.hists.items(): - if (obj_key == "ref") | (obj_key != test_obj): - continue - efficiency, yerr = turnon_collection.get_efficiency(obj_key) - - xbins = bins - xbins = xbins[~np.isnan(efficiency)] - er_dn = yerr[0] - er_up = yerr[1] - er_dn = er_dn[~np.isnan(efficiency)] - er_up = er_up[~np.isnan(efficiency)] - efficiency = efficiency[~np.isnan(efficiency)] - - K1 = [] - for i in range(len(efficiency)): - K1.append(1 / (er_dn[i] + er_up[i]) / (er_up[i] + er_dn[i])) - - percentage_point = self._find_turnon_cut( - xbins, self._interpolate(efficiency, K1, 100), scaling_pct - ) - if percentage_point: - scalings[obj_key][threshold] = percentage_point - return scalings + efficiency, yerr = turnon_collection.get_efficiency(test_obj) - def _compute_scalings_tanh( - self, turnon_collection, test_obj, scalings, scaling_pct - ): + xbins = bins + xbins = xbins[~np.isnan(efficiency)] + er_dn = yerr[0] + er_up = yerr[1] + er_dn = er_dn[~np.isnan(efficiency)] + er_up = er_up[~np.isnan(efficiency)] + efficiency = efficiency[~np.isnan(efficiency)] + + K1 = [] + for i in range(len(efficiency)): + K1.append(1 / (er_dn[i] + er_up[i]) / (er_up[i] + er_dn[i])) + + percentage_point = self._find_turnon_cut( + xbins, self._interpolate(efficiency, K1, 100), scaling_pct + ) + return percentage_point + + def _compute_scalings_tanh(self, turnon_collection, test_obj, scaling_pct) -> float: bins = turnon_collection.bins bins = 0.5 * (bins[1:] + bins[:-1]) - threshold = turnon_collection.threshold - - for obj_key, gen_hist_trig in turnon_collection.hists.items(): - if (obj_key == "ref") | (obj_key != test_obj): - continue - efficiency, _ = turnon_collection.get_efficiency(obj_key) - percentage_point = self._compute_value_of_tanh_at_threshold( - efficiency, bins, scaling_pct - ) - if percentage_point: - scalings[obj_key][threshold] = percentage_point - return scalings + efficiency, _ = turnon_collection.get_efficiency(test_obj) + percentage_point = self._compute_value_of_tanh_at_threshold( + efficiency, bins, scaling_pct + ) + return percentage_point def _compute_scalings_errf( self, turnon_collection, test_obj, scalings, scaling_pct - ): + ) -> float: bins = turnon_collection.bins bins = 0.5 * (bins[1:] + bins[:-1]) - threshold = turnon_collection.threshold - - for obj_key, gen_hist_trig in turnon_collection.hists.items(): - if (obj_key == "ref") | (obj_key != test_obj): - continue - efficiency, _ = turnon_collection.get_efficiency(obj_key) - percentage_point = self._compute_value_of_errf_at_threshold( - efficiency, bins, scaling_pct - ) - if percentage_point: - scalings[obj_key][threshold] = percentage_point - return scalings + efficiency, _ = turnon_collection.get_efficiency(test_obj) + percentage_point = self._compute_value_of_errf_at_threshold( + efficiency, bins, scaling_pct + ) + return percentage_point def _compute_scalings( - self, turnon_collection, test_obj, scalings, scaling_pct, method="tanh" - ) -> dict: + self, + turnon_collection: TurnOnCollection, + test_obj: Object, + scaling_pct: float, + method: str = "tanh", + ) -> float: if method == "tanh": - return self._compute_scalings_tanh( - turnon_collection, test_obj, scalings, scaling_pct - ) + return self._compute_scalings_tanh(turnon_collection, test_obj, scaling_pct) if method == "errf": - return self._compute_scalings_errf( - turnon_collection, test_obj, scalings, scaling_pct - ) + return self._compute_scalings_errf(turnon_collection, test_obj, scaling_pct) if method == "naive": return self._compute_scalings_naive( - turnon_collection, test_obj, scalings, scaling_pct + turnon_collection, test_obj, scaling_pct ) else: raise ValueError(f"`{method}` is not a valid scaling method!") - def _fit_linear_functions(self, scalings): + def _fit_linear_functions( + self, scalings: dict[str, dict[str, float]] + ) -> dict[str, np.array]: params = {} - for obj, thresh_points in scalings.items(): - xdata = [th for th, val in thresh_points.items() if val] - ydata = [thresh_points[x] for x in xdata] - if not ydata: - return None + for obj, scaling_values in scalings.items(): + xdata = [th for th, val in scaling_values.items() if val] + ydata = [scaling_values[x] for x in xdata] popt, pcov = curve_fit(utils.scaling_func, xdata, ydata) params[obj] = popt return params diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index c62a0416..b9cb74c0 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -332,15 +332,15 @@ def _skim_to_hists_dR_matched_Iso(self): # Create Test Object(s) Numpy Histogram self.hists[str(test_obj)] = np.histogram(numerator, bins=self.bins) - def xerr(self, obj_key: str): - ref_vals = self.hists["ref"][obj_key][0] + def xerr(self, obj: Object): + ref_vals = self.hists["ref"][str(obj)][0] bin_width = self.cfg_plot.bin_width return np.ones_like(ref_vals) * bin_width / 2 @utils.ignore_warnings - def get_efficiency(self, obj_key: str): - ref_vals = self.hists["ref"][obj_key][0] - test_vals = self.hists[obj_key][0] + def get_efficiency(self, obj: Object): + ref_vals = self.hists["ref"][str(obj)][0] + test_vals = self.hists[str(obj)][0] eff = test_vals / ref_vals assert all(0 <= i <= 1 or str(i) == "nan" for i in eff) diff --git a/menu_tools/rate_plots/config.py b/menu_tools/rate_plots/config.py index 7fee93f3..c758e101 100644 --- a/menu_tools/rate_plots/config.py +++ b/menu_tools/rate_plots/config.py @@ -1,4 +1,5 @@ from menu_tools.utils.config import BasePlotConfig +from menu_tools.utils.objects import Object class RatePlotConfig(BasePlotConfig): @@ -35,3 +36,14 @@ def versions(self) -> list[str]: @property def test_objects(self) -> list: return self._cfg["test_objects"] + + @property + def test_object_instances(self) -> dict[str, dict[str, Object]]: + test_objects: dict[str, dict[str, Object]] = {} + for obj in self._cfg["test_objects"]: + nano_obj_name = obj.split(":")[0] + obj_id_name = obj.split(":")[1] + test_objects[obj] = {} + for version in self.versions: + test_objects[obj][version] = Object(nano_obj_name, obj_id_name, version) + return test_objects From e11143025b18c11efb1bfa6c8b736f93aae90aa8 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 24 Jan 2024 16:18:18 +0100 Subject: [PATCH 072/140] add missing base config to version control --- menu_tools/utils/config.py | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 menu_tools/utils/config.py diff --git a/menu_tools/utils/config.py b/menu_tools/utils/config.py new file mode 100644 index 00000000..1300eb42 --- /dev/null +++ b/menu_tools/utils/config.py @@ -0,0 +1,46 @@ +from typing import Any, Optional + + +class BasePlotConfig: + """Base class for yaml/dict style plot config + + Includes abstractions for test_objects and creation of Object instances. + """ + + def __init__(self, cfg: dict[str, Any], name: Optional[str] = None) -> None: + self._cfg = cfg + self._name = name + + @property + def plot_name(self) -> str: + return self._name + + @property + def config_dict(self) -> dict[str, Any]: + return self._cfg + + @property + def sample(self): + try: + return self._cfg["sample"] + except KeyError: + raise KeyError(f"No sample configured for {self.plot_name}!") + + @property + def version(self) -> str: + try: + return self._cfg["version"] + except KeyError: + raise KeyError(f"No version configured for {self.plot_name}!") + + @property + def bin_width(self) -> float: + return float(self._cfg["binning"]["step"]) + + @property + def bin_min(self) -> float: + return float(self._cfg["binning"]["min"]) + + @property + def bin_max(self) -> float: + return float(self._cfg["binning"]["max"]) From c2ee2a105da2f9ec88afc8e9fde6fc7ec061cd96 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 24 Jan 2024 20:13:58 +0100 Subject: [PATCH 073/140] implemnt dumping of scaling function parameters in yaml format readable by rate code --- menu_tools/object_performance/plotter.py | 53 ++++++++----------- .../object_performance/scaling_collection.py | 15 ++---- menu_tools/rate_plots/plotter.py | 25 +-------- menu_tools/utils/scalings.py | 41 +++++++++----- 4 files changed, 55 insertions(+), 79 deletions(-) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index b92e9128..1357e621 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -12,7 +12,8 @@ from menu_tools.object_performance.turnon_collection import TurnOnCollection from menu_tools.object_performance.config import PerformancePlotConfig from menu_tools.object_performance.scaling_collection import ScalingCollection -from menu_tools.utils import utils, objects +from menu_tools.utils import utils +from menu_tools.utils.objects import Object plt.style.use(hep.style.CMS) @@ -79,7 +80,7 @@ def _save_json(self, file_name): for obj_key, gen_hist_trig in self.turnon_collection.hists.items(): if obj_key == "ref": continue - obj = objects.Object( + obj = Object( nano_obj_name=obj_key.split("_")[0], obj_id_name=obj_key.split("_")[1], version=self.version, @@ -147,7 +148,7 @@ def _plot_efficiency_curve(self): continue efficiency, yerr = self.turnon_collection.get_efficiency(obj_key) - obj = objects.Object( + obj = Object( nano_obj_name=obj_key.split("_")[0], obj_id_name=obj_key.split("_")[1], version=self.version, @@ -194,7 +195,7 @@ def _plot_iso_vs_efficiency_curve(self): continue iso_vs_eff_hist = self._get_iso_vs_eff_hist(gen_hist_trig[0]) - obj = objects.Object( + obj = Object( nano_obj_name=obj_key.split("_")[0], obj_id_name=obj_key.split("_")[1], version=self.version, @@ -399,7 +400,6 @@ def plot(self): "scalings", f"{self.plot_name}_{self.version}", ) - print(plot_fname) plt.savefig(f"{plot_fname}.png") plt.savefig(f"{plot_fname}.pdf") self._save_json(f"{plot_fname}.json") @@ -441,28 +441,17 @@ def _get_scaling_thresholds(self, cfg_plot, test_obj): return self.scaling_thresholds["Jet"] raise RuntimeError("Failed to find thresholds in cfg_scaling_thresholds!") - def _LEGACY_rate_config_function(self, name: str, a: float, b: float): - pm = "+" if b < 0 else "" - f_string = ( - f"function :: {name}OfflineEtCut :: " - f"args:=(offline); lambda:=(offline{pm}{-b:.3f})/{a:.3f}" + def _write_scalings_to_file(self, obj: Object, params: np.array): + fpath = os.path.join( + "outputs", + "object_performance", + obj.version, + "scalings", ) - return f_string - - def _LEGACY_write_scalings_to_file( - self, plot_name: str, version: str, params: dict - ): - with open( - f"{self.outdir}/{version}/scalings/{plot_name}_scalings_{version}.txt", "w+" - ) as f: - f.write("") - - with open( - f"{self.outdir}/{version}/scalings/{plot_name}_scalings_{version}.txt", "a" - ) as f: - for obj, obj_params in params.items(): - a, b = obj_params - f.write(self._LEGACY_rate_config_function(obj, a, b) + "\n") + os.makedirs(fpath, exist_ok=True) + a, b = params + with open(os.path.join(fpath, f"{str(obj)}.yaml"), "w") as f: + yaml.dump({"offset": a, "slope": b}, f) def run(self): for plot_name, cfg_plot in self.cfg_plots.items(): @@ -472,6 +461,7 @@ def run(self): print(f">>> Scalings {plot_name} <<<") scalings = {} + scaling_function_params = {} for test_obj in plot_config.test_object_instances: scalings[str(test_obj)] = {} @@ -491,21 +481,22 @@ def run(self): ] = scaling_collection._compute_scalings( turnon_collection, test_obj, scaling_pct, method ) + # Fit parameters of scaling function + params = scaling_collection.fit_linear_function(scalings[str(test_obj)]) + scaling_function_params[str(test_obj)] = params + # Write scalings for test_obj to file for usage in rate part + self._write_scalings_to_file(test_obj, params) bar.finish() - params = scaling_collection._fit_linear_functions(scalings) plotter = ScalingPlotter( plot_name, cfg_plot, scalings, scaling_pct, turnon_collection.version, - params, + scaling_function_params, ) plotter.plot() - self._LEGACY_write_scalings_to_file( - plot_name, turnon_collection.version, params - ) def run(): diff --git a/menu_tools/object_performance/scaling_collection.py b/menu_tools/object_performance/scaling_collection.py index 3a52eb95..0a280288 100644 --- a/menu_tools/object_performance/scaling_collection.py +++ b/menu_tools/object_performance/scaling_collection.py @@ -219,13 +219,8 @@ def _compute_scalings( else: raise ValueError(f"`{method}` is not a valid scaling method!") - def _fit_linear_functions( - self, scalings: dict[str, dict[str, float]] - ) -> dict[str, np.array]: - params = {} - for obj, scaling_values in scalings.items(): - xdata = [th for th, val in scaling_values.items() if val] - ydata = [scaling_values[x] for x in xdata] - popt, pcov = curve_fit(utils.scaling_func, xdata, ydata) - params[obj] = popt - return params + def fit_linear_function(self, scaling_values: dict[float, float]) -> np.array: + xdata = [th for th, val in scaling_values.items() if val] + ydata = [scaling_values[x] for x in xdata] + popt, pcov = curve_fit(utils.scaling_func, xdata, ydata) + return popt diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index f149deb2..07997064 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -1,6 +1,5 @@ import argparse import os -import warnings import awkward as ak import matplotlib.pyplot as plt @@ -150,31 +149,9 @@ def __init__( self.version = version self.apply_offline_conversion = apply_offline_conversion if self.apply_offline_conversion: - self.scaling_params = self._load_scalings() + self.scaling_params = scalings.load_scaling_params(obj) self.arrays = self._load_cached_arrays() - def _load_scalings(self) -> dict: - try: - scaling_params = scalings.load_scaling_params(self.object) - except FileNotFoundError: - fpath = f"outputs/scalings/{self.version}/{self.object.nano_obj_name}.yaml!" - warnings.warn_explicit( - (f"No file was found at `{fpath}`"), - UserWarning, - filename="plotter.py", - lineno=158, - ) - raise UserWarning - except KeyError: - warnings.warn_explicit( - (f"Scalings for {self.object.obj_id_name} were found in `{fpath}`"), - UserWarning, - filename="plotter.py", - lineno=171, - ) - raise UserWarning - return scaling_params - def _transform_key(self, raw_key: str) -> str: """Maps to . diff --git a/menu_tools/utils/scalings.py b/menu_tools/utils/scalings.py index 640f5811..e9965cca 100644 --- a/menu_tools/utils/scalings.py +++ b/menu_tools/utils/scalings.py @@ -1,3 +1,5 @@ +import os +import warnings from typing import Optional import awkward as ak @@ -7,13 +9,31 @@ def load_scaling_params(obj: Object) -> dict: - fpath = f"outputs/scalings/{obj.version}/{obj.nano_obj_name}.yaml" - with open(fpath, "r") as f: - return yaml.safe_load(f)[obj.obj_id_name] + """Retrieves scalings for object (incl. id) from `outputs` + + Returns: + scaling_params: parameters computed in object_performance + for the online-offline scaling + """ + fpath = os.path.join( + "outputs", "object_performance", obj.version, "scalings", f"{str(obj)}.yaml" + ) + try: + with open(fpath, "r") as f: + scaling_params = yaml.safe_load(f) + except FileNotFoundError: + warnings.warn_explicit( + (f"No file was found at `{fpath}`"), + UserWarning, + filename="utils.py", + lineno=18, + ) + raise UserWarning + return scaling_params def compute_offline_pt( - arr: ak.Array, obj_scaling_params: dict, pt_var: Optional[str] = None + arr: ak.Array, obj_scaling_params: dict[str, float], pt_var: Optional[str] = None ) -> ak.Array: # initialise array of zeros identical to the original pt if pt_var is not None: @@ -29,18 +49,11 @@ def compute_offline_pt( "No branch to which to apply the scalings." " One of `et`, `pt` or `` must exist to compute offline pt/et." ) - new_pt = ak.zeros_like(pt_orig) - # loop through eta regions with its scaling parameters - for region, values in obj_scaling_params.items(): - # create eta mask for this eta region - eta_mask = (abs(arr.eta) >= values["eta_min"]) & ( - abs(arr.eta) < values["eta_max"] - ) - # scale pt for non-masked elements of this eta region - new_pt = new_pt + eta_mask * (pt_orig * values["slope"] + values["offset"]) + # scale pt for non-masked elements of this eta region + offline_pt = pt_orig * obj_scaling_params["slope"] + obj_scaling_params["offset"] - return new_pt + return offline_pt def add_offline_pt( From b44bc34f40c5950efb15a6a1133d8e2186bb374e Mon Sep 17 00:00:00 2001 From: mbonanom Date: Thu, 25 Jan 2024 12:17:50 +0100 Subject: [PATCH 074/140] [v29 rates] Fix typo in v29 table config --- rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml index edcf4879..1ea8b405 100644 --- a/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml +++ b/rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml @@ -129,8 +129,8 @@ L1_DoubleTkMu4_SQ_OS_dR_Max1p2: obj: gmtTkMuon 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+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: From dbf3285afa991f62c6d20e9bf5579794ea91cebd Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Fri, 26 Jan 2024 22:26:18 +0100 Subject: [PATCH 075/140] fix dumping of scalings --- menu_tools/object_performance/plotter.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 1357e621..84539564 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -416,18 +416,21 @@ def plot(self): class ScalingCentral: outdir = "outputs/object_performance/" - def __init__(self, cfg_plots_path): + def __init__(self, cfg_plots_path: str) -> None: with open(cfg_plots_path, "r") as f: self.cfg_plots = yaml.safe_load(f) with open("./configs/scaling_thresholds.yaml", "r") as f: self.scaling_thresholds = yaml.safe_load(f) - def _get_scaling_thresholds(self, cfg_plot, test_obj): + def _get_scaling_thresholds(self, cfg_plot, test_obj) -> list[int]: if test_obj in self.scaling_thresholds: return self.scaling_thresholds[test_obj] if any("Muon" in x for x in cfg_plot["test_objects"]): return self.scaling_thresholds["Muon"] - if any("Elec" in x or "Photon" in x for x in cfg_plot["test_objects"]): + if any( + any([y in x for x in cfg_plot["test_objects"]]) + for y in ["Ele", "EG", "Photon"] + ): return self.scaling_thresholds["EG"] if any("MHT" in x for x in cfg_plot["test_objects"]): return self.scaling_thresholds["MHT"] @@ -441,7 +444,15 @@ def _get_scaling_thresholds(self, cfg_plot, test_obj): return self.scaling_thresholds["Jet"] raise RuntimeError("Failed to find thresholds in cfg_scaling_thresholds!") - def _write_scalings_to_file(self, obj: Object, params: np.array): + def _write_scalings_to_file(self, obj: Object, params: np.array) -> None: + """Dumps the scaling parameters to a file. + + Writes the offset and slope params of the linear scaling function to + a yaml file for usage in the offline rate computation. + + Retruns: + None + """ fpath = os.path.join( "outputs", "object_performance", @@ -451,7 +462,7 @@ def _write_scalings_to_file(self, obj: Object, params: np.array): os.makedirs(fpath, exist_ok=True) a, b = params with open(os.path.join(fpath, f"{str(obj)}.yaml"), "w") as f: - yaml.dump({"offset": a, "slope": b}, f) + yaml.dump({"offset": float(a), "slope": float(b)}, f) def run(self): for plot_name, cfg_plot in self.cfg_plots.items(): From 32175842ff3bda1f0622ab0a9845ab1e24fa74d5 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Fri, 26 Jan 2024 22:26:55 +0100 Subject: [PATCH 076/140] fix version in config for rate plots --- menu_tools/rate_plots/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/menu_tools/rate_plots/config.py b/menu_tools/rate_plots/config.py index c758e101..1bd6ba83 100644 --- a/menu_tools/rate_plots/config.py +++ b/menu_tools/rate_plots/config.py @@ -17,11 +17,15 @@ def compare_versions(self) -> bool: @property def versions(self) -> list[str]: + if "version" in self._cfg.keys(): + version = self._cfg["version"] + if isinstance(version, str): + return [version] try: versions = self._cfg["versions"] except KeyError: raise ValueError( - "`versions` must be specified as either a single" + "`version(s)` must be specified as either a single" "version (e.g. `V30`) or a list of exactly two versions" "(e.g. [`V29`, `V30`])." ) From 61347e3ed240790e92865bc1f2bd01a4fd5c5de3 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Fri, 26 Jan 2024 22:28:13 +0100 Subject: [PATCH 077/140] add more rate plots --- configs/V29/rate_plots/test.yaml | 53 +++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/configs/V29/rate_plots/test.yaml b/configs/V29/rate_plots/test.yaml index 7d8fd3fb..a40d5152 100644 --- a/configs/V29/rate_plots/test.yaml +++ b/configs/V29/rate_plots/test.yaml @@ -1,10 +1,55 @@ -TestRatePlot: +JetDefaultRates: sample: MinBias - versions: V29 + version: V29 test_objects: - phase1PuppiJet:default - # - tkElectron:NoIso - # - puppiMET:default -- TODO: fix threshold applied on pt which does not exist here! + - seededConePuppiJet:default + # - trackerJet:default + binning: + min: 0 + max: 100 + step: 10 + +ElectronDefaultRates: + sample: MinBias + version: V29 + test_objects: + - EG:default + - tkElectron:NoIso + - tkElectron:Iso + binning: + min: 0 + max: 100 + step: 10 + +MuonRatesBarrel: + sample: MinBias + version: V29 + test_objects: + # - gmtMuon:barrel + - gmtTkMuon:barrel + binning: + min: 0 + max: 100 + step: 10 + +MuonRatesOverlap: + sample: MinBias + version: V29 + test_objects: + # - gmtMuon:overlap + - gmtTkMuon:overlap + binning: + min: 0 + max: 100 + step: 10 + +MuonRatesEndcap: + sample: MinBias + version: V29 + test_objects: + # - gmtMuon:endcap + - gmtTkMuon:endcap binning: min: 0 max: 100 From 3bcbc19ff0988224a45bfc67c9b7d98c8593d9b9 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Fri, 26 Jan 2024 22:43:39 +0100 Subject: [PATCH 078/140] Add online/offline to printout in rate plotting --- menu_tools/rate_plots/plotter.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index 07997064..63797248 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -258,7 +258,11 @@ def run(self, apply_offline_conversion: bool = False) -> None: """ # Iterate over plots for plot_name, cfg_plot in self.cfg_plots.items(): - print("Plotting ", plot_name) + print( + "Plotting ", + plot_name, + " Offline" if apply_offline_conversion else " Online" + ) plot_config = RatePlotConfig(cfg_plot, plot_name) rate_plot_data = {} From 63985fd9553ebfa555ed063ed94af4c92a165f46 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Fri, 26 Jan 2024 22:50:27 +0100 Subject: [PATCH 079/140] code formatting --- menu_tools/rate_plots/plotter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index 63797248..095df50d 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -261,7 +261,7 @@ def run(self, apply_offline_conversion: bool = False) -> None: print( "Plotting ", plot_name, - " Offline" if apply_offline_conversion else " Online" + " Offline" if apply_offline_conversion else " Online", ) plot_config = RatePlotConfig(cfg_plot, plot_name) rate_plot_data = {} From eb027208d74c7a7e02cd2b643524c22cff3dae8b Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Fri, 26 Jan 2024 23:21:56 +0100 Subject: [PATCH 080/140] fix code quality issues --- menu_tools/object_performance/plotter.py | 4 ++-- menu_tools/object_performance/scaling_collection.py | 6 ++---- menu_tools/rate_plots/config.py | 2 +- menu_tools/utils/config.py | 2 +- pyproject.toml | 6 +----- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 84539564..d2a50a0b 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -328,7 +328,7 @@ def __init__( scalings: dict, scaling_pct: float, version: str, - params: dict[str, np.array], + params: dict[str, np.ndarray], ): self.plot_name = plot_name self.cfg_plot = cfg_plot @@ -444,7 +444,7 @@ def _get_scaling_thresholds(self, cfg_plot, test_obj) -> list[int]: return self.scaling_thresholds["Jet"] raise RuntimeError("Failed to find thresholds in cfg_scaling_thresholds!") - def _write_scalings_to_file(self, obj: Object, params: np.array) -> None: + def _write_scalings_to_file(self, obj: Object, params: np.ndarray) -> None: """Dumps the scaling parameters to a file. Writes the offset and slope params of the linear scaling function to diff --git a/menu_tools/object_performance/scaling_collection.py b/menu_tools/object_performance/scaling_collection.py index 0a280288..93b4bd13 100644 --- a/menu_tools/object_performance/scaling_collection.py +++ b/menu_tools/object_performance/scaling_collection.py @@ -189,9 +189,7 @@ def _compute_scalings_tanh(self, turnon_collection, test_obj, scaling_pct) -> fl ) return percentage_point - def _compute_scalings_errf( - self, turnon_collection, test_obj, scalings, scaling_pct - ) -> float: + def _compute_scalings_errf(self, turnon_collection, test_obj, scaling_pct) -> float: bins = turnon_collection.bins bins = 0.5 * (bins[1:] + bins[:-1]) @@ -219,7 +217,7 @@ def _compute_scalings( else: raise ValueError(f"`{method}` is not a valid scaling method!") - def fit_linear_function(self, scaling_values: dict[float, float]) -> np.array: + def fit_linear_function(self, scaling_values: dict[float, float]) -> np.ndarray: xdata = [th for th, val in scaling_values.items() if val] ydata = [scaling_values[x] for x in xdata] popt, pcov = curve_fit(utils.scaling_func, xdata, ydata) diff --git a/menu_tools/rate_plots/config.py b/menu_tools/rate_plots/config.py index 1bd6ba83..26d9a9f9 100644 --- a/menu_tools/rate_plots/config.py +++ b/menu_tools/rate_plots/config.py @@ -12,7 +12,6 @@ def compare_versions(self) -> bool: Returns a boolean specifying if a plot comparing two versions is to be produced. If a list of two versions is given this is true. """ - return len(self.versions) == 2 @property @@ -36,6 +35,7 @@ def versions(self) -> list[str]: len(versions) == 2 ), "To compare versions, exactly two must be specified." return versions + raise RuntimeError("Somthing is wrong with the version config!") @property def test_objects(self) -> list: diff --git a/menu_tools/utils/config.py b/menu_tools/utils/config.py index 1300eb42..05419827 100644 --- a/menu_tools/utils/config.py +++ b/menu_tools/utils/config.py @@ -12,7 +12,7 @@ def __init__(self, cfg: dict[str, Any], name: Optional[str] = None) -> None: self._name = name @property - def plot_name(self) -> str: + def plot_name(self) -> Optional[str]: return self._name @property diff --git a/pyproject.toml b/pyproject.toml index 36320c81..105c1a6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,13 +55,9 @@ pythonpath = [ testpaths = [ "tests", ] - [tool.mypy] -exclude = [ - "**/tests", -] files = [ - "menu_tools/utils" + "menu_tools" ] disable_error_code = [ "import-untyped", From 8b1da350eec2e81498c97cfd31db1be618fcb09b Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 29 Jan 2024 15:39:40 +0100 Subject: [PATCH 081/140] Refactor Object constructor and include eta_range as obj_key postfix --- menu_tools/object_performance/config.py | 19 ++++---- menu_tools/object_performance/plotter.py | 9 ++-- .../tests/test_electron_v29.py | 4 +- .../object_performance/turnon_collection.py | 11 ++--- menu_tools/rate_plots/config.py | 8 ++-- menu_tools/utils/objects.py | 44 +++++++++++++++---- 6 files changed, 59 insertions(+), 36 deletions(-) diff --git a/menu_tools/object_performance/config.py b/menu_tools/object_performance/config.py index d5da2b62..a51dd89e 100644 --- a/menu_tools/object_performance/config.py +++ b/menu_tools/object_performance/config.py @@ -53,12 +53,15 @@ def test_objects(self) -> dict[str, Any]: if not all([":" in x for x in self._cfg["test_objects"]]): raise ValueError(f"Misconfigured obj:id key in {self.plot_name}!") - test_obj = { - x: {"base_obj": x.split(":")[0], "id": x.split(":")[1], "x_arg": x_arg} - for x, x_arg in self._cfg["test_objects"].items() - } + return self._cfg["test_objects"] - return test_obj + # DEPRECATED + # test_obj = { + # x: {"base_obj": x.split(":")[0], "id": x.split(":")[1], "x_arg": x_arg} + # for x, x_arg in self._cfg["test_objects"].items() + # } + + # return test_obj @property def matching(self): @@ -95,8 +98,6 @@ def ylabel(self): @property def test_object_instances(self) -> list: test_objects = [] - for obj in self._cfg["test_objects"]: - nano_obj_name = obj.split(":")[0] - obj_id_name = obj.split(":")[1] - test_objects.append(Object(nano_obj_name, obj_id_name, self.version)) + for obj_key in self._cfg["test_objects"]: + test_objects.append(Object(obj_key, self.version)) return test_objects diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index d2a50a0b..9a7608b4 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -81,8 +81,7 @@ def _save_json(self, file_name): if obj_key == "ref": continue obj = Object( - nano_obj_name=obj_key.split("_")[0], - obj_id_name=obj_key.split("_")[1], + obj_key, version=self.version, ) @@ -149,8 +148,7 @@ def _plot_efficiency_curve(self): efficiency, yerr = self.turnon_collection.get_efficiency(obj_key) obj = Object( - nano_obj_name=obj_key.split("_")[0], - obj_id_name=obj_key.split("_")[1], + obj_key, version=self.version, ) @@ -196,8 +194,7 @@ def _plot_iso_vs_efficiency_curve(self): iso_vs_eff_hist = self._get_iso_vs_eff_hist(gen_hist_trig[0]) obj = Object( - nano_obj_name=obj_key.split("_")[0], - obj_id_name=obj_key.split("_")[1], + obj_key, version=self.version, ) diff --git a/menu_tools/object_performance/tests/test_electron_v29.py b/menu_tools/object_performance/tests/test_electron_v29.py index f667102b..2a0788cc 100644 --- a/menu_tools/object_performance/tests/test_electron_v29.py +++ b/menu_tools/object_performance/tests/test_electron_v29.py @@ -35,8 +35,10 @@ def test_isolation_barrel(): for key, val in reference_data.items(): if isinstance(val, dict): + if "tkEle" in key: + test_key = "tkElectron:NoIso:inclusive" efficiencies_test = np.array( - test_result[key]["efficiency"], dtype=np.float64 + test_result[test_key]["efficiency"], dtype=np.float64 ) efficiencies_reference = np.array(val["efficiency"], dtype=np.float64) print(efficiencies_reference) diff --git a/menu_tools/object_performance/turnon_collection.py b/menu_tools/object_performance/turnon_collection.py index b9cb74c0..50e13556 100644 --- a/menu_tools/object_performance/turnon_collection.py +++ b/menu_tools/object_performance/turnon_collection.py @@ -63,9 +63,7 @@ def _load_test_branches(self) -> None: """ Load test objects. """ - test_objects = self.cfg_plot.test_objects - for test_obj, obj_cfg in test_objects.items(): - obj = Object(obj_cfg["base_obj"], obj_cfg["id"], self.cfg_plot.version) + for obj in self.cfg_plot.test_object_instances: test_array = self._load_array_from_parquet(obj.nano_obj_name) test_array = ak.with_name(test_array, "Momentum4D") self.turnon_collection.ak_arrays[str(obj)] = test_array @@ -99,10 +97,9 @@ def test_objects(self) -> list[tuple[Object, str]]: obj_args = [] test_objects = self.cfg_plot.test_objects - for test_obj, obj_cfg in test_objects.items(): - obj = Object(obj_cfg["base_obj"], obj_cfg["id"], self.cfg_plot.version) - x_arg = obj_cfg["x_arg"].lower() - obj_args.append((obj, x_arg)) + for obj_key, x_arg in test_objects.items(): + obj = Object(obj_key, self.cfg_plot.version) + obj_args.append((obj, x_arg.lower())) return obj_args diff --git a/menu_tools/rate_plots/config.py b/menu_tools/rate_plots/config.py index 26d9a9f9..461336ab 100644 --- a/menu_tools/rate_plots/config.py +++ b/menu_tools/rate_plots/config.py @@ -44,10 +44,8 @@ def test_objects(self) -> list: @property def test_object_instances(self) -> dict[str, dict[str, Object]]: test_objects: dict[str, dict[str, Object]] = {} - for obj in self._cfg["test_objects"]: - nano_obj_name = obj.split(":")[0] - obj_id_name = obj.split(":")[1] - test_objects[obj] = {} + for obj_key in self._cfg["test_objects"]: + test_objects[obj_key] = {} for version in self.versions: - test_objects[obj][version] = Object(nano_obj_name, obj_id_name, version) + test_objects[obj_key][version] = Object(obj_key, version) return test_objects diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index 37ad6cf6..3ce868fd 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -17,22 +17,50 @@ class Object: version: version of the menu """ - def __init__(self, nano_obj_name: str, obj_id_name: str, version: str) -> None: + def __init__( + self, + object_key: str, + version: str, + ) -> None: """Initializes an Object loading the parameters from the corresponding config file. Args: - nano_obj_name: name of the physics object in the l1 ntuples - obj_id_name: name of the l1 object id as defined in `configs` + object_key: object/id specifier of the form l1_object:id[:eta_range] version: version of the menu """ - self.nano_obj_name = nano_obj_name - self.obj_id_name = obj_id_name + self.object_key = object_key self.version = version self._nano_obj # fail early if no config can be found def __str__(self) -> str: - return f"{self.nano_obj_name}_{self.obj_id_name}" + return f"{self.nano_obj_name}:{self.obj_id_name}:{self.eta_range}" + + @property + def file_ext(self) -> str: + return str(self).replace(":", "_") + + @property + def nano_obj_name(self) -> str: + return self.object_key.split(":")[0] + + @property + def obj_id_name(self) -> str: + return self.object_key.split(":")[1] + + @property + def eta_range(self) -> str: + """If an eta range other than "inclusive" is specified, a cut to that + range is added to `cuts`. + + Returns: + eta_range_key: `barrel`/`endcap`/`overlap`/`forward`/`inclusive` + """ + try: + eta_range_key = self.object_key.split(":")[2] + except IndexError: + eta_range_key = "inclusive" + return eta_range_key @property def _nano_obj(self) -> dict[str, dict]: @@ -147,8 +175,8 @@ def compute_selection_mask_for_object_cuts(obj: Object, ak_array: ak.Array) -> a if __name__ == "__main__": - x = Object("tkElectron", "Iso", "V29") - x = Object("caloJet", "default", "V29") + x = Object("tkElectron:Iso", "V29") + x = Object("caloJet:default", "V29") print(x) print(x.match_dR) print(x.plot_label) From 86232c22fa58d0c243750b1b6451c10b072b7ac8 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 29 Jan 2024 15:51:48 +0100 Subject: [PATCH 082/140] add cut specified by :eta_region in obj key to object cuts --- menu_tools/utils/objects.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index 3ce868fd..2b990a78 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -60,6 +60,9 @@ def eta_range(self) -> str: eta_range_key = self.object_key.split(":")[2] except IndexError: eta_range_key = "inclusive" + assert ( + eta_range_key in self.eta_ranges.keys() + ), "`eta` range specifier not found in object definition!" return eta_range_key @property @@ -133,13 +136,18 @@ def eta_ranges(self) -> dict[str, tuple]: @property def cuts(self) -> Optional[dict[str, list[str]]]: + _cuts = {} + if "cuts" in self._object_params.keys(): + _cuts = self._object_params["cuts"] + if self.eta_range != "inclusive": + eta_min = self.eta_ranges[self.eta_range][0] + eta_max = self.eta_ranges[self.eta_range][1] + global_eta_cut = f"abs({{eta}}) > {eta_min} & abs({{eta}}) < {eta_max}" try: - if not all([re.match(r"^range\d", x) for x in self._object_params["cuts"]]): - raise ValueError( - "Cuts for objects have to be specified eta ranges `range0/1/2` ..." - ) - return self._object_params["cuts"] + _cuts["inclusive"].append(global_eta_cut) except KeyError: + _cuts["inclusive"] = [global_eta_cut] + if not _cuts: print(f"No cuts will be applied for {self}!") return None From c1dbeb3857e320e572589b59d81c5e751e0bd029 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 29 Jan 2024 16:02:18 +0100 Subject: [PATCH 083/140] change naming of ranges and fix previous commit --- configs/V29/objects/electrons.yaml | 38 +++++++++++++++--------------- configs/V29/objects/jets.yaml | 24 +++++++++---------- configs/V29/objects/muons.yaml | 18 +++++++------- configs/V29/objects/photons.yaml | 22 ++++++++--------- configs/V29/objects/taus.yaml | 8 +++---- menu_tools/utils/objects.py | 16 ++++++++----- 6 files changed, 65 insertions(+), 61 deletions(-) diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index 02bfd1d1..a67976d0 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -1,24 +1,24 @@ part_e: label: "Gen Electron" eta_ranges: - range0: [0, 5] + inclusive: [0, 5] ids: gen_electron_default: cuts: - range0: + inclusive: - "{dr_0.3} < 0.15" tkElectron: match_dR: 0.15 eta_ranges: - range0: [0, 5] - range1: [0, 1.479] - range2: [1.479, 5] + inclusive: [0, 5] + barrel: [0, 1.479] + beyond_barrel: [1.479, 5] ids: NoIso: label: "TkElectron" cuts: - range0: + inclusive: - "abs({eta}) < 2.4" - "({passeseleid} == 1) | ({pt} < 25)" NoIsoForIso: @@ -26,41 +26,41 @@ tkElectron: # isoloation wp derivation label: "TkElectron id in barrel" cuts: - range0: + inclusive: - "abs({eta}) < 2.4" - range1: + barrel: - "({passeseleid} == 1) | ({pt} < 25)" Iso: label: "TkIsoElectron" cuts: - range0: + inclusive: - "abs({eta}) < 2.4" - range1: + barrel: - "abs({trkiso}) < 0.13" - "({passeseleid} == 1) | ({pt} < 25)" - range2: + beyond_barrel: - "abs({trkiso}) < 0.28" EG: match_dR: 0.2 eta_ranges: - range0: [0, 5] - range1: [0, 1.479] - range2: [1.479, 3.0] + inclusive: [0, 5] + barrel: [0, 1.479] + beyond_barrel: [1.479, 3.0] label: "EG" ids: default: cuts: - range0: + inclusive: - "abs({eta}) < 3.0" - range1: + barrel: - "{passeseleid} == 1" - range2: + beyond_barrel: - "{passessaid} == 1" eleid: cuts: - range0: + inclusive: - "abs({eta}) < 3.0" - "{passeseleid} == 1" - range2: + beyond_barrel: - "{passessaid} == 1" diff --git a/configs/V29/objects/jets.yaml b/configs/V29/objects/jets.yaml index 3ccebb27..c5ea8f74 100644 --- a/configs/V29/objects/jets.yaml +++ b/configs/V29/objects/jets.yaml @@ -2,29 +2,29 @@ caloJet: match_dR: 0.3 label: "Calo Jet" eta_ranges: - range0: [0, 7] + inclusive: [0, 7] cuts: - range0: + inclusive: - "abs({eta}) < 7" ids: default: cuts: - range0: + inclusive: - "abs({eta}) < 7" seededConeExtendedPuppiJet: match_dR: 0.35 label: "Seeded Cone Extended PuppiJet" eta_ranges: - range0: [0, 7] + inclusive: [0, 7] ids: default: cuts: - range0: + inclusive: - "abs({eta}) < 5" bjetnn: cuts: - range0: + inclusive: - "abs({eta}) < 2.4" - "{bjetnn} > 0.71" @@ -32,31 +32,31 @@ phase1PuppiJet: match_dR: 0.3 label: "Histogrammed PuppiJet" eta_ranges: - range0: [0, 7] + inclusive: [0, 7] ids: default: cuts: - range0: + inclusive: - "abs({eta}) < 7" seededConePuppiJet: match_dR: 0.35 label: "Seeded Cone PuppiJet" eta_ranges: - range0: [0, 7] + inclusive: [0, 7] ids: default: cuts: - range0: + inclusive: - "abs({eta}) < 7" trackerJet: match_dR: 0.4 label: "Tracker Jet" eta_ranges: - range0: [0, 7] + inclusive: [0, 7] ids: default: cuts: - range0: + inclusive: - "abs({eta}) < 7" diff --git a/configs/V29/objects/muons.yaml b/configs/V29/objects/muons.yaml index a5fafce1..6341785e 100644 --- a/configs/V29/objects/muons.yaml +++ b/configs/V29/objects/muons.yaml @@ -2,21 +2,21 @@ gmtMuon: label: "GMT Muon" match_dR: 0.3 eta_ranges: - range0: [0, 5] + inclusive: [0, 5] ids: default: {} barrel: cuts: - range0: + inclusive: - "abs({eta}) < 0.83" overlap: cuts: - range0: + inclusive: - "abs({eta}) > 0.83" - "abs({eta}) < 1.24" endcap: cuts: - range0: + inclusive: - "abs({eta}) > 1.24" - "abs({eta}) < 2.4" @@ -25,26 +25,26 @@ gmtTkMuon: label: "GMT TkMuon" match_dR: 0.1 eta_ranges: - range0: [0, 5] + inclusive: [0, 5] cuts: - range0: + inclusive: - "{quality} > 0" ids: default: {} barrel: cuts: - range0: + inclusive: - "abs({eta}) < 0.83" - "{quality} > 0" overlap: cuts: - range0: + inclusive: - "abs({eta}) > 0.83" - "abs({eta}) < 1.24" - "{quality} > 0" endcap: cuts: - range0: + inclusive: - "abs({eta}) > 1.24" - "abs({eta}) < 2.4" - "{quality} > 0" diff --git a/configs/V29/objects/photons.yaml b/configs/V29/objects/photons.yaml index ef53a01b..12df4507 100644 --- a/configs/V29/objects/photons.yaml +++ b/configs/V29/objects/photons.yaml @@ -1,40 +1,40 @@ tkPhoton: match_dR: 0.15 eta_ranges: - range0: [0, 5] - range1: [0, 1.479] - range2: [1.479, 2.4] + inclusive: [0, 5] + barrel: [0, 1.479] + endcap: [1.479, 2.4] ids: NoIso: label: "tkPhoton" cuts: - range0: + inclusive: - "abs({eta}) < 3.0" - range1: + barrel: - "{passeseleid} == 1" - range2: + endcap: - "{passesphoid} == 1" Iso: label: "tkIsoPhoton" cuts: - range0: + inclusive: - "abs({eta}) < 3.0" - range1: + barrel: - "abs({trkiso}) < 0.2" - "{passeseleid} == 1" - range2: + endcap: - "abs({trkiso}) < 0.2" - "{passesphoid} == 1" barrel: label: "TkPhoton" cuts: - range0: + inclusive: - "abs({eta}) < 1.479" - "{passeseleid} == 1" endcap: label: "TkIsoPhoton" cuts: - range0: + inclusive: - "abs({eta}) > 1.479" - "abs({eta}) < 2.4" - "{passesphoid} == 1" diff --git a/configs/V29/objects/taus.yaml b/configs/V29/objects/taus.yaml index 90f6cb62..ed35cda6 100644 --- a/configs/V29/objects/taus.yaml +++ b/configs/V29/objects/taus.yaml @@ -2,9 +2,9 @@ nnTau: label: "NN Tau" match_dR: 0.1 eta_ranges: - range0: [0, 5] + inclusive: [0, 5] cuts: - range0: + inclusive: - "abs({eta}) < 2.4" - "{passloosenn}==1" ids: @@ -14,9 +14,9 @@ caloTau: label: "Calo Tau" match_dR: 0.3 eta_ranges: - range0: [0, 5] + inclusive: [0, 5] cuts: - range0: + inclusive: - "abs({eta}) < 2.4" ids: default: {} diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index 2b990a78..bc15fe66 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -132,7 +132,10 @@ def plot_label(self) -> str: @property def eta_ranges(self) -> dict[str, tuple]: - return self._object_params["eta_ranges"] + _eta_ranges = self._object_params["eta_ranges"] + if "inclusive" not in _eta_ranges: + _eta_ranges["inclusive"] = [0, 7] + return _eta_ranges @property def cuts(self) -> Optional[dict[str, list[str]]]: @@ -140,16 +143,17 @@ def cuts(self) -> Optional[dict[str, list[str]]]: if "cuts" in self._object_params.keys(): _cuts = self._object_params["cuts"] if self.eta_range != "inclusive": + # if a region other than inclusive is specified an eta cut eta_min = self.eta_ranges[self.eta_range][0] eta_max = self.eta_ranges[self.eta_range][1] global_eta_cut = f"abs({{eta}}) > {eta_min} & abs({{eta}}) < {eta_max}" - try: - _cuts["inclusive"].append(global_eta_cut) - except KeyError: - _cuts["inclusive"] = [global_eta_cut] + try: + _cuts["inclusive"].append(global_eta_cut) + except KeyError: + _cuts["inclusive"] = [global_eta_cut] if not _cuts: print(f"No cuts will be applied for {self}!") - return None + return _cuts def compute_selection_mask_for_object_cuts(obj: Object, ak_array: ak.Array) -> ak.Array: From 08287a93954499f040c02954cf014f6b00394a47 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 29 Jan 2024 16:19:33 +0100 Subject: [PATCH 084/140] fix scalings plot label --- menu_tools/object_performance/plotter.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 9a7608b4..09bda959 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -334,9 +334,9 @@ def __init__( self.version = version self.scaling_pct = scaling_pct - def _params_to_func_str(self, obj): - a = round(self.params[obj][0], 3) - b = round(self.params[obj][1], 3) + def _params_to_func_str(self, obj_key: str): + a = round(self.params[obj_key][0], 3) + b = round(self.params[obj_key][1], 3) pm = "+" if b > 0 else "-" return f"y = {a} x {pm} {abs(b)}" @@ -363,13 +363,14 @@ def plot(self): self._make_output_dirs(self.version) fig, ax = self._create_new_plot() - for obj, points in self.scalings.items(): + for obj_key, points in self.scalings.items(): + obj = Object(obj_key, self.version) x_points = np.array(list(points.keys())) y_points = np.array(list(points.values())) pts = ax.plot(x_points, y_points, "o") - label = obj + ", " + self._params_to_func_str(obj) # TODO: Fix label! - a, b = self.params[obj] + label = obj.plot_label + ", " + self._params_to_func_str(obj_key) + a, b = self.params[obj_key] x = np.linspace(0, 2500, 20) y = utils.scaling_func(x, a, b) ax.plot(x, y, color=pts[0].get_color(), label=label) From 38f5aa2ed3157b2dd58f0ca02429e9c51c1ffc63 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 29 Jan 2024 16:26:19 +0100 Subject: [PATCH 085/140] remove unused function --- menu_tools/object_performance/plotter.py | 2 +- menu_tools/utils/objects.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 09bda959..ada63958 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -459,7 +459,7 @@ def _write_scalings_to_file(self, obj: Object, params: np.ndarray) -> None: ) os.makedirs(fpath, exist_ok=True) a, b = params - with open(os.path.join(fpath, f"{str(obj)}.yaml"), "w") as f: + with open(os.path.join(fpath, str(obj) + ".yaml"), "w") as f: yaml.dump({"offset": float(a), "slope": float(b)}, f) def run(self): diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index bc15fe66..8f31fcf9 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -36,10 +36,6 @@ def __init__( def __str__(self) -> str: return f"{self.nano_obj_name}:{self.obj_id_name}:{self.eta_range}" - @property - def file_ext(self) -> str: - return str(self).replace(":", "_") - @property def nano_obj_name(self) -> str: return self.object_key.split(":")[0] From 193e5a1d43b39c59a43daa4088d957d581376703 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 29 Jan 2024 17:26:17 +0100 Subject: [PATCH 086/140] finish untested integration of eta dependent scalings and rate plots --- .../object_performance/electron_trigger.yaml | 12 ++-- menu_tools/rate_plots/plotter.py | 10 +-- menu_tools/utils/objects.py | 2 +- menu_tools/utils/scalings.py | 64 ++++++++++--------- 4 files changed, 46 insertions(+), 42 deletions(-) diff --git a/configs/V29/object_performance/electron_trigger.yaml b/configs/V29/object_performance/electron_trigger.yaml index 4e123f65..8e982ed8 100644 --- a/configs/V29/object_performance/electron_trigger.yaml +++ b/configs/V29/object_performance/electron_trigger.yaml @@ -13,9 +13,9 @@ ElectronsTriggerBarrel: object: - "abs({eta}) < 2.8" test_objects: - EG:default: "Pt" - tkElectron:NoIso: "Pt" - tkElectron:Iso: "Pt" + EG:default:barrel: "Pt" + tkElectron:NoIso:barrel: "Pt" + tkElectron:Iso:barrel: "Pt" thresholds: [10, 20, 30, 40] scalings: method: "naive" @@ -42,9 +42,9 @@ ElectronsTriggerEndcap: object: - "abs({eta}) < 2.8" test_objects: - EG:default: "Pt" - tkElectron:NoIso: "Pt" - tkElectron:Iso: "Pt" + EG:default:beyond_barrel: "Pt" + tkElectron:NoIso:beyond_barrel: "Pt" + tkElectron:Iso:beyond_barrel: "Pt" thresholds: [10, 20, 30, 40] scalings: method: "naive" diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index 095df50d..78dc2e84 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -148,8 +148,6 @@ def __init__( self.sample = sample self.version = version self.apply_offline_conversion = apply_offline_conversion - if self.apply_offline_conversion: - self.scaling_params = scalings.load_scaling_params(obj) self.arrays = self._load_cached_arrays() def _transform_key(self, raw_key: str) -> str: @@ -181,7 +179,8 @@ def _load_cached_arrays(self): # Apply scalings if so configured if self.apply_offline_conversion: - arr["pt"] = scalings.compute_offline_pt(arr, self.scaling_params, "pt") + arr = scalings.add_offline_pt(arr, self.object) + arr["pt"] = scalings.get_pt_branch[arr] return arr @@ -194,7 +193,10 @@ def compute_rate(self, threshold: float) -> float: rate: rate computed after all object cuts are applied """ mask = objects.compute_selection_mask_for_object_cuts(self.object, self.arrays) - mask = mask & (self.arrays.pt >= threshold) + if self.apply_offline_conversion: + mask = mask & (self.arrays.offline_pt >= threshold) + else: + mask = mask & (self.arrays.pt >= threshold) rate = ak.sum(ak.any(mask, axis=1)) / len(mask) * constants.RATE_NORM_FACTOR return rate diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index 8f31fcf9..5a3d06d7 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -127,7 +127,7 @@ def plot_label(self) -> str: return self._object_params["label"] @property - def eta_ranges(self) -> dict[str, tuple]: + def eta_ranges(self) -> dict[str, tuple[float, float]]: _eta_ranges = self._object_params["eta_ranges"] if "inclusive" not in _eta_ranges: _eta_ranges["inclusive"] = [0, 7] diff --git a/menu_tools/utils/scalings.py b/menu_tools/utils/scalings.py index e9965cca..a906359f 100644 --- a/menu_tools/utils/scalings.py +++ b/menu_tools/utils/scalings.py @@ -1,6 +1,5 @@ import os import warnings -from typing import Optional import awkward as ak import yaml @@ -8,15 +7,19 @@ from menu_tools.utils.objects import Object -def load_scaling_params(obj: Object) -> dict: - """Retrieves scalings for object (incl. id) from `outputs` +def load_scaling_params(obj: Object, eta_range: str) -> tuple[float, float]: + """Retrieves scalings for object+id from `outputs` + + obj: Object for which to retrive scaling parameters + eta_range: specifier of the range for which scalings are to be retrieved Returns: scaling_params: parameters computed in object_performance for the online-offline scaling """ + fname = str(obj).replace("inclusive", eta_range) fpath = os.path.join( - "outputs", "object_performance", obj.version, "scalings", f"{str(obj)}.yaml" + "outputs", "object_performance", obj.version, "scalings", fname + ".yaml" ) try: with open(fpath, "r") as f: @@ -29,43 +32,42 @@ def load_scaling_params(obj: Object) -> dict: lineno=18, ) raise UserWarning - return scaling_params + return scaling_params["slope"], scaling_params["offset"] -def compute_offline_pt( - arr: ak.Array, obj_scaling_params: dict[str, float], pt_var: Optional[str] = None -) -> ak.Array: - # initialise array of zeros identical to the original pt - if pt_var is not None: - pt_orig = arr[pt_var] - elif "et" in arr.fields: +def get_pt_branch(arr: ak.Array) -> ak.Array: + if "et" in arr.fields: pt_orig = arr.et elif "pt" in arr.fields: pt_orig = arr.pt elif "" in arr.fields: pt_orig = arr[""][:, 0] else: - raise ValueError( - "No branch to which to apply the scalings." - " One of `et`, `pt` or `` must exist to compute offline pt/et." - ) - - # scale pt for non-masked elements of this eta region - offline_pt = pt_orig * obj_scaling_params["slope"] + obj_scaling_params["offset"] + raise RuntimeError("Unknown pt branch!") + return pt_orig - return offline_pt - -def add_offline_pt( - arr: ak.Array, obj_scaling_params: dict, pt_var: Optional[str] = None -) -> ak.Array: +def add_offline_pt(arr: ak.Array, obj: Object) -> ak.Array: """ - Use the scalings to convert online pT to offline pT. - The `pt_var` argument can be used to specify which observables - should be used as "pT" for a given object. - If `pt_var` is not specified, `pt` or `et` are used. - For each object, a dedicated scaling in the barrel/endcap regions - is applied to the online pT. + Add offline pt to filed called `offline_pt` and return array """ - new_pt = compute_offline_pt(arr, obj_scaling_params, pt_var) + pt_orig = get_pt_branch(arr) + new_pt = ak.zeros_like(pt_orig) + + if len(obj.eta_ranges) == 1: + # if only a single eta range is configured, the scalings are applied + # inclusively on that region + slope, offset = load_scaling_params(obj, "inclusive") + new_pt = new_pt + (pt_orig * slope + offset) + else: + # if multiple eta ranges are found, the "inclusive" range is skipped + # and all other ranges are applied + for eta_range, eta_min_max in obj.eta_ranges.items(): + if eta_range == "inclusive": + continue + slope, offset = load_scaling_params(obj, eta_range) + eta_mask = (abs(arr.eta) >= eta_min_max[0]) & ( + abs(arr.eta) < eta_min_max[1] + ) + new_pt = new_pt + eta_mask * (pt_orig * slope + offset) return ak.with_field(arr, new_pt, "offline_pt") From a89f9f973a37bdf346581645d5ed62119fa130da Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 11:58:08 +0100 Subject: [PATCH 087/140] fix bug in logic of added cut on :region in Object class --- menu_tools/utils/objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index 5a3d06d7..1b281bf3 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -142,7 +142,7 @@ def cuts(self) -> Optional[dict[str, list[str]]]: # if a region other than inclusive is specified an eta cut eta_min = self.eta_ranges[self.eta_range][0] eta_max = self.eta_ranges[self.eta_range][1] - global_eta_cut = f"abs({{eta}}) > {eta_min} & abs({{eta}}) < {eta_max}" + global_eta_cut = f"((abs({{eta}}) > {eta_min}) & (abs({{eta}}) < {eta_max}))" try: _cuts["inclusive"].append(global_eta_cut) except KeyError: From 54ea4856916bccfc09086299b2bd86bbb67b903a Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 11:58:44 +0100 Subject: [PATCH 088/140] fix bug in plotter --- menu_tools/rate_plots/plotter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index 78dc2e84..05902b50 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -180,7 +180,7 @@ def _load_cached_arrays(self): # Apply scalings if so configured if self.apply_offline_conversion: arr = scalings.add_offline_pt(arr, self.object) - arr["pt"] = scalings.get_pt_branch[arr] + arr["pt"] = scalings.get_pt_branch(arr) return arr @@ -298,5 +298,5 @@ def run(self, apply_offline_conversion: bool = False) -> None: args = parser.parse_args() plotter = RatePlotCentral(args.cfg_plots) - plotter.run() plotter.run(apply_offline_conversion=True) + plotter.run() From 9d47a25277f96bfd50431bdd6854d8b5da820b2c Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 11:59:12 +0100 Subject: [PATCH 089/140] add eta ranges to jet objects for scaling application --- configs/V29/objects/jets.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configs/V29/objects/jets.yaml b/configs/V29/objects/jets.yaml index c5ea8f74..b2128853 100644 --- a/configs/V29/objects/jets.yaml +++ b/configs/V29/objects/jets.yaml @@ -33,6 +33,9 @@ phase1PuppiJet: label: "Histogrammed PuppiJet" eta_ranges: inclusive: [0, 7] + barrel: [0, 1.5] + endcap: [1.5, 2.4] + forward: [2.4, 5] ids: default: cuts: @@ -44,6 +47,9 @@ seededConePuppiJet: label: "Seeded Cone PuppiJet" eta_ranges: inclusive: [0, 7] + barrel: [0, 1.5] + endcap: [1.5, 2.4] + forward: [2.4, 5] ids: default: cuts: @@ -55,6 +61,8 @@ trackerJet: label: "Tracker Jet" eta_ranges: inclusive: [0, 7] + barrel: [0, 1.5] + endcap: [1.5, 2.4] ids: default: cuts: From f37ed3aacf5bc48a6616e071998fd7af8342b207 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 11:59:55 +0100 Subject: [PATCH 090/140] add cut on L1 eta for scaling derivation for jets --- configs/V29/object_performance/jets_trigger.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/configs/V29/object_performance/jets_trigger.yaml b/configs/V29/object_performance/jets_trigger.yaml index 93c4f3d6..feb5d7c6 100644 --- a/configs/V29/object_performance/jets_trigger.yaml +++ b/configs/V29/object_performance/jets_trigger.yaml @@ -12,9 +12,9 @@ JetTurnonBarrel: object: - "abs({eta}) < 2.4" test_objects: - phase1PuppiJet:default: "Pt" - seededConePuppiJet:default: "Pt" - trackerJet:default: "Pt" + phase1PuppiJet:default:barrel: "Pt" + seededConePuppiJet:default:barrel: "Pt" + trackerJet:default:barrel: "Pt" thresholds: [50, 100] scalings: method: "naive" @@ -40,9 +40,9 @@ JetTurnonEndcap: object: - "abs({eta}) < 2.4" test_objects: - phase1PuppiJet:default: "Pt" - seededConePuppiJet:default: "Pt" - trackerJet:default: "Pt" + phase1PuppiJet:default:endcap: "Pt" + seededConePuppiJet:default:endcap: "Pt" + trackerJet:default:endcap: "Pt" thresholds: [50] scalings: method: "naive" @@ -68,8 +68,8 @@ JetTurnonForward: object: - "abs({eta}) < 5" test_objects: - phase1PuppiJet:default: "Pt" - seededConePuppiJet:default: "Pt" + phase1PuppiJet:default:forward: "Pt" + seededConePuppiJet:default:forward: "Pt" thresholds: [50, 100] scalings: method: "naive" From 399c96d842c1256944d8a91398b7679bdf7532ec Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 13:27:50 +0100 Subject: [PATCH 091/140] fix HT plots and add tests --- .../ElectronsIsolation_Barrel_-999_V29.json | 4 +- .../reference_data/HT_50perc_350_V29.json | 620 ++++++++++++++++++ .../reference_data/HT_50perc_350_V29.yaml | 27 + .../reference_data/HT_90perc_350_V29.json | 620 ++++++++++++++++++ .../reference_data/HT_90perc_350_V29.yaml | 27 + ...st_electron_v29.py => test_turnons_v29.py} | 21 +- menu_tools/utils/objects.py | 4 +- 7 files changed, 1313 insertions(+), 10 deletions(-) create mode 100644 menu_tools/object_performance/tests/reference_data/HT_50perc_350_V29.json create mode 100644 menu_tools/object_performance/tests/reference_data/HT_50perc_350_V29.yaml create mode 100644 menu_tools/object_performance/tests/reference_data/HT_90perc_350_V29.json create mode 100644 menu_tools/object_performance/tests/reference_data/HT_90perc_350_V29.yaml rename menu_tools/object_performance/tests/{test_electron_v29.py => test_turnons_v29.py} (67%) diff --git a/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json b/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json index b2973374..76626ecc 100644 --- a/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json +++ b/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json @@ -2,7 +2,7 @@ "xlabel": "Isolation", "ylabel": "Efficiency (Barrel)", "watermark": "V29_ElectronsIsolation_Barrel_-999", - "tkElectron_NoIso": { + "tkElectron:NoIso:inclusive": { "label": "TkElectron", "efficiency": [ 0.9405951546885947, @@ -522,4 +522,4 @@ "markersize": 8 } } -} \ No newline at end of file +} diff --git a/menu_tools/object_performance/tests/reference_data/HT_50perc_350_V29.json b/menu_tools/object_performance/tests/reference_data/HT_50perc_350_V29.json new file mode 100644 index 00000000..1189c8fb --- /dev/null +++ b/menu_tools/object_performance/tests/reference_data/HT_50perc_350_V29.json @@ -0,0 +1,620 @@ +{ + "xlabel": "Gen. HT (GeV)", + "ylabel": "Trigger Efficiency (350 GeV)", + "watermark": "V29_HT_50perc_350", + "trackerHT:default:inclusive": { + "label": "Tracker HT", + "efficiency": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.00013333333333333334, + 0.0, + 0.0, + 0.0002831657935721365, + 0.00015202189115232594, + 0.00017137960582690659, + 0.0005751533742331289, + 0.0013259668508287293, + 0.0010070493454179255, + 0.0011458034947006588, + 0.0047169811320754715, + 0.0065334358186010764, + 0.009683098591549295, + 0.020813623462630087, + 0.02336448598130841, + 0.048731642189586116, + 0.05747126436781609, + 0.061837455830388695, + 0.09765625, + 0.10372040586245772, + 0.12862547288776796, + 0.1485148514851485, + 0.22085889570552147, + 0.26119402985074625, + 0.23586744639376217, + 0.288135593220339 + ], + "efficiency_err": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.00011008648525952339, + 0.0, + 0.0, + 0.0001823513829141161, + 0.0001255167107782635, + 0.0001414994374845714, + 0.00031192164388792805, + 0.0005236922261730564, + 0.00048009876080158523, + 0.0005462387052469576, + 0.001238184873004851, + 0.0015586180038634307, + 0.002032740516790456, + 0.003086696109909668, + 0.0036299344476051904, + 0.005552239303424154, + 0.006436728922849196, + 0.007156409074103788, + 0.009303555410625802, + 0.010276833295418189, + 0.011961828411951522, + 0.0134836778358714, + 0.016468200979164654, + 0.01932259798778216, + 0.01906225933597891, + 0.022810750520902534 + ], + [ + 0.0046879041451349576, + 0.004073155301754859, + 0.002224231670144308, + 0.0017487856735373052, + 0.0009992720608026564, + 0.0007243644346267765, + 0.0005336709648947606, + 0.00040679589146676575, + 0.00033362631974555594, + 0.0002866581334490885, + 0.0002579314630318181, + 0.0003050696561426725, + 0.00023905576131004127, + 0.00024195956021445879, + 0.00037153169312786834, + 0.0003478188064797919, + 0.0003920958493622838, + 0.0005563888435802931, + 0.0007871342825670361, + 0.0007915796948517353, + 0.0009005340889981848, + 0.0016139392292979912, + 0.001981014480253805, + 0.0025071376227297996, + 0.003570982617458661, + 0.004226832816821902, + 0.006186050147179441, + 0.007149778995645256, + 0.007971980522778178, + 0.01012428693723158, + 0.011212116822432228, + 0.012940250496853822, + 0.014522080708850332, + 0.01735752730139206, + 0.020249609977856187, + 0.02013640533025912, + 0.02388299640520314 + ] + ], + "xbins": [ + 10.0, + 30.0, + 50.0, + 70.0, + 90.0, + 110.0, + 130.0, + 150.0, + 170.0, + 190.0, + 210.0, + 230.0, + 250.0, + 270.0, + 290.0, + 310.0, + 330.0, + 350.0, + 370.0, + 390.0, + 410.0, + 430.0, + 450.0, + 470.0, + 490.0, + 510.0, + 530.0, + 550.0, + 570.0, + 590.0, + 610.0, + 630.0, + 650.0, + 670.0, + 690.0, + 710.0, + 730.0 + ], + "err_kwargs": { + "xerr": [ + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0 + ], + "capsize": 3, + "marker": "o", + "markersize": 8 + } + }, + "phase1PuppiHT:default:inclusive": { + "label": "Histogrammed Puppi HT", + "efficiency": [ + 0.0, + 0.0022271714922048997, + 0.002430133657351154, + 0.0009551098376313276, + 0.0016366612111292963, + 0.0019770660340055358, + 0.0029129041654529565, + 0.005772646536412078, + 0.008011653313911144, + 0.0172090112640801, + 0.029842342342342343, + 0.06066666666666667, + 0.09575994781474234, + 0.1526475637131916, + 0.21959507291519184, + 0.31529340224992397, + 0.4281062553556127, + 0.5433282208588958, + 0.6651933701657459, + 0.7595669687814703, + 0.8427384703523346, + 0.8800539083557951, + 0.9362029208301307, + 0.9617077464788732, + 0.9744560075685903, + 0.9853971962616822, + 0.985981308411215, + 0.9846743295019157, + 0.9973498233215548, + 1.0, + 0.9977452085682075, + 1.0, + 1.0, + 1.0, + 0.9981343283582089, + 0.9980506822612085, + 0.9975786924939467 + ], + "efficiency_err": [ + [ + 0.0, + 0.0018389319832569585, + 0.0015648087797643124, + 0.0007885970671355072, + 0.0008875236458577121, + 0.0008503624538187063, + 0.0009009377552959101, + 0.001117258583657704, + 0.0011937195600976802, + 0.0016182739735769065, + 0.0020105396509121944, + 0.0027485350801974145, + 0.003354359186525241, + 0.004129541396414388, + 0.0049290698539978806, + 0.005744412295983381, + 0.006514426960063269, + 0.006962391845237836, + 0.007123242155422038, + 0.006934412945263868, + 0.006369835376131561, + 0.006229648041136793, + 0.005130677874428113, + 0.00443887806185439, + 0.0038909454852842362, + 0.003492967407424552, + 0.003721998685895622, + 0.004186612456707484, + 0.0025584787506947038, + 0.0017880299021929558, + 0.002951688848833567, + 0.0023082794376581006, + 0.0025886965210667467, + 0.0028067614256136464, + 0.004256551066554315, + 0.004446778399965989, + 0.005519190778433658 + ], + [ + 0.0046879041451349576, + 0.005078294715424368, + 0.0031805789145277334, + 0.0021823611280588733, + 0.001581610553844316, + 0.0013285594214324592, + 0.0012339867559877774, + 0.0013565887776518116, + 0.0013850621382176243, + 0.0017754451527456604, + 0.0021465129005511577, + 0.0028676381984171703, + 0.003461087503886115, + 0.004222050485594181, + 0.005009014088096453, + 0.005800893257580153, + 0.006539209238764998, + 0.0069456729954276986, + 0.007049632644374859, + 0.006802284247529711, + 0.0061704198638199426, + 0.005968287652665327, + 0.004784555424000914, + 0.004013419733016055, + 0.0034146848995719736, + 0.0028733743898573527, + 0.003007174042333638, + 0.0033662712202982004, + 0.0014370010235984498, + 0.0, + 0.0014519127770952212, + 0.0, + 0.0, + 0.0, + 0.0015404383715550418, + 0.001609505337728745, + 0.0019992334393843514 + ] + ], + "xbins": [ + 10.0, + 30.0, + 50.0, + 70.0, + 90.0, + 110.0, + 130.0, + 150.0, + 170.0, + 190.0, + 210.0, + 230.0, + 250.0, + 270.0, + 290.0, + 310.0, + 330.0, + 350.0, + 370.0, + 390.0, + 410.0, + 430.0, + 450.0, + 470.0, + 490.0, + 510.0, + 530.0, + 550.0, + 570.0, + 590.0, + 610.0, + 630.0, + 650.0, + 670.0, + 690.0, + 710.0, + 730.0 + ], + "err_kwargs": { + "xerr": [ + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0 + ], + "capsize": 3, + "marker": "o", + "markersize": 8 + } + }, + "seededConePuppiHT:default:inclusive": { + "label": "SeededCone HT", + "efficiency": [ + 0.0, + 0.0022271714922048997, + 0.002430133657351154, + 0.0009551098376313276, + 0.0005455537370430987, + 0.0019770660340055358, + 0.0037867754150888435, + 0.005772646536412078, + 0.010742898761835398, + 0.01955569461827284, + 0.03420608108108108, + 0.0672, + 0.10437051532941943, + 0.16255116862537963, + 0.23148803624522157, + 0.3339920948616601, + 0.4481576692373608, + 0.5648006134969326, + 0.6846408839779006, + 0.7779456193353474, + 0.8607848753938699, + 0.8982479784366577, + 0.9465795541890853, + 0.9691901408450704, + 0.9796594134342479, + 0.9877336448598131, + 0.9919893190921228, + 0.9877394636015325, + 0.9964664310954063, + 1.0, + 0.9988726042841037, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "efficiency_err": [ + [ + 0.0, + 0.0018389319832569585, + 0.0015648087797643124, + 0.0007885970671355072, + 0.0004504391188022924, + 0.0008503624538187063, + 0.0010308807980181803, + 0.001117258583657704, + 0.0013819069127093287, + 0.0017234954877210357, + 0.0021481838905352754, + 0.0028832249924839876, + 0.0034858887659411225, + 0.004237227675487343, + 0.005023187390551687, + 0.005833142665312374, + 0.00655043422376117, + 0.006934376650048257, + 0.007020225149216741, + 0.006754273421534895, + 0.006074460092601042, + 0.00582430916443577, + 0.0047551672768813, + 0.004045688680966553, + 0.0035369437733976383, + 0.0032604119472066095, + 0.0030115358616300547, + 0.0038435540182472083, + 0.0027712486786956037, + 0.0017880299021929558, + 0.002575292661612605, + 0.0023082794376581006, + 0.0025886965210667467, + 0.0028067614256136464, + 0.0034131571592493914, + 0.003565910541162176, + 0.004427413234551869 + ], + [ + 0.0046879041451349576, + 0.005078294715424368, + 0.0031805789145277334, + 0.0021823611280588733, + 0.001247393278627939, + 0.0013285594214324592, + 0.0013577907768089897, + 0.0013565887776518116, + 0.0015703676556506358, + 0.0018794641871793562, + 0.0022826039655549704, + 0.00300042747386578, + 0.003590268761640189, + 0.004327063398556902, + 0.005099720754426218, + 0.0058838958976762945, + 0.006568303462218095, + 0.00690937073223985, + 0.006937929890030614, + 0.006612716368271099, + 0.005864297382878636, + 0.005549872504061137, + 0.004399618977669162, + 0.0036108457836996344, + 0.003051788994082316, + 0.0026327050815019293, + 0.002265023346719186, + 0.003008289686007304, + 0.0016840561707416324, + 0.0, + 0.0009308497718625297, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + ], + "xbins": [ + 10.0, + 30.0, + 50.0, + 70.0, + 90.0, + 110.0, + 130.0, + 150.0, + 170.0, + 190.0, + 210.0, + 230.0, + 250.0, + 270.0, + 290.0, + 310.0, + 330.0, + 350.0, + 370.0, + 390.0, + 410.0, + 430.0, + 450.0, + 470.0, + 490.0, + 510.0, + 530.0, + 550.0, + 570.0, + 590.0, + 610.0, + 630.0, + 650.0, + 670.0, + 690.0, + 710.0, + 730.0 + ], + "err_kwargs": { + "xerr": [ + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0 + ], + "capsize": 3, + "marker": "o", + "markersize": 8 + } + } +} diff --git a/menu_tools/object_performance/tests/reference_data/HT_50perc_350_V29.yaml b/menu_tools/object_performance/tests/reference_data/HT_50perc_350_V29.yaml new file mode 100644 index 00000000..224160bf --- /dev/null +++ b/menu_tools/object_performance/tests/reference_data/HT_50perc_350_V29.yaml @@ -0,0 +1,27 @@ +HT_50perc: + binning: + max: 750 + min: 0 + step: 20 + version: V29 + reference_object: + cuts: + object: + - abs({eta}) < 2.4 + - '{pt} > 30' + label: Gen HT + object: jet + x_arg: Pt + trafo: HT + sample: TT + scalings: + method: naive + threshold: 0.5 + test_objects: + phase1PuppiHT:default: "" + seededConePuppiHT:default: "" + trackerHT:default: "" + thresholds: + - 350 + xlabel: Gen. HT (GeV) + ylabel: Trigger Efficiency ( GeV) diff --git a/menu_tools/object_performance/tests/reference_data/HT_90perc_350_V29.json b/menu_tools/object_performance/tests/reference_data/HT_90perc_350_V29.json new file mode 100644 index 00000000..136fafdb --- /dev/null +++ b/menu_tools/object_performance/tests/reference_data/HT_90perc_350_V29.json @@ -0,0 +1,620 @@ +{ + "xlabel": "Gen. HT (GeV)", + "ylabel": "Trigger Efficiency (350 GeV)", + "watermark": "V29_HT_90perc_350", + "trackerHT:default:inclusive": { + "label": "Tracker HT", + "efficiency": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.00013333333333333334, + 0.0, + 0.0, + 0.0002831657935721365, + 0.00015202189115232594, + 0.00017137960582690659, + 0.0005751533742331289, + 0.0013259668508287293, + 0.0010070493454179255, + 0.0011458034947006588, + 0.0047169811320754715, + 0.0065334358186010764, + 0.009683098591549295, + 0.020813623462630087, + 0.02336448598130841, + 0.048731642189586116, + 0.05747126436781609, + 0.061837455830388695, + 0.09765625, + 0.10372040586245772, + 0.12862547288776796, + 0.1485148514851485, + 0.22085889570552147, + 0.26119402985074625, + 0.23586744639376217, + 0.288135593220339 + ], + "efficiency_err": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.00011008648525952339, + 0.0, + 0.0, + 0.0001823513829141161, + 0.0001255167107782635, + 0.0001414994374845714, + 0.00031192164388792805, + 0.0005236922261730564, + 0.00048009876080158523, + 0.0005462387052469576, + 0.001238184873004851, + 0.0015586180038634307, + 0.002032740516790456, + 0.003086696109909668, + 0.0036299344476051904, + 0.005552239303424154, + 0.006436728922849196, + 0.007156409074103788, + 0.009303555410625802, + 0.010276833295418189, + 0.011961828411951522, + 0.0134836778358714, + 0.016468200979164654, + 0.01932259798778216, + 0.01906225933597891, + 0.022810750520902534 + ], + [ + 0.0046879041451349576, + 0.004073155301754859, + 0.002224231670144308, + 0.0017487856735373052, + 0.0009992720608026564, + 0.0007243644346267765, + 0.0005336709648947606, + 0.00040679589146676575, + 0.00033362631974555594, + 0.0002866581334490885, + 0.0002579314630318181, + 0.0003050696561426725, + 0.00023905576131004127, + 0.00024195956021445879, + 0.00037153169312786834, + 0.0003478188064797919, + 0.0003920958493622838, + 0.0005563888435802931, + 0.0007871342825670361, + 0.0007915796948517353, + 0.0009005340889981848, + 0.0016139392292979912, + 0.001981014480253805, + 0.0025071376227297996, + 0.003570982617458661, + 0.004226832816821902, + 0.006186050147179441, + 0.007149778995645256, + 0.007971980522778178, + 0.01012428693723158, + 0.011212116822432228, + 0.012940250496853822, + 0.014522080708850332, + 0.01735752730139206, + 0.020249609977856187, + 0.02013640533025912, + 0.02388299640520314 + ] + ], + "xbins": [ + 10.0, + 30.0, + 50.0, + 70.0, + 90.0, + 110.0, + 130.0, + 150.0, + 170.0, + 190.0, + 210.0, + 230.0, + 250.0, + 270.0, + 290.0, + 310.0, + 330.0, + 350.0, + 370.0, + 390.0, + 410.0, + 430.0, + 450.0, + 470.0, + 490.0, + 510.0, + 530.0, + 550.0, + 570.0, + 590.0, + 610.0, + 630.0, + 650.0, + 670.0, + 690.0, + 710.0, + 730.0 + ], + "err_kwargs": { + "xerr": [ + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0 + ], + "capsize": 3, + "marker": "o", + "markersize": 8 + } + }, + "phase1PuppiHT:default:inclusive": { + "label": "Histogrammed Puppi HT", + "efficiency": [ + 0.0, + 0.0022271714922048997, + 0.002430133657351154, + 0.0009551098376313276, + 0.0016366612111292963, + 0.0019770660340055358, + 0.0029129041654529565, + 0.005772646536412078, + 0.008011653313911144, + 0.0172090112640801, + 0.029842342342342343, + 0.06066666666666667, + 0.09575994781474234, + 0.1526475637131916, + 0.21959507291519184, + 0.31529340224992397, + 0.4281062553556127, + 0.5433282208588958, + 0.6651933701657459, + 0.7595669687814703, + 0.8427384703523346, + 0.8800539083557951, + 0.9362029208301307, + 0.9617077464788732, + 0.9744560075685903, + 0.9853971962616822, + 0.985981308411215, + 0.9846743295019157, + 0.9973498233215548, + 1.0, + 0.9977452085682075, + 1.0, + 1.0, + 1.0, + 0.9981343283582089, + 0.9980506822612085, + 0.9975786924939467 + ], + "efficiency_err": [ + [ + 0.0, + 0.0018389319832569585, + 0.0015648087797643124, + 0.0007885970671355072, + 0.0008875236458577121, + 0.0008503624538187063, + 0.0009009377552959101, + 0.001117258583657704, + 0.0011937195600976802, + 0.0016182739735769065, + 0.0020105396509121944, + 0.0027485350801974145, + 0.003354359186525241, + 0.004129541396414388, + 0.0049290698539978806, + 0.005744412295983381, + 0.006514426960063269, + 0.006962391845237836, + 0.007123242155422038, + 0.006934412945263868, + 0.006369835376131561, + 0.006229648041136793, + 0.005130677874428113, + 0.00443887806185439, + 0.0038909454852842362, + 0.003492967407424552, + 0.003721998685895622, + 0.004186612456707484, + 0.0025584787506947038, + 0.0017880299021929558, + 0.002951688848833567, + 0.0023082794376581006, + 0.0025886965210667467, + 0.0028067614256136464, + 0.004256551066554315, + 0.004446778399965989, + 0.005519190778433658 + ], + [ + 0.0046879041451349576, + 0.005078294715424368, + 0.0031805789145277334, + 0.0021823611280588733, + 0.001581610553844316, + 0.0013285594214324592, + 0.0012339867559877774, + 0.0013565887776518116, + 0.0013850621382176243, + 0.0017754451527456604, + 0.0021465129005511577, + 0.0028676381984171703, + 0.003461087503886115, + 0.004222050485594181, + 0.005009014088096453, + 0.005800893257580153, + 0.006539209238764998, + 0.0069456729954276986, + 0.007049632644374859, + 0.006802284247529711, + 0.0061704198638199426, + 0.005968287652665327, + 0.004784555424000914, + 0.004013419733016055, + 0.0034146848995719736, + 0.0028733743898573527, + 0.003007174042333638, + 0.0033662712202982004, + 0.0014370010235984498, + 0.0, + 0.0014519127770952212, + 0.0, + 0.0, + 0.0, + 0.0015404383715550418, + 0.001609505337728745, + 0.0019992334393843514 + ] + ], + "xbins": [ + 10.0, + 30.0, + 50.0, + 70.0, + 90.0, + 110.0, + 130.0, + 150.0, + 170.0, + 190.0, + 210.0, + 230.0, + 250.0, + 270.0, + 290.0, + 310.0, + 330.0, + 350.0, + 370.0, + 390.0, + 410.0, + 430.0, + 450.0, + 470.0, + 490.0, + 510.0, + 530.0, + 550.0, + 570.0, + 590.0, + 610.0, + 630.0, + 650.0, + 670.0, + 690.0, + 710.0, + 730.0 + ], + "err_kwargs": { + "xerr": [ + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0 + ], + "capsize": 3, + "marker": "o", + "markersize": 8 + } + }, + "seededConePuppiHT:default:inclusive": { + "label": "SeededCone HT", + "efficiency": [ + 0.0, + 0.0022271714922048997, + 0.002430133657351154, + 0.0009551098376313276, + 0.0005455537370430987, + 0.0019770660340055358, + 0.0037867754150888435, + 0.005772646536412078, + 0.010742898761835398, + 0.01955569461827284, + 0.03420608108108108, + 0.0672, + 0.10437051532941943, + 0.16255116862537963, + 0.23148803624522157, + 0.3339920948616601, + 0.4481576692373608, + 0.5648006134969326, + 0.6846408839779006, + 0.7779456193353474, + 0.8607848753938699, + 0.8982479784366577, + 0.9465795541890853, + 0.9691901408450704, + 0.9796594134342479, + 0.9877336448598131, + 0.9919893190921228, + 0.9877394636015325, + 0.9964664310954063, + 1.0, + 0.9988726042841037, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "efficiency_err": [ + [ + 0.0, + 0.0018389319832569585, + 0.0015648087797643124, + 0.0007885970671355072, + 0.0004504391188022924, + 0.0008503624538187063, + 0.0010308807980181803, + 0.001117258583657704, + 0.0013819069127093287, + 0.0017234954877210357, + 0.0021481838905352754, + 0.0028832249924839876, + 0.0034858887659411225, + 0.004237227675487343, + 0.005023187390551687, + 0.005833142665312374, + 0.00655043422376117, + 0.006934376650048257, + 0.007020225149216741, + 0.006754273421534895, + 0.006074460092601042, + 0.00582430916443577, + 0.0047551672768813, + 0.004045688680966553, + 0.0035369437733976383, + 0.0032604119472066095, + 0.0030115358616300547, + 0.0038435540182472083, + 0.0027712486786956037, + 0.0017880299021929558, + 0.002575292661612605, + 0.0023082794376581006, + 0.0025886965210667467, + 0.0028067614256136464, + 0.0034131571592493914, + 0.003565910541162176, + 0.004427413234551869 + ], + [ + 0.0046879041451349576, + 0.005078294715424368, + 0.0031805789145277334, + 0.0021823611280588733, + 0.001247393278627939, + 0.0013285594214324592, + 0.0013577907768089897, + 0.0013565887776518116, + 0.0015703676556506358, + 0.0018794641871793562, + 0.0022826039655549704, + 0.00300042747386578, + 0.003590268761640189, + 0.004327063398556902, + 0.005099720754426218, + 0.0058838958976762945, + 0.006568303462218095, + 0.00690937073223985, + 0.006937929890030614, + 0.006612716368271099, + 0.005864297382878636, + 0.005549872504061137, + 0.004399618977669162, + 0.0036108457836996344, + 0.003051788994082316, + 0.0026327050815019293, + 0.002265023346719186, + 0.003008289686007304, + 0.0016840561707416324, + 0.0, + 0.0009308497718625297, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + ], + "xbins": [ + 10.0, + 30.0, + 50.0, + 70.0, + 90.0, + 110.0, + 130.0, + 150.0, + 170.0, + 190.0, + 210.0, + 230.0, + 250.0, + 270.0, + 290.0, + 310.0, + 330.0, + 350.0, + 370.0, + 390.0, + 410.0, + 430.0, + 450.0, + 470.0, + 490.0, + 510.0, + 530.0, + 550.0, + 570.0, + 590.0, + 610.0, + 630.0, + 650.0, + 670.0, + 690.0, + 710.0, + 730.0 + ], + "err_kwargs": { + "xerr": [ + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0 + ], + "capsize": 3, + "marker": "o", + "markersize": 8 + } + } +} diff --git a/menu_tools/object_performance/tests/reference_data/HT_90perc_350_V29.yaml b/menu_tools/object_performance/tests/reference_data/HT_90perc_350_V29.yaml new file mode 100644 index 00000000..969165bf --- /dev/null +++ b/menu_tools/object_performance/tests/reference_data/HT_90perc_350_V29.yaml @@ -0,0 +1,27 @@ +HT_90perc: + binning: + max: 750 + min: 0 + step: 20 + version: V29 + reference_object: + cuts: + object: + - abs({eta}) < 2.4 + - '{pt} > 30' + label: Gen HT + object: jet + x_arg: Pt + trafo: HT + sample: TT + scalings: + method: naive + threshold: 0.9 + test_objects: + phase1PuppiHT:default: "" + seededConePuppiHT:default: "" + trackerHT:default: "" + thresholds: + - 350 + xlabel: Gen. HT (GeV) + ylabel: Trigger Efficiency ( GeV) diff --git a/menu_tools/object_performance/tests/test_electron_v29.py b/menu_tools/object_performance/tests/test_turnons_v29.py similarity index 67% rename from menu_tools/object_performance/tests/test_electron_v29.py rename to menu_tools/object_performance/tests/test_turnons_v29.py index 2a0788cc..0cb4f583 100644 --- a/menu_tools/object_performance/tests/test_electron_v29.py +++ b/menu_tools/object_performance/tests/test_turnons_v29.py @@ -6,15 +6,24 @@ import sys import numpy as np +import pytest from menu_tools.object_performance import plotter -def test_isolation_barrel(): +testdata = [ + "HT_50perc_350_V29", + "HT_90perc_350_V29", + "ElectronsIsolation_Barrel_-999_V29" +] + + +@pytest.mark.parametrize("test_name", testdata) +def test_matching_plots_reproduced(test_name): # Prepare patching of the command line arguments for argparse testargs = [ "foo", - "menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.yaml", + f"menu_tools/object_performance/tests/reference_data/{test_name}.yaml", ] # Run Plotting @@ -23,22 +32,20 @@ def test_isolation_barrel(): # Load result and assert correct outcome with open( - "outputs/object_performance/V29/turnons/ElectronsIsolation_Barrel_-999_V29.json", + f"outputs/object_performance/V29/turnons/{test_name}.json", "r", ) as f: test_result = json.load(f) with open( - "menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json", + f"menu_tools/object_performance/tests/reference_data/{test_name}.json", "r", ) as f: reference_data = json.load(f) for key, val in reference_data.items(): if isinstance(val, dict): - if "tkEle" in key: - test_key = "tkElectron:NoIso:inclusive" efficiencies_test = np.array( - test_result[test_key]["efficiency"], dtype=np.float64 + test_result[key]["efficiency"], dtype=np.float64 ) efficiencies_reference = np.array(val["efficiency"], dtype=np.float64) print(efficiencies_reference) diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index 1b281bf3..ead996b9 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -128,7 +128,9 @@ def plot_label(self) -> str: @property def eta_ranges(self) -> dict[str, tuple[float, float]]: - _eta_ranges = self._object_params["eta_ranges"] + _eta_ranges = {} + if "eta_ranges" in self._object_params.keys(): + _eta_ranges = self._object_params["eta_ranges"] if "inclusive" not in _eta_ranges: _eta_ranges["inclusive"] = [0, 7] return _eta_ranges From cdd3b9943423b1a1f5c8cce23c4cec2893ade790 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 13:30:38 +0100 Subject: [PATCH 092/140] run black --- menu_tools/object_performance/tests/test_turnons_v29.py | 2 +- menu_tools/utils/objects.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/menu_tools/object_performance/tests/test_turnons_v29.py b/menu_tools/object_performance/tests/test_turnons_v29.py index 0cb4f583..4ae892d0 100644 --- a/menu_tools/object_performance/tests/test_turnons_v29.py +++ b/menu_tools/object_performance/tests/test_turnons_v29.py @@ -14,7 +14,7 @@ testdata = [ "HT_50perc_350_V29", "HT_90perc_350_V29", - "ElectronsIsolation_Barrel_-999_V29" + "ElectronsIsolation_Barrel_-999_V29", ] diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index ead996b9..5b19182c 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -144,7 +144,9 @@ def cuts(self) -> Optional[dict[str, list[str]]]: # if a region other than inclusive is specified an eta cut eta_min = self.eta_ranges[self.eta_range][0] eta_max = self.eta_ranges[self.eta_range][1] - global_eta_cut = f"((abs({{eta}}) > {eta_min}) & (abs({{eta}}) < {eta_max}))" + global_eta_cut = ( + f"((abs({{eta}}) > {eta_min}) & (abs({{eta}}) < {eta_max}))" + ) try: _cuts["inclusive"].append(global_eta_cut) except KeyError: From 855d78788f39da88da9d735bc906f15a5c10495c Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 13:55:11 +0100 Subject: [PATCH 093/140] add L1 cuts to all V29 trigger configs --- .../object_performance/jets_trigger_fwd.yaml | 4 +- .../V29/object_performance/muon_trigger.yaml | 12 +++--- .../V29/object_performance/photon_iso.yaml | 4 +- .../object_performance/photons_trigger.yaml | 12 +++--- .../V29/object_performance/tau_trigger.yaml | 16 ++++---- configs/V29/objects/muons.yaml | 37 ++++--------------- configs/V29/objects/photons.yaml | 14 ------- configs/V29/objects/taus.yaml | 12 +++--- 8 files changed, 37 insertions(+), 74 deletions(-) diff --git a/configs/V29/object_performance/jets_trigger_fwd.yaml b/configs/V29/object_performance/jets_trigger_fwd.yaml index b1818c46..5533a9ba 100644 --- a/configs/V29/object_performance/jets_trigger_fwd.yaml +++ b/configs/V29/object_performance/jets_trigger_fwd.yaml @@ -12,8 +12,8 @@ JetTurnonFwd_3p7to7: object: - "abs({eta}) < 7" test_objects: - phase1PuppiJet:default: "Pt" - seededConePuppiJet:default: "Pt" + phase1PuppiJet:default:forward: "Pt" + seededConePuppiJet:default:forward: "Pt" thresholds: [50,100] scalings: method: "naive" diff --git a/configs/V29/object_performance/muon_trigger.yaml b/configs/V29/object_performance/muon_trigger.yaml index 232b3ceb..e111b854 100644 --- a/configs/V29/object_performance/muon_trigger.yaml +++ b/configs/V29/object_performance/muon_trigger.yaml @@ -12,8 +12,8 @@ MuonsTrigger_Barrel: object: - "abs({eta}) < 0.83" test_objects: - gmtMuon:barrel: "Pt" - gmtTkMuon:barrel: "Pt" + gmtMuon:default:barrel: "Pt" + gmtTkMuon:default:barrel: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (barrel, L1 $p_T > 20$ GeV)" thresholds: [20, 25] @@ -40,8 +40,8 @@ MuonsTrigger_Overlap: - "abs({eta}) > 0.83" - "abs({eta}) < 1.24" test_objects: - gmtMuon:overlap: "Pt" - gmtTkMuon:overlap: "Pt" + gmtMuon:default:overlap: "Pt" + gmtTkMuon:default:overlap: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (overlap, L1 $p_T > 20$ GeV)" thresholds: [20, 25] @@ -67,8 +67,8 @@ MuonsTrigger_Endcap: object: - "abs({eta}) > 1.24" test_objects: - gmtMuon:endcap: "Pt" - gmtTkMuon:endcap: "Pt" + gmtMuon:default:endcap: "Pt" + gmtTkMuon:default:endcap: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (endcap, L1 $p_T > 20$ GeV)" thresholds: [20, 25] diff --git a/configs/V29/object_performance/photon_iso.yaml b/configs/V29/object_performance/photon_iso.yaml index f4170ed2..e4e9e1bd 100644 --- a/configs/V29/object_performance/photon_iso.yaml +++ b/configs/V29/object_performance/photon_iso.yaml @@ -14,7 +14,7 @@ PhotonIsolation_Barrel: object: - "abs({eta}) < 1.479" test_objects: - tkPhoton:barrel: "trkiso" + tkPhoton:NoIso:barrel: "trkiso" xlabel: "Isolation" ylabel: "Efficiency (Barrel)" binning: @@ -39,7 +39,7 @@ PhotonIsolation_Endcap: object: - "abs({eta}) > 1.479" test_objects: - tkPhoton:endcap: "trkiso" + tkPhoton:NoIso:endcap: "trkiso" xlabel: "Isolation" ylabel: "Efficiency (Endcap)" binning: diff --git a/configs/V29/object_performance/photons_trigger.yaml b/configs/V29/object_performance/photons_trigger.yaml index 13467506..93f3acca 100644 --- a/configs/V29/object_performance/photons_trigger.yaml +++ b/configs/V29/object_performance/photons_trigger.yaml @@ -13,9 +13,9 @@ PhotonsTrigger_Barrel: object: - "abs({eta}) < 2.4" test_objects: - EG:default: "Pt" - tkPhoton:NoIso: "Pt" - tkPhoton:Iso: "Pt" + EG:default:barrel: "Pt" + tkPhoton:NoIso:barrel: "Pt" + tkPhoton:Iso:barrel: "Pt" thresholds: [10, 20, 30, 40] scalings: method: "naive" @@ -42,9 +42,9 @@ PhotonsTrigger_Endcap: object: - "abs({eta}) < 2.4" test_objects: - EG:eleid: "Pt" - tkPhoton:NoIso: "Pt" - tkPhoton:Iso: "Pt" + EG:eleid:endcap: "Pt" + tkPhoton:NoIso:endcap: "Pt" + tkPhoton:Iso:endcap: "Pt" thresholds: [10, 20, 30, 40] scalings: method: "naive" diff --git a/configs/V29/object_performance/tau_trigger.yaml b/configs/V29/object_performance/tau_trigger.yaml index 72fe096f..084cdd11 100644 --- a/configs/V29/object_performance/tau_trigger.yaml +++ b/configs/V29/object_performance/tau_trigger.yaml @@ -13,8 +13,8 @@ TauTriggerBarrel_90perc: object: - "abs({eta}) < 2.4" test_objects: - nnTau:default: "Pt" - caloTau:default: "Pt" + nnTau:default:barrel: "Pt" + caloTau:default:barrel: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" thresholds: [20, 30] @@ -41,8 +41,8 @@ TauTriggerEndcap_90perc: object: - "abs({eta}) < 2.4" test_objects: - nnTau:default: "Pt" - caloTau:default: "Pt" + nnTau:default:endcap: "Pt" + caloTau:default:endcap: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" thresholds: [20, 30] @@ -69,8 +69,8 @@ TauTriggerBarrel_50perc: object: - "abs({eta}) < 2.4" test_objects: - nnTau:default: "Pt" - caloTau:default: "Pt" + nnTau:default:barrel: "Pt" + caloTau:default:barrel: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" thresholds: [20, 30] @@ -97,8 +97,8 @@ TauTriggerEndcap_50perc: object: - "abs({eta}) < 2.4" test_objects: - nnTau:default: "Pt" - caloTau:default: "Pt" + nnTau:default:endcap: "Pt" + caloTau:default:endcap: "Pt" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" thresholds: [20, 30] diff --git a/configs/V29/objects/muons.yaml b/configs/V29/objects/muons.yaml index 6341785e..ce800429 100644 --- a/configs/V29/objects/muons.yaml +++ b/configs/V29/objects/muons.yaml @@ -3,48 +3,25 @@ gmtMuon: match_dR: 0.3 eta_ranges: inclusive: [0, 5] + barrel: [0, 0.83] + overlap: [0.83, 1.24] + endcap: [1.24, 2.4] ids: default: {} - barrel: - cuts: - inclusive: - - "abs({eta}) < 0.83" - overlap: - cuts: - inclusive: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - endcap: - cuts: - inclusive: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - gmtTkMuon: label: "GMT TkMuon" match_dR: 0.1 eta_ranges: inclusive: [0, 5] + barrel: [0, 0.83] + overlap: [0.83, 1.24] + endcap: [1.24, 2.4] cuts: inclusive: - "{quality} > 0" ids: - default: {} - barrel: - cuts: - inclusive: - - "abs({eta}) < 0.83" - - "{quality} > 0" - overlap: - cuts: - inclusive: - - "abs({eta}) > 0.83" - - "abs({eta}) < 1.24" - - "{quality} > 0" - endcap: + default: cuts: inclusive: - - "abs({eta}) > 1.24" - - "abs({eta}) < 2.4" - "{quality} > 0" diff --git a/configs/V29/objects/photons.yaml b/configs/V29/objects/photons.yaml index 12df4507..91280352 100644 --- a/configs/V29/objects/photons.yaml +++ b/configs/V29/objects/photons.yaml @@ -25,17 +25,3 @@ tkPhoton: endcap: - "abs({trkiso}) < 0.2" - "{passesphoid} == 1" - barrel: - label: "TkPhoton" - cuts: - inclusive: - - "abs({eta}) < 1.479" - - "{passeseleid} == 1" - endcap: - label: "TkIsoPhoton" - cuts: - inclusive: - - "abs({eta}) > 1.479" - - "abs({eta}) < 2.4" - - "{passesphoid} == 1" - diff --git a/configs/V29/objects/taus.yaml b/configs/V29/objects/taus.yaml index ed35cda6..b1cbfe07 100644 --- a/configs/V29/objects/taus.yaml +++ b/configs/V29/objects/taus.yaml @@ -2,10 +2,11 @@ nnTau: label: "NN Tau" match_dR: 0.1 eta_ranges: - inclusive: [0, 5] + inclusive: [0, 2.4 + barrel: [0, 1.5] + endcap: [1.5, 2.4] cuts: inclusive: - - "abs({eta}) < 2.4" - "{passloosenn}==1" ids: default: {} @@ -14,9 +15,8 @@ caloTau: label: "Calo Tau" match_dR: 0.3 eta_ranges: - inclusive: [0, 5] - cuts: - inclusive: - - "abs({eta}) < 2.4" + inclusive: [0, 2.4] + barrel: [0, 1.5] + endcap: [1.5, 2.4] ids: default: {} From fc6165e240024e1bd5fbfdac04f36b309798dab9 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 13:57:46 +0100 Subject: [PATCH 094/140] fix syntax error --- configs/V29/objects/taus.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/V29/objects/taus.yaml b/configs/V29/objects/taus.yaml index b1cbfe07..3c058ad2 100644 --- a/configs/V29/objects/taus.yaml +++ b/configs/V29/objects/taus.yaml @@ -2,7 +2,7 @@ nnTau: label: "NN Tau" match_dR: 0.1 eta_ranges: - inclusive: [0, 2.4 + inclusive: [0, 2.4] barrel: [0, 1.5] endcap: [1.5, 2.4] cuts: From e3f0f845a99c57b59331af21d9f758457e4d0ac3 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 15:36:43 +0100 Subject: [PATCH 095/140] add development documentation --- docs/development.md | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 docs/development.md diff --git a/docs/development.md b/docs/development.md new file mode 100644 index 00000000..f0533378 --- /dev/null +++ b/docs/development.md @@ -0,0 +1,47 @@ +# Instructions for development + +## Dependency management and dev environment +Poetry is used as a backend for packaging and for dependency +management. To set up a working development environment, create +a virtual environment and install the `poetry` python package. +Then install all develpoment dependencies: + +```bash +python@3.11 -m venv +source /bin/activate +pip install poetry +poetry install +``` + +## Testing +The tests are maintained in the subpackages under `tests`, e.g. +`menu_tools/object_performance/tests`. After properly setting up +a development environment as described [above](#dependency-management-and-dev-environment) +you can simply run + +```bash +pytest -vv +``` + +to run all tests. The `-vv` option is optional and can be omitted. +For some of the tests the presence of the V29 caching files is required. + + +## Code Formatting and Linting +`black` is used for code formatting and `flake8` for linting. +These tools are helpful to have consistent formatting through +the codebase even with multiple developers working on the code. +To run `black`, set up the development environment as described +[above](#dependency-management-and-dev-environment) and run + +```bash +black menu_tools +``` + +If you want to dry-run, add the `--check` flag to see which files would +be modified. +Similarlly `flake8` can be run by simply typing + +```bash +flake8 menu_tools +``` From 3bc4686d162955bfadb9b1f4de5f76f4252a2032 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 15:39:14 +0100 Subject: [PATCH 096/140] fix reworked ids in muon matching config --- configs/V29/object_performance/muon_matching.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configs/V29/object_performance/muon_matching.yaml b/configs/V29/object_performance/muon_matching.yaml index e9415a2d..67e974bb 100644 --- a/configs/V29/object_performance/muon_matching.yaml +++ b/configs/V29/object_performance/muon_matching.yaml @@ -12,8 +12,8 @@ MuonsMatchingBarrel: object: - "abs({eta}) < 0.83" test_objects: - gmtMuon:barrel: "Pt" - gmtTkMuon:barrel: "Pt" + gmtMuon:default:barrel: "Pt" + gmtTkMuon:default:barrel: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (barrel)" binning: @@ -36,8 +36,8 @@ MuonsMatchingOverlap: - "abs({eta}) > 0.83" - "abs({eta}) < 1.24" test_objects: - gmtMuon:overlap: "Pt" - gmtTkMuon:overlap: "Pt" + gmtMuon:default:overlap: "Pt" + gmtTkMuon:default:overlap: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (overlap)" binning: @@ -60,8 +60,8 @@ MuonsMatchingEndcap: - "abs({eta}) > 1.24" - "abs({eta}) < 2.4" test_objects: - gmtMuon:endcap: "Pt" - gmtTkMuon:endcap: "Pt" + gmtMuon:default:endcap: "Pt" + gmtTkMuon:default:endcap: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (endcap)" binning: From cc55dd20264863b019e3f2f5b0c45eac118b8646 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 16:00:13 +0100 Subject: [PATCH 097/140] make error message for when range key not found more helpful --- menu_tools/utils/objects.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index 5b19182c..a4a885b3 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -56,9 +56,11 @@ def eta_range(self) -> str: eta_range_key = self.object_key.split(":")[2] except IndexError: eta_range_key = "inclusive" - assert ( - eta_range_key in self.eta_ranges.keys() - ), "`eta` range specifier not found in object definition!" + if eta_range_key not in self.eta_ranges.keys(): + raise ValueError( + f"`eta` range specifier `{eta_range_key}` not " + f"found in object definition of {self.nano_obj_name}!" + ) return eta_range_key @property From c49b97887d9caef9e14673b55891998290fa68ab Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 16:00:33 +0100 Subject: [PATCH 098/140] synchronize eg nameing of endcap eta region --- configs/V29/object_performance/electron_trigger.yaml | 6 +++--- configs/V29/objects/electrons.yaml | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/configs/V29/object_performance/electron_trigger.yaml b/configs/V29/object_performance/electron_trigger.yaml index 8e982ed8..476ceb39 100644 --- a/configs/V29/object_performance/electron_trigger.yaml +++ b/configs/V29/object_performance/electron_trigger.yaml @@ -42,9 +42,9 @@ ElectronsTriggerEndcap: object: - "abs({eta}) < 2.8" test_objects: - EG:default:beyond_barrel: "Pt" - tkElectron:NoIso:beyond_barrel: "Pt" - tkElectron:Iso:beyond_barrel: "Pt" + EG:default:endcap: "Pt" + tkElectron:NoIso:endcap: "Pt" + tkElectron:Iso:endcap: "Pt" thresholds: [10, 20, 30, 40] scalings: method: "naive" diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index a67976d0..cb06e288 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -13,7 +13,7 @@ tkElectron: eta_ranges: inclusive: [0, 5] barrel: [0, 1.479] - beyond_barrel: [1.479, 5] + endcap: [1.479, 5] ids: NoIso: label: "TkElectron" @@ -38,7 +38,7 @@ tkElectron: barrel: - "abs({trkiso}) < 0.13" - "({passeseleid} == 1) | ({pt} < 25)" - beyond_barrel: + endcap: - "abs({trkiso}) < 0.28" EG: @@ -46,7 +46,7 @@ EG: eta_ranges: inclusive: [0, 5] barrel: [0, 1.479] - beyond_barrel: [1.479, 3.0] + endcap: [1.479, 3.0] label: "EG" ids: default: @@ -55,12 +55,12 @@ EG: - "abs({eta}) < 3.0" barrel: - "{passeseleid} == 1" - beyond_barrel: + endcap: - "{passessaid} == 1" eleid: cuts: inclusive: - "abs({eta}) < 3.0" - "{passeseleid} == 1" - beyond_barrel: + endcap: - "{passessaid} == 1" From c9b3b6b46a3f2e9281c45af9ebf9ba79314efb7a Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 16:48:43 +0100 Subject: [PATCH 099/140] small fix to not skip all plots when scalings are missing for one object; implement changes to test config --- configs/V29/rate_plots/test.yaml | 55 ++++++++++++++++++++------------ menu_tools/rate_plots/plotter.py | 4 +-- 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/configs/V29/rate_plots/test.yaml b/configs/V29/rate_plots/test.yaml index a40d5152..11252f4f 100644 --- a/configs/V29/rate_plots/test.yaml +++ b/configs/V29/rate_plots/test.yaml @@ -6,9 +6,9 @@ JetDefaultRates: - seededConePuppiJet:default # - trackerJet:default binning: - min: 0 - max: 100 - step: 10 + min: 40 + max: 420 + step: 20 ElectronDefaultRates: sample: MinBias @@ -17,39 +17,54 @@ ElectronDefaultRates: - EG:default - tkElectron:NoIso - tkElectron:Iso + - tkPhoton:Iso binning: - min: 0 - max: 100 - step: 10 + min: 10 + max: 97 + step: 30 -MuonRatesBarrel: +EGRates: sample: MinBias version: V29 test_objects: - # - gmtMuon:barrel - - gmtTkMuon:barrel + - EG:default + - tkElectron:NoIso + - tkElectron:Iso + - tkPhoton:Iso binning: - min: 0 - max: 100 - step: 10 + min: 10 + max: 97 + step: 30 -MuonRatesOverlap: +MuonRates: sample: MinBias version: V29 test_objects: - # - gmtMuon:overlap - - gmtTkMuon:overlap + # - gmtMuon:default + # - gmtMuon:oldRateID + - gmtTkMuon:default binning: min: 0 - max: 100 - step: 10 + max: 75 + step: 3 + +TauRates: + sample: MinBias + version: V29 + test_objects: + - nnTau:default + - caloTau:default + binning: + min: 10 + max: 155 + step: 5 -MuonRatesEndcap: +MuonRates: sample: MinBias version: V29 test_objects: - # - gmtMuon:endcap - - gmtTkMuon:endcap + # - gmtMuon:default + - gmtTkMuon:default binning: min: 0 max: 100 diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index 05902b50..2b7d6cae 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -281,9 +281,9 @@ def run(self, apply_offline_conversion: bool = False) -> None: apply_offline_conversion, ) except UserWarning: - # Return without creating a plot if a warning was raised. + # Continue without creating a plot if a warning was raised. # This applies to no scalings being found for an object. - return None + continue # Plot Rate vs. Threshold after all data has been aggregated plotter = RatePlotter(plot_config, rate_plot_data, apply_offline_conversion) From 53299186000b088d5fa83b60da06becc9aae970c Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 17:01:52 +0100 Subject: [PATCH 100/140] some minor fixes --- configs/V29/rate_plots/test.yaml | 2 +- menu_tools/rate_plots/plotter.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configs/V29/rate_plots/test.yaml b/configs/V29/rate_plots/test.yaml index 11252f4f..4c9ae3d2 100644 --- a/configs/V29/rate_plots/test.yaml +++ b/configs/V29/rate_plots/test.yaml @@ -53,7 +53,7 @@ TauRates: version: V29 test_objects: - nnTau:default - - caloTau:default + # - caloTau:default binning: min: 10 max: 155 diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index 2b7d6cae..a328d27a 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -56,6 +56,8 @@ def _plot_single_version_rate_curves(self): hep.cms.label(ax=ax, llabel=self._llabel, com=self._com) for obj_specifier, obj_instances in self.cfg.test_object_instances.items(): + if obj_specifier not in self.data.keys(): + continue rate_values = self.data[obj_specifier][version] ax.plot( list(rate_values.keys()), @@ -280,10 +282,14 @@ def run(self, apply_offline_conversion: bool = False) -> None: obj_instances, apply_offline_conversion, ) + scalings_found = True except UserWarning: # Continue without creating a plot if a warning was raised. # This applies to no scalings being found for an object. + scalings_found = False continue + if not scalings_found: + continue # Plot Rate vs. Threshold after all data has been aggregated plotter = RatePlotter(plot_config, rate_plot_data, apply_offline_conversion) From 643b65e078d386d822ea009d1c533a5de66a1b29 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 31 Jan 2024 11:24:00 +0100 Subject: [PATCH 101/140] introduce CLI shortcuts for running and --- menu_tools/object_performance/plotter.py | 4 ++-- .../tests/test_turnons_v29.py | 2 +- menu_tools/rate_plots/plotter.py | 6 ++++- poetry.lock | 22 +++++++++---------- pyproject.toml | 8 +++++++ 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index ada63958..0a802868 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -508,7 +508,7 @@ def run(self): plotter.plot() -def run(): +def main(): parser = argparse.ArgumentParser() parser.add_argument( "cfg_plots", @@ -527,4 +527,4 @@ def run(): if __name__ == "__main__": - run() + main() diff --git a/menu_tools/object_performance/tests/test_turnons_v29.py b/menu_tools/object_performance/tests/test_turnons_v29.py index 4ae892d0..9c4c0e85 100644 --- a/menu_tools/object_performance/tests/test_turnons_v29.py +++ b/menu_tools/object_performance/tests/test_turnons_v29.py @@ -28,7 +28,7 @@ def test_matching_plots_reproduced(test_name): # Run Plotting with patch.object(sys, "argv", testargs): - plotter.run() + plotter.main() # Load result and assert correct outcome with open( diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index a328d27a..13983d84 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -296,7 +296,7 @@ def run(self, apply_offline_conversion: bool = False) -> None: plotter.plot() -if __name__ == "__main__": +def main(): parser = argparse.ArgumentParser() parser.add_argument( "cfg_plots", help="Path of YAML file specifying the desired plots." @@ -306,3 +306,7 @@ def run(self, apply_offline_conversion: bool = False) -> None: plotter = RatePlotCentral(args.cfg_plots) plotter.run(apply_offline_conversion=True) plotter.run() + + +if __name__ == "__main__": + main() diff --git a/poetry.lock b/poetry.lock index e72abf79..a405b5a2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -851,28 +851,28 @@ xmp = ["defusedxml"] [[package]] name = "platformdirs" -version = "4.1.0" +version = "4.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." optional = false python-versions = ">=3.8" files = [ - {file = "platformdirs-4.1.0-py3-none-any.whl", hash = "sha256:11c8f37bcca40db96d8144522d925583bdb7a31f7b0e37e3ed4318400a8e2380"}, - {file = "platformdirs-4.1.0.tar.gz", hash = "sha256:906d548203468492d432bcb294d4bc2fff751bf84971fbb2c10918cc206ee420"}, + {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, + {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, ] [package.extras] -docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"] +docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] [[package]] name = "pluggy" -version = "1.3.0" +version = "1.4.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" files = [ - {file = "pluggy-1.3.0-py3-none-any.whl", hash = "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7"}, - {file = "pluggy-1.3.0.tar.gz", hash = "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12"}, + {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, + {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, ] [package.extras] @@ -1009,13 +1009,13 @@ six = ">=1.5" [[package]] name = "pytz" -version = "2023.3.post1" +version = "2023.4" description = "World timezone definitions, modern and historical" optional = false python-versions = "*" files = [ - {file = "pytz-2023.3.post1-py2.py3-none-any.whl", hash = "sha256:ce42d816b81b68506614c11e8937d3aa9e41007ceb50bfdcb0749b921bf646c7"}, - {file = "pytz-2023.3.post1.tar.gz", hash = "sha256:7b4fddbeb94a1eba4b557da24f19fdf9db575192544270a9101d8509f9f43d7b"}, + {file = "pytz-2023.4-py2.py3-none-any.whl", hash = "sha256:f90ef520d95e7c46951105338d918664ebfd6f1d995bd7d153127ce90efafa6a"}, + {file = "pytz-2023.4.tar.gz", hash = "sha256:31d4583c4ed539cd037956140d695e42c033a19e984bfce9964a3f7d59bc2b40"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 105c1a6e..95db9597 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,14 @@ flake8 = "^7.0.0" [tool.poetry.group.test.dependencies] pytest = "7.4.3" +[tool.poetry.scripts] +object_performance = "menu_tools.object_performance.plotter:main" +rate_plots = "menu_tools.rate_plots.plotter:main" + +[options.entry_points."console_scripts"] +object_performance = "menu_tools.object_performance.plotter:main" +rate_plots = "menu_tools.rate_plots.plotter:main" + [tool.pytest.ini_options] filterwarnings = [ "error", From cf650b22d8ebdd7825b1c5e5b0b749f3a37fa629 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 31 Jan 2024 11:31:38 +0100 Subject: [PATCH 102/140] Fix V29 gmtTkMuon definition: no quality < 8 GeV --- configs/V29/objects/muons.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/configs/V29/objects/muons.yaml b/configs/V29/objects/muons.yaml index ce800429..e278232e 100644 --- a/configs/V29/objects/muons.yaml +++ b/configs/V29/objects/muons.yaml @@ -17,11 +17,8 @@ gmtTkMuon: barrel: [0, 0.83] overlap: [0.83, 1.24] endcap: [1.24, 2.4] - cuts: - inclusive: - - "{quality} > 0" ids: default: cuts: inclusive: - - "{quality} > 0" + - "({quality} > 0) | ({pt} < 8)" # quality criterion only to be appied for p_T > 8 GeV From 62628ecaa4193d129d33107dadcaef2659e13bac Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 31 Jan 2024 11:40:59 +0100 Subject: [PATCH 103/140] Fix the inclusive ranges and cuts in the v29 objects --- configs/V29/objects/electrons.yaml | 8 ++++---- configs/V29/objects/muons.yaml | 4 ++-- configs/V29/objects/taus.yaml | 14 ++++++++++---- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index cb06e288..cdca64e2 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -1,7 +1,7 @@ part_e: label: "Gen Electron" eta_ranges: - inclusive: [0, 5] + inclusive: [0, 7] ids: gen_electron_default: cuts: @@ -11,7 +11,7 @@ part_e: tkElectron: match_dR: 0.15 eta_ranges: - inclusive: [0, 5] + inclusive: [0, 7] barrel: [0, 1.479] endcap: [1.479, 5] ids: @@ -27,7 +27,7 @@ tkElectron: label: "TkElectron id in barrel" cuts: inclusive: - - "abs({eta}) < 2.4" + - "abs({eta}) < 2.7" barrel: - "({passeseleid} == 1) | ({pt} < 25)" Iso: @@ -44,7 +44,7 @@ tkElectron: EG: match_dR: 0.2 eta_ranges: - inclusive: [0, 5] + inclusive: [0, 7] barrel: [0, 1.479] endcap: [1.479, 3.0] label: "EG" diff --git a/configs/V29/objects/muons.yaml b/configs/V29/objects/muons.yaml index e278232e..738bd1b0 100644 --- a/configs/V29/objects/muons.yaml +++ b/configs/V29/objects/muons.yaml @@ -2,7 +2,7 @@ gmtMuon: label: "GMT Muon" match_dR: 0.3 eta_ranges: - inclusive: [0, 5] + inclusive: [0, 7] barrel: [0, 0.83] overlap: [0.83, 1.24] endcap: [1.24, 2.4] @@ -13,7 +13,7 @@ gmtTkMuon: label: "GMT TkMuon" match_dR: 0.1 eta_ranges: - inclusive: [0, 5] + inclusive: [0, 7] barrel: [0, 0.83] overlap: [0.83, 1.24] endcap: [1.24, 2.4] diff --git a/configs/V29/objects/taus.yaml b/configs/V29/objects/taus.yaml index 3c058ad2..155adbee 100644 --- a/configs/V29/objects/taus.yaml +++ b/configs/V29/objects/taus.yaml @@ -2,21 +2,27 @@ nnTau: label: "NN Tau" match_dR: 0.1 eta_ranges: - inclusive: [0, 2.4] + inclusive: [0, 7] barrel: [0, 1.5] endcap: [1.5, 2.4] cuts: inclusive: - "{passloosenn}==1" ids: - default: {} + default: + cuts: + inclusive: + - "abs({eta}) < 2.4" caloTau: label: "Calo Tau" match_dR: 0.3 eta_ranges: - inclusive: [0, 2.4] + inclusive: [0, 7] barrel: [0, 1.5] endcap: [1.5, 2.4] ids: - default: {} + default: + cuts: + inclusive: + - "abs({eta}) < 2.4" From 5c0955d2303032fabdab279953ced397d0e84ff1 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 31 Jan 2024 21:40:34 +0100 Subject: [PATCH 104/140] fix bug where slope and offset were swapped --- menu_tools/object_performance/plotter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 0a802868..a7c88e99 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -460,7 +460,7 @@ def _write_scalings_to_file(self, obj: Object, params: np.ndarray) -> None: os.makedirs(fpath, exist_ok=True) a, b = params with open(os.path.join(fpath, str(obj) + ".yaml"), "w") as f: - yaml.dump({"offset": float(a), "slope": float(b)}, f) + yaml.dump({"slope": float(a), "offset": float(b)}, f) def run(self): for plot_name, cfg_plot in self.cfg_plots.items(): From adde35e76f8c28f06ac62f20adb484353e38a48a Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 31 Jan 2024 21:41:47 +0100 Subject: [PATCH 105/140] fix edgecase where phi could be 0 --- menu_tools/utils/objects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index a4a885b3..a89f5363 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -168,7 +168,7 @@ def compute_selection_mask_for_object_cuts(obj: Object, ak_array: ak.Array) -> a sel: boolean selection mask for entries passing all cuts form obj """ # Initialize mask with True everywhere - sel = abs(ak_array["phi"]) > 0 + sel = abs(ak_array["phi"]) >= 0 # If no cut are specified in object return true everywhere if not obj.cuts: @@ -176,7 +176,7 @@ def compute_selection_mask_for_object_cuts(obj: Object, ak_array: ak.Array) -> a for range_i, range_cuts in obj.cuts.items(): # Initialize temporary mask (for rangei) with True everywhere - _sel = abs(ak_array["phi"]) > 0 + _sel = abs(ak_array["phi"]) >= 0 for cut in range_cuts: cut = re.sub(r"{([^&|]*)}", r"ak_array['\1']", cut) eta_sel = (abs(ak_array["eta"]) > obj.eta_ranges[range_i][0]) & ( From 94015e45b59ee0ff565805568e53404cb1948981 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 31 Jan 2024 21:43:37 +0100 Subject: [PATCH 106/140] clean up rate plot conifg for V29 --- configs/V29/rate_plots/{test.yaml => all_rate_plots.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename configs/V29/rate_plots/{test.yaml => all_rate_plots.yaml} (100%) diff --git a/configs/V29/rate_plots/test.yaml b/configs/V29/rate_plots/all_rate_plots.yaml similarity index 100% rename from configs/V29/rate_plots/test.yaml rename to configs/V29/rate_plots/all_rate_plots.yaml From 7f088f759b504af9298d8fcbfa4e1d4556fabb60 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 31 Jan 2024 21:44:50 +0100 Subject: [PATCH 107/140] remove debugging printouts --- menu_tools/utils/scalings.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/menu_tools/utils/scalings.py b/menu_tools/utils/scalings.py index a906359f..3b239ca4 100644 --- a/menu_tools/utils/scalings.py +++ b/menu_tools/utils/scalings.py @@ -28,19 +28,22 @@ def load_scaling_params(obj: Object, eta_range: str) -> tuple[float, float]: warnings.warn_explicit( (f"No file was found at `{fpath}`"), UserWarning, - filename="utils.py", - lineno=18, + filename="utils/scalings.py", + lineno=26, ) raise UserWarning return scaling_params["slope"], scaling_params["offset"] def get_pt_branch(arr: ak.Array) -> ak.Array: - if "et" in arr.fields: - pt_orig = arr.et - elif "pt" in arr.fields: + if "pt" in arr.fields: + print("pt branch selected for offline") pt_orig = arr.pt + elif "et" in arr.fields: + print("et branch selected for offline") + pt_orig = arr.et elif "" in arr.fields: + print("'' branch selected for offline") pt_orig = arr[""][:, 0] else: raise RuntimeError("Unknown pt branch!") @@ -54,7 +57,7 @@ def add_offline_pt(arr: ak.Array, obj: Object) -> ak.Array: pt_orig = get_pt_branch(arr) new_pt = ak.zeros_like(pt_orig) - if len(obj.eta_ranges) == 1: + if len(obj.eta_ranges) == 1 and list(obj.eta_ranges)[0] == "inclusive": # if only a single eta range is configured, the scalings are applied # inclusively on that region slope, offset = load_scaling_params(obj, "inclusive") From 1d6ff55f04dc10ab3af0337fd0554400f3ca311b Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 31 Jan 2024 21:45:37 +0100 Subject: [PATCH 108/140] fix entryopnits for cli interface --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 95db9597..7b86fcbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,10 +47,6 @@ pytest = "7.4.3" object_performance = "menu_tools.object_performance.plotter:main" rate_plots = "menu_tools.rate_plots.plotter:main" -[options.entry_points."console_scripts"] -object_performance = "menu_tools.object_performance.plotter:main" -rate_plots = "menu_tools.rate_plots.plotter:main" - [tool.pytest.ini_options] filterwarnings = [ "error", From c317edbf811237f05e24f21653d2038899dff78f Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 31 Jan 2024 21:47:13 +0100 Subject: [PATCH 109/140] clean up rate config --- configs/V29/rate_plots/all_rate_plots.yaml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/configs/V29/rate_plots/all_rate_plots.yaml b/configs/V29/rate_plots/all_rate_plots.yaml index 4c9ae3d2..054eef04 100644 --- a/configs/V29/rate_plots/all_rate_plots.yaml +++ b/configs/V29/rate_plots/all_rate_plots.yaml @@ -10,19 +10,6 @@ JetDefaultRates: max: 420 step: 20 -ElectronDefaultRates: - sample: MinBias - version: V29 - test_objects: - - EG:default - - tkElectron:NoIso - - tkElectron:Iso - - tkPhoton:Iso - binning: - min: 10 - max: 97 - step: 30 - EGRates: sample: MinBias version: V29 @@ -34,7 +21,7 @@ EGRates: binning: min: 10 max: 97 - step: 30 + step: 3 MuonRates: sample: MinBias From 8a87145f890a480009ac63cf1b285758fdf1a8e9 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 31 Jan 2024 21:58:16 +0100 Subject: [PATCH 110/140] fix bug where selection did not work for objects without phi field --- menu_tools/utils/objects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index a89f5363..cdcf55bf 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -168,7 +168,7 @@ def compute_selection_mask_for_object_cuts(obj: Object, ak_array: ak.Array) -> a sel: boolean selection mask for entries passing all cuts form obj """ # Initialize mask with True everywhere - sel = abs(ak_array["phi"]) >= 0 + sel = ak.ones_like(ak_array[ak_array.fields[0]]) > 0 # If no cut are specified in object return true everywhere if not obj.cuts: @@ -176,7 +176,7 @@ def compute_selection_mask_for_object_cuts(obj: Object, ak_array: ak.Array) -> a for range_i, range_cuts in obj.cuts.items(): # Initialize temporary mask (for rangei) with True everywhere - _sel = abs(ak_array["phi"]) >= 0 + _sel = ak.ones_like(ak_array[ak_array.fields[0]]) > 0 for cut in range_cuts: cut = re.sub(r"{([^&|]*)}", r"ak_array['\1']", cut) eta_sel = (abs(ak_array["eta"]) > obj.eta_ranges[range_i][0]) & ( From 81a97846d4e2db5503af95643d272b6232910b82 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 31 Jan 2024 22:57:02 +0100 Subject: [PATCH 111/140] add ht to rate plot config --- configs/V29/rate_plots/all_rate_plots.yaml | 12 ++++++++++++ menu_tools/utils/scalings.py | 3 --- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configs/V29/rate_plots/all_rate_plots.yaml b/configs/V29/rate_plots/all_rate_plots.yaml index 054eef04..d2aa5401 100644 --- a/configs/V29/rate_plots/all_rate_plots.yaml +++ b/configs/V29/rate_plots/all_rate_plots.yaml @@ -1,3 +1,15 @@ +HTRates: + sample: MinBias + version: V29 + test_objects: + - phase1PuppiHT:default + # - seededConePuppiHT:default + # - trackerJet:default + binning: + min: 40 + max: 420 + step: 20 + JetDefaultRates: sample: MinBias version: V29 diff --git a/menu_tools/utils/scalings.py b/menu_tools/utils/scalings.py index 3b239ca4..65bbf00f 100644 --- a/menu_tools/utils/scalings.py +++ b/menu_tools/utils/scalings.py @@ -37,13 +37,10 @@ def load_scaling_params(obj: Object, eta_range: str) -> tuple[float, float]: def get_pt_branch(arr: ak.Array) -> ak.Array: if "pt" in arr.fields: - print("pt branch selected for offline") pt_orig = arr.pt elif "et" in arr.fields: - print("et branch selected for offline") pt_orig = arr.et elif "" in arr.fields: - print("'' branch selected for offline") pt_orig = arr[""][:, 0] else: raise RuntimeError("Unknown pt branch!") From 98472c0eb853b3f19d0f204f6a9d946a1a2bac14 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 31 Jan 2024 23:16:29 +0100 Subject: [PATCH 112/140] replace progress with tqdm --- menu_tools/caching/cache_objects.py | 8 ++---- menu_tools/object_performance/plotter.py | 7 ++---- menu_tools/utils/objects.py | 2 -- poetry.lock | 32 ++++++++++++++++-------- pyproject.toml | 2 +- 5 files changed, 26 insertions(+), 25 deletions(-) diff --git a/menu_tools/caching/cache_objects.py b/menu_tools/caching/cache_objects.py index fdddf135..ee23a7d3 100755 --- a/menu_tools/caching/cache_objects.py +++ b/menu_tools/caching/cache_objects.py @@ -3,7 +3,7 @@ import os import awkward as ak -from progress.bar import IncrementalBar +from tqdm import tqdm import uproot import vector import yaml @@ -257,13 +257,11 @@ def _ak_array_in_chunk(self, arr, chunk_array, branches): @utils.timer("Loading objects files") def _concat_array_from_ntuples(self): fnames = glob.glob(self._ntuple_path)[:] - bar = IncrementalBar("Progress", max=len(fnames)) branches = [self._object + x for x in self._branches] all_arrays = {x.removeprefix("part"): [] for x in branches} - for fname in fnames: - bar.next() + for fname in tqdm(fnames): new_array = {x.removeprefix("part"): [] for x in branches} # Read files in chunks to avoid issues with large size files @@ -282,8 +280,6 @@ def _concat_array_from_ntuples(self): # Concatenate array from "fname file" to all_arrays all_arrays = self._ak_array_in_chunk(all_arrays, new_array, branches) - bar.finish() - if self._object.startswith("part"): all_arrays = {**all_arrays, **self._ref_part_iso} if len(all_arrays) > 1: diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index a7c88e99..169e2dba 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -7,7 +7,7 @@ import matplotlib.pyplot as plt import mplhep as hep import numpy as np -from progress.bar import IncrementalBar +from tqdm import tqdm from menu_tools.object_performance.turnon_collection import TurnOnCollection from menu_tools.object_performance.config import PerformancePlotConfig @@ -475,9 +475,7 @@ def run(self): for test_obj in plot_config.test_object_instances: scalings[str(test_obj)] = {} thds = self._get_scaling_thresholds(cfg_plot, test_obj) - bar = IncrementalBar("Progress", max=len(thds)) - for threshold in thds: - bar.next() + for threshold in tqdm(thds): turnon_collection = TurnOnCollection(cfg_plot, threshold) turnon_collection.create_hists() scaling_pct = turnon_collection.cfg_plot.scaling_pct @@ -495,7 +493,6 @@ def run(self): scaling_function_params[str(test_obj)] = params # Write scalings for test_obj to file for usage in rate part self._write_scalings_to_file(test_obj, params) - bar.finish() plotter = ScalingPlotter( plot_name, diff --git a/menu_tools/utils/objects.py b/menu_tools/utils/objects.py index cdcf55bf..16d02ad6 100644 --- a/menu_tools/utils/objects.py +++ b/menu_tools/utils/objects.py @@ -153,8 +153,6 @@ def cuts(self) -> Optional[dict[str, list[str]]]: _cuts["inclusive"].append(global_eta_cut) except KeyError: _cuts["inclusive"] = [global_eta_cut] - if not _cuts: - print(f"No cuts will be applied for {self}!") return _cuts diff --git a/poetry.lock b/poetry.lock index a405b5a2..41c933fc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -879,16 +879,6 @@ files = [ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] -[[package]] -name = "progress" -version = "1.6" -description = "Easy to use progress bars" -optional = false -python-versions = "*" -files = [ - {file = "progress-1.6.tar.gz", hash = "sha256:c9c86e98b5c03fa1fe11e3b67c1feda4788b8d0fe7336c2ff7d5644ccfba34cd"}, -] - [[package]] name = "pyarrow" version = "14.0.2" @@ -1126,6 +1116,26 @@ files = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] +[[package]] +name = "tqdm" +version = "4.66.1" +description = "Fast, Extensible Progress Meter" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tqdm-4.66.1-py3-none-any.whl", hash = "sha256:d302b3c5b53d47bce91fea46679d9c3c6508cf6332229aa1e7d8653723793386"}, + {file = "tqdm-4.66.1.tar.gz", hash = "sha256:d88e651f9db8d8551a62556d3cff9e3034274ca5d66e93197cf2490e2dcb69c7"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[package.extras] +dev = ["pytest (>=6)", "pytest-cov", "pytest-timeout", "pytest-xdist"] +notebook = ["ipywidgets (>=6)"] +slack = ["slack-sdk"] +telegram = ["requests"] + [[package]] name = "typing-extensions" version = "4.9.0" @@ -1226,4 +1236,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "~3.11.0" -content-hash = "5ea2af5e1e8b732add60fa9a7df5db6bfc904aed929688a73de25b68fe7bf78f" +content-hash = "f72223b97aac082185750f37fdad2c15f69643014250fb8e9bb04b268fcdd11a" diff --git a/pyproject.toml b/pyproject.toml index 7b86fcbe..8d56b34f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ matplotlib = "3.8.2" mplhep = "0.3.31" numpy = "^1.23.0" pandas = "2.1.4" -progress = "1.6" +tqdm = "4.66.1" pyarrow = "14.0.2" scipy = "1.10.1" uproot = "5.0.4" From ca4084a87d6f2a306d3abe6ae9b13e0ac684e5ff Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Thu, 1 Feb 2024 08:50:14 +0100 Subject: [PATCH 113/140] add shortcut entry point --- menu_tools/caching/cache_objects.py | 11 ++++++++++- pyproject.toml | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/menu_tools/caching/cache_objects.py b/menu_tools/caching/cache_objects.py index ee23a7d3..4c304755 100755 --- a/menu_tools/caching/cache_objects.py +++ b/menu_tools/caching/cache_objects.py @@ -323,7 +323,7 @@ def load(self): self._save_array_to_parquet() -if __name__ == "__main__": +def parse_args(): parser = argparse.ArgumentParser() parser.add_argument( "cfg", @@ -336,6 +336,11 @@ def load(self): help="Only do print-out of objects and branches to be loaded.", ) args = parser.parse_args() + return args + + +def main(): + args = parse_args() with open(args.cfg, "r") as f: cfg = yaml.safe_load(f) @@ -358,3 +363,7 @@ def load(self): dryrun=args.dry_run, ) loader.load() + + +if __name__ == "__main__": + main() diff --git a/pyproject.toml b/pyproject.toml index 8d56b34f..33356ede 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,7 @@ flake8 = "^7.0.0" pytest = "7.4.3" [tool.poetry.scripts] +cache_objects = "menu_tools.caching.cache_objects:main" object_performance = "menu_tools.object_performance.plotter:main" rate_plots = "menu_tools.rate_plots.plotter:main" From a239f32df8b5299df1e39e6551feb663b359ba08 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Wed, 31 Jan 2024 22:16:39 +0100 Subject: [PATCH 114/140] add json dump for rate plotter --- menu_tools/rate_plots/plotter.py | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index 13983d84..8ff3f5d5 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -1,5 +1,6 @@ import argparse import os +import json import awkward as ak import matplotlib.pyplot as plt @@ -55,15 +56,30 @@ def _plot_single_version_rate_curves(self): fig, ax = plt.subplots(figsize=self._figsize) hep.cms.label(ax=ax, llabel=self._llabel, com=self._com) + plot_dict = {} + for obj_specifier, obj_instances in self.cfg.test_object_instances.items(): if obj_specifier not in self.data.keys(): continue rate_values = self.data[obj_specifier][version] + + xvals = list(rate_values.keys()) + yvals = list(rate_values.values()) + label = f"{obj_instances[version].plot_label} @ {version}" + + plot_dict[obj_specifier] = { + "x_values": xvals, + "y_values": yvals, + "object": obj_instances[version].plot_label, + "label": label, + "version": version, + } + ax.plot( - list(rate_values.keys()), - list(rate_values.values()), + xvals, + yvals, marker="o", - label=f"{obj_instances[version].plot_label} @ {version}", + label=label, ) self._style_plot(fig, ax) @@ -76,6 +92,9 @@ def _plot_single_version_rate_curves(self): plt.savefig(fname + ".png") plt.savefig(fname + ".pdf") + with open(fname+".json", "w") as outfile: + outfile.write(json.dumps(plot_dict, indent=4)) + # TODO: Add styling plt.close() From 0a508122c79960d82dc869d317232b2146b5a6d0 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Thu, 1 Feb 2024 11:23:02 +0100 Subject: [PATCH 115/140] make rate computer more efficient by avoiding looping over thresholds and using cumsum --- menu_tools/rate_plots/plotter.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index 8ff3f5d5..f5664c35 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -2,6 +2,8 @@ import os import json +import time + import awkward as ak import matplotlib.pyplot as plt import mplhep as hep @@ -205,7 +207,7 @@ def _load_cached_arrays(self): return arr - def compute_rate(self, threshold: float) -> float: + def compute_rate(self, thresholds) -> dict: """Computes rate at threhold after application of all object cuts. threshold: pt threshold for which to compute rate @@ -213,13 +215,15 @@ def compute_rate(self, threshold: float) -> float: Returns: rate: rate computed after all object cuts are applied """ - mask = objects.compute_selection_mask_for_object_cuts(self.object, self.arrays) - if self.apply_offline_conversion: - mask = mask & (self.arrays.offline_pt >= threshold) - else: - mask = mask & (self.arrays.pt >= threshold) - rate = ak.sum(ak.any(mask, axis=1)) / len(mask) * constants.RATE_NORM_FACTOR - return rate + obj_mask = objects.compute_selection_mask_for_object_cuts(self.object, self.arrays) + + pt_field = "offline_pt" if self.apply_offline_conversion else "pt" + max_pt_obj = ak.max(self.arrays[obj_mask][pt_field], axis = 1) + + cumsum = np.cumsum(np.histogram(max_pt_obj, bins = [-1] + list(thresholds) + [1e5])[0]) + rate = (cumsum[-1] - cumsum)/len(obj_mask) * constants.RATE_NORM_FACTOR + + return dict(zip(thresholds, rate)) class RatePlotCentral: @@ -266,9 +270,7 @@ def _compute_rates( apply_offline_conversion, ) - # Iterate over thresholds - for thr in self.get_bins(plot_config): - rate_data[version][thr] = rate_computer.compute_rate(thr) + rate_data[version] = rate_computer.compute_rate(thresholds = self.get_bins(plot_config)) return rate_data From 2bbef700739424d1e419dd5a0960d6da05325689 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Thu, 1 Feb 2024 11:23:48 +0100 Subject: [PATCH 116/140] remove EG eleID --- configs/V29/object_performance/photons_matching.yaml | 2 +- configs/V29/object_performance/photons_trigger.yaml | 2 +- configs/V29/objects/electrons.yaml | 7 ------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/configs/V29/object_performance/photons_matching.yaml b/configs/V29/object_performance/photons_matching.yaml index 35a1704f..2d203b6a 100644 --- a/configs/V29/object_performance/photons_matching.yaml +++ b/configs/V29/object_performance/photons_matching.yaml @@ -38,7 +38,7 @@ PhotonsMatching_Endcap: object: - "abs({eta}) < 2.4" test_objects: - EG:eleid: "Pt" + EG:default: "Pt" tkPhoton:NoIso: "Pt" tkPhoton:Iso: "Pt" xlabel: "Gen. $p_T$ (GeV)" diff --git a/configs/V29/object_performance/photons_trigger.yaml b/configs/V29/object_performance/photons_trigger.yaml index 93f3acca..26d94e67 100644 --- a/configs/V29/object_performance/photons_trigger.yaml +++ b/configs/V29/object_performance/photons_trigger.yaml @@ -42,7 +42,7 @@ PhotonsTrigger_Endcap: object: - "abs({eta}) < 2.4" test_objects: - EG:eleid:endcap: "Pt" + EG:default:endcap: "Pt" tkPhoton:NoIso:endcap: "Pt" tkPhoton:Iso:endcap: "Pt" thresholds: [10, 20, 30, 40] diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index cdca64e2..c26f5220 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -57,10 +57,3 @@ EG: - "{passeseleid} == 1" endcap: - "{passessaid} == 1" - eleid: - cuts: - inclusive: - - "abs({eta}) < 3.0" - - "{passeseleid} == 1" - endcap: - - "{passessaid} == 1" From acf95cf41201f538266ce1d62efbf1d47451c140 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Thu, 1 Feb 2024 11:24:02 +0100 Subject: [PATCH 117/140] fix Muon quality ID --- configs/V29/objects/muons.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/V29/objects/muons.yaml b/configs/V29/objects/muons.yaml index 738bd1b0..06a6bc43 100644 --- a/configs/V29/objects/muons.yaml +++ b/configs/V29/objects/muons.yaml @@ -21,4 +21,4 @@ gmtTkMuon: default: cuts: inclusive: - - "({quality} > 0) | ({pt} < 8)" # quality criterion only to be appied for p_T > 8 GeV + - "({quality} > 0) | ({pt} > 8)" # quality criterion only to be appied for p_T < 8 GeV From 245422821bf77da3264a3ab56cae7ba07460d0c0 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Thu, 1 Feb 2024 11:24:39 +0100 Subject: [PATCH 118/140] restrict tkPhoton eta to 2.4 --- configs/V29/objects/photons.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/V29/objects/photons.yaml b/configs/V29/objects/photons.yaml index 91280352..c2075e19 100644 --- a/configs/V29/objects/photons.yaml +++ b/configs/V29/objects/photons.yaml @@ -9,7 +9,7 @@ tkPhoton: label: "tkPhoton" cuts: inclusive: - - "abs({eta}) < 3.0" + - "abs({eta}) < 2.4" barrel: - "{passeseleid} == 1" endcap: @@ -18,7 +18,7 @@ tkPhoton: label: "tkIsoPhoton" cuts: inclusive: - - "abs({eta}) < 3.0" + - "abs({eta}) < 2.4" barrel: - "abs({trkiso}) < 0.2" - "{passeseleid} == 1" From 22481305d93fe1f25a680d4e0ddde548f4820bfa Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Fri, 2 Feb 2024 11:33:16 +0100 Subject: [PATCH 119/140] remove non-existant HT branch from caching config --- configs/V29/caching.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/V29/caching.yaml b/configs/V29/caching.yaml index ab927ad5..0bb97970 100644 --- a/configs/V29/caching.yaml +++ b/configs/V29/caching.yaml @@ -68,7 +68,6 @@ V29: phase1PuppiHT: "all" seededConePuppiJet: [Pt, Et, Eta, Phi] seededConeExtendedPuppiJet: [Pt, Et, Eta, Phi, BJetNN] - seededConeExtendedPuppiHT: "all" seededConePuppiHT: "all" seededConePuppiMHT: "all" tkElectron: [Pt, Et, Eta, Phi, Chg, Bx, TrkIso, PfIso, PuppiIso, zVtx, HwQual, HGC, PassesEleID, PassesPhoID] From 8c11d3a9940c4d16f37dac82358c92903d1f28f6 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Fri, 2 Feb 2024 11:34:42 +0100 Subject: [PATCH 120/140] update documentation --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a95b98cb..3fcbdf68 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,7 @@ Detailed instructions on how to run each step of the workflow are provided in each folder. -## Setup of Python environment - **Note:** The code should run without any setup on `lxplus`. +## Setup A standard venv with Python3.11 can be created on lxplus via `python3.11 -m venv ` and all necessary @@ -26,8 +25,12 @@ pip install . ``` - You can then execute the tools (e.g. for object performance) via + **ATTENTION:** Whenever you pull changes you need to `pip install . --upgrade` + + You can then execute the tools via ```python - python -m menu_tools.object_performance.plotter + cach_objects + object_performance + rate_plots ``` From c833a7fd2143dba049506405d22c96404b33240b Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Fri, 2 Feb 2024 21:37:15 +0100 Subject: [PATCH 121/140] add seededConePuppiHT to rate plot --- configs/V29/rate_plots/all_rate_plots.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/V29/rate_plots/all_rate_plots.yaml b/configs/V29/rate_plots/all_rate_plots.yaml index d2aa5401..410b2c55 100644 --- a/configs/V29/rate_plots/all_rate_plots.yaml +++ b/configs/V29/rate_plots/all_rate_plots.yaml @@ -3,7 +3,7 @@ HTRates: version: V29 test_objects: - phase1PuppiHT:default - # - seededConePuppiHT:default + - seededConePuppiHT:default # - trackerJet:default binning: min: 40 From 8719d26a2350b774f4dc7c7671d1ec218b88f56b Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 5 Feb 2024 10:20:27 +0100 Subject: [PATCH 122/140] make nicer progress bar --- menu_tools/object_performance/plotter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 169e2dba..21b8c3ea 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -472,10 +472,13 @@ def run(self): scalings = {} scaling_function_params = {} + pbar = tqdm(total=len(plot_config.test_object_instances), desc="Objects") for test_obj in plot_config.test_object_instances: + pbar.write(str(test_obj)) + pbar.update(1) scalings[str(test_obj)] = {} thds = self._get_scaling_thresholds(cfg_plot, test_obj) - for threshold in tqdm(thds): + for threshold in tqdm(thds, leave=False, desc="Thresholds"): turnon_collection = TurnOnCollection(cfg_plot, threshold) turnon_collection.create_hists() scaling_pct = turnon_collection.cfg_plot.scaling_pct From 655dc562ada668db871147fc8e432fe8eec8810e Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 5 Feb 2024 10:22:12 +0100 Subject: [PATCH 123/140] merge --- menu_tools/rate_plots/plotter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index f5664c35..8ae2b21a 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -207,8 +207,8 @@ def _load_cached_arrays(self): return arr - def compute_rate(self, thresholds) -> dict: - """Computes rate at threhold after application of all object cuts. + def compute_rate(self, thresholds: np.Array) -> dict: + """Computes rate at threholds after application of all object cuts. threshold: pt threshold for which to compute rate @@ -270,7 +270,7 @@ def _compute_rates( apply_offline_conversion, ) - rate_data[version] = rate_computer.compute_rate(thresholds = self.get_bins(plot_config)) + rate_data[version] = rate_computer.compute_rate(self.get_bins(plot_config)) return rate_data From f2b09ca70920c3138790d0f53c248fa419f5710c Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 5 Feb 2024 10:30:00 +0100 Subject: [PATCH 124/140] remove unused import; reforamt; fix type hint --- menu_tools/rate_plots/plotter.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index 8ae2b21a..25714552 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -2,8 +2,6 @@ import os import json -import time - import awkward as ak import matplotlib.pyplot as plt import mplhep as hep @@ -94,7 +92,7 @@ def _plot_single_version_rate_curves(self): plt.savefig(fname + ".png") plt.savefig(fname + ".pdf") - with open(fname+".json", "w") as outfile: + with open(fname + ".json", "w") as outfile: outfile.write(json.dumps(plot_dict, indent=4)) # TODO: Add styling @@ -207,7 +205,7 @@ def _load_cached_arrays(self): return arr - def compute_rate(self, thresholds: np.Array) -> dict: + def compute_rate(self, thresholds: np.ndarray) -> dict: """Computes rate at threholds after application of all object cuts. threshold: pt threshold for which to compute rate @@ -215,14 +213,18 @@ def compute_rate(self, thresholds: np.Array) -> dict: Returns: rate: rate computed after all object cuts are applied """ - obj_mask = objects.compute_selection_mask_for_object_cuts(self.object, self.arrays) + obj_mask = objects.compute_selection_mask_for_object_cuts( + self.object, self.arrays + ) pt_field = "offline_pt" if self.apply_offline_conversion else "pt" - max_pt_obj = ak.max(self.arrays[obj_mask][pt_field], axis = 1) + max_pt_obj = ak.max(self.arrays[obj_mask][pt_field], axis=1) + + cumsum = np.cumsum( + np.histogram(max_pt_obj, bins=[-1] + list(thresholds) + [1e5])[0] + ) + rate = (cumsum[-1] - cumsum) / len(obj_mask) * constants.RATE_NORM_FACTOR - cumsum = np.cumsum(np.histogram(max_pt_obj, bins = [-1] + list(thresholds) + [1e5])[0]) - rate = (cumsum[-1] - cumsum)/len(obj_mask) * constants.RATE_NORM_FACTOR - return dict(zip(thresholds, rate)) From 38ec0982a581340efce1feffe4024288b3c856c7 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 5 Feb 2024 10:49:31 +0100 Subject: [PATCH 125/140] fix HT (event level) rate plots --- menu_tools/rate_plots/plotter.py | 4 +++- menu_tools/utils/scalings.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index 25714552..ede0dfbf 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -218,7 +218,9 @@ def compute_rate(self, thresholds: np.ndarray) -> dict: ) pt_field = "offline_pt" if self.apply_offline_conversion else "pt" - max_pt_obj = ak.max(self.arrays[obj_mask][pt_field], axis=1) + + if (max_pt_obj := self.arrays[obj_mask][pt_field]).ndim > 1: + max_pt_obj = ak.max(max_pt_obj, axis=1) cumsum = np.cumsum( np.histogram(max_pt_obj, bins=[-1] + list(thresholds) + [1e5])[0] diff --git a/menu_tools/utils/scalings.py b/menu_tools/utils/scalings.py index 65bbf00f..5a42e4bd 100644 --- a/menu_tools/utils/scalings.py +++ b/menu_tools/utils/scalings.py @@ -41,7 +41,7 @@ def get_pt_branch(arr: ak.Array) -> ak.Array: elif "et" in arr.fields: pt_orig = arr.et elif "" in arr.fields: - pt_orig = arr[""][:, 0] + pt_orig = arr[""] else: raise RuntimeError("Unknown pt branch!") return pt_orig From a6a90b1f587e0cdb685f9168fa3dd11f1888d617 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 5 Feb 2024 11:08:11 +0100 Subject: [PATCH 126/140] add dump of rate plot config --- menu_tools/rate_plots/plotter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index ede0dfbf..106851f7 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -156,6 +156,12 @@ def plot(self): else: self._plot_single_version_rate_curves() + # Dump plot conifg + with open(os.path.join(self._outdir, f"{self.cfg.plot_name}.yaml"), "w") as f: + yaml.dump( + {self.cfg.plot_name: self.cfg.config_dict}, f, default_flow_style=False + ) + class RateComputer: def __init__( From df4a5e07a03e7798cf40c3b2a4e4cb6a34fe8931 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 5 Feb 2024 11:09:25 +0100 Subject: [PATCH 127/140] add test to rate plots --- .../tests/reference_data/HTRates.yaml | 10 ++ .../reference_data/V29_Offline_HTRates.json | 100 ++++++++++++++++++ .../reference_data/V29_Online_HTRates.json | 100 ++++++++++++++++++ .../rate_plots/tests/test_rate_plots_v29.py | 54 ++++++++++ 4 files changed, 264 insertions(+) create mode 100644 menu_tools/rate_plots/tests/reference_data/HTRates.yaml create mode 100644 menu_tools/rate_plots/tests/reference_data/V29_Offline_HTRates.json create mode 100644 menu_tools/rate_plots/tests/reference_data/V29_Online_HTRates.json create mode 100644 menu_tools/rate_plots/tests/test_rate_plots_v29.py diff --git a/menu_tools/rate_plots/tests/reference_data/HTRates.yaml b/menu_tools/rate_plots/tests/reference_data/HTRates.yaml new file mode 100644 index 00000000..85f7aa7e --- /dev/null +++ b/menu_tools/rate_plots/tests/reference_data/HTRates.yaml @@ -0,0 +1,10 @@ +HTRates: + binning: + max: 420 + min: 40 + step: 20 + sample: MinBias + test_objects: + - phase1PuppiHT:default + - seededConePuppiHT:default + version: V29 diff --git a/menu_tools/rate_plots/tests/reference_data/V29_Offline_HTRates.json b/menu_tools/rate_plots/tests/reference_data/V29_Offline_HTRates.json new file mode 100644 index 00000000..b4cfa778 --- /dev/null +++ b/menu_tools/rate_plots/tests/reference_data/V29_Offline_HTRates.json @@ -0,0 +1,100 @@ +{ + "phase1PuppiHT:default": { + "x_values": [ + 40.0, + 60.0, + 80.0, + 100.0, + 120.0, + 140.0, + 160.0, + 180.0, + 200.0, + 220.0, + 240.0, + 260.0, + 280.0, + 300.0, + 320.0, + 340.0, + 360.0, + 380.0, + 400.0, + 420.0 + ], + "y_values": [ + 31038.96, + 6515.021489281441, + 6515.021489281441, + 3321.78311602815, + 1973.7157652260328, + 1320.8727725069464, + 856.6764291074289, + 573.4939974851442, + 389.77321796093855, + 272.7326631107145, + 193.69841994037355, + 138.77418484190886, + 102.54622232137424, + 76.02836096294642, + 59.44092721114649, + 46.520355000304214, + 36.57418979049628, + 28.610962581377894, + 22.850999817470136, + 18.003818038006774 + ], + "object": "Histogrammed Puppi HT", + "label": "Histogrammed Puppi HT @ V29", + "version": "V29" + }, + "seededConePuppiHT:default": { + "x_values": [ + 40.0, + 60.0, + 80.0, + 100.0, + 120.0, + 140.0, + 160.0, + 180.0, + 200.0, + 220.0, + 240.0, + 260.0, + 280.0, + 300.0, + 320.0, + 340.0, + 360.0, + 380.0, + 400.0, + 420.0 + ], + "y_values": [ + 31038.96, + 8214.792795951893, + 8214.792795951893, + 2991.718364532419, + 2138.315356886446, + 1259.2443184537692, + 824.4615553978138, + 541.0430597278277, + 367.86647433427305, + 256.1609669620946, + 180.73063491999108, + 130.03981507696676, + 95.55872650942057, + 72.12543537428762, + 56.05734252743018, + 43.8607000628714, + 34.6699398057071, + 26.942776644289857, + 21.403140324903156, + 16.94939862494169 + ], + "object": "SeededCone HT", + "label": "SeededCone HT @ V29", + "version": "V29" + } +} \ No newline at end of file diff --git a/menu_tools/rate_plots/tests/reference_data/V29_Online_HTRates.json b/menu_tools/rate_plots/tests/reference_data/V29_Online_HTRates.json new file mode 100644 index 00000000..5f30cc52 --- /dev/null +++ b/menu_tools/rate_plots/tests/reference_data/V29_Online_HTRates.json @@ -0,0 +1,100 @@ +{ + "phase1PuppiHT:default": { + "x_values": [ + 40.0, + 60.0, + 80.0, + 100.0, + 120.0, + 140.0, + 160.0, + 180.0, + 200.0, + 220.0, + 240.0, + 260.0, + 280.0, + 300.0, + 320.0, + 340.0, + 360.0, + 380.0, + 400.0, + 420.0 + ], + "y_values": [ + 3669.442507879206, + 1985.5347052142697, + 1275.2179856815462, + 802.3659605329872, + 520.0963098951468, + 345.81809227898674, + 235.56044439937534, + 163.45074662826778, + 115.86023461171843, + 82.90569355263958, + 62.619923053521816, + 48.172803334212176, + 37.12500590179893, + 28.406373740036912, + 22.441822134788165, + 17.169725069462753, + 13.361225099884399, + 10.607144543371124, + 8.41961770134058, + 6.279303668850265 + ], + "object": "Histogrammed Puppi HT", + "label": "Histogrammed Puppi HT @ V29", + "version": "V29" + }, + "seededConePuppiHT:default": { + "x_values": [ + 40.0, + 60.0, + 80.0, + 100.0, + 120.0, + 140.0, + 160.0, + 180.0, + 200.0, + 220.0, + 240.0, + 260.0, + 280.0, + 300.0, + 320.0, + 340.0, + 360.0, + 380.0, + 400.0, + 420.0 + ], + "y_values": [ + 4042.156163992942, + 2461.5027757924836, + 1437.173660007707, + 891.8814474212586, + 565.4678198633054, + 370.0067883667633, + 249.8659256900643, + 172.20085399638995, + 121.36839572474497, + 86.4151790617965, + 64.68154907011176, + 49.4003363822581, + 38.33680134666477, + 29.27194191494108, + 22.976900642910742, + 17.67332837122518, + 13.864828401646825, + 11.252386273754233, + 8.765844971302249, + 6.436679700651023 + ], + "object": "SeededCone HT", + "label": "SeededCone HT @ V29", + "version": "V29" + } +} \ No newline at end of file diff --git a/menu_tools/rate_plots/tests/test_rate_plots_v29.py b/menu_tools/rate_plots/tests/test_rate_plots_v29.py new file mode 100644 index 00000000..63e150bb --- /dev/null +++ b/menu_tools/rate_plots/tests/test_rate_plots_v29.py @@ -0,0 +1,54 @@ +""" +These tests check if V29 electron object performance plots can be reproduced. +""" +import json +from unittest.mock import patch +import sys + +import numpy as np +import pytest + +from menu_tools.rate_plots import plotter + + +testdata = [ + "HTRates", +] + + +@pytest.mark.parametrize("test_name", testdata) +def test_matching_plots_reproduced(test_name): + # Prepare patching of the command line arguments for argparse + testargs = [ + "foo", + f"menu_tools/rate_plots/tests/reference_data/{test_name}.yaml", + ] + + # Run Plotting + with patch.object(sys, "argv", testargs): + plotter.main() + + # Load result and assert correct outcome (Offline) + for online_offline in ["Online", "Offline"]: + with open( + f"outputs/rate_plots/V29_{online_offline}_{test_name}.json", + "r", + ) as f: + test_result = json.load(f) + with open( + f"menu_tools/rate_plots/tests/reference_data/V29_{online_offline}_{test_name}.json", + "r", + ) as f: + reference_data = json.load(f) + + for key, val in reference_data.items(): + if isinstance(val, dict): + efficiencies_test = np.array( + test_result[key]["y_values"], dtype=np.float64 + ) + efficiencies_reference = np.array(val["y_values"], dtype=np.float64) + print(efficiencies_reference) + differences = efficiencies_test - efficiencies_reference + assert not np.any(abs(differences) > 1e-4) + else: + assert val == test_result[key] From b2e24659bab3c5129eded5bfcc1465ef9bda0c8f Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 5 Feb 2024 15:15:56 +0100 Subject: [PATCH 128/140] add build artifacts to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 76b5cf82..484f9076 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ rates/table/lib/* rates/table/rates_tables/* **/tmp/* outputs +menu_tools.egg-info +dist From 4251dcd17b0f96673c23b66efb92949d5600b7c4 Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Mon, 5 Feb 2024 15:52:20 +0100 Subject: [PATCH 129/140] Fix Tau NNID --- configs/V29/objects/taus.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/V29/objects/taus.yaml b/configs/V29/objects/taus.yaml index 155adbee..2f1bf535 100644 --- a/configs/V29/objects/taus.yaml +++ b/configs/V29/objects/taus.yaml @@ -13,6 +13,7 @@ nnTau: cuts: inclusive: - "abs({eta}) < 2.4" + - "{passloosenn}==1" caloTau: label: "Calo Tau" From c6ab90f11ee996a67f19c754533efeeb0f073866 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 12 Feb 2024 13:08:20 +0100 Subject: [PATCH 130/140] change path of scaling files in rate plots --- menu_tools/utils/scalings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu_tools/utils/scalings.py b/menu_tools/utils/scalings.py index 5a42e4bd..a4b5a941 100644 --- a/menu_tools/utils/scalings.py +++ b/menu_tools/utils/scalings.py @@ -19,7 +19,7 @@ def load_scaling_params(obj: Object, eta_range: str) -> tuple[float, float]: """ fname = str(obj).replace("inclusive", eta_range) fpath = os.path.join( - "outputs", "object_performance", obj.version, "scalings", fname + ".yaml" + "outputs", obj.version, "object_performance", "scalings", fname + ".yaml" ) try: with open(fpath, "r") as f: From 93b4063ab1eaea8bb9b2479aa8ded69b90ab4c44 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 12 Feb 2024 13:22:40 +0100 Subject: [PATCH 131/140] change output dir structure --- menu_tools/object_performance/plotter.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 21b8c3ea..cf4b4b40 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -20,12 +20,12 @@ class Plotter: - outdir_base = "outputs/object_performance/" - def _make_output_dirs(self, version: str) -> None: - os.makedirs(f"{self.outdir_base}/{version}/turnons", exist_ok=True) - os.makedirs(f"{self.outdir_base}/{version}/distributions", exist_ok=True) - os.makedirs(f"{self.outdir_base}/{version}/scalings", exist_ok=True) + os.makedirs(f"outputs/{version}/object_performance/turnons", exist_ok=True) + os.makedirs( + f"outputs/{version}/object_performance/distributions", exist_ok=True + ) + os.makedirs(f"outputs/{version}/object_performance/scalings", exist_ok=True) def _create_new_plot(self) -> tuple[plt.Figure, plt.Axes]: fig, ax = plt.subplots(figsize=(10, 10)) @@ -44,11 +44,13 @@ def __init__(self, name, cfg, turnon_collection): @property def _outdir_turnons(self) -> str: - return os.path.join(self.outdir_base, self.version, "turnons") + return os.path.join("outputs", self.version, "object_performance", "turnons") @property def _outdir_distributions(self) -> str: - return os.path.join(self.outdir_base, self.version, "distributions") + return os.path.join( + "outputs", self.version, "object_performance", "distributions" + ) def _style_plot(self, fig, ax, legend_loc="lower right"): ax.axvline(self.threshold, ls=":", c="k") @@ -393,8 +395,9 @@ def plot(self): ax.set_ylim(0, np.max(y_points)) plot_fname = os.path.join( - self.outdir_base, + "outputs", self.version, + "object_performance", "scalings", f"{self.plot_name}_{self.version}", ) @@ -412,8 +415,6 @@ def plot(self): class ScalingCentral: - outdir = "outputs/object_performance/" - def __init__(self, cfg_plots_path: str) -> None: with open(cfg_plots_path, "r") as f: self.cfg_plots = yaml.safe_load(f) @@ -453,8 +454,8 @@ def _write_scalings_to_file(self, obj: Object, params: np.ndarray) -> None: """ fpath = os.path.join( "outputs", - "object_performance", obj.version, + "object_performance", "scalings", ) os.makedirs(fpath, exist_ok=True) From a863f598517d06ebb57e3c00b034e6e91f2a29b5 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 12 Feb 2024 15:13:31 +0100 Subject: [PATCH 132/140] improve V29 rate plots config --- configs/V29/rate_plots/all_rate_plots.yaml | 46 ++++++++-------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/configs/V29/rate_plots/all_rate_plots.yaml b/configs/V29/rate_plots/all_rate_plots.yaml index 410b2c55..7c76f59e 100644 --- a/configs/V29/rate_plots/all_rate_plots.yaml +++ b/configs/V29/rate_plots/all_rate_plots.yaml @@ -4,11 +4,22 @@ HTRates: test_objects: - phase1PuppiHT:default - seededConePuppiHT:default - # - trackerJet:default + - trackerHT:default binning: - min: 40 - max: 420 - step: 20 + min: 50 + max: 975 + step: 25 + +MuonRates: + sample: MinBias + version: V29 + test_objects: + - gmtMuon:default + - gmtTkMuon:default + binning: + min: 0 + max: 75 + step: 3 JetDefaultRates: sample: MinBias @@ -16,7 +27,7 @@ JetDefaultRates: test_objects: - phase1PuppiJet:default - seededConePuppiJet:default - # - trackerJet:default + - trackerJet:default binning: min: 40 max: 420 @@ -35,36 +46,13 @@ EGRates: max: 97 step: 3 -MuonRates: - sample: MinBias - version: V29 - test_objects: - # - gmtMuon:default - # - gmtMuon:oldRateID - - gmtTkMuon:default - binning: - min: 0 - max: 75 - step: 3 - TauRates: sample: MinBias version: V29 test_objects: - nnTau:default - # - caloTau:default + - caloTau:default binning: min: 10 max: 155 step: 5 - -MuonRates: - sample: MinBias - version: V29 - test_objects: - # - gmtMuon:default - - gmtTkMuon:default - binning: - min: 0 - max: 100 - step: 10 From b0b656633022652c17031245c8eca8c4f26ba584 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 12 Feb 2024 15:13:54 +0100 Subject: [PATCH 133/140] adapt test --- menu_tools/object_performance/tests/test_turnons_v29.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu_tools/object_performance/tests/test_turnons_v29.py b/menu_tools/object_performance/tests/test_turnons_v29.py index 9c4c0e85..9bea1fea 100644 --- a/menu_tools/object_performance/tests/test_turnons_v29.py +++ b/menu_tools/object_performance/tests/test_turnons_v29.py @@ -32,7 +32,7 @@ def test_matching_plots_reproduced(test_name): # Load result and assert correct outcome with open( - f"outputs/object_performance/V29/turnons/{test_name}.json", + f"outputs/V29/object_performance/turnons/{test_name}.json", "r", ) as f: test_result = json.load(f) From a80e5bc2c43a6604ac8ab34c614fcd13cca7f375 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 14 Feb 2024 15:06:36 +0100 Subject: [PATCH 134/140] work on rate plots --- configs/V29/rate_plots/all_rate_plots.yaml | 58 ---------------------- configs/V29/rate_plots/eg.yaml | 12 +++++ configs/V29/rate_plots/ht.yaml | 11 ++++ configs/V29/rate_plots/jets.yaml | 27 ++++++++++ configs/V29/rate_plots/met.yaml | 10 ++++ configs/V29/rate_plots/muons.yaml | 22 ++++++++ configs/V29/rate_plots/taus.yaml | 23 +++++++++ 7 files changed, 105 insertions(+), 58 deletions(-) delete mode 100644 configs/V29/rate_plots/all_rate_plots.yaml create mode 100644 configs/V29/rate_plots/eg.yaml create mode 100644 configs/V29/rate_plots/ht.yaml create mode 100644 configs/V29/rate_plots/jets.yaml create mode 100644 configs/V29/rate_plots/met.yaml create mode 100644 configs/V29/rate_plots/muons.yaml create mode 100644 configs/V29/rate_plots/taus.yaml diff --git a/configs/V29/rate_plots/all_rate_plots.yaml b/configs/V29/rate_plots/all_rate_plots.yaml deleted file mode 100644 index 7c76f59e..00000000 --- a/configs/V29/rate_plots/all_rate_plots.yaml +++ /dev/null @@ -1,58 +0,0 @@ -HTRates: - sample: MinBias - version: V29 - test_objects: - - phase1PuppiHT:default - - seededConePuppiHT:default - - trackerHT:default - binning: - min: 50 - max: 975 - step: 25 - -MuonRates: - sample: MinBias - version: V29 - test_objects: - - gmtMuon:default - - gmtTkMuon:default - binning: - min: 0 - max: 75 - step: 3 - -JetDefaultRates: - sample: MinBias - version: V29 - test_objects: - - phase1PuppiJet:default - - seededConePuppiJet:default - - trackerJet:default - binning: - min: 40 - max: 420 - step: 20 - -EGRates: - sample: MinBias - version: V29 - test_objects: - - EG:default - - tkElectron:NoIso - - tkElectron:Iso - - tkPhoton:Iso - binning: - min: 10 - max: 97 - step: 3 - -TauRates: - sample: MinBias - version: V29 - test_objects: - - nnTau:default - - caloTau:default - binning: - min: 10 - max: 155 - step: 5 diff --git a/configs/V29/rate_plots/eg.yaml b/configs/V29/rate_plots/eg.yaml new file mode 100644 index 00000000..4c1a38e8 --- /dev/null +++ b/configs/V29/rate_plots/eg.yaml @@ -0,0 +1,12 @@ +EGRates: + sample: MinBias + version: V29 + test_objects: + - EG:default + - tkElectron:NoIso + - tkElectron:Iso + - tkPhoton:Iso + binning: + min: 10 + max: 97 + step: 3 diff --git a/configs/V29/rate_plots/ht.yaml b/configs/V29/rate_plots/ht.yaml new file mode 100644 index 00000000..c855e7f9 --- /dev/null +++ b/configs/V29/rate_plots/ht.yaml @@ -0,0 +1,11 @@ +HTRates: + sample: MinBias + version: V29 + test_objects: + - phase1PuppiHT:default + - seededConePuppiHT:default + - trackerHT:default + binning: + min: 50 + max: 975 + step: 25 diff --git a/configs/V29/rate_plots/jets.yaml b/configs/V29/rate_plots/jets.yaml new file mode 100644 index 00000000..738c05ca --- /dev/null +++ b/configs/V29/rate_plots/jets.yaml @@ -0,0 +1,27 @@ +JetDefaultRates: + sample: MinBias + version: V29 + test_objects: + - phase1PuppiJet:default + - seededConePuppiJet:default + # - seededConeExtendedPuppiJet:default + - trackerJet:default + # - caloJet:default + binning: + min: 40 + max: 420 + step: 20 + +JetsByRegion: + sample: MinBias + version: V29 + test_objects: + - phase1PuppiJet:default:barrel + - phase1PuppiJet:default:endcap + - seededConePuppiJet:default:barrel + - seededConePuppiJet:default:endcap + binning: + min: 40 + max: 420 + step: 20 + diff --git a/configs/V29/rate_plots/met.yaml b/configs/V29/rate_plots/met.yaml new file mode 100644 index 00000000..7e527eaa --- /dev/null +++ b/configs/V29/rate_plots/met.yaml @@ -0,0 +1,10 @@ +METRates: + sample: MinBias + version: V29 + test_objects: + - puppiMET:default + - trackerMET:default + binning: + min: 50 + max: 500 + step: 25 diff --git a/configs/V29/rate_plots/muons.yaml b/configs/V29/rate_plots/muons.yaml new file mode 100644 index 00000000..74c911b0 --- /dev/null +++ b/configs/V29/rate_plots/muons.yaml @@ -0,0 +1,22 @@ +gmtMuonByRegion: + sample: MinBias + version: V29 + test_objects: + - gmtMuon:default:barrel + - gmtMuon:default:overlap + - gmtMuon:default:endcap + binning: + min: 0 + max: 75 + step: 3 + +MuonRates: + sample: MinBias + version: V29 + test_objects: + - gmtMuon:default + - gmtTkMuon:default + binning: + min: 0 + max: 75 + step: 3 diff --git a/configs/V29/rate_plots/taus.yaml b/configs/V29/rate_plots/taus.yaml new file mode 100644 index 00000000..16ba3066 --- /dev/null +++ b/configs/V29/rate_plots/taus.yaml @@ -0,0 +1,23 @@ +TauRates: + sample: MinBias + version: V29 + test_objects: + - nnTau:default + - caloTau:default + binning: + min: 10 + max: 155 + step: 5 + +TauRatesByRegion: + sample: MinBias + version: V29 + test_objects: + - caloTau:default:barrel + - caloTau:default:endcap + - nnTau:default:barrel + - nnTau:default:endcap + binning: + min: 10 + max: 155 + step: 5 From 5fd2d2b1554d99f54f438ec7f5000d4a30d046b1 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Fri, 16 Feb 2024 22:57:44 +0100 Subject: [PATCH 135/140] add gmtMuon quality cut in overlap region --- configs/V29/objects/muons.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configs/V29/objects/muons.yaml b/configs/V29/objects/muons.yaml index 06a6bc43..77a8fe31 100644 --- a/configs/V29/objects/muons.yaml +++ b/configs/V29/objects/muons.yaml @@ -7,7 +7,10 @@ gmtMuon: overlap: [0.83, 1.24] endcap: [1.24, 2.4] ids: - default: {} + default: + cuts: + overlap: + - "{quality} >= 12" gmtTkMuon: label: "GMT TkMuon" From b047beac6ab133da8c8976adcebcbedb68432d36 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 21 Feb 2024 14:59:09 +0100 Subject: [PATCH 136/140] add dpg_trigger/.../cache as symlink to repo --- cache | 1 + 1 file changed, 1 insertion(+) create mode 120000 cache diff --git a/cache b/cache new file mode 120000 index 00000000..5a2aa4fe --- /dev/null +++ b/cache @@ -0,0 +1 @@ +/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/cache \ No newline at end of file From 9a5032651437620a00a842303af508840d3d3d13 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Wed, 21 Feb 2024 15:07:30 +0100 Subject: [PATCH 137/140] remove quality cut <25GeV for tkElectrons --- configs/V29/objects/electrons.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index c26f5220..9875c7af 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -20,7 +20,6 @@ tkElectron: cuts: inclusive: - "abs({eta}) < 2.4" - - "({passeseleid} == 1) | ({pt} < 25)" NoIsoForIso: # This id is exclusively used for the # isoloation wp derivation @@ -28,8 +27,6 @@ tkElectron: cuts: inclusive: - "abs({eta}) < 2.7" - barrel: - - "({passeseleid} == 1) | ({pt} < 25)" Iso: label: "TkIsoElectron" cuts: @@ -37,7 +34,6 @@ tkElectron: - "abs({eta}) < 2.4" barrel: - "abs({trkiso}) < 0.13" - - "({passeseleid} == 1) | ({pt} < 25)" endcap: - "abs({trkiso}) < 0.28" From 236b4a888d4e21982144604ad56f5648b924563f Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 26 Feb 2024 14:11:37 +0100 Subject: [PATCH 138/140] add NoIsoLowPt id for tkElectron --- configs/V29/object_performance/electron_matching.yaml | 2 ++ .../V29/object_performance/electron_matching_eta.yaml | 2 ++ configs/V29/object_performance/electron_trigger.yaml | 2 ++ configs/V29/objects/electrons.yaml | 10 ++++++++++ 4 files changed, 16 insertions(+) diff --git a/configs/V29/object_performance/electron_matching.yaml b/configs/V29/object_performance/electron_matching.yaml index 94877ba3..68ed26f2 100644 --- a/configs/V29/object_performance/electron_matching.yaml +++ b/configs/V29/object_performance/electron_matching.yaml @@ -15,6 +15,7 @@ ElectronsMatchingBarrel: test_objects: EG:default: "Pt" tkElectron:NoIso: "Pt" + tkElectron:NoIsoLowPt: "Pt" tkElectron:Iso: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (Barrel)" @@ -40,6 +41,7 @@ ElectronsMatchingEndcap: test_objects: EG:default: "Pt" tkElectron:NoIso: "Pt" + tkElectron:NoIsoLowPt: "Pt" tkElectron:Iso: "Pt" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (Endcap)" diff --git a/configs/V29/object_performance/electron_matching_eta.yaml b/configs/V29/object_performance/electron_matching_eta.yaml index 5584d0a2..4e470d51 100644 --- a/configs/V29/object_performance/electron_matching_eta.yaml +++ b/configs/V29/object_performance/electron_matching_eta.yaml @@ -16,6 +16,7 @@ ElectronsMatching_Eta_Pt10to25: test_objects: EG:default: "Eta" tkElectron:NoIso: "Eta" + tkElectron:NoIsoLowPt: "Eta" tkElectron:Iso: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" @@ -41,6 +42,7 @@ ElectronsMatching_Eta_Pt25toInf: test_objects: EG:default: "Eta" tkElectron:NoIso: "Eta" + tkElectron:NoIsoLowPt: "Eta" tkElectron:Iso: "Eta" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency ($p_T > 25$ GeV)" diff --git a/configs/V29/object_performance/electron_trigger.yaml b/configs/V29/object_performance/electron_trigger.yaml index 476ceb39..18bc8f3d 100644 --- a/configs/V29/object_performance/electron_trigger.yaml +++ b/configs/V29/object_performance/electron_trigger.yaml @@ -15,6 +15,7 @@ ElectronsTriggerBarrel: test_objects: EG:default:barrel: "Pt" tkElectron:NoIso:barrel: "Pt" + tkElectron:NoIsoLowPt:barrel: "Pt" tkElectron:Iso:barrel: "Pt" thresholds: [10, 20, 30, 40] scalings: @@ -44,6 +45,7 @@ ElectronsTriggerEndcap: test_objects: EG:default:endcap: "Pt" tkElectron:NoIso:endcap: "Pt" + tkElectron:NoIsoLowPt:endcap: "Pt" tkElectron:Iso:endcap: "Pt" thresholds: [10, 20, 30, 40] scalings: diff --git a/configs/V29/objects/electrons.yaml b/configs/V29/objects/electrons.yaml index 9875c7af..efb65634 100644 --- a/configs/V29/objects/electrons.yaml +++ b/configs/V29/objects/electrons.yaml @@ -20,6 +20,7 @@ tkElectron: cuts: inclusive: - "abs({eta}) < 2.4" + - "({passeseleid} == 1)" NoIsoForIso: # This id is exclusively used for the # isoloation wp derivation @@ -27,6 +28,8 @@ tkElectron: cuts: inclusive: - "abs({eta}) < 2.7" + barrel: + - "({passeseleid} == 1)" Iso: label: "TkIsoElectron" cuts: @@ -34,8 +37,15 @@ tkElectron: - "abs({eta}) < 2.4" barrel: - "abs({trkiso}) < 0.13" + - "({passeseleid} == 1)" endcap: - "abs({trkiso}) < 0.28" + NoIsoLowPt: + label: "TkElectron, no ID for $p_T<25$" + cuts: + inclusive: + - "abs({eta}) < 2.4" + - "({passeseleid} == 1) | ({pt} < 25)" EG: match_dR: 0.2 From 862382ed681a044cce6240dbb736afd73369bfc7 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 26 Feb 2024 14:14:31 +0100 Subject: [PATCH 139/140] remove xerr from efficiency plots --- menu_tools/object_performance/plotter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index cf4b4b40..974b650b 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -155,7 +155,7 @@ def _plot_efficiency_curve(self): ) err_kwargs = { - "xerr": self.turnon_collection.xerr(obj_key), + # "xerr": self.turnon_collection.xerr(obj_key), "capsize": 3, "marker": "o", "markersize": 8, From d495a1453dce608fe5c2bb6af917a099c6ab0638 Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Mon, 26 Feb 2024 16:03:20 +0100 Subject: [PATCH 140/140] create warning when scalings already exist and dump to different file; add warning comments to tau config; fix tests after tkeleID change --- .gitignore | 1 + .../V29/object_performance/met_ht_mht.yaml | 8 +- .../V29/object_performance/tau_trigger.yaml | 8 + menu_tools/object_performance/plotter.py | 22 +- .../ElectronsIsolation_Barrel_-999_V29.json | 204 +++++++++--------- .../ElectronsIsolation_Barrel_-999_V29.yaml | 2 +- .../rate_plots/tests/test_rate_plots_v29.py | 13 +- 7 files changed, 145 insertions(+), 113 deletions(-) diff --git a/.gitignore b/.gitignore index 484f9076..0c32cf82 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.pyc pyenv/* **/*.png +**/*.pdf **/.DS_Store **/*.parquet **/*.root diff --git a/configs/V29/object_performance/met_ht_mht.yaml b/configs/V29/object_performance/met_ht_mht.yaml index 68dc5a98..709bebb4 100644 --- a/configs/V29/object_performance/met_ht_mht.yaml +++ b/configs/V29/object_performance/met_ht_mht.yaml @@ -52,7 +52,7 @@ HT_50perc: max: 750 step: 20 -MHT_50perc: +MHT_90perc: sample: TT version: V29 reference_object: @@ -71,7 +71,7 @@ MHT_50perc: thresholds: [70, 150] scalings: method: "naive" - threshold: 0.50 + threshold: 0.90 xlabel: "Gen. MHT30 (GeV)" ylabel: "Trigger Efficiency ( GeV)" binning: @@ -79,7 +79,7 @@ MHT_50perc: max: 500 step: 20 -MHT_90perc: +MHT_50perc: sample: TT version: V29 reference_object: @@ -98,7 +98,7 @@ MHT_90perc: thresholds: [70, 150] scalings: method: "naive" - threshold: 0.90 + threshold: 0.50 xlabel: "Gen. MHT30 (GeV)" ylabel: "Trigger Efficiency ( GeV)" binning: diff --git a/configs/V29/object_performance/tau_trigger.yaml b/configs/V29/object_performance/tau_trigger.yaml index 084cdd11..2bd6456d 100644 --- a/configs/V29/object_performance/tau_trigger.yaml +++ b/configs/V29/object_performance/tau_trigger.yaml @@ -54,6 +54,10 @@ TauTriggerEndcap_90perc: max: 150 step: 6 +# ATTENTION: The scalings from this config are in conflict with the 90prec +# configurations above and will be written to a file with the plot name as +# prefix. To use these scalings in the rate plots/table, overwrite the standard +# scalings yaml files in outputs! TauTriggerBarrel_50perc: sample: VBFHToTauTau version: V29 @@ -82,6 +86,10 @@ TauTriggerBarrel_50perc: max: 150 step: 6 +# ATTENTION: The scalings from this config are in conflict with the 90prec +# configurations above and will be written to a file with the plot name as +# prefix. To use these scalings in the rate plots/table, overwrite the standard +# scalings yaml files in outputs! TauTriggerEndcap_50perc: sample: VBFHToTauTau version: V29 diff --git a/menu_tools/object_performance/plotter.py b/menu_tools/object_performance/plotter.py index 974b650b..955f559a 100755 --- a/menu_tools/object_performance/plotter.py +++ b/menu_tools/object_performance/plotter.py @@ -1,8 +1,9 @@ import argparse import json import os -import yaml from typing import Any +import warnings +import yaml import matplotlib.pyplot as plt import mplhep as hep @@ -443,7 +444,9 @@ def _get_scaling_thresholds(self, cfg_plot, test_obj) -> list[int]: return self.scaling_thresholds["Jet"] raise RuntimeError("Failed to find thresholds in cfg_scaling_thresholds!") - def _write_scalings_to_file(self, obj: Object, params: np.ndarray) -> None: + def _write_scalings_to_file( + self, obj: Object, params: np.ndarray, plot_name: str + ) -> None: """Dumps the scaling parameters to a file. Writes the offset and slope params of the linear scaling function to @@ -460,7 +463,18 @@ def _write_scalings_to_file(self, obj: Object, params: np.ndarray) -> None: ) os.makedirs(fpath, exist_ok=True) a, b = params - with open(os.path.join(fpath, str(obj) + ".yaml"), "w") as f: + + out_path = os.path.join(fpath, str(obj) + ".yaml") + if os.path.exists(out_path): + warnings.warn( + ( + f"A file already exists at the scaling destination `{out_path}`." + f"Will dump the scalings with `{plot_name}` prefix." + ), + UserWarning, + ) + out_path = out_path.replace(str(obj), plot_name + "_" + str(obj)) + with open(out_path, "w") as f: yaml.dump({"slope": float(a), "offset": float(b)}, f) def run(self): @@ -496,7 +510,7 @@ def run(self): params = scaling_collection.fit_linear_function(scalings[str(test_obj)]) scaling_function_params[str(test_obj)] = params # Write scalings for test_obj to file for usage in rate part - self._write_scalings_to_file(test_obj, params) + self._write_scalings_to_file(test_obj, params, plot_name) plotter = ScalingPlotter( plot_name, diff --git a/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json b/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json index 76626ecc..fe51f03f 100644 --- a/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json +++ b/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.json @@ -2,108 +2,108 @@ "xlabel": "Isolation", "ylabel": "Efficiency (Barrel)", "watermark": "V29_ElectronsIsolation_Barrel_-999", - "tkElectron:NoIso:inclusive": { - "label": "TkElectron", + "tkElectron:NoIsoLowPt:inclusive": { + "label": "TkElectron, no ID for $p_T<25$", "efficiency": [ - 0.9405951546885947, - 0.9405951546885947, - 0.9405951546885947, - 0.9407426527526827, - 0.9408901508167705, - 0.9415170175891442, - 0.9424388804896936, - 0.9435451159703528, - 0.9458682104797375, - 0.9487075482134297, - 0.9522106272355175, - 0.9551237140012537, - 0.9584792949592537, - 0.9614292562410118, - 0.9640104723625502, - 0.9662966923559129, - 0.9684354142851875, - 0.9704266381503742, - 0.9721228658873853, - 0.9735240974962204, - 0.975662819425495, - 0.977322172646484, - 0.9786865297392972, - 0.9800877613481324, - 0.9810464987647037, - 0.9820421106972971, - 0.9828533500497806, - 0.9838489619823739, - 0.9851026955271212, - 0.9859508093956267, - 0.9865039271359564, - 0.987093919392308, - 0.9879051587447915, - 0.9884951510011432, - 0.9889007706773849, - 0.9895645119657804, - 0.9900807551900881, - 0.9906338729304178, - 0.9912238651867694, - 0.9915926103469892, - 0.9922932261514068, - 0.9924407242154947, - 0.9928463438917364, - 0.9932888380840001, - 0.993546959696154, - 0.9938419558243298, - 0.9941369519525056, - 0.9944319480806815, - 0.9945794461447693, - 0.9946163206607913, - 0.9948006932409013, - 0.995058814853055, - 0.995243187433165, - 0.9953538109812309, - 0.9954644345292968, - 0.9957963051734946, - 0.9959069287215605, - 0.9960544267856485, - 0.9963494229138242, - 0.9964600464618902, - 0.9965337954939342, - 0.9966075445259781, - 0.9968287916221099, - 0.9969762896861979, - 0.9971606622663077, - 0.9973081603303957, - 0.9973450348464177, - 0.9975294074265275, - 0.9976400309745934, - 0.9977506545226594, - 0.9978244035547034, - 0.9979719016187912, - 0.9980456506508352, - 0.9981193996828792, - 0.9982668977469671, - 0.9984512703270769, - 0.9985987683911649, - 0.9987093919392308, - 0.9987831409712747, - 0.9988568900033187, - 0.9989306390353626, - 0.9990781370994506, - 0.9991887606475165, - 0.9991887606475165, - 0.9992993841955824, - 0.9993362587116044, - 0.9994100077436484, - 0.9994100077436484, - 0.9994837567756923, - 0.9994837567756923, - 0.9994837567756923, - 0.9995575058077363, - 0.9995575058077363, - 0.9996312548397802, - 0.9996312548397802, - 0.9997787529038681, - 0.9998525019359121, - 0.999963125483978, - 0.999963125483978, + 0.9455413650661311, + 0.9455413650661311, + 0.9455413650661311, + 0.9456929548641376, + 0.9458445446621443, + 0.9464888013036723, + 0.9474362375412134, + 0.9485731610262629, + 0.9509607003448668, + 0.9538030090574904, + 0.9572895744116421, + 0.9601697805737673, + 0.9636184484784174, + 0.966574449539546, + 0.9691514761056581, + 0.9713874256262554, + 0.9734338878993444, + 0.9752908629249252, + 0.9766930685564862, + 0.9779815818395422, + 0.9798006594156213, + 0.981240762496684, + 0.982415583431235, + 0.9836661992647895, + 0.984575738052829, + 0.9854852768408686, + 0.986091636032895, + 0.9868116875734263, + 0.9878349187099709, + 0.9884791753514989, + 0.9889339447455187, + 0.9893508166900368, + 0.9899192784325614, + 0.9904119452760829, + 0.9907909197710995, + 0.9913214840641225, + 0.9917762534581422, + 0.9922689203016637, + 0.9927994845946868, + 0.9931026641906999, + 0.993746920832228, + 0.9938606131807329, + 0.9942395876757494, + 0.9945048698222609, + 0.9947322545192708, + 0.9950354341152841, + 0.9951870239132906, + 0.9954144086103005, + 0.9955281009588055, + 0.9955659984083072, + 0.9957175882063137, + 0.9959828703528253, + 0.9961723576003335, + 0.9962481524993368, + 0.9963239473983401, + 0.996665024443855, + 0.9967408193428582, + 0.9968166142418615, + 0.9970439989388714, + 0.9971576912873764, + 0.9972334861863796, + 0.9972713836358813, + 0.9974229734338879, + 0.9974987683328912, + 0.9976882555803994, + 0.9978398453784061, + 0.9978777428279076, + 0.9980293326259143, + 0.9981430249744192, + 0.9982188198734225, + 0.9982567173229242, + 0.9983704096714291, + 0.9984462045704324, + 0.9985219994694358, + 0.9986356918179407, + 0.9987872816159472, + 0.9989388714139539, + 0.9989767688634555, + 0.9990525637624588, + 0.9991283586614621, + 0.9992041535604654, + 0.999355743358472, + 0.9994694357069769, + 0.9994694357069769, + 0.9995452306059802, + 0.9995831280554819, + 0.9996589229544852, + 0.9996589229544852, + 0.9996968204039868, + 0.9996968204039868, + 0.9996968204039868, + 0.9997347178534884, + 0.9997347178534884, + 0.9998105127524918, + 0.9998105127524918, + 0.9998863076514951, + 0.9998863076514951, + 0.9999621025504983, + 0.9999621025504983, 1.0 ], "efficiency_err": [ @@ -522,4 +522,4 @@ "markersize": 8 } } -} +} \ No newline at end of file diff --git a/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.yaml b/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.yaml index 7ad771c0..bf6e1ea4 100644 --- a/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.yaml +++ b/menu_tools/object_performance/tests/reference_data/ElectronsIsolation_Barrel_-999_V29.yaml @@ -17,7 +17,7 @@ ElectronsIsolation_Barrel: x_arg: Pt sample: DYLL_M50 test_objects: - tkElectron:NoIso: trkiso + tkElectron:NoIsoLowPt: trkiso version: V29 xlabel: Isolation ylabel: Efficiency (Barrel) diff --git a/menu_tools/rate_plots/tests/test_rate_plots_v29.py b/menu_tools/rate_plots/tests/test_rate_plots_v29.py index 63e150bb..bc6d920d 100644 --- a/menu_tools/rate_plots/tests/test_rate_plots_v29.py +++ b/menu_tools/rate_plots/tests/test_rate_plots_v29.py @@ -3,6 +3,7 @@ """ import json from unittest.mock import patch +import re import sys import numpy as np @@ -27,6 +28,7 @@ def test_matching_plots_reproduced(test_name): # Run Plotting with patch.object(sys, "argv", testargs): plotter.main() + pass # Load result and assert correct outcome (Offline) for online_offline in ["Online", "Offline"]: @@ -42,13 +44,20 @@ def test_matching_plots_reproduced(test_name): reference_data = json.load(f) for key, val in reference_data.items(): + print(key) if isinstance(val, dict): efficiencies_test = np.array( test_result[key]["y_values"], dtype=np.float64 ) efficiencies_reference = np.array(val["y_values"], dtype=np.float64) - print(efficiencies_reference) differences = efficiencies_test - efficiencies_reference - assert not np.any(abs(differences) > 1e-4) + print(differences) + try: + assert not np.any(abs(differences) > 1e-4) + except Exception as e: + print(online_offline) + print(efficiencies_test) + print(efficiencies_reference) + raise e else: assert val == test_result[key]