From c65e4a3de0df5c4844c83e50d588826282f4a046 Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Mon, 17 Apr 2023 12:33:12 +0200 Subject: [PATCH 1/9] [gmtTkMuon quality] Include quality cut on gmtTkMuon --- objectPerformance/cfg_plots/V29/muon_matching.yaml | 3 +++ objectPerformance/cfg_plots/V29/muon_matching_eta.yaml | 6 +++++- objectPerformance/cfg_plots/V29/muon_trigger.yaml | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/objectPerformance/cfg_plots/V29/muon_matching.yaml b/objectPerformance/cfg_plots/V29/muon_matching.yaml index 9baec976..2ae1039c 100644 --- a/objectPerformance/cfg_plots/V29/muon_matching.yaml +++ b/objectPerformance/cfg_plots/V29/muon_matching.yaml @@ -23,6 +23,7 @@ MuonsMatchingBarrel: match_dR: 0.1 cuts: - "abs({eta}) < 0.83" + - "({quality}) > 0" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (barrel)" binning: @@ -56,6 +57,7 @@ MuonsMatchingOverlap: label: "GMT TkMuon" match_dR: 0.1 cuts: + - "({quality}) > 0" - "abs({eta}) > 0.83" - "abs({eta}) < 1.24" xlabel: "Gen. $p_T$ (GeV)" @@ -93,6 +95,7 @@ MuonsMatchingEndcap: cuts: - "abs({eta}) > 1.24" - "abs({eta}) < 2.4" + - "({quality}) > 0" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency (endcap)" binning: diff --git a/objectPerformance/cfg_plots/V29/muon_matching_eta.yaml b/objectPerformance/cfg_plots/V29/muon_matching_eta.yaml index 0c0be0e9..1ac547d8 100644 --- a/objectPerformance/cfg_plots/V29/muon_matching_eta.yaml +++ b/objectPerformance/cfg_plots/V29/muon_matching_eta.yaml @@ -21,6 +21,8 @@ MuonsMatching_Eta_Pt2to5: suffix: "Eta" label: "GMT TkMuon" match_dR: 0.1 + cuts: + - "({quality}) > 0" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency (2-5 GeV)" binning: @@ -50,9 +52,11 @@ MuonsMatching_Eta_Pt15toInf: suffix: "Eta" label: "GMT TkMuon" match_dR: 0.1 + cuts: + - "({quality}) > 0" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency (>15 GeV)" binning: min: -3 max: 3 - step: 0.2 + step: 0.2 \ No newline at end of file diff --git a/objectPerformance/cfg_plots/V29/muon_trigger.yaml b/objectPerformance/cfg_plots/V29/muon_trigger.yaml index afec1614..8e55207d 100644 --- a/objectPerformance/cfg_plots/V29/muon_trigger.yaml +++ b/objectPerformance/cfg_plots/V29/muon_trigger.yaml @@ -52,6 +52,7 @@ MuonsTrigger_Barrel: label: "GMT TkMuon" match_dR: 0.3 cuts: + - "({quality}) > 0" - "abs({eta}) < 0.83" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (barrel, L1 $p_T > 20$ GeV)" @@ -90,6 +91,7 @@ MuonsTrigger_Overlap: label: "GMT TkMuon" match_dR: 0.3 cuts: + - "({quality}) > 0" - "abs({eta}) > 0.83" - "abs({eta}) < 1.24" xlabel: "Gen. pT (GeV)" @@ -127,6 +129,7 @@ MuonsTrigger_Endcap: label: "GMT TkMuon" match_dR: 0.3 cuts: + - "({quality}) > 0" - "abs({eta}) > 1.24" xlabel: "Gen. pT (GeV)" ylabel: "Trigger Efficiency (endcap, L1 $p_T > 20$ GeV)" @@ -137,4 +140,4 @@ MuonsTrigger_Endcap: binning: min: 0 max: 50 - step: 1.5 + step: 1.5 \ No newline at end of file From 0d93fb6814ec9e793f15b8b358d259d3cfbc7fdb Mon Sep 17 00:00:00 2001 From: EmyrClement Date: Mon, 17 Apr 2023 11:34:06 +0100 Subject: [PATCH 2/9] Add configs for caching and plot b tag NN info. Add script for overlaying b/mis tag efficiencies. (#24) --- objectPerformance/cfg_caching/V27_bTagNN.yaml | 10 + .../cfg_plots/V27_bTagNN/bJetEff.yaml | 30 +++ .../cfg_plots/V27_bTagNN/jets_matching.yaml | 179 ++++++++++++++++++ objectPerformance/src/plotBTagEfficiency.py | 98 ++++++++++ 4 files changed, 317 insertions(+) create mode 100644 objectPerformance/cfg_caching/V27_bTagNN.yaml create mode 100644 objectPerformance/cfg_plots/V27_bTagNN/bJetEff.yaml create mode 100644 objectPerformance/cfg_plots/V27_bTagNN/jets_matching.yaml create mode 100755 objectPerformance/src/plotBTagEfficiency.py diff --git a/objectPerformance/cfg_caching/V27_bTagNN.yaml b/objectPerformance/cfg_caching/V27_bTagNN.yaml new file mode 100644 index 00000000..7e6aea5a --- /dev/null +++ b/objectPerformance/cfg_caching/V27_bTagNN.yaml @@ -0,0 +1,10 @@ +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/objectPerformance/cfg_plots/V27_bTagNN/bJetEff.yaml b/objectPerformance/cfg_plots/V27_bTagNN/bJetEff.yaml new file mode 100644 index 00000000..57a429bc --- /dev/null +++ b/objectPerformance/cfg_plots/V27_bTagNN/bJetEff.yaml @@ -0,0 +1,30 @@ +BJetEff_Pt: + files: + JetMatching_Pt_Pt30ToInf_genBJets_-999_V27: + object: seededConeExtendedPuppiJet + dir: outputs/V27/turnons/ + label: "Signal: Matched b-jets" + JetMatching_Pt_Pt30ToInf_genNotBJets_-999_V27: + object: seededConeExtendedPuppiJet + dir: outputs/V27/turnons/ + label: "Background: Unmatched b-jets" + xlabel: "Gen. $p_T$ (GeV)" + ylabel: "Matching Efficiency" + watermark: "BJet_Pt" + save_dir: "outputs/BJet/turnons" + + +BJetEff_Eta: + files: + JetMatching_Eta_Pt30ToInf_genBJets_-999_V27: + object: seededConeExtendedPuppiJet + dir: outputs/V27/turnons/ + label: "Signal: Matched b-jets" + JetMatching_Eta_Pt30ToInf_genNotBJets_-999_V27: + object: seededConeExtendedPuppiJet + dir: outputs/V27/turnons/ + label: "Background: Unmatched b-jets" + xlabel: "Gen. $\\eta$" + ylabel: "Matching Efficiency" + watermark: "BJet_Eta" + save_dir: "outputs/BJet/turnons" diff --git a/objectPerformance/cfg_plots/V27_bTagNN/jets_matching.yaml b/objectPerformance/cfg_plots/V27_bTagNN/jets_matching.yaml new file mode 100644 index 00000000..795faadf --- /dev/null +++ b/objectPerformance/cfg_plots/V27_bTagNN/jets_matching.yaml @@ -0,0 +1,179 @@ +JetMatching_Eta_Pt40To100_ExtendedVsRegular: + 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: + 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" + xlabel: "Gen. $\\eta$" + ylabel: "Matching Efficiency (40-100 GeV)" + binning: + min: -5 + max: 5 + step: 0.25 + +JetMatching_Eta_Pt100ToInf_ExtendedVsRegular: + sample: TT + default_version: V27 + reference_object: + object: "jet" + suffix: "Eta" + label: "Gen Jets" + cuts: + event: + - "{pt} > 100" + 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" + xlabel: "Gen. $\\eta$" + ylabel: "Matching Efficiency (>100 GeV)" + binning: + min: -5 + max: 5 + step: 0.25 + +JetMatching_Eta_Pt30ToInf_genBJets: + sample: TT + default_version: V27 + reference_object: + object: "jet" + suffix: "Eta" + label: "Gen Jets" + cuts: + event: + - "{pt} > 30" + - "abs({partonflavour}) == 5" + 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" + 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 + step: 0.25 + +JetMatching_Eta_Pt30ToInf_genNotBJets: + sample: TT + default_version: V27 + reference_object: + object: "jet" + suffix: "Eta" + label: "Gen Jets" + cuts: + event: + - "{pt} > 30" + - "abs({partonflavour}) != 5" + 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" + 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 + step: 0.25 + +JetMatching_Pt_Pt30ToInf_genBJets: + sample: TT + default_version: V27 + reference_object: + object: "jet" + suffix: "Pt" + label: "Gen Jets" + cuts: + event: + - "abs({partonflavour}) == 5" + 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" + 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 + step: 10 + +JetMatching_Pt_Pt30ToInf_genNotBJets: + sample: TT + default_version: V27 + reference_object: + object: "jet" + suffix: "Pt" + label: "Gen Jets" + cuts: + event: + - "abs({partonflavour}) != 5" + 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" + xlabel: "Gen. $p_T$ (GeV)" + ylabel: "Matching Efficiency" + # thresholds: [0.0,0.5,0.7,0.71,0.72] + binning: + min: 30 + max: 200 + step: 10 diff --git a/objectPerformance/src/plotBTagEfficiency.py b/objectPerformance/src/plotBTagEfficiency.py new file mode 100755 index 00000000..1871c81c --- /dev/null +++ b/objectPerformance/src/plotBTagEfficiency.py @@ -0,0 +1,98 @@ +#!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python +import argparse +import os + +import matplotlib.pyplot as plt +import mplhep as hep +import numpy as np +import yaml +import json + +from plotter import Plotter + +plt.style.use(hep.style.CMS) + + +class ComparisonCentral(Plotter): + + def __init__(self, cfg_plots_path): + 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) + self.cfgs[plot_name] = cfg_plot + if not os.path.exists(cfg_plot['save_dir']): os.makedirs(cfg_plot['save_dir']) + # 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) + + def _get_watermark(self,cfg): + try: + return cfg["watermark"] + except KeyError: + return " " + + def _get_files(self,cfg): + try: + return cfg["files"] + except KeyError: + print("You must specify the input files under the key 'files'!") + + def _get_plot(self, name): + fname = open(name + ".json") + dict_to_plot = json.load(fname) + return dict_to_plot + + def _style_plot(self, cfg, fig, ax, legend_loc="upper right"): + ax.axhline(1, ls=":", c="k") + ax.legend(loc=legend_loc, frameon=False) + ax.set_xlabel(rf"{cfg['xlabel']}") + ylabel = cfg["ylabel"] + 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) + 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() + for file in files: + fname = os.path.join(files[file]["dir"], file) + test_object = files[file]["object"] + dict_to_plot = self._get_plot(fname) + + label = dict_to_plot[test_object]["label"] + if "label" in files[file]: + label = files[file]["label"] + + 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) + + self._style_plot(cfg, fig, ax) + 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." + ) + args = parser.parse_args() + + plotter = ComparisonCentral(args.cfg_plots) + plotter.run() + From 2d1161130527c426055fe9c37b58d7f8772b4aa6 Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Mon, 17 Apr 2023 12:40:47 +0200 Subject: [PATCH 3/9] [BTag] restyle btag efficiency organization (#29) --- .../cfg_plots/{V27_bTagNN => V29}/bJetEff.yaml | 16 ++++++++-------- .../jets_matching_wBTag.yaml} | 12 ++++++------ objectPerformance/src/plotBTagEfficiency.py | 4 ---- 3 files changed, 14 insertions(+), 18 deletions(-) rename objectPerformance/cfg_plots/{V27_bTagNN => V29}/bJetEff.yaml (64%) rename objectPerformance/cfg_plots/{V27_bTagNN/jets_matching.yaml => V29/jets_matching_wBTag.yaml} (96%) diff --git a/objectPerformance/cfg_plots/V27_bTagNN/bJetEff.yaml b/objectPerformance/cfg_plots/V29/bJetEff.yaml similarity index 64% rename from objectPerformance/cfg_plots/V27_bTagNN/bJetEff.yaml rename to objectPerformance/cfg_plots/V29/bJetEff.yaml index 57a429bc..4ee50ed7 100644 --- a/objectPerformance/cfg_plots/V27_bTagNN/bJetEff.yaml +++ b/objectPerformance/cfg_plots/V29/bJetEff.yaml @@ -1,12 +1,12 @@ BJetEff_Pt: files: - JetMatching_Pt_Pt30ToInf_genBJets_-999_V27: + JetMatching_Pt_Pt30ToInf_genBJets_-999_V29: object: seededConeExtendedPuppiJet - dir: outputs/V27/turnons/ + dir: outputs/V29/turnons/ label: "Signal: Matched b-jets" - JetMatching_Pt_Pt30ToInf_genNotBJets_-999_V27: + JetMatching_Pt_Pt30ToInf_genNotBJets_-999_V29: object: seededConeExtendedPuppiJet - dir: outputs/V27/turnons/ + dir: outputs/V29/turnons/ label: "Background: Unmatched b-jets" xlabel: "Gen. $p_T$ (GeV)" ylabel: "Matching Efficiency" @@ -16,13 +16,13 @@ BJetEff_Pt: BJetEff_Eta: files: - JetMatching_Eta_Pt30ToInf_genBJets_-999_V27: + JetMatching_Eta_Pt30ToInf_genBJets_-999_V29: object: seededConeExtendedPuppiJet - dir: outputs/V27/turnons/ + dir: outputs/V29/turnons/ label: "Signal: Matched b-jets" - JetMatching_Eta_Pt30ToInf_genNotBJets_-999_V27: + JetMatching_Eta_Pt30ToInf_genNotBJets_-999_V29: object: seededConeExtendedPuppiJet - dir: outputs/V27/turnons/ + dir: outputs/V29/turnons/ label: "Background: Unmatched b-jets" xlabel: "Gen. $\\eta$" ylabel: "Matching Efficiency" diff --git a/objectPerformance/cfg_plots/V27_bTagNN/jets_matching.yaml b/objectPerformance/cfg_plots/V29/jets_matching_wBTag.yaml similarity index 96% rename from objectPerformance/cfg_plots/V27_bTagNN/jets_matching.yaml rename to objectPerformance/cfg_plots/V29/jets_matching_wBTag.yaml index 795faadf..34a1d08f 100644 --- a/objectPerformance/cfg_plots/V27_bTagNN/jets_matching.yaml +++ b/objectPerformance/cfg_plots/V29/jets_matching_wBTag.yaml @@ -1,6 +1,6 @@ JetMatching_Eta_Pt40To100_ExtendedVsRegular: sample: TT - default_version: V27 + default_version: V29 reference_object: object: "jet" suffix: "Eta" @@ -33,7 +33,7 @@ JetMatching_Eta_Pt40To100_ExtendedVsRegular: JetMatching_Eta_Pt100ToInf_ExtendedVsRegular: sample: TT - default_version: V27 + default_version: V29 reference_object: object: "jet" suffix: "Eta" @@ -65,7 +65,7 @@ JetMatching_Eta_Pt100ToInf_ExtendedVsRegular: JetMatching_Eta_Pt30ToInf_genBJets: sample: TT - default_version: V27 + default_version: V29 reference_object: object: "jet" suffix: "Eta" @@ -94,7 +94,7 @@ JetMatching_Eta_Pt30ToInf_genBJets: JetMatching_Eta_Pt30ToInf_genNotBJets: sample: TT - default_version: V27 + default_version: V29 reference_object: object: "jet" suffix: "Eta" @@ -123,7 +123,7 @@ JetMatching_Eta_Pt30ToInf_genNotBJets: JetMatching_Pt_Pt30ToInf_genBJets: sample: TT - default_version: V27 + default_version: V29 reference_object: object: "jet" suffix: "Pt" @@ -152,7 +152,7 @@ JetMatching_Pt_Pt30ToInf_genBJets: JetMatching_Pt_Pt30ToInf_genNotBJets: sample: TT - default_version: V27 + default_version: V29 reference_object: object: "jet" suffix: "Pt" diff --git a/objectPerformance/src/plotBTagEfficiency.py b/objectPerformance/src/plotBTagEfficiency.py index 1871c81c..37003b8f 100755 --- a/objectPerformance/src/plotBTagEfficiency.py +++ b/objectPerformance/src/plotBTagEfficiency.py @@ -23,10 +23,6 @@ def __init__(self, cfg_plots_path): print (plot_name) self.cfgs[plot_name] = cfg_plot if not os.path.exists(cfg_plot['save_dir']): os.makedirs(cfg_plot['save_dir']) - # 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) def _get_watermark(self,cfg): try: From bffb2bbe1b3225316360172966846d07dd288c34 Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Mon, 17 Apr 2023 16:49:40 +0200 Subject: [PATCH 4/9] [V29] Update scaling functions for rates computation (#30) * [BTag] restyle btag efficiency organization * [V29] Update scalings for rates * [V29 Rates] change misleading comment --- rates/plots/rates_emulator_125x_v29.py | 67 ++++++++++++-------------- 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/rates/plots/rates_emulator_125x_v29.py b/rates/plots/rates_emulator_125x_v29.py index ba877f55..a5f2b737 100644 --- a/rates/plots/rates_emulator_125x_v29.py +++ b/rates/plots/rates_emulator_125x_v29.py @@ -56,41 +56,38 @@ tkEG_hwQual = 3 #scalings - +## Updated on 17/04 using V29 scalings obtained with new menu tools ### Muons EMU #function :: GMTTkMuonOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-0.903751)/1.039495 if abs(Eta)<0.83 else (Et>(offline-0.894300)/1.044889 if abs(Eta)<1.24 else (Et>(offline-0.796396)/1.040808)) #function :: GMTMuonQualOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-2.827822)/0.994950 if abs(Eta)<0.83 else (Et>(offline-0.228463)/1.280758 if abs(Eta)<1.24 else (Et>(offline-7.261232)/0.895232)) -def gmtMuonOfflineEtCutBarrel(offline) : return (offline-2.827822)/0.994950 -def gmtMuonOfflineEtCutOverlap(offline) : return (offline-0.228463)/1.280758 -def gmtMuonOfflineEtCutEndcap(offline) : return (offline-7.261232)/0.895232 - -def gmtTkMuonOfflineEtCutBarrel(offline) : return (offline-0.903751)/1.039495 -def gmtTkMuonOfflineEtCutOverlap(offline) : return (offline-0.894300)/1.044889 -def gmtTkMuonOfflineEtCutEndcap(offline) : return (offline-0.796396)/1.040808 - +def gmtMuonOfflineEtCutBarrel(offline) : return (offline+0.238)/1.137 +def gmtMuonOfflineEtCutOverlap(offline) : return (offline+2.569)/1.346 +def gmtMuonOfflineEtCutEndcap(offline) : return (offline-11.219)/1.503 -##New scalings by Yi in December 2021 +def gmtTkMuonOfflineEtCutBarrel(offline) : return (offline-0.988)/1.049 +def gmtTkMuonOfflineEtCutOverlap(offline) : return (offline-1.075)/1.052 +def gmtTkMuonOfflineEtCutEndcap(offline) : return (offline-1.333)/1.07 #function :: Phase1PuppiJetOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-12.381481)/1.331251 if abs(Eta)<1.5 else (Et>(offline-21.649515)/1.372602 if abs(Eta)<2.4 else (Et>(offline-35.609357)/1.493540)) -def Phase1PuppiJetOfflineEtCutBarrel(offline) : return (offline-12.381481)/1.331251 -def Phase1PuppiJetOfflineEtCutEndcap(offline) : return (offline-21.649515)/1.372602 -def Phase1PuppiJetOfflineEtCutForward(offline) : return (offline-35.609357)/1.493540 +def Phase1PuppiJetOfflineEtCutBarrel(offline) : return (offline-15.497)/1.383 +def Phase1PuppiJetOfflineEtCutEndcap(offline) : return (offline-9.362)/1.959 +def Phase1PuppiJetOfflineEtCutForward(offline) : return (offline-75.542)/1.41 #function :: Phase1PuppiMHTOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+9.724987)/1.037459 #function :: Phase1PuppiHT090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-46.674588)/1.113875 -def Phase1PuppiHTOfflineEtCut(offline) : return (offline-46.674588)/1.113875 -def Phase1PuppiMHTOfflineEtCut(offline) : return (offline+9.724987)/1.037459 +def Phase1PuppiHTOfflineEtCut(offline) : return (offline-51.672)/1.099 +def Phase1PuppiMHTOfflineEtCut(offline) : return (offline-48.725)/1.324 #function :: PuppiMET090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-62.120627)/1.382451 -def PuppiMETOfflineEtCut(offline) : return (offline-62.120627)/1.382451 +def PuppiMETOfflineEtCut(offline) : return (offline-64.337)/1.461 #function :: CaloJetOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+15.342718)/1.568946 if abs(Eta)<1.5 else (Et>(offline+2.230990)/1.561868 if abs(Eta)<2.4 else (Et>(offline-107.928530)/1.181014)) -def CaloJetOfflineEtCutBarrel(offline) : return (offline+15.342718)/1.568946 -def CaloJetOfflineEtCutEndcap(offline) : return (offline+2.230990)/1.561868 -def CaloJetOfflineEtCutForward(offline) : return (offline-107.928530)/1.181014 +def CaloJetOfflineEtCutBarrel(offline) : return (offline+0.141)/1.511 +def CaloJetOfflineEtCutEndcap(offline) : return (offline+12.63)/2.291 +def CaloJetOfflineEtCutForward(offline) : return (offline-81.505)/1.587 #THESE ARE WRONG!!! #function :: CaloHT090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+51.666047)/1.027086 @@ -98,9 +95,9 @@ def CaloJetOfflineEtCutForward(offline) : return (offline-107.928530)/1.181014 def CaloHTOfflineEtCut(offline) : return (offline+51.666047)/1.027086 #function :: SeededConePuppiJetOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-14.869526)/1.291966 if abs(Eta)<1.5 else (Et>(offline-24.500087)/1.449829 if abs(Eta)<2.4 else (Et>(offline-53.029951)/1.140808)) -def SeededConePuppiJetOfflineEtCutBarrel(offline) : return (offline-14.869526)/1.291966 -def SeededConePuppiJetOfflineEtCutEndcap(offline) : return (offline-24.500087)/1.449829 -def SeededConePuppiJetOfflineEtCutForward(offline) : return (offline-53.029951)/1.140808 +def SeededConePuppiJetOfflineEtCutBarrel(offline) : return (offline-20.108)/1.308 +def SeededConePuppiJetOfflineEtCutEndcap(offline) : return (offline-7.971)/2.05 +def SeededConePuppiJetOfflineEtCutForward(offline) : return (offline-72.567)/1.418 #function :: TrackerJetOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+52.278067)/10.213742 if abs(Eta)<1.5 else (Et>(offline+93.926334)/14.412352) def TrackerJetOfflineEtCutBarrel(offline) : return (offline+52.278067)/10.213742 @@ -109,7 +106,7 @@ def TrackerJetOfflineEtCutEndcap(offline) : return (offline+93.926334)/14.412352 #function :: TrackerMHTOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+72.185871)/3.431230 #function :: TrackerHT090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+3.448948)/3.780727 #function :: TrackerMET090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+4.460475)/7.139687 -def TrackerHTOfflineEtCut(offline) : return (offline+3.448948)/3.780727 +def TrackerHTOfflineEtCut(offline) : return (offline+25.357)/3.623 def TrackerMHTOfflineEtCut(offline) : return (offline+72.185871)/3.431230 def TrackerMETOfflineEtCut(offline) : return (offline+4.460475)/7.139687 @@ -118,17 +115,17 @@ def TrackerMETOfflineEtCut(offline) : return (offline+4.460475)/7.139687 #function :: TkElectronOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-0.617835)/1.182946 if abs(Eta)<1.5 else (Et>(offline-0.336402)/1.275834) #function :: TkIsoElectronOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-0.189054)/1.211045 if abs(Eta)<1.5 else (Et>(offline-0.822056)/1.239274) #function :: TkIsoPhotonOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-2.330926)/1.093568 if abs(Eta)<1.5 else (Et>(offline-4.565565)/1.077261) -def EGElectronOfflineEtCutBarrel(offline) : return (offline-2.870789)/1.165597 -def EGElectronOfflineEtCutEndcap(offline) : return (offline-2.720773)/1.228424 +def EGElectronOfflineEtCutBarrel(offline) : return (offline-2.707)/1.188 +def EGElectronOfflineEtCutEndcap(offline) : return (offline-1.572)/1.249 -def TkElectronOfflineEtCutBarrel(offline) : return (offline-0.617835)/1.182946 -def TkElectronOfflineEtCutEndcap(offline) : return (offline-0.336402)/1.275834 +def TkElectronOfflineEtCutBarrel(offline) : return (offline-1.441)/1.159 +def TkElectronOfflineEtCutEndcap(offline) : return (offline-1.256)/1.217 -def TkIsoElectronOfflineEtCutBarrel(offline) : return (offline-0.189054)/1.211045 -def TkIsoElectronOfflineEtCutEndcap(offline) : return (offline-0.822056)/1.239274 +def TkIsoElectronOfflineEtCutBarrel(offline) : return (offline-1.638)/1.144 +def TkIsoElectronOfflineEtCutEndcap(offline) : return (offline-1.219)/1.214 -def TkIsoPhotonOfflineEtCutBarrel(offline) : return (offline-2.330926)/1.093568 -def TkIsoPhotonOfflineEtCutEndcap(offline) : return (offline-4.565565)/1.077261 +def TkIsoPhotonOfflineEtCutBarrel(offline) : return (offline-2.697)/1.096 +def TkIsoPhotonOfflineEtCutEndcap(offline) : return (offline-5.038)/1.067 #TAUS @@ -137,11 +134,11 @@ def TkIsoPhotonOfflineEtCutEndcap(offline) : return (offline-4.565565)/1.077261 #function :: CaloTau090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+6.720396)/1.510317 if abs(Eta)<1.5 else (Et>(offline+5.499322)/1.898208) #function :: NNPuppiTau090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-3.778738)/1.642246 if abs(Eta)<1.5 else (Et>(offline-14.808886)/1.716542) -def CaloTauOfflineEtCutBarrel(offline) : return (offline+6.720396)/1.510317 -def CaloTauOfflineEtCutEndcap(offline) : return (offline+5.499322)/1.898208 +def CaloTauOfflineEtCutBarrel(offline) : return (offline+2.381)/1.521 +def CaloTauOfflineEtCutEndcap(offline) : return (offline-0.045)/1.937 -def NNTauLooseOfflineEtCutBarrel(offline) : return (offline-3.778738)/1.642246 -def NNTauLooseOfflineEtCutEndcap(offline) : return (offline-14.808886)/1.716542 +def NNTauLooseOfflineEtCutBarrel(offline) : return (offline+2.871)/1.92 +def NNTauLooseOfflineEtCutEndcap(offline) : return (offline-21.639)/1.551 #def NNTau2vtxLooseOfflineEtCutBarrel(offline) : return (offline-3.430488)/1.644274 #def NNTau2vtxLooseOfflineEtCutEndcap(offline) : return (offline-14.530580)/1.728148 From bd7795fee871635dde018b6d8665bdd4a1f80d36 Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Mon, 17 Apr 2023 18:01:33 +0200 Subject: [PATCH 5/9] [V29] New configs for rate table (#31) * [BTag] restyle btag efficiency organization * [V29] Update scalings for rates * [V29 Rates] change misleading comment * [V29] new config files for rates table --- rates/table/cfg/v29_16Seeds_Final | 209 ++++++++++++++++++ rates/table/cfg/v29_NOMUONS_Final | 327 ++++++++++++++++++++++++++++ rates/table/cfg/v29_WITHMUONS_Final | 327 ++++++++++++++++++++++++++++ 3 files changed, 863 insertions(+) create mode 100644 rates/table/cfg/v29_16Seeds_Final create mode 100644 rates/table/cfg/v29_NOMUONS_Final create mode 100644 rates/table/cfg/v29_WITHMUONS_Final diff --git a/rates/table/cfg/v29_16Seeds_Final b/rates/table/cfg/v29_16Seeds_Final new file mode 100644 index 00000000..f66ee586 --- /dev/null +++ b/rates/table/cfg/v29_16Seeds_Final @@ -0,0 +1,209 @@ +#format is like this: +#typeOfParameter :: parameterOrObjectName :: option1=value2; option2=(this,is,a,list) + + +## general options +## ----------------------------------------------------------- +variable :: bundledate :: v29 +variable :: nBunches :: 2760 +variable :: revFreq :: 11246 + +#variable :: tiers :: (variations) +variable :: tiers :: (thresholds) + +variable :: varBins :: (30,50) +#variable :: varBins :: (10,20,30,40,50,60,70,80,90,100) +##variable :: varBins :: (100,140,275,425,575,700,850,1000) +variable :: varError :: 0.2 +variable :: varInterpol :: linear +variable :: varLeg :: 1 +variable :: varCut :: 1 +variable :: varPrecision :: 2 +variable :: varIterations :: 5 +variable :: useNominalBwF :: False + + + +## samples (always all samples are used!) +## ----------------------------------------------------------- + +sample :: neutrinos :: path:=/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/v29/MinBias_9x.root; tree:=l1PhaseIITree/L1PhaseIITree + + +## physics objects at trigger level +## ----------------------------------------------------------- + +## Electrons and Photons +object :: EG :: basebranch:=EG ; variables:=(Et,Eta,Phi,Iso,zVtx,PassesEleID,PassesSaID,HwQual); \ + leading:=Et; lengthbranch:=nEG; onToOff:=0 + +object :: tkElectron :: basebranch:=tkElectron ; variables:=(Et,Eta,Phi,TrkIso,zVtx,PassesEleID,HwQual); \ + leading:=Et; lengthbranch:=nTkElectrons; onToOff:=0 + +object :: tkPhoton :: basebranch:=tkPhoton ; variables:=(Et,Eta,Phi,TrkIso,TrkIsoPV,zVtx,PassesEleID,PassesPhoID,HwQual); \ + leading:=Et; lengthbranch:=nTkPhotons; onToOff:=0 + +## Muons +#object :: tkMu :: basebranch:=tkMuon ; variables:=(Pt,Eta,Phi,Chg,Iso,TrkIso,Qual,zVtx,MuRefPt,MuRefEta,MuRefPhi,Region,Qual); \ +# leading:=Pt; lengthbranch:=nTkMuons; onToOff:=0 + +object :: tkGmtMu :: basebranch:=gmtTkMuon ; variables:=(Pt,Eta,Phi,Chg,Iso,Qual,Z0); \ + leading:=Pt; lengthbranch:=nGmtTkMuons; onToOff:=0 + +## Taus +object :: puppiTau :: basebranch:=nnTau ; variables:=(Et,Eta,Phi,PassLooseNN,PassTightNN); \ + leading:=Et; lengthbranch:=nNNTaus; onToOff:=0 + +object :: caloTau :: basebranch:=caloTau ; variables:=(Et,Eta,Phi); \ + leading:=Et; lengthbranch:=nCaloTaus; onToOff:=0 + +## Jets +object :: puppiJet :: basebranch:=seededConePuppiJet ; variables:=(Et,Eta,Phi); \ + leading:=Et; lengthbranch:=nSeededConePuppiJets; onToOff:=0 + +object :: puppiHt :: basebranch:=seededConePuppiHT ; variables:=(Et=); \ + leading:=Et; isFlat:=True; fixedIndex:=0; onToOff:=0 + +object :: puppiMHt :: basebranch:=seededConePuppiMHT ; variables:=(Et,Phi); \ + leading:=Et; isFlat:=True; onToOff:=0 + +## MET +object :: puppiMet :: basebranch:=puppiMET ; variables:=(Et,Phi); \ + leading:=Et; isFlat:=True; onToOff:=0 + +## zVtx +object :: puppiVtx :: basebranch:=z0L1TkPV ; variables:=(Et=); \ + leading:=Et; isFlat:=True; onToOff:=0 + + + + +## function aliases +## ----------------------------------------------------------- +function :: notMatched :: args:=(eta1,eta2,phi1,phi2); lambda:= math.sqrt(math.pow(abs(abs(eta1)-abs(eta2)),2) + math.pow(abs(phi1-phi2) if abs(phi1-phi2)<=math.pi else 2*math.pi-abs(phi1-phi2),2))>0.1 +function :: deltaR :: args:=(eta1,eta2,phi1,phi2); lambda:= math.sqrt(math.pow(abs(eta1-eta2),2) + math.pow(abs(phi1-phi2) if abs(phi1-phi2)<=math.pi else 2*math.pi-abs(phi1-phi2),2)) +function :: deltaEta :: args:=(eta1,eta2); lambda:= abs(eta1-eta2) +function :: etaRangeCutLess :: args:=(x,eta,etaRange,cutInRange,cutOutRange); lambda:= xcutInRange if abs(eta)cutOutRange +function :: pairInvMass :: args:=(pt1,pt2,eta1,eta2,phi1,phi2); lambda:= math.sqrt(2.0*pt1*pt2*(math.cosh(eta1-eta2)-math.cos(phi1-phi2))) +function :: pfJetEtaVeto :: args:=(Eta); lambda:= abs(Eta)<2.5 or abs(Eta)>3.0 + +function :: muonQual :: args:=(Region,Qual); lambda:= 1 if (Region==3 and (Qual == 11 or Qual == 13 or Qual == 14 or Qual == 15)) else (1 if Region<3 else 0) + +function :: cleanMuons :: args:=(Region,Eta); lambda:= Region==1 if abs(Eta)<0.9 else (Region==2 if abs(Eta)<1.2 else Region==3) + + +# Quality requirements for muons and tkelectrons +function :: MuonStaQualCut :: args:=(Qual,Eta); lambda:=Qual>=0 if abs(Eta)<0.9 else (Qual>=12 if abs(Eta)<1.2 else Qual>=0) + +#Scalings + + + +#HT +function :: Phase1PuppiHT090OfflineEtCut :: args:=(offline); lambda:=(offline-51.6)/1.099 +function :: SeededConePuppiHT090OfflineEtCut :: args:=(offline); lambda:=(offline-45)/1.086 + +#MHT +#function :: Phase1PuppiMHTOfflineEtCut :: args:=(offline); lambda:=(offline+9.724987)/1.037459 +function :: Phase1PuppiMHTOfflineEtCut :: args:=(offline); lambda:=(offline-38.9)/1.44 +function :: SeededConePuppiMHTOfflineEtCut :: args:=(offline); lambda:=(offline-49.684)/1.244 + + +# +#puppimet +function :: PuppiMET090OfflineEtCut :: args:=(offline); lambda:=(offline-64)/1.461 + +#EG +function :: EGElectronOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-2.707)/1.188 if abs(Eta)<1.5 else (Et>(offline-1.572)/1.249) +function :: TkElectronOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-1.441)/1.159 if abs(Eta)<1.5 else (Et>(offline-1.256)/1.217) +function :: TkIsoElectronOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-1.638)/1.144 if abs(Eta)<1.5 else (Et>(offline-1.219)/1.214) +function :: TkIsoPhotonOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-2.697)/1.096 if abs(Eta)<1.5 else (Et>(offline-5.038)/1.067) + +#function :: EleIDV2 :: args:=(Et,Eta,PassesEleID) ; lambda:=PassesEleID if ( Et>25 or abs(Eta)<1.5) else 1 +#function :: TkElectronIsoQualCut :: args:=(HwQual,Eta, Et); lambda:=HwQual==3 if (Et>25 and abs(Eta)>1.479) else 1 if (Et<25 and abs(Eta)>1.479) else HwQual>=0 + +function :: TkEleQualHIGH :: args:=(Et,Eta,PassesEleID) ; lambda:=PassesEleID +function :: TkEleQualLOW :: args:=(Et,Eta,PassesEleID) ; lambda:=PassesEleID if (abs(Eta)<1.479) else 1 +function :: TkEleIsoQualHIGH :: args:=(Et,Eta,PassesEleID); lambda:= PassesEleID if (abs(Eta)>1.479) else 1 +function :: TkEleIsoQualLOW :: args:=(Et,Eta,PassesEleID); lambda:= (PassesEleID>=0) # this should be always true: we can remove this condition from the menu + + +#function :: TkElectronIsoQualCut :: args:=(HwQual,Eta); lambda:=HwQual==3 if abs(Eta)>1.479 else HwQual>=0 + + +## IDs +function :: EGID :: args:=(EleID, SaID, Eta); lambda:=EleID if abs(Eta)<1.5 else SaID +function :: PhoID :: args:=(EleID, PhoID, Eta); lambda:=EleID if abs(Eta)<1.5 else PhoID + +#taus +function :: CaloTau090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+2.381)/1.521 if abs(Eta)<1.5 else (Et>(offline-0.045)/1.937) +function :: NNTauLoose090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+2.871)/1.92 if abs(Eta)<1.5 else (Et>(offline-21.639)/1.551) + +#puppijet +function :: Phase1PuppiJetOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-15.497)/1.383 if abs(Eta)<1.5 else (Et>(offline-9.362)/1.959 if abs(Eta)<2.4 else (Et>(offline-75.5)/1.41)) +function :: SeededConePuppiJetOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-20.108)/1.308 if abs(Eta)<1.5 else (Et>(offline-7.971)/2.05 if abs(Eta)<2.4 else (Et>(offline-72.567)/1.418)) + +#tkmuons +function :: GMTTkMuonOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>offline if (offline<8) else Et>(offline-0.986)/1.049 if abs(Eta)<0.83 else (Et>(offline-1.075)/1.052 if abs(Eta)<1.24 else (Et>(offline-0.792)/1.054)) + + +## trigger paths +## ----------------------------------------------------------- + +## muon + +trigger :: L1_SingleTkMu :: leg1:=(tkGmtMu , GMTTkMuonOfflineEtCut(22.0,Pt,Eta), abs(Eta)<2.4 ); \ + +trigger :: L1_DoubleTkMu :: leg1:=(tkGmtMu , GMTTkMuonOfflineEtCut(15.0,Pt,Eta), abs(Eta)<2.4); \ + leg2:=(tkGmtMu , GMTTkMuonOfflineEtCut(7.0,Pt,Eta), abs(Eta)<2.4, abs(leg1.Z0-Z0)<1); \ + +trigger :: L1_TripleTkMu :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(5.0,Pt,Eta), abs(Eta)<2.4, Qual>0 ); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Z0)<1, Qual>0 ); \ + leg3:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Z0)<1, Qual>0 ); \ + +# e/gamma + +trigger :: L1_SingleTkEle :: leg1:=(tkElectron , TkElectronOfflineEtCut(36.0,Et,Eta), abs(Eta)<2.4, TkEleQualHIGH(Et,Eta,PassesEleID)); \ + +trigger :: L1_SingleTkEleIso :: leg1:=(tkElectron , TkIsoElectronOfflineEtCut(28.0,Et,Eta), TkEleIsoQualLOW(Et,Eta,PassesEleID), etaRangeCutLess(TrkIso,Eta,1.479,0.13,0.28)); \ + +trigger :: L1_DoubleTkEle :: leg1:=(tkElectron , TkElectronOfflineEtCut(25.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID) ); \ + leg2:=(tkElectron , TkElectronOfflineEtCut(12.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID) , abs(zVtx-leg1.zVtx)<1); \ + +trigger :: L1_SingleTkPhoIso :: leg1:=(tkPhoton , TkIsoPhotonOfflineEtCut(36.0,Et,Eta), abs(Eta)<2.4, PhoID(PassesEleID, PassesPhoID, Eta), etaRangeCutLess(TrkIso,Eta,1.479,0.25,0.205)); \ + +trigger :: L1_TkEleIso_EG :: leg1:=(tkElectron , TkIsoElectronOfflineEtCut(22.0,Et,Eta), abs(Eta)<2.4, TkEleIsoQualLOW(Et,Eta,PassesEleID) , etaRangeCutLess(TrkIso,Eta,1.479,0.13,0.28)); \ + leg2:=(EG , EGElectronOfflineEtCut(12.0,Et,Eta), abs(Eta)<2.4, EGID(PassesEleID, PassesSaID, Eta), notMatched(Eta, leg1.Eta, Phi, leg1.Phi)); \ + +trigger :: L1_DoubleTkPhoIso :: leg1:=(tkPhoton , TkIsoPhotonOfflineEtCut(22.0,Et,Eta), abs(Eta)<2.4, PhoID(PassesEleID, PassesPhoID, Eta), etaRangeCutLess(TrkIso,Eta,1.479,0.25,0.205)); \ + leg2:=(tkPhoton , TkIsoPhotonOfflineEtCut(12.0,Et,Eta), abs(Eta)<2.4, PhoID(PassesEleID, PassesPhoID, Eta), etaRangeCutLess(TrkIso,Eta,1.479,0.25,0.205)); \ + + +# tau stuff + +trigger :: L1_PFIsoTau_PFIsoTau :: leg1:=(puppiTau , NNTauLoose090OfflineEtCut(52.0,Et,Eta), abs(Eta)<2.172, PassLooseNN>0); \ + leg2:=(puppiTau , NNTauLoose090OfflineEtCut(52.0,Et,Eta), abs(Eta)<2.172, PassLooseNN>0, deltaR(Eta, leg1.Eta, Phi, leg1.Phi)>0.5); \ + +# Jets +trigger :: L1_SinglePfJet :: leg1:=(puppiJet, SeededConePuppiJetOfflineEtCut(230.0,Et,Eta), Et>25, abs(Eta)<2.4); \ + +# HT, MET +trigger :: L1_PFHTT :: leg1:=(puppiHt , leading>SeededConePuppiHT090OfflineEtCut(450.0)); \ + +trigger :: L1_PFMet :: leg1:=(puppiMet, Et>PuppiMET090OfflineEtCut(200.0)); \ + +trigger :: L1_PFHTT_QuadJet :: leg1:=(puppiHt , leading>SeededConePuppiHT090OfflineEtCut(400.0)); \ + leg2:=(puppiJet, SeededConePuppiJetOfflineEtCut(70.0,Et,Eta), Et>25.0, abs(Eta)<2.4); \ + leg3:=(puppiJet, SeededConePuppiJetOfflineEtCut(55.0,Et,Eta), Et>25.0, abs(Eta)<2.4); \ + leg4:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25.0, abs(Eta)<2.4); \ + leg5:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25.0, abs(Eta)<2.4); \ + + +# Standalone path: recover efficiency and robustness + +trigger :: L1_SingleEGEle :: leg1:=(EG , EGElectronOfflineEtCut(51.0,Et,Eta), abs(Eta)<2.4, EGID(PassesEleID, PassesSaID, Eta)); \ + +trigger :: L1_DoubleEGEle :: leg1:=(EG , EGElectronOfflineEtCut(37.0,Et,Eta), abs(Eta)<2.4, EGID(PassesEleID, PassesSaID, Eta) ); \ + leg2:=(EG , EGElectronOfflineEtCut(24.0,Et,Eta), abs(Eta)<2.4, EGID(PassesEleID, PassesSaID, Eta), notMatched(Eta, leg1.Eta, Phi, leg1.Phi)); \ + diff --git a/rates/table/cfg/v29_NOMUONS_Final b/rates/table/cfg/v29_NOMUONS_Final new file mode 100644 index 00000000..d7c3f7c7 --- /dev/null +++ b/rates/table/cfg/v29_NOMUONS_Final @@ -0,0 +1,327 @@ +#format is like this: +#typeOfParameter :: parameterOrObjectName :: option1=value2; option2=(this,is,a,list) + + +## general options +## ----------------------------------------------------------- +variable :: bundledate :: v29 +variable :: nBunches :: 2760 +variable :: revFreq :: 11246 + +#variable :: tiers :: (variations) +variable :: tiers :: (thresholds) + +variable :: varBins :: (30,50) +#variable :: varBins :: (10,20,30,40,50,60,70,80,90,100) +##variable :: varBins :: (100,140,275,425,575,700,850,1000) +variable :: varError :: 0.2 +variable :: varInterpol :: linear +variable :: varLeg :: 1 +variable :: varCut :: 1 +variable :: varPrecision :: 2 +variable :: varIterations :: 5 +variable :: useNominalBwF :: False + + + +## samples (always all samples are used!) +## ----------------------------------------------------------- + +sample :: neutrinos :: path:=/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/v29/MinBias_9x.root; tree:=l1PhaseIITree/L1PhaseIITree + + +## physics objects at trigger level +## ----------------------------------------------------------- + +## Electrons and Photons +object :: EG :: basebranch:=EG ; variables:=(Et,Eta,Phi,Iso,zVtx,PassesEleID,PassesSaID,HwQual); \ + leading:=Et; lengthbranch:=nEG; onToOff:=0 + +object :: tkElectron :: basebranch:=tkElectron ; variables:=(Et,Eta,Phi,TrkIso,zVtx,PassesEleID,HwQual); \ + leading:=Et; lengthbranch:=nTkElectrons; onToOff:=0 + +object :: tkPhoton :: basebranch:=tkPhoton ; variables:=(Et,Eta,Phi,TrkIso,TrkIsoPV,zVtx,PassesEleID,PassesPhoID,HwQual); \ + leading:=Et; lengthbranch:=nTkPhotons; onToOff:=0 + +## Muons +#object :: tkMu :: basebranch:=tkMuon ; variables:=(Pt,Eta,Phi,Chg,Iso,TrkIso,Qual,zVtx,MuRefPt,MuRefEta,MuRefPhi,Region,Qual); \ +# leading:=Pt; lengthbranch:=nTkMuons; onToOff:=0 + +object :: tkGmtMu :: basebranch:=gmtTkMuon ; variables:=(Pt,Eta,Phi,Chg,Iso,Qual,Z0); \ + leading:=Pt; lengthbranch:=nGmtTkMuons; onToOff:=0 + +## Taus +object :: puppiTau :: basebranch:=nnTau ; variables:=(Et,Eta,Phi,PassLooseNN,PassTightNN); \ + leading:=Et; lengthbranch:=nNNTaus; onToOff:=0 + +object :: caloTau :: basebranch:=caloTau ; variables:=(Et,Eta,Phi); \ + leading:=Et; lengthbranch:=nCaloTaus; onToOff:=0 + +## Jets +object :: puppiJet :: basebranch:=seededConePuppiJet ; variables:=(Et,Eta,Phi); \ + leading:=Et; lengthbranch:=nSeededConePuppiJets; onToOff:=0 + +object :: puppiHt :: basebranch:=seededConePuppiHT ; variables:=(Et=); \ + leading:=Et; isFlat:=True; fixedIndex:=0; onToOff:=0 + +object :: puppiMHt :: basebranch:=seededConePuppiMHT ; variables:=(Et,Phi); \ + leading:=Et; isFlat:=True; onToOff:=0 + +## MET +object :: puppiMet :: basebranch:=puppiMET ; variables:=(Et,Phi); \ + leading:=Et; isFlat:=True; onToOff:=0 + +## zVtx +object :: puppiVtx :: basebranch:=z0L1TkPV ; variables:=(Et=); \ + leading:=Et; isFlat:=True; onToOff:=0 + + + + +## function aliases +## ----------------------------------------------------------- +function :: notMatched :: args:=(eta1,eta2,phi1,phi2); lambda:= math.sqrt(math.pow(abs(abs(eta1)-abs(eta2)),2) + math.pow(abs(phi1-phi2) if abs(phi1-phi2)<=math.pi else 2*math.pi-abs(phi1-phi2),2))>0.1 +function :: deltaR :: args:=(eta1,eta2,phi1,phi2); lambda:= math.sqrt(math.pow(abs(eta1-eta2),2) + math.pow(abs(phi1-phi2) if abs(phi1-phi2)<=math.pi else 2*math.pi-abs(phi1-phi2),2)) +function :: deltaEta :: args:=(eta1,eta2); lambda:= abs(eta1-eta2) +function :: etaRangeCutLess :: args:=(x,eta,etaRange,cutInRange,cutOutRange); lambda:= xcutInRange if abs(eta)cutOutRange +function :: pairInvMass :: args:=(pt1,pt2,eta1,eta2,phi1,phi2); lambda:= math.sqrt(2.0*pt1*pt2*(math.cosh(eta1-eta2)-math.cos(phi1-phi2))) +function :: pfJetEtaVeto :: args:=(Eta); lambda:= abs(Eta)<2.5 or abs(Eta)>3.0 + +function :: muonQual :: args:=(Region,Qual); lambda:= 1 if (Region==3 and (Qual == 11 or Qual == 13 or Qual == 14 or Qual == 15)) else (1 if Region<3 else 0) + +function :: cleanMuons :: args:=(Region,Eta); lambda:= Region==1 if abs(Eta)<0.9 else (Region==2 if abs(Eta)<1.2 else Region==3) + + +# Quality requirements for muons and tkelectrons +function :: MuonStaQualCut :: args:=(Qual,Eta); lambda:=Qual>=0 if abs(Eta)<0.9 else (Qual>=12 if abs(Eta)<1.2 else Qual>=0) + +#Scalings + + + +#HT +function :: Phase1PuppiHT090OfflineEtCut :: args:=(offline); lambda:=(offline-51.6)/1.099 +function :: SeededConePuppiHT090OfflineEtCut :: args:=(offline); lambda:=(offline-45)/1.086 + +#MHT +#function :: Phase1PuppiMHTOfflineEtCut :: args:=(offline); lambda:=(offline+9.724987)/1.037459 +function :: Phase1PuppiMHTOfflineEtCut :: args:=(offline); lambda:=(offline-38.9)/1.44 +function :: SeededConePuppiMHTOfflineEtCut :: args:=(offline); lambda:=(offline-49.684)/1.244 + + +# +#puppimet +function :: PuppiMET090OfflineEtCut :: args:=(offline); lambda:=(offline-64)/1.461 + +#EG +function :: EGElectronOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-2.707)/1.188 if abs(Eta)<1.5 else (Et>(offline-1.572)/1.249) +function :: TkElectronOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-1.441)/1.159 if abs(Eta)<1.5 else (Et>(offline-1.256)/1.217) +function :: TkIsoElectronOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-1.638)/1.144 if abs(Eta)<1.5 else (Et>(offline-1.219)/1.214) +function :: TkIsoPhotonOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-2.697)/1.096 if abs(Eta)<1.5 else (Et>(offline-5.038)/1.067) + +#function :: EleIDV2 :: args:=(Et,Eta,PassesEleID) ; lambda:=PassesEleID if ( Et>25 or abs(Eta)<1.5) else 1 +#function :: TkElectronIsoQualCut :: args:=(HwQual,Eta, Et); lambda:=HwQual==3 if (Et>25 and abs(Eta)>1.479) else 1 if (Et<25 and abs(Eta)>1.479) else HwQual>=0 + +function :: TkEleQualHIGH :: args:=(Et,Eta,PassesEleID) ; lambda:=PassesEleID +function :: TkEleQualLOW :: args:=(Et,Eta,PassesEleID) ; lambda:=PassesEleID if (abs(Eta)<1.479) else 1 +function :: TkEleIsoQualHIGH :: args:=(Et,Eta,PassesEleID); lambda:= PassesEleID if (abs(Eta)>1.479) else 1 +function :: TkEleIsoQualLOW :: args:=(Et,Eta,PassesEleID); lambda:= (PassesEleID>=0) # this should be always true: we can remove this condition from the menu + + +#function :: TkElectronIsoQualCut :: args:=(HwQual,Eta); lambda:=HwQual==3 if abs(Eta)>1.479 else HwQual>=0 + + +## IDs +function :: EGID :: args:=(EleID, SaID, Eta); lambda:=EleID if abs(Eta)<1.5 else SaID +function :: PhoID :: args:=(EleID, PhoID, Eta); lambda:=EleID if abs(Eta)<1.5 else PhoID + +#taus +function :: CaloTau090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+2.381)/1.521 if abs(Eta)<1.5 else (Et>(offline-0.045)/1.937) +function :: NNTauLoose090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+2.871)/1.92 if abs(Eta)<1.5 else (Et>(offline-21.639)/1.551) + +#puppijet +function :: Phase1PuppiJetOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-15.497)/1.383 if abs(Eta)<1.5 else (Et>(offline-9.362)/1.959 if abs(Eta)<2.4 else (Et>(offline-75.5)/1.41)) +function :: SeededConePuppiJetOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-20.108)/1.308 if abs(Eta)<1.5 else (Et>(offline-7.971)/2.05 if abs(Eta)<2.4 else (Et>(offline-72.567)/1.418)) + +#tkmuons +function :: GMTTkMuonOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>offline if (offline<8) else Et>(offline-0.986)/1.049 if abs(Eta)<0.83 else (Et>(offline-1.075)/1.052 if abs(Eta)<1.24 else (Et>(offline-0.792)/1.054)) + + +## trigger paths +## ----------------------------------------------------------- + +## muon + +trigger :: L1_SingleTkMu :: leg1:=(tkGmtMu , GMTTkMuonOfflineEtCut(22.0,Pt,Eta), abs(Eta)<2.4 ); \ + +trigger :: L1_DoubleTkMu :: leg1:=(tkGmtMu , GMTTkMuonOfflineEtCut(15.0,Pt,Eta), abs(Eta)<2.4); \ + leg2:=(tkGmtMu , GMTTkMuonOfflineEtCut(7.0,Pt,Eta), abs(Eta)<2.4, abs(leg1.Z0-Z0)<1); \ + +#trigger :: L1_TripleTkMu :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(5.0,Pt,Eta), abs(Eta)<2.4, Qual>0 ); \ +# leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Z0)<1, Qual>0 ); \ +# leg3:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Z0)<1, Qual>0 ); \ + +# e/gamma + +trigger :: L1_SingleTkEle :: leg1:=(tkElectron , TkElectronOfflineEtCut(36.0,Et,Eta), abs(Eta)<2.4, TkEleQualHIGH(Et,Eta,PassesEleID)); \ + +trigger :: L1_SingleTkEleIso :: leg1:=(tkElectron , TkIsoElectronOfflineEtCut(28.0,Et,Eta), TkEleIsoQualLOW(Et,Eta,PassesEleID), etaRangeCutLess(TrkIso,Eta,1.479,0.13,0.28)); \ + +trigger :: L1_DoubleTkEle :: leg1:=(tkElectron , TkElectronOfflineEtCut(25.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID) ); \ + leg2:=(tkElectron , TkElectronOfflineEtCut(12.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID) , abs(zVtx-leg1.zVtx)<1); \ + +trigger :: L1_SingleTkPhoIso :: leg1:=(tkPhoton , TkIsoPhotonOfflineEtCut(36.0,Et,Eta), abs(Eta)<2.4, PhoID(PassesEleID, PassesPhoID, Eta), etaRangeCutLess(TrkIso,Eta,1.479,0.25,0.205)); \ + +trigger :: L1_TkEleIso_EG :: leg1:=(tkElectron , TkIsoElectronOfflineEtCut(22.0,Et,Eta), abs(Eta)<2.4, TkEleIsoQualLOW(Et,Eta,PassesEleID) , etaRangeCutLess(TrkIso,Eta,1.479,0.13,0.28)); \ + leg2:=(EG , EGElectronOfflineEtCut(12.0,Et,Eta), abs(Eta)<2.4, EGID(PassesEleID, PassesSaID, Eta), notMatched(Eta, leg1.Eta, Phi, leg1.Phi)); \ + +trigger :: L1_DoubleTkPhoIso :: leg1:=(tkPhoton , TkIsoPhotonOfflineEtCut(22.0,Et,Eta), abs(Eta)<2.4, PhoID(PassesEleID, PassesPhoID, Eta), etaRangeCutLess(TrkIso,Eta,1.479,0.25,0.205)); \ + leg2:=(tkPhoton , TkIsoPhotonOfflineEtCut(12.0,Et,Eta), abs(Eta)<2.4, PhoID(PassesEleID, PassesPhoID, Eta), etaRangeCutLess(TrkIso,Eta,1.479,0.25,0.205)); \ + + +# tau stuff + +trigger :: L1_SinglePFTau :: leg1:=(caloTau , CaloTau090OfflineEtCut(150.0,Et,Eta), abs(Eta)<2.172); \ + +trigger :: L1_PFTau_PFTau :: leg1:=(caloTau , CaloTau090OfflineEtCut(90.0,Et,Eta), abs(Eta)<2.172); \ + leg2:=(caloTau , CaloTau090OfflineEtCut(90.0,Et,Eta), abs(Eta)<2.172, deltaR(Eta, leg1.Eta, Phi, leg1.Phi)>0.5); \ + + + +trigger :: L1_PFIsoTau_PFIsoTau :: leg1:=(puppiTau , NNTauLoose090OfflineEtCut(52.0,Et,Eta), abs(Eta)<2.172, PassLooseNN>0); \ + leg2:=(puppiTau , NNTauLoose090OfflineEtCut(52.0,Et,Eta), abs(Eta)<2.172, PassLooseNN>0, deltaR(Eta, leg1.Eta, Phi, leg1.Phi)>0.5); \ + +trigger :: L1_PFIsoTau_TkMu :: leg1:=(puppiVtx ,leading>-99999.0); \ + leg2:=(tkGmtMu , GMTTkMuonOfflineEtCut(18.0,Pt,Eta), abs(Eta)<2.1, abs(Z0-leg1.Et)<1); \ + leg3:=(puppiTau , NNTauLoose090OfflineEtCut(42.0,Et,Eta), abs(Eta)<2.172, PassLooseNN>0); \ + +trigger :: L1_TkEleIso_PFIsoTau :: leg1:=(puppiVtx ,leading>-99999.0); \ + leg2:=(tkElectron, TkIsoElectronOfflineEtCut(22.0,Et,Eta), abs(Eta)<2.1, TkEleIsoQualLOW(Et,Eta,PassesEleID), etaRangeCutLess(TrkIso,Eta,1.479,0.13,0.28), abs(zVtx-leg1.Et)<1); \ + leg3:=(puppiTau, NNTauLoose090OfflineEtCut(45.0,Et,Eta), abs(Eta)<2.172, PassLooseNN>0); \ + +trigger :: L1_PFIsoTau_PFMet :: leg1:=(puppiTau, NNTauLoose090OfflineEtCut(55.0,Et,Eta), abs(Eta)<2.172, PassLooseNN>0); \ + leg2:=(puppiMet, Et>PuppiMET090OfflineEtCut(190.0)); \ + + +# Jets +trigger :: L1_SinglePfJet :: leg1:=(puppiJet, SeededConePuppiJetOfflineEtCut(230.0,Et,Eta), Et>25, abs(Eta)<2.4); \ + +trigger :: L1_DoublePFJet_dEtaMax :: leg1:=(puppiJet, SeededConePuppiJetOfflineEtCut(112.0,Et,Eta), Et>25, abs(Eta)<2.4); \ + leg2:=(puppiJet, SeededConePuppiJetOfflineEtCut(112.0,Et,Eta), Et>25, abs(Eta)<2.4, deltaEta(Eta,leg1.Eta)<1.6); \ + +# HT, MET +trigger :: L1_PFHTT :: leg1:=(puppiHt , leading>SeededConePuppiHT090OfflineEtCut(450.0)); \ + +#trigger :: L1_PFMHTT :: leg1:=(puppiMHt , Et>SeededConePuppiMHTOfflineEtCut(135.5)); \ + +trigger :: L1_PFMet :: leg1:=(puppiMet, Et>PuppiMET090OfflineEtCut(200.0)); \ + +trigger :: L1_PFHTT_QuadJet :: leg1:=(puppiHt , leading>SeededConePuppiHT090OfflineEtCut(400.0)); \ + leg2:=(puppiJet, SeededConePuppiJetOfflineEtCut(70.0,Et,Eta), Et>25.0, abs(Eta)<2.4); \ + leg3:=(puppiJet, SeededConePuppiJetOfflineEtCut(55.0,Et,Eta), Et>25.0, abs(Eta)<2.4); \ + leg4:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25.0, abs(Eta)<2.4); \ + leg5:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25.0, abs(Eta)<2.4); \ + +# EG+Mu +trigger :: L1_TkMu_TkEleIso :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(7.0,Pt,Eta), abs(Eta)<2.4 ); \ + leg2:=(tkElectron, TkIsoElectronOfflineEtCut(20.0,Et,Eta), abs(Eta)<2.4, TkEleIsoQualLOW(Et,Eta,PassesEleID), etaRangeCutLess(TrkIso,Eta,1.479,0.13,0.28), abs(zVtx-leg1.Z0)<1); \ + +trigger :: L1_TkMu_TkEle :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(7.0,Pt,Eta), abs(Eta)<2.4 ); \ + leg2:=(tkElectron, TkElectronOfflineEtCut(23.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID), abs(zVtx-leg1.Z0)<1); \ + +trigger :: L1_TkEle_TkMu :: leg1:=(tkElectron , TkElectronOfflineEtCut(10.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID)); \ + leg2:=(tkGmtMu , GMTTkMuonOfflineEtCut(20.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.zVtx)<1 ); \ + +trigger :: L1_TkMu_DoubleTkEle :: leg1:=(tkElectron , TkElectronOfflineEtCut(17.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID)); \ + leg2:=(tkElectron , TkElectronOfflineEtCut(17.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID), abs(zVtx-leg1.zVtx)<1); \ + leg3:=(tkGmtMu , GMTTkMuonOfflineEtCut(6.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.zVtx)<1 ); \ + +#trigger :: L1_DoubleTkMu_TkEle :: leg1:=(tkElectron , TkElectronOfflineEtCut(9.0,Et,Eta), abs(Eta)<2.4, EleIDV2(Et,Eta,PassesEleID)); \ +# leg2:=(tkGmtMu , GMTTkMuonOfflineEtCut(5.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.zVtx)<1 , Qual>0); \ +# leg3:=(tkGmtMu , GMTTkMuonOfflineEtCut(5.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.zVtx)<1 , Qual>0); \ + + +# Lep+Jet/HT +trigger :: L1_TkMu_PfHTT :: leg1:=(puppiVtx,leading>-99999.0); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(6.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Et)<1 , Qual>0); \ + leg3:=(puppiHt, leading>SeededConePuppiHT090OfflineEtCut(320.0)); \ + +trigger :: L1_TkMu_PfJet_dRMax_DoubleJet_dEtaMax :: leg1:=(puppiVtx,leading>-99999.0); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(12.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Et)<1 , Qual>0); \ + leg3:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25, abs(Eta)<2.4, deltaR(Eta,leg2.Eta,Phi,leg2.Phi)<0.4); \ + leg4:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25, abs(Eta)<2.4); \ + leg5:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25, abs(Eta)<2.4, deltaEta(Eta,leg4.Eta)<1.6); \ + +#trigger :: L1_TkMu_PfJet_PfMet :: leg1:=(puppiVtx,leading>-99999.0); \ +# leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.1, abs(Z0-leg1.Et)<1, Qual>0 ); \ +# leg3:=(puppiJet, SeededConePuppiJetOfflineEtCut(110.0,Et,Eta), Et>25, abs(Eta)<2.5); \ +# leg4:=(puppiMet, Et>PuppiMET090OfflineEtCut(120.0)); \ + +#trigger :: L1_DoubleTkMu_PfJet_PfMet :: leg1:=(puppiVtx,leading>-99999.0); \ +# leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Et)<1 , Qual>0); \ +# leg3:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Et)<1 , Qual>0); \ +# leg4:=(puppiJet, SeededConePuppiJetOfflineEtCut(60.0,Et,Eta), Et>25, abs(Eta)<2.4); \ +# leg5:=(puppiMet, Et>PuppiMET090OfflineEtCut(130.0)); + +#trigger :: L1_DoubleTkMu_PfHTT :: leg1:=(puppiVtx,leading>-99999.0); \ +# leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Et)<1, Qual>0 ); \ +# leg3:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Et)<1 , Qual>0); \ +# leg4:=(puppiHt, leading>SeededConePuppiHT090OfflineEtCut(300.0)); + +trigger :: L1_DoubleTkEle_PFHTT :: leg1:=(puppiVtx,leading>-99999.0); \ + leg2:=(tkElectron , TkElectronOfflineEtCut(8.0,Et,Eta), abs(Eta)<2.5, TkEleQualLOW(Et,Eta,PassesEleID), abs(zVtx-leg1.Et)<1); \ + leg3:=(tkElectron , TkElectronOfflineEtCut(8.0,Et,Eta), abs(Eta)<2.5, TkEleQualLOW(Et,Eta,PassesEleID), abs(zVtx-leg1.Et)<1); \ + leg4:=(puppiHt, leading>SeededConePuppiHT090OfflineEtCut(390.0)); + + +trigger :: L1_TkEleIso_PFHTT :: leg1:=(puppiVtx,leading>-99999.0); \ + leg2:=(tkElectron , TkIsoElectronOfflineEtCut(26.0,Et,Eta), abs(Eta)<2.1, TkEleIsoQualLOW(Et,Eta,PassesEleID), etaRangeCutLess(TrkIso,Eta,1.479,0.13,0.28), abs(zVtx-leg1.Et)<1); \ + leg3:=(puppiHt , leading>SeededConePuppiHT090OfflineEtCut(190.0)); + +trigger :: L1_TkEle_PFJet_dRMin :: leg1:=(puppiVtx,leading>-99999.0); \ + leg2:=(tkElectron , TkElectronOfflineEtCut(28.0,Et,Eta), abs(Eta)<2.1, TkEleQualLOW(Et,Eta,PassesEleID), abs(zVtx-leg1.Et)<1); \ + leg3:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25, abs(Eta)<2.4, deltaR(Eta, leg2.Eta, Phi, leg2.Phi)>0.3); \ + + + + +# VBF +trigger :: L1_DoublePFJet_MassMin :: leg1:=(puppiJet, SeededConePuppiJetOfflineEtCut(160.0,Et,Eta)); \ + leg2:=(puppiJet, SeededConePuppiJetOfflineEtCut(35.0,Et,Eta),Et>25, pairInvMass(Et,leg1.Et,Eta,leg1.Eta,Phi,leg1.Phi)>620.0); \ + + + +# BPH +#trigger :: L1_DoubleTkMu0er1p5_SQ_OS_dR_Max1p4 :: leg1:=(tkGmtMu, abs(Eta)<1.5, Qual>0 ); \ +# leg2:=(tkGmtMu, abs(Eta)<1.5, deltaR(Eta, leg1.Eta, Phi, leg1.Phi)<1.4, leg1.Chg*Chg<0.0, abs(Z0-leg1.Z0)<1, Qual>0 ); \ + +#trigger :: L1_DoubleTkMu4_SQ_OS_dR_Max1p2 :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(4.0,Pt,Eta), abs(Eta)<2.4, Qual>0 ); \ +# leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(4.0,Pt,Eta), abs(Eta)<2.4, deltaR(Eta, leg1.Eta, Phi, leg1.Phi)<1.2, leg1.Chg*Chg<0.0, abs(Z0-leg1.Z0)<1 , Qual>0); \ + + +#trigger :: L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18 :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(4.5,Pt,Eta), abs(Eta)<2.0 , Qual>0); \ +# leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(4.5,Pt,Eta), abs(Eta)<2.0, pairInvMass(Pt,leg1.Pt,Eta,leg1.Eta,Phi,leg1.Phi)>7.0, pairInvMass(Pt,leg1.Pt,Eta,leg1.Eta,Phi,leg1.Phi)<18.0, leg1.Chg*Chg<0.0, abs(Z0-leg1.Z0)<1 , Qual>0); \ + + +#trigger :: L1_DoubleTkMu9_SQ :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(9.0,Pt,Eta), abs(Eta)<2.4, Qual>0); \ +# leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(9.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Z0)<1, Qual>0); \ + +#trigger :: L1_TripleTkMu_5SQ_3SQ_0OQ_DoubleMu_5_3_SQ_OS_Mass_Max9 :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(5.0,Pt,Eta), abs(Eta)<2.4, Qual>0 ); \ +# leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, pairInvMass(Pt,leg1.Pt,Eta,leg1.Eta,Phi,leg1.Phi)<9.0, leg1.Chg*Chg<0.0, abs(Z0-leg1.Z0)<1 , Qual>0); \ +# leg3:=(tkGmtMu, Pt>0.0, abs(Eta)<2.4, abs(Z0-leg1.Z0)<1, Qual>0 ); \ + +#trigger :: L1_TripleTkMu_5_3p5_2p5_OS_Mass_5to17 :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(5.0,Pt,Eta), abs(Eta)<2.4, Qual>0 ); \ +# leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.5,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Z0)<1, Qual>0 ); \ +# leg3:=(tkGmtMu, GMTTkMuonOfflineEtCut(2.5,Pt,Eta), abs(Eta)<2.4, leg1.Chg*Chg<0.0, pairInvMass(Pt,leg1.Pt,Eta,leg1.Eta,Phi,leg1.Phi)>5.0, pairInvMass(Pt,leg1.Pt,Eta,leg1.Eta,Phi,leg1.Phi)<17.0, abs(Z0-leg1.Z0)<1, Qual>0 ); \ + + + + +# Standalone path: recover efficiency and robustness + +trigger :: L1_SingleEGEle :: leg1:=(EG , EGElectronOfflineEtCut(51.0,Et,Eta), abs(Eta)<2.4, EGID(PassesEleID, PassesSaID, Eta)); \ + +trigger :: L1_DoubleEGEle :: leg1:=(EG , EGElectronOfflineEtCut(37.0,Et,Eta), abs(Eta)<2.4, EGID(PassesEleID, PassesSaID, Eta) ); \ + leg2:=(EG , EGElectronOfflineEtCut(24.0,Et,Eta), abs(Eta)<2.4, EGID(PassesEleID, PassesSaID, Eta), notMatched(Eta, leg1.Eta, Phi, leg1.Phi)); \ + diff --git a/rates/table/cfg/v29_WITHMUONS_Final b/rates/table/cfg/v29_WITHMUONS_Final new file mode 100644 index 00000000..b18ec81f --- /dev/null +++ b/rates/table/cfg/v29_WITHMUONS_Final @@ -0,0 +1,327 @@ +#format is like this: +#typeOfParameter :: parameterOrObjectName :: option1=value2; option2=(this,is,a,list) + + +## general options +## ----------------------------------------------------------- +variable :: bundledate :: v29 +variable :: nBunches :: 2760 +variable :: revFreq :: 11246 + +#variable :: tiers :: (variations) +variable :: tiers :: (thresholds) + +variable :: varBins :: (30,50) +#variable :: varBins :: (10,20,30,40,50,60,70,80,90,100) +##variable :: varBins :: (100,140,275,425,575,700,850,1000) +variable :: varError :: 0.2 +variable :: varInterpol :: linear +variable :: varLeg :: 1 +variable :: varCut :: 1 +variable :: varPrecision :: 2 +variable :: varIterations :: 5 +variable :: useNominalBwF :: False + + + +## samples (always all samples are used!) +## ----------------------------------------------------------- + +sample :: neutrinos :: path:=/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/v29/MinBias_9x.root; tree:=l1PhaseIITree/L1PhaseIITree + + +## physics objects at trigger level +## ----------------------------------------------------------- + +## Electrons and Photons +object :: EG :: basebranch:=EG ; variables:=(Et,Eta,Phi,Iso,zVtx,PassesEleID,PassesSaID,HwQual); \ + leading:=Et; lengthbranch:=nEG; onToOff:=0 + +object :: tkElectron :: basebranch:=tkElectron ; variables:=(Et,Eta,Phi,TrkIso,zVtx,PassesEleID,HwQual); \ + leading:=Et; lengthbranch:=nTkElectrons; onToOff:=0 + +object :: tkPhoton :: basebranch:=tkPhoton ; variables:=(Et,Eta,Phi,TrkIso,TrkIsoPV,zVtx,PassesEleID,PassesPhoID,HwQual); \ + leading:=Et; lengthbranch:=nTkPhotons; onToOff:=0 + +## Muons +#object :: tkMu :: basebranch:=tkMuon ; variables:=(Pt,Eta,Phi,Chg,Iso,TrkIso,Qual,zVtx,MuRefPt,MuRefEta,MuRefPhi,Region,Qual); \ +# leading:=Pt; lengthbranch:=nTkMuons; onToOff:=0 + +object :: tkGmtMu :: basebranch:=gmtTkMuon ; variables:=(Pt,Eta,Phi,Chg,Iso,Qual,Z0); \ + leading:=Pt; lengthbranch:=nGmtTkMuons; onToOff:=0 + +## Taus +object :: puppiTau :: basebranch:=nnTau ; variables:=(Et,Eta,Phi,PassLooseNN,PassTightNN); \ + leading:=Et; lengthbranch:=nNNTaus; onToOff:=0 + +object :: caloTau :: basebranch:=caloTau ; variables:=(Et,Eta,Phi); \ + leading:=Et; lengthbranch:=nCaloTaus; onToOff:=0 + +## Jets +object :: puppiJet :: basebranch:=seededConePuppiJet ; variables:=(Et,Eta,Phi); \ + leading:=Et; lengthbranch:=nSeededConePuppiJets; onToOff:=0 + +object :: puppiHt :: basebranch:=seededConePuppiHT ; variables:=(Et=); \ + leading:=Et; isFlat:=True; fixedIndex:=0; onToOff:=0 + +object :: puppiMHt :: basebranch:=seededConePuppiMHT ; variables:=(Et,Phi); \ + leading:=Et; isFlat:=True; onToOff:=0 + +## MET +object :: puppiMet :: basebranch:=puppiMET ; variables:=(Et,Phi); \ + leading:=Et; isFlat:=True; onToOff:=0 + +## zVtx +object :: puppiVtx :: basebranch:=z0L1TkPV ; variables:=(Et=); \ + leading:=Et; isFlat:=True; onToOff:=0 + + + + +## function aliases +## ----------------------------------------------------------- +function :: notMatched :: args:=(eta1,eta2,phi1,phi2); lambda:= math.sqrt(math.pow(abs(abs(eta1)-abs(eta2)),2) + math.pow(abs(phi1-phi2) if abs(phi1-phi2)<=math.pi else 2*math.pi-abs(phi1-phi2),2))>0.1 +function :: deltaR :: args:=(eta1,eta2,phi1,phi2); lambda:= math.sqrt(math.pow(abs(eta1-eta2),2) + math.pow(abs(phi1-phi2) if abs(phi1-phi2)<=math.pi else 2*math.pi-abs(phi1-phi2),2)) +function :: deltaEta :: args:=(eta1,eta2); lambda:= abs(eta1-eta2) +function :: etaRangeCutLess :: args:=(x,eta,etaRange,cutInRange,cutOutRange); lambda:= xcutInRange if abs(eta)cutOutRange +function :: pairInvMass :: args:=(pt1,pt2,eta1,eta2,phi1,phi2); lambda:= math.sqrt(2.0*pt1*pt2*(math.cosh(eta1-eta2)-math.cos(phi1-phi2))) +function :: pfJetEtaVeto :: args:=(Eta); lambda:= abs(Eta)<2.5 or abs(Eta)>3.0 + +function :: muonQual :: args:=(Region,Qual); lambda:= 1 if (Region==3 and (Qual == 11 or Qual == 13 or Qual == 14 or Qual == 15)) else (1 if Region<3 else 0) + +function :: cleanMuons :: args:=(Region,Eta); lambda:= Region==1 if abs(Eta)<0.9 else (Region==2 if abs(Eta)<1.2 else Region==3) + + +# Quality requirements for muons and tkelectrons +function :: MuonStaQualCut :: args:=(Qual,Eta); lambda:=Qual>=0 if abs(Eta)<0.9 else (Qual>=12 if abs(Eta)<1.2 else Qual>=0) + +#Scalings + + + +#HT +function :: Phase1PuppiHT090OfflineEtCut :: args:=(offline); lambda:=(offline-51.6)/1.099 +function :: SeededConePuppiHT090OfflineEtCut :: args:=(offline); lambda:=(offline-45)/1.086 + +#MHT +#function :: Phase1PuppiMHTOfflineEtCut :: args:=(offline); lambda:=(offline+9.724987)/1.037459 +function :: Phase1PuppiMHTOfflineEtCut :: args:=(offline); lambda:=(offline-38.9)/1.44 +function :: SeededConePuppiMHTOfflineEtCut :: args:=(offline); lambda:=(offline-49.684)/1.244 + + +# +#puppimet +function :: PuppiMET090OfflineEtCut :: args:=(offline); lambda:=(offline-64)/1.461 + +#EG +function :: EGElectronOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-2.707)/1.188 if abs(Eta)<1.5 else (Et>(offline-1.572)/1.249) +function :: TkElectronOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-1.441)/1.159 if abs(Eta)<1.5 else (Et>(offline-1.256)/1.217) +function :: TkIsoElectronOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-1.638)/1.144 if abs(Eta)<1.5 else (Et>(offline-1.219)/1.214) +function :: TkIsoPhotonOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-2.697)/1.096 if abs(Eta)<1.5 else (Et>(offline-5.038)/1.067) + +#function :: EleIDV2 :: args:=(Et,Eta,PassesEleID) ; lambda:=PassesEleID if ( Et>25 or abs(Eta)<1.5) else 1 +#function :: TkElectronIsoQualCut :: args:=(HwQual,Eta, Et); lambda:=HwQual==3 if (Et>25 and abs(Eta)>1.479) else 1 if (Et<25 and abs(Eta)>1.479) else HwQual>=0 + +function :: TkEleQualHIGH :: args:=(Et,Eta,PassesEleID) ; lambda:=PassesEleID +function :: TkEleQualLOW :: args:=(Et,Eta,PassesEleID) ; lambda:=PassesEleID if (abs(Eta)<1.479) else 1 +function :: TkEleIsoQualHIGH :: args:=(Et,Eta,PassesEleID); lambda:= PassesEleID if (abs(Eta)>1.479) else 1 +function :: TkEleIsoQualLOW :: args:=(Et,Eta,PassesEleID); lambda:= (PassesEleID>=0) # this should be always true: we can remove this condition from the menu + + +#function :: TkElectronIsoQualCut :: args:=(HwQual,Eta); lambda:=HwQual==3 if abs(Eta)>1.479 else HwQual>=0 + + +## IDs +function :: EGID :: args:=(EleID, SaID, Eta); lambda:=EleID if abs(Eta)<1.5 else SaID +function :: PhoID :: args:=(EleID, PhoID, Eta); lambda:=EleID if abs(Eta)<1.5 else PhoID + +#taus +function :: CaloTau090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+2.381)/1.521 if abs(Eta)<1.5 else (Et>(offline-0.045)/1.937) +function :: NNTauLoose090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline+2.871)/1.92 if abs(Eta)<1.5 else (Et>(offline-21.639)/1.551) + +#puppijet +function :: Phase1PuppiJetOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-15.497)/1.383 if abs(Eta)<1.5 else (Et>(offline-9.362)/1.959 if abs(Eta)<2.4 else (Et>(offline-75.5)/1.41)) +function :: SeededConePuppiJetOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-20.108)/1.308 if abs(Eta)<1.5 else (Et>(offline-7.971)/2.05 if abs(Eta)<2.4 else (Et>(offline-72.567)/1.418)) + +#tkmuons +function :: GMTTkMuonOfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>offline if (offline<8) else Et>(offline-0.986)/1.049 if abs(Eta)<0.83 else (Et>(offline-1.075)/1.052 if abs(Eta)<1.24 else (Et>(offline-0.792)/1.054)) + + +## trigger paths +## ----------------------------------------------------------- + +## muon + +trigger :: L1_SingleTkMu :: leg1:=(tkGmtMu , GMTTkMuonOfflineEtCut(22.0,Pt,Eta), abs(Eta)<2.4 ); \ + +trigger :: L1_DoubleTkMu :: leg1:=(tkGmtMu , GMTTkMuonOfflineEtCut(15.0,Pt,Eta), abs(Eta)<2.4); \ + leg2:=(tkGmtMu , GMTTkMuonOfflineEtCut(7.0,Pt,Eta), abs(Eta)<2.4, abs(leg1.Z0-Z0)<1); \ + +trigger :: L1_TripleTkMu :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(5.0,Pt,Eta), abs(Eta)<2.4, Qual>0 ); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Z0)<1, Qual>0 ); \ + leg3:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Z0)<1, Qual>0 ); \ + +# e/gamma + +trigger :: L1_SingleTkEle :: leg1:=(tkElectron , TkElectronOfflineEtCut(36.0,Et,Eta), abs(Eta)<2.4, TkEleQualHIGH(Et,Eta,PassesEleID)); \ + +trigger :: L1_SingleTkEleIso :: leg1:=(tkElectron , TkIsoElectronOfflineEtCut(28.0,Et,Eta), TkEleIsoQualLOW(Et,Eta,PassesEleID), etaRangeCutLess(TrkIso,Eta,1.479,0.13,0.28)); \ + +trigger :: L1_DoubleTkEle :: leg1:=(tkElectron , TkElectronOfflineEtCut(25.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID) ); \ + leg2:=(tkElectron , TkElectronOfflineEtCut(12.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID) , abs(zVtx-leg1.zVtx)<1); \ + +trigger :: L1_SingleTkPhoIso :: leg1:=(tkPhoton , TkIsoPhotonOfflineEtCut(36.0,Et,Eta), abs(Eta)<2.4, PhoID(PassesEleID, PassesPhoID, Eta), etaRangeCutLess(TrkIso,Eta,1.479,0.25,0.205)); \ + +trigger :: L1_TkEleIso_EG :: leg1:=(tkElectron , TkIsoElectronOfflineEtCut(22.0,Et,Eta), abs(Eta)<2.4, TkEleIsoQualLOW(Et,Eta,PassesEleID) , etaRangeCutLess(TrkIso,Eta,1.479,0.13,0.28)); \ + leg2:=(EG , EGElectronOfflineEtCut(12.0,Et,Eta), abs(Eta)<2.4, EGID(PassesEleID, PassesSaID, Eta), notMatched(Eta, leg1.Eta, Phi, leg1.Phi)); \ + +trigger :: L1_DoubleTkPhoIso :: leg1:=(tkPhoton , TkIsoPhotonOfflineEtCut(22.0,Et,Eta), abs(Eta)<2.4, PhoID(PassesEleID, PassesPhoID, Eta), etaRangeCutLess(TrkIso,Eta,1.479,0.25,0.205)); \ + leg2:=(tkPhoton , TkIsoPhotonOfflineEtCut(12.0,Et,Eta), abs(Eta)<2.4, PhoID(PassesEleID, PassesPhoID, Eta), etaRangeCutLess(TrkIso,Eta,1.479,0.25,0.205)); \ + + +# tau stuff + +trigger :: L1_SinglePFTau :: leg1:=(caloTau , CaloTau090OfflineEtCut(150.0,Et,Eta), abs(Eta)<2.172); \ + +trigger :: L1_PFTau_PFTau :: leg1:=(caloTau , CaloTau090OfflineEtCut(90.0,Et,Eta), abs(Eta)<2.172); \ + leg2:=(caloTau , CaloTau090OfflineEtCut(90.0,Et,Eta), abs(Eta)<2.172, deltaR(Eta, leg1.Eta, Phi, leg1.Phi)>0.5); \ + + + +trigger :: L1_PFIsoTau_PFIsoTau :: leg1:=(puppiTau , NNTauLoose090OfflineEtCut(52.0,Et,Eta), abs(Eta)<2.172, PassLooseNN>0); \ + leg2:=(puppiTau , NNTauLoose090OfflineEtCut(52.0,Et,Eta), abs(Eta)<2.172, PassLooseNN>0, deltaR(Eta, leg1.Eta, Phi, leg1.Phi)>0.5); \ + +trigger :: L1_PFIsoTau_TkMu :: leg1:=(puppiVtx ,leading>-99999.0); \ + leg2:=(tkGmtMu , GMTTkMuonOfflineEtCut(18.0,Pt,Eta), abs(Eta)<2.1, abs(Z0-leg1.Et)<1); \ + leg3:=(puppiTau , NNTauLoose090OfflineEtCut(42.0,Et,Eta), abs(Eta)<2.172, PassLooseNN>0); \ + +trigger :: L1_TkEleIso_PFIsoTau :: leg1:=(puppiVtx ,leading>-99999.0); \ + leg2:=(tkElectron, TkIsoElectronOfflineEtCut(22.0,Et,Eta), abs(Eta)<2.1, TkEleIsoQualLOW(Et,Eta,PassesEleID), etaRangeCutLess(TrkIso,Eta,1.479,0.13,0.28), abs(zVtx-leg1.Et)<1); \ + leg3:=(puppiTau, NNTauLoose090OfflineEtCut(45.0,Et,Eta), abs(Eta)<2.172, PassLooseNN>0); \ + +trigger :: L1_PFIsoTau_PFMet :: leg1:=(puppiTau, NNTauLoose090OfflineEtCut(55.0,Et,Eta), abs(Eta)<2.172, PassLooseNN>0); \ + leg2:=(puppiMet, Et>PuppiMET090OfflineEtCut(190.0)); \ + + +# Jets +trigger :: L1_SinglePfJet :: leg1:=(puppiJet, SeededConePuppiJetOfflineEtCut(230.0,Et,Eta), Et>25, abs(Eta)<2.4); \ + +trigger :: L1_DoublePFJet_dEtaMax :: leg1:=(puppiJet, SeededConePuppiJetOfflineEtCut(112.0,Et,Eta), Et>25, abs(Eta)<2.4); \ + leg2:=(puppiJet, SeededConePuppiJetOfflineEtCut(112.0,Et,Eta), Et>25, abs(Eta)<2.4, deltaEta(Eta,leg1.Eta)<1.6); \ + +# HT, MET +trigger :: L1_PFHTT :: leg1:=(puppiHt , leading>SeededConePuppiHT090OfflineEtCut(450.0)); \ + +#trigger :: L1_PFMHTT :: leg1:=(puppiMHt , Et>SeededConePuppiMHTOfflineEtCut(135.5)); \ + +trigger :: L1_PFMet :: leg1:=(puppiMet, Et>PuppiMET090OfflineEtCut(200.0)); \ + +trigger :: L1_PFHTT_QuadJet :: leg1:=(puppiHt , leading>SeededConePuppiHT090OfflineEtCut(400.0)); \ + leg2:=(puppiJet, SeededConePuppiJetOfflineEtCut(70.0,Et,Eta), Et>25.0, abs(Eta)<2.4); \ + leg3:=(puppiJet, SeededConePuppiJetOfflineEtCut(55.0,Et,Eta), Et>25.0, abs(Eta)<2.4); \ + leg4:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25.0, abs(Eta)<2.4); \ + leg5:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25.0, abs(Eta)<2.4); \ + +# EG+Mu +trigger :: L1_TkMu_TkEleIso :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(7.0,Pt,Eta), abs(Eta)<2.4 ); \ + leg2:=(tkElectron, TkIsoElectronOfflineEtCut(20.0,Et,Eta), abs(Eta)<2.4, TkEleIsoQualLOW(Et,Eta,PassesEleID), etaRangeCutLess(TrkIso,Eta,1.479,0.13,0.28), abs(zVtx-leg1.Z0)<1); \ + +trigger :: L1_TkMu_TkEle :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(7.0,Pt,Eta), abs(Eta)<2.4 ); \ + leg2:=(tkElectron, TkElectronOfflineEtCut(23.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID), abs(zVtx-leg1.Z0)<1); \ + +trigger :: L1_TkEle_TkMu :: leg1:=(tkElectron , TkElectronOfflineEtCut(10.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID)); \ + leg2:=(tkGmtMu , GMTTkMuonOfflineEtCut(20.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.zVtx)<1 ); \ + +trigger :: L1_TkMu_DoubleTkEle :: leg1:=(tkElectron , TkElectronOfflineEtCut(17.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID)); \ + leg2:=(tkElectron , TkElectronOfflineEtCut(17.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID), abs(zVtx-leg1.zVtx)<1); \ + leg3:=(tkGmtMu , GMTTkMuonOfflineEtCut(6.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.zVtx)<1 ); \ + +trigger :: L1_DoubleTkMu_TkEle :: leg1:=(tkElectron , TkElectronOfflineEtCut(9.0,Et,Eta), abs(Eta)<2.4, TkEleQualLOW(Et,Eta,PassesEleID)); \ + leg2:=(tkGmtMu , GMTTkMuonOfflineEtCut(5.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.zVtx)<1 , Qual>0); \ + leg3:=(tkGmtMu , GMTTkMuonOfflineEtCut(5.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.zVtx)<1 , Qual>0); \ + + +# Lep+Jet/HT +trigger :: L1_TkMu_PfHTT :: leg1:=(puppiVtx,leading>-99999.0); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(6.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Et)<1 , Qual>0); \ + leg3:=(puppiHt, leading>SeededConePuppiHT090OfflineEtCut(320.0)); \ + +trigger :: L1_TkMu_PfJet_dRMax_DoubleJet_dEtaMax :: leg1:=(puppiVtx,leading>-99999.0); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(12.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Et)<1 , Qual>0); \ + leg3:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25, abs(Eta)<2.4, deltaR(Eta,leg2.Eta,Phi,leg2.Phi)<0.4); \ + leg4:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25, abs(Eta)<2.4); \ + leg5:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25, abs(Eta)<2.4, deltaEta(Eta,leg4.Eta)<1.6); \ + +trigger :: L1_TkMu_PfJet_PfMet :: leg1:=(puppiVtx,leading>-99999.0); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.1, abs(Z0-leg1.Et)<1, Qual>0 ); \ + leg3:=(puppiJet, SeededConePuppiJetOfflineEtCut(110.0,Et,Eta), Et>25, abs(Eta)<2.5); \ + leg4:=(puppiMet, Et>PuppiMET090OfflineEtCut(120.0)); \ + +trigger :: L1_DoubleTkMu_PfJet_PfMet :: leg1:=(puppiVtx,leading>-99999.0); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Et)<1 , Qual>0); \ + leg3:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Et)<1 , Qual>0); \ + leg4:=(puppiJet, SeededConePuppiJetOfflineEtCut(60.0,Et,Eta), Et>25, abs(Eta)<2.4); \ + leg5:=(puppiMet, Et>PuppiMET090OfflineEtCut(130.0)); + +trigger :: L1_DoubleTkMu_PfHTT :: leg1:=(puppiVtx,leading>-99999.0); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Et)<1, Qual>0 ); \ + leg3:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Et)<1 , Qual>0); \ + leg4:=(puppiHt, leading>SeededConePuppiHT090OfflineEtCut(300.0)); + +trigger :: L1_DoubleTkEle_PFHTT :: leg1:=(puppiVtx,leading>-99999.0); \ + leg2:=(tkElectron , TkElectronOfflineEtCut(8.0,Et,Eta), abs(Eta)<2.5, TkEleQualLOW(Et,Eta,PassesEleID), abs(zVtx-leg1.Et)<1); \ + leg3:=(tkElectron , TkElectronOfflineEtCut(8.0,Et,Eta), abs(Eta)<2.5, TkEleQualLOW(Et,Eta,PassesEleID), abs(zVtx-leg1.Et)<1); \ + leg4:=(puppiHt, leading>SeededConePuppiHT090OfflineEtCut(390.0)); + + +trigger :: L1_TkEleIso_PFHTT :: leg1:=(puppiVtx,leading>-99999.0); \ + leg2:=(tkElectron , TkIsoElectronOfflineEtCut(26.0,Et,Eta), abs(Eta)<2.1, TkEleIsoQualLOW(Et,Eta,PassesEleID), etaRangeCutLess(TrkIso,Eta,1.479,0.13,0.28), abs(zVtx-leg1.Et)<1); \ + leg3:=(puppiHt , leading>SeededConePuppiHT090OfflineEtCut(190.0)); + +trigger :: L1_TkEle_PFJet_dRMin :: leg1:=(puppiVtx,leading>-99999.0); \ + leg2:=(tkElectron , TkElectronOfflineEtCut(28.0,Et,Eta), abs(Eta)<2.1, TkEleQualLOW(Et,Eta,PassesEleID), abs(zVtx-leg1.Et)<1); \ + leg3:=(puppiJet, SeededConePuppiJetOfflineEtCut(40.0,Et,Eta), Et>25, abs(Eta)<2.4, deltaR(Eta, leg2.Eta, Phi, leg2.Phi)>0.3); \ + + + + +# VBF +trigger :: L1_DoublePFJet_MassMin :: leg1:=(puppiJet, SeededConePuppiJetOfflineEtCut(160.0,Et,Eta)); \ + leg2:=(puppiJet, SeededConePuppiJetOfflineEtCut(35.0,Et,Eta),Et>25, pairInvMass(Et,leg1.Et,Eta,leg1.Eta,Phi,leg1.Phi)>620.0); \ + + + +# BPH +trigger :: L1_DoubleTkMu0er1p5_SQ_OS_dR_Max1p4 :: leg1:=(tkGmtMu, abs(Eta)<1.5, Qual>0 ); \ + leg2:=(tkGmtMu, abs(Eta)<1.5, deltaR(Eta, leg1.Eta, Phi, leg1.Phi)<1.4, leg1.Chg*Chg<0.0, abs(Z0-leg1.Z0)<1, Qual>0 ); \ + +trigger :: L1_DoubleTkMu4_SQ_OS_dR_Max1p2 :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(4.0,Pt,Eta), abs(Eta)<2.4, Qual>0 ); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(4.0,Pt,Eta), abs(Eta)<2.4, deltaR(Eta, leg1.Eta, Phi, leg1.Phi)<1.2, leg1.Chg*Chg<0.0, abs(Z0-leg1.Z0)<1 , Qual>0); \ + + +trigger :: L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18 :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(4.5,Pt,Eta), abs(Eta)<2.0 , Qual>0); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(4.5,Pt,Eta), abs(Eta)<2.0, pairInvMass(Pt,leg1.Pt,Eta,leg1.Eta,Phi,leg1.Phi)>7.0, pairInvMass(Pt,leg1.Pt,Eta,leg1.Eta,Phi,leg1.Phi)<18.0, leg1.Chg*Chg<0.0, abs(Z0-leg1.Z0)<1 , Qual>0); \ + + +trigger :: L1_DoubleTkMu9_SQ :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(9.0,Pt,Eta), abs(Eta)<2.4, Qual>0); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(9.0,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Z0)<1, Qual>0); \ + +trigger :: L1_TripleTkMu_5SQ_3SQ_0OQ_DoubleMu_5_3_SQ_OS_Mass_Max9 :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(5.0,Pt,Eta), abs(Eta)<2.4, Qual>0 ); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.0,Pt,Eta), abs(Eta)<2.4, pairInvMass(Pt,leg1.Pt,Eta,leg1.Eta,Phi,leg1.Phi)<9.0, leg1.Chg*Chg<0.0, abs(Z0-leg1.Z0)<1 , Qual>0); \ + leg3:=(tkGmtMu, Pt>0.0, abs(Eta)<2.4, abs(Z0-leg1.Z0)<1, Qual>0 ); \ + +trigger :: L1_TripleTkMu_5_3p5_2p5_OS_Mass_5to17 :: leg1:=(tkGmtMu, GMTTkMuonOfflineEtCut(5.0,Pt,Eta), abs(Eta)<2.4, Qual>0 ); \ + leg2:=(tkGmtMu, GMTTkMuonOfflineEtCut(3.5,Pt,Eta), abs(Eta)<2.4, abs(Z0-leg1.Z0)<1, Qual>0 ); \ + leg3:=(tkGmtMu, GMTTkMuonOfflineEtCut(2.5,Pt,Eta), abs(Eta)<2.4, leg1.Chg*Chg<0.0, pairInvMass(Pt,leg1.Pt,Eta,leg1.Eta,Phi,leg1.Phi)>5.0, pairInvMass(Pt,leg1.Pt,Eta,leg1.Eta,Phi,leg1.Phi)<17.0, abs(Z0-leg1.Z0)<1, Qual>0 ); \ + + + + +# Standalone path: recover efficiency and robustness + +trigger :: L1_SingleEGEle :: leg1:=(EG , EGElectronOfflineEtCut(51.0,Et,Eta), abs(Eta)<2.4, EGID(PassesEleID, PassesSaID, Eta)); \ + +trigger :: L1_DoubleEGEle :: leg1:=(EG , EGElectronOfflineEtCut(37.0,Et,Eta), abs(Eta)<2.4, EGID(PassesEleID, PassesSaID, Eta) ); \ + leg2:=(EG , EGElectronOfflineEtCut(24.0,Et,Eta), abs(Eta)<2.4, EGID(PassesEleID, PassesSaID, Eta), notMatched(Eta, leg1.Eta, Phi, leg1.Phi)); \ + From b362ebb4afc724475f51ee6ef45231b59f24b2e4 Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Mon, 17 Apr 2023 18:41:17 +0200 Subject: [PATCH 6/9] [Rates V29] Add nnTaus in barrel/endcaps and plot fixes (#32) * [BTag] restyle btag efficiency organization * [V29] Update scalings for rates * [V29 Rates] change misleading comment * [V29] new config files for rates table * [Rates V29] Plot fixes * [Rates V29] Add nnTaus split --- rates/plots/ratePlots_v29.py | 17 ++++++++++++----- rates/plots/rates_emulator_125x_v29.py | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/rates/plots/ratePlots_v29.py b/rates/plots/ratePlots_v29.py index 89990e23..b1cef651 100644 --- a/rates/plots/ratePlots_v29.py +++ b/rates/plots/ratePlots_v29.py @@ -63,20 +63,21 @@ #0: ['standaloneMuonBarrel', 'standaloneMuonOverlap', 'standaloneMuonEndcap'] ##0 : ['gmtMuonBarrel', 'gmtMuonOverlap', 'gmtMuonEndcap'], 0 : ['standaloneElectron', 'tkElectron', 'tkIsoElectron', 'tkPhotonIso'], - 1 : ['trackerJet', 'puppiPhase1Jet', 'seededConePuppiJet', 'caloJet'], + 1 : ['trackerJet', 'puppiPhase1Jet', 'seededConePuppiJet'], #9 : ['trackerJet', 'puppiPhase1Jet', 'seededConePuppiJet'], - 2 : ['puppiPhase1JetExt', 'seededConePuppiJetExt', 'caloJetExt'], + 2 : ['puppiPhase1JetExt', 'seededConePuppiJetExt'], 10 : ['puppiPhase1JetExt', 'seededConePuppiJetExt'], 3 : ['puppiPhase1HT', 'trackerHT', 'caloHT'], #4 : ['puppiPhase1HT', 'trackerHT'], #5 : ['puppiPhase1MHT', 'trackerMHT'], 6 : ['puppiMET', 'trackerMET'], #'trackerMET_FBE'], - 6 : ['trackerMET'], + # 6 : ['trackerMET'], #7 : ['standaloneMuon', 'tkMuon', 'tkMuonStub'], 8 : ['gmtMuon', 'gmtTkMuon'], 11 : ['CaloTau', 'NNPuppiTauLoose'], #, 'NNPuppiTau2vtxLoose'], 12: ['CaloTau','CaloTauBarrel','CaloTauEndcap'], - 15: ['CaloTau','CaloTauBarrel','CaloTauEndcap','NNPuppiTauLoose'], + 14: ['NNPuppiTauLoose','NNPuppiTauLooseBarrel','NNPuppiTauLooseEndcap'], + 15: ['CaloTau','CaloTauBarrel','CaloTauEndcap'], 100: ["seededConePuppiJet_Barrel","seededConePuppiJet_Endcap"], 101: ["puppiPhase1Jet_Barrel","puppiPhase1Jet_Endcap"], 102: ["seededConePuppiJet_Barrel","seededConePuppiJet_Endcap","puppiPhase1Jet_Barrel","puppiPhase1Jet_Endcap"], @@ -95,8 +96,12 @@ 'caloJet' : 'calo jet', 'puppiPhase1Jet' : 'histogr. puppi jet', 'seededConePuppiJet' : 'seeded cone puppi jet', + 'seededConePuppiJet_Barrel': 'seeded cone puppi jet, barrel', + 'seededConePuppiJet_Endcap': 'seeded cone puppi jet, endcap', 'caloJetExt' : 'calo jet (|#eta|<5)', 'puppiPhase1JetExt' : 'histogr. puppi jet (|#eta|<5)', + 'puppiPhase1Jet_Barrel': 'histogr. puppi jet, barrel', + 'puppiPhase1Jet_Endcap': 'histogr. puppi jet, endcap', 'seededConePuppiJetExt' : 'seeded cone puppi jet (|#eta|<5)', 'puppiPhase1HT' : 'histogr. puppi jets H_{T}', 'trackerHT' : 'tracker H_{T}', @@ -110,7 +115,9 @@ 'CaloTau' : 'calo tau', 'CaloTauEndcap' : 'calo tau, endcap', 'CaloTauBarrel' : 'calo tau, barrel', - 'NNPuppiTauLoose' : 'nnPuppi tau (loose WP)', + 'NNPuppiTauLoose' : 'nnPuppi tau', + 'NNPuppiTauLooseBarrel' : 'nnPuppi tau, barrel', + 'NNPuppiTauLooseEndcap' : 'nnPuppi tau, endcap', 'NNPuppiTau2vtxLoose' : 'nnPuppi tau (loose WP, 2vtx)', } diff --git a/rates/plots/rates_emulator_125x_v29.py b/rates/plots/rates_emulator_125x_v29.py index a5f2b737..1a7bef3a 100644 --- a/rates/plots/rates_emulator_125x_v29.py +++ b/rates/plots/rates_emulator_125x_v29.py @@ -218,6 +218,8 @@ def NNTauLooseOfflineEtCutEndcap(offline) : return (offline-21.639)/1.551 'NNPuppiTauLoose':[10.0,160.0,5.0], +'NNPuppiTauLooseBarrel':[10.0,160.0,5.0], +'NNPuppiTauLooseEndcap':[10.0,160.0,5.0], 'NNPuppiTau2vtxLoose':[10.0,160.0,5.0], 'CaloTau':[10.0,160.0,5.0], 'CaloTauBarrel':[10.0,160.0,5.0], @@ -251,6 +253,8 @@ def NNTauLooseOfflineEtCutEndcap(offline) : return (offline-21.639)/1.551 'puppiMET', 'trackerMET', 'NNPuppiTauLoose', + 'NNPuppiTauLooseBarrel', + 'NNPuppiTauLooseEndcap', # 'NNPuppiTau2vtxLoose', 'CaloTau', 'CaloTauBarrel', @@ -351,6 +355,16 @@ def NNTauLooseOfflineEtCutEndcap(offline) : return (offline-21.639)/1.551 offlinecut = "Sum$( "+offlinescalingcut+" && nnTauPassLooseNN[]>0 && abs(nnTauEta[])<2.4)>0" onlinecut = "Sum$( nnTauEt[]>"+str(x)+" && nnTauPassLooseNN[]>0 && abs(nnTauEta[])<2.4)>0" + if (obj=='NNPuppiTauLooseBarrel'): + offlinescalingcut = "( (abs(nnTauEta[])<1.5 && nnTauEt[]>("+str(NNTauLooseOfflineEtCutBarrel(x))+")) || (abs(nnTauEta[])>1.5 && nnTauEt[]>("+str(NNTauLooseOfflineEtCutEndcap(x))+")) )" + offlinecut = "Sum$( "+offlinescalingcut+" && nnTauPassLooseNN[]>0 && abs(nnTauEta[])<1.5)>0" + onlinecut = "Sum$( nnTauEt[]>"+str(x)+" && nnTauPassLooseNN[]>0 && abs(nnTauEta[])<1.5)>0" + + if (obj=='NNPuppiTauLooseEndcap'): + offlinescalingcut = "( (abs(nnTauEta[])<1.5 && nnTauEt[]>("+str(NNTauLooseOfflineEtCutBarrel(x))+")) || (abs(nnTauEta[])>1.5 && nnTauEt[]>("+str(NNTauLooseOfflineEtCutEndcap(x))+")) )" + offlinecut = "Sum$( "+offlinescalingcut+" && nnTauPassLooseNN[]>0 && abs(nnTauEta[])>1.5)>0" + onlinecut = "Sum$( nnTauEt[]>"+str(x)+" && nnTauPassLooseNN[]>0 && abs(nnTauEta[])>1.5)>0" + if (obj=='NNPuppiTau2vtxLoose'): offlinescalingcut = "( (abs(nnTau2vtxEta[])<1.5 && nnTau2vtxEt[]>("+str(NNTau2vtxLooseOfflineEtCutBarrel(x))+")) || (abs(nnTau2vtxEta[])>1.5 && nnTau2vtxEt[]>("+str(NNTau2vtxLooseOfflineEtCutEndcap(x))+")) )" offlinecut = "Sum$( "+offlinescalingcut+" && nnTau2vtxPassLooseNN[]>0 && abs(nnTau2vtxEta[])<2.4)>0" From 4efed5f16ab0aceb9fc3cf6861b4f0ccbad622ec Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Mon, 17 Apr 2023 18:57:07 +0200 Subject: [PATCH 7/9] [Rates V29] Add nnTaus split in plotter (#33) * [BTag] restyle btag efficiency organization * [V29] Update scalings for rates * [V29 Rates] change misleading comment * [V29] new config files for rates table * [Rates V29] Plot fixes * [Rates V29] Add nnTaus split * [Rates V29] Add nnTaus split in plotter --- rates/plots/ratePlots_v29.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rates/plots/ratePlots_v29.py b/rates/plots/ratePlots_v29.py index b1cef651..1f010904 100644 --- a/rates/plots/ratePlots_v29.py +++ b/rates/plots/ratePlots_v29.py @@ -71,13 +71,14 @@ #4 : ['puppiPhase1HT', 'trackerHT'], #5 : ['puppiPhase1MHT', 'trackerMHT'], 6 : ['puppiMET', 'trackerMET'], #'trackerMET_FBE'], - # 6 : ['trackerMET'], + 7: ['puppiMET'], + 9: ['trackerMET'], #7 : ['standaloneMuon', 'tkMuon', 'tkMuonStub'], 8 : ['gmtMuon', 'gmtTkMuon'], 11 : ['CaloTau', 'NNPuppiTauLoose'], #, 'NNPuppiTau2vtxLoose'], 12: ['CaloTau','CaloTauBarrel','CaloTauEndcap'], 14: ['NNPuppiTauLoose','NNPuppiTauLooseBarrel','NNPuppiTauLooseEndcap'], - 15: ['CaloTau','CaloTauBarrel','CaloTauEndcap'], + 15: ['CaloTau','CaloTauBarrel','CaloTauEndcap','NNPuppiTauLoose','NNPuppiTauLooseBarrel','NNPuppiTauLooseEndcap'], 100: ["seededConePuppiJet_Barrel","seededConePuppiJet_Endcap"], 101: ["puppiPhase1Jet_Barrel","puppiPhase1Jet_Endcap"], 102: ["seededConePuppiJet_Barrel","seededConePuppiJet_Endcap","puppiPhase1Jet_Barrel","puppiPhase1Jet_Endcap"], @@ -241,4 +242,4 @@ c1.SaveAs(outPath+"/"+name+"_rate_vs_threshold_test_onl.png") else: c1.SaveAs(outPath+"/"+name+"_rate_vs_threshold_test_off.pdf") - c1.SaveAs(outPath+"/"+name+"_rate_vs_threshold_test_off.png") + c1.SaveAs(outPath+"/"+name+"_rate_vs_threshold_test_off.png") \ No newline at end of file From 80c419eea89d91825276c9bcf9d83f6d7e27bbca Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Tue, 18 Apr 2023 11:04:37 +0200 Subject: [PATCH 8/9] [V29 Rates] Add SeededCone HT to plots (#34) * [BTag] restyle btag efficiency organization * [V29] Update scalings for rates * [V29 Rates] change misleading comment * [V29] new config files for rates table * [Rates V29] Plot fixes * [Rates V29] Add nnTaus split * [Rates V29] Add nnTaus split in plotter * [V29 Rates] Add SeededCone HT to plots --- rates/plots/ratePlots_v29.py | 3 +- rates/plots/rates_emulator_125x_v29.py | 87 +++++++++++++------------- 2 files changed, 47 insertions(+), 43 deletions(-) diff --git a/rates/plots/ratePlots_v29.py b/rates/plots/ratePlots_v29.py index 1f010904..18e05992 100644 --- a/rates/plots/ratePlots_v29.py +++ b/rates/plots/ratePlots_v29.py @@ -67,7 +67,7 @@ #9 : ['trackerJet', 'puppiPhase1Jet', 'seededConePuppiJet'], 2 : ['puppiPhase1JetExt', 'seededConePuppiJetExt'], 10 : ['puppiPhase1JetExt', 'seededConePuppiJetExt'], - 3 : ['puppiPhase1HT', 'trackerHT', 'caloHT'], + 3 : ['puppiPhase1HT', 'trackerHT', 'seededConePuppiHT'], #4 : ['puppiPhase1HT', 'trackerHT'], #5 : ['puppiPhase1MHT', 'trackerMHT'], 6 : ['puppiMET', 'trackerMET'], #'trackerMET_FBE'], @@ -107,6 +107,7 @@ 'puppiPhase1HT' : 'histogr. puppi jets H_{T}', 'trackerHT' : 'tracker H_{T}', 'caloHT' : 'calo H_{T}', + 'seededConePuppiHT' : 'seeded cone H_{T}', 'puppiPhase1MHT' : 'histogr. puppi jets #slash{H}_{T}', 'trackerMHT' : 'tracker #slash{H}_{T}', 'puppiMET' : 'puppi #slash{E}_{T}', diff --git a/rates/plots/rates_emulator_125x_v29.py b/rates/plots/rates_emulator_125x_v29.py index 1a7bef3a..e2a2146c 100644 --- a/rates/plots/rates_emulator_125x_v29.py +++ b/rates/plots/rates_emulator_125x_v29.py @@ -80,7 +80,8 @@ def Phase1PuppiJetOfflineEtCutForward(offline) : return (offline-75.542)/1.41 #function :: Phase1PuppiHT090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-46.674588)/1.113875 def Phase1PuppiHTOfflineEtCut(offline) : return (offline-51.672)/1.099 def Phase1PuppiMHTOfflineEtCut(offline) : return (offline-48.725)/1.324 - +def seededConePuppiHTOfflineEtCut(offline) : return (offline-45.124)/1.086 + #function :: PuppiMET090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-62.120627)/1.382451 def PuppiMETOfflineEtCut(offline) : return (offline-64.337)/1.461 @@ -135,7 +136,7 @@ def TkIsoPhotonOfflineEtCutEndcap(offline) : return (offline-5.038)/1.067 #function :: NNPuppiTau090OfflineEtCut :: args:=(offline,Et,Eta); lambda:=Et>(offline-3.778738)/1.642246 if abs(Eta)<1.5 else (Et>(offline-14.808886)/1.716542) def CaloTauOfflineEtCutBarrel(offline) : return (offline+2.381)/1.521 -def CaloTauOfflineEtCutEndcap(offline) : return (offline-0.045)/1.937 +def CaloTauOfflineEtCutEndcap(offline) : return (offline-0.045)/1.937 def NNTauLooseOfflineEtCutBarrel(offline) : return (offline+2.871)/1.92 def NNTauLooseOfflineEtCutEndcap(offline) : return (offline-21.639)/1.551 @@ -192,6 +193,7 @@ def NNTauLooseOfflineEtCutEndcap(offline) : return (offline-21.639)/1.551 'puppiPhase1HT':[50.0,1000.0,25.0], 'trackerHT':[50.0,1000.0,25.0], 'caloHT':[50.0,1000.0,25.0], +'seededConePuppiHT':[50.0,1000.0,25.0], 'puppiPhase1MHT':[50.0,1000.0,25.0], 'trackerMHT':[50.0,1000.0,25.0], @@ -229,42 +231,43 @@ def NNTauLooseOfflineEtCutEndcap(offline) : return (offline-21.639)/1.551 } list_calc = [ - 'gmtTkMuon', - 'gmtMuon', - 'gmtMuonEndcap', - 'gmtMuonBarrel', - 'gmtMuonOverlap', - 'tkElectron', - 'tkIsoElectron', - 'standaloneElectron', - 'tkPhotonIso', - 'seededConePuppiJet', - 'seededConePuppiJetExt', - 'puppiPhase1Jet', - 'puppiPhase1JetExt', - 'trackerJet', - 'caloJet', - 'caloJetExt', - 'puppiPhase1HT', - 'trackerHT', - 'caloHT', - 'puppiPhase1MHT', - 'trackerMHT', - 'puppiMET', - 'trackerMET', - 'NNPuppiTauLoose', - 'NNPuppiTauLooseBarrel', - 'NNPuppiTauLooseEndcap', + 'gmtTkMuon', + 'gmtMuon', + 'gmtMuonEndcap', + 'gmtMuonBarrel', + 'gmtMuonOverlap', + 'tkElectron', + 'tkIsoElectron', + 'standaloneElectron', + 'tkPhotonIso', + 'seededConePuppiJet', + 'seededConePuppiJetExt', + 'puppiPhase1Jet', + 'puppiPhase1JetExt', + 'trackerJet', + 'caloJet', + 'caloJetExt', + 'puppiPhase1HT', + 'trackerHT', + 'caloHT', + 'seededConePuppiHT', + 'puppiPhase1MHT', + 'trackerMHT', + 'puppiMET', + 'trackerMET', + 'NNPuppiTauLoose', + 'NNPuppiTauLooseBarrel', + 'NNPuppiTauLooseEndcap', # 'NNPuppiTau2vtxLoose', - 'CaloTau', - 'CaloTauBarrel', - 'CaloTauEndcap', - 'seededConePuppiJet_Barrel', - 'seededConePuppiJet_Endcap', - 'puppiPhase1Jet_Barrel', - 'puppiPhase1Jet_Endcap', - 'caloJet_Barrel', - 'caloJet_Endcap', + 'CaloTau', + 'CaloTauBarrel', + 'CaloTauEndcap', + 'seededConePuppiJet_Barrel', + 'seededConePuppiJet_Endcap', + 'puppiPhase1Jet_Barrel', + 'puppiPhase1Jet_Endcap', + 'caloJet_Barrel', + 'caloJet_Endcap', ] @@ -455,11 +458,11 @@ def NNTauLooseOfflineEtCutEndcap(offline) : return (offline-21.639)/1.551 #--------------------HT-------------------- - #if (obj=='seededConePuppiHT'): + if (obj=='seededConePuppiHT'): #Not available - # offlinescalingcut = "(seededConePuppiHT[0]>("+str(seededConePuppiHTOfflineEtCut(x))+"))" - # offlinecut = offlinescalingcut - # onlinecut = " seededConePuppiHT[0]>"+str(x) + offlinescalingcut = "(seededConePuppiHT[0]>("+str(seededConePuppiHTOfflineEtCut(x))+"))" + offlinecut = offlinescalingcut + onlinecut = " seededConePuppiHT[0]>"+str(x) if (obj=='puppiPhase1HT'): offlinescalingcut = "(phase1PuppiHT[0]>("+str(Phase1PuppiHTOfflineEtCut(x))+"))" @@ -552,4 +555,4 @@ def NNTauLooseOfflineEtCutEndcap(offline) : return (offline-21.639)/1.551 os.fsync(rates_file.fileno()) rates_file.close() -f.Close() +f.Close() \ No newline at end of file From a1bf9b73776e3c4d55c4d4c3ea7ed293af0b18b8 Mon Sep 17 00:00:00 2001 From: Matteo Bonanomi Date: Tue, 18 Apr 2023 16:52:45 +0200 Subject: [PATCH 9/9] [V29] Include Quality cut in gmtTkmuon rates and fix configs for performance plots (#35) * [BTag] restyle btag efficiency organization * [V29] Update scalings for rates * [V29 Rates] change misleading comment * [V29] new config files for rates table * [Rates V29] Plot fixes * [Rates V29] Add nnTaus split * [Rates V29] Add nnTaus split in plotter * [V29 Rates] Add SeededCone HT to plots * [V29] Include Quality cut in gmtTkmuon rates and fix configs for performance plots --- .../cfg_plots/V29/electron_matching.yaml | 4 +- .../cfg_plots/V29/electron_trigger.yaml | 4 +- .../cfg_plots/V29/jets_matching.yaml | 44 +++++++++---------- .../cfg_plots/V29/jets_matching_eta.yaml | 24 +++++----- .../cfg_plots/V29/jets_trigger.yaml | 44 +++++++++---------- .../cfg_plots/V29/jets_trigger_fwd.yaml | 12 ++--- .../cfg_plots/V29/met_ht_mht.yaml | 13 +++++- .../cfg_plots/V29/muon_matching.yaml | 8 ++-- .../cfg_plots/V29/photons_matching.yaml | 4 +- .../cfg_plots/V29/photons_trigger.yaml | 4 +- rates/plots/rates_emulator_125x_v29.py | 5 +-- 11 files changed, 87 insertions(+), 79 deletions(-) diff --git a/objectPerformance/cfg_plots/V29/electron_matching.yaml b/objectPerformance/cfg_plots/V29/electron_matching.yaml index 3aa0d2b8..7ca9cf12 100644 --- a/objectPerformance/cfg_plots/V29/electron_matching.yaml +++ b/objectPerformance/cfg_plots/V29/electron_matching.yaml @@ -41,7 +41,7 @@ ElectronsMatchingBarrel: ylabel: "Matching Efficiency (Barrel)" binning: min: 0 - max: 150 + max: 100 step: 3 ElectronsMatchingEndcap: @@ -87,5 +87,5 @@ ElectronsMatchingEndcap: ylabel: "Matching Efficiency (Endcap)" binning: min: 0 - max: 150 + max: 100 step: 3 diff --git a/objectPerformance/cfg_plots/V29/electron_trigger.yaml b/objectPerformance/cfg_plots/V29/electron_trigger.yaml index c843c782..2e615595 100644 --- a/objectPerformance/cfg_plots/V29/electron_trigger.yaml +++ b/objectPerformance/cfg_plots/V29/electron_trigger.yaml @@ -45,7 +45,7 @@ ElectronsTriggerBarrel: ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" binning: min: 0 - max: 150 + max: 100 step: 1.5 ElectronsTriggerEndcap: @@ -95,5 +95,5 @@ ElectronsTriggerEndcap: ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" binning: min: 0 - max: 150 + max: 100 step: 1.5 diff --git a/objectPerformance/cfg_plots/V29/jets_matching.yaml b/objectPerformance/cfg_plots/V29/jets_matching.yaml index 9fb5c078..b979ebdb 100644 --- a/objectPerformance/cfg_plots/V29/jets_matching.yaml +++ b/objectPerformance/cfg_plots/V29/jets_matching.yaml @@ -49,12 +49,12 @@ JetMatchingBarrel: object: - "abs({eta}) < 2.4" test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 2.5" + # caloJet: + # match_dR: 0.3 + # suffix: "Pt" + # label: "Calo Jet" + # cuts: + # - "abs({eta}) < 2.5" phase1PuppiJet: match_dR: 0.3 suffix: "Pt" @@ -77,7 +77,7 @@ JetMatchingBarrel: ylabel: "Trigger Efficiency ( GeV, barrel)" binning: min: 0 - max: 700 + max: 500 step: 10 JetMatchingEndcap: @@ -93,12 +93,12 @@ JetMatchingEndcap: object: - "abs({eta}) < 2.4" test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" + # caloJet: + # match_dR: 0.3 + # suffix: "Pt" + # label: "Calo Jet" + # cuts: + # - "abs({eta}) < 5" phase1PuppiJet: match_dR: 0.3 suffix: "Pt" @@ -121,8 +121,8 @@ JetMatchingEndcap: ylabel: "Trigger Efficiency ( GeV, endcap)" binning: min: 0 - max: 900 - step: 20 + max: 500 + step: 10 JetMatchingForward: sample: TT @@ -137,12 +137,12 @@ JetMatchingForward: object: - "abs({eta}) < 5" test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" + # caloJet: + # match_dR: 0.3 + # suffix: "Pt" + # label: "Calo Jet" + # cuts: + # - "abs({eta}) < 5" phase1PuppiJet: match_dR: 0.3 suffix: "Pt" @@ -159,6 +159,6 @@ JetMatchingForward: ylabel: "Trigger Efficiency ( GeV, forward)" binning: min: 0 - max: 700 + max: 500 step: 10 diff --git a/objectPerformance/cfg_plots/V29/jets_matching_eta.yaml b/objectPerformance/cfg_plots/V29/jets_matching_eta.yaml index 5256f4d2..a0bf6e5d 100644 --- a/objectPerformance/cfg_plots/V29/jets_matching_eta.yaml +++ b/objectPerformance/cfg_plots/V29/jets_matching_eta.yaml @@ -12,12 +12,12 @@ JetMatching_Eta_Pt40To100: object: - "abs({eta}) < 5" test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" + # caloJet: + # match_dR: 0.3 + # suffix: "Eta" + # label: "Calo Jet" + # cuts: + # - "abs({eta}) < 5" phase1PuppiJet: match_dR: 0.3 suffix: "Eta" @@ -56,12 +56,12 @@ JetMatching_Eta_Pt100ToInf: object: - "abs({eta}) < 5" test_objects: - caloJet: - match_dR: 0.3 - suffix: "Eta" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" + # caloJet: + # match_dR: 0.3 + # suffix: "Eta" + # label: "Calo Jet" + # cuts: + # - "abs({eta}) < 5" phase1PuppiJet: match_dR: 0.3 suffix: "Eta" diff --git a/objectPerformance/cfg_plots/V29/jets_trigger.yaml b/objectPerformance/cfg_plots/V29/jets_trigger.yaml index 543e34b7..73bdfb45 100644 --- a/objectPerformance/cfg_plots/V29/jets_trigger.yaml +++ b/objectPerformance/cfg_plots/V29/jets_trigger.yaml @@ -11,12 +11,12 @@ JetTurnonBarrel: object: - "abs({eta}) < 2.4" test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 2.5" + # caloJet: + # match_dR: 0.3 + # suffix: "Pt" + # label: "Calo Jet" + # cuts: + # - "abs({eta}) < 2.5" phase1PuppiJet: match_dR: 0.3 suffix: "Pt" @@ -43,7 +43,7 @@ JetTurnonBarrel: ylabel: "Trigger Efficiency ( GeV, barrel)" binning: min: 0 - max: 700 + max: 500 step: 10 JetTurnonEndcap: @@ -59,12 +59,12 @@ JetTurnonEndcap: object: - "abs({eta}) < 2.4" test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" + # caloJet: + # match_dR: 0.3 + # suffix: "Pt" + # label: "Calo Jet" + # cuts: + # - "abs({eta}) < 5" phase1PuppiJet: match_dR: 0.3 suffix: "Pt" @@ -91,8 +91,8 @@ JetTurnonEndcap: ylabel: "Trigger Efficiency ( GeV, endcap)" binning: min: 0 - max: 900 - step: 20 + max: 500 + step: 10 JetTurnonForward: sample: TT @@ -107,12 +107,12 @@ JetTurnonForward: object: - "abs({eta}) < 5" test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 5" + # caloJet: + # match_dR: 0.3 + # suffix: "Pt" + # label: "Calo Jet" + # cuts: + # - "abs({eta}) < 5" phase1PuppiJet: match_dR: 0.3 suffix: "Pt" @@ -133,5 +133,5 @@ JetTurnonForward: ylabel: "Trigger Efficiency ( GeV, forward)" binning: min: 0 - max: 700 + max: 500 step: 10 diff --git a/objectPerformance/cfg_plots/V29/jets_trigger_fwd.yaml b/objectPerformance/cfg_plots/V29/jets_trigger_fwd.yaml index d60e6f41..bfc26425 100644 --- a/objectPerformance/cfg_plots/V29/jets_trigger_fwd.yaml +++ b/objectPerformance/cfg_plots/V29/jets_trigger_fwd.yaml @@ -11,12 +11,12 @@ JetTurnonFwd_3p7to7: object: - "abs({eta}) < 7" test_objects: - caloJet: - match_dR: 0.3 - suffix: "Pt" - label: "Calo Jet" - cuts: - - "abs({eta}) < 7" + # caloJet: + # match_dR: 0.3 + # suffix: "Pt" + # label: "Calo Jet" + # cuts: + # - "abs({eta}) < 7" phase1PuppiJet: match_dR: 0.3 suffix: "Pt" diff --git a/objectPerformance/cfg_plots/V29/met_ht_mht.yaml b/objectPerformance/cfg_plots/V29/met_ht_mht.yaml index c5090d22..a634e72d 100644 --- a/objectPerformance/cfg_plots/V29/met_ht_mht.yaml +++ b/objectPerformance/cfg_plots/V29/met_ht_mht.yaml @@ -16,7 +16,7 @@ HT: label: "Tracker HT" phase1PuppiHT: suffix: "" - label: "Phase1 Puppi HT" + label: "Histogrammed Puppi HT" seededConePuppiHT: suffix: "" label: "SeededCone HT" @@ -47,6 +47,12 @@ MHT30: trackerMHT: suffix: "" label: "Tracker MHT" + phase1PuppiMHT: + suffix: "et" + label: "Histogrammed Puppi MHT" + seededConePuppiMHT: + suffix: "et" + label: "SeededCone MHT" thresholds: [70, 150] scalings: method: "naive" @@ -71,9 +77,12 @@ MHT15: - "{pt} > 15" trafo: "MHT" test_objects: + trackerMHT: + suffix: "" + label: "Tracker MHT" phase1PuppiMHT: suffix: "et" - label: "Phase1 Puppi MHT" + label: "Histogrammed Puppi MHT" seededConePuppiMHT: suffix: "et" label: "SeededCone MHT" diff --git a/objectPerformance/cfg_plots/V29/muon_matching.yaml b/objectPerformance/cfg_plots/V29/muon_matching.yaml index 2ae1039c..3a70ec76 100644 --- a/objectPerformance/cfg_plots/V29/muon_matching.yaml +++ b/objectPerformance/cfg_plots/V29/muon_matching.yaml @@ -28,7 +28,7 @@ MuonsMatchingBarrel: ylabel: "Matching Efficiency (barrel)" binning: min: 0 - max: 150 + max: 100 step: 3 MuonsMatchingOverlap: @@ -64,7 +64,7 @@ MuonsMatchingOverlap: ylabel: "Matching Efficiency (overlap)" binning: min: 0 - max: 150 + max: 100 step: 3 MuonsMatchingEndcap: @@ -100,5 +100,5 @@ MuonsMatchingEndcap: ylabel: "Matching Efficiency (endcap)" binning: min: 0 - max: 150 - step: 3 \ No newline at end of file + max: 100 + step: 3 diff --git a/objectPerformance/cfg_plots/V29/photons_matching.yaml b/objectPerformance/cfg_plots/V29/photons_matching.yaml index 16e4fd66..2fa9e3bc 100644 --- a/objectPerformance/cfg_plots/V29/photons_matching.yaml +++ b/objectPerformance/cfg_plots/V29/photons_matching.yaml @@ -41,7 +41,7 @@ PhotonsMatching_Barrel: ylabel: "Matching Efficiency (Barrel)" binning: min: 0 - max: 150 + max: 100 step: 3 PhotonsMatching_Endcap: @@ -88,5 +88,5 @@ PhotonsMatching_Endcap: ylabel: "Matching Efficiency (Endcap)" binning: min: 0 - max: 150 + max: 100 step: 3 diff --git a/objectPerformance/cfg_plots/V29/photons_trigger.yaml b/objectPerformance/cfg_plots/V29/photons_trigger.yaml index 30111dbd..65cc3b0e 100644 --- a/objectPerformance/cfg_plots/V29/photons_trigger.yaml +++ b/objectPerformance/cfg_plots/V29/photons_trigger.yaml @@ -45,7 +45,7 @@ PhotonsTrigger_Barrel: ylabel: "Trigger Efficiency (barrel, L1 $p_T > $ GeV)" binning: min: 0 - max: 150 + max: 100 step: 1.5 PhotonsTrigger_Endcap: @@ -96,5 +96,5 @@ PhotonsTrigger_Endcap: ylabel: "Trigger Efficiency (endcap, L1 $p_T > $ GeV)" binning: min: 0 - max: 150 + max: 100 step: 1.5 diff --git a/rates/plots/rates_emulator_125x_v29.py b/rates/plots/rates_emulator_125x_v29.py index e2a2146c..b63c4ceb 100644 --- a/rates/plots/rates_emulator_125x_v29.py +++ b/rates/plots/rates_emulator_125x_v29.py @@ -290,10 +290,9 @@ def NNTauLooseOfflineEtCutEndcap(offline) : return (offline-21.639)/1.551 #-------------muons-------------- if (obj=='gmtTkMuon'): - offlinescalingcut = "( ( abs(gmtTkMuonEta[])<0.83 && gmtTkMuonPt[]>("+str(gmtTkMuonOfflineEtCutBarrel(x))+")) || (abs(gmtTkMuonEta[])>0.83 && abs(gmtTkMuonEta[])<1.24 && gmtTkMuonPt[]>("+str(gmtTkMuonOfflineEtCutOverlap(x))+")) || (abs(gmtTkMuonEta[])>1.24 && abs(gmtTkMuonEta[])<2.4 && gmtTkMuonPt[]>("+str(gmtTkMuonOfflineEtCutEndcap(x))+")) )" + offlinescalingcut = "(((gmtTkMuonPt[] < 8 && gmtTkMuonQual > 0) || (gmtTkMuonPt[] > 8)) && ( ( abs(gmtTkMuonEta[])<0.83 && gmtTkMuonPt[]>("+str(gmtTkMuonOfflineEtCutBarrel(x))+")) || (abs(gmtTkMuonEta[])>0.83 && abs(gmtTkMuonEta[])<1.24 && gmtTkMuonPt[]>("+str(gmtTkMuonOfflineEtCutOverlap(x))+")) || (abs(gmtTkMuonEta[])>1.24 && abs(gmtTkMuonEta[])<2.4 && gmtTkMuonPt[]>("+str(gmtTkMuonOfflineEtCutEndcap(x))+")) ))" offlinecut = "Sum$( "+offlinescalingcut+" && abs(gmtTkMuonEta[])<2.4)>0" - onlinecut = "Sum$( gmtTkMuonPt[]>"+str(x)+" && gmtTkMuonBx[]==0 && abs(gmtTkMuonEta[])<2.4)>0" - + onlinecut = "Sum$(((gmtTkMuonPt[] < 8 && gmtTkMuonQual > 0) || (gmtTkMuonPt[] > 8)) && ((gmtTkMuonPt[]>"+str(x)+" && gmtTkMuonBx[]==0 && abs(gmtTkMuonEta[])<2.4)))>0" if (obj=='gmtMuon'): offlinescalingcut = "( ( abs(gmtMuonEta[])<0.83 && gmtMuonPt[]>("+str(gmtMuonOfflineEtCutBarrel(x))+")) || (abs(gmtMuonEta[])>0.83 && abs(gmtMuonEta[])<1.24 && gmtMuonQual[]>=12 && gmtMuonPt[]>("+str(gmtMuonOfflineEtCutOverlap(x))+")) || (abs(gmtMuonEta[])>1.24 && abs(gmtMuonEta[])<2.4 && gmtMuonPt[]>("+str(gmtMuonOfflineEtCutEndcap(x))+")) )"