Explorar o código

Small changes to purity plots

Caleb Fangmeier %!s(int64=6) %!d(string=hai) anos
pai
achega
87c2674baf
Modificáronse 1 ficheiros con 7 adicións e 5 borrados
  1. 7 5
      yields.py

+ 7 - 5
yields.py

@@ -134,9 +134,9 @@ def plot_event_obs(rss, dataset):
 
 
 @decl_plot
-def plot_fake_taus(rss):
+def plot_tau_purity(rss):
     _, ((ax_ft, ax_ttw), (ax_ttz, ax_tth)) = plt.subplots(2, 2)
-    ft, ttw, ttz, tth = list(map(lambda rs: hist(rs.tau_fakes_v_pt), rss))
+    ft, ttw, ttz, tth = list(map(lambda rs: hist(rs.tau_purity_v_pt), rss))
 
     def _plot(ax, dataset):
         plt.sca(ax)
@@ -145,6 +145,8 @@ def plot_fake_taus(rss):
              'TTZ': ttz,
              'TTH': tth}[dataset]
         hist_plot(h, stats=False, label=dataset)
+        plt.text(200, 0.05, dataset)
+        plt.xlabel(r"$P_T$(GeV)")
 
     _plot(ax_ft, 'TTTT')
     _plot(ax_ttw, 'TTW')
@@ -185,7 +187,7 @@ if __name__ == '__main__':
     ttz_event_obs = (plot_event_obs, (rss, 'TTZ'), {})
     tth_event_obs = (plot_event_obs, (rss, 'TTH'), {})
 
-    fake_taus = (plot_fake_taus, (rss,), {})
+    tau_purity = (plot_tau_purity, (rss,), {})
 
     # Now assemble the plots into figures.
     plots = [
@@ -219,8 +221,8 @@ if __name__ == '__main__':
              'TTZ - Event Observables'),
         Plot([[tth_event_obs]],
              'TTH - Event Observables'),
-        Plot([[fake_taus]],
-             'Hadronic Tau fake-rate'),
+        Plot([[tau_purity]],
+             'Tau Purity'),
     ]
 
     # Finally, render and save the plots and generate the html+bootstrap