]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/doc/offline/tpc_offline_manual.tex
Iteration number stored into output file
[u/mrichter/AliRoot.git] / TPC / doc / offline / tpc_offline_manual.tex
CommitLineData
44d7408a 1\documentclass[a4paper,12pt]{article}
2\usepackage{graphicx}
3\usepackage[dvips]{epsfig}
4\usepackage{a4wide}
5\usepackage{amsmath}
6\parindent=0pt
7
8\begin{document}
9 \title{TPC Offline Manual}
10 \author{P.~Christiansen, H.~Helstrup, M.~Ivanov, M.~Kowalski,
11 and J.~Wiechula}
12 \date{v0.1, January 31, 2008}
13\maketitle
14\begin{abstract}
15 This document is meant to give an overview of TPC offline code
16 relevant for expert shifters and for people interested in analyzing
17 TPC data.
18\end{abstract}
19
20\tableofcontents
21
22\newpage
23
24
25
26\section{Environment setup on lxplus cern.ch}
27
28This part is valid only for login on lxplus.cern.ch. In case of problems contact marian.ivanov@cern.ch.
29
30
31{\bf{Alien setup:}}
32\begin{itemize}
33\item Use bash shell: {\it bash}
34\item {\it{source /afs/cern.ch/user/m/miranov/public/.balien}}
78087e95 35\item {\it alien-token-init \$USERNAME}
44d7408a 36\item Default message example - Your token is valid until: Sat Feb 9 15:21:17 2008
37\item In case of problem be sure that your certificate is fine.
38 e.g. Check the presence of the .globus director: ls ~/.globus
78087e95 39\item {\it source /tmp/gclient\_env\_\$UID}
44d7408a 40\end{itemize}
41
42{\bf{AliRoot setup:}}
43\begin{itemize}
44\item The central - default aliroot setup - type {\it new}
45\item The TPC setup - regularly updated HEAD version of HEAD. Use this setup if you want to use TPC specific features. The will be \\
46 {\it source //afs/cern.ch/user/m/miranov/public/.balice}
47\end{itemize}
48
49
50
51
52\section{Data Location and Access}
53
54
55\subsection{Raw data}
56
57The naming scheme for the raw files is:\\
58\texttt{<year2digits><runno9digits><gdc3digits>.<fileno>0.root}\\
59%FIXME: is this true?
60Example: 07000015067004.10.root
61
62A single tag file is created for each GDC.\\
63
64The directories depends on whether the run was recorded in standalone
65or in global mode. Unfortunately it is not always possible to see from
66the logbook overview if a run was started as a stand alone or a global
67run (DAQ is always standalone).\\
68
69% FIXME: is this true?
70
71\textbf{Standalone runs:}\\
72
73CASTOR: \texttt{/castor/cern.ch/alice/tpc/<year>/<month>/<day>/<hour>} \\
74AliEn: \texttt{/alice/data/<year>/LHC<year2digits><quarter>\_TPC/<runno>/raw/} \\
75
76Where \texttt{<quarter>} can be w (winter).\\
77
78% FIXME: update with all 4 quarters
79
80\textbf{Global runs:}\\
81
82CASTOR: \texttt{/castor/cern.ch/alice/data/<year>/<month>/<day>/<hour>}\\
83AliEn: \texttt{/alice/data/<year>/LHC<year2digits><quarter>/<runno>/raw/}
84
85\subsubsection{Access to raw data}
86
87The files located on CASTOR can be accessed directly from
88\texttt{lxplus} machines where one can use \texttt{nsls} to list files
89and \texttt{rfcp} to copy files to local disk. The files can also be
90accessed directly inside a ROOT session if ROOT is compiled with rfio
91option (\texttt{--enable-rfio}).
92
93Example of ROOT filename:\\
94\texttt{rfio:/castor/cern.ch/alice/tpc/2007/12/13/05/07000011524011.6380.root}\\
95Nb! You have to specify \texttt{rfio:} to let ROOT know that it is a
96remote/CASTOR file you wish to open.\\
97
98The data registered in AliEn can be directly streamed in ROOT (if ROOT
99is compiled with AliEn support). One has to get an AliEn token
100(\texttt{alien-token-init}) and then do\\
101\texttt{Tgrid::Connect("alien://");}\\
102inside root, aliroot or alieve.
103
104Example of ROOT path-name:\\
105\texttt{alien:///alice/data/2007/LHC07w\_TPC/000010897/raw/07000010897011.20.root}\\
106NB! \texttt{alien://} tells ROOT that it is an AliEn file you wish to
107open.
108
109\subsection{Reconstructed data}
110
111The automatically reconstructed data can be found on AliEn. Instead of the \texttt{raw} directory, the files are stored under \texttt{ESDs}.
112
113Example of directory with reconstructed files:\\
114\texttt{/alice/data/2007/LHC07w/000014493/ESDs/00120/}\\
115The name of the directory \texttt{00120} corresponds to the last 5
116digits in the raw file name.
117
118\subsubsection{Analysis of reconstructed data}
119
120An example AnalysisTask for looping over the clusters in reconstructed
121tracks is under development.
122
123An early working example can be found at:\\
124\texttt{http://www.hep.lu.se/staff/christiansen/tpc\_ana\_track\_example.tgz}
125
126\newpage
127
128\section{Data Monitors}
129
130There two types of monitors. The TPC pad monitor and the standard
131AliEve monitors.
132
133\subsection{The TPC Pad Monitor}
134
135The TPC pad monitor is maintained by Stefan Kniege as both an AliRoot
136and standalone application. The standalone application is used for
137installation on the TPC shift machine in the counting room.
138
139The AliRoot version can be run from inside an aliroot session like this:
140
141\begin{verbatim}
142.L $ALICE_ROOT/lib/tgt_linux/libTPCmon.so
143.L $ALICE_ROOT/TPC/macros/TPCMonitor.C
144TPCMonitor()
145\end{verbatim}
146
147Now the GUI starts and you should click:\\
148\texttt{Sel.Format} - Select ROOT and remember to press
149\texttt{Select Entry}\\
150\texttt{Sel.File} - Open file - can soon be alien file\\
151Press \texttt{Next Event} until the data is loaded\\
152
153\subsection{AliEve}
154
155AliEve is part of AliRoot and is a general purpose 3d graphical
156monitoring framework. It is called with the command
157\texttt{alieve}. The monitoring display for different detectors is
158controlled by macros. For the TPC, AliEve can be used to display both
159raw data and reconstructed data.\\
160
161To run the TPC raw display one has to call the following macro inside alieve:
162
163\begin{verbatim}
164.L ../test-macros/tpc_gui.C
165tpc_gui(<filename>, <event_no>)
166\end{verbatim}
167
168In the GUI you can double click on TPCLoader to control the many
169different draw options.
170
171Click \texttt{Help} to see how to navigate in the opengl window. You
172can also get the menu of graphical elements by clicking on them
173(\texttt{SHIFT+right click}) and see 1d projections of the raw data
174(\texttt{CTRL+left click}).
175
176% FIXME Need description of ESD monitor. Especially the nice one used by Marian.
177
178\newpage
179
180\section{Calibration, Shuttle and QA}
181
182\subsection{Calibration Classes}
183
184% FIXME: Needs input
185
186\subsubsection{AliTPCdataQA}
187
188This special calibration class is used for QA of raw data, but can
189also be run standalone. It is currently under development. The problem
190is how to extract relevant parameters from the raw data which are not
191dominated by the large noise.
192
193\subsection{The Shuttle}
194
195% FIXME: Needs input
196
197\subsection{TPC QA}
198
199A first version of the TPC QA have recently been committed. It
200contains the basic structure and a few histograms.
201
202The TPC QA is made in the standard ALICE QA framework and contains the
2033 classes:\\
204\texttt{AliTPCQAChecker, AliTPCQADataMakerSim,
205AliTPCQADataMakerRec}.
206
207The DataMaker classes makes the histograms from the relevant data ---
208hits and digits for \texttt{Sim}, and raw, rec points and ESDs for
209\texttt{Rec} --- and the Checker contains the rules for comparing the
210histograms to the reference histograms (which currently does not
211exist). The Checker is currently empty which means that the default
212comparison is employed.
213
214The implementation is slightly different than for the other QA classes
215since we have chosen to have histogram pointers in the class to make
216the class easier to debug. The only place where this could cause
217a problem is in the copy constructor where the histogram pointers have
218to be assigned after the ``lists'' have been copied. This has been
219implemented, but not tested.
220
221In the QA Checker for raw data we use the more powerful TPC
222calibration framework (the class AliTPCdataQA, see above) so that the
223method for handling the raw data QA is non-standard. Instead of
224filling the histograms in the \texttt{MakeRaws} method, the
225calibration object is filled, and it is first in the method
226\texttt{EndOfDetectorCycle} when we have called
227\texttt{AliTPCdataQA::Analyse} that the histogram is projected from
228the calibration object and added to the list.
229
230The QA can be run like this inside aliroot:
231
232\begin{verbatim}
233 AliQADataMakerSteer* dataMaker = new AliQADataMakerSteer();
234 dataMaker->Run("TPC", <type>, filename);
235\end{verbatim}
236
237Where \texttt{filename} does not have to be supplied for data in the
238same directory (except for raw data), and \texttt{<type>} can be:
239
240\begin{verbatim}
241AliQA::kRAWS
242AliQA::kHITS
243AliQA::kSDIGITS
244AliQA::kDIGITS
245AliQA::kRECPOINTS
246AliQA::kESDS
247\end{verbatim}
248
249\newpage
250
251\section{Simulation and Reconstruction}
252
253This section gives a short overview of the TPC simulation and
254reconstruction software. Other sources of information can be found in
255the ALICE TPC TDR~\cite{tpctdr}, the ALICE Physics Performance
256Reports~\cite{Carminati:2004fp,Alessandro:2006yt} (1: p.1620-1627,
257updated description of TPC, 2: p.~1326-1336, description of
258clustering, tracking algorithms and performance).
259
260The TPC simulation and reconstruction consists of the following steps:
261\begin{itemize}
262\item Energy loss simulation. The physics routine which is called by
263e.g. GEANT3. Output: TPC.Hits.root.
264\item Signal generation. The electrons drift to the ROCs and are
265amplified and digitized. Output: TPC.Digits.root.
266\item Clustering. The first step of reconstruction is the grouping of
267signals into clusters. The same algorithm is applied to real data and
268simulated data. Output: TPC.RecPoints.root.
269\item Tracking. The last step of reconstruction is the grouping of
270clusters into tracks. The same algorithm is applied to real data and
271simulated data. Output: AliESDs.root.
272\end{itemize}
273
274\subsection{Simulation}
275
276The simulation is currently only working for GEANT3 simulations, but
277work on FLUKA is ongoing.
278
279The ionization energy loss (except delta-rays) in the TPC gas volume
280by charged particles is \emph{not} handled by GEANT, but instead
281modeled inside the TPC software. The energy loss simulation is well
282described in the TPC TDR~\cite{tpctdr}, and is based on an old paper
283by Sauli. %FIXME: Get citation from Marek
284The implementation is done in: \\ \texttt{AliTPCv2::StepManager}
285(cross section and number of ionization electrons) and\\
286\textbf{\$ALICE/geant3/gphys/gfluct.F} (energy loss).
287
288The comparison of the energy loss simulation with test beam data is
289covered in the note~\cite{tpctune}.
290
291The Hits from the simulation are converted to Digits in: \\
292\texttt{AliTPC::Hits2Digits()} (the relevant methods are
293\texttt{MakeSector} (drift and amplification), \texttt{GetSignal}
294(signal), and \texttt{DigitizeRow} (digitization)).
295
296Both in pad and time a Gaussian response is assumed. If the final time
297response function after filtering and baseline restoration turns out
298to be asymmetric one could change this.
299
300\subsection{Reconstruction}
301
302Parameters used by the reconstruction are set in the AliTPCRecoParam,
303e.g., the CtgRange, which removes clusters with angles less than 45
304degrees (default) with respect to the beam axis, where the track
305density is too high in Pb+Pb collisions, but which are important in
306cosmic ray data.
307
308If one wants to have access to the TPC cluster information in the
309reconstructed tracks it is important to call\\
310\texttt{AliTPCReconstructor::SetStreamLevel(1)} and\\
311\texttt{reco.SetWriteESDfriend(kTRUE)}\\
312before calling the reconstruction.
313
314\subsubsection{Clustering}
315
316For each row in a sector the signals are stored in an array of size
317Ntimebins $\times$ Npads. In the code there is a loop over this matrix
318and for each peak (local maximum) one makes a cluster.
319% FIXME: starting from the highest maximum and going down?
320
321The clusters are matrices of 5 $\times$ 5 (pads $\times$ timebins) and
322the position in space and time is calculated from a charge weighted
323average over this matrix. The total charge $Q$ is the sum of all
324charge and $Q_{\text{MAX}}$ is the charge at the center of cluster
325(maximum).
326
327For small clusters a symmetrization algorithm is applied to the cluster
328which has been discussed if it should be removed since it introduces
329systematic binning effects.
330
331\subsubsection{Tracking}
332
333% FIXME: To be done
334
335
336\subsection{Reconstruction of raw data}
337
338% FIXME: Should we have a grid example here?
339
340\begin{thebibliography}{9}
341
342\bibitem{tpctdr} ALICE Collaboration, ``Time Projection Chamber'',
343 ALICE TDR 7, CERN/LHCC 2000-001.
344
345%\cite{Carminati:2004fp}
346\bibitem{Carminati:2004fp}
347 F.~Carminati {\it et al.} [ALICE Collaboration],
348 %``ALICE: Physics performance report, volume I,''
349 J.\ Phys.\ G {\bf 30}, 1517 (2004).
350 %%CITATION = JPHGB,G30,1517;%%
351
352%\cite{Alessandro:2006yt}
353\bibitem{Alessandro:2006yt}
354 B.~Alessandro {\it et al.} [ALICE Collaboration],
355 %``ALICE: Physics performance report, volume II,''
356 J.\ Phys.\ G {\bf 32}, 1295 (2006).
357 %%CITATION = JPHGB,G32,1295;%%
358
359\bibitem{tpctune} P.~Christiansen and P.~Gros, for the Alice TPC
360 Collaboration, ``Benchmarking the AliRoot TPC simulation against the
361 2004 TPC test beam data'', draft for ALICE note.
362
363\end{thebibliography}
364\end{document}
365