
% rubber: module pdftex

\documentclass[english,aspectratio=43,8pt]{beamer}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{subcaption}
\usepackage{marvosym}
\usepackage{verbatim}
\usepackage[normalem]{ulem}  % Needed for /sout

\newcommand{\pb}{\si{\pico\barn}}%
\newcommand{\fb}{\si{\femto\barn}}%
\newcommand{\invfb}{\si{\per\femto\barn}}
\newcommand{\GeV}{\si{\giga\electronvolt}}

\hypersetup{colorlinks=true,urlcolor=blue}

\usetheme[]{bjeldbak}

\newcommand{\backupbegin}{%
   \newcounter{finalframe}
   \setcounter{finalframe}{\value{framenumber}}
}
\newcommand{\backupend}{%
   \setcounter{framenumber}{\value{finalframe}}
}

\begin{document}

\title[$e$ Seeding Validation]{Offline Electron Seeding Validation \-- Update}
\author[C. Fangmeier]{\textbf{Caleb Fangmeier} \\ Ilya Kravchenko,  Greg Snow}
\institute[UNL]{University of Nebraska \-- Lincoln}
\date{EGamma Reco/Comm/HLT Meeting | March 16, 2018}

\titlegraphic{%
\begin{figure}
  \includegraphics[width=1in]{CMSlogo.png}\hspace{0.75in}\includegraphics[width=1in]{nebraska-n.png}
\end{figure}
}

\begin{frame}[plain]
  \titlepage%
\end{frame}

\begin{frame}{Introduction}
  \begin{itemize}
    \item Our goal is to study \textbf{seeding} for the \textbf{offline} GSF tracking with the \textbf{new pixel detector}.
    \item Specifically, we want to optimize the new pixel-matching scheme from HLT for use in off-line reconstruction.
    \item This Talk:
      \begin{itemize}
        \item Show corrected performance comparisons between old and new seeding
        \item Show reduction in number of seeds not resulting in GSF tracks
      \end{itemize}
    \item Additional plots are available here \url{https://eg.fangmeier.tech/seeding\_studies\_2018\_03\_08\_17/output/}
  \end{itemize}
\end{frame}


\begin{frame}{N-Hit Electron Seeding}
  \begin{columns}
  \begin{column}{0.5\textwidth}
    {\small
    \begin{enumerate}
      \item Using the beam spot, the SC position, and SC energy, propagate a path through the pixels.
      \item Require the first hit to be within a $\delta\phi$ and $\delta z$ window. ($\delta\phi$ and $\delta R$ for FPIX)
      \item $\delta z$ window for first hit is huge as SC and beam spot positions give very little information about $z$.
      \item Forget the SC position, and propagate a new track based on the vertex and first hit positions, and the SC energy.
      \item Progress one-by-one through the remaining hits in the seed and require each one fit within a specified window around the track.
      \item Quit when all hits are matched, or a hit falls outside the window. No skipping is allowed.
    \end{enumerate}
    }
  \end{column}
  \begin{column}{0.5\textwidth}
    \begin{figure}
      \includegraphics[width=0.9\textwidth]{../common/diagrams/seeding_step2.png}
    \end{figure}
    \begin{figure}
      \includegraphics[width=0.9\textwidth]{../common/diagrams/seeding_step3.png}
    \end{figure}
  \end{column}
  \end{columns}
\end{frame}

\begin{frame}{Previous status-quo}
  \begin{columns}
    \begin{column}{0.45\textwidth}
      {\small
      \begin{itemize}
        \item In a previous presentation\footnotemark, I showed efficiency vs. purity for
          \begin{itemize}
            \item Old pair-match seeding (\texttt{ElectronSeedProducer})
            \item New triplet+ seeding (\texttt{ElectronNHitSeedProducer}) for several choices of matching windows.
          \end{itemize}
          \item Old seeding produced far fewer fake (non-truth matched) seeds at similar efficiency.
          \item Unclear why. Perhaps not optimal matching windows?
      \end{itemize}
    }
    \end{column}
    \begin{column}{0.6\textwidth}
      \begin{figure}
        \includegraphics[width=0.9\textwidth]{../common/figures/tracking_roc_curves_linear_plus_old.png}
      \end{figure}
    \end{column}
  \end{columns}
\footnotetext[1]{\tiny \url{https://indico.cern.ch/event/697074/contributions/2898322/attachments/1602057/2540261/main.pdf}}
\end{frame}

\begin{frame}{$H/E$ Requirement on Super-Clusters}
  \begin{columns}
    \begin{column}{0.45\textwidth}
      {\small
      \begin{itemize}
        \item Investigating the cause of this revealed that the old seeding had applied a $H/E<0.15$ cut on super-clusters.
        \item After applying this same cut on the new seeds, the performance gap becomes negligible.
        \item The \textbf{narrow} working point of the new seeding uses HLT window sizes(see backup).
        \item Performance of the old seeding can be closely matched with the \textbf{wide} matching windows.
      \end{itemize}
    }
    \end{column}
    \begin{column}{0.6\textwidth}
      \begin{figure}
        \includegraphics[width=0.9\textwidth]{../common/figures/tracking_roc_curves_linear_plus_old_hoe.png}
      \end{figure}
    \end{column}
  \end{columns}
\end{frame}

\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}
  \begin{columns}
    \begin{column}{0.45\textwidth}
      {\small
      \begin{itemize}
        \item The amount of electron seeds is dramatically reduced by the new matching scheme.
        \item Part of the motivation for use in HLT.
        \item Factor of $\approx 4$ reduction comparing to the \texttt{wide} working point
      \end{itemize}
    }
    \end{column}
    \begin{column}{0.65\textwidth}
      \begin{figure}
        \includegraphics[width=\textwidth]{../common/figures/n_seeds.png}
      \end{figure}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}{Conclusions \& Outlook}
  \begin{itemize}
    \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}
    \item Next Steps:
    \begin{itemize}
      \item Verify performance is still acceptable in high fake environments ($t\bar{t}$ for example)
      \item Settle on an ``optimal enough'' set of windows
      \item Decide on which CMSSW release to target and begin preparing (private branch/merge request/etc.)
    \end{itemize}
  \item Other Thoughts
    \begin{itemize}
      \item What are expert's opinions on continued window optimization? (Likely some small gains still to be had)
      \item Are there other ideas for cross-checks to be done before proceeding further?
    \end{itemize}
  \end{itemize}
\end{frame}

\appendix
\backupbegin

\begin{frame}
  \begin{center}
    {\Huge BACKUP}
  \end{center}
\end{frame}

\begin{frame}{Definitions}
  \begin{itemize}
    \item \textbf{Sim-Track \--} A track from a simulated electron originating from the luminous region of CMS (beam-spot +- 5$\sigma$)
    \item \textbf{ECAL-Driven Seed \--} A seed created via a matching procedure between Super-Clusters and General Tracking Seeds (Either from \texttt{ElectronSeedProducer} or \texttt{ElectronNHitSeedProducer})
    \item \textbf{GSF Track \--} A track from GSF-Tracking resulting from an \textbf{ECAL-Driven Seed}
    \item \textbf{Seeding Efficiency \--} The fraction of \textbf{Sim-Tracks} that have a matching \textbf{ECAL-Driven Seed} (based on simhit-rechit linkage)
    \item \textbf{GSF Tracking Efficiency \--} The fraction of \textbf{Sim-Tracks} that have a matching \textbf{GSF Track} (again, based on simhit-rechit linkage)
    \item \textbf{ECAL-Driven Seed Purity \--} The fraction of \textbf{ECAL-Driven Seeds} that have a matching \textbf{Sim-Track}
    \item \textbf{GSF Tracking Purity \--} The fraction of \textbf{GSF Tracks} that have a matching \textbf{Sim-Track}
  \end{itemize}
\end{frame}


\begin{frame}{Matching Window Parameters}
\begin{table}[]
\centering
\begin{tabular}{@{}llrrrr@{}}
\toprule
&  & \textbf{extra-narrow} & \textbf{narrow(HLT)} & \textbf{wide} & \textbf{extra-wide} \\ \midrule
Hit 1 & dPhiMaxHighEt & \textbf{0.025} & \textbf{0.05} & \textbf{0.1} & \textbf{0.15} \\
 & dPhiMaxHighEtThres & 20.0 & 20.0 & 20.0 & 20.0 \\
 & dPhiMaxLowEtGrad & -0.002 & -0.002 & -0.002 & -0.002 \\
 & dRzMaxHighEt & 9999.0 & 9999.0 & 9999.0 & 9999.0 \\
 & dRzMaxHighEtThres & 0.0 & 0.0 & 0.0 & 0.0 \\
 & dRzMaxLowEtGrad & 0.0 & 0.0 & 0.0 & 0.0 \\ \midrule
Hit 2 & dPhiMaxHighEt & \textbf{0.0015} & \textbf{0.003} & \textbf{0.006} & \textbf{0.009} \\
 & dPhiMaxHighEtThres & 0.0 & 0.0 & 0.0 & 0.0 \\
 & dPhiMaxLowEtGrad & 0.0 & 0.0 & 0.0 & 0.0 \\
 & dRzMaxHighEt & \textbf{0.025} & \textbf{0.05} & \textbf{0.1} & \textbf{0.15} \\
 & dRzMaxHighEtThres & 30.0 & 30.0 & 30.0 & 30.0 \\
 & dRzMaxLowEtGrad & -0.002 & -0.002 & -0.002 & -0.002 \\ \midrule
Hit 3+ & dPhiMaxHighEt & \textbf{0.0015} & \textbf{0.003} & \textbf{0.006} & \textbf{0.009} \\
 & dPhiMaxHighEtThres & 0.0 & 0.0 & 0.0 & 0.0 \\
 & dPhiMaxLowEtGrad & 0.0 & 0.0 & 0.0 & 0.0 \\
 & dRzMaxHighEt & \textbf{0.025} & \textbf{0.05} & \textbf{0.1} & \textbf{0.15} \\
 & dRzMaxHighEtThres & 30.0 & 30.0 & 30.0 & 30.0 \\
 & dRzMaxLowEtGrad & -0.002 & -0.002 & -0.002 & -0.002 \\ \bottomrule
\end{tabular}
\end{table}
\centering
\texttt{NHit} Seeding window parameters. Bold designates modified values.
\end{frame}

\backupend

\end{document}
