Quellcode durchsuchen

More misc updates

Caleb Fangmeier vor 6 Jahren
Ursprung
Commit
5230cf62d7

BIN
docs/presentations/2018_03_16/main.pdf


+ 15 - 20
docs/presentations/2018_03_16/main.tex

@@ -128,21 +128,17 @@
   \end{columns}
 \end{frame}
 
-\begin{frame}{Kinematic Distributions}
-  \begin{columns}
-    \begin{column}{0.5\textwidth}
-      \begin{figure}
-        \includegraphics[width=\textwidth]{../common/figures/tracking_efficiency_hoe.png}
-      \end{figure}
-      \centering{Tracking Efficiency}
-    \end{column}
-    \begin{column}{0.5\textwidth}
-      \begin{figure}
-        \includegraphics[width=\textwidth]{../common/figures/tracking_purity_hoe.png}
-      \end{figure}
-      \centering{Tracking Purity}
-    \end{column}
-  \end{columns}
+\begin{frame}{Kinematic Distributions \-- Efficiency}
+  \begin{figure}
+    \includegraphics[width=0.65\textwidth]{../common/figures/tracking_efficiency_hoe.png}
+  \end{figure}
+\end{frame}
+
+\begin{frame}{Kinematic Distributions \-- Purity}
+  \begin{figure}
+    \includegraphics[width=0.65\textwidth]{../common/figures/tracking_purity_hoe.png}
+  \end{figure}
+  \centering{ \textbf{wide} and \textbf{old-seeding} are comparable across all kinematic ranges }
 \end{frame}
 
 \begin{frame}{Seed Counts}
@@ -164,11 +160,11 @@
   \end{columns}
 \end{frame}
 
-\begin{frame}{Outlook}
-  % \vspace{0.4in}
+\begin{frame}{Conclusions \& Outlook}
   \begin{itemize}
-    \item \texttt{NHit} seeding can match (and perhaps even slightly improve upon) the old pair-match seeding.
-    \item It can do this while producing far fewer candidate seeds.
+    \item The HLT \texttt{NHit} settings are more restrictive than the current \textbf{offline}/\textbf{old-seeding} ones
+    \item Opening them up to the \textbf{wide} settings matches current \textbf{offline} performance.
+    \item \texttt{NHit} seeding can match performance while producing far fewer candidate seeds.
   \end{itemize}
   \hrule
   \begin{itemize}
@@ -184,7 +180,6 @@
       \item Are there other ideas for cross-checks to be done before proceeding further?
     \end{itemize}
   \end{itemize}
-  % \vspace{1.5in}
 \end{frame}
 
 \appendix

+ 2 - 0
plotting/.gitignore

@@ -1,2 +1,4 @@
 .idea/
 output/
+env/
+seeding_studies*/

Datei-Diff unterdrückt, da er zu groß ist
+ 319 - 650
plotting/eff_plots.py


+ 0 - 1
plotting/filval-python

@@ -1 +0,0 @@
-Subproject commit 14749a106da96a39d35c923ae91a7c5a957794d9

+ 34 - 35
plotting/plots.py

@@ -3,12 +3,11 @@ import sys
 
 import matplotlib.pyplot as plt
 
-from filval.result_set import ResultSet
-from filval.histogram_utils import hist, hist2d, hist_slice, hist_add
-from filval.plotter import (decl_plot, save_plots, hist_plot, hist2d_plot, Plot)
+from uproot import open as root_open
+from matplotboard import decl_fig, render, generate_report
 
 
-@decl_plot
+@decl_fig
 def plot_residual(rs, var, layer, hit, projection=None, display_layer=True):
     r'''
     Plots of $\Delta \phi$, $\Delta z$, or $\Delta r$ (vs $\eta$) between RecHit
@@ -45,7 +44,7 @@ def plot_residual(rs, var, layer, hit, projection=None, display_layer=True):
     #              transform=plt.gca().transAxes)
 
 
-@decl_plot
+@decl_fig
 def plot_residuals_v_ladder(rs, var, layer):
     even, odd = {('phi', 'B1'): (rs.dphi_v_eta_first_hits_in_B1_even_ladder, rs.dphi_v_eta_first_hits_in_B1_odd_ladder),
                  ('phi', 'B2'): (rs.dphi_v_eta_first_hits_in_B2_even_ladder, rs.dphi_v_eta_first_hits_in_B2_odd_ladder),
@@ -78,7 +77,7 @@ def plot_residuals_v_ladder(rs, var, layer):
     plt.legend()
 
 
-@decl_plot
+@decl_fig
 def sc_extrapolation_first(rs, var, layer, hit, even_odd, log=False, norm=None, cut=None, display_layer=True):
     ''' Raphael's plots '''
 
@@ -145,33 +144,33 @@ def sc_extrapolation_first(rs, var, layer, hit, even_odd, log=False, norm=None,
     #              transform=plt.gca().transAxes)
 
 
-def generate_dashboard(plots):
-    from jinja2 import Environment, PackageLoader, select_autoescape
-    from os.path import join
-    from urllib.parse import quote
-
-    env = Environment(
-        loader=PackageLoader('plots', 'templates'),
-        autoescape=select_autoescape(['htm', 'html', 'xml']),
-    )
-    env.globals.update({'quote': quote,
-                        'enumerate': enumerate,
-                        'zip': zip,
-                        })
-
-    def render_to_file(template_name, **kwargs):
-        with open(join('output', template_name), 'w') as tempout:
-            template = env.get_template(template_name)
-            tempout.write(template.render(**kwargs))
-
-    def get_by_n(l, n=2):
-        l = list(l)
-        while l:
-            yield l[:n]
-            l = l[n:]
-
-    render_to_file('dashboard.htm', plots=get_by_n(plots, 3),
-                   outdir="figures/")
+# def generate_dashboard(plots):
+#     from jinja2 import Environment, PackageLoader, select_autoescape
+#     from os.path import join
+#     from urllib.parse import quote
+#
+#     env = Environment(
+#         loader=PackageLoader('plots', 'templates'),
+#         autoescape=select_autoescape(['htm', 'html', 'xml']),
+#     )
+#     env.globals.update({'quote': quote,
+#                         'enumerate': enumerate,
+#                         'zip': zip,
+#                         })
+#
+#     def render_to_file(template_name, **kwargs):
+#         with open(join('output', template_name), 'w') as tempout:
+#             template = env.get_template(template_name)
+#             tempout.write(template.render(**kwargs))
+#
+#     def get_by_n(l, n=2):
+#         l = list(l)
+#         while l:
+#             yield l[:n]
+#             l = l[n:]
+#
+#     render_to_file('dashboard.htm', plots=get_by_n(plots, 3),
+#                    outdir="figures/")
 
 
 if __name__ == '__main__':
@@ -292,5 +291,5 @@ if __name__ == '__main__':
 
     # Finally, render and save the plots and generate the html+bootstrap
     # dashboard to view them
-    save_plots(plots)
-    generate_dashboard(plots)
+    render(plots)
+    generate_report(plots)

+ 21 - 10
plotting/publish.py

@@ -1,18 +1,29 @@
 #!/usr/bin/env python
 from datetime import datetime as dt
 from subprocess import run
-from glob import glob
+# from glob import glob
 
-dir_name = f'seeding_studies_{dt.strftime(dt.now(), "%Y_%m_%d_%H")}'
-remote = 'caleb@fangmeier.tech:/var/www/eg/'
-run(('rm', '-rf', dir_name))
-run(('mkdir', '-p', dir_name+'/output'))
-for gdir in glob('../hists*'):
-    run(('cp', '-r', gdir, dir_name))
-run(('cp', '-r', 'output', dir_name))
+# dir_name = f'seeding_studies_{dt.strftime(dt.now(), "%Y_%m_%d_%H")}'
+# remote = 'caleb@fangmeier.tech:/var/www/eg/'
+# run(('rm', '-rf', dir_name))
+# run(('mkdir', '-p', dir_name+'/output'))
+# for gdir in glob('../hists*'):
+#     run(('cp', '-r', gdir, dir_name))
+# run(('cp', '-r', 'output', dir_name))
+#
+# run(('scp', '-r', dir_name, remote))
+# print(f'Data available at https://eg.fangmeier.tech/{dir_name}/')
 
-run(('scp', '-r', dir_name, remote))
-print(f'Data available at https://eg.fangmeier.tech/{dir_name}/')
 
 
+data_dir = "../hists/"
+par_dir = "dashboard"
+dir_name = f'{par_dir}_{dt.strftime(dt.now(), "%Y_%m_%d_%H")}'
+remote = f'caleb@fangmeier.tech:/var/www/eg/'
+run(('rm', '-rf', dir_name))
+# run(('mkdir', '-p', dir_name))
+run(('cp', '-r', par_dir, dir_name))
+run(('cp', '-r', data_dir, dir_name))
 
+run(('scp', '-r', dir_name, remote))
+print(f'Data available at https://eg.fangmeier.tech/{dir_name}/')

+ 5 - 0
plotting/requirements.txt

@@ -0,0 +1,5 @@
+matplotlib
+ipython
+uproot
+matplotboard
+-e git+https://github.com/cfangmeier/matplottery.git#egg=matplottery

+ 0 - 0
plotting/simtrack_viz.py