

\section{Reconstruction code}


The energy deposited by the particles in the towers produces scintillating light that is propagated with optic fibers through the different layers to APD placed at the base of the cells. The APDs amplify the signal and generate an electronic pulse shape that is stored in the raw data format. From this pulse shape, we extract the signal amplitude and the arrival time. The pulse shape is fitted during the reconstruction via a parametrized function and TMinuit, and those 2 values are extracted.

A particle produces signals in different towers (electromagnetic shower expands more than its Moli\`ere radius which is a cell size). The next step is the formation of clusters of cells that belong to the same particle, although depending on the energy, granularity, clusterization algorithm or event type, those clusters might have contributions from different particles. The default algorithm in pp collisions is a simple aggregation of neighboring cells until there is no more cells above a certain energy threshold (named {\it clusterizer V1}). In case of Pb-Pb collisions environment, where particle showers merge quite often, we apply another algorithm that aggregates cells to the clusters until reaching a cell with more energy than the precedent (named {\it clusterizer V2}). Depending on the analysis type, one might want to use one or the other clusterization type. For this reason, a re-clusterization is also possible at the analysis level. A last clusterizer is implemented, which makes 3x3 clusters. It has been used in jet analysis for instance in order to avoid biasing jet reconstruction where one is interested in the energy flow over a large area without explicit reconstruction of photon showers and where the driving consideration is that the wide clusterizer does not interfere with the jet finder. For $\pi^{0}$, $\eta$, and direct $\gamma$ analyses, {\it V2} is most likely preferable).

Once the cluster is defined, we calculate cluster parameters, shower shape parameters, that will help at the analysis level to identify each cluster as one particle type. Also, we compare the cluster position information with the propagation of tracks measured in the central barrel to the EMCAL surface, to identify the clusters generated by charged particles.

The final analysis objects, ESDs and AODs, contain all the cluster and cell basic informations allowing to redo the clusterization if needed at the analysis level.

%The class AliReconstruction manages this part. This step can
%begin either from the Digits or from the Raw data. We can distinguish
%different steps described in the following sections. 


\subsection{Offline data base access}

How to create explained OCDB/OADB section.

\subsubsection{Energy calibration}

\subsubsection{Bad channels - Marie, Alexis}

\subsubsection{Alignment - Marco}

\subsection{Raw data fitting: from ADC sample to digits - David}

\begin{lstlisting}
AliEMCALRawUtils, AliCaloRawAnalyzer*, AliCalo*, AliEMCALDigit.
\end{lstlisting}

\subsection{Clusterization: From digits to clusters - Constantin, Adam}

\begin{lstlisting}
AliEMCALClusterizer*, AliEMCALRecPoint
\end{lstlisting}

\subsection{Cluster-Track matching - Rongrong, Shingo, Michael}

Propagation of TPC tracks to EMCAL and selection of clusters as belonging to a track or not.

\subsection{How to execute the reconstruction}

Executing the reconstruction is very similar to the simulation case, see the macro TestEMCALReconstruction.C (a bit more detailed than the one in \$ALICE\_ROOT/EMCAL/macros) :

\begin{DDbox}{\linewidth}
\begin{lstlisting}
void TestEMCALReconstruction() {

TString detector=``EMCAL TPC'';//Same function as in Simulation.C 

AliReconstruction rec; //Create reconstruction object 

//Making Tracking 
rec.SetRunTracking(detector) ;

//Particle Reconstruction. Make Rec Points 
rec.SetRunReconstruction(detector); 

//read RAW data. Give directory where raw data is stored
//rec.SetInput(``RawDataDirectory/raw.root");

//Make vertex finder 
rec.SetRunVertexFinder(kFALSE) ; // false only if the tracking detectors are not included.

//Fill ESD file with RecPoints information. 
rec.SetFillESD(detector) ; 

//Run Reconstruction 
rec.Run() ;
}
\end{lstlisting}
\end{DDbox}


