GET library
GETSystemAnalyser.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GETSystemAnalyser.hh
3  *
4  * Header file for the GETSystemAnalyser class.
5  */
6 //======================================================================
7 
8 #ifndef GET_SYSTEM_ANALYSER_HH
9 #define GET_SYSTEM_ANALYSER_HH
10 
11 // includes from current library
12 #include "GETSystem.hh"
13 #include "GETSampleAnalysis.hh"
14 #include "GETFilter.hh"
15 #include "GETSignalFunctions.hh"
16 
17 #include "RExtremaFinder.hh"
18 
19 #include "TFitResultPtr.h"
20 #include "TFitResult.h"
21 
22 //----------------------------------------------------------------------
23 //! Fit function for channels: Gauss function
24 extern TF1 * getFctGaus;
25 
26 //! Fit function for channels: Gauss x SinC function
27 extern TF1 * getFctGausSinC;
28 
29 //! Fit function for channels: Square signal convoluted with Gauss function
30 extern TF1 * getFctSquareGaus;
31 
32 //! Fit function for channels: Square signal convoluted with (Gauss x SinC) function
33 extern TF1 * getFctSquareGausSinC;
34 
35 
36 //! Maximum number of parameters for channels fitting
37 #define GET_FIT_PAR_MAX 8
38 
39 //======================================================================
40 /*! \class GETSystemAnalyser
41  *
42  * This is a base class for various analysis of experimental data
43  * from the GETSystem objects.
44  * When a GETSystemAnalyser object is associated to a GETSystem object,
45  * the analysis functions from this class are called by the GETSystem
46  * specific functions:
47  * - GETSystemAnalyser::AnalyseRunStart at the beginning of a run processing
48  * - GETSystemAnalyser::AnalyseRunStop at the end of a run processing
49  * - GETSystemAnalyser::AnalyseRawEvent when a new event has been read from
50  * a run file, \b before corrections are applied to the output samples
51  * - GETSystemAnalyser::AnalyseCorEvent when a new event has been read from
52  * a run file, \b after corrections are applied to the output samples, and
53  * eventually the input signals are reconstructed from the response
54  * functions.
55  *
56  * In addition, the function GETSystemAnalyser::ClearAnalysis may
57  * be called when all analysis data should be resetted.
58  * Note that this function is never called by the GETSystem class.
59  *
60  * The GETSystemAnalyser::ClearEvent function is automatically called
61  * by the GETSystem object when its clears its own event data.
62  *
63  * This class may be derived in order to perform specific analysis,
64  * eventually from a derived class of GETSystem: see for example
65  * the GETActarTpcAnalyser for the GETActarTpc system class.
66  *
67  * \note
68  * When a GETSystemAnalyser (or derived) class object is used to perform
69  * events analysis while the events are not read using the GETSystem
70  * (or derived) object event processing functions, then the analyser
71  * functions (GETSystemAnalyser::AnalyseRunStart,
72  * GETSystemAnalyser::AnalyseRunStop, GETSystemAnalyser::AnalyseRawEvent and
73  * GETSystemAnalyser::AnalyseCorEvent) are not called automatically.\n
74  * This for example the case when events are read from simulation and
75  * imported in a GETSystem object.
76  * In this case, the functions must be explicitely called for the
77  * analysis to be performed and the histograms to be filled properly.
78  *
79  *
80  * The GETSystemAnalyser class can perform various types of analysis,
81  * depending on what has been defined in terms of analysis parameters and
82  * histograms.
83  * The analysis concerning <B>raw data</B> are always performed on <B>output</B>
84  * data of the signal channels, while the <B>corrected data</B> anlysis can be
85  * performed on any of the signal, that can be selected with the
86  * GETSystemAnalyser::SetSelectedData() functions (which is meaningful for
87  * corrected <B>output</B> signal and for <B>reconstructed</B> signal, but may be
88  * meaningless for input/test signals).
89  *
90  * The analysis available for the base class are:
91  *
92  * - <B>channels signal</B> analysis (see \ref get_analyser_signal):
93  * - channels amplitude and timing analysis (performed for both raw and
94  * corrected/reconstructed signals analysis)
95  * - channels multiple maxima analysis (only for corrected or reconstructed
96  * signal analysis, not for raw data analysis)
97  *
98  * - <B>automatic histograms</B> filling, if the histograms have been
99  * defined with the functions:
100  * - GETSystemAnalyser::CreateFullEventRawHisto and
101  * GETSystemAnalyser::CreateFullEventCorHisto for full
102  * event 2D histograms with all samples of all channels
103  * (raw or corrected/reconstructed signals)
104  * - GETSystemAnalyser::CreateChannelsMaxRawHisto and
105  * GETSystemAnalyser::CreateChannelsMaxCorHisto for summary
106  * histograms with maximum amplitude of all channels
107  * (raw or corrected/reconstructed signals)
108  *
109  * - <B>predefined analysis</B> (see \ref get_analyser):
110  * - check of the <B>number of data (time buckets) per channel</B>
111  * (performed on raw outputs): \ref get_analyser_datanum
112  * - check of the <B>data continuity</B>
113  * (performed on raw outputs): \ref get_analyser_datacont
114  * - <B>noise analysis</B> (performed on corrected/reconstructed signals):
115  * \ref get_analyser_noise
116  * - <B>baseline fluctuations</B> analysis: the baseline of current
117  * event is compared to the average baseline of previous events
118  * (performed on raw outputs): \ref get_analyser_baseline
119  * - <B>resolution</B> analysis: the maximum signal amplitude variation
120  * is computed: \ref get_analyser_resolution (meaningful only for
121  * constant signal such as pulser calibration).
122  * - <B>FPN check</B> analysis: test if the FPN channels are OK;
123  * this test is defined to detect channels signal shifts that
124  * have been observed in GetController and GET acquisition runs;
125  * see \ref get_analyser_fpntest (meaningful only for
126  * AsAd functionality test mode runs).
127  *
128  * In addition, it is possible to read the analysis parameters from a
129  * text file: see functions GETSystemAnalyser::ReadConfigFile and
130  * GETSystemAnalyser::ConfigCommand.
131  *
132  */
133 //======================================================================
134 /*! \page get_analyser_signal GET system channels signal analysis
135  *
136  *
137  *
138  *
139  * \section get_analyser_signal_amplitude Amplitude and time analysis
140  *
141  * \par Amplitude calulation mode
142 
143  * The amplitude calculation mode is defined with the
144  * GETSystemAnalyser::SetAmplitudeMode function.
145  *
146  * The amplitudes are determined when analysing the raw data and when
147  * processing the corrected data.
148  * The signal width correspond to the time of signal above threshold
149  * above maximum, except in case of a Gaus fit, in which case it is
150  * defined as the FWHM.
151  * Only valid hit channels are considered.
152  *
153  * The accepted modes are:
154  * - <B>maximum</B> of channel amplitude (default): the maximum amplitude
155  * of each channel is used;
156  * - <B>full signal integral</B>: the sum of all time buckets of the sample;
157  * - <B>integral of signal over threshold</B>: the region around maximum,
158  * limited at time when signal drops below the threshold before and after
159  * the maximum, is integrated
160  * (it should be noted that the result may be slightly different than a
161  * single maximum in the multiple maxima analysis - see \ref get_analyser_signal_multiple_max
162  * because of the baseline analysis)
163  * - <B>local signal average</B> around maximum
164  * - <B>local quadratic fit</B> around maximum
165  *
166  * The local analysis modes (average or quadratic fit) require that a window
167  * size is defined around the maximum (set by GETSystemAnalyser::SetAmplitudeMode
168  * or GETSystemAnalyser::SetAmplitudeWindow functions).
169  *
170  *
171  * \par Timing calulation mode
172  *
173  * - <B>time of channel maximum</B> amplitude (default)
174  * - <B>constant fraction discriminator</B>
175  *
176  *
177  *
178  * \section get_analyser_reconstructed Reconstructed signal analysis
179  *
180  * For reconstructed signal, the class define a flag indicating
181  * whether all data in the analysis time limits are considered
182  * (FULL_REC mode), or only data above threshold.
183  *
184  * The reconstructed analysis time limits are also user defined.
185  *
186  * The reconstructed signal mode and analysis may modify the hit
187  * pattern when computing the amplitudes and times for all channels.
188  *
189  *
190  *
191  * \section get_analyser_signal_multiple_max Multiple maxima analysis
192  *
193  * The multiple maxima analysis is based on the RExtremaFinder class of
194  * the GRootTools library.
195  * It is designed to search for several "peaks" in the channels signal.
196  *
197  *
198  */
199 //======================================================================
200 /*! \page get_analyser GET system analyser predefined analysis
201  *
202  * This page presents the procedures defined for the various analysis
203  * available in the GET system analyser class.
204  * The base class for analysis is GETSystemAnalyser.
205  *
206  * These analyses should be defined \b after the GET system has been created
207  * with its number of modules and channels.
208  *
209  * - \ref get_analyser_datanum
210  * - \ref get_analyser_noise
211  * - \ref get_analyser_baseline
212  * - \ref get_analyser_resolution
213  * - \ref get_analyser_datacont
214  * - \ref get_analyser_fpntest
215  *
216  *
217  *
218  * \section get_analyser_noise Noise monitoring analysis
219  *
220  * The noise analysis evaluates, on an event by event basis, the signal
221  * RMS of each channel.
222  *
223  * The analysis is created when defining the samples interval \f$[i_0;i_1]\f$
224  * on which the noise is estimated (function GETSystemAnalyser::SetNoiseRange).
225  * The interval must be selected so that it has very little chance that
226  * a real signal appears in this range.
227  * This is in principle achieved at the beginning of the sample, if the
228  * trigger delay from GET electronics is set properly.
229  *
230  * The analysis is performed by the analyser on corrected outputs
231  * (FPN, baseline...), namely in the GETSystemAnalyser::AnalyseCorEvent
232  * function (automatically called by the GETSystem::ReadEvent function).
233  *
234  * For a given channel \e j, the average of the channel signal \f$S_{j}\f$
235  * is computed in the \f$[i_0;i_1]\f$ interval:
236  * \f[\left< S_{j} \right> = \frac{1}{i_1 - i_0 + 1}
237  \cdot \sum_{i=i_0}^{i_1} S_j[i]\f]
238  *
239  * Then the corresponding RMS:
240  * \f[\Delta S_{j} = \sqrt{ \frac{1}{i_1 - i_0 + 1}
241  \cdot \sum_{i=i_0}^{i_1}
242  \left(S_j[i] - \left< S_{j} \right>\right)^2}\f]
243  *
244  * This RMS is the estimated noise for the channel.
245  * The analysis is performed on corrected outputs (FPN, baseline...)
246  * in the GETSystemAnalyser::AnalyseCorEvent function.
247  *
248  * If the noise analysis is defined, when an event is analysed, the RMS
249  * computed for each channel is stored in an histogram
250  * (GETSystemAnalyser::GetChannelsNoiseHisto).
251  *
252  * This analysis does not work when the zero suppress mode is active.
253  *
254  *
255  * \image html "AnalyserNoise_Event.png"
256  * This picture shows the noise histogram for one event, indicating
257  * an abnormal noise level for channels around number 2000, compared
258  * to the other system channels.
259  *
260  * \image html "AnalyserNoise_Pads.png"
261  * The noise analysis functions are overloaded in the GETActarDemAnalyser
262  * class to define also a noise histogram for the ACTAR TPC (demonstrator)
263  * pad layout (following the GETSystem lookup table).
264  * This picture shows the same event as the previous picture, for pads
265  * instead of electronics channels.
266  *
267  * \image html "AnalyserNoise_Cumul.png"
268  * It is possible to cumulate the results for all events in a 2D histogram
269  * using the GETSystemAnalyser::FillCumulNoiseHisto.
270  *
271  *
272  *
273  * \section get_analyser_baseline Baseline fluctuations monitoring analysis
274  *
275  * While the noise analysis is defined for a single event, the
276  * <B>baseline fluctuation</B> analysis compares the current event
277  * to the previous ones, to check that the system is in stable
278  * conditions.
279  * It appears to be a good monitor for the AsAd-AGET calibration and
280  * clock alignment.
281  *
282  * The analysis is created by the GETSystemAnalyser::InitBaseFluctuations
283  * function.
284  * Like for the noise analysis, the time buckets interval \f$[i_0;i_1]\f$
285  * must be chosen so that real signal should not appear in the analysis
286  * range.
287  * Note that the interval may be different than the one used for the
288  * noise analysis.
289  * In addition, a warnig threshold is also defined: if the baseline
290  * fluctuation overpasses this threshold for one or more channels, a
291  * warning is issued on the terminal output.
292  *
293  * Since the analysis compares current event to the previous ones,
294  * it requires several events before being effective.
295  * The analysis works as follows:
296  * - for the first few events, only the average (over events) baseline
297  * is built;
298  * - for event number \e n, the average baseline (from previous
299  * events) of channel \e j is:
300  * \f[\left< B_{j}^{(n)} \right> = \frac{1}{n - 1}
301  \cdot \sum_{k=0}^{n-1}
302  \left< S_j^{(k)} \right>_{[i_0;i_1]}\f]
303  * where \f$\left< S_{j}^{(k)} \right>\f$ is computed, for event \e k in
304  * the same way than for noise analysis;
305  * - for a given channel, the signal is taken into account only if the
306  * channel contains data;
307  * - the baseline variation for channel \e j of event \e n is:
308  * \f[\Delta B_{j}^{(n)} = \left< B_{j}^{(n)} \right> - \left< S_{j}^{(n)} \right>\f]
309  *
310  * The average is built event by event, for each channel.
311  * In case of a channel being identified as "bad" (from this test or another
312  * analysis performed before), the current data for the channel is not
313  * included in the average.
314  *
315  * This baseline fluctuations analysis is performed on the raw data, in
316  * GETSystemAnalyser::AnalyseRawEvent function.
317  *
318  * If the analysis is defined, when an event is analysed, the baseline
319  * fluctuation for each channel is stored in an histogram
320  * (GETSystemAnalyser::GetBaseFluctuationsHisto).
321  *
322  * This analysis does not work when the zero suppress mode is active.
323  *
324  *
325  * \image html "AnalyserBaseline_Event.png"
326  * This picture shows the baseline fluctuation histogram for one event,
327  * indicating a problem for channels around 1000-1100.
328  *
329  * \image html "AnalyserBaseline_Cumul.png"
330  * It is possible to cumulate the results for all events in a 2D histogram
331  * using the GETSystemAnalyser::FillCumulFluctuationsHisto.
332  *
333  *
334  *
335  *
336  * \section get_analyser_resolution Maximum amplitude resolution analysis
337  *
338  * The resolution analysis proposes a tool to estimate the channel
339  * resolution for run files with constant signal on each channel,
340  * such as pulser calibration measurements.
341  *
342  * The analysis stores, on an event by event basis, the maximum amplitude
343  * of all channel in a 2D histogram (channel number versus amplitude).
344  * Then the RMS is computed for each channel, and stored in the
345  * \b resolution histogram, that is recomputed for each event.
346  *
347  * Note: it has been designed to optimize the GET clocks offsets.
348  *
349  *
350  *
351  *
352  * \section get_analyser_datanum Channels data count monitoring analysis
353  *
354  * This analysis checks the number of data (from the circular buffer
355  * memory) that have been read from the data frame, for each channel.
356  * In principle, for a sample depth of 512 time buckets, this
357  * number should be exactly 512 or 0 (if partial readout mode is on).
358  *
359  * \b Warning: this is true \b ONLY if the zero suppress mode is off.
360  *
361  * The analysis is defined by the GETSystemAnalyser::InitDataNumberCheck
362  * function, that sets the interval \f$[n_0;n_1]\f$ in which the number
363  * of read data is considered bad.
364  * This interval should be for example \f$[0;511]\f$ in full readout mode
365  * and \f$[1;511]\f$ in partial readout mode.
366  *
367  * When analysing an event, if some channels have a number of data in
368  * this interval, a warning is issued.
369  *
370  * If the number of data (time buckets) is lower than a threshold value
371  * (default is 2, it can be changed with SetDataNumberRejectThreshold
372  * function), the data are removed from the channels (and sent to the
373  * bad data list of GETSystem), and the channel is set as "unread".
374  *
375  * If the analysis is defined, in case of bad channels detection, the
376  * analyser will try to correct these data:
377  * - it look on missing data of the bad channels;
378  * - it tries to replace these data by data from the list of bad data
379  * from the GETSystem.
380  *
381  * \htmlonly
382  *
383  * <table>
384  * <tr>
385  * <td>Unexpected data</td>
386  * <td>Missing data</td>
387  * <td>Corrected channel</td>
388  * </tr>
389  * <tr>
390  * <td>
391  * <img src="../figures/Analyser/AnalyserDataCount_Bad1.png" alt="AnalyserDataCount_Bad1" width="360" height="270">
392  * </td>
393  * <td>
394  * <img src="../figures/Analyser/AnalyserDataCount_Bad2.png" alt="AnalyserDataCount_Bad2" width="360" height="270">
395  * </td>
396  * <td>
397  * <img src="../figures/Analyser/AnalyserDataCount_Recovered.png" alt="AnalyserDataCount_Recovered" width="360" height="270">
398  * </td>
399  * </tr>
400  * </table>
401  *
402  * \endhtmlonly
403  *
404  *
405  *
406  * \section get_analyser_datacont Data continuity (or accidents) monitoring analysis
407  *
408  * A possible result of problems in the GET system hardware configuration
409  * process is to get corrupted data.
410  * This may happen in several ways, like the example below or with
411  * absolutly inconsistant channels data.
412  *
413  * The data continuity proposes a test based on a maximum accepted variation
414  * \e dmax between values of contiguous time buckets.
415  * This limit is set by the GETSystemAnalyser::InitDataContinuityCheck
416  * function.
417  *
418  * In order to accept fast signal variations that may happen (for short
419  * peaking times), the analysis test checks an abnormal increase and
420  * decrease of the signal (or the inverse).
421  *
422  * \image html "AnalyserContinuity_Event.png"
423  * This picture illustrate the type of problem that can be detected
424  * by the continuity analysis.
425  *
426  *
427  *
428  * \section get_analyser_fpntest FPN test for AsAd functionality test mode
429  *
430  * To test the validity of the FPN channels, 2 time intervals are defined:
431  * at the beginning and at the end of the time window.
432  *
433  * At event test (raw data analysis), for each FPN channel, the average
434  * signal on both intervals is computed: \f$\left< S_{begin} \right>\f$
435  * and \f$\left< S_{end} \right>\f$, and the difference:
436  * \f[ \Delta_{FPN} = \left< S_{end} \right> - \left< S_{begin} \right>\f]
437  *
438  * The FPN channel is considered OK if it is in the predefined (at test
439  * initialization) interval:
440  * \f[ \Delta_{min} < \Delta_{FPN} < \Delta_{max} \f]
441  *
442  * The test is performed for each AsAd board, but only if the AsAd received
443  * data (otherwise channels are consideredvalid), because the functionality
444  * test mode, in GetController runs, provide single AsAd frame events
445  * (unmerged).
446  *
447  * In case some FPN channels result in a bad test, all channels of the AGet
448  * chip are set to "bad" so that they are not considered for the average
449  * of the fluctuation analysis (if defined).
450  *
451  */
452 
454 {
455  //------------------------------------------------------------
456  /*! \object_doc */
458  //------------------------------------------------------------
459 
460  friend class GETSystem;
461 
462  protected:
463 
464  GETSystem * get_ptr; ///< Pointer to the GET system object
465  GETHitMask * hit_mask; ///< Pointer to the hit mask (same as base class hit mask, but known as GETHitMaskXY)
466 
467  u_short select_data_hit; ///< Information on the channel data to analyse for hit pattern: GET::signalOut (default), GET::signalTst or GET::signalRec
468  u_short select_data_signal; ///< Information on the channel data for signal analysis: GET::signalOut (default), GET::signalTst or GET::signalRec
469 
470  bool * channel_bad; ///< Whether the channel contains bad data
471  bool channel_bad_flag; ///< Whether there are bad channels
472 
473  u_int events_count; ///< Number of events since analysis cleard
474  u_int events_skip; ///< Number of first events to skip for analysis
475 
476  bool raw_analysed; ///< Whether the raw data analysis is performed
477  bool cor_analysed; ///< Whether the corrected data analysis is performed
478 
479  // reconstructed signal analysis time limits
480  bool full_rec; ///< For reconstructed signal, plot full signal (no threshold on single time buckets)
481  double rec_tmin; ///< Analysis time lower limits for reconstructed signal
482  double rec_tmax; ///< Analysis time upper limits for reconstructed signal
483  u_int rec_itmin; ///< Analysis lower time bin for reconstructed signal
484  u_int rec_itmax; ///< Analysis upper time bin for reconstructed signal
485 
486  // Full events histograms
487  TH2D * h_full_event_raw; ///< Pointer to the histogram with full raw data (before processing)
488  TH2D * h_full_event_cor; ///< Pointer to the histogram with full data after corrections (if any)
489 
490  // Channels maximum analysis
491  TH1D * h_channels_max_raw; ///< Pointer to the channels summary histogram with maximum raw output values
492  TH1D * h_channels_max_cor; ///< Pointer to the channels summary histogram with maximum corrected output values
493  TH1D * h_channels_time_raw; ///< Pointer to the channels summary histogram with maximum raw output values
494  TH1D * h_channels_time_cor; ///< Pointer to the channels summary histogram with maximum corrected output values
495  TH1I * h_channels_data_num; ///< Pointer to the channels summary histogram with number of raw data per channel
496 
497  // the followings are defined to avoid calculating several times
498  // the same data
499  u_short amplitude_mode; ///< Signal amplitude analysis mode
500  double amplitude_window; ///< Signal amplitude analysis window size (for fit or average)
501 
502  u_short timing_mode; ///< Signal timing analysis mode
503  double timing_cfd_fraction; ///< CFD fraction for timing analysis
504  double timing_cfd_delay; ///< CFD offset for timing analysis
505 
506  bool amax_computed; ///< Whether the maximum amplitude / time is computed
507  double * amax_amplitude; ///< Array of maximum amplitude values
508  double * amax_width; ///< Array of width values
509  double * amax_time; ///< Array of maximum amplitude times
510 
511  double ch_max_signal; ///< Maximum channel amplitude value
512  u_int ch_max_index; ///< Channel with maximum amplitude
513 
514  static TF1 * fit_channel_fct; ///< Pointer to the function used in case of channel fitting
515  static u_int fit_channel_npar; ///< Number of parameters for the signal fit function
516  double ** fit_channel_param; ///< Parameter values for each channel
517 
518  // multiple maxima analysis (only for pads, not for FPN)
519  RExtremaFinder mmax_finder; ///< Multiple maxima analyser
520  bool mmax_analysis; ///< Whether multiple maxima analysis is requested
521  bool mmax_computed; ///< Whether multiple maxima analysis is performed
522  u_short mmax_mode; ///< Calculation of multiple maxima amplitude: 0 standard, 1 gaus fits
523  u_int mmax_max; ///< Maximum number of maxima per channel
524  u_int mmax_tot; ///< Total number of maxima for all channels
525  u_int * mmax_num; ///< Number of maxima for each channel
526  double * mmax_sum; ///< Summed amplitudes of all maxima for each channel
527  double mmax_sum_all; ///< Summed amplitudes of all channels
528  double ** mmax_amplitude; ///< Maxima values arrays for each channel
529  double ** mmax_width; ///< Maxima width arrays for each channel
530  double ** mmax_time; ///< Maxima times arrays for each channel
531  double mmax_scale; ///< Scaling factor for amplitude
532  double mmax_diff_thr; ///< Maxima difference validation threshold
533 
534  // Number of data per channel
535  bool data_num_on; ///< Whether the analysis of number of data per channel is ON
536  int data_num_min; ///< Lower value for bad range of data / channel
537  int data_num_max; ///< Upper value for bad range of data / channel
538  int data_num_bad; ///< Number of bad channels in analysis of the data per channel
539  u_int data_num_reject; ///< Rejection threshold for channels with few data only
540 
541  // Data continuity check
542  bool data_cont_on; ///< Whether the analysis of data discontinuity is ON
543  double data_cont_max; ///< Maximum variation for continuity
544  int data_cont_bad; ///< Number of bad channels in analysis of the data continuity
545 
546  // Amplitude resolution analysis
547  bool resol_on; ///< Whether amplitude resolution analysis is ON
548  int resol_dim; ///< Dimension of amplitude axis
549  double resol_min; ///< Lower limit of amplitude axis
550  double resol_max; ///< Upper limit of amplitude axis
551  double resol_step; ///< Lower limit of amplitude axis
552  TH2I * h_resol_ampl; ///< Pointer to the channels versus amplitude maximum histogram
553  TH1D * h_resol_rms; ///< Pointer to the channels amplitude variations histogram
554 
555  // Noise analysis
556  bool rms_on; ///< Whether noise analysis is ON
557  u_int rms_imin; ///< Lower limit for RMS analysis
558  u_int rms_imax; ///< Upper limit for RMS analysis
559  TH1D * h_channels_rms; ///< Pointer to the channels RMS analysis summary histogram
560 
561  // Baseline fluctuations analysis
562  bool fluct_on; ///< Whether baseline fluctuations analysis is ON
563  u_int fluct_imin; ///< Lower limit for baseline fluctuations analysis
564  u_int fluct_imax; ///< Upper limit for baseline fluctuations analysis
565  double fluct_warn; ///< Baseline fluctuation value to issue a warning
566  int fluct_bad; ///< Number of bad channels in fluctuations analysis
567  double * fluct_sum; ///< Cumulated values for baseline check
568  int * fluct_cnt; ///< Number of events for baseline check
569  TH1D * h_channels_fluct; ///< Pointer to the channels baseline fluctuations analysis summary average histogram
570 
571  // FPN test analysis (for functionality test mode of AsAd)
572  bool fpn_test_on; ///< Whether the FPN test analysis is ON
573  u_int fpn_test_i1min; ///< Lower limit for average of the begining of the time window
574  u_int fpn_test_i1max; ///< Upper limit for average of the begining of the time window
575  u_int fpn_test_i2min; ///< Lower limit for average of the end of the time window
576  u_int fpn_test_i2max; ///< Upper limit for average of the end of the time window
577  double fpn_test_dmin; ///< Lower limit for difference between end average and beginning average
578  double fpn_test_dmax; ///< Upper limit for difference between end average and beginning average
579  int fpn_test_bad; ///< Number of bad channels in FPN test analysis
580 
581  public:
582  //----------------------------------------------------------
583  /** @name Constructors, affectation, destructor */
584  //@{
585  GETSystemAnalyser ( GETSystem * get = NULL );
586  virtual ~GETSystemAnalyser ( );
587  //@}
588 
589  //----------------------------------------------------------
590  /** @name General functions */
591  //@{
592  virtual void Reset ( );
593  virtual int SetSystem ( GETSystem * gptr );
594  GETSystem * GetSystem ( ); // inline
595  u_int GetChannelNumber ( ) const; // inline
596 
597  void SetEventsSkip ( u_int n ); // inline
598  u_int GetEventsSkip ( ); // inline
599  u_int GetAnalysisEventsCounter ( ); // inline
600  virtual void IncrAnalysisEventCount ( ); // inline
601  //@}
602 
603  //----------------------------------------------------------
604  /** @name Analysis parameters */
605  //@{
606  void SetSelectedData ( u_short id ); // inline
607  void SetSelectedHitData ( u_short id ); // inline
608  void SetSelectedSignalData ( u_short id ); // inline
609  int GetSelectedHitData ( ) const; // inline
610  int GetSelectedSignalData ( ) const; // inline
611 
612  // analysis limits for reconstructed signal
613  void SetFullRec ( bool b = true ); // inline
614  bool IsFullRecSet ( ) const; // inline
615 
616  virtual void SetRecTmin ( double t );
617  virtual void SetRecTmax ( double t );
618  virtual void SetRecTlimits ( double t0, double t1 );
619 
620  double GetRecTmin ( ) const; // inline
621  double GetRecTmax ( ) const; // inline
622  u_int GetRecITmin ( ) const; // inline
623  u_int GetRecITmax ( ) const; // inline
624 
625  //@}
626 
627  //----------------------------------------------------------
628  /** @name Main analysis functions, called by GETSystem */
629  //@{
630  virtual void ClearAnalysis ( );
631  virtual int AnalyseRunStart ( );
632  virtual int AnalyseRunStop ( );
633 
634  virtual void ClearEvent ( );
635  virtual int OutputCorrection ( ); // inline (it does nothing...)
636  virtual int AnalyseRawEvent ( );
637  virtual int AnalyseCorEvent ( );
638 
639  virtual void BadChannelsWarning ( );
640  virtual bool IsChannelBad ( u_int ich ) const; // inline
641  virtual u_int BadChannelCount ( ) const;
642 
643  virtual double GetMaximumSignal ( ) const; // inline
644  virtual u_int GetMaximumChannel ( ) const; // inline
645  //@}
646 
647  //----------------------------------------------------------
648  /** @name Predefined analysis configuration files */
649  //@{
650  virtual int ReadConfigFile ( const string & cfg );
651  virtual int ReadConfigFile ( FILE * fp );
652  virtual bool ConfigCommand ( const GString & code, const GString & args = "", FILE * fptr = NULL );
653  //@}
654 
655  //----------------------------------------------------------
656  /** @name Full event data */
657  //@{
658  TH2D * CreateFullEventRawHisto ( const string & hname );
659  TH2D * CreateFullEventCorHisto ( const string & hname );
660 
661  TH2D * GetFullEventRawHisto ( ) const; // inline
662  TH2D * GetFullEventCorHisto ( ) const; // inline
663  //@}
664 
665  //----------------------------------------------------------
666  /** @name Channels amplitude analysis */
667  //@{
668  virtual TF1 * PresetChannelFctParameters ( double vmax, double tmax, double wid );
669  virtual int GetChannelFctAmplitude ( u_int ic, double & vmax, double & tmax, double & wid );
670  virtual TF1 * SetChannelFctParameters ( u_int ic );
671 
672  void SetAmplitudeMode ( u_short mode, double win = 0. );
673  void SetAmplitudeWindow ( double win );
674  u_short GetAmplitudeMode ( ) const; // inline
675 
676  void SetTimingMode ( u_short mode );
677  void SetTimingModeCFD ( double frac, double delay );
678  u_short GetTimingMode ( ) const; // inline
679 
680  virtual int CalcChannelAmplitude ( u_int ic, double & vmax, double & tmax, double & wid );
681  virtual int CalcChannelMaxima ( u_int ic );
682  void InitAmplitudeData ( );
683  void InitMaximaData ( );
684  void ResetMaximaData ( );
685  void ClearAmplitudeData ( );
686  virtual void ComputeAmplitudeData ( );
687 
688  bool IsAmplitudeDataComputed ( ) const; // inline
689  double GetChannelAmplitude ( u_int ich ) const; // inline
690  double GetChannelTime ( u_int ich ) const; // inline
691  double GetChannelWidth ( u_int ich ) const; // inline
692 
693  void SetMaximaScaling ( double fact ); // inline
694  void SetMaximaDiffThreshold ( double thr ); // inline
695  bool IsMaximaDataComputed ( ) const; // inline
696 
697  bool IsMultiMaxDefined ( ) const; // inline
698  int GetMultiMaxTotal ( ) const; // inline
699  double GetMultiMaxSumAll ( ) const; // inline
700  int GetMultiMaxNum ( u_int ich ) const; // inline
701  double GetMultiMaxSum ( u_int ich ) const; // inline
702  double GetMultiMaxAmplitude ( u_int ich, u_int imax ) const; // inline
703  double GetMultiMaxWidth ( u_int ich, u_int imax ) const; // inline
704  double GetMultiMaxTime ( u_int ich, u_int imax ) const; // inline
705 
706  TH1D * CreateChannelsMaxRawHisto ( const string & hname );
707  TH1D * CreateChannelsMaxCorHisto ( const string & hname );
708  TH1D * CreateChannelsTimeRawHisto ( const string & hname );
709  TH1D * CreateChannelsTimeCorHisto ( const string & hname );
710 
711  TH1D * GetChannelsMaxRawHisto ( ) const; // inline
712  TH1D * GetChannelsMaxCorHisto ( ) const; // inline
713  //@}
714 
715  //----------------------------------------------------------
716  /** @name Analysis of number of data per channel */
717  //@{
718  virtual void InitDataNumberCheck ( u_int n0, u_int n1 );
719  bool IsDataNumberCheckON ( ) const; // inline
720  virtual void SetDataNumberRejectThreshold ( u_int nmin ); // inline
721 
722  virtual int ProcessDataNumberCheck ( );
723  virtual int GetDataNumberBadCount ( ) const; // inline
724  virtual int BadDataNumberCorrect ( );
725  //@}
726 
727  //----------------------------------------------------------
728  /** @name Analysis of data continuity */
729  //@{
730  virtual void InitDataContinuityCheck ( double dmax );
731  bool IsDataContinuityCheckON ( ) const; // inline
732 
733  virtual bool ContinuityCheck ( GETSample & sample );
734  virtual int ProcessDataContinuityCheck ( );
735  virtual int GetDataContinuityBadCount ( ) const; // inline
736  //@}
737 
738  //----------------------------------------------------------
739  /** @name Noise analysis */
740  //@{
741  virtual void SetNoiseRange ( u_int i0 = 2, u_int i1 = 509 );
742  u_int GetNoiseIndexMin ( ) const; // inline
743  u_int GetNoiseIndexMax ( ) const; // inline
744  TH1D * GetChannelsNoiseHisto ( ) const; // inline
745  bool IsNoiseAnalysisON ( ) const; // inline
746 
747  virtual int ProcessNoiseAnalysis ( );
748  virtual int FillCumulNoiseHisto ( TH2 * hptr );
749  //@}
750 
751  //----------------------------------------------------------
752  /** @name Amplitude resolution analysis */
753  //@{
754  virtual void InitResolutionAnalysis ( int n, double amin, double amax );
755  virtual void ClearResolutionAnalysis ( );
756  bool IsResolutionAnalysisON ( ) const; // inline
757  TH2I * GetResolutionMaxHisto ( ) const; // inline
758  TH1D * GetResolutionHisto ( ) const; // inline
759 
760  virtual int ProcessResolutionAnalysis ( );
761 
762  //@}
763 
764  //----------------------------------------------------------
765  /** @name Baseline fluctuations analysis */
766  //@{
767  virtual void InitBaseFluctuations ( u_int i0 = 2, u_int i1 = 32, double warn = 0. );
768  virtual void ClearBaseFluctuations ( );
769  TH1D * GetBaseFluctuationsHisto ( ) const; // inline
770  bool IsFluctuationsAnalysisON ( ) const; // inline
771 
772  virtual int ProcessFluctuationsAnalysis ( );
773  virtual int GetFluctuationsBadCount ( ) const; // inline
774  virtual int FillCumulFluctuationsHisto ( TH2 * hptr );
775  //@}
776 
777  //----------------------------------------------------------
778  /** @name FPN test analysis */
779  //@{
780  virtual void InitFPNtest ( u_int i1min, u_int i1max,
781  u_int i2min, u_int i2max,
782  double dmin, double dmax );
783  bool IsFPNtestAnalysisON ( ) const; // inline
784 
785  virtual int ProcessFPNtestAnalysis ( );
786  virtual int GetFPNtestBadCount ( ) const; // inline
787 
788  //@}
789 
790  //----------------------------------------------------------
791  /** @name ROOT related functions */
792  //@{
793  public:
794 
795  TH1D * CreateChannelsHisto1D ( const string & name, const string & ytit = "", bool fpn = true );
796  TH2D * CreateChannelsHisto2D ( const string & name, int ny, double ymin, double ymax, const string & ytit = "", bool fpn = true );
797  TH1I * CreateChannelsHisto1I ( const string & name, const string & ytit = "", bool fpn = true );
798  TH2I * CreateChannelsHisto2I ( const string & name, int ny, double ymin, double ymax, const string & ytit = "", bool fpn = true );
799 
800  // the filling functions may be used for Tst, Out or Rec signals from
801  // the GET system channels
802 
803  TH2D * CreateFullEventHisto ( const string & name, bool fpn = true );
804  TH2D * CreateFullEventHisto ( const string & name,
805  int ny, double ymin, double ymax, bool fpn = true ); // inline
806  int FillFullEventHisto ( TH2D * hptr, bool reset = true, bool fpn = true, double scale = 1. );
807 
808  TH1D * CreateChannelSummaryHisto ( const string & name, bool fpn = true ); // inline
809  int FillChannelsSummaryHisto ( TH1D * hptr, u_short fmod = GET::dataAmplitude, bool fpn = true, bool reset = true );
810  int CumulChannelsSummaryHisto ( TH2 * hptr, u_short fmod = GET::dataAmplitude, bool fpn = true );
811 
812  TH1D ** CreateAllChannelsHisto ( const string & prefix = "GET_", const string & suffix = "" );
813  int FillAllChannelsHisto ( TH1D ** htab, bool reset = true );
814 
815  /*! for use within ROOT.*/
817  //@}
818 };
819 
820 
821 //----------------------------------------------------------------------
822 // Inline functions
823 #include "icc/GETSystemAnalyser.icc"
824 
825 
826 //======================================================================
827 #endif
828 
double fpn_test_dmax
Upper limit for difference between end average and beginning average.
Definition: GETSystemAnalyser.hh:578
int * fluct_cnt
Number of events for baseline check.
Definition: GETSystemAnalyser.hh:568
bool IsAmplitudeDataComputed() const
Definition: GETSystemAnalyser.icc:173
void SetMaximaScaling(double fact)
Definition: GETSystemAnalyser.icc:212
bool IsFPNtestAnalysisON() const
Definition: GETSystemAnalyser.icc:388
TH2D * CreateChannelsHisto2D(const string &name, int ny, double ymin, double ymax, const string &ytit="", bool fpn=true)
Definition: GETSystemAnalyser.cpp:3973
double * amax_time
Array of maximum amplitude times.
Definition: GETSystemAnalyser.hh:509
RExtremaFinder mmax_finder
Multiple maxima analyser.
Definition: GETSystemAnalyser.hh:519
u_int events_count
Number of events since analysis cleard.
Definition: GETSystemAnalyser.hh:473
double ** mmax_amplitude
Maxima values arrays for each channel.
Definition: GETSystemAnalyser.hh:528
virtual int ProcessResolutionAnalysis()
Definition: GETSystemAnalyser.cpp:3487
int data_num_min
Lower value for bad range of data / channel.
Definition: GETSystemAnalyser.hh:536
virtual int AnalyseRawEvent()
Definition: GETSystemAnalyser.cpp:446
void SetTimingMode(u_short mode)
Definition: GETSystemAnalyser.cpp:2017
TH1D * GetResolutionHisto() const
Definition: GETSystemAnalyser.icc:365
virtual void SetDataNumberRejectThreshold(u_int nmin)
Definition: GETSystemAnalyser.icc:311
u_int GetRecITmin() const
Definition: GETSystemAnalyser.icc:102
virtual void ComputeAmplitudeData()
Definition: GETSystemAnalyser.cpp:2748
bool fluct_on
Whether baseline fluctuations analysis is ON.
Definition: GETSystemAnalyser.hh:562
virtual TF1 * SetChannelFctParameters(u_int ic)
Definition: GETSystemAnalyser.cpp:1878
GETSystem * get_ptr
Pointer to the GET system object.
Definition: GETSystemAnalyser.hh:464
int data_num_max
Upper value for bad range of data / channel.
Definition: GETSystemAnalyser.hh:537
void ResetMaximaData()
Definition: GETSystemAnalyser.cpp:2653
TH1D * h_channels_fluct
Pointer to the channels baseline fluctuations analysis summary average histogram. ...
Definition: GETSystemAnalyser.hh:569
double GetMultiMaxSumAll() const
Definition: GETSystemAnalyser.icc:237
u_int fpn_test_i2max
Upper limit for average of the end of the time window.
Definition: GETSystemAnalyser.hh:576
u_int fpn_test_i1min
Lower limit for average of the begining of the time window.
Definition: GETSystemAnalyser.hh:573
u_short timing_mode
Signal timing analysis mode.
Definition: GETSystemAnalyser.hh:502
TF1 * getFctSquareGaus
Fit function for channels: Square signal convoluted with Gauss function.
Definition: GETSystemAnalyser.cpp:17
u_int GetEventsSkip()
Definition: GETSystemAnalyser.icc:29
int fpn_test_bad
Number of bad channels in FPN test analysis.
Definition: GETSystemAnalyser.hh:579
TH1D * CreateChannelsMaxRawHisto(const string &hname)
Definition: GETSystemAnalyser.cpp:2807
TH1D * CreateChannelsTimeRawHisto(const string &hname)
Definition: GETSystemAnalyser.cpp:2845
int GetSelectedHitData() const
Definition: GETSystemAnalyser.icc:70
void SetTimingModeCFD(double frac, double delay)
Definition: GETSystemAnalyser.cpp:2036
double mmax_scale
Scaling factor for amplitude.
Definition: GETSystemAnalyser.hh:531
double ** fit_channel_param
Parameter values for each channel.
Definition: GETSystemAnalyser.hh:516
virtual int ProcessFPNtestAnalysis()
Definition: GETSystemAnalyser.cpp:3828
virtual void ClearEvent()
Definition: GETSystemAnalyser.cpp:407
TH2I * GetResolutionMaxHisto() const
Definition: GETSystemAnalyser.icc:361
void InitMaximaData()
Definition: GETSystemAnalyser.cpp:2680
TH1D * CreateChannelsMaxCorHisto(const string &hname)
Definition: GETSystemAnalyser.cpp:2825
virtual void BadChannelsWarning()
Definition: GETSystemAnalyser.cpp:581
void SetSelectedData(u_short id)
Definition: GETSystemAnalyser.icc:46
u_int events_skip
Number of first events to skip for analysis.
Definition: GETSystemAnalyser.hh:474
virtual int BadDataNumberCorrect()
Definition: GETSystemAnalyser.cpp:3015
virtual int GetFluctuationsBadCount() const
Definition: GETSystemAnalyser.icc:381
virtual void InitDataNumberCheck(u_int n0, u_int n1)
Definition: GETSystemAnalyser.cpp:2895
int FillFullEventHisto(TH2D *hptr, bool reset=true, bool fpn=true, double scale=1.)
Definition: GETSystemAnalyser.cpp:4112
virtual u_int BadChannelCount() const
Definition: GETSystemAnalyser.cpp:628
TH1D * GetChannelsMaxRawHisto() const
Definition: GETSystemAnalyser.icc:291
double fpn_test_dmin
Lower limit for difference between end average and beginning average.
Definition: GETSystemAnalyser.hh:577
bool fpn_test_on
Whether the FPN test analysis is ON.
Definition: GETSystemAnalyser.hh:572
static u_int fit_channel_npar
Number of parameters for the signal fit function.
Definition: GETSystemAnalyser.hh:515
TH1D * h_resol_rms
Pointer to the channels amplitude variations histogram.
Definition: GETSystemAnalyser.hh:553
virtual int GetFPNtestBadCount() const
Definition: GETSystemAnalyser.icc:392
void SetSelectedHitData(u_short id)
Definition: GETSystemAnalyser.icc:53
bool mmax_analysis
Whether multiple maxima analysis is requested.
Definition: GETSystemAnalyser.hh:520
virtual int AnalyseCorEvent()
Definition: GETSystemAnalyser.cpp:529
bool * channel_bad
Whether the channel contains bad data.
Definition: GETSystemAnalyser.hh:470
virtual TF1 * PresetChannelFctParameters(double vmax, double tmax, double wid)
Definition: GETSystemAnalyser.cpp:1700
GETSystem * GetSystem()
Definition: GETSystemAnalyser.icc:12
u_int rms_imin
Lower limit for RMS analysis.
Definition: GETSystemAnalyser.hh:557
virtual void SetRecTlimits(double t0, double t1)
Definition: GETSystemAnalyser.cpp:362
TH1D * h_channels_max_cor
Pointer to the channels summary histogram with maximum corrected output values.
Definition: GETSystemAnalyser.hh:492
double GetMultiMaxAmplitude(u_int ich, u_int imax) const
Definition: GETSystemAnalyser.icc:261
virtual int ProcessFluctuationsAnalysis()
Definition: GETSystemAnalyser.cpp:3655
double GetChannelAmplitude(u_int ich) const
Definition: GETSystemAnalyser.icc:180
virtual int FillCumulFluctuationsHisto(TH2 *hptr)
Definition: GETSystemAnalyser.cpp:3734
double mmax_diff_thr
Maxima difference validation threshold.
Definition: GETSystemAnalyser.hh:532
double * mmax_sum
Summed amplitudes of all maxima for each channel.
Definition: GETSystemAnalyser.hh:526
virtual void SetRecTmin(double t)
Definition: GETSystemAnalyser.cpp:329
double mmax_sum_all
Summed amplitudes of all channels.
Definition: GETSystemAnalyser.hh:527
int resol_dim
Dimension of amplitude axis.
Definition: GETSystemAnalyser.hh:548
virtual int GetDataContinuityBadCount() const
Definition: GETSystemAnalyser.icc:327
virtual int FillCumulNoiseHisto(TH2 *hptr)
Definition: GETSystemAnalyser.cpp:3368
TH2D * h_full_event_raw
Pointer to the histogram with full raw data (before processing)
Definition: GETSystemAnalyser.hh:487
double ** mmax_width
Maxima width arrays for each channel.
Definition: GETSystemAnalyser.hh:529
double amplitude_window
Signal amplitude analysis window size (for fit or average)
Definition: GETSystemAnalyser.hh:500
TH1D * CreateChannelsTimeCorHisto(const string &hname)
Definition: GETSystemAnalyser.cpp:2863
virtual int ProcessNoiseAnalysis()
Definition: GETSystemAnalyser.cpp:3314
bool full_rec
For reconstructed signal, plot full signal (no threshold on single time buckets)
Definition: GETSystemAnalyser.hh:480
double GetRecTmin() const
Definition: GETSystemAnalyser.icc:94
double * fluct_sum
Cumulated values for baseline check.
Definition: GETSystemAnalyser.hh:567
GETHitMask * hit_mask
Pointer to the hit mask (same as base class hit mask, but known as GETHitMaskXY)
Definition: GETSystemAnalyser.hh:465
u_int fluct_imax
Upper limit for baseline fluctuations analysis.
Definition: GETSystemAnalyser.hh:564
virtual int GetDataNumberBadCount() const
Definition: GETSystemAnalyser.icc:316
Definition: GETHitMask.hh:29
u_int mmax_max
Maximum number of maxima per channel.
Definition: GETSystemAnalyser.hh:523
u_short mmax_mode
Calculation of multiple maxima amplitude: 0 standard, 1 gaus fits.
Definition: GETSystemAnalyser.hh:522
int FillChannelsSummaryHisto(TH1D *hptr, u_short fmod=GET::dataAmplitude, bool fpn=true, bool reset=true)
Definition: GETSystemAnalyser.cpp:4193
int fluct_bad
Number of bad channels in fluctuations analysis.
Definition: GETSystemAnalyser.hh:566
u_int data_num_reject
Rejection threshold for channels with few data only.
Definition: GETSystemAnalyser.hh:539
virtual int ReadConfigFile(const string &cfg)
Definition: GETSystemAnalyser.cpp:654
double resol_step
Lower limit of amplitude axis.
Definition: GETSystemAnalyser.hh:551
bool resol_on
Whether amplitude resolution analysis is ON.
Definition: GETSystemAnalyser.hh:547
bool IsFluctuationsAnalysisON() const
Definition: GETSystemAnalyser.icc:376
TH1D ** CreateAllChannelsHisto(const string &prefix="GET_", const string &suffix="")
Definition: GETSystemAnalyser.cpp:4395
double rec_tmax
Analysis time upper limits for reconstructed signal.
Definition: GETSystemAnalyser.hh:482
TH1I * h_channels_data_num
Pointer to the channels summary histogram with number of raw data per channel.
Definition: GETSystemAnalyser.hh:495
int CumulChannelsSummaryHisto(TH2 *hptr, u_short fmod=GET::dataAmplitude, bool fpn=true)
Definition: GETSystemAnalyser.cpp:4292
TH1D * h_channels_time_cor
Pointer to the channels summary histogram with maximum corrected output values.
Definition: GETSystemAnalyser.hh:494
virtual void InitDataContinuityCheck(double dmax)
Definition: GETSystemAnalyser.cpp:3140
static TF1 * fit_channel_fct
Pointer to the function used in case of channel fitting.
Definition: GETSystemAnalyser.hh:514
bool IsMaximaDataComputed() const
Definition: GETSystemAnalyser.icc:201
virtual int CalcChannelMaxima(u_int ic)
Definition: GETSystemAnalyser.cpp:2507
virtual void InitResolutionAnalysis(int n, double amin, double amax)
Definition: GETSystemAnalyser.cpp:3428
u_int fpn_test_i2min
Lower limit for average of the end of the time window.
Definition: GETSystemAnalyser.hh:575
u_int ch_max_index
Channel with maximum amplitude.
Definition: GETSystemAnalyser.hh:512
double timing_cfd_fraction
CFD fraction for timing analysis.
Definition: GETSystemAnalyser.hh:503
TF1 * getFctGausSinC
Fit function for channels: Gauss x SinC function.
Definition: GETSystemAnalyser.cpp:16
int GetSelectedSignalData() const
Definition: GETSystemAnalyser.icc:76
TF1 * getFctSquareGausSinC
Fit function for channels: Square signal convoluted with (Gauss x SinC) function. ...
Definition: GETSystemAnalyser.cpp:18
double GetMultiMaxSum(u_int ich) const
Definition: GETSystemAnalyser.icc:251
void SetMaximaDiffThreshold(double thr)
Definition: GETSystemAnalyser.icc:220
int data_cont_bad
Number of bad channels in analysis of the data continuity.
Definition: GETSystemAnalyser.hh:544
TF1 * getFctGaus
Fit function for channels: Gauss function.
Definition: GETSystemAnalyser.cpp:15
virtual void IncrAnalysisEventCount()
Definition: GETSystemAnalyser.icc:37
bool IsDataContinuityCheckON() const
Definition: GETSystemAnalyser.icc:323
GETSystemAnalyser(GETSystem *get=NULL)
Definition: GETSystemAnalyser.cpp:33
void ClearAmplitudeData()
Definition: GETSystemAnalyser.cpp:2714
double resol_min
Lower limit of amplitude axis.
Definition: GETSystemAnalyser.hh:549
virtual bool ConfigCommand(const GString &code, const GString &args="", FILE *fptr=NULL)
Definition: GETSystemAnalyser.cpp:815
bool IsFullRecSet() const
Definition: GETSystemAnalyser.icc:90
virtual void SetRecTmax(double t)
Definition: GETSystemAnalyser.cpp:345
double ** mmax_time
Maxima times arrays for each channel.
Definition: GETSystemAnalyser.hh:530
virtual int OutputCorrection()
Definition: GETSystemAnalyser.icc:118
TH1D * GetChannelsMaxCorHisto() const
Definition: GETSystemAnalyser.icc:295
double fluct_warn
Baseline fluctuation value to issue a warning.
Definition: GETSystemAnalyser.hh:565
TH1D * h_channels_rms
Pointer to the channels RMS analysis summary histogram.
Definition: GETSystemAnalyser.hh:559
double GetMultiMaxTime(u_int ich, u_int imax) const
Definition: GETSystemAnalyser.icc:283
bool mmax_computed
Whether multiple maxima analysis is performed.
Definition: GETSystemAnalyser.hh:521
bool cor_analysed
Whether the corrected data analysis is performed.
Definition: GETSystemAnalyser.hh:477
virtual int CalcChannelAmplitude(u_int ic, double &vmax, double &tmax, double &wid)
Definition: GETSystemAnalyser.cpp:2066
TH1D * CreateChannelsHisto1D(const string &name, const string &ytit="", bool fpn=true)
Definition: GETSystemAnalyser.cpp:3939
u_short GetAmplitudeMode() const
Definition: GETSystemAnalyser.icc:164
double GetMultiMaxWidth(u_int ich, u_int imax) const
Definition: GETSystemAnalyser.icc:272
RRealSampleFFT GETSample
Define the data type for samples.
Definition: GETCommon.hh:31
void SetFullRec(bool b=true)
Definition: GETSystemAnalyser.icc:86
u_int GetChannelNumber() const
Definition: GETSystemAnalyser.icc:16
u_short select_data_signal
Information on the channel data for signal analysis: GET::signalOut (default), GET::signalTst or GET:...
Definition: GETSystemAnalyser.hh:468
virtual int GetChannelFctAmplitude(u_int ic, double &vmax, double &tmax, double &wid)
Definition: GETSystemAnalyser.cpp:1783
int FillAllChannelsHisto(TH1D **htab, bool reset=true)
Definition: GETSystemAnalyser.cpp:4444
bool IsResolutionAnalysisON() const
Definition: GETSystemAnalyser.icc:357
TH1D * GetBaseFluctuationsHisto() const
Definition: GETSystemAnalyser.icc:372
virtual void ClearBaseFluctuations()
Definition: GETSystemAnalyser.cpp:3634
double GetChannelWidth(u_int ich) const
Definition: GETSystemAnalyser.icc:194
double resol_max
Upper limit of amplitude axis.
Definition: GETSystemAnalyser.hh:550
void SetAmplitudeMode(u_short mode, double win=0.)
Definition: GETSystemAnalyser.cpp:1966
int GetMultiMaxTotal() const
Definition: GETSystemAnalyser.icc:233
virtual void SetNoiseRange(u_int i0=2, u_int i1=509)
Definition: GETSystemAnalyser.cpp:3246
TH2I * h_resol_ampl
Pointer to the channels versus amplitude maximum histogram.
Definition: GETSystemAnalyser.hh:552
ClassDef(GETSystemAnalyser, 0)
virtual void Reset()
Definition: GETSystemAnalyser.cpp:196
double rec_tmin
Analysis time lower limits for reconstructed signal.
Definition: GETSystemAnalyser.hh:481
u_int mmax_tot
Total number of maxima for all channels.
Definition: GETSystemAnalyser.hh:524
virtual void InitBaseFluctuations(u_int i0=2, u_int i1=32, double warn=0.)
Definition: GETSystemAnalyser.cpp:3559
double * amax_width
Array of width values.
Definition: GETSystemAnalyser.hh:508
Definition: GETSystemAnalyser.hh:453
TH2I * CreateChannelsHisto2I(const string &name, int ny, double ymin, double ymax, const string &ytit="", bool fpn=true)
Definition: GETSystemAnalyser.cpp:4040
void InitAmplitudeData()
Definition: GETSystemAnalyser.cpp:2611
u_int GetNoiseIndexMin() const
Definition: GETSystemAnalyser.icc:336
int data_num_bad
Number of bad channels in analysis of the data per channel.
Definition: GETSystemAnalyser.hh:538
u_int fluct_imin
Lower limit for baseline fluctuations analysis.
Definition: GETSystemAnalyser.hh:563
u_short amplitude_mode
Signal amplitude analysis mode.
Definition: GETSystemAnalyser.hh:499
virtual void ClearResolutionAnalysis()
Definition: GETSystemAnalyser.cpp:3468
TH1I * CreateChannelsHisto1I(const string &name, const string &ytit="", bool fpn=true)
Definition: GETSystemAnalyser.cpp:4006
TH1D * h_channels_time_raw
Pointer to the channels summary histogram with maximum raw output values.
Definition: GETSystemAnalyser.hh:493
virtual ~GETSystemAnalyser()
Definition: GETSystemAnalyser.cpp:184
void SetAmplitudeWindow(double win)
Definition: GETSystemAnalyser.cpp:2005
bool raw_analysed
Whether the raw data analysis is performed.
Definition: GETSystemAnalyser.hh:476
TH1D * GetChannelsNoiseHisto() const
Definition: GETSystemAnalyser.icc:346
double GetChannelTime(u_int ich) const
Definition: GETSystemAnalyser.icc:187
virtual int AnalyseRunStop()
Definition: GETSystemAnalyser.cpp:398
void SetEventsSkip(u_int n)
Definition: GETSystemAnalyser.icc:25
TH2D * CreateFullEventCorHisto(const string &hname)
Definition: GETSystemAnalyser.cpp:1678
u_int GetNoiseIndexMax() const
Definition: GETSystemAnalyser.icc:342
virtual void InitFPNtest(u_int i1min, u_int i1max, u_int i2min, u_int i2max, double dmin, double dmax)
Definition: GETSystemAnalyser.cpp:3787
u_int rms_imax
Upper limit for RMS analysis.
Definition: GETSystemAnalyser.hh:558
virtual int AnalyseRunStart()
Definition: GETSystemAnalyser.cpp:392
bool amax_computed
Whether the maximum amplitude / time is computed.
Definition: GETSystemAnalyser.hh:506
TH2D * h_full_event_cor
Pointer to the histogram with full data after corrections (if any)
Definition: GETSystemAnalyser.hh:488
u_int rec_itmin
Analysis lower time bin for reconstructed signal.
Definition: GETSystemAnalyser.hh:483
static const u_short dataAmplitude
Computed signal amplitude (depends on amplitude mode)
Definition: GETCommon.hh:121
bool rms_on
Whether noise analysis is ON.
Definition: GETSystemAnalyser.hh:556
TH1D * h_channels_max_raw
Pointer to the channels summary histogram with maximum raw output values.
Definition: GETSystemAnalyser.hh:491
TH2D * CreateFullEventRawHisto(const string &hname)
Definition: GETSystemAnalyser.cpp:1661
virtual bool IsChannelBad(u_int ich) const
Definition: GETSystemAnalyser.icc:127
double data_cont_max
Maximum variation for continuity.
Definition: GETSystemAnalyser.hh:543
u_short GetTimingMode() const
Definition: GETSystemAnalyser.icc:168
virtual int ProcessDataContinuityCheck()
Definition: GETSystemAnalyser.cpp:3201
TH1D * CreateChannelSummaryHisto(const string &name, bool fpn=true)
Definition: GETSystemAnalyser.icc:420
GObject(GETSystemAnalyser)
void SetSelectedSignalData(u_short id)
Definition: GETSystemAnalyser.icc:61
u_int * mmax_num
Number of maxima for each channel.
Definition: GETSystemAnalyser.hh:525
int GetMultiMaxNum(u_int ich) const
Definition: GETSystemAnalyser.icc:244
TH2D * CreateFullEventHisto(const string &name, bool fpn=true)
Definition: GETSystemAnalyser.cpp:4082
u_int GetAnalysisEventsCounter()
Definition: GETSystemAnalyser.icc:33
virtual u_int GetMaximumChannel() const
Definition: GETSystemAnalyser.icc:146
TH2D * GetFullEventCorHisto() const
Definition: GETSystemAnalyser.icc:157
double * amax_amplitude
Array of maximum amplitude values.
Definition: GETSystemAnalyser.hh:507
u_int fpn_test_i1max
Upper limit for average of the begining of the time window.
Definition: GETSystemAnalyser.hh:574
bool IsNoiseAnalysisON() const
Definition: GETSystemAnalyser.icc:350
virtual void ClearAnalysis()
Definition: GETSystemAnalyser.cpp:379
TH2D * GetFullEventRawHisto() const
Definition: GETSystemAnalyser.icc:153
u_int rec_itmax
Analysis upper time bin for reconstructed signal.
Definition: GETSystemAnalyser.hh:484
double timing_cfd_delay
CFD offset for timing analysis.
Definition: GETSystemAnalyser.hh:504
virtual double GetMaximumSignal() const
Definition: GETSystemAnalyser.icc:136
double GetRecTmax() const
Definition: GETSystemAnalyser.icc:98
bool data_num_on
Whether the analysis of number of data per channel is ON.
Definition: GETSystemAnalyser.hh:535
virtual int SetSystem(GETSystem *gptr)
Definition: GETSystemAnalyser.cpp:279
u_short select_data_hit
Information on the channel data to analyse for hit pattern: GET::signalOut (default), GET::signalTst or GET::signalRec.
Definition: GETSystemAnalyser.hh:467
u_int GetRecITmax() const
Definition: GETSystemAnalyser.icc:106
virtual int ProcessDataNumberCheck()
Definition: GETSystemAnalyser.cpp:2926
Definition: GETSystem.hh:147
bool IsDataNumberCheckON() const
Definition: GETSystemAnalyser.icc:302
bool IsMultiMaxDefined() const
Definition: GETSystemAnalyser.icc:226
bool channel_bad_flag
Whether there are bad channels.
Definition: GETSystemAnalyser.hh:471
virtual bool ContinuityCheck(GETSample &sample)
Definition: GETSystemAnalyser.cpp:3170
double ch_max_signal
Maximum channel amplitude value.
Definition: GETSystemAnalyser.hh:511
bool data_cont_on
Whether the analysis of data discontinuity is ON.
Definition: GETSystemAnalyser.hh:542