
% rubber: module pdftex

\documentclass[english,aspectratio=43]{beamer}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{subcaption}
\usepackage{marvosym}
\usepackage{verbatim}

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

\usetheme[]{bjeldbak}

\begin{document}

\title[e Reco. Validation]{Offline Electron Reconstruction Validation}
\author[C. Fangmeier]{\textbf{Caleb Fangmeier} \\ Ilya Kravchenko,  Greg Snow}
\institute[UNL]{University of Nebraska \-- Lincoln}
\date{July 21, 2017}

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

\begin{frame}[noframenumbering,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 Ongoing studies\footnote{\url{https://indico.cern.ch/event/613833/contributions/2646392/attachments/1486134/2307836/EGMHLT_PixelMatching_Jun30.pdf}} in HLT examine the resolution of RecHits used in Gsf Tracking.
    \item In those studies, the resolution is computed by measuring the distance between the \textbf{RecHits} and the extrapolated paths from ECAL \textbf{super-clusters} (SCs).
    \item For \textbf{offline} reconstruction, we compute residuals by comparing the position of \textbf{RecHits} and associated \textbf{SimHits}.
    \item Knowing these resolutions is important in choosing the size of search windows in the hit matching algorithm used in electron reconstruction.
  \end{itemize}
\end{frame}

\begin{frame}{Introduction}
  \begin{itemize}
    \item We use Rafael Lopes de Sa's analysis setup\footnote{\url{https://github.com/rafaellopesdesa/cmssw/tree/ValidationGsfTracks81X}} that is derived from the standard offline tracking reconstruction tool \texttt{TrackingNtuple} from \texttt{Validation/RecoTrack}.
    \item Source dataset: \\ {\scriptsize \texttt{/DYJetsToLL\_M-50\_TuneCUETP8M1\_13TeV-madgraphMLM-pythia8/\\ PhaseIFall16DR-FlatPU28to62HcalNZSRAW\_81X\_upgrade2017\_realistic\_v26-v1/\\ GEN-SIM-RAW}}
    \item Using Release \texttt{CMSSW\_8\_1\_0}
    \item Figures in this talk use 31790 events (could be re-run with more)
  \end{itemize}
\end{frame}

\begin{frame}{Gsf Electron Seeding I}
  \begin{columns}
  \begin{column}{0.75\textwidth}
    \begin{figure}
      \includegraphics[width=\textwidth]{diagrams/Gsf_Seeding1.png}
    \end{figure}
  \end{column}
  \begin{column}{0.25\textwidth}
    \begin{figure}
      \hspace{-1in}
      \vspace{-1in}
      \includegraphics[width=1.8\textwidth]{diagrams/window1.png}
    \end{figure}
  \end{column}
  \end{columns}
  \vfill
  \footnotesize{Windows from \url{https://indico.cern.ch/event/611042/contributions/2464057/attachments/1406271/2148742/ElectronTracking30112016.pdf}}
\end{frame}

\begin{frame}{Gsf Electron Seeding II}
  \begin{columns}
  \begin{column}{0.66\textwidth}
    \begin{figure}
      \includegraphics[width=\textwidth]{diagrams/Gsf_Seeding2.png}
    \end{figure}
  \end{column}
  \begin{column}{0.33\textwidth}
    \begin{figure}
      \hspace{-0.75in}
      \vspace{1in}
      \includegraphics[width=1.5\textwidth]{diagrams/window2.png}
    \end{figure}
  \end{column}
  \end{columns}
\end{frame}

\begin{frame}{Gsf Electron Seeding III}
  \begin{center}
    \begin{figure}
      \includegraphics[width=\textwidth]{diagrams/Gsf_Seeding3.png}
    \end{figure}
  \end{center}
\end{frame}

\begin{frame}{TrackingNtuple}
  The \texttt{TrackingNtuple} format contains (among others) the below crosslinked collections
  \begin{center}
    \begin{figure}
      \includegraphics[width=\textwidth]{diagrams/TrackingNtuple.png}
    \end{figure}
  \end{center}
\end{frame}

\begin{frame}{Finding \texttt{SimHit}/\texttt{RecHit} Pairs}
To find residuals for calculating resolutions, require a pair containing 1
\texttt{RecHit} and 1 \texttt{SimHit}. Procedure is as follows:
  \begin{enumerate}
    \item For each \texttt{Track}, get it's \texttt{Seed} (unique)
    \item For each \texttt{RecHit} in the \texttt{Seed}, require
      \begin{itemize}
        \item It is in the specified subdetector (e.g. BPIX Layer 1)
        \item It is the 1st/2nd hit in the \texttt{Seed}.
        \item It is matched to at least one \texttt{SimHit}.
      \end{itemize}
    \item For each \texttt{RecHit} (\textbf{B}) passing the above, take the first matched
      \texttt{SimHit} (\textbf{A}).
    \item Now look through all \texttt{SimHits} associated with
      \texttt{SimTracks} associated with the original \texttt{Track}. If
      \textbf{A} exists in this set. Make a pair of \texttt{SimHit} \textbf{A}
      and \texttt{RecHit} \textbf{B}.
  \end{enumerate}
\end{frame}

\begin{frame}{Finding \texttt{SimHit}/\texttt{RecHit} Pairs}
  \begin{center}
    \begin{figure}
      \includegraphics[width=\textwidth]{diagrams/TrackingNtuple_traversal.png}
    \end{figure}
  \end{center}
\end{frame}

\begin{frame}{BPIX Hit 1 Resolution}
    \begin{figure}
      \centering
      \includegraphics[height=0.8\textheight]{figures/first_hits.png}
    \end{figure}
\end{frame}

\begin{frame}{BPIX Hit 1 Resolution vs. $\eta$}
    \begin{figure}
      \centering
      \includegraphics[height=0.8\textheight]{figures/first_hits_v_eta.png}
    \end{figure}
\end{frame}

\begin{frame}{BPIX Hit 2 Resolution}
    \begin{figure}
      \centering
      \includegraphics[height=0.8\textheight]{figures/second_hits.png}
    \end{figure}
\end{frame}

\begin{frame}{BPIX Hit 2 Resolution vs. $\eta$}
    \begin{figure}
      \centering
      \includegraphics[height=0.8\textheight]{figures/second_hits_v_eta.png}
    \end{figure}
\end{frame}

\begin{frame}{Resolution dependence on even/odd ladder number}
    \begin{figure}
      \centering
      \includegraphics[width=0.8\textwidth]{diagrams/dphi_v_ladder_dylan.png}
    \end{figure}
    {\small
    \begin{itemize}
      \item Above From Dylan Rankin's June 30 Presentation. (See slide 1)
      \item We have slightly different definitions of $\Delta\phi_1$, but wanted to investigate ourselves.
    \end{itemize}
    }
\end{frame}

\begin{frame}{Resolution dependence on even/odd ladder number}
    \begin{figure}
      \centering
      \includegraphics[height=0.8\textheight]{figures/delta_phi_z_v_ladder.png}
    \end{figure}
\end{frame}


\begin{frame}{Conclusions}
  \begin{itemize}
    \item Analysis machinery for offline electron RECO studies with MC truth is in place.
    \item Preliminary plots of $\Delta\phi_{1/2}$ and $\Delta z_{1/2}$ for BPIX
      Layers 1/2 are shown.
    \item Code for this analysis is here: \\ \footnotesize
      \begin{center}\url{git.fangmeier.tech/caleb/EGamma\_ElectronTrackingValidation}\end{center}
    \item  next to come
      \begin{itemize}
        \item run on larger event samples (\texttt{trackingNtuples} are generated, just need to use)
        \item include FPIX
        \item investigate reasons for rec hit inefficiencies
        \item introduce triplet-based pixel matching for the seeds and repeat the studies
      \end{itemize}
    % \item What specific figures/measurements are of interest to experts?
  \end{itemize}
\end{frame}

\end{document}
