Skip to content

Commit

Permalink
[V29] Include Quality cut in gmtTkmuon rates and fix configs for perf…
Browse files Browse the repository at this point in the history
…ormance 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
  • Loading branch information
bonanomi authored Apr 18, 2023
1 parent 80c419e commit a1bf9b7
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 79 deletions.
4 changes: 2 additions & 2 deletions objectPerformance/cfg_plots/V29/electron_matching.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ElectronsMatchingBarrel:
ylabel: "Matching Efficiency (Barrel)"
binning:
min: 0
max: 150
max: 100
step: 3

ElectronsMatchingEndcap:
Expand Down Expand Up @@ -87,5 +87,5 @@ ElectronsMatchingEndcap:
ylabel: "Matching Efficiency (Endcap)"
binning:
min: 0
max: 150
max: 100
step: 3
4 changes: 2 additions & 2 deletions objectPerformance/cfg_plots/V29/electron_trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ElectronsTriggerBarrel:
ylabel: "Trigger Efficiency (barrel, L1 $p_T > <threshold>$ GeV)"
binning:
min: 0
max: 150
max: 100
step: 1.5

ElectronsTriggerEndcap:
Expand Down Expand Up @@ -95,5 +95,5 @@ ElectronsTriggerEndcap:
ylabel: "Trigger Efficiency (endcap, L1 $p_T > <threshold>$ GeV)"
binning:
min: 0
max: 150
max: 100
step: 1.5
44 changes: 22 additions & 22 deletions objectPerformance/cfg_plots/V29/jets_matching.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -77,7 +77,7 @@ JetMatchingBarrel:
ylabel: "Trigger Efficiency (<threshold> GeV, barrel)"
binning:
min: 0
max: 700
max: 500
step: 10

JetMatchingEndcap:
Expand All @@ -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"
Expand All @@ -121,8 +121,8 @@ JetMatchingEndcap:
ylabel: "Trigger Efficiency (<threshold> GeV, endcap)"
binning:
min: 0
max: 900
step: 20
max: 500
step: 10

JetMatchingForward:
sample: TT
Expand All @@ -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"
Expand All @@ -159,6 +159,6 @@ JetMatchingForward:
ylabel: "Trigger Efficiency (<threshold> GeV, forward)"
binning:
min: 0
max: 700
max: 500
step: 10

24 changes: 12 additions & 12 deletions objectPerformance/cfg_plots/V29/jets_matching_eta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
44 changes: 22 additions & 22 deletions objectPerformance/cfg_plots/V29/jets_trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -43,7 +43,7 @@ JetTurnonBarrel:
ylabel: "Trigger Efficiency (<threshold> GeV, barrel)"
binning:
min: 0
max: 700
max: 500
step: 10

JetTurnonEndcap:
Expand All @@ -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"
Expand All @@ -91,8 +91,8 @@ JetTurnonEndcap:
ylabel: "Trigger Efficiency (<threshold> GeV, endcap)"
binning:
min: 0
max: 900
step: 20
max: 500
step: 10

JetTurnonForward:
sample: TT
Expand All @@ -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"
Expand All @@ -133,5 +133,5 @@ JetTurnonForward:
ylabel: "Trigger Efficiency (<threshold> GeV, forward)"
binning:
min: 0
max: 700
max: 500
step: 10
12 changes: 6 additions & 6 deletions objectPerformance/cfg_plots/V29/jets_trigger_fwd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
13 changes: 11 additions & 2 deletions objectPerformance/cfg_plots/V29/met_ht_mht.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ HT:
label: "Tracker HT"
phase1PuppiHT:
suffix: ""
label: "Phase1 Puppi HT"
label: "Histogrammed Puppi HT"
seededConePuppiHT:
suffix: ""
label: "SeededCone HT"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions objectPerformance/cfg_plots/V29/muon_matching.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ MuonsMatchingBarrel:
ylabel: "Matching Efficiency (barrel)"
binning:
min: 0
max: 150
max: 100
step: 3

MuonsMatchingOverlap:
Expand Down Expand Up @@ -64,7 +64,7 @@ MuonsMatchingOverlap:
ylabel: "Matching Efficiency (overlap)"
binning:
min: 0
max: 150
max: 100
step: 3

MuonsMatchingEndcap:
Expand Down Expand Up @@ -100,5 +100,5 @@ MuonsMatchingEndcap:
ylabel: "Matching Efficiency (endcap)"
binning:
min: 0
max: 150
step: 3
max: 100
step: 3
4 changes: 2 additions & 2 deletions objectPerformance/cfg_plots/V29/photons_matching.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ PhotonsMatching_Barrel:
ylabel: "Matching Efficiency (Barrel)"
binning:
min: 0
max: 150
max: 100
step: 3

PhotonsMatching_Endcap:
Expand Down Expand Up @@ -88,5 +88,5 @@ PhotonsMatching_Endcap:
ylabel: "Matching Efficiency (Endcap)"
binning:
min: 0
max: 150
max: 100
step: 3
4 changes: 2 additions & 2 deletions objectPerformance/cfg_plots/V29/photons_trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ PhotonsTrigger_Barrel:
ylabel: "Trigger Efficiency (barrel, L1 $p_T > <threshold>$ GeV)"
binning:
min: 0
max: 150
max: 100
step: 1.5

PhotonsTrigger_Endcap:
Expand Down Expand Up @@ -96,5 +96,5 @@ PhotonsTrigger_Endcap:
ylabel: "Trigger Efficiency (endcap, L1 $p_T > <threshold>$ GeV)"
binning:
min: 0
max: 150
max: 100
step: 1.5
5 changes: 2 additions & 3 deletions rates/plots/rates_emulator_125x_v29.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))+")) )"
Expand Down

0 comments on commit a1bf9b7

Please sign in to comment.