}\par\vspace{0.5em}% Adds spacing between each field
}
}
\begin{document}
\title{KM3NeT Dataformat Specifications}
\author{Tamas Gal and Mieke Bouwhuis}
\author{Tam\'as G\'al}
\date{\today}
\maketitle
\tableofcontents
\section{Detector Description (DETX, DATX)...}
\part{Detector Description}
The KM3NeT detector description is stored in two different file formats: ASCII
(.detx) and binary (.datx). The ASCII version uses UTF-16 encoding. The file
contains information about the position of the active elements (anchors, DOMs
and PMTs) of the detector and the timing information.
\section{DETX}
\subsection{Version 1 (August 2014)}
\begin{lstlisting}
global_det_id ndoms\n
dom_id line_id floor_id npmts\n
pmt_id_global x y z dx dy dz t0 additional_parameters\n
pmt_id_global x y z dx dy dz t0 additional_parameters\n
...
pmt_id_global x y z dx dy dz t0 additional_parameters\n
#repeat for each dom
\end{lstlisting}
\datafield[int]{global_det_id}{The global detector identifier. Negative values between -100 and 0 are indicating simulation detectors. It is 1 for the PPM-DU and follows the KM3NeT serial number for all detectors in testing and the sea.}
\datafield[unsigned int]{ndoms}{Number of optical modules, can be 0, which automatically means the ``end of the file''.}
\datafield[int]{dom_id}{The unique optical module ID. For real detectors, the number is part of the product number and is usually the last 9 digits of the CLBs MAC address).}
\datafield[int]{line_id}{The string number.}
\datafield[int]{floor_id}{The floor number starting at 1. In some older DETX files, this might be -1. In this case, the floors are assumed to be numbered strictly monotonically increasing as they appear in the file.}
\datafield[unsigned int]{npmts}{The number of PMTs. Can be 0.}
\datafield[int]{pmt_id_global}{The unique global PMT ID. When applicable, the ID corresponds to the ID in the MC files or the KM3NeT product number.}
\datafield[int or float]{x, y, z}{The position of the PMT.}
\datafield[int or float]{dx, dy, dz}{The direction where the PMT is pointing at.}
\datafield[int or float]{t0}{The calibration time offset which has to be added to the detected hit times.}
\datafield[int or float]{Optional (undocumented) calibration values might appear here.}
\alertinfo{Within each DOM section, the PMTs are listed according to an ascending order of their channel ID, starting at 0.}
\subsubsection*{Example}
Example for DU-2 (ARCA-DU1) at its test in the dark room (detector-ID 5) this is: