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

Last change on this file since 6562 was 6556, checked in by gaug, 20 years ago
*** empty log message ***
File size: 48.0 KB
Line 
1\section{Signal Reconstruction Algorithms \label{sec:algorithms}}
2
3\subsection{Implementation of Signal Extractors in MARS}
4
5All signal extractor classes are stored in the MARS-directory {\textit{\bf msignal/}}.
6There, the base classes {\textit{\bf MExtractor}}, {\textit{\bf MExtractTime}}, {\textit{\bf MExtractTimeAndCharge}} and
7all individual extractors can be found. Figure~\ref{fig:extractorclasses} gives a sketch of the
8inheritances of each class and what each class calculates.
9
10\begin{figure}[htp]
11\includegraphics[width=0.99\linewidth]{ExtractorClasses.eps}
12\caption{Sketch of the inheritances of three exemplary MARS signal extractor classes:
13MExtractFixedWindow, MExtractTimeFastSpline and MExtractTimeAndChargeDigitalFilter}
14\label{fig:extractorclasses}
15\end{figure}
16
17The following base classes for the extractor tasks are used:
18\begin{description}
19\item[MExtractor:\xspace] This class provides the basic data members equal for all extractors which are:
20 \begin{enumerate}
21 \item Global extraction ranges, parameterized by the variables
22 {\textit{\bf fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast}} and the function {\textit{\bf SetRange()}}.
23 The ranges always {\textit{\bf include}} the edge slices.
24 \item An internal variable {\textit{\bf fHiLoLast}} regulating the overlap of the desired high-gain
25 extraction range into the low-gain array.
26 \item The maximum possible FADC value, before the slice is declared as saturated, parameterized
27 by the variable {\textit{\bf fSaturationLimit}} (default:\,254).
28 \item The typical delay between high-gain and low-gain slices, expressed in FADC slices and parameterized
29 by the variable {\textit{\bf fOffsetLoGain}} (default:\,1.51)
30 \item Pointers to the used storage containers {\textit{\bf MRawEvtData, MRawRunHeader, MPedestalCam}}
31 and~{\textit{\bf MExtractedSignalCam}}, parameterized by the variables
32 {\textit{\bf fRawEvt, fRunHeader, fPedestals}} and~{\textit{\bf fSignals}}.
33 \item Names of the used storage containers to be searched for in the parameter list, parameterized
34 by the variables {\textit{\bf fNamePedestalCam}} and~{\textit{\bf fNameSignalCam}} (default: ``MPedestalCam''
35 and~''MExtractedSignalCam'').
36 \item The equivalent number of FADC samples, used for the calculation of the pedestal RMS and then the
37 number of photo-electrons with the F-Factor method (see eq.~\ref{eq:rmssubtraction} and
38 section~\ref{sec:photo-electrons}). This number is parameterized by the variables
39 {\textit{\bf fNumHiGainSamples}} and~{\textit{\bf fNumLoGainSamples}}.
40 \end{enumerate}
41
42 {\textit {\bf MExtractor}} is able to loop over all events, if the {\textit{\bf Process()}}-function is not overwritten.
43 It uses the following (virtual) functions, to be overwritten by the derived extractor class:
44
45 \begin{enumerate}
46 \item void {\textit {\bf FindSignalHiGain}}(Byte\_t* firstused, Byte\_t* logain, Float\_t\& sum, Byte\_t\& sat) const
47 \item void {\textit {\bf FindSignalLoGain}}(Byte\_t* firstused, Float\_t\& sum, Byte\_t\& sat) const
48 \end{enumerate}
49
50 where the pointers ``firstused'' point to the first used FADC slice declared by the extraction ranges,
51 the pointer ``logain'' points to the beginning of the ``low-gain'' FADC slices array (to be used for
52 pulses reaching into the low-gain array) and the variables ``sum'' and ``sat'' get filled with the
53 extracted signal and the number of saturating FADC slices, respectively.
54 \par
55 The pedestals get subtracted automatically {\textit {\bf after}} execution of these two functions.
56
57\item[MExtractTime:\xspace] This class provides - additionally to those already declared in {\textit{\bf MExtractor}} -
58 the basic data members equal for all time extractors which are:
59 \begin{enumerate}
60 \item Pointer to the used storage container {\textit{\bf MArrivalTimeCam}}
61 parameterized by the variables
62 {\textit{\bf fArrTime}}.
63 \item The name of the used ``MArrivalTimeCam''-container to be searched for in the parameter list,
64 parameterized by the variables {\textit{\bf fNameTimeCam}} (default: ``MArrivalTimeCam'' ).
65 \end{enumerate}
66
67 {\textit {\bf MExtractTime}} is able to loop over all events, if the {\textit{\bf Process()}}-function is not
68 overwritten.
69 It uses the following (virtual) functions, to be overwritten by the derived extractor class:
70
71 \begin{enumerate}
72 \item void {\textit {\bf FindTimeHiGain}}(Byte\_t* firstused, Float\_t\& time, Float\_t\& dtime, Byte\_t\& sat, const MPedestlPix \&ped) const
73 \item void {\textit {\bf FindTimeLoGain}}(Byte\_t* firstused, Float\_t\& time, Float\_t\& dtime, Byte\_t\& sat, const MPedestalPix \&ped) const
74 \end{enumerate}
75
76 where the pointers ``firstused'' point to the first used FADC slice declared by the extraction ranges,
77 and the variables ``time'', ``dtime'' and ``sat'' get filled with the
78 extracted arrival time, its error and the number of saturating FADC slices, respectively.
79 \par
80 The pedestals can be used for the arrival time extraction via the reference ``ped''.
81
82\item[MExtractTimeAndCharge:\xspace] This class provides - additionally to those already declared in
83 {\textit{\bf MExtractor}} and {\textit{\bf MExtractTime}} -
84 the basic data members equal for all time and charge extractors which are:
85 \begin{enumerate}
86 \item The actual extraction window sizes, parameterized by the variables
87 {\textit{\bf fWindowSizeHiGain}} and {\textit{\bf fWindowSizeLoGain}}.
88 \item The shift of the low-gain extraction range start w.r.t. to the found high-gain arrival
89 time, parameterized by the variable {\textit{\bf fLoGainStartShift}} (default: -2.8)
90 \end{enumerate}
91
92 {\textit {\bf MExtractTimeAndCharge}} is able to loop over all events, if the {\textit{\bf Process()}}-function is not
93 overwritten.
94 It uses the following (virtual) functions, to be overwritten by the derived extractor class:
95
96 \begin{enumerate}
97 \item void {\textit {\bf FindTimeAndChargeHiGain}}(Byte\_t* firstused, Byte\_t* logain, Float\_t\& sum, Float\_t\& dsum,
98 Float\_t\& time, Float\_t\& dtime, Byte\_t\& sat,
99 const MPedestlPix \&ped, const Bool\_t abflag) const
100 \item void {\textit {\bf FindTimeAndChargeLoGain}}(Byte\_t* firstused, Float\_t\& sum, Float\_t\& dsum,
101 Float\_t\& time, Float\_t\& dtime, Byte\_t\& sat,
102 const MPedestalPix \&ped, const Bool\_t abflag) const
103 \end{enumerate}
104
105 where the pointers ``firstused'' point to the first used FADC slice declared by the extraction ranges,
106 the pointer ``logain'' point to the beginning of the low-gain FADC slices array (to be used for
107 pulses reaching into the ``low-gain'' array),
108 the variables ``sum'', ``dsum'' get filled with the
109 extracted signal and its error. The variables ``time'', ``dtime'' and ``sat'' get filled with the
110 extracted arrival time, its error and the number of saturating FADC slices, respectively.
111 \par
112 The pedestals can be used for the extraction via the reference ``ped'', also the AB-flag is given
113 for AB-clock noise correction.
114\end{description}
115
116
117\subsection{Pure Signal Extractors}
118
119The pure signal extractors have in common that they reconstruct only the
120charge, but not the arrival time. All treated extractors here derive from the MARS-base
121class {\textit{\bf MExtractor}} which provides the following facilities:
122
123\begin{itemize}
124\item The global extraction limits can be set from outside
125\item FADC saturation is kept track of
126\end{itemize}
127
128The following adjustable parameters have to be set from outside:
129\begin{description}
130\item[Global extraction limits:\xspace] Limits in between which the extractor is allowed
131to extract the signal, for high gain and low gain, respectively.
132\end{description}
133
134As the pulses jitter by about one FADC slice,
135not every pulse lies exactly within the optimal limits, especially if one takes small
136extraction windows.
137Moreover, the readout position with respect to the trigger position has changed a couple
138of times during last year, therefore a very careful adjustment of the extraction limits
139is mandatory before using these extractors.
140
141\subsubsection{Fixed Window}
142
143This extractor is implemented in the MARS-class {\textit{\bf MExtractFixedWindow}}.
144It simply adds the FADC slice contents in the assigned ranges.
145As it does not correct for the clock-noise, only an even number of samples is allowed.
146Figure~\ref{fig:fixedwindowsketch} gives a sketch of the used extraction ranges for this
147paper and two typical calibration pulses.
148
149\begin{figure}[htp]
150 \includegraphics[width=0.49\linewidth]{MExtractFixedWindow_5Led_UV.eps}
151 \includegraphics[width=0.49\linewidth]{MExtractFixedWindow_23Led_Blue.eps}
152\caption[Sketch extraction ranges MExtractFixedWindow]{%
153Sketch of the extraction ranges for the extractor {\textit{\bf MExtractFixedWindow}}
154for two typical calibration pulses (pedestals have been subtracted) and a typical inner pixel.
155The pulse would be shifted half a slice to the right for an outer pixel. }
156\label{fig:fixedwindowsketch}
157\end{figure}
158
159
160\subsubsection{Fixed Window with Integrated Cubic Spline}
161
162This extractor is implemented in the MARS-class {\textit{\bf MExtractFixedWindowSpline}}. It
163uses a cubic spline algorithm, adapted from \cite{NUMREC} and integrates the
164spline interpolated FADC slice values from a fixed extraction range. The edge slices are counted as half.
165As it does not correct for the clock-noise, only an odd number of samples is allowed.
166Figure~\ref{fig:fixedwindowsplinesketch} gives a sketch of the used extraction ranges for this
167paper and two typical calibration pulses.
168
169\begin{figure}[htp]
170 \includegraphics[width=0.49\linewidth]{MExtractFixedWindowSpline_5Led_UV.eps}
171 \includegraphics[width=0.49\linewidth]{MExtractFixedWindowSpline_23Led_Blue.eps}
172\caption[Sketch extraction ranges MExtractFixedWindowSpline]{%
173Sketch of the extraction ranges for the extractor {\textit{\bf MExtractFixedWindowSpline}}
174for two typical calibration pulses (pedestals have been subtracted) and a typical inner pixel.
175The pulse would be shifted half a slice to the right for an outer pixel. }
176\label{fig:fixedwindowsplinesketch}
177\end{figure}
178
179\subsubsection{Fixed Window with Global Peak Search}
180
181This extractor is implemented in the MARS-class {\textit{\bf MExtractFixedWindowPeakSearch}}.
182The basic idea of this extractor is to correct for coherent movements in arrival time for all pixels,
183as e.g. caused by the trigger jitter.
184In a first loop, it fixes a reference point defined as the highest sum of
185consecutive non-saturating FADC slices in a (smaller) peak-search window.
186\par
187In a second loop over the pixels,
188it adds the FADC contents starting from a pre-defined offset from the obtained peak-search window
189over an extraction window of a pre-defined window size.
190It loops twice over all pixels in every event, because it has to find the reference point, first.
191As it does not correct for the clock-noise, only an even number of samples is allowed.
192For a high intensity calibration run causing high-gain saturation in the whole camera, this
193extractor apparently fails since only dead pixels are taken into account in the peak search
194 which cannot produce a saturated signal.
195For this special case, we modified {\textit{\bf MExtractFixedWindowPeakSearch}}
196such to define the peak search window as the one starting from the mean position of the first saturating slice.
197\par
198The following adjustable parameters have to be set from outside:
199\begin{description}
200\item[Peak Search Window:\xspace] Defines the ``sliding window'' size within 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{\bf 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 pixel. }
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{\bf MExtractTimeAndCharge}} which itself derives from MExtractor and MExtractTime.
227It provides the following facilities:
228
229\begin{itemize}
230\item Only one loop over all pixels is performed.
231\item The individual FADC slice values get the clock-noise-corrected pedestals immediately subtracted.
232\item The low-gain extraction range is adapted dynamically, based on the computed arrival time
233 from the high-gain samples.
234\item Extracted times from the low-gain samples get corrected for the intrinsic time delay of the low-gain
235 pulse.
236\item The global extraction limits can be set from outside.
237\item FADC saturation is kept track of.
238\end{itemize}
239
240The following adjustable parameters have to be set from outside, additionally to those declared in the
241base classes MExtractor and MExtractTime:
242
243\begin{description}
244\item[Global extraction limits:\xspace] Limits in between which the extractor is allowed
245to search. They are fixed by the extractor for the high-gain, but re-adjusted for
246every event in the low-gain, depending on the arrival time found in the low-gain.
247However, the dynamically adjusted window is not allowed to pass beyond the global
248limits.
249\item[Low-gain start shift:\xspace] Global shift between the computed high-gain arrival
250time and the start of the low-gain extraction limit (corrected for the intrinsic time offset).
251This variable tells where the extractor is allowed to start searching for the low-gain signal
252if the high-gain arrival time is known. It avoids that the extractor gets confused by possible high-gain
253signals leaking into the ``low-gain'' region (default: -2.8).
254\end{description}
255
256\subsubsection{Sliding Window with Amplitude-Weighted Time}
257
258This extractor is implemented in the MARS-class {\textit{\bf MExtractTimeAndChargeSlidingWindow}}.
259It extracts the signal from a sliding window of an adjustable size, for high-gain and low-gain
260individually (default: 6 and 6). The signal is the one which maximizes the summed
261(clock-noise and pedestal-corrected) consecutive FADC slice contents.
262\par
263The amplitude-weighted arrival time is calculated from the window with
264the highest FADC slice contents integral using the following formula:
265
266\begin{equation}
267 t = \frac{\sum_{i=i_0}^{i_0+ws} s_i \cdot i}{\sum_{i=i_0}^{i_0+ws} i}
268\end{equation}
269where $i$ denotes the FADC slice index, starting from $i_0$
270window and running over a window of size $ws$. $s_i$ the clock-noise and
271pedestal-corrected FADC slice contents at slice position $i$.
272\par
273The following adjustable parameters have to be set from outside:
274\begin{description}
275\item[Window sizes:\xspace] Independently for high-gain and low-gain (default: 6,6)
276\end{description}
277
278\begin{figure}[htp]
279 \includegraphics[width=0.49\linewidth]{MExtractTimeAndChargeSlidingWindow_5Led_UV.eps}
280 \includegraphics[width=0.49\linewidth]{MExtractTimeAndChargeSlidingWindow_23Led_Blue.eps}
281\caption[Sketch calculated arrival times MExtractTimeAndChargeSlidingWindow]{%
282Sketch of the calculated arrival times for the extractor {\textit{\bf MExtractTimeAndChargeSlidingWindow}}
283for two typical calibration pulses (pedestals have been subtracted) and a typical inner pixel.
284The extraction window sizes modify the position of the (amplitude-weighted) mean FADC-slices slightly.
285The pulse would be shifted half a slice to the right for an outer pixel. }
286\label{fig:slidingwindowsketch}
287\end{figure}
288
289\subsubsection{Cubic Spline with Sliding Window or Amplitude Extraction}
290
291This extractor is implemented in the MARS-class {\textit{\bf MExtractTimeAndChargeSpline}}.
292It interpolates the FADC contents using a cubic spline algorithm, adapted from \cite{NUMREC}.
293In a second step, it searches for the position of the spline maximum. From then on, two
294possibilities are offered:
295
296\begin{description}
297\item[Extraction Type Amplitude:\xspace] The amplitude of the spline maximum is taken as charge signal
298and the (precise) position of the maximum is returned as arrival time. This type is faster, since it
299performs not spline integration.
300\item[Extraction Type Integral:\xspace] The integrated spline between maximum position minus
301rise time (default: 1.5 slices) and maximum position plus fall time (default: 4.5 slices)
302is taken as charge signal and the position of the half maximum left from the position of the maximum
303is returned as arrival time (default).
304The low-gain signal stretches the rise and fall time by a stretch factor (default: 1.5). This type
305is slower, but yields more precise results (see section~\ref{sec:performance}) .
306The charge integration resolution is set to 0.1 FADC slices.
307\end{description}
308
309The following adjustable parameters have to be set from outside:
310
311\begin{description}
312\item[Charge Extraction Type:\xspace] The amplitude of the spline maximum can be chosen while the position
313of the maximum is returned as arrival time. This type is fast. \\
314Otherwise, the integrated spline between maximum position minus rise time (default: 1.5 slices)
315and maximum position plus fall time (default: 4.5 slices) is taken as signal and the position of the
316half maximum is returned as arrival time (default).
317The low-gain signal stretches the rise and fall time by a stretch factor (default: 1.5). This type
318is slower, but more precise. The charge integration resolution is 0.1 FADC slices.
319\item[Rise Time and Fall Time:\xspace] Can be adjusted for the integration charge extraction type.
320\item[Resolution:\xspace] Defined as the maximum allowed difference between the calculated half maximum value and
321the computed spline value at the arrival time position. Can be adjusted for the half-maximum time extraction
322type.
323\item[Low Gain Stretch:\xspace] Can be adjusted to account for the larger rise and fall times in the
324low-gain as compared to the high gain pulses (default: 1.5)
325\end{description}
326
327\begin{figure}[htp]
328 \includegraphics[width=0.49\linewidth]{MExtractTimeAndChargeSpline_5Led_UV.eps}
329 \includegraphics[width=0.49\linewidth]{MExtractTimeAndChargeSpline_23Led_Blue.eps}
330\caption[Sketch calculated arrival times MExtractTimeAndChargeSpline]{%
331Sketch of the calculated arrival times for the extractor {\textit{\bf MExtractTimeAndChargeSpline}}
332for two typical calibration pulses (pedestals have been subtracted) and a typical inner pixel.
333The extraction window sizes modify the position of the (amplitude-weighted) mean FADC-slices slightly.
334The pulse would be shifted half a slice to the right for an outer pixel. }
335\label{fig:splinesketch}
336\end{figure}
337
338\subsubsection{Digital Filter}
339
340This extractor is implemented in the MARS-class {\textit{\bf MExtractTimeAndChargeDigitalFilter}}.
341
342
343The 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
344from discrete measurements of the signal. Thereby, the noise contribution to the amplitude reconstruction is minimized.
345
346For the digital filtering method, three assumptions have to be made:
347
348\begin{itemize}
349\item{The normalized signal shape has to be independent of the signal amplitude.}
350\item{The noise properties have to be independent of the signal amplitude.}
351\item{The noise auto-correlation matrix does not change its form significantly with time and operation conditions.}
352\end{itemize}
353
354
355The pulse shape is mainly determined by the artificial pulse stretching by about 6 ns on the receiver board.
356Thus the first assumption holds. Also the second assumption is fulfilled: Signal and noise are independent
357and the measured pulse is the linear superposition of the signal and noise. The validity of the third
358assumption is discussed below, especially for different night sky background conditions.
359
360Let $g(t)$ be the normalized signal shape, $E$ the signal amplitude and $\tau$ the time shift
361of the physical signal from the predicted signal shape. Then the time dependence of the signal, $y(t)$, is given by:
362
363\begin{equation}
364y(t)=E \cdot g(t-\tau) + b(t) \ ,
365\end{equation}
366
367where $b(t)$ is the time-dependent noise contribution. For small time shifts $\tau$ (usually smaller than
368one FADC slice width),
369the time dependence can be linearized by the use of a Taylor expansion:
370
371\begin{equation} \label{shape_taylor_approx}
372y(t)=E \cdot g(t) - E\tau \cdot \dot{g}(t) + b(t) \ ,
373\end{equation}
374
375where $\dot{g}(t)$ is the time derivative of the signal shape. Discrete
376measurements $y_i$ of the signal at times $t_i \ (i=1,...,n)$ have the form:
377
378\begin{equation}
379y_i=E \cdot g_i- E\tau \cdot \dot{g}_i +b_i \ .
380\end{equation}
381
382The correlation of the noise contributions at times $t_i$ and $t_j$ can be expressed in the
383noise autocorrelation matrix $\boldsymbol{B}$:
384
385\begin{equation}
386B_{ij} = \langle b_i b_j \rangle - \langle b_i \rangle \langle b_j
387\rangle \ .
388\label{eq:autocorr}
389\end{equation}
390%\equiv \langle b_i b_j \rangle with $\langle b_i \rangle = 0$.
391
392The signal amplitude $E$, and the product of amplitude and time shift $E \tau$, can be estimated from the given set of
393measurements $\boldsymbol{y} = (y_1, ... ,y_n)$ by minimizing the excess noise contribution with respect to the known noise
394auto-correlation:
395
396\begin{eqnarray}
397\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) \\
398&=& (\boldsymbol{y} - E
399\boldsymbol{g} - E\tau \dot{\boldsymbol{g}})^T \boldsymbol{B}^{-1} (\boldsymbol{y} - E \boldsymbol{g}- E\tau \dot{\boldsymbol{g}}) \ ,
400\end{eqnarray}
401
402where the last expression is matricial.
403$\chi^2$ is a continuous function of $\tau$ and will have to be discretized itself for a
404desired resolution.
405$\chi^2$ is in principle independent of the noise level if alway the appropriate noise autocorrelation matrix is used. In our case however, we decided to use one matrix $\boldsymbol{B}$ for all levels of night-sky background. Changes in the noise level lead only to a multiplicative factor for all matrix elements and thus do not affect the position of the minimum of $\chi^2$.
406The minimum of $\chi^2$ is obtained for:
407
408\begin{equation}
409\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 \ .
410\end{equation}
411
412
413Taking into account that $\boldsymbol{B}$ is a symmetric matrix, this leads to the following
414two equations for the estimated amplitude $\overline{E}$ and the estimation for the product of amplitude
415and time offset $\overline{E\tau}$:
416
417\begin{eqnarray}
4180&=&-\boldsymbol{g}^T\boldsymbol{B}^{-1}\boldsymbol{y}
419 +\boldsymbol{g}^T\boldsymbol{B}^{-1}\boldsymbol{g}\overline{E}
420 +\boldsymbol{g}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}\overline{E\tau}
421\\
4220&=&-\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{y}
423 +\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\boldsymbol{g}\overline{E}
424 +\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}\overline{E\tau} \ .
425\end{eqnarray}
426
427Solving these equations one gets the following solutions:
428
429\begin{equation}
430\overline{E}(\tau) = \boldsymbol{w}_{\text{amp}}^T (\tau)\boldsymbol{y} \quad \mathrm{with} \quad
431 \boldsymbol{w}_{\text{amp}}
432 = \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}}}
433 {(\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 } \ ,
434\end{equation}
435
436\begin{equation}
437\overline{E\tau}(\tau)= \boldsymbol{w}_{\text{time}}^T(\tau) \boldsymbol{y} \quad
438 \mathrm{with} \quad \boldsymbol{w}_{\text{time}}
439 = \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}}}
440 {(\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 } \ .
441\end{equation}
442
443Thus $\overline{E}$ and $\overline{E\tau}$ are given by a weighted sum of the discrete measurements $y_i$
444with the digital filtering weights for the amplitude, $w_{\text{amp}}(\tau)$, and time shift, $w_{\text{time}}(\tau)$. The time dependency gets discretized once again leading to a set of weights samples which themselves depend on the
445discretized time $\tau$.
446\par
447Note the remaining time dependency of the two weights samples. This follows from the dependency of $\boldsymbol{g}$ and
448$\dot{\boldsymbol{g}}$ on the relative position of the signal pulse with respect to FADC slices positions.
449\par
450Because of the truncation of the Taylor series in equation (\ref{shape_taylor_approx}) the above results are
451only valid for vanishing time offsets $\tau$. For non-zero time offsets, one has to iterate the problem using
452the time shifted signal shape $g(t-\tau)$.
453
454The covariance matrix $\boldsymbol{V}$ of $\overline{E}$ and $\overline{E\tau}$ is given by:
455
456\begin{equation}
457\left(\boldsymbol{V}^{-1}\right)_{ij}
458 =\frac{1}{2}\left(\frac{\partial^2 \chi^2(E, E\tau)}{\partial \alpha_i \partial \alpha_j} \right) \quad
459 \text{with} \quad \alpha_i,\alpha_j \in \{E, E\tau\} \ .
460\end{equation}
461
462The expected contribution of the noise to the estimated amplitude, $\sigma_E$, is:
463
464\begin{equation}
465\sigma_E^2=\boldsymbol{V}_{E,E}
466 =\frac{\dot{\boldsymbol{g}}^T\boldsymbol{B}^{-1}\dot{\boldsymbol{g}}}
467 {(\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} \ .
468\label{eq:of_noise}
469\end{equation}
470
471The expected contribution of the noise to the estimated timing, $\sigma_{\tau}$, is:
472
473\begin{equation}
474E^2 \cdot \sigma_{\tau}^2=\boldsymbol{V}_{E\tau,E\tau}
475 =\frac{{\boldsymbol{g}}^T\boldsymbol{B}^{-1}{\boldsymbol{g}}}
476 {(\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} \ .
477\label{eq:of_noise_time}
478\end{equation}
479
480
481In the MAGIC MC simulations~\cite{MC-Camera}, an night-sky background rate of 0.13 photoelectrons per ns,
482an FADC gain of 7.8 FADC counts per photo-electron and an intrinsic FADC noise of 1.3 FADC counts
483per FADC slice is implemented.
484These numbers simulate the night sky background conditions for an extragalactic source and result
485in a noise contribution of about 4 FADC counts per single FADC slice:
486$\sqrt{B_{ii}} \approx 4$~FADC counts.
487Using the digital filter with weights parameterized over 6 FADC slices ($i=0...5$) the errors of the
488reconstructed signal and time amount to:
489
490\begin{equation}
491\sigma_E \approx 8.3 \ \mathrm{FADC\ counts} \ (\approx 1.1\,\mathrm{phe}) \qquad
492\sigma_{\tau} \approx \frac{6.5\ \Delta T_{\mathrm{FADC}}}{(E\ /\ \mathrm{FADC\ counts})} \ (\approx \frac{2.8\,\mathrm{ns}}{E\,/\ \mathrm{N_{phe}}})\ ,
493\label{eq:of_noise_calc}
494\end{equation}
495
496where $\Delta T_{\mathrm{FADC}} = 3.33$ ns is the sampling interval of the MAGIC FADCs.
497The error in the reconstructed signal corresponds to about one photo electron.
498For signals of the size of two photo electrons, the timing error is about 1.4\,ns.
499\par
500
501An IACT has typically two types of background noise:
502On the one hand, there is the constantly present electronics noise,
503while on the other hand, the light of the night sky introduces a sizeable background
504to the measurement of the Cherenkov photons from air showers.
505
506The electronics noise is largely white, i.e. uncorrelated in time.
507The noise from the night sky background photons is the superposition of the
508detector response to single photo electrons following a Poisson distribution in time.
509Figure \ref{fig:noise_autocorr_allpixels} shows the noise
510autocorrelation matrix for an open camera. The large noise autocorrelation of the current FADC
511system is due to the pulse shaping (with the shaping constant equivalent to about two FADC slices).
512
513In general, the amplitude and time weights, $\boldsymbol{w}_{\text{amp}}$ and $\boldsymbol{w}_{\text{time}}$,
514depend on the pulse shape, the derivative of the pulse shape and the noise autocorrelation.
515In the high gain samples, the correlated night sky background noise dominates over
516the white electronics noise. Thus, different noise levels cause the elements of the noise autocorrelation
517matrix to change by a same factor, which cancels out in the weights calculation. Figure~\ref{fig:noise_autocorr_allpixels}
518shows the noise autocorrelation matrix for two different levels of night sky background (top) and the ratio between the
519corresponding elements of both (bottom). The central regions of $\pm$3 FADC slices around the diagonal (which is used to
520calculate the weights) deviate by less than 10\%.
521Thus, the weights are to a reasonable approximation independent of the night sky background noise level in the high gain.
522\par
523In the low gain samples the correlated noise from the LONS is in the same order of magnitude as the white electronics and digitization noise.
524Moreover, the noise autocorrelation for the low gain samples cannot be determined directly from the data. The low gain is only switched on
525if the pulse exceeds a preset threshold. There are no pedestals in the low gain available. Thus the noise auto-correlation determined from
526MC simulations for an extragalactic background is also used to compute the weights for cosmics and calibration pulses.
527
528%\begin{figure}[h!]
529%\begin{center}
530%\includegraphics[totalheight=7cm]{noise_autocorr_AB_36038_TDAS.eps}
531%\end{center}
532%\caption[Noise autocorrelation one pixel.]{Noise autocorrelation
533%matrix $\boldsymbol{B}$ for open camera including the noise due to night sky background fluctuations
534%for one single pixel (obtained from 1000 events).}
535%\label{fig:noise_autocorr_1pix}
536%\end{figure}
537
538\begin{figure}[htp]
539\begin{center}
540\includegraphics[totalheight=7cm]{noise_38995_smallNSB_all396.eps}
541\includegraphics[totalheight=7cm]{noise_39258_largeNSB_all396.eps}
542\includegraphics[totalheight=7cm]{noise_small_over_large.eps}
543\end{center}
544\caption[Noise autocorrelation average all pixels.]{Noise autocorrelation
545matrix $\boldsymbol{B}$ for open camera and averaged over all pixels. The top figure shows $\boldsymbol{B}$
546obtained with camera pointing off the galactic plane (and low night sky background fluctuations).
547The central figure shows $\boldsymbol{B}$ with the camera pointing into the galactic plane
548(high night sky background) and the
549bottom plot shows the ratio between both. One can see that the entries of $\boldsymbol{B}$ do not
550simply scale with the amount of night sky background.}
551\label{fig:noise_autocorr_allpixels}
552\end{figure}
553
554Using the average reconstructed pulpo pulse shapes, as shown in figure \ref{fig:pulse_shapes}, and the reconstructed noise autocorrelation matrices from a pedestal runs with random triggers, the digital filter weights are computed. As the pulse shapes in the high and low gain and for cosmics, calibration and pulpo events are somewhat different, dedicated digital filter weights are computed for these event classes. Also filter weights optimized for MC simulations are calculated. High/low gain filter weights are computed for the following event classes:
555
556\begin{enumerate}
557\item{cosmics weights: for cosmics events}
558\item{calibration weights UV: for UV calibration pulses}
559\item{calibration weights blue: for blue and green calibration pulses}
560\item{MC weights: for MC simulations}
561\item{pulpo weights: for pulpo runs.}
562\end{enumerate}
563
564
565\begin{table}[h]{\normalsize\center
566\begin{tabular}{lllll}
567 \hline
568 & high gain shape & high gain noise & low gain shape & low gain noise
569\\ cosmics & 25945 (pulpo) & 38995 (extragal.) & 44461 (pulpo) & MC low
570\\ UV & 36040 (UV) & 38995 (extragal.) & 44461 (pulpo) & MC low
571\\ blue & 31762 (blue) & 38995 (extragal.) & 31742 (blue) & MC low
572\\ MC & MC & MC high & MC & MC low
573\\ pulpo & 25945 (pulpo) & 38993 (no LONS) & 44461 (pulpo) & MC low
574\\
575\hline
576\end{tabular}
577\caption{The used runs for the pulse shapes and noise auto-correlations for the digital filter weights of the different event types.}\label{table:weight_files}}
578\end{table}
579
580
581
582
583 Figures \ref{fig:w_time_MC_input_TDAS} and \ref{fig:w_amp_MC_input_TDAS} show the amplitude and timing weights for the MC pulse shape. The first weight $w_{\mathrm{amp/time}}(t_0)$ is plotted as a function of the relative time $t_{\text{rel}}$ the trigger and the
584FADC 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
585of $0.1\,T_{\text{ADC}}$ has been chosen.
586
587
588\begin{figure}[h!]
589\begin{center}
590\includegraphics[totalheight=7cm]{w_time_MC_input_TDAS.eps}
591\end{center}
592\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
593used 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
594FADC 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
595of $0.1\,T_{\text{ADC}}$ has been chosen.} \label{fig:w_time_MC_input_TDAS}
596\end{figure}
597
598\begin{figure}[h!]
599\begin{center}
600\includegraphics[totalheight=7cm]{w_amp_MC_input_TDAS.eps}
601\end{center}
602\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
603pulse 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}}$
604the 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.
605A binning resolution of $0.1\, T_{\text{ADC}}$ has been chosen.} \label{fig:w_amp_MC_input_TDAS}
606\end{figure}
607
608In the current implementation a two step procedure is applied to reconstruct the signal. The weight functions $w_{\mathrm{amp}}(t)$
609and $w_{\mathrm{time}}(t)$ are computed numerically with a resolution of $1/10$ of an FADC slice.
610In the first step the quantities $e_{i_0}$ and $e\tau_{i_0}$ are computed using a window of $n$ slices:
611
612\begin{equation}
613e_{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})
614\end{equation}
615
616for all possible signal start slices $i_0$. Let $i_0^*$ be the signal start slice with the largest $e_{i_0}$.
617Then in a second step the timing offset $\tau$ is calculated:
618
619\begin{equation}
620\tau=\frac{(e\tau)_{i_0^*}}{e_{i_0^*}}
621\label{eq:offsettau}
622\end{equation}
623
624and the weights iterated:
625
626\begin{equation}
627E=\sum_{i=i_0^*}^{i_0^*+n-1} w_{\mathrm{amp}}(t_i - \tau)y(t_{i+i_0^*}) \qquad
628 E \theta=\sum_{i=i_0^*}^{i_0^*+n-1} w_{\mathrm{time}}(t_i - \tau)y(t_{i+i_0^*}) \ .
629\end{equation}
630
631The reconstructed signal is then taken to be $E$ and the reconstructed arrival time $t_{\text{arrival}}$ is
632
633\begin{equation}
634t_{\text{arrival}} = i_0^* + \tau + \theta \ .
635\end{equation}
636
637
638
639Figure \ref{fig:amp_sliding} shows the result of the applied amplitude and time weights to the recorded FADC time slices of one simulated MC pulse. The left plot shows the result of the applied amplitude weights
640$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
641the right plot shows the result of the applied timing weights
642$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}})$ as a function of the time shift $t_0$.
643
644
645% This does not apply for MAGIC as the LONs are giving always a correlated noise (in addition to the artificial shaping)
646
647%In the case of an uncorrelated noise with zero mean the noise autocorrelation matrix is:
648
649%\begin{equation}
650%\boldsymbol{B}_{ij}= \langle b_i b_j \rangle \delta_{ij} = \sigma^2(b_i) \ ,
651%\end{equation}
652
653%where $\sigma(b_i)$ is the standard deviation of the noise of the discrete measurements. Equation (\ref{of_noise}) than becomes:
654
655
656%\begin{equation}
657%\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}} \ .
658%\end{equation}
659
660
661\begin{figure}[h!]
662\begin{center}
663\includegraphics[totalheight=7cm]{amp_sliding.eps}
664\includegraphics[totalheight=7cm]{time_sliding.eps}
665\end{center}
666\caption[Digital filter weights applied.]{Digital filter weights applied to the recorded FADC time slices of
667one simulated MC pulse. The left plot shows the result of the applied amplitude weights
668$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
669the right plot shows the result of the applied timing weights
670$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}})$ as a function of the time shift $t_0$.}
671\label{fig:amp_sliding}
672\end{figure}
673
674Figure \ref{fig:shape_fit_TDAS} shows the simulated signal pulse shape of a typical MC event together with the simulated FADC slices of the signal pulse plus noise. The digital filter has been applied to reconstruct the signal size and timing. Using this information together with the average normalized MC pulse shape the simulated signal pulse shape is reconstructed and shown as well.
675
676
677
678
679
680\begin{figure}[h!]
681\begin{center}
682\includegraphics[totalheight=7cm]{shape_fit_TDAS.eps}
683\end{center}
684\caption[Shape fit.]{Simulated signal pulse shape and FADC slices for a typical MC event. The FADC measurements are affected by noise. Using the digital filter and the average MC pulse shape the signal shape is reconstructed. The event shown is the same as in figure \ref{fig:amp_sliding}.} \label{fig:shape_fit_TDAS}
685\end{figure}
686%Full fit to the MC pulse shape with the MC input shape and a numerical fit using the digital filter
687
688
689
690The following free adjustable parameters have to be set from outside:
691
692\begin{description}
693\item[Weights File:\xspace] An ascii-file containing the weights, the binning resolution and
694the window size. Currently, the following weight files have been created:
695\begin{itemize}
696\item "cosmics\_weights.dat'' with a window size of 6 FADC slices
697\item "cosmics\_weights4.dat'' with a window size of 4 FADC slices
698\item "calibration\_weights\_blue.dat'' with a window size of 6 FADC slices
699\item "calibration\_weights4\_blue.dat'' with a window size of 4 FADC slices
700\item "calibration\_weights\_UV.dat'' with a window size of 6 FADC slices and in the low-gain the
701calibration weights obtained from blue pulses\footnote{UV-pulses saturating the high-gain are not yet
702available.}.
703\item "calibration\_weights4\_UV.dat'' with a window size of 4 FADC slices and in the low-gain the
704calibration weights obtained from blue pulses\footnote{UV-pulses saturating the high-gain are not yet
705available.}.
706\end{itemize}
707\end{description}
708
709\begin{figure}[htp]
710 \includegraphics[width=0.49\linewidth]{MExtractTimeAndChargeDigitalFilter_5Led_UV.eps}
711 \includegraphics[width=0.49\linewidth]{MExtractTimeAndChargeDigitalFilter_23Led_Blue.eps}
712\caption[Sketch calculated arrival times MExtractTimeAndChargeDigitalFilter]{%
713Sketch of the calculated arrival times for the extractor {\textit{MExtractTimeAndChargeDigitalFilter}}
714for two typical calibration pulses (pedestals have been subtracted) and a typical inner pixel.
715The extraction window sizes modify the position of the (amplitude-weighted) mean FADC-slices slightly.
716The pulse would be shifted half a slice to the right for an outer pixels. }
717\label{fig:dfsketch}
718\end{figure}
719
720\subsubsection{Digital Filter with Global Peak Search}
721
722This extractor is implemented in the MARS-class {\textit{\bf MExtractTimeAndChargeDigitalFilterPeakSearch}}.
723
724The idea of this extractor is to combine {\textit{\bf MExtractFixedWindowPeakSearch}} and
725{\textit{\bf MExtractTimeAndChargeDigitalFilter}} in order to correct for coherent movements in arrival time
726for all pixels and still use the digital filter fit capabilities.
727 \par
728
729In a first loop, it fixes a reference point defined as the highest sum of
730consecutive non-saturating FADC slices in a (smaller) peak-search window.
731\par
732In a second loop over the pixels,
733it uses the digital filter algorithm within a reduced extraction window.
734It loops twice over all pixels in every event, because it has to find the reference point, first.
735
736As in the case of {\textit{\bf MExtractFixedWindowPeakSearch}}, for a high intensity calibration run
737causing high-gain saturation in the whole camera, this
738extractor apparently fails since only dead pixels
739are taken into account in the peak search which cannot produce a saturated signal.
740
741\par
742For this special case, the extractor then defines the peak search window
743as the one starting from the mean position of the first saturating slice.
744\par
745The following adjustable parameters have to be set from outside, additionally to the ones to be
746set in {\textit{\bf MExtractTimeAndChargeDigitalFilter}}:
747\begin{description}
748\item[Peak Search Window:\xspace] Defines the ``sliding window'' size within which the peaking sum is
749searched for (default: 2 slices)
750\item[Offset left from Peak:\xspace] Defines the left offset of the start of the extraction window w.r.t. the
751starting point of the obtained peak search window (default: 3 slices)
752\item[Offset right from Peak:\xspace] Defines the right offset of the of the extraction window w.r.t. the
753starting point of the obtained peak search window (default: 3 slices)
754\item[Limit for high gain failure events:\xspace] Defines the limit of the number of events which failed
755to be in the high-gain window before the run is rejected.
756\item[Limit for low gain failure events:\xspace] Defines the limit of the number of events which failed
757to be in the low-gain window before the run is rejected.
758\end{description}
759
760In principle, the ``offsets'' can be chosen very small, because both showers and calibration pulses spread
761over a very small time interval, typically less than one FADC slice. However, the MAGIC DAQ produces
762artificial jumps of two FADC slices from time to time\footnote{in 5\% of the events per pixel in December 2004},
763so the 3 slices are made in order not to reject these pixels already with the extractor.
764
765\subsubsection{Real Fit to the Expected Pulse Shape }
766
767The digital filter is a sophisticated numerical tool to fit the read-out FADC samples with the expected wave form taking the autocorrelation of the noise into account. In order to cross-check the results a pulse shape fit has been implemented using the root TH1::Fit routine. For each event the FADC samples of each pixel are filled into a histogram and fit by the expected wave form having the time shift and the area of the fit pulse as free parameters. The results are in very good agreement with the results of the digital filter.
768
769Figure \ref{fig:probability_fit} shows the distribution of the fit probability for simulated MC pulses. Both electronics and NSB noise are simulated. The distribution is mainly flat with a slight excess in the very lowest probability bins.
770\par
771
772This extractor is not (yet) implemented as a MARS-class.
773
774
775
776\begin{figure}[h!]
777\begin{center}
778\includegraphics[totalheight=7cm]{probability_fit_0ns.eps}
779\end{center}
780\caption[Fit Probability.]{Probability of the fit with the input signal shape to the simulated FADC samples
781including electronics and NSB noise.} \label{fig:probability_fit}
782\end{figure}
783
784
785
786\subsection{Used Extractors for this Analysis}
787
788We tested in this TDAS the following parameterized extractors:
789
790\begin{description}
791\item[MExtractFixedWindow]: with the following initialization, if {\textit{maxbin}} defines the
792 mean position of the high-gain FADC slice which carries the pulse maximum \footnote{The function
793{\textit{MExtractor::SetRange(higain first, higain last, logain first, logain last)}} sets the extraction
794range with the high gain start bin {\textit{higain first}} to (including) the last bin {\textit{higain last}}.
795Analogue for the low gain extraction range. Note that in MARS, the low-gain FADC samples start with
796the index 0 again, thus {\textit{maxbin+0.5}} means in reality {\textit{maxbin+15+0.5}}. }
797:
798\begin{enumerate}
799\item SetRange({\textit{maxbin}}-1,{\textit{maxbin}}+2,{\textit{maxbin}}+0.5,{\textit{maxbin}}+3.5);
800\item SetRange({\textit{maxbin}}-1,{\textit{maxbin}}+2,{\textit{maxbin}}-0.5,{\textit{maxbin}}+4.5);
801\item SetRange({\textit{maxbin}}-2,{\textit{maxbin}}+3,{\textit{maxbin}}-0.5,{\textit{maxbin}}+4.5);
802\item SetRange({\textit{maxbin}}-2,{\textit{maxbin}}+5,{\textit{maxbin}}-0.5,{\textit{maxbin}}+6.5);
803\item SetRange({\textit{maxbin}}-3,{\textit{maxbin}}+10,{\textit{maxbin}}-1.5,{\textit{maxbin}}+7.5);
804\suspend{enumerate}
805\item[MExtractFixedWindowSpline]: with the following initialization, if {\textit{maxbin}} defines the
806 mean position of the high-gain FADC slice carrying the pulse maximum \footnote{The function
807{\textit{MExtractor::SetRange(higain first, higain last, logain first, logain last)}} sets the extraction
808range with the high gain start bin {\textit{higain first}} to (including) the last bin {\textit{higain last}}.
809Analogue for the low gain extraction range. Note that in MARS, the low-gain FADC samples start with
810the index 0 again, thus {\textit{maxbin+0.5}} means in reality {\textit{maxbin+15+0.5}}.}:
811\resume{enumerate}
812\item SetRange({\textit{maxbin}}-1,{\textit{maxbin}}+3,{\textit{maxbin}}+0.5,{\textit{maxbin}}+4.5);
813\item SetRange({\textit{maxbin}}-1,{\textit{maxbin}}+3,{\textit{maxbin}}-0.5,{\textit{maxbin}}+5.5);
814\item SetRange({\textit{maxbin}}-2,{\textit{maxbin}}+4,{\textit{maxbin}}-0.5,{\textit{maxbin}}+5.5);
815\item SetRange({\textit{maxbin}}-2,{\textit{maxbin}}+6,{\textit{maxbin}}-0.5,{\textit{maxbin}}+7.5);
816\item SetRange({\textit{maxbin}}-3,{\textit{maxbin}}+11,{\textit{maxbin}}-1.5,{\textit{maxbin}}+8.5);
817\suspend{enumerate}
818\item[MExtractFixedWindowPeakSearch]: with the following initialization: \\
819SetRange(0,18,2,14); and:
820\resume{enumerate}
821\item SetWindows(2,2,2); SetOffsetFromWindow(0);
822\item SetWindows(4,4,2); SetOffsetFromWindow(1);
823\item SetWindows(4,6,4); SetOffsetFromWindow(0);
824\item SetWindows(6,6,4); SetOffsetFromWindow(1);
825\item SetWindows(8,8,4); SetOffsetFromWindow(1);
826\item SetWindows(14,10,4); SetOffsetFromWindow(2);
827\suspend{enumerate}
828\item[MExtractTimeAndChargeSlidingWindow]: with the following initialization: \\
829\resume{enumerate}
830\item SetWindowSize(2,2); SetRange(5,11,7,11);
831\item SetWindowSize(4,4); SetRange(5,13,6,12);
832\item SetWindowSize(4,6); SetRange(5,13,5,13);
833\item SetWindowSize(6,6); SetRange(4,14,5,13);
834\item SetWindowSize(8,8); SetRange(4,16,4,14);
835\item SetWindowSize(14,10); SetRange(5,10,7,11);
836\suspend{enumerate}
837\item[MExtractTimeAndChargeSpline]: with the following initialization:
838\resume{enumerate}
839\item SetChargeType(MExtractTimeAndChargeSpline::kAmplitude); \\
840SetRange(5,10,7,10);
841\suspend{enumerate}
842SetChargeType(MExtractTimeAndChargeSpline::kIntegral); \\
843and:
844\resume{enumerate}
845\item SetRiseTime(0.5); SetFallTime(0.5); SetRange(5,10,7,11);
846\item SetRiseTime(0.5); SetFallTime(1.5); SetRange(5,11,7,12);
847\item SetRiseTime(1.0); SetFallTime(3.0); SetRange(4,12,5,13);
848\item SetRiseTime(1.5); SetFallTime(4.5); SetRange(4,14,3,13);
849\suspend{enumerate}
850\item[MExtractTimeAndChargeDigitalFilter]: with the following initialization:
851\resume{enumerate}
852\item SetWeightsFile(``cosmics\_weights.dat''); SetRange(4,14,5,13);
853\item SetWeightsFile(``cosmics\_weights4.dat''); SetRange(5,13,6,12);
854\item SetWeightsFile(``calibration\_weights\_UV.dat'');
855\item SetWeightsFile(``calibration\_weights4\_UV.dat'');
856\item SetWeightsFile(``calibration\_weights\_blue.dat'');
857\item SetWeightsFile(``calibration\_weights4\_blue.dat'');
858\end{enumerate}
859\end{description}
860
861References: \cite{OF77,OF94}.
862
863
864%%% Local Variables:
865%%% mode: latex
866%%% TeX-master: "MAGIC_signal_reco"
867%%% TeX-master: "MAGIC_signal_reco"
868%%% End:
Note: See TracBrowser for help on using the repository browser.