\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{ECal hit rates}

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

\begin{document}

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

%\begin{frame}{Notes}
%	\begin{itemize}
%		\item ``ECal coordinates'' are based on crystal ID (x and y) - like looking at the ECal from downstream
%		\item JLab group uses crystal x from -22 to 23; SLAC group uses -23 to 23 with no x=0
%		\item ECal group: ``raw mode,'' ``window mode,'' ``pulse mode;'' software group: ``window mode,'' ``pulse mode,'' ``integral mode''
%		\end{itemize}
%\end{frame}

\begin{frame}{This crazy thing we did for the PAC}
	\begin{itemize}
		\item ECal-only measurement of absolute rate of scattered particles
		\item Checking estimates of ECal gain
		\item Comparison with Monte Carlo rates
	\end{itemize}
\end{frame}

\begin{frame}{Counting clusters}
	\begin{columns}
		\column{0.6\textwidth}
		\begin{itemize}
			\item Select a relatively good region of ECal: left (x<0) half, top and bottom
				\begin{itemize}
					\item Bottom has an HV group with high gain and some crystals that were dropped as being ``bad''
				\end{itemize}
			\item Reject clusters with seed (highest E) crystal in Y=$\pm1$
			\item Count clusters with energy above a given threshold --- use a threshold high enough to guarantee a trigger
			\item Normalize (to 90 nC, a k a ``Hz at 90 nA'') by dividing by the integrated current for each run; subtract the empty run to remove background
		\end{itemize}
		\column{0.4\textwidth}
		\includegraphics[width=\textwidth]{hitmap_good_region_1351}
	\end{columns}
\end{frame}

\begin{frame}{Simulation}
	\begin{itemize}
		\item Use Geant4/EGS5 samples coming out of the converter; run them in SLIC, get hits in ECal crystals
		\item Ignore time evolution, readout and triggering, but do apply the crystal readout threshold
		\item Use same ECal region, clustering, position cuts, energy thresholds as for the real data
	\end{itemize}
\end{frame}

\begin{frame}{ECal gain}
	\begin{columns}
		\column{0.6\textwidth}
		\begin{itemize}
			\item Data and simulation will only match if the ECal gain used for the data is correct
			\item We used Stepan's value for ECal gain (constant across crystals)
			\item Check cluster energy against track momentum, get E/p of 0.7 in top, 0.6 in bottom (figure on right was made with gain incorrect by a factor of 2)
		\end{itemize}
		\begin{center}
			\includegraphics[width=0.4\textwidth]{e_p_pelle_top}
			\includegraphics[width=0.4\textwidth]{e_p_pelle_bot}
		\end{center}
		\column{0.4\textwidth}
		\includegraphics[width=\textwidth]{e_p_pelle}
	\end{columns}
\end{frame}

\begin{frame}{E/p in simulation}
	\begin{columns}
		\column{0.5\textwidth}
		\begin{itemize}
			\item The E we measure is the sum of energy deposition in ECal crystals; the p we measure should be the true scattered particle momentum
				\begin{itemize}
					\item Some energy isn't deposited in crystals (sampling fraction)
					\item Some energy deposition doesn't make it into the data (readout threshold)
				\end{itemize}
			\item Simulation shows E/p around 0.7 if we use the same cuts as we do with data
		\end{itemize}
		\column{0.5\textwidth}
		\includegraphics[width=0.5\textwidth]{edep_over_p_sim}
		\includegraphics[width=0.5\textwidth]{edep_p_sim}

		\includegraphics[width=0.5\textwidth]{e_over_p_sim}
		\includegraphics[width=0.5\textwidth]{e_vs_p_sim}
	\end{columns}
\end{frame}

\begin{frame}{Results}
	\begin{columns}
		\column{0.4\textwidth}
		\begin{itemize}
			\item This is what was presented to PAC (ECal top half on left, bottom on right)
		\end{itemize}
		\column{0.6\textwidth}
		\includegraphics[width=0.5\textwidth]{n_vs_E_18_egs5_g4}
		\includegraphics[width=0.5\textwidth]{n_vs_E_18_egs5_g4_bot}

		\includegraphics[width=0.5\textwidth]{n_vs_E_45_egs5_g4}
		\includegraphics[width=0.5\textwidth]{n_vs_E_45_egs5_g4_bot}

		\includegraphics[width=0.5\textwidth]{n_vs_E_1-6_egs5_g4}
		\includegraphics[width=0.5\textwidth]{n_vs_E_1-6_egs5_g4_bot}
	\end{columns}
\end{frame}

\begin{frame}{Next steps}
	\begin{columns}
		\column{0.6\textwidth}
		\begin{itemize}
			\item Do a real ECal gain calibration by comparing to MC
				\begin{itemize}
					\item Maybe start by setting gains for HV groups to iron out the worst of the irregularities; crystal-by-crystal calibration is much more involved
					\item It looks like overall gain is somewhat lower (10\% in top, 20\% in bottom) than what we used
					\item Some work needed before we trust our E/p measurement enough to calibrate based on it
				\end{itemize}
			\item ``Angular distribution'' (rates vs. crystal Y index): in progress (top half shown)
		\end{itemize}
		\column{0.3\textwidth}
		\includegraphics[width=\textwidth]{n_vs_E_vs_Y_0-18_egs5_g4}

		\includegraphics[width=\textwidth]{n_vs_E_vs_Y_0-45_egs5_g4}

		\includegraphics[width=\textwidth]{n_vs_E_vs_Y_1-6_egs5_g4}
	\end{columns}
\end{frame}

\end{document}

