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

\author{Sho Uemura}
\institute{SLAC}
\date[March 17, 2014]

\begin{document}

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

\begin{frame}{Purpose of this talk}
	\begin{itemize}
		\item Familiarize you with what's in the simulation
		\item Find out what needs to be changed for the mock data, get some discussion on what needs to be done before run
			\begin{itemize}
				\item Detector geometry for mock data can no longer be changed, but changes can still be made to readout and trigger simulations, reconstruction
				\item Time is very tight for any changes that need to be in the mock data
				\item And in general --- prioritize, we don't have time to do everything
			\end{itemize}
		\item Not in this talk, but ask any questions you have:
			\begin{itemize}
				\item Primary generators (anything inside or before the target)
				\item Calibration, monitoring
				\item Reconstruction
				\item B-field
				\item How to use/change the simulation; e-mail me
			\end{itemize}
	\end{itemize}
\end{frame}

\begin{frame}{What do we need for the mock data?}
	\begin{itemize}
		\item For mock data in general: we need simulation to be good enough that we can test the analysis, but we don't need the simulation to perform identically to the real thing
		\item Current MDC analysis uses ECal data for track quality tests only, but ECal should be able to deliver improved momentum resolution
		\item My opinion: ECal trigger behavior is first priority, but we should get realistic energy resolution
	\end{itemize}
\end{frame}

\begin{frame}{Geometry}
	\begin{itemize}
		\item Mock data geometry includes pair spec and ECal vacuum chambers/flanges, honeycomb (not shown)
		\item Other ECal dead material will be added (Holly), but flange (20 mm Al) is majority of the dead material in front of the ECal
	\end{itemize}
	\begin{center}
		%\includegraphics[width=0.3\textwidth]{prop-v4-lookat}
		\includegraphics[width=0.3\textwidth]{prop-v4-pdf}
		\includegraphics[width=0.3\textwidth]{prop-v4-paraview-side}
		\includegraphics[width=0.3\textwidth]{prop-v4-paraview-rear}
	\end{center}
\end{frame}

\begin{frame}{Crystal/APD/preamp simulation}
	\begin{itemize}
		\item New pulse shape from work by Gabriel/Andrea, has been added to simulation by Gabriel replacing old CR-RC pulse shape
			\begin{itemize}
				\item Rise time determines time walk, fall time determines pileup
				\item Behavior at ends of the pulse is very important since thresholds will be few percent of amplitude
			\end{itemize}
		\item Noise (constant preamp noise and $\sqrt{E}$ statistics noise) applied to each pulse amplitude: no noise hits
	\end{itemize}
	\begin{center}
		\includegraphics[width=0.8\textwidth]{plot3}
	\end{center}
\end{frame}

\begin{frame}{FADC}
	\begin{itemize}
		\item FADC simulation is mostly the same as for test run; needed changes have been made
		\item Readout/trigger thresholds need to be decided
			\begin{itemize}
				\item Current setting: about 50 MeV
				\item Trade-off between energy resolution and time walk/pileup
			\end{itemize}
		\item NSA/NSB set to 5+30 samples (140 ns) in test run: reduce this?
		\item Cluster coincidence set to 8 ns, but might need to be longer due to time walk
	\end{itemize}
	\begin{center}
		\includegraphics[width=0.5\textwidth]{hps_trigger_data}
	\end{center}
\end{frame}

\begin{frame}{Trigger}
	\begin{itemize}
		\item Trigger cuts are as shown in proposal, section 6.2; should be retuned for new pulse shape/time walk
		\item Cluster hit pattern/hit count information will be available, should be added to cuts
	\end{itemize}
\end{frame}

\begin{frame}{Conditions}
	\begin{itemize}
		\item Conditions currently saved in text files compiled into hps-java:
			\begin{itemize}
				\item Pedestal and preamp noise from calibration (in ADC counts), gain
				\item This is fine for mock data, but for running:
			\end{itemize}
		\item Conditions should move to SQL database with run-based or time-based validity (work in progress for SVT)
		\item What conditions will ECal have? Different calibrations/monitoring systems should have different conditions; should have separate conditions for run configuration (set before the run, e.g. FADC gain constants) and calibration (from data quality after the run, e.g. gain found from track-based calibration)
	\end{itemize}
\end{frame}

\begin{frame}{Truth information}
	\begin{itemize}
		\item FADC simulation doesn't associate input hits with output hits (energy deposition in crystals with ADC integral)
		\item Complete truth information (for arbitrary events with beam background, identify the MC particles that caused every hit in the simulated data) is hard, but might not be necessary
			\begin{itemize}
				\item Relating MC particles to energy deposition is easy (SLIC already does it)
				\item Truth information is also easy if there's no beam background
				\item What do you need?
			\end{itemize}
	\end{itemize}
\end{frame}

\end{document}

