
% 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 | February 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 the effect of linearly scaling matching windows up and down
        \item Show first set of \textbf{optimized} windows
        \item Next steps
      \end{itemize}
    \item Full set of results is available here \url{https://eg.fangmeier.tech/seeding\_studies\_2018\_02\_15\_18/output/}
  \end{itemize}
\end{frame}

\begin{frame}{$\delta \phi$ Residuals}
  \begin{columns}
    \begin{column}{0.35\textwidth}
      {\small
      \begin{itemize}
        \item Distribution of $\delta \phi$ residuals for first matched hits in truth-matched seeds where the hit was in BPIX-L1
        \item Truth-matching requires sufficient (75\%) matched hits with a
          sim-track as well as less than 10\% energy discrepancy between
          super-cluster and sim-track.
        \item Differential in $E_T$ of the matched super-cluster
        \item Red line shows the default (aka HLT) window.
        \item Contour lines are biased by the matching cut necessarily being
          applied before deriving the contours.
      \end{itemize}
    }
    \end{column}
    \begin{column}{0.7\textwidth}
      \begin{figure}
        \includegraphics[width=\textwidth]{figures/dphi_B1_H1.png}
      \end{figure}
    \end{column}
  \end{columns}
  \vspace{-0.3in}
  \begin{center}
    Cut windows are specified as functions of $E_T$ for $\delta \phi$, and $\delta R/z$ for the first, second, and third matched hits.
  \end{center}
\end{frame}

\begin{frame}{Linear Scaling of Windows}
  \begin{columns}
    \begin{column}{0.32\textwidth}
      \begin{itemize}
        \item Modified windows with uniform scaling
          \begin{itemize}
            \item x0.5(\texttt{extra-narrow})
            \item x1.0(\texttt{narrow})
            \item x2.0(\texttt{wide})
            \item x3.0(\texttt{extra-wide})
          \end{itemize}
        \item Uniform scaling draws out a clear curve in Efficiency V. Purity.
        \item But can we do better? Find windows with points above the curve?
      \end{itemize}
    \end{column}
    \begin{column}{0.7\textwidth}
      \begin{figure}
        \includegraphics[width=\textwidth]{figures/linear_scaling_tracking_roc.png}
      \end{figure}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}{Finding more optimal windows (Ex. 1)}
  \begin{columns}
    \begin{column}{0.32\textwidth}
      \begin{itemize}
        \item Figure: first-hit $\delta \phi$ 99\% contours for all relevant\footnotemark pixel regions.
        \item Procedure: Select a cut that tends to reasonably follow the 99\% contours in the \texttt{extra-wide} windows.
        \item Repeat this for each of the five windows.
        \item In this case, the \texttt{narrow} window seemed appropriate so this particular window was unchanged.
      \end{itemize}
    \end{column}
    \begin{column}{0.7\textwidth}
      \begin{figure}
        \includegraphics[width=\textwidth]{figures/dphi_hit1.png}
      \end{figure}
    \end{column}
  \end{columns}
  \footnotetext[1]{meaning the sub-detectors that have a substantial portion of first hits}
\end{frame}

\begin{frame}{Finding more optimal windows (Ex. 2)}
  \begin{columns}
    \begin{column}{0.32\textwidth}
      \begin{itemize}
        \item Figure: second-hit $\delta \phi$ 99\% contours for all relevant pixel regions.
        \item Quite low statistics in some regions + looking at tails of distribution results in high variability
        \item Despite this, estimate an appropriate cut to be 0.005
      \end{itemize}
    \end{column}
    \begin{column}{0.7\textwidth}
      \begin{figure}
        \includegraphics[width=\textwidth]{figures/dphi_hit2.png}
      \end{figure}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}{Proposed New Working Point Performance}
  \begin{columns}
    \begin{column}{0.32\textwidth}
      \begin{itemize}
        \item New Working Point lies basically on the linear-scaling curve
        \item However, NWP with extra-narrow first $\delta \phi$ window sets slightly above the curve
        \item Hints that better performance is achievable, but it's not obvious how to achieve
        \item Many ways to vary parameters...
      \end{itemize}
    \end{column}
    \begin{column}{0.7\textwidth}
      \begin{figure}
        \includegraphics[width=\textwidth]{figures/linear_scaling_tracking_roc_w_nwp.png}
      \end{figure}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}{Outlook}
  \begin{itemize}
    \item Next steps
    \begin{itemize}
      \item Testing with an complementary dataset (currently looking at $Z\rightarrow ee$ only)
      \item Possibly breaking down windows sizes in $\eta$ (code supports this, but is currently unused).
    \end{itemize}
  \item Other Thoughts
    \begin{itemize}
      \item What is an appropriate working point, and what performance can be deemed adequate?
      \item Are there different figures-of-merit that must be balanced (CPU performance, specific background rejections.)?
    \end{itemize}
  \end{itemize}
  \vspace{1.5in}
\end{frame}

\appendix
\backupbegin

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

\begin{frame}
  \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}{Triplet Electron Seeding \-- Setup}
  \begin{columns}
  \begin{column}{0.45\textwidth}
    \begin{itemize}
      \item Begin with ECAL super cluster and beam spot
    \end{itemize}
  \end{column}
  \begin{column}{0.55\textwidth}
    \begin{figure}
      \includegraphics[width=\textwidth]{diagrams/seeding_base.png}
    \end{figure}
  \end{column}
  \end{columns}
\end{frame}

\begin{frame}{Triplet Electron Seeding - Introduce Seed}
  \begin{columns}
  \begin{column}{0.45\textwidth}
    \begin{itemize}
      \item Now, examine, one-by-one seeds from general tracking*
      \item Note that we do not look at all hits in an event, but rather rely on general tracking to identify seeds.
    \end{itemize}
    \vspace{0.1in}
    \midrule
    \vspace{0.1in}
    {\footnotesize *initialStepSeeds, highPtTripletStepSeeds, mixedTripletStepSeeds, pixelLessStepSeeds, tripletElectronSeeds, pixelPairElectronSeeds, stripPairElectronSeeds}
  \end{column}
  \begin{column}{0.55\textwidth}
    \begin{figure}
      \includegraphics[width=\textwidth]{diagrams/seeding_step1.png}
    \end{figure}
  \end{column}
  \end{columns}
\end{frame}

\begin{frame}{Triplet Electron Seeding - Match First Hit}
  \begin{columns}
  \begin{column}{0.5\textwidth}
    \begin{itemize}
      \item Using the beam spot, the SC position, and SC energy, propagate a path through the pixels.
      \item Next, 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$.
    \end{itemize}
  \end{column}
  \begin{column}{0.5\textwidth}
    \begin{figure}
      \includegraphics[width=\textwidth]{diagrams/seeding_step2.png}
    \end{figure}
  \end{column}
  \end{columns}
\end{frame}

\begin{frame}{Triplet Electron Seeding - Extrapolate Vertex}
  \begin{columns}
  \begin{column}{0.45\textwidth}
    \begin{itemize}
      \item Once we have a matched hit, use it with the SC position, to find the vertex z.
      \item Vertex x and y are still the beam spot's.
      \item Just a simple linear extrapolation.
    \end{itemize}
  \end{column}
  \begin{column}{0.55\textwidth}
    \begin{figure}
      \includegraphics[width=\textwidth]{diagrams/vertex_z.png}
    \end{figure}
  \end{column}
  \end{columns}
\end{frame}

\begin{frame}{Triplet Electron Seeding - Match Other Hits}
  \begin{columns}
  \begin{column}{0.45\textwidth}
    \begin{itemize}
      \item Now 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.
      \item However, \emph{layer} skipping is not ruled out if the original seed is missing a hit in a layer
    \end{itemize}
  \end{column}
  \begin{column}{0.55\textwidth}
    \begin{figure}
      \includegraphics[width=\textwidth]{diagrams/seeding_step3.png}
    \end{figure}
  \end{column}
  \end{columns}
\end{frame}

\begin{frame}{Triplet Electron Seeding - Window Sizes}
  \begin{columns}
  \begin{column}{0.55\textwidth}
    \begin{itemize}
      \item The $\delta\phi$ and $\delta R/z$ windows for each hit are defined using three parameters.
        \begin{itemize}
          \item \texttt{highEt}
          \item \texttt{highEtThreshold}
          \item \texttt{lowEtGradient}
        \end{itemize}
      \item From these, the window size is calculated as \\
        $\texttt{highEt} + \min(0,\texttt{Et}-\texttt{highEtThreshold})*\texttt{lowEtGradient}$.
      \item For the first hit, these parameters for the $\delta \phi$ window are,
        \begin{itemize}
          \item $\texttt{highEt}=0.05$
          \item $\texttt{highEtThreshold}=20$
          \item $\texttt{lowEtGradient}=-0.002$
        \end{itemize}
    \end{itemize}
  \end{column}
  \begin{column}{0.45\textwidth}
    \begin{figure}
      \includegraphics[width=\textwidth]{figures/dphi1_max.png}
    \end{figure}
  \end{column}
  \end{columns}
  \vspace{0.1in} \hrule \vspace{0.1in}
  These parameters can be specified for each successive hit, and in bins of $\eta$, so optimization is a challenge!
\end{frame}

\begin{frame}{Triplet Electron Seeding - Handle Missing Hits}
  \begin{columns}
  \begin{column}{0.45\textwidth}
    \begin{itemize}
      \item Finally, calculate the expected number of hits based on the number of working pixel modules the track passes through.
      \item Require exact$^1$ number of matched hits depending on the expected number of hits.
        \begin{itemize}
          \item If $N_{\textrm{exp}}=4$, require $N_{\textrm{match}}=3$
          \item If $N_{\textrm{exp}}<4$, require $N_{\textrm{match}}=2$
        \end{itemize}
      \item If the seed passes all requirements, all information, including
        \begin{itemize}
          \item Super cluster
          \item Original Seed
          \item Residuals (For both charge hypotheses)
        \end{itemize}
        are wrapped up and sent downstream to GSF tracking
    \end{itemize}
  \end{column}
  \begin{column}{0.55\textwidth}
    \begin{figure}
      \includegraphics[width=\textwidth]{diagrams/seeding_step4.png}
    \end{figure}
  \end{column}
  \end{columns}
  \vspace{0.1in} \hrule \vspace{0.1in}
  {\footnotesize $^1$Exact, rather than minimum to deal with duplicate seeds in input collection. Could switch to minimum with offline cross-cleaned seeds.}
\end{frame}
\backupend

\end{document}
