From c9b3b6b46a3f2e9281c45af9ebf9ba79314efb7a Mon Sep 17 00:00:00 2001 From: Daniel Hundhausen Date: Tue, 30 Jan 2024 16:48:43 +0100 Subject: [PATCH] small fix to not skip all plots when scalings are missing for one object; implement changes to test config --- configs/V29/rate_plots/test.yaml | 55 ++++++++++++++++++++------------ menu_tools/rate_plots/plotter.py | 4 +-- 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/configs/V29/rate_plots/test.yaml b/configs/V29/rate_plots/test.yaml index a40d5152..11252f4f 100644 --- a/configs/V29/rate_plots/test.yaml +++ b/configs/V29/rate_plots/test.yaml @@ -6,9 +6,9 @@ JetDefaultRates: - seededConePuppiJet:default # - trackerJet:default binning: - min: 0 - max: 100 - step: 10 + min: 40 + max: 420 + step: 20 ElectronDefaultRates: sample: MinBias @@ -17,39 +17,54 @@ ElectronDefaultRates: - EG:default - tkElectron:NoIso - tkElectron:Iso + - tkPhoton:Iso binning: - min: 0 - max: 100 - step: 10 + min: 10 + max: 97 + step: 30 -MuonRatesBarrel: +EGRates: sample: MinBias version: V29 test_objects: - # - gmtMuon:barrel - - gmtTkMuon:barrel + - EG:default + - tkElectron:NoIso + - tkElectron:Iso + - tkPhoton:Iso binning: - min: 0 - max: 100 - step: 10 + min: 10 + max: 97 + step: 30 -MuonRatesOverlap: +MuonRates: sample: MinBias version: V29 test_objects: - # - gmtMuon:overlap - - gmtTkMuon:overlap + # - gmtMuon:default + # - gmtMuon:oldRateID + - gmtTkMuon:default binning: min: 0 - max: 100 - step: 10 + max: 75 + step: 3 + +TauRates: + sample: MinBias + version: V29 + test_objects: + - nnTau:default + - caloTau:default + binning: + min: 10 + max: 155 + step: 5 -MuonRatesEndcap: +MuonRates: sample: MinBias version: V29 test_objects: - # - gmtMuon:endcap - - gmtTkMuon:endcap + # - gmtMuon:default + - gmtTkMuon:default binning: min: 0 max: 100 diff --git a/menu_tools/rate_plots/plotter.py b/menu_tools/rate_plots/plotter.py index 05902b50..2b7d6cae 100644 --- a/menu_tools/rate_plots/plotter.py +++ b/menu_tools/rate_plots/plotter.py @@ -281,9 +281,9 @@ def run(self, apply_offline_conversion: bool = False) -> None: apply_offline_conversion, ) except UserWarning: - # Return without creating a plot if a warning was raised. + # Continue without creating a plot if a warning was raised. # This applies to no scalings being found for an object. - return None + continue # Plot Rate vs. Threshold after all data has been aggregated plotter = RatePlotter(plot_config, rate_plot_data, apply_offline_conversion)