Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
\section{Pixel Data Format}\label{sec:Pixel}
%% Danek Kotlinski, first version from 25/5/05
The pixel Front End Driver (FED) readout board will read 
data from 36 input links, build events, and send the event
packets through the S-link to the DAQ.
During the event building it has to reconstruct pixel
addresses from the 6-level analog signals. This procedure
requires a set of pre-programmed threshold levels. 

Each FED will send to the DAQ a data packet starting with the standard
packet header and ending with the standard packet trailer.
The header includes a bit field identifying uniquely the FED.
Between the header and the trailer there will be a variable number of 
32-bit data words, with one pixel stored per word.
The format of the 32-bit word is:
\begin{itemize}
\item 6-bit Link id, defines the input link to the FED (0-35);
\item 5-bit ROC id, defines the ROC within one link (0-23);
\item 5-bit Double-Column id, define the double column within
on ROC (0-25);
\item 8-bit Pixel id, define the pixel address within on
Double-Column (0-179);
\item 8-bit ADC value, the signal amplitude, extracted from a
10-bit ADC.
\end{itemize}
Table~\ref{tab:pix1} summarizes the pixel format.

Note that in our data format the source id (FED number) is not 
included. We depend on the source id included in the DAQ S-link 
header. This header should be available in the code which will 
transform the raw data format to the format used in the reconstruction 
code.

% Pixel data format
\begin{table}[htb]
  \caption{Pixel readout format}\label{tab:pix1}
    \begin{bittabular}{32}
      & \bitNumFourByte
      \bitline{pixel&\field{6}{LINK-ID}&\field{5}{ROC-ID}&\field{5}{DCOL-ID}&
	\field{8}{PIX-ID} & \field{8}{ADC}}
      \bitline{ & 5&4&3&2&1&0 & 4&3&2&1&0 & 4&3&2&1&0 & 7&6&5&4&3&2&1&0 &
	7&6&5&4&3&2&1&0}
     %%  & \bitNumFourByte
    \end{bittabular}
\end{table}

Based on this format the FED data volume in bytes is calculated as
4 * (3 + number-of-pixels).
The pixel barrel readout has been arranged in such a way to
approximately fit the requirement of 2.0~kB per FED at high luminosity.
For the low luminosity pp collisions, the pixel data volume for
the barrel FEDs will be around 0.6~kB per event.
The difference between various FEDs should be around 10\%.
For the pixel endcaps the data volume per FED will be smaller, 
about 1.8(0.55) kB per event at high(low) luminosity.

When reading data over VME an alternative "raw" data format
is foreseen in addition to the standard one. This format
will be only used during the level calibration procedure
performed in a XDAQ client application and will never be used
in ORCA.

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "DataFormats"
%%% End: