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

Last change on this file since 5759 was 5759, checked in by gaug, 20 years ago
*** empty log message ***
File size: 32.5 KB
Line 
1\section{Signal Reconstruction Algorithms \label{sec:algorithms}}
2
3{\it Missing coding:
4\begin{itemize}
5\item Real fit to the expected pulse shape \ldots Hendrik, Wolfgang ???
6\end{itemize}
7}
8
9\subsection{Implementation of Signal Extractors in MARS}
10
11All signal extractor classes are stored in the MARS-directory {\textit{\bf msignal/}}.
12There, the base classes {\textit{\bf MExtractor}}, {\textit{\bf MExtractTime}}, {\textit{\bf MExtractTimeAndCharge}} and
13all individual extractors can be found. Figure~\ref{fig:extractorclasses} gives a sketch of the
14inheritances of each class and what each class calculates.
15
16\begin{figure}[htp]
17\includegraphics[width=0.99\linewidth]{ExtractorClasses.eps}
18\caption{Sketch of possible inheritances of the MARS signal extractor classes}
19\label{fig:extractorclasses}
20\end{figure}
21
22The following base classes for the extractor tasks are used:
23\begin{description}
24\item[MExtractor:\xspace] This class provides the basic data members equal for all extractors which are:
25 \begin{enumerate}
26 \item Global extraction ranges, parameterized by the variables
27 {\textit{\bf fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast}} and the function {\textit{\bf SetRange()}}.
28 The ranges always {\textit{\bf include}} the edge slices.
29 \item An internal variable {\textit{\bf fHiLoLast}} regulating the overlap of the desired high-gain
30 extraction range into the low-gain array.a
31 \item The maximum possible FADC value, before the slice is declared as saturated, parameterized
32 by the variable {\textit{\bf fSaturationLimit}} (default:\,254).
33 \item The typical delay between high-gain and low-gain slices, expressed in FADC slices and parameterized
34 by the variable {\textit{\bf fOffsetLoGain}} (default:\,1.51)
35 \item Pointers to the used storage containers {\textit{\bf MRawEvtData, MRawRunHeader, MPedestalCam}}
36 and~{\textit{\bf MExtractedSignalCam}}, parameterized by the variables
37 {\textit{\bf fRawEvt, fRunHeader, fPedestals}} and~{\textit{\bf fSignals}}.
38 \item Names of the used storage containers to be searched for in the parameter list, parameterized
39 by the variables {\textit{\bf fNamePedestalCam}} and~{\textit{\bf fNameSignalCam}} (default: ``MPedestalCam''
40 and~''MExtractedSignalCam'').
41 \item The equivalent number of FADC samples, used for the calculation of the pedestal RMS and then the
42 number of photo-electrons with the F-Factor method (see eq.~\ref{eq:rmssubtraction} and
43 section~\ref{sec:photo-electrons}). This number is parameterized by the variables
44 {\textit{\bf fNumHiGainSamples}} and~{\textit{\bf fNumLoGainSamples}}.
45 \end{enumerate}
46
47 {\textit {\bf MExtractor}} is able to loop over all events, if the {\textit{\bf Process()}}-function is not overwritten.
48 It uses the following (virtual) functions, to be overwritten by the derived extractor class:
49
50 \begin{enumerate}
51 \item void {\textit {\bf FindSignalHiGain}}(Byte\_t* firstused, Byte\_t* lowgain, Float\_t\& sum, Byte\_t\& sat) const
52 \item void {\textit {\bf FindSignalLoGain}}(Byte\_t* firstused, Float\_t\& sum, Byte\_t\& sat) const
53 \end{enumerate}
54
55 where the pointers ``firstused'' point to the first used FADC slice declared by the extraction ranges,
56 the pointer ``lowgain'' point to the beginning of the low-gain FADC slices array (to be used for
57 pulses reaching into the low-gain array) and the variables ``sum'' and ``sat'' get filled with the
58 extracted signal and the number of saturating FADC slices, respectively.
59 \par
60 The pedestals get subtracted automatically {\textit {\bf after}} execution of these two functions.
61
62\item[MExtractTime:\xspace] This class provides - additionally to those already declared in {\textit{\bf MExtractor}},
63 the basic data members equal for all time extractors which are:
64 \begin{enumerate}
65 \item Pointers to the used storage containers {\textit{\bf MArrivalTimeCam}}
66 parameterized by the variables
67 {\textit{\bf fArrTime}}.
68 \item The name of the used ``MArrivalTimeCam''-container to be searched for in the parameter list,
69 parameterized by the variables {\textit{\bf fNameTimeCam}} (default: ``MArrivalTimeCam'' ).
70 \end{enumerate}
71
72 {\textit {\bf MExtractTime}} is able to loop over all events, if the {\textit{\bf Process()}}-function is not
73 overwritten.
74 It uses the following (virtual) functions, to be overwritten by the derived extractor class:
75
76 \begin{enumerate}
77 \item void {\textit {\bf FindTimeHiGain}}(Byte\_t* firstused, Float\_t\& time, Float\_t\& dtime, Byte\_t\& sat, const MPedestlPix \&ped) const
78 \item void {\textit {\bf FindTimeLoGain}}(Byte\_t* firstused, Float\_t\& time, Float\_t\& dtime, Byte\_t\& sat, const MPedestalPix \&ped) const
79 \end{enumerate}
80
81 where the pointers ``firstused'' point to the first used FADC slice declared by the extraction ranges,
82 and the variables ``time'', ``dtime'' and ``sat'' get filled with the
83 extracted arrival time, its error and the number of saturating FADC slices, respectively.
84 \par
85 The pedestals can be used for the arrival time extraction via the reference ``ped''.
86
87\item[MExtractTimeAndCharge:\xspace] This class provides - additionally to those already declared in
88 {\textit{\bf MExtractor}} and {\textit{\bf MExtractTime}},
89 the basic data members equal for all time and charge extractors which are:
90 \begin{enumerate}
91 \item The actual extraction window sizes, parameterized by the variables
92 {\textit{\bf fWindowSizeHiGain}} and {\textit{\bf fWindowSizeLoGain}}.
93 \item The shift of the low-gain extraction range start w.r.t. to the found high-gain arrival
94 time, parameterized by the variable {\textit{\bf fLoGainStartShift}} (default: -2.8)
95 \end{enumerate}
96
97 {\textit {\bf MExtractTimeAndCharge}} is able to loop over all events, if the {\textit{\bf Process()}}-function is not
98 overwritten.
99 It uses the following (virtual) functions, to be overwritten by the derived extractor class:
100
101 \begin{enumerate}
102 \item void {\textit {\bf FindTimeAndChargeHiGain}}(Byte\_t* firstused, Byte\_t* logain, Float\_t\& sum, Float\_t\& dsum,
103 Float\_t\& time, Float\_t\& dtime, Byte\_t\& sat,
104 const MPedestlPix \&ped, const Bool\_t abflag) const
105 \item void {\textit {\bf FindTimeAndChargeLoGain}}(Byte\_t* firstused, Float\_t\& sum, Float\_t\& dsum,
106 Float\_t\& time, Float\_t\& dtime, Byte\_t\& sat,
107 const MPedestalPix \&ped, const Bool\_t abflag) const
108 \end{enumerate}
109
110 where the pointers ``firstused'' point to the first used FADC slice declared by the extraction ranges,
111 the pointer ``lowgain'' point to the beginning of the low-gain FADC slices array (to be used for
112 pulses reaching into the low-gain array),
113 the variables ``sum'', ``dsum'' get filled with the
114 extracted signal and its error. The variables ``time'', ``dtime'' and ``sat'' get filled with the
115 extracted arrival time, its error and the number of saturating FADC slices, respectively.
116 \par
117 The pedestals can be used for the extraction via the reference ``ped'', also the AB-flag is given
118 for AB-clock noise correction.
119\end{description}
120
121
122\subsection{Pure Signal Extractors}
123
124The pure signal extractors have in common that they reconstruct only the
125charge, but not the arrival time. All treated extractors here derive from the MARS-base
126class {\textit{\bf MExtractor}} which provides the following facilities:
127
128\begin{itemize}
129\item The global extraction limits can be set from outside
130\item FADC saturation is kept track of
131\end{itemize}
132
133The following freely adjustable parameters have to be set from outside:
134\begin{description}
135\item[Global extraction limits:\xspace] Limits in between the extractor is allowed
136to search, independently for high gain and low gain.
137\end{description}
138
139As the pulses jitter by about one FADC slice,
140not every pulse lies exactly within the optimal limits, especially if one takes small
141extraction windows.
142Moreover, the readout position with respect to the trigger position has changed a couple
143of times during last year, therefore a very careful adjustment of the extraction limits
144is mandatory before using these extractors.
145
146\subsubsection{Fixed Window}
147
148This extractor is implemented in the MARS-class {\textit{MExtractFixedWindow}}.
149It simply adds the FADC contents in the assigned ranges.
150As it does not correct for the clock-noise, only an even number of samples is allowed.
151Figure~\ref{fig:fixedwindowsketch} gives a sketch of the used extraction ranges for this
152paper and two typical calibration pulses.
153
154\begin{figure}[htp]
155 \includegraphics[width=0.49\linewidth]{MExtractFixedWindow_5Led_UV.eps}
156 \includegraphics[width=0.49\linewidth]{MExtractFixedWindow_23Led_Blue.eps}
157\caption[Sketch extraction ranges MExtractFixedWindow]{%
158Sketch of the extraction ranges for the extractor {\textit{MExtractFixedWindow}}
159for two typical calibration pulses (pedestals have been subtracted) and a typical inner pixel.
160The pulse would be shifted half a slice to the right for an outer pixels. }
161\label{fig:fixedwindowsketch}
162\end{figure}
163
164
165\subsubsection{Fixed Window with Integrated Cubic Spline}
166
167This extractor is implemented in the MARS-class {\textit{MExtractFixedWindowSpline}},
168using a cubic spline algorithm, adapted from \cite{NUMREC}.
169It integrated the
170spline interpolated FADC slice values. The edge slices are counted as half.
171As it does not correct for the clock-noise, only an odd number of samples is allowed.
172Figure~\ref{fig:fixedwindowsplinesketch} gives a sketch of the used extraction ranges for this
173paper and two typical calibration pulses.
174
175\begin{figure}[htp]
176 \includegraphics[width=0.49\linewidth]{MExtractFixedWindowSpline_5Led_UV.eps}
177 \includegraphics[width=0.49\linewidth]{MExtractFixedWindowSpline_23Led_Blue.eps}
178\caption[Sketch extraction ranges MExtractFixedWindowSpline]{%
179Sketch of the extraction ranges for the extractor {\textit{MExtractFixedWindowSpline}}
180for two typical calibration pulses (pedestals have been subtracted) and a typical inner pixel.
181The pulse would be shifted half a slice to the right for an outer pixels. }
182\label{fig:fixedwindowsplinesketch}
183\end{figure}
184
185\subsubsection{Fixed Window with Global Peak Search}
186
187This extractor is implemented in the MARS-class {\textit{MExtractFixedWindowPeakSearch}}.
188It fixes first a reference point defined as the highest sum of
189consecutive non-saturating FADC slices in a (smaller) peak-search window. This reference
190point removes the coherent movement of the arrival times in the whole camera due to the trigger jitter.
191\par
192In a second loop over the pixels,
193it adds the FADC contents starting from a pre-defined point before the obtained peak-search window
194over an extraction window of a pre-defined window size.
195It loops twice over all pixels in every event, because it has to find the reference point, first.
196As it does not correct for the clock-noise, only an even number of samples is allowed.
197
198The following freely adjustable parameters have to be set from outside:
199\begin{description}
200\item[Peak Search Window:\xspace] Defines the ``sliding window'' in which the peaking sum is
201searched for (default: 4 slices)
202\item[Offset from Window:\xspace] Defines the offset of the start of the extraction window w.r.t. the
203starting point of the obtained peak search window (default: 1 slice)
204\item[Low-Gain Peak shift:\xspace] Defines the shift in the low-gain with respect to the peak found
205in the high-gain (default: 1 slice)
206\end{description}
207
208Figure~\ref{fig:fixedwindowpeaksearchsketch} gives a sketch of the possible peak-search and extraction
209window positions in two typical calibration pulses.
210
211\begin{figure}[htp]
212 \includegraphics[width=0.49\linewidth]{MExtractFixedWindowPeakSearch_5Led_UV.eps}
213 \includegraphics[width=0.49\linewidth]{MExtractFixedWindowPeakSearch_23Led_Blue.eps}
214\caption[Sketch extraction ranges MExtractFixedWindowPeakSearch]{%
215Sketch of the extraction ranges for the extractor {\textit{MExtractFixedWindowPeakSearch}}
216for two typical calibration pulses (pedestals have been subtracted) and a typical inner pixel.
217The pulse would be shifted half a slice to the right for an outer pixels. }
218\label{fig:fixedwindowpeaksearchsketch}
219\end{figure}
220
221\subsection{Combined Extractors}
222
223The combined extractors have in common that they reconstruct the arrival time and
224the charge at the same time and for the same pulse.
225All treated combined extractors here derive from the MARS-base
226class {\textit{MExtractTimeAndCharge}} which provides the following facilities:
227
228\begin{itemize}
229\item Only one loop over all pixels is performed
230\item The individual FADC slice values get the clock-noise-corrected pedestals immediately subtracted.
231\item The low-gain extraction range is adapted dynamically, based on the computed arrival time
232 from the high-gain samples
233\item Extracted times from the low-gain samples get corrected for the intrinsic time delay of the low-gain
234 pulse
235\item The global extraction limits can be set from outside
236\item FADC saturation is kept track of
237\end{itemize}
238
239The following free adjustable parameters have to be set additionally from outside:
240\begin{description}
241\item[Global extraction limits:\xspace] Limits in between which the extractor is allowed
242to search. They are fixed by the extractor for the high-gain, but re-adjusted for
243every event in the low-gain, depending on the arrival time found in the low-gain.
244However, the dynamically adjusted window is not allowed to pass beyond the global
245limits.
246\item[Low-gain start shift:\xspace] Global shift between the computed high-gain arrival
247time and the start of the low-gain extraction limit (corrected for the intrinsic time offset).
248This variable tells where the extractor is allowed to start searching for the low-gain signal
249if the high-gain arrival time is known. It avoids that the extractor gets confused by possible high-gain
250signals leaking into the ``low-gain'' region (default: -2.8).
251\end{description}
252
253\subsubsection{Sliding Window with Amplitude-Weighted Time}
254
255This extractor is implemented in the MARS-class {\textit{MExtractTimeAndChargeSlidingWindow}}.
256It extracts the signal from a sliding window of an adjustable size, for high-gain and low-gain
257individually (default: 6 and 6) The signal is the one which maximizes the summed
258(clock-noise and pedestal-corrected) FADC slice contents.
259\par
260The amplitude-weighted arrival time is calculated from the window with
261the highest integral using the following formula:
262
263\begin{equation}
264 t = \frac{\sum_{i=0}^{windowsize} s_i \cdot i}{\sum_{i=0}^{windowsize} i}
265\end{equation}
266where $i$ denotes the FADC slice index, starting from the beginning of the extraction
267window and running over the window and $s_i$ the clock-noise and
268pedestal-corrected FADC slice contents at slice position $i$.
269\par
270The following free adjustable parameters have to be set from outside:
271\begin{description}
272\item[Window sizes:\xspace] Independently for high-gain and low-gain (default: 6,6)
273\end{description}
274
275\subsubsection{Cubic Spline with Sliding Window or Amplitude Extraction}
276
277This extractor is implemented in the MARS-class {\textit{MExtractTimeAndChargeSpline}}.
278It interpolates the FADC contents using a cubic spline algorithm, adapted from \cite{NUMREC}.
279The following free adjustable parameters have to be set from outside:
280
281\begin{description}
282\item[Time Extraction Type:\xspace] The position of the maximum can be chosen or the
283position of the half maximum at the rising edge of the pulse (default).
284\item[Charge Extraction Type:\xspace] The amplitude of the maximum can be chosen (default) or the
285integrated spline between maximum position minus rise time (default: 1.5 slices) and maximum position plus
286fall time (default: 4.5 slices). The low-gain signal integrates half a slice more at the rising
287falling part of the
288signal.
289\item[Rise Time and Fall Time:\xspace] Can be adjusted for the integration charge extraction type.
290\item[Resolution:\xspace] Defined as the maximum allowed difference between the calculated half maximum value and
291the computed spline value at the arrival time position. Can be adjusted for the half-maximum time extraction
292type.
293\end{description}
294
295\subsubsection{Digital Filter}
296
297This extractor is implemented in the MARS-class {\textit{MExtractTimeAndChargeDigitalFilter}}.
298
299
300The 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.
301
302For the digital filtering method two assumptions have to be made:
303
304\begin{itemize}
305\item{The normalized signal shape has to be independent of the signal amplitude.}
306\item{The noise properties have to be independent of the signal amplitude.}
307\end{itemize}
308
309Let $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:
310
311\begin{equation}
312y(t)=E \cdot g(t-\tau) + b(t) \ ,
313\end{equation}
314
315where $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:
316
317\begin{equation} \label{shape_taylor_approx}
318y(t)=E \cdot g(t) - E\tau \cdot \dot{g}(t) + b(t) \ ,
319\end{equation}
320
321where $\dot{g}(t)$ is the time derivative of the signal shape. Discrete
322measurements $y_i$ of the signal at times $t_i \ (i=1,...,n)$ have the form:
323
324\begin{equation}
325y_i=E \cdot g_i- E\tau \cdot \dot{g}_i +b_i \ .
326\end{equation}
327
328The correlation of the noise contributions at times $t_i$ and $t_j$ is expressed in the noise autocorrelation matrix $\boldsymbol{B}$:
329
330\begin{equation}
331\boldsymbol{B_{ij}} = \langle b_i b_j \rangle - \langle b_i \rangle \langle b_j
332\rangle \ .
333\label{eq:autocorr}
334\end{equation}
335%\equiv \langle b_i b_j \rangle with $\langle b_i \rangle = 0$.
336
337The signal amplitude, $E$, and the product of amplitude and time shift, $E \tau$, can be estimated from the given set of
338measurements $\boldsymbol{y} = (y_1, ... ,y_n)$ by minimizing:
339
340\begin{eqnarray}
341\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}_j) \\
342&=& (\boldsymbol{y} - E
343\boldsymbol{g} - E\tau \dot{\boldsymbol{g}})^T \boldsymbol{B}^{-1} (\boldsymbol{y} - E \boldsymbol{g}- E\tau \dot{\boldsymbol{g}}) \ ,
344\end{eqnarray}
345
346where the last expression is matricial. The minimum is obtained for:
347
348\begin{equation}
349\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 \ .
350\end{equation}
351
352Taking 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}$:
353
354\begin{eqnarray}
3550&=&-\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}
356\\
3570&=&-\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} \ .
358\end{eqnarray}
359
360Solving these equations one gets the solutions:
361
362\begin{equation}
363\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 } \ ,
364\end{equation}
365
366\begin{equation}
367\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 } \ .
368\end{equation}
369
370
371Thus $\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}$.
372
373Because 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)$.
374
375The covariance matrix $\boldsymbol{V}$ of $\overline{E}$ and $\overline{E\tau}$ is given by:
376
377\begin{equation}
378\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} \ .
379\end{equation}
380
381The expected contribution of the noise to the estimated amplitude, $\sigma_E$, is:
382
383\begin{equation}\label{of_noise}
384\sigma_E^2=\boldsymbol{V}_{E,E}=\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} \ .
385\end{equation}
386
387The expected contribution of the noise to the estimated timing, $\sigma_{\tau}$, is:
388
389\begin{equation}\label{of_noise_time}
390E^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} \ .
391\end{equation}
392
393For the MAGIC signals, as implemented in the MC simulations, a pedestal RMS of a single FADC slice of 4 FADC counts introduces an error in the reconstructed signal and time of:
394
395\begin{equation}\label{of_noise}
396\sigma_E \approx 8.3 \ \mathrm{FADC\ counts} \qquad \sigma_{\tau} \approx \frac{6.5\ \Delta T_{\mathrm{FADC}}}{E\ /\ \mathrm{FADC\ counts}} \ ,
397\end{equation}
398
399where $\Delta T_{\mathrm{FADC}} = 3.33$ ns is the sampling interval of the MAGIC FADCs.
400
401
402For an IACT there are two types of background noise. On the one hand there is the constantly present electronics noise, on the other hand the light of the night sky introduces a sizeable background noise to the measurement of Cherenkov photons from air showers.
403
404The electronics noise is largely white, uncorrelated in time. The noise from the night sky background photons is the superposition of the detector response to single photo electrons arriving randomly distributed in time. Figure \ref{fig:noise_autocorr_AB_36038_TDAS} shows the noise autocorrelation matrix for an open camera. The large noise autocorrelation in time of the current FADC system is due to the pulse shaping with a shaping constant of 6 ns.
405
406In general the amplitude and timing weights, $\boldsymbol{w}_{\text{amp}}$ and $\boldsymbol{w}_{\text{time}}$, depend on the pulse shape, the derivative of the pulse shape and the noise autocorrelation. In the high gain samples the correlated night sky background noise dominates over the white electronics noise. Thus different noise levels just cause the noise autocorrelation matrix $\boldsymbol{B}$ to change by a factor, which cancels out in the weights calculation. Thus in the high gain the weights are to a very good approximation independent of the night sky background noise level.
407
408Contrary to that in the low gain samples ... .
409
410
411
412\begin{figure}[h!]
413\begin{center}
414\includegraphics[totalheight=7cm]{noise_autocorr_AB_36038_TDAS.eps}
415\end{center}
416\caption[Noise autocorrelation.]{Noise autocorrelation matrix for open camera including the noise due to night sky background fluctuations.} \label{fig:noise_autocorr_AB_36038_TDAS}
417\end{figure}
418
419
420
421Using 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 ...
422
423
424\begin{figure}[h!]
425\begin{center}
426\includegraphics[totalheight=7cm]{w_time_MC_input_TDAS.eps}
427\end{center}
428\caption[Time weights.]{Time weights $w_{\mathrm{time}}(t_0) \ldots w_{\mathrm{time}}(t_5)$ for a window size of 6 FADC slices for the pulse shape used in the MC simulations. The first weight $w_{\mathrm{time}}(t_0)$ is plotted as a function of the relative time $t_{\text{rel}}$ the trigger and the FADC clock in the range $[-0.5;0.5[ \ T_{\text{ADC}}$, the second weight in the range $[0.5;1.5[ \ T_{\text{ADC}}$ and so on. A binning resolution of $0.1 T_{\text{ADC}}$ has been chosen.} \label{fig:w_time_MC_input_TDAS}
429\end{figure}
430
431\begin{figure}[h!]
432\begin{center}
433\includegraphics[totalheight=7cm]{w_amp_MC_input_TDAS.eps}
434\end{center}
435\caption[Amplitude weights.]{Amplitude weights $w_{\mathrm{amp}}(t_0) \ldots w_{\mathrm{amp}}(t_5)$ for a window size of 6 FADC slices for the pulse shape used in the MC simulations. The first weight $w_{\mathrm{amp}}(t_0)$ is plotted as a function of the relative time $t_{\text{rel}}$ the trigger and the FADC clock in the range $[-0.5;0.5[ \ T_{\text{ADC}}$, the second weight in the range $[0.5;1.5[ \ T_{\text{ADC}}$ and so on. A binning resolution of $0.1 T_{\text{ADC}}$ has been chosen.} \label{fig:w_amp_MC_input_TDAS}
436\end{figure}
437
438
439
440In the current implementation a two step procedure is applied to reconstruct the signal. The weight functions $w_{\mathrm{amp}}(t)$ and $w_{\mathrm{time}}(t)$ are computed numerically with a resolution of $1/10$ of an FADC slice. In the first step the quantities $e_{i_0}$ and $e\tau_{i_0}$ are computed using a window of $n$ slices:
441
442\begin{equation}
443e_{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})
444\end{equation}
445
446for all possible signal start slices $i_0$. Let $i_0^*$ be the signal start slice with the largest $e_{i_0}$. Then in a second step the timing offset $\tau$ is calculated:
447
448\begin{equation}
449\tau=\frac{(e\tau)_{i_0^*}}{e_{i_0^*}}
450\end{equation}
451
452and the weights iterated:
453
454\begin{equation}
455E=\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^*}) \ .
456\end{equation}
457
458The reconstructed signal is then taken to be $E$ and the reconstructed arrival time $t_{\text{arrival}}$ is
459
460\begin{equation}
461t_{\text{arrival}} = i_0^* + \tau + \theta \ .
462\end{equation}
463
464
465
466% This does not apply for MAGIC as the LONs are giving always a correlated noise (in addition to the artificial shaping)
467
468%In the case of an uncorrelated noise with zero mean the noise autocorrelation matrix is:
469
470%\begin{equation}
471%\boldsymbol{B}_{ij}= \langle b_i b_j \rangle \delta_{ij} = \sigma^2(b_i) \ ,
472%\end{equation}
473
474%where $\sigma(b_i)$ is the standard deviation of the noise of the discrete measurements. Equation (\ref{of_noise}) than becomes:
475
476
477%\begin{equation}
478%\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}} \ .
479%\end{equation}
480
481
482
483
484
485
486
487\begin{figure}[h!]
488\begin{center}
489\includegraphics[totalheight=7cm]{amp_sliding.eps}
490\includegraphics[totalheight=7cm]{time_sliding.eps}
491\end{center}
492\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}
493\end{figure}
494
495
496Figure \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.
497
498
499\begin{figure}[h!]
500\begin{center}
501\includegraphics[totalheight=7cm]{shape_fit_TDAS.eps}
502\end{center}
503\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}
504\end{figure}
505
506
507
508
509
510
511
512\ldots {\it Hendrik ... }
513
514The following free adjustable parameters have to be set from outside:
515
516\begin{description}
517\item[Weights File:\xspace]
518\item[Window Sizes:\xspace]
519\item[Binning Resolution:\xspace]
520\end{description}
521
522\subsubsection{Real Fit to the Expected Pulse Shape }
523
524This extractor is not yet implemented as MARS-class...
525\par
526It fit the pulse shape to a Landau convoluted with a Gaussian using the following
527parameters:...
528
529\ldots {\it Hendrik, Wolfgang ... }
530
531\begin{figure}[h!]
532\begin{center}
533\includegraphics[totalheight=7cm]{probability_fit_0ns.eps}
534\end{center}
535\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}
536\end{figure}
537
538
539
540\subsection{Used Extractors for this Analysis}
541
542We propose to test the following parameterized extractors:
543
544\begin{description}
545\item[MExtractFixedWindow]: with the following parameters, if {\textit{maxbin}} defines the
546 mean position of the High-Gain FADC slice carrying the pulse maximum:
547\begin{enumerate}
548\item SetRange({\textit{maxbin}}-1,{\textit{maxbin}}+2,{\textit{maxbin}}+0.5,{\textit{maxbin}}+3.5);
549\item SetRange({\textit{maxbin}}-1,{\textit{maxbin}}+2,{\textit{maxbin}}-0.5,{\textit{maxbin}}+4.5);
550\item SetRange({\textit{maxbin}}-2,{\textit{maxbin}}+3,{\textit{maxbin}}-0.5,{\textit{maxbin}}+4.5);
551\item SetRange({\textit{maxbin}}-3,{\textit{maxbin}}+4,{\textit{maxbin}}-1.5,{\textit{maxbin}}+5.5);
552\item SetRange({\textit{maxbin}}-5,{\textit{maxbin}}+8,{\textit{maxbin}}-1.5,{\textit{maxbin}}+7.5);
553\suspend{enumerate}
554\item[MExtractFixedWindowSpline]: with the following parameters, if {\textit{maxbin}} defines the
555 mean position of the High-Gain FADC slice carrying the pulse maximum:
556\resume{enumerate}
557\item SetRange({\textit{maxbin}}-1,{\textit{maxbin}}+2,{\textit{maxbin}}+0.5,{\textit{maxbin}}+3.5);
558\item SetRange({\textit{maxbin}}-1,{\textit{maxbin}}+2,{\textit{maxbin}}-0.5,{\textit{maxbin}}+4.5);
559\item SetRange({\textit{maxbin}}-2,{\textit{maxbin}}+3,{\textit{maxbin}}-0.5,{\textit{maxbin}}+4.5);
560\item SetRange({\textit{maxbin}}-3,{\textit{maxbin}}+4,{\textit{maxbin}}-1.5,{\textit{maxbin}}+5.5);
561\item SetRange({\textit{maxbin}}-5,{\textit{maxbin}}+8,{\textit{maxbin}}-1.5,{\textit{maxbin}}+7.5);
562\suspend{enumerate}
563\item[MExtractFixedWindowPeakSearch]: with the following parameters: \\
564SetRange(0,18,2,14); and:
565\resume{enumerate}
566\item SetWindows(2,2,2); SetOffsetFromWindow(0);
567\item SetWindows(4,4,2);
568\item SetWindows(4,6,4); SetOffsetFromWindow(0);
569\item SetWindows(6,6,4);
570\item SetWindows(8,8,4);
571\item SetWindows(14,10,4); SetOffsetFromWindow(2);
572\suspend{enumerate}
573\item[MExtractTimeAndChargeSlidingWindow]: with the following parameters: \\
574SetRange(0,18,2,14); and:
575\resume{enumerate}
576\item SetWindowSize(2,2);
577\item SetWindowSize(4,4);
578\item SetWindowSize(4,6);
579\item SetWindowSize(6,6);
580\item SetWindowSize(8,8);
581\item SetWindowSize(14,10);
582\suspend{enumerate}
583\item[MExtractTimeAndChargeSpline]: with the following parameters:
584\resume{enumerate}
585\item SetChargeType(MExtractTimeAndChargeSpline::kAmplitude); \\
586SetRange(0,10,4,11);
587\suspend{enumerate}
588SetChargeType(MExtractTimeAndChargeSpline::kIntegral); \\
589SetRange(0,18,2,14); \\
590and:
591\resume{enumerate}
592\item SetRiseTime(0.5); SetFallTime(0.5);
593\item SetRiseTime(0.5); SetFallTime(1.5);
594\item SetRiseTime(1.0); SetFallTime(3.0);
595\item SetRiseTime(1.5); SetFallTime(4.5);
596\suspend{enumerate}
597\item[MExtractTimeAndChargeDigitalFilter]: with the following parameters:
598\resume{enumerate}
599\item SetWeightsFile(``cosmic\_weights6.dat'');
600\item SetWeightsFile(``cosmic\_weights4.dat'');
601\item SetWeightsFile(``cosmic\_weights\_logain6.dat'');
602\item SetWeightsFile(``cosmic\_weights\_logain4.dat'');
603\item SetWeightsFile(``calibration\_weights\_UV6.dat'');
604\suspend{enumerate}
605\item[``Real Fit'']: (not yet implemented, one try)
606\resume{enumerate}
607\item Real Fit
608\end{enumerate}
609\end{description}
610
611Note that the extractors \#30, \#31 are used only to test the stability of the extraction against
612changes in the pulse-shape.
613
614References: \cite{OF77,OF94}.
615
616
617%%% Local Variables:
618%%% mode: latex
619%%% TeX-master: "MAGIC_signal_reco"
620%%% TeX-master: "MAGIC_signal_reco"
621%%% TeX-master: "MAGIC_signal_reco"
622%%% End:
Note: See TracBrowser for help on using the repository browser.