Implementation of a fast cluster finderalgorithm for the ALICE SDD detector
Università degli Studi di TorinoScuola di Scienze della Natura
Dipartimento di Fisica
Tesi di Laurea Magistrale in Fisica
Simone Capodicasa
Relatore: prof. Massimo MaseraControrelatore: prof. Fabrizio Bianchi
Ottobre 2014
Copyright c• 2014 by Simone Capodicasa ([email protected])
A Max, perché l’intelligenza pesa più dei muscoli.
Contents1 Heavy Ion Physics 1
1.1 Quantum-Chromo-Dynamics . . . . . . . . . . . . . . . . . . . . . . . . 21.2 Quark Gluon Plasma . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.1 MIT bag model . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.2.2 Lattice QCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Heavy Ion Collisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.3.1 Glauber model . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.3.2 Rapidity and pseudorapidity . . . . . . . . . . . . . . . . . . . . 91.3.3 Time evolution of the collision . . . . . . . . . . . . . . . . . . . 10
1.4 Observables in ALICE . . . . . . . . . . . . . . . . . . . . . . . . . . . 111.4.1 Hard probes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121.4.2 Soft Probes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2 The ALICE Experiment 152.1 Large Hadron Collider . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.2 ALICE apparatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2.1 Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.2.2 Magnets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.2.3 Main subdetectors . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3 Inner Tracking System . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.3.1 Silicon Drift Detector . . . . . . . . . . . . . . . . . . . . . . . . 25
2.4 ALICE software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272.4.1 ROOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272.4.2 AliROOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272.4.3 AliEn and the Grid . . . . . . . . . . . . . . . . . . . . . . . . . 292.4.4 High Level Trigger . . . . . . . . . . . . . . . . . . . . . . . . . 30
3 The Cluster Finder algorithms 313.1 Workflows of the V2 and the fast algorithm . . . . . . . . . . . . . . . 32
3.1.1 V2 algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.1.2 Fast algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.2 Memory model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373.3 Using the memory e�ciently . . . . . . . . . . . . . . . . . . . . . . . . 39
4 Reconstruction performance 434.1 Data samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444.2 Residual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444.3 Charge deposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494.4 Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.4.1 Tracking e�ciency . . . . . . . . . . . . . . . . . . . . . . . . . 53
iv Contents
4.4.2 Track resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . 534.4.3 Good and fake tracks . . . . . . . . . . . . . . . . . . . . . . . . 54
5 Conclusions 595.1 Execution time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605.2 Speedup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615.3 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
A Developed code 65A.1 AliITSClusterFinderSDDfast.h . . . . . . . . . . . . . . . . . . . . . . . 66A.2 AliITSClusterFinderSDDfast.cxx . . . . . . . . . . . . . . . . . . . . . 67
Bibliography 83
List of Figures 85
List of Tables 89
AcknowledgmentsRingraziamenti
Ringrazio il Prof. Massimo Masera per essere stato una guida costante durante tutto illavoro di tesi e un punto di riferimento durante tutto il percorso di studi magistrali.
Un ringraziamento al Dott. Francesco Prino, alla Dott.ssa Elena Bruna e a tutto ilgruppo ALICE ITS di Torino per il tempo dedicatomi e per i produttivi confronti.
Un grazie a Maximiliano, Stefano e Andrea, sempre pronti a darmi consigli preziosi.
Grazie a Michele, Lorenzo, Marco, Paolo, Alessio e Giulia compagni di studi e dilaboratori con cui ho condiviso infinite giornate di�cili, ma belle.
Un ricordo particolare per Marco, per la sua insostituibile amicizia che nemmeno ichilometri riescono a scalfire, sempre presente in ogni momento.
Grazie a Chiara e Federica, amiche da molti anni che tanto mi hanno aiutato a superarei momenti di�cili.
Grazie infine a Teresa e Giorgio, che non mi hanno mai fatto mancare il loro appoggiodurante tutte le sfide della mia vita, università compresa.
Simone Capodicasa
Turin, Italy, October 2014
AbstractThe Large Hadron Collider (LHC) at Cern is the most powerful collider ever built.The LHC now lives a shutdown period to perform some upgrades and restart thephysics program in 2015 with a higher energy and luminosity (Run2 of LHC). A LargeIon Collider Experiment (ALICE), one of the four main LHC experiments, has aconsolidation program during this shutdown to improve its data taking performance.
My thesis work is part of this program and its aim is to provide a new algorithm tocarry out the local reconstruction of the Silicon Drift Detector (SDD). The SDD isone of the detectors constituting the six layers of the Inner Tracking System (ITS)that is the ALICE subdetector closest to the beam line. The two innermost layersare made of pixel sensors (Silicon Pixel Detector - SPD), the two middle layers formthe SDD and the outermost two layers are made of double sided strip sensors (SiliconStrip Detector - SSD). The main purpose of the ITS is to reconstruct the primaryinteraction vertex of the event and the secondary ones. This is achieved thanks to itsgood tracking capabilities in the vicinity of the interaction point. The ITS is usedto improve the tracks found by the external tracking detectors and to reconstructlow-momentum particles.
The data reconstruction is carried out o�ine with some parts run online (in a highperformance computing cluster located in the experimental area) for high level trigger(HLT) purposes. Presently the local reconstruction (cluster finding) of the SDD is notincluded in the online reconstruction, because the current algorithm is too slow tocope with the interaction rate of the LHC: the goal of my thesis is to write a fasteralgorithm to include also the SDD cluster finding in the HLT reconstruction.
The new algorithm avoids the intensive use of recursive functions made in the currentone in order to use optimizations of the compiler. Moreover, since the maximumexpected occupancy for the detector in a central Pb-Pb event is ≥ 2.5%, I haverearranged the data management in order to avoid cache-misses during the executionof the algorithm, which often result in code ine�ciencies.
The di�erence in terms of reconstruction performance between the new and the currentalgorithm is negligible. My new algorithm has a higher performance in terms ofexecution time. The speedup is about a factor of four.
A new class coding the algorithm has been committed to the o�cial repository of theALICE software. The code was tested by the HLT group with a positive outcome.After additional extensive tests was decided to use this algorithm as the o�cial clusterfinding code for the Run 2 of LHC.
CompendioIl Large Hadron Collider (LHC) sito al Cern è il più potente collisore di particellemai costruito. In questo momento i lavori di LHC prevedono uno stop tecnico perpoter e�ettuare un upgrade della macchina e riprendere la presa dati nel 2015 con unamaggiore energia e una maggiore luminosità (Run2 di LHC). A Large Ion ColliderExperiment (ALICE), uno dei quattro esperimenti principali di LHC, sta sfruttandoquesto shutdown per portare avanti un programma di consolidamento dell’apparatosperimentale con il proposito di aumentare le performance nella presa dati.
La mia tesi si inserisce nell’ambito di questi lavori di consolidamento e l’obiettivoè quello di fornire un un nuovo algoritmo di ricostruzione locale per i rivelatori adrift di silicio (SDD). Le SDD sono uno dei detector che costituiscono i sei layer diInner Tracking System (ITS) che è il sottorivelatore di ALICE più vicino alla linea difascio. I due strati più interni sono costituiti di rivelatori a pixel di silicio (SPD), idue di mezzo utilizzano le SDD e i due più esterni sono formati da rivelatori a strip disilicio (SSD). Il compito principale di ITS è quello di ricostruire il vertice primariodi interazione e gli eventuali vertici secondari dovuti al decadimento di particelle avita breve. Questo è reso possibile grazie alle ottime capacità di tracciamento e al suoposizionamento vicino al punto di interazione. L’ITS è anche utilizzato per migliorarela qualità delle tracce trovate dai detector più esterni e per ricostruire particelle dibasso momento.
La ricostruzione dei dati viene eseguita principalmente o�ine con alcune parti online(utilizzando un grande cluster di calcolo collocato nell’area sperimentale) per e�ettuareun trigger di alto livello (HLT). In questo momento la ricostruzione locale (clusterfinding) delle SDD non viene eseguita online perché l’algoritmo attuale ha un tempodi esecuzione troppo elevato confrontato con l’alto rate di interazione di LHC: servedunque un algoritmo più veloce, che possa essere inserito nella ricostruzione dell’HLT.
L’algoritmo da me sviluppato elimina i metodi ricorsivi, di cui viene fatto largo usonel codice correntemente in produzione, in modo da utilizzare le ottimizzazioni che ilcompilatore è in grado di fare su algoritmi di tipo iterativo. Inoltre, tenuto conto chein una collisione Pb-Pb centrale il massimo illuminamento del rivelatore è di ≥ 2.5%,ho modificato il modo in cui vengono utilizzati i dati in modo da evitare i cosiddetticache misses che spesso si traducono in ine�cienze durante l’esecuzione del codice
Le di�erenze tra i due algoritmi in termini di performance di ricostruzione sonotrascurabili. Il nuovo codice presenta però un tempo di esecuzione più rapido, in media,di un fattore quattro.
Come risultato è stata inserita una nuova classe contenente il codice dell’algoritmo nelrepository u�ciale del software di ALICE. La classe è stata testata dal team dell’HLTcon esito positivo. Dopo aver e�ettuato dei test su larga scala si è deciso di utilizzare ilnuovo algoritmo come il predefinito per la ricostruzione dei dati del Run2 di LHC.
1Heavy Ion Physics
The physics of heavy ion collisions
Contents1.1 Quantum-Chromo-Dynamics . . . . . . . . . . . . . . . . . . . . 2
1.2 Quark Gluon Plasma . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.1 MIT bag model . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.2 Lattice QCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Heavy Ion Collisions . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.1 Glauber model . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.2 Rapidity and pseudorapidity . . . . . . . . . . . . . . . . . . . 9
1.3.3 Time evolution of the collision . . . . . . . . . . . . . . . . . . 10
1.4 Observables in ALICE . . . . . . . . . . . . . . . . . . . . . . . 11
1.4.1 Hard probes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.2 Soft Probes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2 1. Heavy Ion Physics
The aim of the experiments studying heavy ion collisions is to understand the nuclearmatter under extreme conditions of density and temperature. Under these conditionsQuanto-Chromo-Dynamics (QCD) predicts that the matter could have a transitiontoward a state where we can observe quarks and gluons not confined into hadrons.1The study of this state of matter could be helpful to understand what happened inthe earliest stage of the universe (see fig. 1.1).
Figure 1.1: Universe timeline
1.1 Quantum-Chromo-Dynamics
QCD is a part of the Standard Model (SM) theory. In the QCD the mediator bosonsof the strong interactions are gluons, that play the same role that the photon plays inQED.
QCD obeys to a symmetry group: SU(3). In this group there are 8 generatorsthat correspond to the 8 gauge bosons indentified with the gluons. The density ofLagrangian of the QCD is:
L = ≠14F a
µ‹F µ‹a + i
ÿ
f
Âf ( /̂ ≠ igs⁄a
2/Aa)Âf (1.1)
with F µ‹a defined as:
F µ‹a = ˆµA‹
a ≠ ˆ‹Aµa ≠ g
8ÿ
b,c=1fabcA
µbA‹c (1.2)
and Aµa the gluon field and a the symmetry group index.
1.1. Quantum-Chromo-Dynamics 3
The di�erences between QCD and QED brings some additional terms in the kineticLagrangian which provides the self interaction for gauge bosons not observed in QED.This is a major di�erence and produces the so-called anti-screening in colour interaction.This leads to the QCD running coupling (fig. 1.2 and equation 1.3).
as(Q2) = a(µ2)1 + 33≠2nf
12filnQ2
µ2
(1.3)
Figure 1.2: QCD running coupling2
It is possible to observe two regimes, as a function of Q, the transferred momentum inthe interaction:
• Confinement. At small values of Q we have a large value of the couplingconstant (Q < 1GeV ∆ –s > 1) and this leads to the quark confinement intohadrons. This is the most probable situation, so in everyday life we can observeonly hadron and not free quarks.
• Asymptotic freedom. With increasing energy the coupling constant becomessmall (Q2 æ inf ∆ –s æ 0) and this means that the quarks and gluons are nolonger confined into hadrons and can form the so-called Quark Gluon Plasma(QGP).
We have di�erent tools to predict the scattering matrices for the QCD:
4 1. Heavy Ion Physics
Quark Type Symbol Charge Mass B Iz S C B’ Tup u +2/3 2.3+0.7
≠0.5MeV +1/3 +1/2 0 0 0 0down d -1/3 4.8+0.5
≠0.3MeV +1/3 -1/2 0 0 0 0strange s -1/3 95 ± 0.5MeV +1/3 0 -1 0 0 0charm c +2/3 1.275 ± 0.025GeV +1/3 0 0 1 0 0bottom b -1/3 4.18 ± 0.03GeV +1/3 0 0 0 -1 0
top t +2/3 173.07 ± 0.52GeV +1/3 0 0 0 0 1
Table 1.1: Basic properties of quarks, including the mass3
• Perturbative QCD (pQCD). This approach follows the method used in QED.The calculations are made using parturbations to free particle state. Thisapproach is correct if the coupling constant is small (–s << 1) and this is truefor high transferred momentum.
• Lattice QCD (LQCD). This is a non-pertubartive approach that can be usedwhere the perturbative method cannot be applied. We can make calculationsaver a grid (lattice) of points in space and time. To reach the continuum we haveto take an inifinite lattice and the points infinitesimally close to each other. Forthis reason LQCD needs a very large computing power to give precise results.
Even though all the observed hadronic species can be understood in term of a combi-nation of quarks and antiquarks, all the experimenal searches for free quarks gave anegative outcome: free quark do not exist in nature. There are two types of hadrons,accordint to their quark composition.
• Mesons: made by a quark-antiquark pair (qq)
• Baryons: composed by three quarks (qqq)
Quarks can be divided into light flavours (u,d,s) and heavy flavous (c,b,t) following amass-based scale (see tab. 1.1).
1.2 Quark Gluon Plasma
As a consequence of the –s running coupling, there exist di�erent phases of the nuclearmatter, according to temperature and net baryon density, as shown in the phasediagram4 represented in figure 1.3. This phase diagram shows a relation betweenthe temperature (T ) and the barionic chemical potential (µB). At the normal-lifeconditions (low temperature and µB < 1GeV ) quarks and gluons are confined in thehadrons.
At high temprature or high chemical potential we can find di�erent matter states:
1.2. Quark Gluon Plasma 5
• T ∫ 0, µB ƒ 0: strongly interacting Quark Gluon Plasma (SQGP).
• T ƒ 0, µB ∫ 0: color super conductor.
With nucleus-nucleus collisions at the energy of the Large Hadron Collider (see chapter2) we have the opportunity to observe the state with T ∫ 0 and µB ƒ 0, neverobserved before. The QCD predicts that, in these conditions, there is a big decreaseof the strong interaction so it can be possible to observe quark and gluons deconfinedin a state called QGP.
To make some predictions on how the phase transition happens, we can not use thepQCD, but it is necessary to use lattice QCD or e�ective models.
Figure 1.3: Phase diagram of nuclear matter
1.2.1 MIT bag model
The MIT bag model5 is a phenomenological nuclear model that tries to explain thequark and gluons confinement introducing an external pressure. It give also a predictionon the temperature at which quarks are no longer confined.
Consider a spheric volume containing N massless fermions. R is the radius of thevolume. One can write the Dirac equation for a massless fermion:
gµ‹“µp‹Â = 0 (1.4)
6 1. Heavy Ion Physics
where gµ‹ is the metric tensor defined as:
gµ‹ =
Q
cccca
1 0 0 00 ≠1 0 00 0 ≠1 00 0 0 ≠1
R
ddddb(1.5)
The wavefunction of the fermion could be divided into two two-dimensional spinors:
 =A
Â+Â≠
B
(1.6)
and we can rewrite the Dirac equation (1.4) in terms of those two components:
0 =A
+p0 ≠≠æ‡ · ≠æp+≠æ‡ · ≠æp ≠p0
B AÂ+Â≠
B
(1.7)
where ≠æ‡ are the Pauli matrices. From equation 1.7 one can write:Y]
[p0Â+ ≠ ≠æ‡ · ≠æp Â≠ = 0≠æ‡ · ≠æp Â+ ≠ p0Â≠ = 0
(1.8)
and derive an expression for the Â+ spinor:
p0Â+ ≠ (≠æ‡ · ≠æp )2
p0Â+ = 0 (1.9)
(≠æp · ≠æp ≠ p20)Â+ = 0 (1.10)
the solution of this equation is:
Â+ = N e≠ip0tj0(p0r)‰+ (1.11)
where N is a normalization constant, ‰ is a two-dimension spinor and j0 the Besselfunction.
One can repeat the proceedings for the Â≠ finding this solution:
Â≠ = N e≠ip0t≠æ‡ · r̂j1(p0r)‰≠ (1.12)
The quark confinement hypotesis implies
|ÂÂ|2-----r=R
= 0 (1.13)
1.2. Quark Gluon Plasma 7
using the solution found for  (1.11 and 1.12)
[j0(p0R)]2 ≠ [j1(p0R)]2 = 0 ∆ p0 = 2.04R
(1.14)
and this is a relation between the kinetik energy of the quarks and and the radius ofthe bag.
In the bag model there is a external pressure and the energy density inside the bag isbigger than the external one. The di�erence bewtween the two pressures is B:
E = 2.04N
R(~c) + 4fi
3 R3B (1.15)
The bag dimension is the radius implying:
dE
dR= 0 ∆ B
14 = 2.04
4fi
14 1R
(~c)MeV
(~c) 34
(1.16)
If one consider three quarks confined into a barion with R = 0.8fm:
B14 = 206MeV
(~c) 34
(1.17)
This model explains the QGP assuming that if the temperature is very high one canfind a point in the bag where the pressure is higher than the external pressure. In thisconditions the quark are no longer confined into the hadron.
1.2.2 Lattice QCD
Quark potential Lattice QCD allows to study the colour interaction between twoquarks as a functino of its space separation, varying the temperature T . The couplingtends to 0 for increasing temperatures as expected in the hypotesis of asymptoticfreedom of quarks.
Phase transition and critical temperature The characteristics of the phase transis-tion strongly depend by the quark masses. In the limit of two flavours of masslessquark a second-order transition is predicted while a first order one is foreseen in caseof three massless flavours. A realistic calculation adopts threee quark flavours andnon-zero masses (ms > mu,d): in this case the system moves towards the QGP via afast analytic cross-over.
8 1. Heavy Ion Physics
1.3 Heavy Ion Collisions
The reason why heavy ions are used in QGP-related experiments is now explained.For those types of experiments strongly interacting objects are needed. Those objectsare hadrons or nuclei. From a heavy ion collision at high energy one expects to reachan energy density larger than the critical value needed to create the QGP and to studya system with a high multiplicity of particles that has a high number of degree offreedom, can termalize so the experimenters can study the QGP using statistics andthermodynamic models.
Both conditions are explained through the high energy released by the multiple nucleon-nucleon interactions during a nucleus-nucleus collision. This release of energy createsan high energy density region.
Another assumption has to be done: the system generated in those types of collisionshas to be in thermal equilibrium to allow a thermodynamic appoach. This meas thatthe free mean path of the constituents is larger than the system dimension and smallerthan its time of life. Both the hypoteses have to be verified with the experimentalresults.
1.3.1 Glauber model
The Glauber model6 gives a description of the nucleus-nucleus collision as a superposi-tion of nucleon-nucleon collisions using a geometrical approach. Glauber took someassumptions called optical limit:
• point-like nucleons
• nucleons are indipendent inside the nucleus
• the trajctory of the nucleus has no deflection during the collision
• no di�erence between protons and neutrons (considering only the strong interac-tion)
• no change in the nucleon-nucleon cross-section (no state change for the nucleonstraversing the target)
1.3. Heavy Ion Collisions 9
Figure 1.4: Participants and spectators in an ion collision
1.3.2 Rapidity and pseudorapidity
Two important variables have to be introduced beause of their wide use to describethe nuclear collisions: rapidity (y) and pseudorapidity (÷).
With its transverse momentum (pT ) and rapidity one can fix the kinematics of aparticle. To define the rapidity (see equation 1.18) a mix of the three momentumcomponents and the particle’s energy are used. The rapidity is widely used in thosetype of measures because it is a Lorentz scalar quantity.
y = 12 log E + pz
E ≠ pz
(1.18)
in this equation E is the energy of the particle and pz is the beam axis component ofthe momentum. To calculate y, E and pT had to be measured. One can introduce thepseudorapidity, that depends only on the polar angle ◊ and in a relativistic regimepseudorapidity tends to the rapidity.
Pseudorapidity is defined as:
÷ = 12 log |p| + pz
|p| ≠ pz
= ≠ logC
tanA
◊
2
BD
(1.19)
it can be rewritten as:
÷ = ≠ logQ
aı̂ıÙ
1 ≠ pz
|≠æp |
1 + pz
|≠æp |
R
b = ≠ logA
|≠æp | ≠ pz
|≠æp | + pz
B
(1.20)
and using relation 1.21
10 1. Heavy Ion Physics
tanA
◊
2
B
=Û
1 ≠ cos ◊
1 + cos ◊(1.21)
one obtain the equation 1.19.
1.3.3 Time evolution of the collision
The di�erent phases of the evolution of a central nucleus-nucleus collision (depicted infig. 1.5) are important because for each phase there is a di�erent temperature (T ) andenergy density (Á) and those parameters are predicted by theoretical models that theexperiment wants to verify.
In the first phase the two nuclei are Lorentz contracted (because of their relativisticenergy) and go along the beam axis.
During the second phase the two nuclei collide in the central region. In this momentone expects a lot of inelastic interactions between the nucleons composing the collidingnuclei.
Under those conditions in the central region there is a high energy density (due toquarks, antiquarks and gluons) and a small baryon content. This phase is calledpre-equilibrium phase. After a certain time (·0, depends to the center of mass energyof the collision, ·0 < 0.2fm
cat LHC) the sysyem reaches the thermal equilibrium.
When the thermal equilibrium is reached the QGP, expected to be created by thecollision, evolves following the hydrodinamics laws. During the expansion of the plasmathe temperature and the energy density drop down. The plasmsa lives until the criticaltemperature (TC) is reached. At this point the hadronization phase begins. A mixedstate with plasma and hadros lasts for ≥ 10fm
c.
Once the hadronization is completed the system composed only by hadrons evolves likean hadron gas. The volume reaches ≥ 104 ÷ 105fm3 and the energy density becomestoo small to permit inelastic interactions between hadrons composing the gas. At thistime the particles abundances are fixed and this moment is called chemical freeze-outthat occurs at a temprature TCh. When hadrons stream freely with fixed energy andmomentum we have the thermal freeze-out at a temprature Tfo.
From this moment particles can be detected. The space-time evolution of a collision isdepicted in fig. 1.5
1.4. Observables in ALICE 11
Figure 1.5: Spatial evolution of a high energy ion collision
1.4 Observables in ALICE
The phase transition cannnot be detected directly: the QGP lives only for 10≠23s. Thetheoretical models describing the QGP provide predictions on the characteristics of thefinal state. By detecting this state, one can acquire informations on the QGP formation.In other words: final states are detected if the QGP is formed or not di�erents. Theproperties of the final state predicted by theoretical models are called signatures ofthe QGP and are investigated by the experiments with heavy ion collision.
Figure 1.6: Space-time scheme of a system created by a high energy ion collision
12 1. Heavy Ion Physics
Two types of probes are used to search the QGP signatures with an experiment.
1.4.1 Hard probes
The production cross section of hard probes (processes with high transferred momen-tum) is large due to the high energy reached with LHC. The hadrons produced inthese processes have been created in the first stages of the collision thanks to theinteraction of high momentum partons.
High energy quarks and gluons can be observed as jets or single particles with high pt
(up to 100GeV/c and beyond). Also other types of particles care produced: high pT
photons, charmonium (cc pairs, like the J/Â) and bottomonium (bb pairs, like the ‚)and the W and Z vector bosons.
These hard probes are produced in the very first stages of the collision and evolve withthe medium. By detecting and analysing these probes one can explore and understandthe mechanisms of deconfinement.
1.4.2 Soft Probes
The 99.5% (bulk) of the hadrons produced in the collision have pT < 1GeV/c and arecalled soft particles.
These soft probes are produced in the hadronization phase of the collision and even ifthey have not lived the first times of the interaction they keep some informations onthe phase transition and on the QGP.
The state and the dynamical evolution of the matter produced in a heavy ion collisioncan be described using some global event properties. This description is given bymeasuring the characteristics of the soft particles. One can measure di�erent things:
• multiplicity distribution
• Yields and momentum spectra of identified particles
• Correlations between particles
The multplicity distribution gives informations about energy density reached duringthe collision. Spectra of identified particles are determinated by the conditions during(and a little time after) the hadronization phase. The correlations between particlesspectra measure the size and the lifetime of the matter state as well as its transportvia collective (radial and elliptic) flow phenomena.
1.4. Observables in ALICE 13
Figure 1.7: Spectra of identified particles measure in ALICE.7 In very class of centralitythe major number of particles producted are particles with low pT .
2The ALICE Experiment
A Large Ion Collider Experiment
Contents2.1 Large Hadron Collider . . . . . . . . . . . . . . . . . . . . . . . 16
2.2 ALICE apparatus . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2.1 Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2.2 Magnets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.2.3 Main subdetectors . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3 Inner Tracking System . . . . . . . . . . . . . . . . . . . . . . . 23
2.3.1 Silicon Drift Detector . . . . . . . . . . . . . . . . . . . . . . . 25
2.4 ALICE software . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.4.1 ROOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.4.2 AliROOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.4.3 AliEn and the Grid . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.4.4 High Level Trigger . . . . . . . . . . . . . . . . . . . . . . . . . 30
16 2. The ALICE Experiment
2.1 Large Hadron Collider
The Large Hadron Collider (LHC) is the most powerful particle accelerator all overthe world. It accelerates protons and heavy-ions beams to verify theories on particleand nuclear physics and to search for new physics beyond the Standard Model. It wasbuilt during the first decade of this century along a 27 km tunnel between Switzerlandand France, 175 meters below the CERN laboratory. This accelerator is the last stepof a complex accelerators chain (fig. 2.1), built to achieve the highest beam energyand luminosity of the history.
Figure 2.1: CERN accelerator complex
Energy and luminosity LHC runs in three di�erent configurations: proton-proton(p-p), nucleus-nucleus (A-A) and proton-nucleus (p-A) collisions. The center of massenergy is defined as
s = (p1 + p2)2 = (E1 + E2)2 (2.1)
with p1 = (E1, p̨) and p2 = (E2, ≠p̨) the four-momentum of the beams in the center ofmass frame. The luminosity is defined as
L = fNbN2
4fi‡x‡y
‡ (2.2)
2.2. ALICE apparatus 17
where f is the revolution frequency of the particle (ion) bunches circulating in theaccelerator, Nb is the number of bunches, N the number of particle (ion) per bunchand 4fi‡x‡y the transverse area of the interaction region of two bunches.
Four big experiments find a place along this machine: ATLAS (A Toroidal LHC Appa-ratuS), CMS (Compact Muon Solenoid), LHCb (Large Hadron Collider beauty) andALICE (A Large Ion Collider Experiment). ALICE is the only experiment specificallydesigned to study heavy-ion collisions and a brief description of the apparatus will begiven later in this chapter.
Now LHC lives a shutdown period in which some upgrades will be accomplished bythe machine’s technicians and by the physicists of the experiments to start a secondlong data taking period at the beginning of 2015. The work described in this thesis isabout one of these upgrades.
2.2 ALICE apparatus
The ALICE experiment (fig. 2.2) weighs 10000 tons, it is 26 m long and 16 m high.It can be divided into two main sections: the central barrel, covering a mid-rapidityrange of |÷| < 0.9 and a forward rapidity section each composed by several detectors.
The central region is composed by the Inner Tracking System (ITS), the Time ProjectionChamber (TPC), the Time of Flight (TOF), the Transition Radiation Detector (TRD),the High Momentum Particle Identificator detector (HMPID), the Photon Spectrometer(PHOS), the Electromagnetic Calorimeter (EMCal) and the ALICE Cosmic RayDetector (ACORDE).
In the forward region we can find the Muon Spectrometer and some detectors locatedvery close to the beam line: the Zero Degree Calorimeter (ZDC), the Photon MultiplictyDetector (PMD), the Forward Multiplicity Detector (FMD), the VZERO detector(V0) and the TZERO detector (T0).
2.2.1 Coordinates
The ALICE coordinate system (fig. 2.3) has the origin of the axis in the nominalinteraction point and the axes are defined in this way:
x: aligned with the accelerator plane and pointing at the center of LHC.
y: perpendicular to the x axis and pointing upward.
18 2. The ALICE Experiment
Figure 2.2: ALICE setup
z: parallel with the mean beam direction and pointing in the opposite of the muonspectrometer.
2.2.2 Magnets
The main magnet in the ALICE experiment is a solenoid magnet built for the L3experiment at Large Electron-Positron collider (LEP). This magnet surrounds the
Figure 2.3: ALICE coordinate system
2.2. ALICE apparatus 19
central barrel of the experiment and generates a relatively weak magnetic field (|B| =0.5 T). The other magnet is a dipole and is placed 7m from the interaction point. Itsmagnetic field (|B| ≥ 0.2 T) is perpendicular to the beam direction.
The main goal of these two magnets is bending the tracks of the charged particlesto measure their momentum. The reason of the choice of the magnetic field valueproduced by the solenoid magnet is the necessity to track the low-momentum particlesin the TPC. The minimum momentum of a particle that can be tracked with the TPCis pcut≠off = 0.3BR ƒ 0.2 GeV/c where B is the magnetic field and R is the radius ofthe TPC detector. ALICE can also track lower-momentum particles using the ITSdetector.
2.2.3 Main subdetectors
In this section the features and will be described the goals of the main ALICEsubdetectors will be presented.
Inner Tracking System A deep focusing on the ITS detector can be found in section2.3.
Time Projection Chamber The TPC (fig. 2.4) is the main detector for trackingparticles in the central barrel of the experiment. It was designed to track ≥ 8000particles per unity of rapidity which was the worst scenario for a central Pb-Pb collisionat the time the apparatus was designed, before the start of the Relativistic Heavy IonCollider (RHIC) at BNL. It covers a pseudorapidity region of |÷| < 0.9. It providesmeasurements on particle momentum and energy loss. The inner radius is 0.85 metersand the outer one is 2.5 meters, in z coordinate is 5 meters long and is divided intotwo drift region. The TPC has a complete 2fi acceptance in azimuthal angle thanks toits cilindrical symmetry.
The detector is a multi-wire proportional chamber where the charged particle ionizethe gas generating an electron-ion pair and an electric field makes the electrons drift tothe end-plate. It is impossible to get a three dimensional information on the particle’sposition without an external trigger information, made by other detectors.
Time of flight detector The TOF detector is a shell of Multi-gap Resistive PlateChambers (MRPC) that has an inner and an outer radius of 3.70 and 3.99 meters.The pseudorapity and azimuthal angle coverages are the same of the TPC. The lengthon the beam direction is 7.45 meters. It is used for the particle identification of
20 2. The ALICE Experiment
Figure 2.4: The ALICE TPC
proton, pion and kaons measuring the particles’ time of flight between its production(measured by the T0 detector) and the detection in the MRPC.
Transition-Radiaton detector The TRD is composed of alternating layers of wirechambers and radiators. The main task of this detector is the identification of electronswith momentum higher than 1 GeV/c. The TRD is divided in 18 modules with fullazimuthal coverage, but is not completely installed. At the beginning of LHC run2(early 2015) 17 out of 18 TRD modules will be installed.
High-Momentum Particle Identification detector The HMPID is a detector de-signed to identify the hadrons with momenta larger than 1GeV/c because is notpossible to reach this goal with the other detectors. It is composed by 7 modules ofRing-Imaging Cherenkov counters (RHIC) 1.5 ◊ 1.5 m2 each. The HMPID covers1.2¶ < � < 58.8¶ and |÷| < 0.6 range and it is positioned ≥ 4.5 m away from theinteraction point.
Photon Spectrometer The PHOS is a calorimeter made of tungstate crystals andit is located 460 cm away from the interaction point. It covers an area of 8 m2 with apseudorapidity acceptance in the range |÷| < 0.12. This calorimeter allows to identifyphotons and distiguish those that are directly produced in the collision by the photonsresulting from a decay of a fi0 or a ÷ particle. The spectra description of the productionof fi0 and ÷ particles is specially important for the study of QGP.
2.2. ALICE apparatus 21
Electromagnetic Calorimeter The EMCal covers |÷| < 0.7 and �� = 107¶. It islocated opposite in azimuth to the PHOS, ≥ 4.5 m away from the beam line. It isa sampling calorimeter composed by alternateing layers of 1.44 mm of lead and 1.76mm of a scintillating material, polystyrene. The goal of EMCal is improve the ALICEcapabilities of study the jet quenching in Pb-Pb collisions.
ALICE Cosmic Ray Detector ACORDE is an array of plastic scintillators placedon the L3 magnet and it detects comsmic rays. This detector covers |÷| < 1.4 and≠60¶ < � < 60¶ range and its distance from the beam line is about 8.5 m.
Forward Muon Spectrometer The muon spectrometer is located at ≠4 < ÷ <
≠2.5. It allows to reconstruct the di-muon pairs to observe the quarkonia resonances(J/�,�Õ,�,�Õ,�ÕÕ). The spectrometer is composed by di�erent sections, depicted infig. 2.5. There is a front aborber, made of carbon and concrete (low Z materials) inorder to limit the multiple scattering and the energy loss of the muons. The absorber(4.13m long and located inside the L3 magnet) suppresses all the particles exceptmuons coming from the interaction vertex. Afterwards there are 5 tracking chambers(the central of which is embraced by the dipole magnet used to recognize positivemuons by negative ones), providing the tracks of the muons with a spatial resolutionof 100 µm. After a muon filter wall we have 4 Resistive Plate Chambers (RPC) planesthat answer the need of a trigger on the muons.
Figure 2.5: Sketch of the muon spectrometer
Zero Degree Calorimeter In the ALICE setup there are two ZDC detectors locatedsymmetrically 116 m from the interaction point. ZDCs are sampling calorimeterscomposed by tungsten as absorber material and quartz fibres as active one.
The two ZDCs provide informations about the centrality of the collision measuringthe energy of the spectators nucleons. The number of the spectators is calculated bythe relation
22 2. The ALICE Experiment
EZDC [TeV ] = 2.76(TeV ) ◊ Nspectators (2.3)
where 2.76 is the center of mass energy for nucleon pairs measured in TeV in Pb-Pb collisions at LHC. This relation is a good approximation for the central eventsbut it does not work very well in peripheral collisions. The reason is the importantfragmentation of the nucleons in these type of collisions and the ZDC can not measurethe energy of some fragments losing the propotionality of the equation 2.3.
Photon Multiplicity Detector The PMD covers the range of pseudorapidity 2.3 <
÷ < 3.7 and is composed by an array of gas proportional counters in a cellular structure.It is located 3.64 m away from the center of the experiment. The knowledge of thephoton multiplicity is important to study the state of matter equation and the orderof phase transition.
Forward Multiplicity Detector This detector is made of five rings of silicon stripdetectors, two installed on the side of the muon spectrometer and three are positionedon the other side of the the interation point. FMD provides measurements of themultiplicity of the charged particles in a pseudorapidity range of ≠3.4 < ÷ < ≠1.7and 1.7 < ÷ < 5.1 used to study the particle flows and event-by-event multiplcityfluctuations.
VZERO detector V0 consists of two arrays of scintillators counters installed on thetwo sides of the interaction point. One V0 is located 340 cm far from the origin of theALICE coordinate system, covering a pseudorapidity range of 2.8 < ÷ < 5.1; the secondone is 90 cm away from the interaction point covering a range of ≠3.7 < ÷ < ≠1.7. Itis mainly used to determine the centrality of the events and also for the minimum biastrigger of the central barrel
T0 detector T0 detectors are two array for a total of 24 Cherenkov counters. They areplaced at ≠72.7 cm and 375 cm far from the interaction point covering a pseudorapidityrange of ≠3.8 < ÷ < ≠2.97 and 4.61 < ÷ < 4.92. It is used like a trigger for the TOFgiving the initial time for the time of flight measurement with a precision of ≥ 80 ps.
2.3. Inner Tracking System 23
Layer Type r (cm) ±z (cm) # Modules Material budget (% of X0)1 pixel 3.9 14.1 80 1.142 pixel 7.6 14.1 160 1.143 drift 15.0 22.2 84 1.134 drift 23.9 29.7 176 1.265 strip 38.0 43.1 748 0.836 strip 43.0 48.9 950 0.86
Table 2.1: List of the ITS geometrical and composition details.8
2.3 Inner Tracking System
The Inner Tracking System (ITS, fig. 2.6) is the ALICE subetector closer to the beamline. It consists of six layers of silicon detectors. The two inner layers are equippedwith Silicon Pixel Detectors (SPD), the two outer layers are composed by Silicon StripDetectors (SSD) and the remaining two are made of Silicon Drift Detectors (SDD).
The main tasks of the ITS are:
• Providing a reconstruction of the primary vertex of the interaction.
• Reconstructing the secondary vertexes originating from the decays of charmedand beauty hadrons.
• Improving the impact parameter resolution of the TPC’s tracks.
• Reconstructing the tracks of low-momentum particles (below 200 MeV/c) gener-ated in the nucleus-nucleus collisions.
The ITS is designed to have a low material budget to obtain the lowest possiblee�ect given by multiple scattering. This detector has a high granularity to avoid highoccupancy also in central nucleus-nucleus collisions. The geometrical details and thecharacteristics are tabulated in tables 2.1 and 2.2.
Silicon Pixel Detector The SPD guarantees a high resolution which gives the possi-bility to operate in a high multiplicity environment. In total, there are 240 modulesof this type of detector. The single module is made by 256 ◊ 160 silicon diods. Eachdiode measures 50 µm in the r„ direction and 425 µm in the z coordinate. The totalthickness is 350 µm: 200 µm is the thickness of the diode and 150 µm is due to thereadout chip. Over the two layers there are 1200 readout chips divided on 80 modulesin the inner layer and 160 modules in the outer layer. The spatial resolution of theSPD is ≥ 12 µm in r„ and 100 µm in z direction. The two SPD layers are used
24 2. The ALICE Experiment
Parameter SPD SDD SSDSpatial resolution r„ (µm) 12 35 20Spatial resolution z (µm) 100 25 830Two track resolution r„ (µm) 100 200 300Two track resolution z (µm) 850 600 2400Cell size (µm2) 50◊425 202◊294 95◊40000Active area per module (mm2) 12.8◊69.6 72.5◊75.3 73◊40Readout channels per module 40960 2◊256 2◊768Total number of modules 240 260 1698Total number of readout channels (k) 9835 133 2603Total number of cells (M) 9.84 23 2.6Max. occupancy of the inner layer (%) 2.1 2.5 4Max. occupancy of the outer layer (%) 0.6 1.0 3.3
Table 2.2: ITS characteristics.8 The maximum occupancy is referred to the most centralPb-Pb collisions.
by the reconstruction software to give the first measure of the primary vertex of theinteraction.
Silicon Drift Detector An overview on Silicon Drift Detector will be provided insection 2.3.1.
Silicon Strip Detector The Silicon Strip Detector is made of double-sided (to give atwo-dimensional information) strip detector. It provides the dE/dx information usedto perform particle identification (PID) and has a very high resolution in r„ coordinate
Figure 2.6: Scheme of the ALICE ITS detector
2.3. Inner Tracking System 25
(20 µm, the best of all the six ITS layers) to perform the track prolongation from TPCto ITS. The resolution in z coordinate is 800 µm. The thickness of the detector is 300µm and the active area measures 73 ◊ 40 mm2
2.3.1 Silicon Drift Detector
The Silicon Strip Detector is the type of particle detector equipping the two intermidiatelayers of the ITS. The SDDs can be used to perform PID via dE/dx, like the SSD.
Figure 2.7: SDD principle of operation
Principle of operation The detector (fig. 2.7) is composed by two reverse-biasedp-n junction. Above the p sides there is a metalization held in a decreasing voltageby a voltage divider, generating a constant electric field inside the silicon. Whena charged particle crosses the active area generates electrons-ions couples, by theionization process. The electrons drift along the gutter potential generated by theelectric field and are reached by the anodes.
This detector gives a two-dimensional information of the particle’s crossing point: overthe z coordinate the position is given by the anode who collected the electrons and onthe r„ coordinate you have to measure the drift time compared to a certain startingtime.
SDD setup in ALICE The two SDD layers are composed by a total of 260 modules(84 for the inner layer and 176 for the outer layer). Each module has two drift sides
26 2. The ALICE Experiment
(fig. 2.8) both with 256 anodes. The ADC of the readout electronics works at 20MHz, generating 128 timebins on each drift region.
The resolution on z coordinate is 25 µm, the best of the all ITS types of detector,Instead on the r„ coordinate they have a resolution of 35 µm. Each cell created bythe intersection of anodes and timebins has an area of 70.17 ◊ 75.26 mm2.
Calibration The SDD need a precise and di�cult calibration. To calibrate thisdetector one measure some characteristics is needed:
• ADC pedestal
• ADC gain
• Drift velocity (vdrift)
• Initial time of the electrons’ drift (t0)
Figure 2.8: (Left) Layout of an ALICE SDD module. (Right) Zoom of the anode region.
The ADC pedestal is calibrated with specific calibration runs without beam, measuringthe dark signal exiting the electronics. The ADC gain is calibrated injecting a knowncharge directly in the readout electronics and measuring the output signal.
The SDD module is equipped with three rows of charge injectors per drift side usedto inject a certain charge quantity at a known point of the SDD. The injection isperformed without beam to calibrate the drift velocity, that is proportional to thetemperature according to the equation 2.4, and the initial drift time.
vdrift à T ≠2.4 (2.4)
2.4. ALICE software 27
2.4 ALICE software
The ALICE collaboration develops a specific software to perform simulation, recon-struction and data analysis. This software is called AliROOT and it is based on theROOT framework, both written in C++ language.
2.4.1 ROOT
ROOT is an open source software developed at CERN to ro�er a framework for thesoftware needs of the High Energy physics community.
It is written in C++ to have a good maintainability and extensibility. It is usedall around the world for various purposes, but it is specifically designed for particlephysics scopes. The ROOT develop began in 1998 and since then more than 650classes (≥ 800000 lines of code) have been written.
ROOT provides a lot of advanced statistical and input-output tools. Within theframework a C++ interpreter, called CINT is also avaible: it gives to the user thepossibility to use the C++ like a scripting language.
The framework is avaiable for almost all the operating systems and it is compatiblewith di�erent compilers. To reach this high level of compatibility a lot of standardlibraries were rewritten by the ROOT developers.
2.4.2 AliROOT
AliROOT is a collection of classes extending ROOT. Its main purpose is to implementthe code including the detectors geometry and their response to the particle passage.The code contains also the ALICE simulation and reconstruction software and thedata analysis code. The hierarchy of all these parts of code is drawn in fig. 2.10.
Event simulation The event simulation is performed in AliROOT using di�erentparts of code.
28 2. The ALICE Experiment
Figure 2.9: Data processing workflow
Generator this code generates the particles produced in the collision. Generators usedin AliROOT are: Heavy Ion Jet Interaction Generator (HIJING, specificallydesigned for ion-ion collisions), Dual Parton Model Jet (DPJET) and StringFusion Model (SFM).
Transport the particles produced by the generator are transported through the detectorusing a trasport code that simulates the processes occurring to the particlesduring their life (e.g. multiple scattering inside the detectors, energy deposition,etc...). This code generates the hits that are the points where the particlesintersected the detector’s active materials.
Digitization hits will be transformed into digits that take into account the detector character-istics (e.g. instrumental e�ects).
Raw-data digits are stored in real data-like format to test the reconstruction code that willbe used on the real data (see fig. 2.10).
Event reconstruction The reconstruction workflow in AliROOT is divided into twomain parts:
Local in this phase of reconstruction the digits are read and are grouped into clusters.The center of gravity of the cluster should correspond to the hit produced bythe simulation. The object reconstructed in this way is called recpoint.
Global all the recpoints produced by the local reconstruction of each detector areassociated into tracks during a process called tracking.
2.4. ALICE software 29
Figure 2.10: Simulation and reconstruction in AliROOT
2.4.3 AliEn and the Grid
All LHC experiments produce huge amount of data. These data need large computingresources to be stored and analyzed. The Grid infrastucture born at CERN to meet thisrequirement. The project was started in 2000 and allows the scientists to distribuitecomputing resources and storage all around the world splitted in certains computingcenters. These computing centers are divided in a level hierarchy: levels are calledtiers.
Tier 0 is the computer center located at CERN which stores all the data from the exper-iments. The Tier 0 also performs Monte Carlo simulations and reconstruction,data reconstruction and analysis.
Tier 1 are 13 regional computer centers (in Italy there is a Tier 1 centre, located inBologna) which store copies of the LHC data and contribute to the reconsturctionof data and simulations. Tier 1s are connected with the Tier 0 by an optical linkworking at 10Gb/s.
Tier 2 these centers have not a large storage capability, but provide su�cient computingresources to perform simulations, reconstructions and analysis. In Italy we have11 Tier 2 centers one of which located in Torino.
30 2. The ALICE Experiment
2.4.4 High Level Trigger
With the name High Level Trigger (HLT) we can name two di�erent entities: HLTsoftware and HLT hardware.
Hardware HLT is a Tier 1-like computing cluster located at Point 2 of LHC, in theALICE hall. It has multiple architectures computer (CPU, GPU). This cluster receivesall the data collected by the experiment. ALICE produces 25 GB/s of data and doesnot exists a technology to write this amount of data in the short time avaiable. TheHLT cluster reduces the rate to tape to 1.25 GB/s. This reduction is performed byreconstructing parts of raw data and storing only the results of those reconstruction.
Software In AliROOT there is a dedicated set of classes to be used on the HLTsystem. One of the main requirements that this software has to satisfy is the computingtime consuption which must be as low as possibile to be as much as possible "in time"with the collisions inside the experiment. The reconstruction software for a specificdetector is written by the detector working group, so the goal of this thesis is to writea local reconstruction algorithm for the ALICE SDD detector (see 2.3) fast enough toachieve the HLT computing requirements.
3The Cluster Finder algorithms
The old and the new algorithm
Contents3.1 Workflows of the V2 and the fast algorithm . . . . . . . . . . 32
3.1.1 V2 algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.1.2 Fast algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.2 Memory model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.3 Using the memory e�ciently . . . . . . . . . . . . . . . . . . . 39
32 3. The Cluster Finder algorithms
The cluster finder algorithm is the part of the reconstruction that groups the digits (orthe raw-data) in clusters (see section 2.4) and reconstruct the recpoints (reconstructedpoints).
The aim of this chapter is to present the algorithm currently (called V2) in productionand my own one (called fast). The way followed to reach the speedup is also explained.The algorithms explained are run on every drift side of SDD modules.
3.1 Workflows of the V2 and the fast algorithm
3.1.1 V2 algorithm
V2 algorithm makes the following steps (as shown in fig. 3.1) to perform the clusterfinding.
Data management Data are stored in an array of objects whose data memberscontains some informations that can lead to the reconstruction of the particle crossingpoint. The most important are:
• Unique indexi which is the indentifier of the cell on the matrix composed by allthe cells of a drift side.
• ADC count
• Reference to the digit corresponding to the cell (using Monte Carlo simulations)
• Reference to the raw data (using real data or raw data generated by the MonteCarlo simulations)
An object is instantiated for each cells regardless of its occupancy.
iThe unique index is calculated as: index = (tb) · (Nanodes
) + anod, where tb is the timebin, anod isthe anode and N
anodes
is the total number of anodes on the single wing
3.1. Workflows of the V2 and the fast algorithm 33
Workflow It starts with a loop (two nested for loops) over anode-timebin cells thatcontains all the reconstruction. If the cell has been hit (has a ADC count over thethreshold) the first recursive function is called to find all the local maxima of thecluster. This method starts from the cell interested by the loop and checks if thenearest cells (up, down, left and right) has been hit, if one of them is over the thresholdthe ADC count is compared to the others in order to find the local maxima. Thepositions of the cells recognized as maxima are stored in an array.
After doing this, another recursive function performs the recpoint reconstructioncomputing its characteristics: cluster size, position over the local coodinate system,charge deposition. During this step every cell is marked as used, so the initial loopcan skip them before launching the local maxima finding.
The next step is to check if the reconstructed cluster is noise. If the cluster isrecognized as noise the algorithm jumps to the next step of the first loop, otherwisesome calibration corrections are applied to the cluster, the position in the globalcoordinate system is calculated and the cluster is added to the clusters list.
Figure 3.1: Workflow of the V2 cluster finder algorithm
3.1.2 Fast algorithm
The fast algorithm follows a completely di�erent workflow to reconstruct clusters. Itcan be divided into two phases (see fig. 3.4 and fig. 3.6).
34 3. The Cluster Finder algorithms
Data mangement The fast algorithm uses four integers to completely define theproperties of a single cell. These integers are:
• Unique index of the cell in the anode-timebin matrix.
• ADC count
• Reference to the reconstructed cluster
• Reference to the digit corresponding to the cell when the reconstruction isperformed on Monte Carlo simulations, reference to the raw data when thereconstruction is run on real data or on raw data generated by the Monte Carlo.
these four integers are stored only for the fired cells and compose an array on whichthe reconstruction is performed. To store the information about the fired and theunfired cells an array of integers (so-called bitmask) is used to store bit per bit thestate of the cell: 1 for a cell over threshold, 0 for a cell under threshold.
Corners A cluster can be defined as a set of adjacent anode-timebin cells (fig. 3.2(a)).I had to take a decision: cells adjacent only with a corner (as shown in fig. 3.2(b))can be considered as a part of the same cluster?
(a) An example of valid cluster (b) Example of cells adjacent only by a corner
Figure 3.2
The root of the problem is: if we decide to split clusters adjacents only by a cornerwhen the digits are generated by the same particle we split one cluster, creating aso-called clone. On the other hand, if we decide to merge into one cluster two clusters,generated by di�erent particles, the result is a hit without the corresponding recpoint:following this way we obtain an orphan hit.
3.1. Workflows of the V2 and the fast algorithm 35
I have carried out a test with the two di�erent implementations of the fast algorithmcomparing them with the V2 version.
Figure 3.3: Percentage of orphans hits and cloned recpoints using di�erent algorithms
The histogram depicted in figure 3.3 shows that really exists a cloning e�ect choosingthe algorithm that splits the corners-adjacent clusters. There are more clones and lessorphans hits with the implementation which splits the corners. The situation is totallydi�erent with the implementation that merges this type of clusters. So we have amixed situation: corner-ajacent clusters not always corresponds to only one particle.
We can also observe a high percentage of clone obtained with the V2 algortihm:this is the result of a bug discovered during the thesis and solved with the fastimplementation.
The version that splits the clusters adjacent only by a corner were committed. Themotivation of this decision is the fact that a cloned recpoint results in two very nearrecpoints, so the tracking algorithm can choose the one minimizing the error on thetrack. Otherwise if we do not have a recpoint for the particle we are tracking, becauseit was merged into another one, the algorithm has to extrapolate the track on the nextlayer with a higher error on the track.
36 3. The Cluster Finder algorithms
Phase 1 The first phase of the fast algorithm (workflow scheme in fig. 3.4) consistsin the reasearch of sets of adjacent cells. The search work is made with a loop over theall anode-timebin matrix (with two indented for loops), but a check on the bitmasklaunch the research of neighbor over threshold (see fig. 3.8) only for the cells thathave been hit. The fired cell can be found into two states: either the cell is alreadyincluded in a cluster or not yet.
If the cell is found in the first state the algortihm assigns it a new cluster number,then searches for fired cells on the next cell on the right and below. To check all thefour neighbours (up, down, left and right) one can only check right and below, loopingon the matrix from left to right and from top to bottom, because the above and theleft neighbours already checked the cell. If a fired cell is found the algorithm assignsthe same cluster number of the interested cell.
For the second state, a cell with a cluster number already assigned, the research ismade following the same principle but without the appointment of a new clusternumber and the reasearch process will assign the cluster number of the cell to theneighbor over the threshold.
Figure 3.4: Workflow of the fast cluster finder algorithm, phase 1
This process introduces some errors when a cell over the threshold is, for example, atthe left of a cell with an assigned number. In this case a new cluster number will beassigned, and then the number of the right cell will be modified, without checkingits neighbor. So I have introduced another loop on the whole matrix to find theseerrors and to correct them with a searching method similiar to what is used for thefirst reasearch (see fig. 3.5).
3.2. Memory model 37
Figure 3.5: Workflow of the fast cluster to correct the errors introduced by the first clusterresearch.
Phase 2 When all the clusters are correctly recognized we can start with the recpointreconstruction. We start a loop on the data array calculating the center of gravity ofall clusters (with position expressed in the local coordinate system), the cluster sizeand the charge deposition.
The next step is to decide if the cluster is noise or not: in this case the noise parametersare the same as in V2 algorithm.
Finally, if the cluster is not recongnized as noise, we can change the coordinate system(expressing the position in the global coordiante system) and add the recpoint to thecluster list.
3.2 Memory model
In a modern computer9 there are di�erent types of memory (listed slower to faster):
• Hard disk
• Random Access Memory (RAM)
• Cache memory
38 3. The Cluster Finder algorithms
Figure 3.6: Workflow of the fast cluster finder algorithm, phase 2
Memory level DimensionRAM 32 GBL3 cache 12 MBL2 cache 256 KBL1 cache (instructions) 32 KBL1 cache (data) 32 KB
Table 3.1: Dimensions of memories of the machine where the tests presented in this thesiswere performed (CPU model: Intel XEON E5).
Modern machines have three levels of cache, L1, L2 and L3. The first one is thesmallest, the last one is the slowest. Typical dimensions of the di�erent types ofmemory are tabulated in table 3.1.
When a program executed on the CPU has to handle a datum (e.g. the variables a,b and c in the example 3.1 with b and c variables declared somewhere else in theprogram) looks for it in the L1 cache. If the L1 cache does not have the datum itrequests it to the level 2 cache, and so on with the last level represented by the RAM.When the datum is found it is copied down to the chain to make it accessible to theCPU.
Listing 3.1: A simple operation example1 int a = b + c;
3.3. Using the memory e�ciently 39
The limited size of the memory caches suggests a good programming style, aimed toavoid frequent transfers of data to the cache from higher memory levels. The situationin which the COU doeas not find a datum in the first level of cache is defined a cachemiss. So a good program practice is the one that limits the occurrence of cache misses.It is indeed a good practice because data transfers to the cache cost CPU cycles, hencetime.
The time of access increases if a cache miss occurs because the searching will beperformed over more than one cache level. This increase is not linear, but the accesstime increases up to 10 times between a cache level and the upper one. If to obtains adatum from the L1 cache costs 1 ms obtains the same datum from the L2 cache costs10 ms.
3.3 Using the memory e�ciently
Figure 3.7: Memory occupied by the data used for the reconstruction by di�erent algorithms
The way in which the fast and the V2 algorithms reads the data is di�erent to takeinto account what explained in section 3.2. If we consider four integers to completelydescribe a cell of the anode-timebin matrix (on one drift side) we obtain 512 KB if weuse all the matrix and only 32 KB if we consider the maximum detector occupancy ina central Pb-Pb event (see tab. 2.2). Adding the memory occupied by the bitmask(where is stored the information about what cells are over threashold) and comparingthese amounts of memory with the memory cache of a commercial CPU we obtain the
40 3. The Cluster Finder algorithms
chart shown in fig. 3.7 where is represented the memory occupied by the data usedfrom both algorithms compared to the L1 and L2 cache dimension. The data used bythe fast cluster finder are all contained into the first two levels of cache, insted thedata used by the V2 algorithm that exceed the dimension of L1 and L2 caches.
The approach followed in the fast algorithm reduces the cache misses during the exe-cution of the cluster finder code, pushing down the execution time of the algorithm.
3.3. Using the memory e�ciently 41
(a) (b) (c)
(d) (e) (f)
(g) (h) (i)
(j) (k) (l)
(m) (n)
Figure 3.8: Cluster recognition, cluster correctly identified
42 3. The Cluster Finder algorithms
(a) (b) (c)
(d) (e) (f)
(g) (h) (i)
(j) (k) (l)
(m)
Figure 3.9: Cluster recognition, cluster not correctly identified
4Reconstruction performance
The test of the algorithm
Contents4.1 Data samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.2 Residual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.3 Charge deposition . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.4 Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.4.1 Tracking e�ciency . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.4.2 Track resolution . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.4.3 Good and fake tracks . . . . . . . . . . . . . . . . . . . . . . . 54
44 4. Reconstruction performance
In this chapter some tests on the reconstruction performance of the algorithm will bepresented. All the test are performed on both V2 and fast algorithm to check if onehas a better performance or if they provide similar results.
4.1 Data samples
To carry on the test on the algorithm three di�erent data samples were used.
• For the residual test explained in section 4.2 a Monte Carlo production of 18central (impact parameter between 0.0fm and 0.2fm) Pb-Pb events.
• A di�erent Monte Carlo production of 18 central Pb-Pb events to test a fix madeon the digitalization code found thanks to the residual check.
• For the tests on the energy loss (sec. 4.3) and on the tracking performance (sec.4.4) a Monte Carlo sample of 92 central (impact parameter between 0.0fm and0.5fm) Pb-Pb events was produced.
4.2 Residual
The first test to do while checking the validity of a cluster finder is the distribution ofthe residuals. The residual is defined as the di�erence between the coordinates of thereconstructed rec point and the Monte Carlo hit (see chapter 2, section 2.4) ones asdescribed in equation 4.1.
Rx = xRecP oint ≠ xHit
Ry = yRecP oint ≠ yHit
Rz = zRecP oint ≠ zHit
(4.1)
Looking at the histograms in figures 4.1 and 4.2 which show the residuals calculatedusing the local coordinate system we can see that the distributions are essentially thesame with both the cluster finders, but there are a lot of outliers on the z coordinatedistribution. The problem is present also when computing the residual using the globalcoordinates (fig. 4.3, 4.4 and 4.5).
During the simulation (see chap. 2, sec. 2.4) the hits on the detector are generated andthen those hits are transformed into digits. Investigating the outliers I noticed thatin some cases the z coordinate of an hit was reconstructed in the symmetric positionwith respect to the center of the detector, generating a wide di�erence between theposition of the recpoint compared to its corresponding hit. This investigation led to
4.2. Residual 45
[cm]Hit-xRecPointx-8 -6 -4 -2 0 2 4 6 8
Clu
ster
cou
nt
1
10
210
310
410
resxoEntries 380617Mean -2.854e-05RMS 0.01261
V2
(a) V2
[cm]Hit-xRecPointx-8 -6 -4 -2 0 2 4 6 8
Clu
ster
cou
nt
1
10
210
310
410
resxnEntries 388304Mean -5.143e-05RMS 0.01301
fast
(b) fast
Figure 4.1: Residual on the local x coordinate.
[cm]Hit-zRecPointz-8 -6 -4 -2 0 2 4 6 8
Clu
ster
cou
nt
1
10
210
310
410
reszoEntries 380617Mean -0.008099RMS 0.1132
V2
(a) V2
[cm]Hit-zRecPointz-8 -6 -4 -2 0 2 4 6 8
Clu
ster
cou
nt
1
10
210
310
410
resznEntries 388304Mean -0.008078RMS 0.111
fast
(b) fast
Figure 4.2: Residual on the local z coordinate.
finxing a bug in the digitization code. When a particle entered the detector passingby a certain wing of the SDD module and exited from the other wing the coordinate
[cm]Hit-xRecPointx-10 -8 -6 -4 -2 0 2 4 6 8 10
Clu
ster
cou
nt
1
10
210
310
410
510
gresxoEntries 380617Mean -2.305e-07RMS 0.0088
V2
(a) V2
[cm]Hit-xRecPointx-10 -8 -6 -4 -2 0 2 4 6 8 10
Clu
ster
cou
nt
1
10
210
310
410
510
gresxnEntries 388304Mean 3.114e-06RMS 0.00906
fast
(b) fast
Figure 4.3: Residual on the global x coordinate.
46 4. Reconstruction performance
[cm]Hit
-yRecPoint
y-10 -8 -6 -4 -2 0 2 4 6 8 10
Clu
ster
cou
nt
1
10
210
310
410
510
gresyoEntries 380617Mean -3.516e-06RMS 0.008797
V2
(a) V2
[cm]Hit
-yRecPoint
y-10 -8 -6 -4 -2 0 2 4 6 8 10
Clu
ster
cou
nt
1
10
210
310
410
510
gresynEntries 388304Mean 1.708e-06RMS 0.009069
fast
(b) fast
Figure 4.4: Residual on the global y coordinate.
[cm]Hit-zRecPointz-10 -8 -6 -4 -2 0 2 4 6 8 10
Clu
ster
cou
nt
1
10
210
310
410
510
greszoEntries 380617Mean 0.0001947RMS 0.113
V2
(a) V2
[cm]Hit-zRecPointz-10 -8 -6 -4 -2 0 2 4 6 8 10
Clu
ster
cou
nt
1
10
210
310
410
510
gresznEntries 388304Mean 0.0002082RMS 0.1108
fast
(b) fast
Figure 4.5: Residual on the global z coordinate.
of the correponding digit was not updated with the new wing. So the result was thatwe had the hit on a wing and the digits on the other one.
After the fixing I have carried on other tests on the residual distribution on both local(fig. 4.6) and global (fig. 4.7) coordinates. As shown in the plots, the problem is nowcorrected.
Most of the entries in those histograms are in the central region, so they can bemagnified. This was done for both local (fig. 4.8 and 4.9) and global (fig. 4.10, 4.11and 4.12) coordinates with the two cluster finders and for the residual distributionsafter the digitization code fix (fig. 4.13 and 4.14).
The distributions obtained with the two algorithms are quite similar also after thebugfix. However in figure 4.9 the average value of the histograms is not 0 as expectedbut is less than 0 by 85 µm. The bias is not present in the distribution produces withthe global coordinate system. This is consistent with the presence of another bug inthe digitization code when the coordinates are transformed by local to global and then
4.2. Residual 47
[cm]Hit-xRecPointx-8 -6 -4 -2 0 2 4 6 8
Clu
ster
cou
nt
1
10
210
310
410
resxnEntries 394728Mean -3.7e-05RMS 0.0131
fast
(a) Local x
[cm]Hit-zRecPointz-8 -6 -4 -2 0 2 4 6 8
Clu
ster
cou
nt
1
10
210
310
410
resznEntries 394728Mean -0.00848RMS 0.01051
fast
(b) Local z
Figure 4.6: Residual on the local x and z coordinates after the digitalization fix.
from global to local. However the coordinate system used for the global reconstructionof the event inside the whole apparatus is the global system, so this bug is not socritical.
[cm]Hit-xRecPointx-10 -8 -6 -4 -2 0 2 4 6 8 10
Clu
ster
cou
nt
1
10
210
310
410
510
gresxnEntries 394728Mean 1.212e-06RMS 0.009055
fast
(a) Global x
[cm]Hit
-yRecPoint
y-10 -8 -6 -4 -2 0 2 4 6 8 10
Clu
ster
cou
nt
1
10
210
310
410
510
gresynEntries 394728Mean -5.496e-06RMS 0.009222
fast
(b) Global y
[cm]Hit-zRecPointz-10 -8 -6 -4 -2 0 2 4 6 8 10
Clu
ster
cou
nt
1
10
210
310
410
510
gresznEntries 394728Mean -1.111e-05RMS 0.008052
fast
(c) Global z
Figure 4.7: Residual on the global x, y and z coordinate after the digitalization fix.
48 4. Reconstruction performance
[cm]Hit-xRecPointx-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
resxoEntries 380617Mean -2.783e-05RMS 0.01261
V2
(a) V2
[cm]Hit-xRecPointx-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
resxnEntries 388304Mean -5.084e-05RMS 0.01301
fast
(b) fast
Figure 4.8: Residual on the local x coordinate.
[cm]Hit-zRecPointz-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
reszoEntries 380617Mean -0.008526RMS 0.01056
V2
(a) V2
[cm]Hit-zRecPointz-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
resznEntries 388304Mean -0.008507RMS 0.0104
fast
(b) fast
Figure 4.9: Residual on the local z coordinate.
[cm]Hit-xRecPointx-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
510
gresxoEntries 380617Mean 8.985e-07RMS 0.008809
V2
(a) V2
[cm]Hit-xRecPointx-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
510
gresxnEntries 388304Mean 4.024e-06RMS 0.00907
fast
(b) fast
Figure 4.10: Residual on the global x coordinate.
4.3. Charge deposition 49
[cm]Hit
-yRecPoint
y-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
510
gresyoEntries 380617Mean -1.004e-05RMS 0.008801
V2
(a) V2
[cm]Hit
-yRecPoint
y-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
510
gresynEntries 388304Mean -5.07e-06RMS 0.009072
fast
(b) fast
Figure 4.11: Residual on the global y coordinate.
[cm]Hit-zRecPointz-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
510
greszoEntries 380617Mean 3.814e-06RMS 0.0082
V2
(a) V2
[cm]Hit-zRecPointz-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
510
gresznEntries 388304Mean 3.13e-06RMS 0.007981
fast
(b) fast
Figure 4.12: Residual on the global z coordinate.
4.3 Charge deposition
As said in chapter 2 section 2.3 the SDD have an analog readout electronics giving thepossibility to measure the charge released into the detector by a particle during its
[cm]Hit-xRecPointx-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
resxnEntries 394728Mean -3.548e-05RMS 0.0131
fast
(a) Local x
[cm]Hit-zRecPointz-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
resznEntries 394728Mean -0.00848RMS 0.01051
fast
(b) Local z
Figure 4.13: Residual on the local x and z coordinates after the digitalization fix.
50 4. Reconstruction performance
[cm]Hit-xRecPointx-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
510
gresxnEntries 394728Mean 1.544e-06RMS 0.009065
fast
(a) Global x
[cm]Hit
-yRecPoint
y-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
510
gresynEntries 394728Mean -1.095e-05RMS 0.009227
fast
(b) Global y
[cm]Hit-zRecPointz-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
Clu
ster
cou
nt
1
10
210
310
410
510
gresznEntries 394728Mean -1.058e-05RMS 0.008062
fast
(c) Global z
Figure 4.14: Residual on the global x, y and z coordinate after the digitalization fix.
crossing. With the information on the charge collected by the detector the particle’senergy loss can be calculated.
In figure 4.15 the energy loss of the particles reconstructed by the two di�erent clusterfinders was compared. The comparison has been revelaed negligible di�erences betweenthe two reconstruction algorithms.
4.4 Tracking
Another way to test the goodness of a cluster finder is to check the performance of thetracking. The 92 central Pb-Pb events sample was reconstructed with both clusterfinders and the same tracker.
The number of clusters per track (in fig. 4.16 is shown the number of track with atleast one cluster in the layer reported on the abscissa axis) is almost the same withboth cluster finders.
4.4. Tracking 51
Figure 4.15: Number of clusters reconstructed as a function of the energy released by theparticle.
The tracking algorithm takes the tracks found in the TPC and tries to prolong theminto the ITS. I have checked the fraction of prolonged tracks (fig. 4.17) and also inthis case there are negligible di�erencies between the V2 and the fast cluster finder.
fHistNclsITSMIEntries 296199Mean 2RMS 2.464
N clusters0 1 2 3 4 5 6 7
Cou
nts
0
20
40
60
80
100
120
140
160
180310× fHistNclsITSMI
Entries 296199Mean 2RMS 2.464
ITS from TPC
ITS-SA
N ITS clusters per track (MI)
(a) V2
fHistNclsITSMIEntries 296199Mean 2.001RMS 2.464
N clusters0 1 2 3 4 5 6 7
Cou
nts
0
20
40
60
80
100
120
140
160
180310× fHistNclsITSMI
Entries 296199Mean 2.001RMS 2.464
ITS from TPC
ITS-SA
N ITS clusters per track (MI)
(b) fast
Figure 4.16: Number of clusters per track with the two di�erent algorithms.
52 4. Reconstruction performance
(a) V2 (b) fast
Figure 4.17: Fraction of TPC tracks prolonged in the ITS as a function of pT . The graphsare divided per number of clusters on the ITS and on the ordinate axis there is the numberof tracks found in the TPC prolonged into the ITS divided by the total number of tracksreconstructed in the TPC only.
The tracker can also reconstruct the secondary tracks which are those coming fromthe dacays of the particles that has a c· > 100 µm producted in the primary vertex ofthe event. The fraction of secondaries recognized using the two di�erent algorithms isthe same (fig. 4.18).
(a) V2 (b) fast
Figure 4.18: Fraction of secondaries tracks reconstructed with the two algorithms as afunction of pT .
4.4. Tracking 53
There are also reconstructed tracks that originates from the association of uncorrelatedhits on the detector. It is important to minimize the fraction of thise so-called faketracks and, in this case, both the cluster finders lead to the reconstruction of the samenumber of fake tracks (fig. 4.19).
(a) V2 (b) fast
Figure 4.19: Fraction of fake tracks reconstructed with the two algorithms as a function ofpT .
4.4.1 Tracking e�ciency
The tracks that are not fakes are called good tracks. We can define the trackinge�ciency as the ratio between the number of good tracks and the total number oftracks that has a number of hits su�cient to be reconstruct.
When one reconstructs the same events with both cluster finders can not see importantdi�erences for what concerns the tracking e�ciency (fig. 4.20).
4.4.2 Track resolution
The primary vertex of the interaction is reconstructed twice during the whole recon-struction process. A first approximation of the vertex is given by the two SPD layersand at the end of the tracking the primary vertex is reconstructed another time usingthe tracks found.
54 4. Reconstruction performance
Pt (GeV/c)1 2 3 4 5 6
Trac
king
effi
cien
cy
0.7
0.75
0.8
0.85
0.9
0.95
1
1.05
1.1
(a) V2
Pt (GeV/c)1 2 3 4 5 6
Trac
king
effi
cien
cy
0.7
0.75
0.8
0.85
0.9
0.95
1
1.05
1.1
(b) fast
Figure 4.20: Tracking e�ciency as a function of pT .
One can define the impact parameter as the distance of clostest approach of the trackwith the primary vertex. The impact parameter distributions with the two algorithmsdo not see significant di�erences (fig. 4.21).
Entries 55184Mean 0.5899RMS 167.9Underflow 1603Overflow 1598
/ ndf 2χ 4721 / 27Constant 56.6± 7744 Mean 0.580± 1.189 Sigma 0.7± 126.1
mµ-600 -400 -200 0 200 400 600
Trac
ks c
ount
0
2000
4000
6000
8000
10000Entries 55184Mean 0.5899RMS 167.9Underflow 1603Overflow 1598
/ ndf 2χ 4721 / 27Constant 56.6± 7744 Mean 0.580± 1.189 Sigma 0.7± 126.1
(a) V2
Entries 55363Mean 0.7096RMS 167.8Underflow 1604Overflow 1607
/ ndf 2χ 4722 / 27Constant 56.7± 7777 Mean 0.579± 1.242 Sigma 0.7± 126
mµ-600 -400 -200 0 200 400 600
Trac
ks c
ount
0
2000
4000
6000
8000
10000Entries 55363Mean 0.7096RMS 167.8Underflow 1604Overflow 1607
/ ndf 2χ 4722 / 27Constant 56.7± 7777 Mean 0.579± 1.242 Sigma 0.7± 126
(b) fast
Figure 4.21: Impact parameter distribution of the reconstructed tracks on the z coordinate.
4.4.3 Good and fake tracks
The reconstruction software, for Monte Carlo events, assigns a label to the tracks, thatis the particle label in the kineamtics tree associated to the reconstructed track. Sincea negative label is assigned to fake tracks, it is easy to also know if a track is good orfake. With the fast cluster finder algorithm we obtain a higher number of good tracksand also less fake tracks as shown in figures 4.22, 4.23, 4.24 and 4.25.
Comparing those results with those shown in fig. 4.19 one can see some discrepancies.
4.4. Tracking 55
Layer number1 2 3 4 5 6
Trac
ks c
ount
130
140
150
160
170
180
190
310×
fastV2
Total tracks per layer GOOD
Figure 4.22: Number of good tracks traconstructed by the two algorithms.
The di�erence in the number of good and fake tracks is not reflected by the previousanalysis.
The reason of this di�erence is the way in which a fake track is defined: if we check onlythe label of the track we find some di�erences, if we check also other track paramentersthose di�erences are negligible. The reason is that the fast algorithm changes the wayin which the label referring to the particle is assigned to the cluster. At every clusterthe algorithm can assign up to three labels because a single cluster could be formedby the charge released by more than one particle.
The V2 algorithm searches for the peak in terms of charge deposition, of the clusterand, starting from that cell, evaluates the labels of the digits in a square of 5 ◊ 5 cellscentered on the peak without taking into account whether the cell has been hit or not(see fig. 4.26(a) and 4.27(a) where in both cases all the cells composing the clusterare taken into account, so the label assignment is the same using the two algorithms).The fast algorithm evaluates all the digits composing the cluster to decide which labelsto assign to the cluster (see fig. 4.26(b) and 4.27(b) where the V2 cluster finder doesnot take into account all the cells as does the fast algorithm).
Once valued the cells both algorithms sort the labels in a pT base and then the firstthree label are selected and assigned to the cluster.
The results shows that the decision-making process implemented in the fast algorithm
56 4. Reconstruction performance
Layer number1 2 3 4 5 6
Trac
ks c
ount
24000
26000
28000
30000
32000
fastV2
Total tracks per layer FAKES
Figure 4.23: Number of fake tracks traconstructed by the two algorithms.
gives better results in terms of label assignment.
4.4. Tracking 57
Figure 4.24: Ratio of the number of good tracks reconstructed by the two algorithms.
Figure 4.25: Ratio of the number of fake tracks reconstructed by the two algorithms.
58 4. Reconstruction performance
(a) V2 (b) fast
Figure 4.26: In yellow the cells used by the two algorithms to assign the correct label tothe reconstructed cluster. In this case both algorithms take into account all the labels of thecells composing the cluster.
(a) V2 (b) fast
Figure 4.27: In yellow the cells used by the two algorithms to assign the correct label tothe reconstructed cluster. In this case the V2 algorithm can lose some labels taking intoaccount less cells which are part of the cluster.
5Conclusions
Computing performance and results
Contents5.1 Execution time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.2 Speedup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.3 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
60 5. Conclusions
The primary goal of the work described in this dissertation is to improve the computingperformace of the cluster finder algorithm (see chapter 3), so I have carried out sometests on the execution time of the new algorithm I developed and on the old V2 clusterfinder.
All the tests were done using an IntelrXeonrCPU E5-2609 v2 and the time wasmeasured using the stopwatch class provided by the ROOT framework (TStopwatch).
5.1 Execution time
The execution time of the cluster finder that reconstructs the three di�erent detectortechnologies composing the ITS (see sec. 2.3) are measured on a sample of 1490minimun bias Pb-Pb events.
Figure 5.1: Execution time of the V2 cluster finder compared with the other ITS detectors.Note the long tail for the SDD histogram.
Looking at the histograms shown in figure 5.1 and 5.2 it is immediatly clear that alarge number of events that were reconstructed by the cluster finder of the SDD in
5.2. Speedup 61
Figure 5.2: Execution time of the fast cluster finder compared with the other ITS detectors.Note that the long tail for the SDD histogram (fig. 5.1) is no longer present.
a time ranging between 0.15s and 0.5s now are reconstructed faster: we have surelyobtained a certain improvement.
5.2 Speedup
The main parameter to describe the improvement of an algorithm for what concernsthe execution time is the so-called speedup ratio defined as:
S = tv2tfast
(5.1)
where S is the speedup, tv2 is the execution time of the V2 algorithm and tfast theexecution time of the fast algorithm.
I have calculated the average speedup of the cluster finder algorithm taking the ratiobetween the mean value of the SDD histograms shown in section 5.1 (fig. 5.3). The
62 5. Conclusions
value obtained for the speedup isS = 3.89
Figure 5.3: Comparison between V2 and fast cluster finder execution time. The averagespeedup is 3.89.
I also checked the speedup as a function of the multiplicity to verify if one of thetwo algorithm is strongly occupancy dependent. For this test a sample Monte Carloproduction of 4830 Pb-Pb events were generated to have enough statistics in everyclass of multiplicity. The number of reconstructed clusters on the inner layer of SPDis used as a paramenter directly related to the multiplicity.
The result of the test is shown in figure 5.4. The speedup is over a factor 4 for all themultiplicity classes except for those with fewer particles where the execution time isvery close to 0. The result of this test is that none of the two algorithms is occupancydependent.
5.3. Conclusions 63
Figure 5.4: Speedup as a function of the number of reconstructed clusters in the innerpayer of SPD. Non of the two algorithms is occupancy dependent because the speedup doesnot change so much along the multiplicity classes.
5.3 Conclusions
The developed class was sent to the High Level Trigger (HLT) group and they havemade proper tests giving me a good feedback, so the new algorithm can be adopted inthe HLT reconstruction code.
A new class was committed to the o�cial repository of the ALICE softwarei and,according to the results shown in chapter 4, it was decided to use the fast algorithmby default for the SDD local reconstruction during the run 2 of LHC starting at thebeginning of year 2015.
ihttp://git.cern.ch/pub/AliRoot
ADeveloped code
ContentsA.1 AliITSClusterFinderSDDfast.h . . . . . . . . . . . . . . . . . . 66
A.2 AliITSClusterFinderSDDfast.cxx . . . . . . . . . . . . . . . . . 67
66 A. Developed code
In this chapter is attached the C++ class developed and committed to the AliROOTrepository.
A.1 AliITSClusterFinderSDDfast.h
# ifndef ALIITSCLUSTERFINDERSDDFAST_H# define ALIITSCLUSTERFINDERSDDFAST_H
4 # include " AliITSClusterFinder .h"# include " AliITSDetTypeRec .h"# include <vector >
class TBits;9 class TClonesArray ;
class AliRawReader ;class AliITSRawStream ;class AliITSCalibrationSDD ;class AliITSsegmentationSDD ;
14
class AliITSClusterFinderSDDfast : public AliITSClusterFinder {public :
AliITSClusterFinderSDDfast ( AliITSDetTypeRec * dettyp );virtual ~ AliITSClusterFinderSDDfast ();
19 virtual void FindRawClusters (Int_t mod);virtual void RawdataToClusters ( AliRawReader * rawReader );void SetPeakSelection ( Float_t looseCut =15. , Float_t tightCut
=30. , Float_t maxTime =2000.) {fCutOnPeakLoose = looseCut ;fCutOnPeakTight = tightCut ;
24 fMaxDrTimeForTightCut = maxTime ;}
enum { kHybridsPerDDL = 24}; // number of hybrids in eachDDL
enum { kModulesPerDDL = 12}; // number of modules in eachDDL
29
protected :AliITSClusterFinderSDDfast (const AliITSClusterFinderSDDfast &
source ); // copy constructor// assignment operator
A.2. AliITSClusterFinderSDDfast.cxx 67
AliITSClusterFinderSDDfast & operator =( const
AliITSClusterFinderSDDfast & source );34 void FindClustersSDD ( TClonesArray * digits );
void FindClustersSDD (std :: vector <int >& bins0 , std :: vector <int
>& bins1 , const Int_t map0 [], const Int_t map1 [],TClonesArray *dig , TClonesArray * clusters =0x0 , Int_tjitter =0);
void FindClustersSDD ( AliITSRawStream * input);virtual AliITSCalibrationSDD * GetResp (Int_t mod)const {
39 return ( AliITSCalibrationSDD *) fDetTypeRec ->GetCalibrationModel (mod);}
virtual AliITSsegmentationSDD * GetSeg () const {return ( AliITSsegmentationSDD *) fDetTypeRec ->
GetSegmentationModel (1) ;}
Int_t fNAnodes ; // number of anodes44 Int_t fNTimeBins ; // number of time bins
Int_t fNZbins ; // number of cells alonganodes
Int_t fNXbins ; // number of cells alongtime
std :: vector <std :: vector <int > > fDDLBins ; // container fordigits for 1 DDL
Float_t fCutOnPeakLoose ; // loose cut on peak (forall drift times)
49 Float_t fCutOnPeakTight ; // tight cut on peak (forsmall drift times)
Float_t fMaxDrTimeForTightCut ; // max. drift time forfCutOnPeakTight
ClassDef ( AliITSClusterFinderSDDfast ,1) // ITS cluster finderfast for SDD
};54
#endif
A.2 AliITSClusterFinderSDDfast.cxx
# include <vector ># include <TClonesArray .h># include <TBits.h>
68 A. Developed code
# include <TMath.h>5 # include <TH2F.h>
# include <TFile.h># include " AliITSClusterFinderSDDfast .h"# include " AliITSRecPoint .h"# include " AliITSRecPointContainer .h"
10 # include " AliITSDetTypeRec .h"# include " AliRawReader .h"# include " AliITSRawStreamSDD .h"# include " AliITSRawStreamSDDCompressed .h"# include " AliITSCalibrationSDD .h"
15 # include " AliITSresponseSDD .h"# include " AliITSDetTypeRec .h"# include " AliITSReconstructor .h"# include " AliITSsegmentationSDD .h"# include " AliITSdigitSDD .h"
20 # include " AliITSgeomTGeo .h"
ClassImp ( AliITSClusterFinderSDDfast )
AliITSClusterFinderSDDfast :: AliITSClusterFinderSDDfast (AliITSDetTypeRec * dettyp ): AliITSClusterFinder ( dettyp ),
25 fNAnodes (0) ,fNTimeBins (0) ,fNZbins (0) ,fNXbins (0) ,fDDLBins (),
30 fCutOnPeakLoose (0.) ,fCutOnPeakTight (0.) ,fMaxDrTimeForTightCut (0.)
{// Default constructor
35 fNAnodes = GetSeg () ->NpzHalf ();fNZbins = fNAnodes +2;fNTimeBins = GetSeg () ->Npx ();fNXbins = fNTimeBins +2;AliDebug (2, Form("Cells �in�SDD� cluster � finder :� Andoes =%d��
TimeBins =%d",fNAnodes , fNTimeBins ));40 SetPeakSelection (15. ,30. ,2000.);
fDDLBins . resize ( kHybridsPerDDL );}
45 //
A.2. AliITSClusterFinderSDDfast.cxx 69
______________________________________________________________________
AliITSClusterFinderSDDfast ::~ AliITSClusterFinderSDDfast (){
// Default destructor}
50
//______________________________________________________________________
void AliITSClusterFinderSDDfast :: FindRawClusters (Int_t mod){
// Find clusters55 SetModule (mod);
FindClustersSDD ( fDigits );
}
60 //______________________________________________________________________
void AliITSClusterFinderSDDfast :: FindClustersSDD ( TClonesArray *digits ){
std :: vector <int > bins0;std :: vector <int > bins1;
65 const Int_t kMapDim = fNZbins * fNXbins /32;Int_t map0[ kMapDim ];Int_t map1[ kMapDim ];for(Int_t j=0;j< kMapDim ;++j){
map0[j]= map1[j]=0;70 }
AliITSCalibrationSDD * cal = ( AliITSCalibrationSDD *) GetResp (fModule );
if(cal ==0){AliError (Form(" Calibration � object �not� present �for�SDD�
module �%d\n",fModule ));return ;
75 }
AliITSdigitSDD *d=0;Int_t i, ndigits =digits -> GetEntriesFast ();for (i=0; i< ndigits ; i++){
80 d=( AliITSdigitSDD *) digits -> UncheckedAt (i);
70 A. Developed code
Int_t ian=d-> GetCoord1 ();Int_t itb=d-> GetCoord2 ();Float_t gain=cal -> GetChannelGain (ian)/ fDetTypeRec ->
GetAverageGainSDD ();Float_t charge =d-> GetSignal (); // returns expanded signal
85 // (10 bit , low threshold already added)Float_t baseline = cal -> GetBaseline (ian);if(charge > baseline ) charge -= baseline ;else charge =0;
90 if(gain >0.){ // Bad channels have gain =0.charge /= gain;if(charge <cal -> GetThresholdAnode (ian)) continue ;Int_t q=( Int_t)( charge +0.5);Int_t y=itb +1;
95 Int_t z=ian +1;Int_t iindex =y* fNZbins +z;Float_t noise=cal -> GetNoiseAfterElectronics (ian) *2.2; //
applies zero suppression using the measured noise ofeach anode . Threshold values from ALICE -INT -1999 -28V10
if (z<= fNAnodes ){if(q>noise){
100 bins0. push_back ( iindex );bins0. push_back (q);bins0. push_back (0);bins0. push_back (i);map0[ iindex /32]|=(1 < <( iindex %32));
105 }}else{
z -= fNAnodes ;if(q>noise){
110 iindex =y* fNZbins +z;bins1. push_back ( iindex );bins1. push_back (q);bins1. push_back (0);bins1. push_back (i);
115 map1[ iindex /32]|=(1 < <( iindex %32));}
}}
}120 FindClustersSDD (bins0 , bins1 , map0 , map1 , digits );
A.2. AliITSClusterFinderSDDfast.cxx 71
}
//______________________________________________________________________
void AliITSClusterFinderSDDfast :: FindClustersSDD (std :: vector <int >& bins0 , std :: vector <int >& bins1 , const Int_t map0 [],const Int_t map1 [], TClonesArray *digits , TClonesArray *clusters , Int_t jitter ){
125
static AliITSRecoParam *repa = NULL;if (! repa){
repa = ( AliITSRecoParam *) AliITSReconstructor :: GetRecoParam();
if (! repa){130 repa = AliITSRecoParam :: GetHighFluxParam ();
AliWarning ("Using � default � AliITSRecoParam �class");}
}const TGeoHMatrix *mT2L= AliITSgeomTGeo ::
GetTracking2LocalMatrix ( fModule );135 AliITSCalibrationSDD * cal = ( AliITSCalibrationSDD *) GetResp (
fModule );if(cal ==0){
AliError (Form(" Calibration � object �not� present �for�SDD�module �%d\n",fModule ));
return ;}
140
TClonesArray &cl=* clusters ;Int_t nrp =0;for (Int_t s=0; s <2; s++){
Int_t *bins;145 unsigned int binssize ;
const Int_t * map;if(s==0){
binssize =bins0.size ();bins = & bins0 [0];
150 map=map0;}if(s==1){
binssize =bins1.size ();bins =& bins1 [0];
155 map=map1;
72 A. Developed code
}
const Int_t rresto =fNZbins -1;Int_t cid =0;
160 for(std :: vector <int >:: size_type i=0;i< binssize ;i+=4){if (! bins[i+2])
bins[i +2]=++ cid;Int_t me=bins[i];Int_t resto=me% fNZbins ;
165 if( resto == rresto ){Int_t idxs [1]={ me+ fNZbins };for(Int_t k=0;k <1;++k)
if(map[idxs[k]/32]&(1 < <( idxs[k]%32)))for(std :: vector <int >:: size_type j=i+4;j< binssize ;j
+=4)170 if(bins[j]== idxs[k]){
bins[j+2]= bins[i+2];break ;
}}
175 else{Int_t idxs [2]={ me+1,me+ fNZbins };for(int k=0;k <2;++k)
if(map[idxs[k]/32]&(1 < <( idxs[k]%32)))for(std :: vector <int >:: size_type j=i+4;j< binssize ;j
+=4)180 if(bins[j]== idxs[k]){
bins[j+2]= bins[i+2];break ;
}}
185 }for(std :: vector <int >:: size_type i=0;i< binssize ;i+=4){
Int_t me=bins[i];Int_t resto=me% fNZbins ;if( resto == fNZbins -1){
190 Int_t idxs [1]={ me+ fNZbins };Int_t myid=bins[i+2];for(Int_t l=0;l <1;++l){
if(map[idxs[l]/32]&(1 < <( idxs[l]%32)))for(std :: vector <int >:: size_type j=i+4;j< binssize ;j
+=4){195 if(bins[j]== idxs[l]){
Int_t hisid=bins[j+2];
A.2. AliITSClusterFinderSDDfast.cxx 73
if(myid != hisid){for(std :: vector <int >:: size_type k=2;k<
binssize ;k+=4)if(bins[k]== hisid)
200 bins[k]= myid;}break ;
}}
205 }}else{
Int_t idxs [2]={ me+1,me+ fNZbins };Int_t myid=bins[i+2];
210 for(Int_t l=0;l <2;++l){if(map[idxs[l]/32]&(1 < <( idxs[l]%32)))
for(std :: vector <int >:: size_type j=i+4;j< binssize ;j+=4){
if(bins[j]== idxs[l]){Int_t hisid=bins[j+2];
215 if(myid != hisid){for(std :: vector <int >:: size_type k=2;k<
binssize ;k+=4)if(bins[k]== hisid)
bins[k]= myid;}
220 break ;}
}}
}225 }
Int_t recp[cid ][12];for(Int_t i=0;i<cid ;++i)
for(Int_t j=0;j <12;++ j)230 recp[i][j]=0;
Int_t kplab[cid ][10];for(Int_t i=0;i<cid ;++i)
for(Int_t j=0;j <10;++ j)235 kplab[i][j]= -2;
for(std :: vector <int >:: size_type i=0;i< binssize ;i+=4){
74 A. Developed code
Int_t q=bins[i+1];Int_t me=bins[i+2] -1;
240 Int_t z=bins[i]% fNZbins ;Int_t x=bins[i]/ fNZbins ;recp[me ][0]+= q; // sumqrecp[me ][1]+= z*q; // sumzrecp[me ][2]+= x*q; // sumx
245
#ifdef CSBASEDERRORrecp[me ][3]+= z*z*q; // sigmaZ2recp[me ][4]+= x*x*q; // sigmaX2
#endif
250
if(recp[me ][5]==0) {recp[me ][6]= z;recp[me ][7]= z;recp[me ][8]= x;
255 recp[me ][9]= x;recp[me ][10]= q;recp[me ][11]= bins[i];
}else{
260 if(recp[me ][6] <z) recp[me ][6]=z;if(recp[me ][7] >z) recp[me ][7]=z;if(recp[me ][8] <x) recp[me ][8]=x;if(recp[me ][9] >x) recp[me ][9]=x;if(recp[me ][10] <q){
265 recp[me ][10]= q;recp[me ][11]= bins[i];
}}
270 if( digits ){Int_t kplab2 [10];for(Int_t ilab =0; ilab <10;++ ilab)
kplab2 [ilab ]= kplab[me][ ilab ];AliITSdigitSDD * d=( AliITSdigitSDD *) digits -> UncheckedAt (
bins[i+3]);275 for (Int_t itrack =0; itrack <10; itrack ++){
Int_t track = (d-> GetTracks ())[ itrack ];if (track >=0) {
AddLabel (kplab2 , track);}
280 }
A.2. AliITSClusterFinderSDDfast.cxx 75
for(Int_t ilab =0; ilab <10;++ ilab)kplab [me][ ilab ]= kplab2 [ilab ];
}++ recp[me ][5]; // nPiInClu
285 }
for(Int_t i=0;i<cid ;++i){if(recp[i ][5]==0) continue ;if(recp[i ][5]==1) continue ;
290
Float_t q=recp[i][0];
Int_t clSizAnode =recp[i][6] - recp[i ][7]+1;Int_t clSizTb =recp[i][8] - recp[i ][9]+1;
295 if(repa -> GetUseSDDClusterSizeSelection ()){if( clSizTb ==1) continue ; // cut common mode noise
spikesif(clSizAnode >5) continue ; // cut common mode noise
spikesif(clSizTb >10) continue ; // cut clusters on noisy
anodesif(cal -> IsAMAt20MHz () && clSizTb >8) continue ; // cut
clusters on noisy anodes300 }
Float_t zz=( Float_t )recp[i ][1]/ q;Float_t xx=( Float_t )recp[i ][2]/ q;
305 AliITSresponseSDD * rsdd = fDetTypeRec -> GetResponseSDD ();
Float_t zAnode =zz -0.5; // to have anode in range 0. -255.and centered on the mid of the pitch
Float_t timebin =xx -0.5; // to have time bin in range0. -255. amd centered on the mid of the bin
310 if(s==1) zAnode += fNAnodes ; // right side has anodes from256. to 511.
Float_t zdet= GetSeg () -> GetLocalZFromAnode ( zAnode );Float_t driftTimeUncorr = GetSeg () -> GetDriftTimeFromTb (
timebin )+ jitter *rsdd -> GetCarlosRXClockPeriod ();Float_t driftTime = driftTimeUncorr -rsdd -> GetTimeZero (
fModule );315
76 A. Developed code
if(driftTime < fMaxDrTimeForTightCut && recp[i][10] <fCutOnPeakTight ) continue ;
Float_t driftSpeed =cal -> GetDriftSpeedAtAnode ( zAnode ) +rsdd -> GetDeltaVDrift (fModule ,zAnode >255);
Float_t driftPathMicron = driftTime * driftSpeed ;320 const Double_t kMicronTocm =1.0e -4;
Float_t xdet =( driftPathMicron - GetSeg () ->Dx ())* kMicronTocm; // xdet is negative
if(s==0) xdet=-xdet; // left side has positive local x
if(repa -> GetUseSDDCorrectionMaps ()){325 Float_t corrx =0, corrz =0;
cal -> GetCorrections (zdet ,xdet ,corrz ,corrx , GetSeg ());zdet += corrz ;xdet += corrx ;
}330
Double_t loc [3]={ xdet ,0., zdet},trk [3]={0. ,0. ,0.};mT2L -> MasterToLocal (loc ,trk);xx=trk [1];zz=trk [2];
335
q+=( driftTime *rsdd -> GetADCvsDriftTime ( fModule )); //correction for zero supp.
q/=rsdd -> GetADCtokeV ( fModule );if(cal -> IsAMAt20MHz ()) q*=2.; // account for 1/2
sampling freq.if(q<repa -> GetMinClusterChargeSDD ()) continue ; // remove
noise clusters340
#ifdef CSBASEDERRORFloat_t hit [6]={xx ,zz ,recp[i][3] , recp[i][4] ,q ,0.};
#else
Float_t hit [6]={xx , zz , 0.0030*0.0030 , 0.0020*0.0020 , q,0.};
345 #endif
Int_t info [3]={ clSizTb , clSizAnode , fNlayer [ fModule ]};
Int_t kplab2 [10];350 if( digits ){
for(Int_t ilab =0; ilab <10;++ ilab)if(kplab[i][ ilab ]!= -2)
A.2. AliITSClusterFinderSDDfast.cxx 77
kplab2 [ilab ]= kplab[i][ ilab ];else
355 kplab2 [ilab ]= -2;}else{
if( fRawID2ClusID ) kplab2 [0]= fNClusters +1; // RS: storeclID +1 as a reference to the cluster
for(Int_t ilab =1; ilab <10;++ ilab)360 kplab2 [ilab ]= -2;
}if( digits ) CheckLabels2 ( kplab2 );kplab2 [3]= fNdet[ fModule ];AliITSRecPoint cc(kplab2 ,hit ,info);
365 cc. SetType (101) ;cc. SetDriftTime ( driftTimeUncorr );cc. SetDriftSide (s);cc. SetChargeRatio (recp[i ][10]) ;if( clusters ) new (cl[nrp ]) AliITSRecPoint (cc);
370 else {fDetTypeRec -> AddRecPoint (cc);
}++ nrp;++ fNClusters ;
375 }}AliDebug (2, Form(" Clusters �found�on�SDD� module �%d�( unfolding �%
d)�=�%d\n",fModule ,repa -> GetUseUnfoldingInClusterFinderSDD() ,nrp));
}
380 //______________________________________________________________________
void AliITSClusterFinderSDDfast :: RawdataToClusters ( AliRawReader* rawReader ){
//------------------------------------------------------------
// This function creates ITS clusters from raw data//
------------------------------------------------------------
385 fNClusters = 0; // RSAliITSRawStream * inputSDD = AliITSRawStreamSDD ::
78 A. Developed code
CreateRawStreamSDD ( rawReader );AliDebug (1, Form("%s�is�used",inputSDD -> ClassName ()));
AliITSDDLModuleMapSDD * ddlmap =( AliITSDDLModuleMapSDD *)fDetTypeRec -> GetDDLModuleMapSDD ();
390 inputSDD -> SetDDLModuleMap ( ddlmap );for(Int_t iddl =0; iddl < AliITSDDLModuleMapSDD :: GetNDDLs ();
iddl ++){for(Int_t icar =0; icar < AliITSDDLModuleMapSDD :: GetNModPerDDL
();icar ++){Int_t iMod=ddlmap -> GetModuleNumber (iddl ,icar);if(iMod == -1) continue ;
395 AliITSCalibrationSDD * cal = ( AliITSCalibrationSDD *)GetResp (iMod);
if(cal ==0){AliError (Form(" Calibration � object �not� present �for�SDD�
module �%d\n",iMod));continue ;
}400 Bool_t isZeroSupp =cal -> GetZeroSupp ();
if( isZeroSupp ){for(Int_t iSid =0; iSid <2; iSid ++) inputSDD ->
SetZeroSuppLowThreshold (iMod -240 , iSid ,cal ->GetZSLowThreshold (iSid));
}else{for(Int_t iSid =0; iSid <2; iSid ++) inputSDD ->
SetZeroSuppLowThreshold (iMod -240 , iSid ,0);405 }
}}FindClustersSDD ( inputSDD );delete inputSDD ;
410 }
void AliITSClusterFinderSDDfast :: FindClustersSDD (AliITSRawStream * input){
AliITSRecPointContainer * rpc = AliITSRecPointContainer ::Instance ();
415 Int_t nClustersSDD =0;
const Int_t kMapDim = fNZbins * fNXbins /32;Int_t mapsDDL [ kHybridsPerDDL ][ kMapDim ];for(Int_t i=0;i< kHybridsPerDDL ;++i)
A.2. AliITSClusterFinderSDDfast.cxx 79
420 for(Int_t j=0;j< kMapDim ;++j)mapsDDL [i][j]=0;
Int_t vectModId [ kModulesPerDDL ];for(Int_t iMod =0; iMod < kModulesPerDDL ; iMod ++) vectModId [iMod
]= -1;425 // read raw data input stream
int countRW = 0; // RSif ( fRawID2ClusID ) fRawID2ClusID ->Reset (); //RS if array was
provided , we shall store the rawID -> ClusterID
while (input ->Next ()) {430 Int_t iModule = input -> GetModuleID ();
if(iModule <0){AliWarning (Form(" Invalid �SDD� module � number �%d\n", iModule
));continue ;
}435 Int_t iCarlos =input -> GetCarlosId ();
Int_t iSide=input -> GetChannel ();Int_t iHybrid = iCarlos *2+ iSide;
if(input -> IsCompletedModule ()){440 vectModId [ iCarlos ]= iModule ; // store the module number
}else if(input -> IsCompletedDDL ()){
// when all data from a DDL was read , search for clustersInt_t jitter =input -> GetJitter ();
445 for(Int_t iMod =0; iMod < kModulesPerDDL ;iMod ++){if( vectModId [iMod ] >=0){
fModule = vectModId [iMod ];TClonesArray * clusters =rpc -> UncheckedGetClusters (
fModule );std :: vector <int > bins0;
450 std :: vector <int > bins1;bins0 = fDDLBins [iMod *2];bins1 = fDDLBins [iMod *2+1];Int_t map0[ kMapDim ];Int_t map1[ kMapDim ];
455 for(Int_t j=0;j< kMapDim ;++j){map0[j]= map1[j]=0;
}for(Int_t i=0;i< kMapDim ;++i){
map0[i]= mapsDDL [iMod *2][i];
80 A. Developed code
460 map1[i]= mapsDDL [iMod *2+1][ i];}
FindClustersSDD (bins0 , bins1 , map0 , map1 , NULL ,clusters , jitter );
465 Int_t nClusters = clusters -> GetEntriesFast ();nClustersSDD += nClusters ;vectModId [iMod ]= -1;
}for (Int_t s=0; s <2; s++){
470 Int_t indexHyb =iMod *2+s;for(std :: vector <int >:: size_type i=0;i< fDDLBins [
indexHyb ]. size () ;++i)fDDLBins [ indexHyb ]. erase( fDDLBins [ indexHyb ]. begin ()
,fDDLBins [ indexHyb ]. end ());for(Int_t j=0;j< kMapDim ;++j)
mapsDDL [ indexHyb ][j]=0;475 }
}}else{ // fill the current digit into the bins array
if(iHybrid <0 || iHybrid >= kHybridsPerDDL ){480 AliWarning (Form(" Invalid �SDD� hybrid � number �%d�on� module
�%d\n", iHybrid , iModule ));continue ;
}AliITSCalibrationSDD * cal =( AliITSCalibrationSDD *) GetResp (
iModule );if(cal ==0){
485 AliError (Form(" Calibration � object �not� present �for�SDD�module �%d\n",iModule ));
continue ;}Float_t charge =input -> GetSignal ();Int_t chan=input -> GetCoord1 ()+ fNAnodes *iSide;
490 Float_t gain=cal -> GetChannelGain (chan)/ fDetTypeRec ->GetAverageGainSDD ();;
Float_t baseline =cal -> GetBaseline (chan);if(charge > baseline ) charge -= baseline ;else charge =0;if(gain >0.){ // Bad channels have gain =0
495 charge /= gain;if(charge >=cal -> GetThresholdAnode (chan)){
A.2. AliITSClusterFinderSDDfast.cxx 81
Int_t q=( Int_t)( charge +0.5);Int_t iz = input -> GetCoord1 ();Int_t itb = input -> GetCoord2 ();
500 Float_t noise=cal -> GetNoiseAfterElectronics (iz) *2.2;// applies zero suppression using the measured
noise of each anode. Threshold values from ALICE -INT -1999 -28 V10
Int_t index =( itb +1)* fNZbins +(iz +1);if((itb < fNTimeBins ) && (iz < fNAnodes )){
if(q<noise) continue ;fDDLBins [ iHybrid ]. push_back (index);
505 fDDLBins [ iHybrid ]. push_back (q);fDDLBins [ iHybrid ]. push_back (0);fDDLBins [ iHybrid ]. push_back ( countRW );mapsDDL [ iHybrid ][ index /32]|=(1 < <( index %32));
}510 else{
AliWarning (Form(" Invalid �SDD�cell:� Anode =%d���TimeBin =%d",iz ,itb));
}}
}515 }
countRW ++; // RS}AliDebug (1, Form("found � clusters �in�ITS�SDD:�%d", nClustersSDD
));}
Bibliography[1] E.V. Shuryak. Phys. Rev., 61:71, 1980.
[2] V. Abazov et al. Phyd. Rev. D, 87, 2013.
[3] J. Beringer et al. Review of particle physics. Phys. Rev. D, 86:010001, 2012.
[4] Elena Bruna and Massimo Masera. Open Charm Measurements via Hadronic DecayChannels in the ALICE Experiment. PhD thesis, Turin U., 2007. presented 15 Feb2007.
[5] A. Chodos et al. Phyd. Rev. D, 9:3471, 1974.
[6] Prino F. Scomparin E. Masera M. Lectures on Nuclear Physics (italian). 2013.
[7] Betty Bezverkhny Abelev et al. Neutral pion production at midrapidity in pp andPb-Pb collisions at Ô
sNN = 2.76 TeV. 2014.
[8] K. Aamodt et al. The ALICE experiment at the CERN LHC. JINST, 3:S08002,2008.
[9] Aldinucci M. Lectures on Parallel and Distribuited Computing (italian). 2013.
List of Figures1.1 Universe timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 QCD running coupling2 . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Phase diagram of nuclear matter . . . . . . . . . . . . . . . . . . . . . 51.4 Participants and spectators in an ion collision . . . . . . . . . . . . . . 91.5 Spatial evolution of a high energy ion collision . . . . . . . . . . . . . . 111.6 Space-time scheme of a system created by a high energy ion collision . 111.7 Spectra of identified particles measure in ALICE.7 In very class of
centrality the major number of particles producted are particles withlow pT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.1 CERN accelerator complex . . . . . . . . . . . . . . . . . . . . . . . . . 162.2 ALICE setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.3 ALICE coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . 182.4 The ALICE TPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.5 Sketch of the muon spectrometer . . . . . . . . . . . . . . . . . . . . . 212.6 Scheme of the ALICE ITS detector . . . . . . . . . . . . . . . . . . . . 242.7 SDD principle of operation . . . . . . . . . . . . . . . . . . . . . . . . . 252.8 (Left) Layout of an ALICE SDD module. (Right) Zoom of the anode
region. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262.9 Data processing workflow . . . . . . . . . . . . . . . . . . . . . . . . . . 282.10 Simulation and reconstruction in AliROOT . . . . . . . . . . . . . . . . 29
3.1 Workflow of the V2 cluster finder algorithm . . . . . . . . . . . . . . . 333.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343.3 Percentage of orphans hits and cloned recpoints using di�erent algorithms 353.4 Workflow of the fast cluster finder algorithm, phase 1 . . . . . . . . . . 363.5 Workflow of the fast cluster to correct the errors introduced by the first
cluster research. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373.6 Workflow of the fast cluster finder algorithm, phase 2 . . . . . . . . . . 383.7 Memory occupied by the data used for the reconstruction by di�erent
algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393.8 Cluster recognition, cluster correctly identified . . . . . . . . . . . . . . 413.9 Cluster recognition, cluster not correctly identified . . . . . . . . . . . . 42
4.1 Residual on the local x coordinate. . . . . . . . . . . . . . . . . . . . . 454.2 Residual on the local z coordinate. . . . . . . . . . . . . . . . . . . . . 454.3 Residual on the global x coordinate. . . . . . . . . . . . . . . . . . . . . 454.4 Residual on the global y coordinate. . . . . . . . . . . . . . . . . . . . . 464.5 Residual on the global z coordinate. . . . . . . . . . . . . . . . . . . . . 464.6 Residual on the local x and z coordinates after the digitalization fix. . . 47
86 List of Figures
4.7 Residual on the global x, y and z coordinate after the digitalization fix. 474.8 Residual on the local x coordinate. . . . . . . . . . . . . . . . . . . . . 484.9 Residual on the local z coordinate. . . . . . . . . . . . . . . . . . . . . 484.10 Residual on the global x coordinate. . . . . . . . . . . . . . . . . . . . . 484.11 Residual on the global y coordinate. . . . . . . . . . . . . . . . . . . . . 494.12 Residual on the global z coordinate. . . . . . . . . . . . . . . . . . . . . 494.13 Residual on the local x and z coordinates after the digitalization fix. . . 494.14 Residual on the global x, y and z coordinate after the digitalization fix. 504.15 Number of clusters reconstructed as a function of the energy released
by the particle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514.16 Number of clusters per track with the two di�erent algorithms. . . . . . 514.17 Fraction of TPC tracks prolonged in the ITS as a function of pT . The
graphs are divided per number of clusters on the ITS and on the ordinateaxis there is the number of tracks found in the TPC prolonged into theITS divided by the total number of tracks reconstructed in the TPC only. 52
4.18 Fraction of secondaries tracks reconstructed with the two algorithms asa function of pT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.19 Fraction of fake tracks reconstructed with the two algorithms as afunction of pT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.20 Tracking e�ciency as a function of pT . . . . . . . . . . . . . . . . . . . 544.21 Impact parameter distribution of the reconstructed tracks on the z
coordinate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544.22 Number of good tracks traconstructed by the two algorithms. . . . . . 554.23 Number of fake tracks traconstructed by the two algorithms. . . . . . . 564.24 Ratio of the number of good tracks reconstructed by the two algorithms. 574.25 Ratio of the number of fake tracks reconstructed by the two algorithms. 574.26 In yellow the cells used by the two algorithms to assign the correct
label to the reconstructed cluster. In this case both algorithms takeinto account all the labels of the cells composing the cluster. . . . . . . 58
4.27 In yellow the cells used by the two algorithms to assign the correct labelto the reconstructed cluster. In this case the V2 algorithm can losesome labels taking into account less cells which are part of the cluster. . 58
5.1 Execution time of the V2 cluster finder compared with the other ITSdetectors. Note the long tail for the SDD histogram. . . . . . . . . . . 60
5.2 Execution time of the fast cluster finder compared with the other ITSdetectors. Note that the long tail for the SDD histogram (fig. 5.1) isno longer present. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.3 Comparison between V2 and fast cluster finder execution time. Theaverage speedup is 3.89. . . . . . . . . . . . . . . . . . . . . . . . . . . 62
List of Figures 87
5.4 Speedup as a function of the number of reconstructed clusters in theinner payer of SPD. Non of the two algorithms is occupancy dependentbecause the speedup does not change so much along the multiplicityclasses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
List of Tables1.1 Basic properties of quarks, including the mass3 . . . . . . . . . . . . . . 4
2.1 List of the ITS geometrical and composition details.8 . . . . . . . . . . 232.2 ITS characteristics.8 The maximum occupancy is referred to the most
central Pb-Pb collisions. . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.1 Dimensions of memories of the machine where the tests presented inthis thesis were performed (CPU model: Intel XEON E5). . . . . . . . 38