]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/doc/doc.tex
Documentation of the analysis code (mostly on the stuff
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / doc / doc.tex
1 \documentclass[11pt]{article}
2 \usepackage[margin=2cm,twoside,a4paper]{geometry}
3 \usepackage{amstext}
4 \usepackage{amsmath}
5 \usepackage[ruled,vlined,linesnumbered]{algorithm2e}
6 \newcommand{\AbbrName}[1]{{\ifmmode\text{\scshape #1}\else{\scshape #1}\fi}}
7 \newcommand{\SPD}{\AbbrName{spd}}
8 \newcommand{\ESD}{\AbbrName{esd}}
9 \newcommand{\AOD}{\AbbrName{aod}}
10 \newcommand{\INEL}{\AbbrName{inel}}
11 \newcommand{\INELONE}{$\AbbrName{inel}>0$}
12 \newcommand{\NSD}{\AbbrName{nsd}}
13 \newcommand{\FMD}[1][]{\AbbrName{nsd\ifx|#1|\else#1\fi}}
14 \newcommand{\dndetadphi}[1][]{{\ensuremath% 
15     \ifx|#1|\else\left.\fi%
16     \frac{d^2N_{ch}}{d\eta\,d\varphi}%
17     \ifx|#1|\else\right|_{#1}\fi%
18 }}
19 \newcommand{\landau}[1]{{\ensuremath% 
20     \text{landau}\left(#1\right)}}
21 \newcommand{\dndeta}[1][]{{\ensuremath% 
22     \ifx|#1|\else\left.\fi%
23     \frac{1}{N}\frac{dN_{ch}}{d\eta}%
24     \ifx|#1|\else\right|_{#1}\fi%
25 }}
26 \setlength{\parskip}{1ex}
27 \setlength{\parindent}{0em}
28
29 \title{Analysing the FMD data for $\dndeta$}
30 \author{Christian Holm
31   Christensen\footnote{\texttt{$\langle$cholm@nbi,dk$\rangle$}}\quad\&\quad
32   Hans Hjersing Dalsgaard\footnote{\texttt{$\langle$canute@nbi,dk$\rangle$}}\\ 
33   Niels Bohr Institute\\
34   University of Copenhagen}
35 \date{\today}
36 \begin{document}
37 \maketitle 
38
39 \section*{Introduction}
40
41 This document describes the steps performed in the analysis of the
42 charged particle multiplicity in the forward pseudo--rapidity
43 regions. 
44
45 The analysis is performed as a two--step process.  
46 \begin{enumerate}
47 \item The Event--Summary--Data (\ESD{}) is processed event--by--event
48   and passed through a number of algorithms, and
49   $\dndetadphi$ for each event is output to an Analysis--Object--Data
50   (\AOD{}) tree.
51 \item The \AOD{} data is read in and the sub--sample of the data under
52   investigation is selected (e.g., \INEL{}, \INELONE{}, \NSD{}, or
53   some centrality class) and the $\dndetadphi$ histogram read in for
54   those events to build up $\dndeta$
55 \end{enumerate}
56 The details of each step above will be expanded upon in the
57 following. 
58
59 \section*{Generating $\dndetadphi[i]$ event--by--event}
60
61 When reading in the \ESD{}s and generating the $\dndetadphi$
62 event--by--event the following steps are taken (in order) for each
63 event $i$
64 \begin{description}
65 \item[Event inspection] The global properties of the event is
66   determined, including the trigger type, vertex $z$ coordinate, and
67   whether this is a low--flux event or not. 
68 \item[Sharing filter] The \ESD{} object is read in and corrected for
69   sharing.  The result is a new \ESD{} object.
70 \item[Density calculator] The (possibly un--corrected) \ESD{} object
71   is then inspected and an inclusive, per--ring charged particle
72   density $\dndetadphi[incl,r,v,i]$  is made.  This
73   calculation depends in general upon the interaction
74   vertex\footnote{In the following simply labelled 'primary vertex' or
75     'vertex'.} position along the $z$ axis ($v_z$).  
76 \item[Corrections] The 5 $\dndetadphi[incl,r,v,i]$ are
77   corrected for secondary production, event selection efficiency, and
78   possibly the sharing efficiency.  These corrections are highly
79   dependent on the vertex $z$ coordinate.  The result is an per--ring,
80   charged primary particle density $\dndetadphi[r,v,i]$
81 \item[Histogram collector] Finally, the 5 $\dndetadphi[r,v,i]$ are
82   summed into a single $\dndetadphi[v,i]$ histogram, taking care of
83   the overlaps between the detector rings.  In principle, this
84   histogram is independent of the vertex, except that the
85   pseudo--rapidity range, and possible holes in that range, depends on
86   $v_z$ --- or rather the bin in which the $v_z$ falls. 
87 \end{description}
88
89 Each of these steps will be detailed in the following. 
90
91 \subsection*{Event inspection}
92
93 The first thing to do, is to inspect the event for triggers.  A number
94 of trigger bits, like \INEL{}, \INELONE{}, \NSD{}, and so on is then
95 propagated to the \AOD{} output.  
96
97 Next, the number of \emph{tracklets} reconstructed in the Silicon
98 Pixel Detector (\SPD{}) compared to a threshold.  If the number of
99 track--lets falls belows this threshold, the event is consider a
100 low--flux event.   
101
102 Just after the sharing filter (described below) but before any more
103 processing, the vertex information is queried.  If there is no vertex
104 information, or if the vertex $z$ coordinate is outside the
105 pre--defined range, then no further processing takes place. 
106
107 \subsection*{Sharing filter}
108
109 The \FMD{} \ESD{} object contains the scaled energy deposited $\Delta
110 E/\Delta E_{mip}$ for each of the 51,200 strips.  The \FMD{} is
111 organised in 3 \emph{sub--detectors} \FMD{1}, \FMD{2}, and \FMD{3}, each
112 consisting of 1 (\FMD{1}) or 2 (\FMD{2} and \FMD{3}) \emph{rings}.
113 The rings fall into two types: \emph{Inner} or \emph{outer} rings.
114 Each ring is in turn  azimuthal divided into \emph{sectors}, and each
115 sector is radially divided into \emph{strips}.  How many sectors,
116 strips, as well as the $\eta$ coverage is given in
117 \tablename~\ref{tab:fmd:overview}. 
118
119 \begin{table}[htbp]
120   \begin{center}
121     \caption{Physical dimensions of Si segments and strips.}
122     \label{tab:fmd:overview}
123     \vglue0.2cm
124     \begin{tabular}{|c|cc|cr@{\space--\space}l|r@{\space--\space}l|}
125       \hline
126       \textbf{Sub--detector/} &
127       \textbf{Azimuthal}&
128       \textbf{Radial} &
129       $z$ &
130       \multicolumn{2}{c|}{\textbf{$r$}} &
131       \multicolumn{2}{c|}{\textbf{$\eta$}} \\
132       \textbf{Ring}& 
133       \textbf{sectors} &
134       \textbf{strips} & 
135       \textbf{[cm]} &
136       \multicolumn{2}{c|}{\textbf{range [cm]}} &
137       \multicolumn{2}{c|}{\textbf{coverage}} \\
138       \hline
139       FMD1i & 20& 512& 320  &  4.2& 17.2& 3.68&  5.03\\
140       FMD2i & 20& 512&  83.4&  4.2& 17.2& 2.28&  3.68\\
141       FMD2o & 40& 256&  75.2& 15.4& 28.4& 1.70&  2.29\\
142       FMD3i & 20& 512& -75.2&  4.2& 17.2&-2.29& -1.70\\
143       FMD3o & 40& 256& -83.4& 15.4& 28.4&-3.40& -2.01\\
144       \hline
145     \end{tabular}
146   \end{center}
147 \end{table}
148
149 A particle originating from the vertex can, because of it's incident
150 angle on the \FMD{} sensors traverse more than one strip.  That means
151 that the energy loss of the particle is distributed over 1 or more
152 strips.  The signal in each strip should therefore possibly merged
153 with it's neighbor strip signals to properly reconstruct the energy
154 loss of a single particle.  
155
156 The effect is most pronounced in low--flux events, like proton--proton
157 collisions or peripheral Pb--Pb collisions, while in high--flux events
158 the hit density is so high that most likely each and every strip will
159 be hit and the effect cancel out on average. 
160
161 Since the particles travel more or less in straight lines toward the
162 \FMD{} sensors, the sharing effect predominantly in the $r$ or
163 \emph{strip} direction.  Only neighboring strips in a given sector is
164 therefor investigated for this effect.  
165
166 Algorithm~\ref{algo:sharing} is applied to the signals in a given
167 sector.
168
169 \begin{algorithm}[htpb]
170   \SetKwData{usedThis}{current strip used}
171   \SetKwData{usedPrev}{previous strip used}
172   \SetKwData{Output}{output}
173   \SetKwData{Input}{input}
174   \SetKwData{Nstr}{\# strips}
175   \SetKwData{Signal}{current}
176   \SetKwData{Eta}{$\eta$}
177   \SetKwData{prevE}{previous strip signal} 
178   \SetKwData{nextE}{next strip signal} 
179   \SetKwData{lowFlux}{low flux flag} 
180   \SetKwFunction{SignalInStrip}{SignalInStrip}
181   \SetKwFunction{MultiplicityOfStrip}{MultiplicityOfStrip}
182   \usedThis $\leftarrow$ false\;
183   \usedPrev $\leftarrow$ false\;
184   \For{$t\leftarrow1$ \KwTo \Nstr}{ 
185     \Output${}_t\leftarrow 0$\;
186     \Signal $\leftarrow$ \SignalInStrip($t$)\;
187
188     \uIf{\Signal is not valid}{ 
189       \Output${}_t \leftarrow$ invalid\;
190     }
191     \uElseIf{\Signal is 0}{ 
192       \Output${}_t \leftarrow$ 0\;
193     }
194     \Else{
195       \Eta$\leftarrow$ $\eta$ of \Input${}_t$\;
196       \prevE$\leftarrow$ 0\;
197       \nextE$\leftarrow$ 0\;
198       \lIf{$t \ne 1$}{ 
199         \prevE$\leftarrow$ \SignalInStrip($t-1$)\;
200       }
201       \lIf{$t \ne $\Nstr}{ 
202         \nextE$\leftarrow$ \SignalInStrip($t+1$)\;
203       }
204       \Output${}_t\leftarrow$
205       \MultiplicityOfStrip(\Signal,\Eta,\prevE,\nextE,\\
206       \hfill\lowFlux,$t$,\usedPrev,\usedThis)\;
207     }   
208   }
209   \caption{Sharing correction}
210   \label{algo:sharing}
211 \end{algorithm}
212
213 Here the function \FuncSty{SignalInStrip}($t$) returns the properly
214 path--length corrected signal in strip $t$.  The function
215 \FuncSty{MultiplicityInStrip} is where the real processing takes
216 place (see page \pageref{func:MultiplicityInStrip}). 
217
218 \begin{function}[htbp]
219   \caption{MultiplicityInStrip(\DataSty{current},$\eta$,\DataSty{previous},\DataSty{next},\DataSty{low
220       flux flag},\DataSty{previous signal used},\DataSty{this signal
221       used})} 
222   \label{func:MultiplicityInStrip}
223   \SetKwData{Current}{current} 
224   \SetKwData{Next}{next} 
225   \SetKwData{Previous}{previous} 
226   \SetKwData{lowFlux}{low flux flag}
227   \SetKwData{usedPrev}{previous signal used}
228   \SetKwData{usedThis}{this signal used}
229   \SetKwData{lowCut}{low cut}
230   \SetKwData{total}{Total}
231   \SetKwData{highCut}{high cut}
232   \SetKwData{Eta}{$\eta$}  
233   \SetKwFunction{GetHighCut}{GetHighCut}
234   \If{\Current is very large or \Current $<$ \lowCut} {
235     \usedThis $\leftarrow$ false\;
236     \usedPrev $\leftarrow$ false\;
237     \Return{0}
238   }
239   \If{\usedThis}{ 
240     \usedThis $\leftarrow$ false\;
241     \usedPrev $\leftarrow$ true\;
242     \Return{0}
243   }
244   \highCut $\leftarrow$ \GetHighCut($t$,\Eta)\;
245   \If{\Current $<$ \Next and \Next $>$ \highCut and \lowFlux set}{ 
246     \usedThis $\leftarrow$ false\;
247     \usedPrev $\leftarrow$ false\;
248     \Return{0}
249   }
250   \total $\leftarrow$ \Current\;
251   \lIf{\lowCut $<$ \Previous $<$ \highCut and not \usedPrev}{ 
252     \total $\leftarrow$ \total + \Previous\;
253   }
254   \If{\lowCut $<$ \Next $<$ \highCut}{ 
255     \total $\leftarrow$ \total + \Next\;  
256     \usedThis $\leftarrow$ true\;
257   }
258   \eIf{\total $>$ 0}{ 
259     \usedPrev $\leftarrow$ true\;
260     \Return{\total}
261   }{
262     \usedPrev $\leftarrow$ false\;
263     \usedThis $\leftarrow$ false\;
264     \Return{0}
265   }
266 \end{function}
267 Here, the function \FuncSty{GetHighCut} evaluates a Landau
268 distribution fitted to the energy spectrum in the $\eta$ bin
269 specified.  It returns 
270 $$
271 \Delta_{mp} - 2 w
272 $$
273 where $\Delta_{mp}$ is the most probable energy loss, and $w$ is the
274 width of the Landau distribution.  
275
276 The \KwSty{if} in line 5, says that if the previous strip was merged
277 with current one, and the signal of the current strip was added to
278 that, then we the current signal is set to 0, and we mark it as used
279 for the next iteration (\DataSty{previous signal
280   used}$\leftarrow$true). 
281
282 The \KwSty{if} in line 10 checks if the current signal is smaller than
283 the next signal, the next signal is larger than the upper cut defined
284 above, and if we have a low--flux event.  If that condition is met,
285 then the current signal is the smaller of two possible candidates for
286 merging, and it should be merged into the next signal.  Note, that
287 this \emph{only} applies in low--flux events.  
288
289 On line 15, we test if the previous signal lies between our low and
290 high cuts, and if it has not been marked as being used.  If so, we add
291 it to our current signal.  
292
293 The next \KwSty{if} on line 16 checks if the next signal is within our
294 cut bounds.  If so, we add that signal to the current signal and mark
295 it as used for the next iteration (\DataSty{this signal
296   used}$\leftarrow$true).  It will then be zero'ed on the next
297 iteration by the condition on line 6.
298
299 Finally, if our signal is still larger than 0, we return the signal
300 and mark this signal as used (\DataSty{previous signal
301   used}$\leftarrow$true) so that it will not be used in the next
302 iteration. Otherwise, we mark the current signal and the next signal
303 as unused and return a 0. 
304
305
306 \subsection*{Density calculator}
307
308 The density calculator loops over all the strip signals and calculates
309 the inclusive (primary + secondary) charged particle density in
310 pre-defined $(\eta,\varphi)$ bins.  
311
312 If the event is classified as a low--flux event, then the number of
313 charged particles in a given by a simple threshold: 
314 \begin{align}
315   N_{ch,t} &= \left\{
316     \begin{array}{cl}
317       0 & \Delta_t < \text{low cut}\\ 
318       1 & \Delta_t \ge \text{low cut}\\ 
319     \end{array}\right.\quad,
320 \end{align}
321 where $t$ is the strip identifier, $\Delta_t$ is the scaled energy
322 deposition in that strip, and 'low cut' is a predefined cut.  For high
323 flux events, the number charged particles in a strip is calculated
324 using multiple Landau distributions fitted to the energy loss spectrum
325 at a given $\eta$ value.  
326 \begin{align}
327   \Delta_{2,mp} &= 2 \Delta_{mp}+ 2 w \log(2)\nonumber\\
328   \Delta_{3,mp} &= 3 \Delta_{mp}+ 3 w \log(2)\nonumber\\
329   N_{ch,t} &= \frac{\landau{\Delta_t,\Delta_{mp},w}+
330     2\,\alpha\,\landau{\Delta_t,\Delta_{2,mp},2w} + 
331     3\,\beta\,\landau{\Delta_t,\Delta_{3,mp},3w}}{% 
332     \landau{\Delta_t,\Delta_{mp},w}+
333     \alpha\,\landau{\Delta_t,\Delta_{2,mp},2w} + 
334     \beta\,\landau{\Delta_t,\Delta_{3,mp},3w}}\quad,
335 \end{align}
336 where $\landau{x,\psi,W}$ is the evaluation of the Landau distribution
337 with most probable value $\psi$ and width $W$ at $x$, $w$ is the width
338 of the first MIP peak, $\Delta_{mp}$ the most probable value of
339 the first MIP peak, and $\alpha$ and
340 $\beta$ are the relative strength of the second and third MIP peak in
341 the fitted energy loss spectrum. 
342
343 But before the signal $N_{ch,t}$ can be added to the $(\eta,\varphi)$
344 bin in one of the 5 per--ring histograms, it needs to be corrected for
345 the $\varphi$ acceptance of the strip, as well as a correction for
346 double hits in low--flux events.   
347
348 The acceptance correction is only applicable where the strip length
349 does not cover the full sector.  This is the case for the outer strips
350 in both the inner and outer type rings.  The acceptance correction is
351 then simply 
352 \begin{align}
353   \label{eq:acc_corr}
354   a_t &= \frac{l_t}{\Delta\varphi}\quad
355 \end{align}
356 where $l_t$ is the strip length in radians at constant $r$, and
357 $\Delta\varphi$ is $2\pi$ divided by the number of sectors in the
358 ring (20 for inner type rings, and 40 for outer type rings). 
359
360 Even in low--flux events it is possible that more than one particle
361 hits a strip.  However, for low--flux events, it is not possible to
362 reconstruct the 3\textsuperscript{rd} nor even the
363 2\textsuperscript{nd} MIP peak in the energy loss spectrum.
364 Therefore, the strip signal needs to be corrected to the average
365 number of particle impinging on a strip at a given $\eta$.  
366 \begin{align}
367   d_t &= \left\{\begin{array}{cl} \langle n_t\rangle & \text{low
368         flux}\\
369       1 & \text{high flux}
370     \end{array}\right.
371 \end{align}
372
373 The final $(\eta,\varphi)$ content of the 5 output vertex dependent,
374 per--ring histograms of the inclusive charged particle density is then
375 given by
376 \begin{align}
377   \dndetadphi[incl,r,v,i(\eta,\varphi)] &= \sum_t^{t\in(\eta,\varphi)}
378   N_{ch,t}\,a_t\,d_t
379 \end{align}
380 where $t$ runs over the strips in the $(\eta,\varphi)$ bin. 
381
382 \subsection*{Corrections}
383
384 The corrections code receives the five vertex dependent,
385 per--ring histograms of the inclusive charged particle density
386 $\dndetadphi[incl,r,v,i]$ from the density calculator and applies
387 three corrections 
388 \begin{description}
389 \item[Secondary correction:] This is a 2 dimensional histogram
390   generated from simulations of the ratio of primary particles to the
391   total number of particles that fall within an $(\eta,\varphi)$ bin 
392   $$
393   s(\eta,\varphi) =
394   \frac{N_{ch,\text{primary}}(\eta,\varphi)}{N_{ch}(\eta,\varphi)}\quad.
395   $$
396   The $\eta$ and $\varphi$ of $N_{ch,primary}(\eta,\varphi)$ is given
397   by summing over the charged particles labelled as primaries \emph{at
398     the time of the collision} as defined in the simulation code.
399   That is, it is the number of primaries within the bin at the
400   collision point --- not at the \FMD{}.  $N_{ch}(\eta,\varphi)$ is
401   evaluated as the sum of all charged particle that hit the FMD in the
402   given $(\eta,\varphi)$ bin.
403 \item[Event selection efficiency:]
404 \item[Sharing correction efficiency:] 
405 \end{description}
406
407 The 5 output vertex dependent, per--ring histograms of the primary
408 charged particle density is then given by
409 \begin{align}
410   \dndetadphi[r,v,i(\eta,\varphi)] &= 
411   s(\eta,\varphi)\,e(\eta,\varphi)\,m(\eta)\dndetadphi[incl,r,v,i(\eta,\varphi)]
412 \end{align}
413
414 \subsection*{Histogram collector}
415
416 The histogram collector collects the information from the 5 vertex
417 dependent, per--ring histograms of the primary charged particle
418 density $\dndetadphi[r,v,i]$ into a single vertex dependent histogram
419 of the charged particle density $\dndetadphi[v,i]$.  
420
421 To do this, it first calculates, for each vertex bin, the $\eta$ bin
422 range to use for each ring.  It investigates the secondary correction
423 maps $s(\eta,\varphi)$ to find the edges of the map, and then applies
424 a safety margin of a few bins, to ensure that the data selected does
425 not have too large corrections associated with it.  
426
427 It then loops over the bins in the defined $\eta$ range and sums the
428 contributions from each of the 5 histograms.   If the $\eta$ ranges of
429 two rings overlap, then the collector calculates the average and adds
430 the errors in quadrature. 
431
432 The output vertex dependent histogram of the primary
433 charged particle density is then given by
434 \begin{align}
435   \dndetadphi[v,i(\eta,\varphi)] &=
436   \frac{1}{N_{r\in(\eta,\varphi)}}\sum_{r}^{r\in(\eta,\varphi)}  
437   \dndetadphi[r,v,i(\eta,\varphi)]\\
438   \delta\left[\dndetadphi[v,i(\eta,\varphi)]\right] &=
439   \frac{1}{N_{r\in(\eta,\varphi)}}\sqrt{\sum_{r}^{r\in(\eta,\varphi)}   
440     \delta\left[\dndetadphi[r,v,i(\eta,\varphi)]\right]^2}\\
441   \quad,
442 \end{align}
443 where $N_{r\in(\eta,\varphi)}$ is the number of overlapping histograms
444 in the given $(\eta,\varphi)$ bin. 
445
446
447 \section*{Building the final $\dndeta$}
448
449
450
451 \end{document}