%%% ==== C1 ============================================================
%%%
\section{The TGCs for the New Small Wheel}
%%%
%%% ====================================================================


In this section of the Appendix we present more technical details about the sTGC concept.


%%% ==== C1 ============================================================
%%%
\subsection{Latency of the sTGC trigger and the sTGC trigger demonstrator}
\label{appendix:Latency}
%%%
%%% ====================================================================

To be used in phase I of the LHC upgrade, the overall trigger latency must be less than 2.55\,$\mu s$.
This means for the sTGC trigger that the signals from the chamber frontend must arrive
at the input of the Sector Logic in USA15 not later than 1.05\,$\mu s$ after the occurrence of the collision
at the interaction point. Table~\ref{appendix:latency} lists the delays contributing to the sTGC latency.

%%%%%%%%%%%%%%%%
\begin{table}[!htb]
    \centering
    \begin{tabular}{lrrl}
                                             & Min (ns) & Max (ns) & Notes                         \\
 \hline
TOF from interaction point to SW (10\,m)        &  35   &  35   &                                                        \\
propagation delay in chamber                    &  25   &  25   &                                                        \\
ASD                                             &  10   &  10   &                                                        \\
on-chamber cabling (1.5-2.5\,m) to selector     &  8    &  13   & 5\,nsec/m                                              \\
up- to down-stream package (50\,cm)             &  0    &  3    &                                                        \\
delay for pad trigger and deskew                &  15   &  25   &                                                        \\
"deserializer" e.g. 1:10                        &  11   &  12   & 10 1\,ns  "deserialized" to 10-bit  \\
latency for the last sample of the pulse        &  64   &  100  & depends on shaping time;  \\
accumulate the last 10 ns sample into ToT       &  10   &  10   &                                                        \\
selector                                        &  5    &  10   & switch                                                 \\
serializer to off-chamber logic                 &  5    &  10   &                                                        \\
on-chamber to off-chamber link                  &  0    &  0    &  along the 90m fibre below                    \\
deserializer                                    &  5    &  10   &                                                        \\
find valid centroids and centroid averages      &  32.5 &  65   & 8 layers done in parallel,  13 clocks    \\
difference of centroid averages                 &  2.5  &  5    &                                                        \\
calc sub-ROI pointed to at Big Wheel (LUT)      &  5    &  5    & data sheet BRAM access 2\,nsec                    \\
%resynch to BC clock driving output serializer   &  0    &  6.25 & 90� phase chosen to best match pipeline length         \\
output serializer                               &  50   &  75   & GBT: 3 40\,MHz clocks                                  \\
fiber to Sector logic 90\,m                     &  495  &  495  & 5.5\,nsec/m                                            \\
 \hline
                                          &  {\bf 778}  &  {\bf 908}  &                                                  \\
 \hline
\end{tabular}

\caption{sTGC Latency - The table shows the delays contributing to the latency of the precision strip trigger logic
from the interaction point to the Sector Logic in USA15.
All numbers are estimates except that for the centroid finder which has been measured for the demonstrator.}
\label{appendix:latency}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%


A demonstrator for sTGC trigger concept has been built and the latency of a realistic centroid finding and averaging algorithm has been measured.
A block diagram of the demonstrator is shown in Fig.~\ref{appendix:TGC1} and a photograph in \ref{appendix:TGC2}).
The centroid is the sum of each strip's "charge" weighted by the strip position. The division by the total charge is done using a Look-up-Table.
The algorithm calculates with more than reasonable precision (12 bits for expressing the fraction of a strip part of the coordinate)
and includes offsets for each layer and two overlapping channels on each edge. Isolated clusters of up to five strips are considered valid.
Only the 1, 2, 3, or 4 valid centroids are selected for inclusion in the average of the centroids.
The measured latency of the algorithm whose input is the time-over-threshold values and output is the average of the valid centroids, is 13 clocks.
The current clock is 5\,ns (200\,MHz) but the optimization of the number of clocks versus clock rate has not been completed.
The demonstrator was connected to an sTGC quadruplet and was triggered by cosmic rays.
Fig.~\ref{appendix:TGC3} shows the four input strip profiles and the four calculated output centroids for a cosmic ray.

The next generation demonstrator for developing trigger algorithms and processing will be a completely custom board design.


%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[!htb]
   \centering
%%\vspace{-2 pt}
%%% \includegraphics[width=16cm]{Figures/TGC2.pdf}
\includegraphics[width=14cm]{Figures/TGC2}

\vspace{8mm}

\caption{Block diagram of the sTGC trigger as presently implemented in an FPGA demonstrator.}

\label{appendix:TGC1}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%

\vspace{2mm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[!htb]
   \centering

%%%  \includegraphics[width=16cm]{Figures/TGC15.pdf}
\includegraphics[width=0.6\linewidth,clip]{Figures/TGC15}
\caption{The trigger demonstrator board based on a commercial evaluation board (Xilynx ML605 with Virtex-6 FPGA).
LVDS cables from eight TGC ASD modules are connected to the FPGA via custom mezzanine cards.
These cards provide the required non-standard LVDS termination and merge power, threshold and test pulse lines
from an external NIM module onto the cables to the ASDs. 64 strips and 44 pads are read out.}
\label{appendix:TGC2}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[!htb]
   \centering

%%%  \includegraphics[width=16cm]{Figures/TGC16.pdf}
\includegraphics[width=0.5\linewidth,clip]{Figures/TGC16}
\caption{The four input strip profiles and the four calculated output centroids for a cosmic ray passing through a quadruplet.
The centroid locations calculated by the demonstrator are on the left and are plotted as diamond symbols.
The dashed line is the calculated average.}
\label{appendix:TGC3}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%

%%% ==== C2 ============================================================
%%%

\subsection{Readout}
The readout architecture will be the standard ATLAS readout with pipeline and derandomizer.
The readout must support the requirements for commissioning, timing and problem diagnosis as well as the requirements for normal data taking.
The current parameters and functionality of the GBT look appropriate.

\begin{itemize}
\item General Requirements:

\begin{itemize}\itemsep2pt
\item Readout per pair of quadruplets, i.e. a tower
\item pipeline depth and rate for Phase~II Level-1 trigger rate (500kHz) and latency.
\item Radiation tolerant
\end{itemize}

\item Strip readout:

\begin{itemize}\itemsep2pt
\item converted Time-over-Thresholds of the selected strips in each layer (20*8*500kHz = 80Mb/s per layer)
(Note that this means that channels not selected by the pad trigger will not be read out.)
\item centroids per layer and the centroid averages (32-bits each)
\item the extrapolated sub-sector on the Big Wheel (i.e. the input to the Sector Logic) (less than 16 bits)
\item BCid (12-bits), L1Id (12-bits), source id (8-bits), etc.
\end{itemize}

\item Pad readout:

\begin{itemize}\itemsep2pt
\item pad hit pattern for each layer for the triggering BC, previous and next BCs. (about 80 pads per layer)
\end{itemize}

\item Wire readout:

\begin{itemize}\itemsep2pt
\item wire hit pattern for the selected wires in each layer, for the triggering BC, previous and next BCs. (about 70 wire-groups per layer)
\end{itemize}

\end{itemize}


The estimated data per trigger for a quadruplet is about 1600 bits.
The GBT payload capacity of 3200\.Mb/sec is easily sufficient for two quadruplets at a Level-1 trigger rate of 0.5\,MHz.


%%% ==== C3 ============================================================
%%%
\subsection{Milestones for the sTGC electronics}
\label{appendix:TGC_project}
%%%
%%% ====================================================================

The milestones for prototyping, development and production of the sTGC trigger electronics are given in
Table~\ref{tab:TGC2}.


%%%%%%%%%%%%%%%%
 \begin{table}[!htb]
    \centering
    \begin{tabular}{llll}
      Date & Milestone \\
      \hline
   August 2011   & Demo-0 & Goal    & Demonstrate total latency, ASD to Sector Logic input,  \\
                 &        &         & of pad local trigger, strip selection and sub-sector calculation  \\
                 &        &         & from centroids in an FPGA. \\
                 &        & Includes& KEK TGC ASDs and Carioca ASDs, 4 layers of 16 strips,  \\
                 &        &         & 4 layers of 8 or 14 pads, simple non-pipelined readout,  \\
                 &        &         & based on commercial FPGA eval board \\
                 &        & Excludes& links and fibers, pipelined readout, rad tol technology\\
   January 2012  & Demo-1 & Goal    & Add channels to do full 8-layer logic, 64 strips per layer \\
                 &        & Includes& based on purpose built FPGA board\\
                 &	  & Excludes& pipelined readout, rad tol technology \\
   March 2012    & Demo-1a& Goal    & Run with BNL VMM Front End chip (ASD only) \\
   Early 2012    &        &         & Define on-chamber/off chamber split and choose link hardware. \\
                 &        &         & Design on-chamber boards \\
                 &        &         & produce rad tol ASICs for on-chamber part \\
                 &        &         & 2nd spin of rad tol ASICs  \\
                 &        &         & design off-chamber boards  \\
                 &        &         & production of on- and off-chamber boards  \\
      \hline
    \end{tabular}
    \caption{sTGC trigger development schedule}
    \label{tab:TGC2}
  \end{table}
%%%%%%%%%%%%%%%%%%%%%%%%

\newpage

%%% ==== C4 ============================================================
%%%
\subsection{sTGC Construction and testing}
\label{appendix:sTGCConstruct}
%%%
%%% ====================================================================

The construction procedure of sTGC�s follows very close the one used for the Big-Wheels TGC, where many new elements were introduced after completing the first 1,000 TGC chambers to increase the reliability of the detectors. This procedures include many QC steps, which correspond to 30\% of the production steps. Furthermore, the Laboratory at the Weizmann Institute has been greatly improved by introducing a new resistive layer spraying Machine - see Fig.~\ref{appendix:TGC-graphite}), as well as improvements in the wiring machine Fig.~\ref{TGC18} (Right) and in the clean room (Fig.~\ref{TGC18} (Left) to close the detectors. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[!htb]
   \centering

%%% \includegraphics[width=12cm]{Figures/TGC17.pdf}
\includegraphics[width=12cm]{Figures/TGC17}
\caption{new fully automatic graphite spraying machine recently installed at the Weizmann TGC facility, in a fully controlled Temperature and Humidity room.}
\label{appendix:TGC-graphite}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%

%% Fig. 18  %%%%%%%%%%%%

\begin{figure}[!htb]
   \centering
%%% \vspace{-2 pt}
%%%   \includegraphics[width=16cm]{Figures/TGC12.pdf}
\includegraphics[width=0.45\linewidth,clip]{Figures/TGC18a}
\hspace{5mm}
\includegraphics[width=0.45\linewidth,clip]{Figures/TGC18b}
\caption{
Left: new clean room to close TGC detectors. Right: improved wiring machine at the Weizmann TGC facility.}
\label{TGC18}

\end{figure}

%%%%%%%%%%%%%%%%%%%%%%%%


These improvements were introduced for the production of spare detectors for the Japanese made TGC�s that are presently being constructed, in collaboration with engineers from Shandong University (China), where 500 TGC�s were made in the past, and were there is a strong interest to continue the previous collaboration. Similarly, groups from Argentina and Chile would be interested in a possible collaboration, if the project is approved, which would allow to start a real hardware activity in these countries.
The final quality control procedure will be performed at the renewed Cosmic-Ray facilities at the Technion and Tel-Aviv University (see Fig.~\ref{appendix:TGC-TAU}), where every detector is scanned with cosmic rays. The final test, which has proven extremely effective in the detectors that were so tested, will be to irradiate them for half an hour in a new CO(60) irradiation facility that has been constructed at the SOREQ nuclear Center. This test is crucial to find any possible defects in a given detector.


%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[!htb]
   \centering

%%% \includegraphics[width=12cm]{Figures/TGC19.pdf}
\includegraphics[width=12cm]{Figures/TGC19}
\caption{Renewed TGC Test-bench facility at Tel Aviv University.}
\label{appendix:TGC-TAU}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%


%%% ==== C4 ============================================================
%%%
\subsection{sTGC cost estimate}
\label{appendix:sTGCCost}
%%%
%%% ====================================================================

The present cost estimates for the mechanical parts are based on the production of spare detectors, and although the quantities are smaller, and therefore the basic costs could go down, the sTGC�s will require additional work, due to the larger number of channels, therefore these values could be taken as a reasonable estimate. The break-down of the total number of detectors and their dimensions are given in Table~\ref{table-gasgaps}, while in Table~\ref{table-cost}, the expected costs for the Mechanics, Transport and testing are given. These costs include also local taxes and manpower, which are not part of the CORE estimates. Possible overheads by the institutions are not included. The expected cost of the electronics (including trigger) are given in a separate table

% --- Table  app-1 -------------------------------------------------------------------
%

\begin{table}[!ht]

 \begin{center}
    \begin{tabular}{|c|l|c|l|} \hline %{@{}llc@{}}

Chamber type & Appr. Dimensions & \# Modules-side & Gas-gaps-size\\
\hline
      \hline
  EIL0 &   1007x1094 (sub 2 W) & 16 & 2x64 ganged \\
  EIL1 & 1679x1275 & 16 & 64 \\
  EIL2 &   2050x1275 & 16 & 64  \\
\hline
  EIS0 &   715x1275 (sub 2W) & 16 & 2x64 ganged  \\
  EIS1 &   1080x1275 & 16 & 64  \\
  EIS2 &   1524x1094 & 16 & 64 \\

\hline 
Total & & 96 & 384 \\
\hline
Total 2 sides & & 192 & 768 \\
\hline

  \end{tabular}
 \end{center}

 \caption{break-down of the number of mechanical units and their respective number of gas-gaps.
		  \label{table-gasgaps}}

\end{table}

% --- Table  app-1 -------------------------------------------------------------------
%

\begin{table}[!ht]

 \begin{center}
    \begin{tabular}{|l|c|c|c|} \hline %{@{}llc@{}}

Item & CORE cost (KCHF)& TAX\& Overheads (KCHF) & Total (KCHF)\\
\hline
    Raw material & 580 & 97 & 677 \\
    Machining of part & 518 & 85 & 603 \\
    Wire & 330 & 54 & 384 \\
    Transport & 60 & 10 & 70 \\
    Cosmic test & 180 & & 180 \\
    Radiation test & 70 & & 70\\
    Tools & 80 & 13 & 93 \\
    Manpower & & 1500 & 1500 \\
    Equipment & 41 & 7 & 48 \\
    
    \hline
Total &  1859 & 1766 & 3625 \\
\hline

  \end{tabular}
 \end{center}

 \caption{Mechanical and testing costs of the production of 768 sTGCs gas-gaps.
		  \label{table-cost}}

\end{table}



