\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}
\usepackage{wrapfig}
\usepackage{graphicx}

\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%
}

\newcommand{\backupbegin}{
\newcounter{framenumberappendix}
\setcounter{framenumberappendix}{\value{framenumber}}
}
\newcommand{\backupend}{
\addtocounter{framenumberappendix}{-\value{framenumber}}
\addtocounter{framenumber}{\value{framenumberappendix}} 
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

\title{Global SVT alignment with Mollers}

\author{Sho Uemura}
\institute{SLAC}
\date[May 20, 2016]

\begin{document}

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

\begin{frame}{SVT alignment}
    \begin{itemize}
	    \item Local alignment (Millepede): move sensors around to minimize track $\chi^2$
	    \item Local alignment is blind to ``weak modes'' that uniformly shift track parameters without changing $\chi^2$
		    \begin{itemize}
			    \item Each track parameter corresponds to a weak mode
		    \end{itemize}
	    \item Strategy: run local alignment, use tweaks to fix the global alignment, rerun local alignment for second-order corrections
	    \item I'm assuming local alignment is perfect
	    \item Global alignment: use external references to get things right
	    \item SVT top and bottom each need to be aligned
    \end{itemize}
\end{frame}

\begin{frame}{Past work}
	\begin{itemize}
		\item Initial Millepede alignment gave very bad FEE momentum (O(10\%) shifts), inconsistent beamspots in top and bottom
		\item We developed formulas to ``tweak'' the alignment constants along each weak mode without disrupting local alignment
			\begin{itemize}
				\item Used SVT survey as a prior (if we can't constrain a weak mode, use the value that minimizes deviation from survey)
				\item Shove curvature to roughly the right place, make top and bottom beamspots agree at $z=0$
			\end{itemize}
		\item What we didn't do:
			\begin{itemize}
				\item Think about how to assess global alignment (curvature is easy, everything else is hard)
				\item Get things exactly right
			\end{itemize}
		\item Current recon alignment has beamspot near $(0,0)$ and momentum within 2\%, nothing else was even checked
			\begin{itemize}
				\item Apparent beam tilt: real, or alignment?
				\item Vertex Z dependence on mass: clear sign of bad global alignment
			\end{itemize}
	\end{itemize}
\end{frame}

\begin{frame}{Doing global alignment right}
	\begin{itemize}
		\item External references: FEE momentum, beam axis, beam spot
			\begin{itemize}
				\item Set everything to nominal values for now, we can decide later if we need to tilt the beam or shift the beam spot
			\end{itemize}
		\item Get curvature right: correct the known FEE momentum shifts (Omar: 1.040 in top, 1.069 in bottom)
			\begin{itemize}
				\item Straight-throughs ought be a better way to constrain this
			\end{itemize}
		\item Use Moller two-body kinematics to do top and bottom separately
	\end{itemize}
\end{frame}

\begin{frame}{Mollers: $\theta$ vs. $E$}
	\begin{columns}
		\column{0.55\textwidth}
		\begin{itemize}
			\item Energy-angle relation: $\cos\theta=1-m_e(1/E-1/E_{beam})$
			\item Cut on energy, get a ring centered around the beam axis
			\item We only have a bit of the ring: plot the $\theta$ residual against $\phi$, fit
				\begin{itemize}
					\item Constant term: vertical tilt (or energy, but we calibrated that already)
					\item Linear term: horizontal tilt
				\end{itemize}
			\item Repeat at different energies to make sure we're not getting biased by acceptance
		\end{itemize}
%		\begin{center}
%			\includegraphics[width=0.5\textwidth]{energy-angle}
%		\end{center}
		\column{0.45\textwidth}
%		\includegraphics[width=\textwidth]{e_theta}
			\includegraphics[width=\textwidth]{energy-angle}

		\includegraphics[width=\textwidth,page=1]{test_domega}
	\end{columns}
\end{frame}

\begin{frame}{Mollers: $\theta_y$ vs. $z_0$}
	\begin{itemize}
		\item Plot $y(z=0)$ against $\theta_y$, fit
			\begin{itemize}
				\item Constant term: vertical offset
				\item Linear term: Z offset
			\end{itemize}
		\item Looks like target is at negative Z and our earlier attempt at global alignment ``corrected'' by applying spurious shifts and tilts
	\end{itemize}
	\begin{center}
		\includegraphics[width=0.5\textwidth,page=4]{test_domega}
		\includegraphics[width=0.5\textwidth,page=3]{test_domega}
	\end{center}
\end{frame}

\begin{frame}{Mollers: $\theta_x$ vs. $d_0$}
	\begin{itemize}
		\item Plot $x(z=0)$ against $\theta_x$, fit? Too much momentum dependence
		\item Plot $x(z=0)$ against $p$
		\item Fringe field? Why is the sign of the effect different in top and bottom?
	\end{itemize}
	\begin{center}
		\includegraphics[width=0.5\textwidth,page=8]{test_domega}
		\includegraphics[width=0.5\textwidth,page=7]{test_domega}
	\end{center}
\end{frame}

\begin{frame}{Work in progress}
	\begin{itemize}
		\item Need to compare with MC
		\item Need to improve sensitivity: would be nice to get $\sim$0.1 mrad for tilts and $\sim$1 mm for target Z, not quite there yet
		\item Cross-check against tridents and FEE
		\item Corrections can be applied to track parameters post-recon (I do this in my tuple maker); can be pushed into the alignment later
	\end{itemize}
\end{frame}


\end{document}
