First of all, we checked the prototype mapping and the track reconstruction algorithm used for data analisys. To achieve this, we reconstructed the beam profile, which was known, using the data acquired by tracker and LG. \figurename~\vref{beamrec1} shows our first attempt, which proceeded as follows:
\begin{enumerate}
	\item we defined a subset of the data, selecting the entries with $\chi^2<10$ for every track, in both $x$ and $y$ directions, and low residuals for the hits positions on the traker chambers ($\Delta x < 10 channels$ and $\Delta y < 10 channels$);
	\item we plotted the position of the $x$ clusters detected by the first tracker chamber (with respect to a system where axes originate at the lower left corner of the tracker GEM detectors). Since the strip pitch is $\sim 0.4mm$, we compute the position as $0.4 \cdot pos_{CL}$, where $pos_{CL}$ is the position of the cluster expressed as channel number;
	\item we plotted the hits on the LG channels, to find the most irradiated ones;
	\item we plotted again the distribution of the $x$ clusters detected by the first tracker chamber;
	\item finally, we selected only the entries containing a hit on one of the most irradiated LG channels, and we plotted them over the graph produced at the previous step.\\
\end{enumerate}
%\begin{figure}%[!htbp]
%	\centering
%	\includegraphics[width=12cm]{Images/beamreco1}
%	\caption{Reconstruction of the beam $x$ profile, as detected by LG channels $699$, $700$ and $701$. The green backround area is the beam $x$ profile as seen by the first tracker chamber.}
%	\label{beamrec1}
%\end{figure}

This way we made a sort of puzzle whose pieces represent the beam portion seen by each LG channel. It is like projecting the shadow of the LG pad corresponding to that channel on the reconstruction of the beam profile by the tracker.\\

\figurename~\vref{beamrec1} shows that the adopted LG mapping is correct. Indeed the superposition of signals seen by its pads traces fairly well out the beam profile drawn by the tracker. The different height of the two profiles (the one from the tracker and the one from the LG) is due to the fact that we did not include some of the adjacent LG channels in the plot, which indeed caught a little part of the beam.\\

\begin{figure}%[b]
	\centering
	\vfill
		\subfigure[$x$ beam profile by LG channels $699$, $700$ and $701$. The green backround represents the same profile as seen by the tracker.]
		{\includegraphics[width=12cm]{Images/beamreco1}\label{beamrec1}}%
		\vspace{6mm}
		\subfigure[LG beam profile (linear)]
		{\includegraphics[width=6.5cm]{Images/lgbeamrec}\label{beamrec2-lglin}}%
		\hspace{2mm}%
		\subfigure[LG beam profile (logarithmic)]
		{\includegraphics[width=6.5cm]{Images/lgbeamrec_log}\label{beamrec2-lglog}}%
		\vspace{1mm}
		\subfigure[Tracker beam profile ($x$)]
		{\includegraphics[width=6.5cm]{Images/trkbeamrecx}\label{beamrec2-trkx}}%
		\hspace{2mm}%
		\subfigure[Tracker beam profile ($y$)]
		{\includegraphics[width=6.5cm]{Images/trkbeamrecy}\label{beamrec2-trky}}%
	\caption{One- and two-dimensional beam profile reconstruction}
	\label{beamrec2}
\end{figure}
A two-dimensional plot can be done as well. A \texttt{GetX()} and a \texttt{GetY()} functions were defined to extract $x$ and $y$ pad position information given the number of the corresponding channel. \figurename~\vref{beamrec2} shows the two-dimensional distribution of the hits detected by the prototype, in linear (\ref{beamrec2-lglin}) and logarithmic (\ref{beamrec2-lglog}) scales, as well as the tracker profiles for comparison (\ref{beamrec2-trkx} and \ref{beamrec2-trky}).\\

The beam shown in \figurename~\vref{beamrec2} is a muon beam, and thus it is quite large in both directions. Pion beams were more tightly focused, and almost all the charge was concentrated on no more than four adjacent pads.\\

The beam profile reconstruction algorithm proved to work well, and so did the track reconstruction one.\\

\figurename~\vref{beamrec2-lglog} gives an idea of the noise affecting the prototype: some channels are hit even though the beam is focused on another area. However, the scale of the plot is logarithmic, and in this case the noise intensity is really negligible with respect of the intensity of the beam.
%\begin{figure}[t]
%	\centering
%	\includegraphics[width=12cm]{Images/beamreco1}
%	\caption{Reconstruction of the beam $x$ profile, as detected by LG channels $699$, $700$ and $701$. The green backround area is the beam $x$ profile as seen by the first tracker chamber.}
%	\label{beamrec1}
%\end{figure}
