Index: trunk/MagicSoft/TDAS-Extractor/Algorithms.tex
===================================================================
--- trunk/MagicSoft/TDAS-Extractor/Algorithms.tex	(revision 5759)
+++ trunk/MagicSoft/TDAS-Extractor/Algorithms.tex	(revision 5763)
@@ -280,15 +280,17 @@
 
 \begin{description}
-\item[Time Extraction Type:\xspace] The position of the maximum can be chosen or the 
-position of the half maximum at the rising edge of the pulse (default).
-\item[Charge Extraction Type:\xspace] The amplitude of the maximum can be chosen (default) or the 
-integrated spline between maximum position minus rise time (default: 1.5 slices) and maximum position plus
-fall time (default: 4.5 slices). The low-gain signal integrates half a slice more at the rising
-falling part of the 
-signal.
+\item[Charge Extraction Type:\xspace] The amplitude of the spline maximum can be chosen while the position 
+of the maximum is returned as arrival time. This type is fast. \\
+Otherwise, the integrated spline between maximum position minus rise time (default: 1.5 slices) 
+and maximum position plus fall time (default: 4.5 slices) is taken as signal and the position of the 
+half maximum is returned as arrival time (default). 
+The low-gain signal stretches the rise and fall time by a stretch factor (default: 1.5). This type 
+is slower, but more precise. The charge integration resolution is 0.1 FADC slices.
 \item[Rise Time and Fall Time:\xspace] Can be adjusted for the integration charge extraction type.
 \item[Resolution:\xspace] Defined as the maximum allowed difference between the calculated half maximum value and 
 the computed spline value at the arrival time position. Can be adjusted for the half-maximum time extraction 
 type.
+\item[LoGainSignalStretch:\xspace] Can be adjusted to account for the bigger rise and fall time in the 
+low-gain as compared to the high gain pulses (default: 1.5)
 \end{description}
 
@@ -305,4 +307,5 @@
 \item{The normalized signal shape has to be independent of the signal amplitude.}
 \item{The noise properties have to be independent of the signal amplitude.}
+\item{The noise auto-correlation matrix does not change its form significantly with time.}
 \end{itemize}
 
@@ -313,5 +316,7 @@
 \end{equation}
 
-where $b(t)$ is the time dependent noise distribution. For small time shifts $\tau$ the time dependence can be linearized by the use of a Taylor expansion:
+where $b(t)$ is the time dependent noise distribution. For small time shifts $\tau$ (usually smaller than 
+one FADC slice width), 
+the time dependence can be linearized by the use of a Taylor expansion:
 
 \begin{equation} \label{shape_taylor_approx}
@@ -350,5 +355,7 @@
 \end{equation}
 
-Taking into account that $\boldsymbol{B}$ is a symmetric matrix, this leads to the following two equations for the estimated amplitude $\overline{E}$ and the estimation for the product of amplitude and time offset $\overline{E\tau}$:
+Taking into account that $\boldsymbol{B}$ is a symmetric matrix, this leads to the following 
+two equations for the estimated amplitude $\overline{E}$ and the estimation for the product of amplitude 
+and time offset $\overline{E\tau}$:
 
 \begin{eqnarray}
@@ -369,12 +376,15 @@
 
 
-Thus $\overline{E}$ and $\overline{E\tau}$ are given by a weighted sum of the discrete measurements $y_i$ with the digital filtering weights for the amplitude, $w_{\text{amp},i}$, and time shift, $w_{\text{time},i}$.
-
-Because of the truncation of the Taylor series in equation (\ref{shape_taylor_approx}) the above results are only valid for vanishing time offsets $\tau$. For non-zero time offsets one has to iterate the problem using the time shifted signal shape $g(t-\tau)$.
+Thus $\overline{E}$ and $\overline{E\tau}$ are given by a weighted sum of the discrete measurements $y_i$ 
+with the digital filtering weights for the amplitude, $w_{\text{amp},i}$, and time shift, $w_{\text{time},i}$.
+
+Because of the truncation of the Taylor series in equation (\ref{shape_taylor_approx}) the above results are 
+only valid for vanishing time offsets $\tau$. For non-zero time offsets one has to iterate the problem using 
+the time shifted signal shape $g(t-\tau)$.
 
 The covariance matrix $\boldsymbol{V}$ of $\overline{E}$ and $\overline{E\tau}$ is given by:
 
 \begin{equation}
-\left(\boldsymbol{V}^{-1}\right)_{i,j}=\frac{1}{2}\left(\frac{\partial^2 \chi^2(E, E\tau)}{\partial \alpha_i \partial \alpha_j} \right) \quad \text{with} \quad \alpha_i,\alpha_j \in {E, E\tau} \ .
+\left(\boldsymbol{V}^{-1}\right)_{i,j}=\frac{1}{2}\left(\frac{\partial^2 \chi^2(E, E\tau)}{\partial \alpha_i \partial \alpha_j} \right) \quad \text{with} \quad \alpha_i,\alpha_j \in \{E, E\tau\} \ .
 \end{equation}
 
@@ -388,5 +398,5 @@
 
 \begin{equation}\label{of_noise_time}
-E^2 \cdot \sigma_{\tau}^2=\boldsymbol{V}_{E,E\tau}=\frac{{\boldsymbol{g}}^T\boldsymbol{B}^{-1}{\boldsymbol{g}}}{(\boldsymbol{g}^T \boldsymbol{B}^{-1} \boldsymbol{g})(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) -(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g})^2} \ .
+E^2 \cdot \sigma_{\tau}^2=\boldsymbol{V}_{E\tau,E\tau}=\frac{{\boldsymbol{g}}^T\boldsymbol{B}^{-1}{\boldsymbol{g}}}{(\boldsymbol{g}^T \boldsymbol{B}^{-1} \boldsymbol{g})(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) -(\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g})^2} \ .
 \end{equation}
 
@@ -419,6 +429,12 @@
 
 
-Using the average reconstructed pulpo pulse shape, see figure \ref{fig:pulpo_shape_low}, and the reconstructed noise autocorrelation matrix from a pedestal run with random triggers, the digital filter weights are computed. Figures \ref{fig:w_time_MC_input_TDAS} and \ref{fig:w_amp_MC_input_TDAS} show the parameterization of the amplitude and timing weights for the MC pulse shape as a function of the ...
-
+Using the average reconstructed pulpo pulse shape, as shown in figure \ref{fig:pulpo_shape_low}, and the 
+reconstructed noise autocorrelation matrix from a pedestal run with random triggers, the digital filter 
+weights are computed. Figures \ref{fig:w_time_MC_input_TDAS} and \ref{fig:w_amp_MC_input_TDAS} show the 
+parameterization of the amplitude and timing weights for the MC pulse shape as a function of the ...
+
+\par
+\ldots {\textit{\bf MISSING END OF SENTENCE }} \ldots
+\par
 
 \begin{figure}[h!]
@@ -441,5 +457,5 @@
 
 \begin{equation}
-e_{i_0}=\sum_{i=i_0}^{i=i_0+n-1} w_{\mathrm{amp}}(t_i)y(t_{i+i_0}) \qquad (e\tau)_{i_0}=\sum_{i=i_0}^{i=i_0+n-1} w_{\mathrm{time}}(t_i)y(t_{i+i_0}) 
+e_{i_0}=\sum_{i=i_0}^{i_0+n-1} w_{\mathrm{amp}}(t_i)y(t_{i+i_0}) \qquad (e\tau)_{i_0}=\sum_{i=i_0}^{i_0+n-1} w_{\mathrm{time}}(t_i)y(t_{i+i_0}) 
 \end{equation}
 
@@ -453,5 +469,5 @@
 
 \begin{equation}
-E=\sum_{i=i_0^*}^{i=i_0^*+n-1} w_{\mathrm{amp}}(t_i - \tau)y(t_{i+i_0^*}) \qquad E \theta=\sum_{i=i_0^*}^{i=i_0^*+n-1} w_{\mathrm{time}}(t_i - \tau)y(t_{i+i_0^*}) \ .
+E=\sum_{i=i_0^*}^{i_0^*+n-1} w_{\mathrm{amp}}(t_i - \tau)y(t_{i+i_0^*}) \qquad E \theta=\sum_{i=i_0^*}^{i_0^*+n-1} w_{\mathrm{time}}(t_i - \tau)y(t_{i+i_0^*}) \ .
 \end{equation}
 
@@ -478,9 +494,4 @@
 %\frac{\sigma^2(b_i)}{\sigma_E^2} = \sum_{i=1}^{n}{g_i^2} - \frac{\sum_{i=1}^{n}{g_i \dot{g}_i}}{\sum_{i=1}^{n}{\dot{g}_i^2}} \ .
 %\end{equation}
-
-
-
-
-
 
 
@@ -490,9 +501,16 @@
 \includegraphics[totalheight=7cm]{time_sliding.eps}
 \end{center}
-\caption[Digital filter weights applied.]{Digital filter weights applied to the recorded FADC time slices of one calibration pulse. The left plot shows the result of the applied amplitude weights $e(t_0)=\sum_{i=0}^{i=n-1} w_{\mathrm{amp}}(t_0+i \cdot T_{\text{ADC}})y(t_0+i \cdot T_{\text{ADC}})$ and the right plot shows the result of the applied timing weights $e\tau(t_0)=\sum_{i=0}^{i=n-1} w_{\mathrm{time}}(t_0+i \cdot T_{\text{ADC}})y(t_0+i \cdot T_{\text{ADC}})$ .} \label{fig:amp_sliding}
-\end{figure}
-
-
-Figure \ref{fig:shape_fit_TDAS} shows the FADC slices of a single MC event together with the result of a full fit of the input MC pulse shape to the simulated FADC samples together with the result of the numerical fit using the digital filter. 
+\caption[Digital filter weights applied.]{Digital filter weights applied to the recorded FADC time slices of 
+one calibration pulse. The left plot shows the result of the applied amplitude weights 
+$e(t_0)=\sum_{i=0}^{i=n-1} w_{\mathrm{amp}}(t_0+i \cdot T_{\text{ADC}})y(t_0+i \cdot T_{\text{ADC}})$ and 
+the right plot shows the result of the applied timing weights 
+$e\tau(t_0)=\sum_{i=0}^{i=n-1} w_{\mathrm{time}}(t_0+i \cdot T_{\text{ADC}})y(t_0+i \cdot T_{\text{ADC}})$ .} 
+\label{fig:amp_sliding}
+\end{figure}
+
+
+Figure \ref{fig:shape_fit_TDAS} shows the FADC slices of a single MC event together with the result of a full 
+fit of the input MC pulse shape to the simulated FADC samples together with the result of the numerical fit 
+using the digital filter. 
 
 
@@ -501,11 +519,7 @@
 \includegraphics[totalheight=7cm]{shape_fit_TDAS.eps}
 \end{center}
-\caption[Shape fit.]{Full fit to the MC pulse shape with the MC input shape and a numerical fit using the digital filter.} \label{fig:shape_fit_TDAS}
-\end{figure}
-
-
-
-
-
+\caption[Shape fit.]{Full fit to the MC pulse shape with the MC input shape and a numerical fit using the 
+digital filter.} \label{fig:shape_fit_TDAS}
+\end{figure}
 
 
@@ -533,5 +547,6 @@
 \includegraphics[totalheight=7cm]{probability_fit_0ns.eps}
 \end{center}
-\caption[Fit Probability.]{Probability of the fit with the input signal shape to the simulated FADC samples including electronics and NSB noise.} \label{fig:w_amp_MC_input_TDAS.eps}
+\caption[Fit Probability.]{Probability of the fit with the input signal shape to the simulated FADC samples 
+including electronics and NSB noise.} \label{fig:w_amp_MC_input_TDAS.eps}
 \end{figure}
 
