source: trunk/MagicSoft/TDAS-Extractor/Algorithms.tex@ 5375

Last change on this file since 5375 was 5315, checked in by hbartko, 20 years ago
*** empty log message ***
File size: 16.5 KB
Line 
1\section{Signal Reconstruction Algorithms}
2
3\ldots {\it In this section, the extractors are described, especially w.r.t. which free parameters are left to play,
4how they subtract the pedestal, how they compare between calibration and cosmics pulses and how an
5extraction in case of a pure pedestal event takes place. }
6\newline
7\newline
8{\it Missing coding:
9\begin{itemize}
10\item Implementing a low-gain extraction based on the high-gain information \ldots Arnau
11\item Real fit to the expected pulse shape \ldots Hendrik, Wolfgang ???
12\end{itemize}
13}
14
15\subsection{Pure signal extractors}
16
17The pure signal extractors have in common that they compute only the
18signal, but no arrival time. All treated extractors here derive from the MARS-base
19class {\textit{MExtractor}} which provides the following facilities:
20
21\begin{itemize}
22\item The global extraction limits can be set from outside
23\item FADC saturation is kept track off
24\end{itemize}
25
26The following free adjustable parameters have to be set from outside:
27\begin{description}
28\item[Global extraction limits:\xspace] Limits in between the extractor is allowed
29to search.
30\end{description}
31
32\subsubsection{Fixed Window}
33
34This extractor is implemented in the MARS-class {\textit{MExtractFixedWindow}}.
35It simply adds the FADC contents in the allowed ranges.
36As it does not correct for the clock-noise, only an even number of samples is allowed.
37
38\subsubsection{Fixed Window with global Peak Search}
39
40This extractor is implemented in the MARS-class {\textit{MExtractFixedWindowPeakSearch}}.
41It first fixes a reference point defined as the highest sum of
42consecutive non-saturating FADC slices in a (smaller) peak-search window. This reference
43point removes the coherent movement of the arrival times over whole camera due to the trigger jitter.
44
45Then, simply adds the FADC contents around the reference point in a fixed window manner.
46It loops twice over the all pixels every event, because it first has to find the reference point.
47As it does not correct for the clock-noise, only an even number of samples is allowed.
48
49The following free adjustable parameters have to be set from outside:
50\begin{description}
51\item[Peak Search Window:\xspace] Defines the ``sliding window'' in which the peaking sum is
52searched for (default: 4 slices)
53\item[Offset from Window:\xspace] Defines the offset from the found reference point to start
54extracting the fixed window (default: 1 slice)
55\item[Low-Gain Peak shift:\xspace] Defines the shift in the low-gain with respect to the peak found
56in the high-gain (default: 1 slice)
57\end{description}
58
59\subsubsection{Fixed Window with integrated cubic spline}
60
61This extractor is implemented in the MARS-class {\textit{MExtractFixedWindowSpline}}.
62It uses a cubic spline algorithm, adapted from \cite{NUMREC}.
63It integrated the
64spline interpolated FADC slice values, counting the edge slices as half.
65As it does not correct for the clock-noise, only an odd number of samples is allowed.
66
67\subsection{Combined extractors}
68
69The combined extractors have in common that they compute the arrival time and
70the signal in one step. All treated combined extractors here derive from the MARS-base
71class {\textit{MExtractTimeAndCharge}} which provides the following facilities:
72
73\begin{itemize}
74\item Only one loop over all pixels is performed
75\item The individual FADC slice values get the clock-noise-corrected pedestals immediately subtracted.
76\item The low-gain extraction range is adapted dynamically, based on the computed arrival time
77 from the high-gain samples
78\item Extracted times from the low-gain samples get corrected for the intrinsic time delay of the low-gain
79 pulse
80\item The global extraction limits can be set from outside
81\item FADC saturation is kept track off
82\end{itemize}
83
84The following free adjustable parameters have to be set from outside:
85\begin{description}
86\item[Global extraction limits:\xspace] Limits in between the extractor is allowed
87to search. They are fixed by the extractor for the high-gain, but re-adjusted for
88every event in the low-gain, depending on the arrival time found in the low-gain.
89However, the dynamically adjusted window is not allowed to pass beyond the global
90limits.
91\item[Low-gain start shift:\xspace] Global shift between the computed high-gain arrival
92time and the start of the low-gain extraction limit (corrected for the intrinsic time offset).
93This variable tells where the extractor is allowed to start searching for the low-gain signal
94if the high-gain arrival time is known. It avoids that the extractor gets confused by possible high-gain
95signals leaking into the ``low-gain'' region.
96\end{description}
97
98\ldots {\it Note for the usage of this class together with {\textit{MJCalibration}}: In order to access the
99arrival times computed by these classes, the option: MJCalibration::SetTimeAndCharge() has to
100be chosen} \ldots
101
102\subsubsection{Sliding Window with amplitude-weighted time}
103
104This extractor is implemented in the MARS-class {\textit{MExtractTimeAndChargeSlidingWindow}}.
105It extracts the signal from a sliding window of an adjustable size, for high-gain and low-gain
106individually (default: 6 and 6) The signal is the one which maximizes the summed
107(clock-noise and pedestal-corrected) FADC signal over the window.
108\par
109The amplitude-weighted arrival time is calculated from the window with
110the highest integral using the following formula:
111
112\begin{equation}
113 t = \frac{\sum_{i=0}^{windowsize} s_i \cdot i}{\sum_{i=0}^{windowsize} i}
114\end{equation}
115where $i$ denotes the FADC slice index, starting from the beginning of the derived
116window and running over the window and $s_i$ the clock-noise and
117pedestal-corrected FADC value at slice index i.
118\par
119The following free adjustable parameters have to be set from outside:
120\begin{description}
121\item[Window sizes:\xspace] Independenty for high-gain and low-gain (default: 6,6)
122\end{description}
123
124\subsubsection{Cubic Spline with Sliding Window or Amplitude extraction}
125
126This extractor is implemented in the MARS-class {\textit{MExtractTimeAndChargeSpline}}.
127It uses a cubic spline algorithm, adapted from \cite{NUMREC}.
128The following free adjustable parameters have to be set from outside:
129
130\begin{description}
131\item[Time Extraction Type:\xspace] The position of the maximum can be chosen (default) or the
132position of the half maximum at the rising edge of the pulse
133\item[Charge Extraction Type:\xspace] The amplitude of the maximum can be chosen (default) or the
134integrated spline between maximum position minus rise time (default: 1.5 slices) and maximum position plus
135fall time (default: 4.5 slices). The low-gain signal integrates one slice more at the falling part of the
136signal.
137\item[Rise Time and Fall Time:\xspace] Can be adjusted for the integration charge extraction type.
138\item[Resolution:\xspace] Defined as the maximum allowed difference between the calculated half maximum value and
139the computed spline value at the arrival time position. Can be adjusted for the half-maximum time extraction
140type.
141\end{description}
142
143\subsubsection{Digital Filter}
144
145This extractor is implemented in the MARS-class {\textit{MExtractTimeAndChargeDigitalFilter}}.
146
147
148The goal of the digital filtering method \cite{OF94,OF77} is to optimally reconstruct the amplitude and time origin of a signal with a known signal shape from discrete measurements of the signal. Thereby the noise contribution to the amplitude reconstruction is minimized.
149
150For the digital filtering method two assumptions have to be made:
151
152\begin{itemize}
153\item{The normalized signal shape has to be independent of the signal amplitude.}
154\item{The noise properties have to be independent of the signal amplitude.}
155\end{itemize}
156
157Let $g(t)$ be the normalized signal shape, $E$ the signal amplitude and $\tau$ the time shift of the physical signal from the predicted signal shape. Then the time dependence of the signal, $y(t)$, is given by:
158
159\begin{equation}
160y(t)=E \cdot g(t-\tau) + b(t) \ ,
161\end{equation}
162
163where $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:
164
165\begin{equation} \label{shape_taylor_approx}
166y(t)=E \cdot g(t) - E\tau \cdot \dot{g}(t) + b(t) \ ,
167\end{equation}
168
169where $\dot{g}(t)$ is the time derivative of the signal shape. Discrete
170measurements $y_i$ of the signal at times $t_i \ (i=1,...,n)$ have the form:
171
172\begin{equation}
173y_i=E \cdot g_i- E\tau \cdot \dot{g}_i +b_i \ .
174\end{equation}
175
176The correlation of the noise contributions at times $t_i$ and $t_j$ is expressed in the noise autocorrelation matrix $\boldsymbol{B}$:
177
178\begin{equation}
179\boldsymbol{B_{ij}} = \langle b_i b_j \rangle - \langle b_i \rangle \langle b_j
180\rangle \ .
181\end{equation}
182%\equiv \langle b_i b_j \rangle with $\langle b_i \rangle = 0$.
183
184The signal amplitude, $E$, and the product of amplitude and time shift, $E \tau$, can be estimated from the given set of
185measurements $\boldsymbol{y} = (y_1, ... ,y_n)$ by minimizing:
186
187\begin{eqnarray}
188\chi^2(E, E\tau) &=& \sum_{i,j}(y_i-E g_i-E\tau \dot{g}_i) \boldsymbol{B}^{-1}_{ij} (y_j - E g_j-E\tau \dot{g}_i) \\
189&=& (\boldsymbol{y} - E
190\boldsymbol{g} - E\tau \dot{\boldsymbol{g}})^T \boldsymbol{B}^{-1} (\boldsymbol{y} - E \boldsymbol{g}- E\tau \dot{\boldsymbol{g}}) \ ,
191\end{eqnarray}
192
193where the last expression is matricial. The minimum is obtained for:
194
195\begin{equation}
196\frac{\partial \chi^2(E, E\tau)}{\partial E} = 0 \qquad \text{and} \qquad \frac{\partial \chi^2(E, E\tau)}{\partial(E\tau)} = 0 \ .
197\end{equation}
198
199This 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}$:
200
201\begin{eqnarray}
2020&=&-\boldsymbol{g}^T\boldsymbol{B}^{-1}\boldsymbol{y}+\boldsymbol{g}^T\boldsymbol{B}^{-1}\boldsymbol{g}\overline{E}+\boldsymbol{g}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}\overline{E\tau}
203\\
2040&=&-\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{y}+\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g}\overline{E}+\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}\overline{E\tau} \ .
205\end{eqnarray}
206
207Solving these equations one gets the solutions:
208
209\begin{equation}
210\overline{E}= \boldsymbol{w}_{\text{amp}}^T \boldsymbol{y} \quad \mathrm{with} \quad \boldsymbol{w}_{\text{amp}} = \frac{ (\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) \boldsymbol{B}^{-1} \boldsymbol{g} -(\boldsymbol{g}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) \boldsymbol{B}^{-1} \dot{\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 } \ ,
211\end{equation}
212
213\begin{equation}
214\overline{E\tau}= \boldsymbol{w}_{\text{time}}^T \boldsymbol{y} \quad \mathrm{with} \quad \boldsymbol{w}_{\text{time}} = \frac{ ({\boldsymbol{g}}^T\boldsymbol{B}^{-1}{\boldsymbol{g}}) \boldsymbol{B}^{-1} \dot{\boldsymbol{g}} -(\boldsymbol{g}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}) \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 } \ .
215\end{equation}
216
217
218Thus $\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}$.
219
220Because 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)$.
221
222The covariance matrix $\boldsymbol{V}$ of $\overline{E}$ and $\overline{E\tau}$ is given by:
223
224\begin{equation}
225\boldsymbol{V}^{-1}=\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] \ .
226\end{equation}
227
228The expected contribution of the noise to the estimated amplitude, $\sigma_E$, is:
229
230\begin{equation}\label{of_noise}
231\sigma_E^2=\frac{\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\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} \ .
232\end{equation}
233
234In the case of an uncorrelated noise with zero mean the noise autocorrelation matrix is:
235
236\begin{equation}
237\boldsymbol{B}_{ij}= \langle b_i b_j \rangle \delta_{ij} = \sigma^2(b_i) \ ,
238\end{equation}
239
240where $\sigma(b_i)$ is the standard deviation of the noise of the discrete measurements. Equation (\ref{of_noise}) than becomes:
241
242
243\begin{equation}
244\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}} \ .
245\end{equation}
246
247
248
249\ldots {\it Hendrik ... }
250
251The following free adjustable parameters have to be set from outside:
252
253\begin{description}
254\item[Weights File:\xspace]
255\item[Window Sizes:\xspace]
256\item[Binning Resolution:\xspace]
257\end{description}
258
259\subsubsection{Real fit to the expected pulse shape }
260
261This extractor is not yet implemented as MARS-class...
262\par
263It fit the pulse shape to a Landau convoluted with a Gaussian using the following
264parameters:...
265
266\ldots {\it Hendrik, Wolfgang ... }
267
268
269\subsection{Used Extractors for this Analysis}
270
271We propose to test the following parameterized extractors:
272
273\begin{description}
274\item[MExtractFixedWindow]: with the following parameters, if {\textit{maxbin}} defines the
275 mean position of the High-Gain FADC slice carrying the pulse maximum:
276\begin{enumerate}
277\item SetRange({\textit{maxbin}}-1,{\textit{maxbin}}+2,{\textit{maxbin}}+0.5,{\textit{maxbin}}+3.5);
278\item SetRange({\textit{maxbin}}-1,{\textit{maxbin}}+2,{\textit{maxbin}}-1.5,{\textit{maxbin}}+4.5);
279\item SetRange({\textit{maxbin}}-2,{\textit{maxbin}}+3,{\textit{maxbin}}-0.5,{\textit{maxbin}}+4.5);
280\item SetRange({\textit{maxbin}}-3,{\textit{maxbin}}+4,{\textit{maxbin}}-1.5,{\textit{maxbin}}+5.5);
281\item SetRange({\textit{maxbin}}-5,{\textit{maxbin}}+8,{\textit{maxbin}}-1.5,{\textit{maxbin}}+7.5);
282\suspend{enumerate}
283\item[MExtractFixedWindowSpline]: with the following parameters, if {\textit{maxbin}} defines the
284 mean position of the High-Gain FADC slice carrying the pulse maximum:
285\resume{enumerate}
286\item SetRange({\textit{maxbin}}-1,{\textit{maxbin}}+2,{\textit{maxbin}}+0.5,{\textit{maxbin}}+3.5);
287\item SetRange({\textit{maxbin}}-1,{\textit{maxbin}}+2,{\textit{maxbin}}-1.5,{\textit{maxbin}}+4.5);
288\item SetRange({\textit{maxbin}}-2,{\textit{maxbin}}+3,{\textit{maxbin}}-0.5,{\textit{maxbin}}+4.5);
289\item SetRange({\textit{maxbin}}-3,{\textit{maxbin}}+4,{\textit{maxbin}}-1.5,{\textit{maxbin}}+5.5);
290\item SetRange({\textit{maxbin}}-5,{\textit{maxbin}}+8,{\textit{maxbin}}-1.5,{\textit{maxbin}}+7.5);
291\suspend{enumerate}
292\item[MExtractFixedWindowPeakSearch]: with the following parameters: \\
293SetRange(0,18,2,14); and:
294\resume{enumerate}
295\item SetWindows(2,2,2);
296\item SetWindows(4,4,2);
297\item SetWindows(6,6,4);
298\item SetWindows(4,6,4);
299\item SetWindows(8,8,4);
300\item SetWindows(14,10,4);
301\suspend{enumerate}
302\item[MExtractTimeAndChargeSlidingWindow]: with the following parameters: \\
303SetRange(0,18,2,14); and:
304\resume{enumerate}
305\item SetWindowSize(2,2);
306\item SetWindowSize(4,4);
307\item SetWindowSize(6,6);
308\item SetWindowSize(4,6);
309\item SetWindowSize(8,8);
310\item SetWindowSize(14,10);
311\suspend{enumerate}
312\item[MExtractTimeAndChargeSpline]: with the following parameters:\\
313SetChargeType(MExtractTimeAndChargeSpline::kIntegral); \\
314SetRange(0,18,2,14); \\
315and:
316
317\resume{enumerate}
318\item SetRiseTime(1.5); SetFallTime(4.5);
319\item SetRiseTime(0.5); SetFallTime(2.5);
320\item SetRiseTime(0.5); SetFallTime(1.5);
321\item SetRiseTime(0.5); SetFallTime(0.5);
322\suspend{enumerate}
323and:
324\resume{enumerate}
325\item SetChargeType(MExtractTimeAndChargeSpline::kAmplitude); \\
326SetRange(0,10,4,11); and:
327\suspend{enumerate}
328\item[MExtractTimeAndChargeDigitalFilter]: with the following parameters:
329\resume{enumerate}
330\item SetWeightsFile(``cosmic\_weights6.dat'');
331\item SetWeightsFile(``cosmic\_weights4.dat'');
332\item SetWeightsFile(``cosmic\_weights\_logain6.dat'');
333\item SetWeightsFile(``cosmic\_weights\_logain4.dat'');
334\item SetWeightsFile(``calibration\_weights\_UV6.dat'');
335\item SetWeightsFile(``calibration\_weights\_UV4.dat'');
336\item SetWeightsFile(``calibration\_weights\_UV\_logain6.dat'');
337\item SetWeightsFile(``calibration\_weights\_UV\_logain4.dat'');
338\suspend{enumerate}
339\item[``Real Fit'']: (not yet implemented, one try)
340\resume{enumerate}
341\item Real Fit
342\end{enumerate}
343\end{description}
344
345
346References: \cite{OF77,OF94}.
347
348
349%%% Local Variables:
350%%% mode: latex
351%%% TeX-master: "MAGIC_signal_reco"
352%%% TeX-master: "Algorithms"
353%%% End:
Note: See TracBrowser for help on using the repository browser.