The readout VFAT2 chips we used in our tests are digital: therefore they can only store boolean information about whether a channel is hit or not. The possibility to reconstruct the analog input signal from the digital output data would be extremely useful, because it could allow us to retrieve an estimation of the detector gain. For example, any previous gain curve may be inadequate and charging up effects may occur when a detector is put in front of the LHC beam line, where its working rate can be much higher than that experienced with X-Rays or during a test-beam. It would be needed a way to repeat the gain measurement once the detector is in its final configuration.\\

We can try to check the actual gain of the chamber using efficiency measurements as a function of threshold. If we had an analog readout electronics, the hit count distribution as a function of charge released in the drift volume would resemble the Landau energy loss distribution (multiplied by the gain of detector), superposed to a Gaussian noise distribution centered in zero.\\

We assume that:
\begin{enumerate}
	\item incoming particles are \textit{MIP}s, so that they lose energy almost only by ionization ($\Delta E \propto Q_{IN}$, where $Q_{IN}$ is the charge released in the drift region);
	\item the whole charge released by a MIP is collected by a single electrode\footnote{Electron avalanches diffuse according to a Gaussian law; for $9mm$ of Ar/CO\subscript{2} 70/30, $\sigma \simeq 300 \div 400 \mu m$.}.
\end{enumerate}

Therefore, $\Delta E_{MIP} \propto Q_{IN} \propto Q_{DETECTED} $, where $Q_{IN}$ is the charge released in the drift region. then, the loss of energy of a MIP can be simulated (e.g. with \texttt{Garfield}), together with the average ionization potential for the gas mixture in use. This way, we can trace back the initial charge $Q_{IN}$. In $3mm$ of Ar/CO\subscript{2} 70/30 we have $\overline{Q_{IN}} \simeq 28 \mbox{ e}^-$.\\

The energy loss distribution, when few interactions cause the whole $\Delta E$, is given by:
$$
f \left( \lambda \right) = \dfrac{1}{\sqrt{2\pi}} \: e^{-\frac{1}{2} \left( \lambda + e^{- \lambda} \right) } \quad , \qquad \lambda = \dfrac{\Delta E - {\Delta E}_{MP}}{K \frac{Z}{A} \frac{\rho}{\beta^2} X}
$$
where $ {\Delta E}_{MP} $ is the most probable energy loss (the peak of the Landau distribution, see for example \figurename~\vref{landau-garf}) and $\lambda$ represents the normalized deviation from $ {\Delta E}_{MP} $ \cite{sauli-pr}.\\

We can now fit the efficiency versus threshold histogram we obtained, using the reverse integral of the simulated Landau distribution:
$$
F \left( V_{TH} \right) = G \cdot \int_{V_{TH}}^{\infty} f \left( \lambda \right) d \lambda
$$
We use $G$, the gain of the chamber, as a parameter to be found minimizing the $\chi^2$.\\

By minimizing the $\chi^2$, we can also fix another interesting parameter: the number $n_{\mbox{e}^-}$ of electrons whose total charge equals the amplitude of a threshold bin. Given this value, the conversion from \textit{VFAT2 DAC step bins} to charge, expressed as number of electrons, is allowed. We found that $550 \leq n_{\mbox{e}^-} \leq 1050$ produces a coherent fit, which is indeed reasonable: in principle, for fast signals such as those of GEM detectors, it should be ${\Delta Q}_{BIN} \simeq 0,045fC \simeq 280 \mbox{ e}^-$, which is of the same order of magnitude.\\

\begin{figure}
	\centering
	\includegraphics[width=12cm]{Images/muons150GeV-10k-rootNormAndFit-color}
\caption{Simulation of MIPs energy loss distribution in the detector (\textit{Garfield})}	
	\label{landau-garf}
\end{figure}
\begin{figure}
	\centering
	\includegraphics[width=12cm]{Images/EfficiencyVsThresholdFitPointA}
	\caption{Efficiency versus threshold scan fitted by the integral of a Landau energy loss distribution}
	\label{thlandau}
\end{figure}
%\begin{figure}
%	\centering
%%	\vfill
%	\subfigure[Simulation of MIPs energy loss distribution in the detector (\textit{Garfield})]
%	{\includegraphics[width=12cm]{Images/muons150GeV-10k-rootNormAndFit}\label{landau-garf}}
%	\subfigure[Efficiency versus threshold scan fitted by the integral of a Landau energy loss distribution]
%	{\includegraphics[width=12cm]{Images/EfficiencyVsThresholdFitPointA}\label{thlandau}}
%	\caption{A possible way to retrieve analog informations from digital data}
%	\label{landaufit-all}
%\end{figure}
\figurename~\vref{thlandau} shows the results of this study. The Landau integral fit covers only a subset of threshold values: an upper bound is needed since the ADC may lose linearity above $n_{steps}^{MAX} - 10 \% \simeq 230ds$\footnote{$n_{steps}^{MAX} = 256$}, while a lower bound allows us to cut the noise Gaussian out of the set of data to be fitted. The lower threshold bound was set at $-50ds$, which was found to be enough to exclude the noise.\\

This was a very preliminary analysis, which should be refined in order to prove the validity of this method, aimed at checking the gain of proportional chambers in their final setup and at reconstructing analog inputs from digital data.