\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb,amsfonts}  % Typical maths resource packages
\usepackage[pdftex]{graphicx}          % Packages to allow inclusion of graphics
\usepackage{color}                     % For creating coloured text and background
\usepackage[pdftex,colorlinks,linkcolor=webgreen,filecolor=webbrown,urlcolor=webbrown,
            citecolor=webgreen,pagebackref,plainpages=false]{hyperref}

\pdfcompresslevel=9
\pdfoutput=1

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\DeclareGraphicsExtensions{.jpg,.pdf,.png,.mps}

\parindent 0.0cm
\parskip 0.2cm
\topmargin 0.2cm
\oddsidemargin 1cm
\evensidemargin 0.5cm
\textwidth 15cm
\textheight 22.5cm

\hyphenation{}

%===========================================================================
\begin{document}
%===========================================================================

\begin{center}
{\Large Alice TPC Numbering Conventions}\\
\bigskip
C. Lippmann and D. Vranic \\
\bigskip
First Version: October 12th, 2007\\
Last updated: November 18th, 2011
\end{center}
\bigskip
\bigskip

%===========================================================================
%===========================================================================
\section{General remarks}

\begin{itemize}
%\item If not explicitly stated, the view point is in the center (interaction point).
\item Top-bottom (up-down) refers to the ROC (Readout chamber) position in the
  top sector (Sector 04).
\item The Pads are aligned in rows which are numbered from bottom to top.
\item Numbering always starts with zero, from left to right, and from bottom to top.
\end{itemize}

The TPC is divided into 18 sectors on 2 sides. The numbering of the 72 sectors
is given in Fig. \ref{PicTPC}.


\begin{figure}[p]
  \begin{center}
    \includegraphics[width=13cm]{FIG1}
    \caption{Numbering of the 36 TPC sectors looking from outside the TPC (from
      the shaft for A-side and from the muon system for C-side.}
    \label{PicTPC}
  \end{center}
\end{figure}


%===========================================================================
\section{Coordinate System}

The ALICE coordinate system, azimuthal and polar angle definitions and basic
guidance for the logical numbering of the detector components is outlined in Ref.
\cite{alice}. The origin of the coordinate system is at the beam interaction
point.

\begin{itemize}
\item The $x$-coordinate is horizontal and perpendicular to beam direction. Positive $x$
  is pointing towards a vertival line through the accelerator centre.
\item The $y$-coordinate is perpendicular to the $x$-axis and to the beam direction.
  It is pointing upward with an angle of 3.5875 mrad with respect to the vertical.
\item The $z$-coordinate is parallel to the beam direction, positive $z$ pointing
  towards RB24 (the shaft side), negative $z$ points towards RB26 (Muon side).
  It makes an angle of +3.5875 mrad (upwards) with respect to the local horizontal
  plane.
\item The $\phi$-coordinate increases counter-clockwise from the $x$-axis
  ($\phi=0$) to the $y$-axis ($\phi=\pi/2$) looking from the shaft side towards
  the muon side.
\item The $\theta$-coordinate increases from positive $z$ to the $x,y$-plane
  ($\theta=\pi/2$) and the negative $z$-axis ($\theta=\pi$).
\end{itemize}

The following are the definition of some sides of the experiment:

\begin{description}
\item[A side]: positive z (shaft side, positive $z$),
\item[C side]: negative z (muon side, negative $z$), 
\item[I side]: positive x (towards LHC centre, positive $x$),
\item[O side]: negative x (towards Jura, negative$x$).
\end{description}


%===========================================================================
\section{Global properties of the read-out modules}

Here the properties of every one of the 36 IROCs and 36 OROCs are described.

%===========================================================================
\subsection{Inner Readout Chamber (IROC)}

In the following the properties of an Inner Readout Chamber (IROC) are given:

\begin{itemize}
\item Number of pads: 5504,
\item Number of pad rows: 63,
\item Pad dimensions: 4x7.5\,mm$^2$.
\end{itemize}

Here a few important sizes and distances are given:

\begin{itemize}
\item Distance  from the center to the bottom of the pad plane:  836.5\,mm,
\item distance  from the center to the bottom of the first pad row:  848.5\,mm,
\item distance  from the center to the top of the last pad row: 1321\,mm,
\item distance  from the center to the top of the pad plane:  1333\,mm.
\end{itemize}

\begin{figure}[p]
  \begin{center}
    \includegraphics[width=15cm]{FIG3}
    \caption{Pad side view of an IROC.}
    \label{PicIrocPP}
  \end{center}
\end{figure}

An image of the pad plane is shown in Fig. \ref{PicIrocPP}. 

\clearpage

%===========================================================================
\subsection{Outer Readout Chamber (OROC)}

The Outer Readout Chamber (OROC) has pads of two different sizes. In the
following the properties of an OROC are given:

\begin{itemize}
\item Number of pads: 9984,
\item Number of pad rows: 96 (64+32),
\item Pad dimensions: 6x10\,mm$^2$  (64 pad rows) + 6x15\,mm$^2$  (32 pad rows).
\end{itemize}

Here some important sizes and distances are given:

\begin{itemize}
\item Distance  from the beam line to the bottom of the pad plane: 1335\,mm,
\item distance  from the beam line  to the bottom of the first pad row: 1346\,mm,
\item distance  from the beam line  to the top of the last pad row: 2466\,mm,
\item distance  from the beam line  to the top of the pad plane:  2477\,mm.
\end{itemize}

\begin{figure}[p]
  \begin{center}
    \includegraphics[width=15cm]{FIG5}
    \caption{Pad side view of an OROC.}
    \label{PicOrocPP}
  \end{center}
\end{figure}

An image of the pad plane is shown in Fig. \ref{PicOrocPP}. 

\clearpage


%===========================================================================
\subsection{Sector Properties}

One TPC sector consists of an IROC and an OROC. In the following the
properties of on sector are described. 

\begin{itemize}
\item Number of pads: 15488 (5504+9984)
\item Number of pad rows: 159 (63+64+32)
\item IROC module height (mm): 496.5 
\item OROC module height (mm): 1142
\end{itemize}

For the 36 TPC sectors (2x18) the total number of pads is 557568 (36x15488).

%===========================================================================
%===========================================================================
\section{Readout Electronics}

Here we describe how the readout electronics is segmented and how it is connected
to the TPC readout pads on the two chamber types (IROC and OROC).

%===========================================================================
\subsection{Readout Partitions, Readout Control Units}

The readout electronics is arranged in 6 partitions, each controled by one RCU
(Readout Control Unit). The partitions are numbered from 0 to 5 from bottom to
top. Each Rcu is read out with one DDL (Detector Data Link). Thus there are 216
Rcu's and 216 DDLs.

%===========================================================================
\subsection{Frontend Cards}

Each Rcu reads out a number of FECs (Frontend Cards). The number of  FECs used
per partition varies and is given in the following table:

\begin{figure}[p]
  \begin{center}
    \includegraphics[width=15cm]{FIG4}
    \caption{Backside view of an IROC showing the FEC and Connector numbering.}
    \label{PicIrocFex}
  \end{center}
\end{figure}

\begin{figure}[p]
  \begin{center}
    \includegraphics[width=15cm]{FIG6}
    \caption{Backside view of an OROC showing the FEC and Connector numbering.}
    \label{PicOrocFex}
  \end{center}
\end{figure}


\begin{center}
  \begin{tabular}{|c|c|c|}\hline
    Partition/ & Number of FECs & Chamber type \\
    Rcu \#     & ($N_{FECS}$)   & \\ \hline
    0          & 18             & IROC \\
    1          & 25             & IROC \\
    2          & 18             & OROC \\
    3          & 20             & OROC \\
    4          & 20             & OROC \\
    5          & 20             & OROC \\ \hline
    total      & 121            &      \\ \hline
  \end{tabular}
\end{center}

For an IROC we find a number of Front End Cards of 43 (18+25), for an
OROC we find 78 (18+20+20+20). For a sector we have 121 FECs and for the
TPC the total number of FECs is 4356 (36x121).

Frontend Cards are numbered from 0 to $N_{FECS}$ from left to right (again
looking from the interaction point). As a consequence the numbering increases
with $\phi$ on the A side and decreases with $\phi$ on the C side. Thus FECs
are always numbered from right to left looking from outside the TPC (from
either muon side or shaft side)\footnote{There exists also a second
  numbering, which shall be mentioned here for completion: For configuration
  of the Altros and FECs the hardware is adressed using a numbering scheme
  where each partition is divided in two branches (branch $A$ and $B$).
  The two branches have 9 (10) FECs each for partitions 0 and 2 (for
  partitions 3-5). Partition 1 has 13 FECs in branch A and 12 in branch B.
  For each branch FEC 0 is in the center of the partition, with the two
  FECs 0 next to each other. This numbering shall only concern the
  hardware experts but can become important for offline code related to
  FEE calibration and configuration.}.


%===========================================================================
\subsection{Altros}

Each FEC carries eight Altro chips with 16 channels each. The Altros are
numbered from bottom to top with respect to the groups of pads they are 
connected to (irrespective their position on the FEC).

The Altro channels are numbered from 0 to 16. The mapping to ROC pads is
rather complicated and is provided for example to the offline code by
a dedicated mapping file.


%===========================================================================
\subsection{Signal Cables}

Each Frontend Card (FEC) is connected to the ROC with six flat cables and 23-pin
connectors. The connectors for each FEC are numbered from 0 to 5 from bottom to
top. Pins 0 and 22 on connectors 0, 2, 3,  5, and pin 11 on connectors 1,
and 4, are used for grounding (See Fig. \ref{PicSigC}). Connector pin numbers
are the same on the ROC and on the FEC. The mapping to connector pin
numbers to Altro channels is rather complicated and is provided by means of
a dedicated mapping file.

\begin{figure}[p]
  \begin{center}
    \includegraphics[height=20cm]{FIG2}
    \caption{Signal cable and connector numbering. Numbering increases from
    bottom to top (from the beam axis outwards).}
    \label{PicSigC}
  \end{center}
\end{figure}

\clearpage

%===========================================================================
%===========================================================================
\section{Offline Code}

In the offline code the sectors are numbered slightly different, depending on
whether the interest lies in Readout Chambers or tracking.

%===========================================================================
\subsection{Offline Readout Chamber Numbering}

Here each ROC (IROC and OROC) has its own number\footnote{A ROC is often called
'sector' in the offline code, which might be confusing. ROCs should not be confused
with sectors.}. The reason lies mainly in the
fact, that the pad sizes are different for IROCs and OROCs resulting in different
gain and pad response functions (the OROCs are further divided in regions with
two different pad sizes). Moreover the distance between wire and padplanes is
different for IROC and OROC. Due to these differences, which are visible in the
detector data, the sectors are divided in the way shown in Fig. \ref{PicTPC2}
and in the following table. 


\begin{figure}[p]
  \begin{center}
    \includegraphics[width=13cm]{FIG7}
    \caption{Numbering of the 72 ROCs in the offline code.}
    \label{PicTPC2}
  \end{center}
\end{figure}

\begin{center}
  \begin{tabular}{|c|c|c||c|}\hline
    Side & Sector & ROC Type & ROC (Offline) \\ \hline
    A    & 0      & IROC     & 0  \\
    A    & 0      & OROC     & 36 \\
    A    & 1      & IROC     & 1  \\
    A    & 1      & OROC     & 37 \\
    A    & 2      & IROC     & 2  \\
    A    & 2      & OROC     & 38 \\
    A    & ..     & ..       & .. \\
    A    & ..     & ..       & .. \\
    A    & 16     & IROC     & 16 \\
    A    & 16     & OROC     & 52 \\ 
    A    & 17     & IROC     & 17 \\
    A    & 17     & OROC     & 53 \\ \hline
    C    & 0      & IROC     & 18 \\
    C    & 0      & OROC     & 54 \\
    C    & 1      & IROC     & 19 \\
    C    & 1      & OROC     & 55 \\
    C    & 2      & IROC     & 20 \\
    C    & 2      & OROC     & 56 \\
    C    & ..     & ..       & .. \\
    C    & ..     & ..       & .. \\
    C    & 16     & IROC     & 34 \\
    C    & 16     & OROC     & 70 \\
    C    & 17     & IROC     & 35 \\
    C    & 17     & OROC     & 71 \\ \hline
  \end{tabular}
\end{center}


%===========================================================================
\subsection{Tracking Numbering Schema}

In the offline tracking code the numbering schema is again different. Here we
do not distinguish between A and C side. We have just 18 segments. The numbering
follows the SECTOR numbering on the A side, as shown in Fig. \ref{PicTPC}.


%===========================================================================                                           
\begin{thebibliography}{99}

\bibitem{alice} ALICE, Definition of the ALICE Coordinate System and basic rules for
  Sub-Detector Components numbering, ALICE-INT-2003-038.

\end{thebibliography}

\end{document}

%===========================================================================                                           
\end{document}
