\documentclass[hyperref=pdftex, presentation]{beamer}
% Replacing 'presentation' with 'handout' in the above line
% will produce 4 slides per page.
% The hyperref option makes it possible to include hyperlinks.

\mode<presentation> {
\usetheme{Boadilla}
\setbeamercovered{transparent}
}

\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}

\mode<handout>{
\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[letterpaper,landscape,border shrink=5mm]
\setbeamercolor{background canvas}{bg=black!10} }

\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author
	in head/foot}%
	\usebeamerfont{author in head/ foot}\insertshortauthor%&\approx& (\insertshorti
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title
	in head/foot}%
	\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in
	head/foot}%
	\usebeamerfont{date in head/foot}\insertshortdate\hspace*{2em}
	\insertframenumber / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\title[GEANT4/EGS5]{GEANT4/EGS5}

\title{Trigger efficiency studies}

\author{Sho Uemura}
%\institute[SLAC]{SLAC\\}
\date[June 26, 2012]

\begin{document}

\begin{frame}
	\titlepage
\end{frame}

\begin{frame}{Old results (as shown 6/12/12)}
	\begin{itemize}
		\item Run 1351, 508853 total events:
	\end{itemize}
	\begin{center}
		\begin{tabular}{|l|r|r|r|r|}
			\hline
			Simulated trigger:     & none   & top    & bottom & both \\
			\hline
			Top trigger bit:       & 774    & 270003 & 2      & 1654 \\
			Bottom trigger bit:    & 8125   & 2      & 224070 & 1259 \\
			Both trigger bits:     & 0      & 5      & 6      & 2953 \\
			\hline
		\end{tabular}
	\end{center}
	\begin{itemize}
		\item Looks bad if you look at efficiency, unbiasing by requiring top trigger bit and checking for bottom:
	\end{itemize}
	\begin{center}
		\begin{tabular}{|l|r|r|}
			\hline
			Bottom:	& should have fired    & shouldn't have fired \\
			\hline
			fired           & 6+2653 = 2659        & 0+5 = 5 \\
			didn't fire     & 2+1654 = 1656         & 774+270003 = 270777 \\
			\hline
		\end{tabular}
	\end{center}
\end{frame}

\begin{frame}{Some details of triggering and readout}
	\begin{itemize}
		\item FADC computes pulse integral two ways:
			\begin{itemize}
				\item For trigger, integrates time-over-threshold
				\item For DAQ, integrates a fixed time window much wider than the pulse (5 samples before, 30 after)
			\end{itemize}
		\item Readout hit integral is linear in the hit amplitude; trigger hit integral is not
			\begin{itemize}
				\item Low-energy hits have significantly smaller trigger hit integrals than readout hit integrals, so if you try to do trigger studies using readout hit integrals it'll look like low-energy hits are getting lost in the clusterer
				\item Readout threshold is less than trigger threshold, so we always know whether there was a trigger hit
			\end{itemize}
		\item Data contains readout hits, so a correct trigger simulation needs to convert readout hit integrals to trigger hit integrals
			\begin{itemize}
				\item Wasn't done for 6/12/12 results because it's difficult to do accurately, and isn't necessary if you're just checking timing --- didn't realize how significant the effect was
			\end{itemize}
	\end{itemize}
\end{frame}

\begin{frame}{Applying the correction}
	\begin{itemize}
		\item Need pulse shape (CR-RC, shaping time 14 ns for now), trigger threshold (80 ADC counts above pedestal), readout hit integral
			\begin{itemize}
				\item Integrate pulse shape to get the pulse amplitude
				\item Do the time-over-threshold integration to get the trigger hit integral
			\end{itemize}
		\item The rest of the trigger algorithm (truncate, cluster, trigger) proceeds as usual
		\item This is only exact if you know the time of the hit relative to the FADC clock (which we don't); since the pulse rise time is only a few clocks, this actually matters
	\end{itemize}
\end{frame}

\begin{frame}{New results}
	\begin{center}
		\begin{itemize}
			\item Haven't actually calibrated the pulse shape; it has a large effect on these efficiencies (14 ns is basically just a guess)
		\end{itemize}
		\begin{tabular}{|l|r|r|r|r|}
			\hline
			Simulated trigger:     & none   & top    & bottom & both \\
			\hline
			Top trigger bit:       & 2457   & 269600 & 3      & 373 \\
			Bottom trigger bit:    & 9593   & 1      & 223502 & 360 \\
			Both trigger bits:     & 0      & 16     & 12     & 2936 \\
			\hline
		\end{tabular}

		\begin{tabular}{|l|r|r|}
			\hline
			Bottom:	& should have fired    & shouldn't have fired \\
			\hline
			fired           & 2948        & 16 \\
			didn't fire     & 376         & 272057 \\
			\hline
		\end{tabular}

		\begin{tabular}{|l|r|r|}
			\hline
			Top:	& should have fired    & shouldn't have fired \\
			\hline
			fired           & 2952        & 12 \\
			didn't fire     & 361         & 233095 \\
			\hline
		\end{tabular}
	\end{center}
\end{frame}

\begin{frame}{Next steps}
	\begin{itemize}
		\item Calibrate pulse shapes using window-mode data
		\item Hit time information's not recoverable, so we're just going to have to compare rates against MC to get efficiencies
	\end{itemize}
\end{frame}

\end{document}

