From ad61d67c340a91abdb24f3ffed36a5eb0633ca5d Mon Sep 17 00:00:00 2001 From: Artur Lobanov Date: Sun, 3 Mar 2024 17:21:48 +0100 Subject: [PATCH] Update v33 configs with new objects etc --- configs/V31/rate_plots/eg.yaml | 12 +++ configs/V31/rate_plots/ht.yaml | 11 +++ configs/V31/rate_plots/jets.yaml | 27 +++++++ configs/V31/rate_plots/met.yaml | 10 +++ configs/V31/rate_plots/muons.yaml | 22 ++++++ configs/V31/rate_plots/taus.yaml | 23 ++++++ configs/V32nano/objects/jets.yaml | 15 +--- configs/V33nano/caching.yaml | 43 +++++++++-- .../object_performance/jets_matching.yaml | 45 +++++++++++ .../object_performance/jets_matching_eta.yaml | 22 ++++++ .../jets_matching_wBTag.yaml | 12 +-- .../object_performance/jets_sc8_trigger.yaml | 77 +++++++++++++++++++ .../object_performance/jets_trigger.yaml | 6 +- configs/V33nano/objects/jets.yaml | 20 +++++ configs/V33nano/rate_plots/eg.yaml | 12 +++ configs/V33nano/rate_plots/ht.yaml | 23 ++++++ configs/V33nano/rate_plots/jets.yaml | 52 +++++++++++++ configs/V33nano/rate_plots/met.yaml | 11 +++ configs/V33nano/rate_plots/muons.yaml | 34 ++++++++ configs/V33nano/rate_plots/taus.yaml | 25 ++++++ menu_tools/rate_plots/plotter.py | 2 +- 21 files changed, 475 insertions(+), 29 deletions(-) create mode 100644 configs/V31/rate_plots/eg.yaml create mode 100644 configs/V31/rate_plots/ht.yaml create mode 100644 configs/V31/rate_plots/jets.yaml create mode 100644 configs/V31/rate_plots/met.yaml create mode 100644 configs/V31/rate_plots/muons.yaml create mode 100644 configs/V31/rate_plots/taus.yaml create mode 100644 configs/V33nano/object_performance/jets_sc8_trigger.yaml create mode 100644 configs/V33nano/rate_plots/eg.yaml create mode 100644 configs/V33nano/rate_plots/ht.yaml create mode 100644 configs/V33nano/rate_plots/jets.yaml create mode 100644 configs/V33nano/rate_plots/met.yaml create mode 100644 configs/V33nano/rate_plots/muons.yaml create mode 100644 configs/V33nano/rate_plots/taus.yaml diff --git a/configs/V31/rate_plots/eg.yaml b/configs/V31/rate_plots/eg.yaml new file mode 100644 index 00000000..0048997d --- /dev/null +++ b/configs/V31/rate_plots/eg.yaml @@ -0,0 +1,12 @@ +EGRates: + sample: MinBias + version: V31 + test_objects: + - EG:default + - tkElectron:NoIso + - tkElectron:Iso + - tkPhoton:Iso + binning: + min: 10 + max: 97 + step: 3 diff --git a/configs/V31/rate_plots/ht.yaml b/configs/V31/rate_plots/ht.yaml new file mode 100644 index 00000000..fb652a7f --- /dev/null +++ b/configs/V31/rate_plots/ht.yaml @@ -0,0 +1,11 @@ +HTRates: + sample: MinBias + version: V31 + test_objects: + - phase1PuppiHT:default + - seededConePuppiHT:default + - trackerHT:default + binning: + min: 50 + max: 975 + step: 25 diff --git a/configs/V31/rate_plots/jets.yaml b/configs/V31/rate_plots/jets.yaml new file mode 100644 index 00000000..0cc482d3 --- /dev/null +++ b/configs/V31/rate_plots/jets.yaml @@ -0,0 +1,27 @@ +JetDefaultRates: + sample: MinBias + version: V31 + test_objects: + - phase1PuppiJet:default + - seededConePuppiJet:default + # - seededConeExtendedPuppiJet:default + - trackerJet:default + # - caloJet:default + binning: + min: 40 + max: 420 + step: 20 + +JetsByRegion: + sample: MinBias + version: V31 + test_objects: + - phase1PuppiJet:default:barrel + - phase1PuppiJet:default:endcap + - seededConePuppiJet:default:barrel + - seededConePuppiJet:default:endcap + binning: + min: 40 + max: 420 + step: 20 + diff --git a/configs/V31/rate_plots/met.yaml b/configs/V31/rate_plots/met.yaml new file mode 100644 index 00000000..a97eda8b --- /dev/null +++ b/configs/V31/rate_plots/met.yaml @@ -0,0 +1,10 @@ +METRates: + sample: MinBias + version: V31 + test_objects: + - puppiMET:default + - trackerMET:default + binning: + min: 50 + max: 500 + step: 25 diff --git a/configs/V31/rate_plots/muons.yaml b/configs/V31/rate_plots/muons.yaml new file mode 100644 index 00000000..515a6d63 --- /dev/null +++ b/configs/V31/rate_plots/muons.yaml @@ -0,0 +1,22 @@ +gmtMuonByRegion: + sample: MinBias + version: V31 + test_objects: + - gmtMuon:default:barrel + - gmtMuon:default:overlap + - gmtMuon:default:endcap + binning: + min: 0 + max: 75 + step: 3 + +MuonRates: + sample: MinBias + version: V31 + test_objects: + - gmtMuon:default + - gmtTkMuon:default + binning: + min: 0 + max: 75 + step: 3 diff --git a/configs/V31/rate_plots/taus.yaml b/configs/V31/rate_plots/taus.yaml new file mode 100644 index 00000000..9d6d90a5 --- /dev/null +++ b/configs/V31/rate_plots/taus.yaml @@ -0,0 +1,23 @@ +TauRates: + sample: MinBias + version: V31 + test_objects: + - nnTau:default + - caloTau:default + binning: + min: 10 + max: 155 + step: 5 + +TauRatesByRegion: + sample: MinBias + version: V31 + test_objects: + - caloTau:default:barrel + - caloTau:default:endcap + - nnTau:default:barrel + - nnTau:default:endcap + binning: + min: 10 + max: 155 + step: 5 diff --git a/configs/V32nano/objects/jets.yaml b/configs/V32nano/objects/jets.yaml index cfa6121f..b16315f7 100644 --- a/configs/V32nano/objects/jets.yaml +++ b/configs/V32nano/objects/jets.yaml @@ -68,17 +68,4 @@ L1puppiJetSC8: default: cuts: inclusive: - - "abs({eta}) < 7" - -# trackerJet: -# match_dR: 0.4 -# label: "Tracker Jet" -# eta_ranges: -# inclusive: [0, 7] -# barrel: [0, 1.5] -# endcap: [1.5, 2.4] -# ids: -# default: -# cuts: -# inclusive: -# - "abs({eta}) < 7" + - "abs({eta}) < 7" \ No newline at end of file diff --git a/configs/V33nano/caching.yaml b/configs/V33nano/caching.yaml index 064fa109..e6af4c77 100644 --- a/configs/V33nano/caching.yaml +++ b/configs/V33nano/caching.yaml @@ -3,10 +3,9 @@ V33nano: ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/14X/v33/GluGluHToGG_M-125_TuneCP5_14TeV-powheg-pythia8/GluGluHToGG_131_200PU_IB1400pre3V1/240221_221354/0000/test_*.root trees_branches: Events: - GenPart: [pt, eta, phi, pdgId, statusFlags] GenPart: [pt, eta, phi, pdgId, statusFlags] L1tkPhoton: "all" - L1tkElectron: "all" + # L1tkElectron: "all" L1EGbarrel: "all" L1EGendcap: "all" DYLL_M50: @@ -14,9 +13,8 @@ V33nano: trees_branches: Events: GenPart: "all" - # GenPart: "all" L1gmtTkMuon: "all" - L1gmtMuon: "all" # aka gmtMuon + L1gmtMuon: "all" L1tkElectron: "all" L1EGbarrel: "all" L1EGendcap: "all" @@ -26,6 +24,7 @@ V33nano: Events: # gen GenJet: [pt, eta, phi, partonFlavour] + GenJetAK8: [pt, eta, phi] GenMET: "all" # sums L1puppiMET: [pt, phi] @@ -49,4 +48,38 @@ V33nano: L1nnPuppiTau: "all" L1hpsTau: "all" L1caloTau: "all" - L1nnCaloTau: "all" \ No newline at end of file + L1nnCaloTau: "all" + MinBias: + ntuple_path: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/14X/v33_fromEmyr/minbias.root + trees_branches: + Events: + ## PV + L1PV: [z0] + ## EG + L1tkPhoton: "all" + L1tkElectron: "all" + L1EGbarrel: "all" + L1EGendcap: "all" + ## MUONS + L1gmtTkMuon: "all" + L1gmtMuon: "all" # aka gmtMuon + ## TAUS + L1nnPuppiTau: "all" + L1hpsTau: "all" + L1caloTau: "all" + L1nnCaloTau: "all" + ## MET/Sums + L1puppiMET: [pt, phi] + L1puppiMLMET: [pt] + L1puppiJetSC4sums: [pt, phi] + L1puppiHistoJetSums: [pt, phi] + # jets + L1puppiJetSC4: [pt, eta, phi] + L1puppiJetSC8: [pt, eta, phi] + L1puppiExtJetSC4: [pt, eta, phi, btagScore] + L1puppiJetHisto: [pt, eta, phi] + L1caloJet: [pt, eta, phi] + ## track-only + L1TrackMET: [pt] + L1TrackHT: [ht, mht] + L1TrackJet: [pt, eta, phi] \ No newline at end of file diff --git a/configs/V33nano/object_performance/jets_matching.yaml b/configs/V33nano/object_performance/jets_matching.yaml index 29aaaa85..6f65cc15 100644 --- a/configs/V33nano/object_performance/jets_matching.yaml +++ b/configs/V33nano/object_performance/jets_matching.yaml @@ -71,3 +71,48 @@ JetMatchingForward: min: 0 max: 500 step: 10 + + +JetMatchingBarrelSC8: + sample: TT + version: V33nano + match_test_to_ref: True + reference_object: + object: "GenJetAK8" + x_arg: "pt" + label: "Gen AK8 Jets" + cuts: + event: + - "abs({eta}) < 1.5" + object: + - "abs({eta}) < 2.4" + test_objects: + L1puppiJetSC8:default:barrel: "pt" + xlabel: "Gen. $p_T$ (GeV)" + ylabel: "Trigger Efficiency ( GeV, barrel)" + binning: + min: 0 + max: 500 + step: 10 + +JetMatchingEndcapSC8: + sample: TT + version: V33nano + match_test_to_ref: True + reference_object: + object: "GenJetAK8" + x_arg: "pt" + label: "Gen AK8 Jets" + cuts: + event: + - "abs({eta}) > 1.5" + object: + - "abs({eta}) < 2.4" + test_objects: + L1puppiJetSC8:default:endcap: "pt" + xlabel: "Gen. $p_T$ (GeV)" + ylabel: "Trigger Efficiency ( GeV, endcap)" + binning: + min: 0 + max: 500 + step: 10 \ No newline at end of file diff --git a/configs/V33nano/object_performance/jets_matching_eta.yaml b/configs/V33nano/object_performance/jets_matching_eta.yaml index 373606cd..88e2a3a5 100644 --- a/configs/V33nano/object_performance/jets_matching_eta.yaml +++ b/configs/V33nano/object_performance/jets_matching_eta.yaml @@ -70,3 +70,25 @@ JetMatching_Eta_Pt100ToInf_extEta: min: -5.5 max: 5.5 step: 0.25 + +JetMatching_Eta_SC8_Pt100ToInf: + sample: TT + version: V33nano + match_test_to_ref: True + reference_object: + object: "GenJetAK8" + x_arg: "eta" + label: "Gen Jets" + cuts: + event: + - "{pt} > 100" + object: + - "abs({eta}) < 5" + test_objects: + L1puppiJetSC8:default: "eta" + xlabel: "Gen. $\\eta$" + ylabel: "Matching Efficiency (>100 GeV)" + binning: + min: -5 + max: 5 + step: 0.25 \ No newline at end of file diff --git a/configs/V33nano/object_performance/jets_matching_wBTag.yaml b/configs/V33nano/object_performance/jets_matching_wBTag.yaml index 24f08996..6c9d52f2 100644 --- a/configs/V33nano/object_performance/jets_matching_wBTag.yaml +++ b/configs/V33nano/object_performance/jets_matching_wBTag.yaml @@ -1,4 +1,4 @@ -JetMatching_Eta_pt40To100_ExtendedVsRegular: +JetMatching_Eta_Pt40To100_ExtendedVsRegular: sample: TT version: V33nano match_test_to_ref: True @@ -22,7 +22,7 @@ JetMatching_Eta_pt40To100_ExtendedVsRegular: max: 5 step: 0.25 -JetMatching_Eta_pt100ToInf_ExtendedVsRegular: +JetMatching_Eta_Pt100ToInf_ExtendedVsRegular: sample: TT version: V33nano match_test_to_ref: True @@ -45,7 +45,7 @@ JetMatching_Eta_pt100ToInf_ExtendedVsRegular: max: 5 step: 0.25 -JetMatching_Eta_pt30ToInf_genBJets: +JetMatching_Eta_Pt30ToInf_genBJets: sample: TT version: V33nano match_test_to_ref: True @@ -68,7 +68,7 @@ JetMatching_Eta_pt30ToInf_genBJets: max: 2.4 step: 0.25 -JetMatching_Eta_pt30ToInf_genNotBJets: +JetMatching_Eta_Pt30ToInf_genNotBJets: sample: TT version: V33nano match_test_to_ref: True @@ -91,7 +91,7 @@ JetMatching_Eta_pt30ToInf_genNotBJets: max: 2.4 step: 0.25 -JetMatching_pt_pt30ToInf_genBJets: +JetMatching_Pt_Pt30ToInf_genBJets: sample: TT version: V33nano match_test_to_ref: True @@ -113,7 +113,7 @@ JetMatching_pt_pt30ToInf_genBJets: max: 200 step: 10 -JetMatching_pt_pt30ToInf_genNotBJets: +JetMatching_Pt_Pt30ToInf_genNotBJets: sample: TT version: V33nano match_test_to_ref: True diff --git a/configs/V33nano/object_performance/jets_sc8_trigger.yaml b/configs/V33nano/object_performance/jets_sc8_trigger.yaml new file mode 100644 index 00000000..abbdf822 --- /dev/null +++ b/configs/V33nano/object_performance/jets_sc8_trigger.yaml @@ -0,0 +1,77 @@ +JetTurnonBarrelSC8: + version: V33nano + sample: TT + match_test_to_ref: True + reference_object: + object: "GenJetAK8" + x_arg: "pt" + label: "Gen Jets" + cuts: + event: + - "abs({eta}) < 1.5" + object: + - "abs({eta}) < 2.4" + test_objects: + L1puppiJetSC8:default:barrel: "pt" + thresholds: [150] + scalings: + method: "naive" + threshold: 0.95 + xlabel: "Gen. $p_T$ (GeV)" + ylabel: "Trigger Efficiency ( GeV, barrel)" + binning: + min: 0 + max: 500 + step: 10 + +JetTurnonEndcapSC8: + version: V33nano + sample: TT + match_test_to_ref: True + reference_object: + object: "GenJetAK8" + x_arg: "pt" + label: "Gen Jets" + cuts: + event: + - "abs({eta}) > 1.5" + object: + - "abs({eta}) < 2.4" + test_objects: + L1puppiJetSC8:default:endcap: "pt" + thresholds: [150] + scalings: + method: "naive" + threshold: 0.95 + xlabel: "Gen. $p_T$ (GeV)" + ylabel: "Trigger Efficiency ( GeV, endcap)" + binning: + min: 0 + max: 500 + step: 10 + +JetTurnonForwardSC8: + version: V33nano + sample: TT + match_test_to_ref: True + reference_object: + object: "GenJetAK8" + x_arg: "pt" + label: "Gen Jets" + cuts: + event: + - "abs({eta}) > 2.4" + object: + - "abs({eta}) < 5" + test_objects: + L1puppiJetSC8:default:forward: "pt" + thresholds: [150] + scalings: + method: "naive" + threshold: 0.95 + xlabel: "Gen. $p_T$ (GeV)" + ylabel: "Trigger Efficiency ( GeV, forward)" + binning: + min: 0 + max: 500 + step: 10 diff --git a/configs/V33nano/object_performance/jets_trigger.yaml b/configs/V33nano/object_performance/jets_trigger.yaml index 69ec7b75..44665ff1 100644 --- a/configs/V33nano/object_performance/jets_trigger.yaml +++ b/configs/V33nano/object_performance/jets_trigger.yaml @@ -14,7 +14,7 @@ JetTurnonBarrel: test_objects: L1puppiJetHisto:default:barrel: "pt" L1puppiJetSC4:default:barrel: "pt" - L1caloJet:default: "pt" + L1caloJet:default:barrel: "pt" L1TrackJet:default:barrel: "pt" thresholds: [50, 100] scalings: @@ -43,7 +43,7 @@ JetTurnonEndcap: test_objects: L1puppiJetHisto:default:endcap: "pt" L1puppiJetSC4:default:endcap: "pt" - L1caloJet:default: "pt" + L1caloJet:default:endcap: "pt" L1TrackJet:default:endcap: "pt" thresholds: [50, 100] scalings: @@ -72,7 +72,7 @@ JetTurnonForward: test_objects: L1puppiJetHisto:default:forward: "pt" L1puppiJetSC4:default:forward: "pt" - L1caloJet:default: "pt" + L1caloJet:default:forward: "pt" thresholds: [50, 100] scalings: method: "naive" diff --git a/configs/V33nano/objects/jets.yaml b/configs/V33nano/objects/jets.yaml index b4fc13a8..0e4882a2 100644 --- a/configs/V33nano/objects/jets.yaml +++ b/configs/V33nano/objects/jets.yaml @@ -3,6 +3,9 @@ L1caloJet: label: "Calo Jet" eta_ranges: inclusive: [0, 7] + barrel: [0, 1.5] + endcap: [1.5, 2.4] + forward: [2.4, 5] cuts: inclusive: - "abs({eta}) < 7" @@ -17,6 +20,9 @@ L1puppiExtJetSC4: label: "Seeded Cone Extended PuppiJet" eta_ranges: inclusive: [0, 7] + barrel: [0, 1.5] + endcap: [1.5, 2.4] + forward: [2.4, 5] ids: default: cuts: @@ -56,6 +62,20 @@ L1puppiJetSC4: inclusive: - "abs({eta}) < 7" +L1puppiJetSC8: + match_dR: 0.35 + label: "Seeded Cone PuppiJet 8" + eta_ranges: + inclusive: [0, 7] + barrel: [0, 1.5] + endcap: [1.5, 2.4] + forward: [2.4, 5] + ids: + default: + cuts: + inclusive: + - "abs({eta}) < 7" + L1TrackJet: match_dR: 0.4 label: "Tracker Jet" diff --git a/configs/V33nano/rate_plots/eg.yaml b/configs/V33nano/rate_plots/eg.yaml new file mode 100644 index 00000000..12f54577 --- /dev/null +++ b/configs/V33nano/rate_plots/eg.yaml @@ -0,0 +1,12 @@ +EGRates: + sample: MinBias + version: V33nano + test_objects: + - L1EG:default + - L1tkElectron:NoIso + - L1tkElectron:Iso + - L1tkPhoton:Iso + binning: + min: 10 + max: 97 + step: 3 diff --git a/configs/V33nano/rate_plots/ht.yaml b/configs/V33nano/rate_plots/ht.yaml new file mode 100644 index 00000000..ac15d4c3 --- /dev/null +++ b/configs/V33nano/rate_plots/ht.yaml @@ -0,0 +1,23 @@ +HTRates: + sample: MinBias + version: V33nano + test_objects: + - L1puppiHistoJetSums:HT + - L1puppiJetSC4sums:HT + - L1TrackHT:HT + binning: + min: 50 + max: 975 + step: 25 + +MHTRates: + sample: MinBias + version: V33nano + test_objects: + - L1puppiHistoJetSums:MHT + - L1puppiJetSC4sums:MHT + - L1TrackHT:MHT + binning: + min: 50 + max: 975 + step: 25 diff --git a/configs/V33nano/rate_plots/jets.yaml b/configs/V33nano/rate_plots/jets.yaml new file mode 100644 index 00000000..1d6880fc --- /dev/null +++ b/configs/V33nano/rate_plots/jets.yaml @@ -0,0 +1,52 @@ +JetDefaultRates: + sample: MinBias + version: V33nano + test_objects: + - L1puppiJetHisto:default + - L1puppiJetSC4:default + - L1caloJet:default + - L1TrackJet:default + binning: + min: 40 + max: 420 + step: 20 + +JetsByRegion: + sample: MinBias + version: V33nano + test_objects: + - L1puppiJetSC4:default:barrel + - L1puppiJetSC4:default:endcap + - L1caloJet:default:barrel + - L1caloJet:default:endcap + - L1TrackJet:default:barrel + - L1TrackJet:default:endcap + binning: + min: 40 + max: 420 + step: 20 + +JetSC8Rates: + sample: MinBias + version: V33nano + test_objects: + - L1puppiJetSC4:default + - L1puppiJetSC8:default + binning: + min: 40 + max: 420 + step: 20 + + +JetSC8Rates_byRegion: + sample: MinBias + version: V33nano + test_objects: + # - L1puppiJetSC4:default + - L1puppiJetSC8:default + - L1puppiJetSC8:default:barrel + - L1puppiJetSC8:default:endcap + binning: + min: 40 + max: 420 + step: 20 \ No newline at end of file diff --git a/configs/V33nano/rate_plots/met.yaml b/configs/V33nano/rate_plots/met.yaml new file mode 100644 index 00000000..c0a58061 --- /dev/null +++ b/configs/V33nano/rate_plots/met.yaml @@ -0,0 +1,11 @@ +METRates: + sample: MinBias + version: V33nano + test_objects: + - L1puppiMET:default + - L1puppiMLMET:default + - L1TrackMET:default + binning: + min: 50 + max: 500 + step: 25 diff --git a/configs/V33nano/rate_plots/muons.yaml b/configs/V33nano/rate_plots/muons.yaml new file mode 100644 index 00000000..7573ef0f --- /dev/null +++ b/configs/V33nano/rate_plots/muons.yaml @@ -0,0 +1,34 @@ +gmtMuonByRegion: + sample: MinBias + version: V33nano + test_objects: + - L1gmtMuon:default:barrel + - L1gmtMuon:default:overlap + - L1gmtMuon:default:endcap + binning: + min: 0 + max: 75 + step: 3 + +gmtTkMuonByRegion: + sample: MinBias + version: V33nano + test_objects: + - L1gmtTkMuon:default:barrel + - L1gmtTkMuon:default:overlap + - L1gmtTkMuon:default:endcap + binning: + min: 0 + max: 75 + step: 3 + +MuonRates: + sample: MinBias + version: V33nano + test_objects: + - L1gmtMuon:default + - L1gmtTkMuon:default + binning: + min: 0 + max: 75 + step: 3 diff --git a/configs/V33nano/rate_plots/taus.yaml b/configs/V33nano/rate_plots/taus.yaml new file mode 100644 index 00000000..1bb5775d --- /dev/null +++ b/configs/V33nano/rate_plots/taus.yaml @@ -0,0 +1,25 @@ +TauRates: + sample: MinBias + version: V33nano + test_objects: + - L1nnPuppiTau:default + - L1hpsTau:default + - L1caloTau:default + - L1nnCaloTau:default + binning: + min: 10 + max: 155 + step: 5 + +TauRatesByRegion: + sample: MinBias + version: V33nano + test_objects: + - L1caloTau:default:barrel + - L1caloTau:default:endcap + - L1nnPuppiTau:default:barrel + - L1nnPuppiTau:default:endcap + binning: + min: 10 + max: 155 + step: 5 diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index 187113db..3b7c65bf 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -68,7 +68,7 @@ def _plot_single_version_rate_curves(self): xvals = list(rate_values.keys()) yvals = list(rate_values.values()) - label = f"{obj_instances[version].plot_label} @ {version}" + label = f"{obj_instances[version].plot_label}" plot_dict[obj_specifier] = { "x_values": xvals,