Skip to content

Commit

Permalink
cleanup and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhundhausen committed Oct 22, 2024
1 parent 9cc15a8 commit b134ee3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 20 deletions.
2 changes: 1 addition & 1 deletion configs/V44nano/object_performance/electron_iso.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ElectronsIsolation_Barrel:
match_test_to_ref: True
iso_vs_efficiency: True
reference_object:
GenPart:reference_electron:barrel: "pt"
GenPart:reference_electron_barrel: "pt"
test_objects:
L1tkElectron:NoIsoForIso: "relIso"
xlabel: "Isolation"
Expand Down
7 changes: 0 additions & 7 deletions configs/V44nano/object_performance/electron_trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ ElectronsTriggerEndcap:
match_test_to_ref: True
reference_object:
GenPart:reference_electron_trigger_endcap: "pt"
cuts:
event:
- "(({statusFlags}>>7)&1) == 1"
- "abs({pdgId}) == 11"
- "abs({eta}) > 1.5"
object:
- "abs({eta}) < 2.8"
test_objects:
L1EG:default:endcap: "pt"
L1tkElectron:NoIso:endcap: "pt"
Expand Down
11 changes: 11 additions & 0 deletions configs/V44nano/objects/GenPart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ GenPart:
object:
inclusive:
- "abs({eta}) < 2.4"
reference_electron_barrel:
label: "Gen Electron"
cuts:
event:
inclusive:
- "(({statusFlags}>>7)&1) == 1"
- "abs({pdgId}) == 11"
- "abs({eta}) < 1.479"
object:
inclusive:
- "abs({eta}) < 2.4"
reference_electron:
label: "Gen Electron"
cuts:
Expand Down
10 changes: 0 additions & 10 deletions configs/V44nano/objects/muons.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
GenPart:
label: "Gen Muon"
eta_ranges:
inclusive: [0, 7]
ids:
gen_electron_default:
cuts:
inclusive:
- "({statusFlags}>>7)&1 == 1"

L1gmtTkMuon:
label: "GMT TkMuon"
match_dR: 0.1
Expand Down
1 change: 0 additions & 1 deletion menu_tools/object_performance/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ def _save_json(self, file_name):

xbins = self.turnon_collection.bins
xbins = 0.5 * (xbins[1:] + xbins[:-1])
print(len(xbins))

if self.cfg.iso_vs_eff_plot:
efficiency = self._get_iso_vs_eff_hist(gen_hist_trig[0])
Expand Down
2 changes: 1 addition & 1 deletion menu_tools/utils/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def trafo(self) -> Optional[str]:
try:
return self._object_params["trafo"]
except KeyError:
print("No transformation defined in reference object")
# No transformation defined in reference object `self.object_key`
return None

def _get_cuts(self, event_or_object: str) -> dict[str, list[str]]:
Expand Down

0 comments on commit b134ee3

Please sign in to comment.