\documentclass[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{amsmath}

\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\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}

%gets rid of bottom navigation bars
%\setbeamertemplate{footline}[frame number]{}

%gets rid of bottom navigation symbols
%\setbeamertemplate{navigation symbols}{}

%gets rid of footer
%will override 'frame number' instruction above
%comment out to revert to previous/default definitions
%\setbeamertemplate{footline}{}

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

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

\title{Trigger hodoscopes for dark photon LDRD}

\author{Sho Uemura}
%\institute{bumming around}
\date[October 17, 2017]

%\titlegraphic{
%\includegraphics[height=0.1\textheight]{SLAC_Logo}\hspace*{4.75cm}~
%\includegraphics[height=0.1\textheight]{partner_logo_v2}
%}

\begin{document}

\setcounter{framenumber}{2} 
%\begin{frame}
%    \titlepage
%\end{frame}

\begin{frame}{Displaced vertex trigger hodoscopes}
    %\begin{columns}
        %\column{0.65\textwidth}
        \begin{itemize}
            \item Hardware delivered this year:
                \begin{itemize}
                    \item Hodoscope boxes and prototypes
                    \item Readout and calibration systems
                    \item Power supply system
                    \item FPGA trigger
                \end{itemize}
            \item Installed and commissioned at Fermilab, and recorded physics data
        \end{itemize}
        %\begin{center}
            %\includegraphics[width=0.6\textwidth]{st2_done_1000}
        %\end{center}
        %\column{0.35\textwidth}
        %\includegraphics[width=\textwidth]{st1_done_1000}

    %\end{columns}
\end{frame}

\begin{frame}{Detector design}
    \begin{columns}
        \column{0.65\textwidth}
        \begin{itemize}
            \item Extruded scintillator bars detect charged particles, wavelength-shifting fibers collect light and transport it to the SiPMs
            \item Station 1: four boxes, 80 1-cm bars each
            \item Station 2: four boxes, 50 2-cm bars each
        \end{itemize}
        \begin{center}
            \includegraphics[width=0.7\textwidth]{st2_done_1000}
        \end{center}
        \column{0.35\textwidth}
        \includegraphics[width=\textwidth]{st1_done_1000}

    \end{columns}
\end{frame}

\begin{frame}{Mechanical structure}
    \begin{columns}
        \column{0.65\textwidth}
        \begin{itemize}
            \item Frame modified to minimize material in the detector acceptance
            \item Survey monuments for reproducible positioning
            \item Boxes are light-tight with patch panels for signals and voltages, ventilation flanges for air cooling (if necessary)
            \item Quadrants are bolted together using 80-20 hardware, then bolted to I-beams
        \end{itemize}
        \begin{center}
            \includegraphics[width=0.6\textwidth]{IMG_4793_1000}
        \end{center}
        \column{0.35\textwidth}
        \includegraphics[width=\textwidth]{1mhodo_safety}

        \includegraphics[width=\textwidth]{st1_position3}
    \end{columns}
\end{frame}

\begin{frame}{Readout electronics: preamps}
    \begin{columns}
        \column{0.6\textwidth}
        \begin{itemize}
            \item ``Postage stamp'' x10 preamp design contributed by Fermilab, with modification to the pulse shaper
            \item Benchtop tests confirm gain degradation in magnetic field is acceptable
            \item SiPMs and preamps are mounted on ``preamp plate''
            \item All components electrically isolated from plate to avoid noise pickup
            \item Twisted-pair pigtail connects SiPM to preamp
        \end{itemize}
        \column{0.4\textwidth}
        %\includegraphics[width=\textwidth]{hodoscope_diagram}

        \includegraphics[width=\textwidth]{IMG_4794_half}

        \includegraphics[width=\textwidth]{IMG_4795_half}
    \end{columns}
\end{frame}

\begin{frame}{Readout electronics: cabling}
    \begin{columns}
        \column{0.6\textwidth}
        \begin{itemize}
            \item Short coaxial cables connect preamp outputs to patch panel
            \item Long coaxial cables connect patch panel to CAMAC discriminators
            \item Ribbon cables connect discriminators to trigger boards and TDCs
        \end{itemize}
        \column{0.4\textwidth}

        %\includegraphics[width=\textwidth,angle=270]{DSCN1860_1000}
        \includegraphics[width=\textwidth]{IMG_2889_crop_1000}
    \end{columns}
\end{frame}

\begin{frame}{Single-bar beam test}
    \begin{columns}
        \column{0.6\textwidth}
        \begin{itemize}
            \item Single-bar test units: 1-cm and 2-cm units built and tested on the beam at SeaQuest in March
            \item Plots on right (2-cm on top, 1-cm on bottom) show hit times relative to E906 Drell-Yan trigger
                \begin{itemize}
                    \item Small peaks are random particles from other beam buckets, big peak is in time with the trigger
                \end{itemize}
            \item Proved the system works with real beam, in the real environment
        \end{itemize}
        \begin{center}
            \includegraphics[width=\textwidth]{IMG_4732}
        \end{center}
        \column{0.4\textwidth}
        \includegraphics[width=\textwidth]{tube1}

        \includegraphics[width=\textwidth]{tube2}
    \end{columns}
\end{frame}

\begin{frame}{Seven-bar cosmic test}
    \begin{columns}
        \column{0.6\textwidth}
        \begin{itemize}
            \item Instrumented the first seven bars of a St-2 hodoscope box, take data with a test setup of the E906 DAQ
            \item Understand efficiency and time resolution as a function of threshold, debug light collection issues, test different options for the long coaxial cables
        \end{itemize}
        \begin{center}
            \includegraphics[width=0.6\textwidth]{IMG_0123_1000}
        \end{center}
        \column{0.4\textwidth}
        \includegraphics[width=\textwidth,page=6]{eff_all}

        \includegraphics[width=\textwidth,page=8]{timing_all}
    \end{columns}
\end{frame}

\begin{frame}{Power supply}
    \begin{columns}
        \column{0.6\textwidth}
        \begin{itemize}
            \item SiPMs need individually controllable bias voltages (520 channels!); preamps need 6V
            \item SiPM bias board design contributed by Fermilab, modified to match our requirements
                \begin{itemize}
                    \item Each board takes bulk HV and LV supplies, regulates down 24 bias voltages and a single 6V supply
                    \item Voltage and current readbacks for all channels, plus temperature readout
                \end{itemize}
            \item 24 ``power boards'' total, housed in 6 ``power boxes''
        \end{itemize}
        \column{0.4\textwidth}
        \includegraphics[width=\textwidth]{power_box_layout_1000}
    \end{columns}
\end{frame}

\begin{frame}{Power supply: distribution}
    \begin{columns}
        \column{0.6\textwidth}
        \begin{itemize}
            \item ``Distribution board'' passes bias and 6V into the box
        \end{itemize}
        \begin{center}
            \includegraphics[width=0.7\textwidth]{IMG_4917_half}
        \end{center}
        \column{0.4\textwidth}
        \includegraphics[width=\textwidth]{IMG_4929_half}
    \end{columns}
\end{frame}

\begin{frame}{Power supply: control}
    \begin{columns}
        \column{0.65\textwidth}
        \begin{itemize}
            \item Power boards are controlled using I2C protocol; we developed a system to control all 24 boards from a pair of Raspberry Pi computers
                \begin{itemize}
                    \item ``Mux board'' in each power box contains an I2C switch and an I2C buffer to drive a long Ethernet cable
                    \item Cables run to ``master boards'' with corresponding buffers; single ``master box'' holds Pis and master boards
                \end{itemize}
            \item This solution keeps sensitive electronics away from the beam, and simplifies control software
            \item I2C is widely used and this scheme can be used to network any set of boards with I2C control
        \end{itemize}
        \column{0.35\textwidth}
        \includegraphics[width=\textwidth]{master_box_1000}
    \end{columns}
\end{frame}

\begin{frame}{Calibration system}
    \begin{columns}
        \column{0.6\textwidth}
        \begin{itemize}
            \item LED calibration system tests/monitors function of all channels
            \item LED pulser boards generate narrow light pulses
            \item 3D-printed fiber couplers fan out a single pulser channel from a commercial connector to 19 bare fibers
            \item Fibers couple light into the scintillator bars
        \end{itemize}
        \begin{center}
            \includegraphics[width=0.5\textwidth]{splitter_v1_1000}
            \includegraphics[width=0.5\textwidth]{IMG_4524}
        \end{center}
        \column{0.4\textwidth}
        \includegraphics[width=\textwidth]{cal_fibers_1000}
    \end{columns}
\end{frame}

\begin{frame}{Trigger FPGA development}
    %\begin{columns}
    %\column{0.6\textwidth}
    \begin{itemize}
        \item Dark photon trigger uses the CAEN V1495 FPGA board (same as E906 trigger)
            \begin{itemize}
                \item Four ``L1'' V1495s, one for each quadrant, trigger on displaced single tracks in St-1, St-2, and E906 hodoscope H4
                \item ``L2'' trigger is a coincidence between L1 boards with matching vertex Z
                \item Dark photon trigger firmware is based on E906 firmware, with modifications
            \end{itemize}
        \item Lookup table redesigned for dark photon trigger
        \item A full quadrant needs 80+50+8=138 inputs per V1495, E906 firmware only supports 96
            \begin{itemize}
                \item Modified various parts of the E906 firmware (TDC, data format, interface to DAQ software) to allow for up to 160 inputs
            \end{itemize}
    \end{itemize}
    %\begin{center}
    %\includegraphics[width=0.5\textwidth]{splitter_v1}
    %\includegraphics[width=0.5\textwidth]{IMG_4524}
    %\end{center}
    %\column{0.4\textwidth}
    %\includegraphics[width=\textwidth]{cal_fibers_1000}
    %\end{columns}
\end{frame}

\begin{frame}{Installation}
    \begin{columns}
        \column{0.7\textwidth}
        \begin{itemize}
            \item Detectors shipped to Fermilab April 3-7
            \item Installation requires a full-day scheduled downtime: St-2 installed May 15, St-1 installed June 7
            \item Operational approval granted June 13
        \end{itemize}
        \begin{center}
            \includegraphics[width=0.4\textwidth]{IMG_2459_1000}
            \hspace{0.1\textwidth}
            \includegraphics[width=0.4\textwidth]{IMG_2539_1000}
        \end{center}
        \column{0.3\textwidth}
        \includegraphics[width=\textwidth]{IMG_4947_half}

        \includegraphics[width=\textwidth]{IMG_2461_1000}
    \end{columns}
\end{frame}

\begin{frame}{Commissioning}
    \begin{columns}
        \column{0.6\textwidth}
        \begin{itemize}
            \item Coincidences seen June 16 (red: St1, green: St2, yellow: H4)
            \item Dark photon trigger added to main DAQ June 30
                \begin{itemize}
                    \item Dark photon trigger rate is $\sim5$\% of E906 Drell-Yan trigger: well within bounds for parasitic running, and reasonable agreement with O(10\%) expectation from Monte Carlo
                \end{itemize}
        \end{itemize}
        %\begin{center}
        %\end{center}
        \column{0.4\textwidth}
        \includegraphics[width=\textwidth]{coincidence_2017-06-16}

        \includegraphics[width=\textwidth]{triggerrate_ratio}
    \end{columns}
\end{frame}

\begin{frame}{Timing in}
    \begin{columns}
        \column{0.65\textwidth}
        \begin{itemize}
            \item Input delays must be adjusted to compensate for time-of-flight and cable delays
            \item All quadrant triggers must fire in time with each other, and the final dark photon trigger must have the same latency as the E906 DY trigger
            \item Top: hit times after delay adjustment (green: St1, blue: St2, red: H4)
            \item Middle: time distribution of one quadrant's trigger signal
            \item Bottom: time distribution of final dark photon trigger
        \end{itemize}
        %\begin{center}
        %\end{center}
        \column{0.35\textwidth}
        \includegraphics[width=\textwidth]{DetectorInTime}

        \includegraphics[width=\textwidth]{TLquad_crop}

        \includegraphics[width=0.8\textwidth]{h1_aft_inh_nim_02}
    \end{columns}
\end{frame}

\begin{frame}{Performance}
    %\begin{columns}
    %\column{0.6\textwidth}
    \begin{itemize}
        \item St-1 on left, St-2 on right; hit rates on top, occupancy on bottom
            \begin{itemize}
                \item Note: for commissioning, only 30/80 innermost St-1 bars were read out (outer bars do not correspond to displaced tracks)
            \end{itemize}
        \item Consistent performance aside from a few bad channels
    \end{itemize}
    \begin{center}
        \includegraphics[width=0.35\textwidth]{DP1BL}
        \includegraphics[width=0.35\textwidth]{DP2BL}

        \includegraphics[width=0.35\textwidth]{St1_occupancy}
        \includegraphics[width=0.35\textwidth]{St2_occupancy}
    \end{center}
    %\column{0.4\textwidth}
    %\end{columns}
\end{frame}

\appendix
\backupbegin



\begin{frame}{Backup: hodoscope block diagram}
    \begin{center}
        \includegraphics[width=0.6\textwidth]{hodoscope_diagram}
    \end{center}
\end{frame}

\begin{frame}{Backup: power box block diagram}
    \begin{center}
        \includegraphics[width=\textwidth]{power_box_diagram}
    \end{center}
\end{frame}

\begin{frame}{Backup: master box block diagram}
    \begin{center}
        \includegraphics[width=0.6\textwidth]{master_box_diagram}
    \end{center}
\end{frame}

\backupend
%\begin{frame}{Fix vertex fit}
%\begin{columns}
%\column{0.6\textwidth}
%\begin{itemize}
%\item The resolution of the reconstructed mass should be independent of Z but is worse for displaced vertices.
%\end{itemize}
%\begin{center}
%\includegraphics[width=\textwidth]{mass_shift_40}
%\end{center}
%\column{0.4\textwidth}
%\includegraphics[width=\textwidth,page=4]{acceptance_40}
%\end{columns}
%\end{frame}

\end{document}
