\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 / \inserttotalframenumber\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{Dark photon trigger status}

\author[Sho Uemura]{Sho Uemura\\Los Alamos National Laboratory\\SeaQuest Collaboration}
%\institute{bumming around}
\date[December 1, 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}{The SeaQuest facility}
    %%\begin{columns}
    %%\column{0.65\textwidth}
    %\begin{itemize}
        %\item Fixed target muon spectrometer, Fermilab 120 GeV proton beam
        %\item Measurement of the nucleon sea quark distribution using Drell-Yan% ($q\bar{q}\to \mu^+\mu^-$)
        %\item Parasitic searches for dark photons approved 2015
            %%\item Thin ($\sim$10\%$\lambda_I$) rotating targets: LH2, LD2, C, Fe, W
            %%\item Iron-filled dipole magnet serves as beam dump; second dipole magnet is used for momentum measurement
            %%\item Drift chambers for tracking, scintillator hodoscopes for trigger
    %\end{itemize}
    %\begin{center}
        %\includegraphics[width=0.8\textwidth]{seaquest_setup}
    %\end{center}
    %%\column{0.35\textwidth}
    %%\includegraphics[width=\textwidth]{st1_done_1000}
    %%\end{columns}
%\end{frame}

%\begin{frame}{Production and signatures at SeaQuest}
    %\begin{columns}
    %\column{0.65\textwidth}
    %\begin{itemize}
        %\item Three dominant production mechanisms: Drell-Yan, meson decay, proton bremsstrahlung
        %\item Branching fraction to $\mu^+\mu^-$ is significant at all $m_{A'}>2m_{\mu}$; decay length depends on $\epsilon$
        %\item Two signatures: mass resonance and (at small $\epsilon$) displaced vertices
    %\end{itemize}
    %%\begin{center}
    %%\includegraphics[width=\textwidth]{darkphoton-BR-1-3000-LOG}
    %%\end{center}
    %\column{0.35\textwidth}
    %\includegraphics[width=\textwidth]{drell-yan}
%
    %\includegraphics[width=\textwidth]{meson_decay}
%
    %\includegraphics[width=\textwidth]{proton_bremsstrahlung}
    %\end{columns}
%\end{frame}

%\begin{frame}{SeaQuest reach}
    %\begin{columns}
    %\column{0.55\textwidth}
    %\begin{itemize}
        %\item Bump-hunt and vertexing reach; vertexing reach shows Drell-Yan and $\eta$-decay production separately
        %\item Models and assumptions are from last year
        %\item Reach contours with different beam times:
            %\begin{itemize}
                %\item Red: 5 days (in the bag)
                %\item Blue: 1 month (possible in 2018)
                %\item Black: 4 months
            %\end{itemize}
    %\end{itemize}
    %%\begin{center}
    %%\end{center}
    %\column{0.45\textwidth}
    %\includegraphics[width=\textwidth]{seaquest_reach}
%
    %\includegraphics[width=0.7\textwidth]{bumphunt_reach}
%\end{columns}
%\end{frame}

%\begin{frame}{SeaQuest searches for dark photons: prompt}
    %\begin{columns}
        %\column{0.55\textwidth}
        %\begin{itemize}
            %\item Prompt dark photons (large $\epsilon$): look for a mass bump above the smooth background
            %\item SeaQuest trigger excludes low masses due to trigger rate limitations; DAQ upgrade (completed this year) should improve the mass range
            %\item Meson resonances will block parts of the mass range
            %\item Mass resolution is limited by multiple scattering in the beam dump
        %\end{itemize}
        %%\begin{center}
        %%\includegraphics[width=0.6\textwidth]{dimuon_z}
        %%\end{center}
        %\column{0.45\textwidth}
        %\includegraphics[width=\textwidth]{dimuon_mass}
%
        %%\includegraphics[width=\textwidth]{seaquest_reach}
%
        %\includegraphics[width=\textwidth]{bumphunt_reach}
    %\end{columns}
%\end{frame}

\begin{frame}{SeaQuest searches for dark photons: displaced vertex}
    \begin{columns}
        \column{0.65\textwidth}
        \begin{itemize}
            \item Small $\epsilon$: look for dimuon vertices deep inside the beam dump
            \item Requires a new trigger for low-mass displaced vertices, which was commissioned this year
            %\item Vertex tails have not been studied, particularly at low mass
        \end{itemize}
        \column{0.35\textwidth}
        \includegraphics[width=\textwidth]{seaquest_reach}
        %\includegraphics[width=\textwidth]{displaced_dy_reach}

        %\includegraphics[width=\textwidth]{displaced_meson_reach}
    \end{columns}
        \begin{center}
            %\includegraphics[width=\textwidth]{dimuon_z}
            \includegraphics[width=0.8\textwidth]{trigger_sketch2}
        \end{center}
\end{frame}

\begin{frame}{Displaced vertex trigger}
    %\begin{columns}
    %\column{0.65\textwidth}
    \begin{itemize}
        \item Two stations of fine-grained scintillator hodoscopes measure track Y
        \item FPGA trigger extrapolates tracks to the beam plane (and H4Y hodoscopes) and fires on pairs of tracks with matching Z
            %\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]{trigger_sketch}
        %\includegraphics[width=0.35\textwidth]{st1_done_1000}
        %\includegraphics[width=0.55\textwidth]{st2_done_1000}
    \end{center}
    %\column{0.35\textwidth}
    %\includegraphics[width=\textwidth]{st1_done_1000}
    %\end{columns}
\end{frame}

\begin{frame}{Trigger hodoscopes}
    \begin{columns}
        \column{0.65\textwidth}
        \begin{itemize}
            \item Extruded scintillator bars detect charged particles, wavelength-shifting fibers collect light and transport it to SiPMs
            \item Station 1: four boxes, 80 1$\times$1 cm bars each
            \item Station 2: four boxes, 50 2$\times$2 cm bars each
        \end{itemize}
        \begin{center}
            %\includegraphics[width=0.7\textwidth]{st2_done_1000}
            \includegraphics[width=\textwidth]{IMG_4732}
        \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 and services}
    %\begin{columns}
        %\column{0.65\textwidth}
        %\begin{itemize}
            %\item Postage-stamp preamps read out the SiPMs and send signals to discriminators
            %\item Power supplies provide independent control of every SiPM bias voltage
            %\item Trigger decision made using CAEN V1495 FPGA boards
        %\end{itemize}
        %\begin{center}
            %\includegraphics[width=0.45\textwidth]{IMG_4794_half}
            %\hspace{0.05\textwidth}
            %\includegraphics[width=0.45\textwidth]{IMG_4795_half}
        %\end{center}
        %\column{0.35\textwidth}
        %\includegraphics[width=\textwidth]{cal_fibers_1000}
    %\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 and DAQ}
    \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}{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; 3D-printed fiber couplers fan out a single pulser channel 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 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}{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 FPGA1 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}{Installation and commissioning}
    \begin{columns}
        \column{0.75\textwidth}
        \begin{itemize}
            \item Trigger hodoscopes installed on the SeaQuest beamline this spring
            \item Detectors and trigger electronics tested and timed in
            \item Displaced vertex trigger rate is $\sim$5\% of FPGA1, acceptable for parasitic running
            \item 5 days of good data taken with the displaced vertex trigger June 30 --- July 6 before accelerator shutdown
        \end{itemize}
        \begin{center}
            \includegraphics[width=0.4\textwidth]{coincidence_2017-06-16}
            %\hspace{0.1\textwidth}
            \includegraphics[width=0.5\textwidth]{triggerrate_ratio}
        \end{center}
        \column{0.25\textwidth}
        \includegraphics[width=\textwidth]{IMG_2459_1000}

        \includegraphics[width=\textwidth]{IMG_2539_1000}
    \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}

%\begin{frame}{Schedule and prospects}
    %%\begin{columns}
    %%\column{0.65\textwidth}
    %\begin{itemize}
        %\item This year's commissioning data is sufficient to understand the real backgrounds and sensitivity of the displaced vertex search
            %\begin{itemize}
                %\item Expect updated reach estimates before next fall
                %\item Some physics reach may be possible with this data
            %\end{itemize}
        %\item SeaQuest will run with polarized target (E1039) in 2018 and 2019: dark photon search will run parasitically
        %\item Possible PID upgrade (using recycled PHENIX EMCal) may add sensitivity to dielectron decay channel
    %\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}{Plans for the hardware in 2018}
    %\begin{columns}
    %\column{0.65\textwidth}
    \begin{itemize}
        \item Debug bad channels
        \item Connect remaining St1 channels (31-80) and commission 160-channel V1495 firmware
        \item Possible V1495 firmware development:
            \begin{itemize}
                \item E1039 target-dump separation trigger
                \item Enable Fermilab daughterboard for buffer and input
            \end{itemize}
        \item EMCal upgrade: recycled PHENIX EMCal goes between station 3 and the muon wall (funding proposal submitted)
    \end{itemize}
    \begin{center}
        \includegraphics[width=0.6\textwidth]{emcal}
    \end{center}
    %\column{0.35\textwidth}
    %\includegraphics[width=\textwidth]{st1_done_1000}
    %\end{columns}
\end{frame}

\appendix
\backupbegin

\begin{frame}{Backup: 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}{Backup: 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}{Backup: 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}{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}
