Skip to content

Commit

Permalink
small fix to not skip all plots when scalings are missing for one obj…
Browse files Browse the repository at this point in the history
…ect; implement changes to test config
  • Loading branch information
danielhundhausen committed Jan 30, 2024
1 parent c49b978 commit c9b3b6b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 22 deletions.
55 changes: 35 additions & 20 deletions configs/V29/rate_plots/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions menu_tools/rate_plots/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c9b3b6b

Please sign in to comment.