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 
15 #include "RExtremaFinder.hh"
16 
17 #include "TFitResultPtr.h"
18 #include "TFitResult.h"
19 
20 
21 //======================================================================
22 /*! \class GETSystemAnalyser
23  *
24  * This is a base class for various analysis of experimental data
25  * from the GETSystem objects.
26  * When a GETSystemAnalyser object is associated to a GETSystem object,
27  * the analysis functions from this class are called by the GETSystem
28  * specific functions:
29  * - GETSystemAnalyser::AnalyseRunStart at the beginning of a run processing
30  * - GETSystemAnalyser::AnalyseRunStop at the end of a run processing
31  * - GETSystemAnalyser::AnalyseRawEvent when a new event has been read from
32  * a run file, \b before corrections are applied to the output samples
33  * - GETSystemAnalyser::AnalyseCorEvent when a new event has been read from
34  * a run file, \b after corrections are applied to the output samples
35  *
36  * In addition, the function GETSystemAnalyser::ClearAnalysis may
37  * be called when all analysis data should be resetted.
38  * Note that this function is never called by the GETSystem class.
39  *
40  * The GETSystemAnalyser::ClearEvent function is automatically called
41  * by the GETSystem object when its clears its own event data.
42  *
43  * This class may be derived in order to perform specific analysis,
44  * eventually from a derived class of GETSystem: see for example
45  * the GETActarDemAnalyser for the GETActarDem system class.
46  *
47  * \note
48  * When a GETSystemAnalyser (or derived) class object is used to perform
49  * events analysis while the events are not read using the GETSystem
50  * (or derived) object event processing functions, then the analyser
51  * functions (GETSystemAnalyser::AnalyseRunStart,
52  * GETSystemAnalyser::AnalyseRunStop, GETSystemAnalyser::AnalyseRawEvent and
53  * GETSystemAnalyser::AnalyseCorEvent) are not called automatically.\n
54  * This for example the case when events are read from simulation and
55  * imported in a GETSystem object.
56  * In this case, the functions must be explicitely called for the
57  * analysis to be performed and the histograms to be filled properly.
58  *
59  *
60  * The GETSystemAnalyser class can perform various types of analysis,
61  * depending on what has been defined in terms of analysis parameters and
62  * histograms.
63  *
64  * The analysis available for the base class are:
65  *
66  * - <B>automatic histograms</B> filling, if the histograms have been
67  * defined with the functions:
68  * - GETSystemAnalyser::CreateFullEventRawHisto and
69  * GETSystemAnalyser::CreateFullEventCorHisto for full
70  * event 2D histograms with all samples of all channels
71  * (raw or corrected output)
72  * - GETSystemAnalyser::CreateChannelsMaxRawHisto and
73  * GETSystemAnalyser::CreateChannelsMaxCorHisto for summary
74  * histograms with maximum amplitude of all channels
75  * (raw or corrected output)
76  *
77  * - <B>predefined analysis</B> (see \ref get_analyser):
78  * - check of the <B>number of data (time buckets) per channel</B>
79  * (performed on raw outputs): \ref get_analyser_datanum
80  * - check of the <B>data continuity</B>
81  * (performed on raw outputs): \ref get_analyser_datacont
82  * - <B>noise analysis</B> (performed on corrected outputs):
83  * \ref get_analyser_noise
84  * - <B>baseline fluctuations</B> analysis: the baseline of current
85  * event is compared to the average baseline of previous events
86  * (performed on raw outputs): \ref get_analyser_baseline
87  * - <B>resolution</B> analysis: the maximum signal amplitude variation
88  * is computed: \ref get_analyser_resolution (meaningful only for
89  * constant signal such as pulser calibration).
90  *
91  * In addition, it is possible to read the analysis parameters from a
92  * text file: see functions GETSystemAnalyser::ReadConfigFile and
93  * GETSystemAnalyser::ConfigCommand.
94  *
95  */
96 //======================================================================
97 /*! \page get_analyser GET system analyser predefined analysis
98  *
99  * This page presents the procedures defined for the various analysis
100  * available in the GET system analyser class.
101  * The base class for analysis is GETSystemAnalyser.
102  *
103  * These analyses should be defined \b after the GET system has been created
104  * with its number of modules and channels.
105  *
106  * - \ref get_analyser_noise
107  * - \ref get_analyser_baseline
108  * - \ref get_analyser_resolution
109  * - \ref get_analyser_datanum
110  * - \ref get_analyser_datacont
111  *
112  *
113  *
114  * \section get_analyser_noise Noise monitoring analysis
115  *
116  * The noise analysis evaluates, on an event by event basis, the signal
117  * RMS of each channel.
118  *
119  * The analysis is created when defining the samples interval \f$[i_0;i_1]\f$
120  * on which the noise is estimated (function GETSystemAnalyser::SetNoiseRange).
121  * The interval must be selected so that it has very little chance that
122  * a real signal appears in this range.
123  * This is in principle achieved at the beginning of the sample, if the
124  * trigger delay from GET electronics is set properly.
125  *
126  * The analysis is performed by the analyser on corrected outputs
127  * (FPN, baseline...), namely in the GETSystemAnalyser::AnalyseCorEvent
128  * function (automatically called by the GETSystem::ReadEvent function).
129  *
130  * For a given channel \e j, the average of the channel signal \f$S_{j}\f$
131  * is computed in the \f$[i_0;i_1]\f$ interval:
132  * \f[\left< S_{j} \right> = \frac{1}{i_1 - i_0 + 1}
133  \cdot \sum_{i=i_0}^{i_1} S_j[i]\f]
134  *
135  * Then the corresponding RMS:
136  * \f[\Delta S_{j} = \sqrt{ \frac{1}{i_1 - i_0 + 1}
137  \cdot \sum_{i=i_0}^{i_1}
138  \left(S_j[i] - \left< S_{j} \right>\right)^2}\f]
139  *
140  * This RMS is the estimated noise for the channel.
141  * The analysis is performed on corrected outputs (FPN, baseline...)
142  * in the GETSystemAnalyser::AnalyseCorEvent function.
143  *
144  * If the noise analysis is defined, when an event is analysed, the RMS
145  * computed for each channel is stored in an histogram
146  * (GETSystemAnalyser::GetChannelsNoiseHisto).
147  *
148  * This analysis does not work when the zero suppress mode is active.
149  *
150  *
151  * \image html "AnalyserNoise_Event.png"
152  * This picture shows the noise histogram for one event, indicating
153  * an abnormal noise level for channels around number 2000, compared
154  * to the other system channels.
155  *
156  * \image html "AnalyserNoise_Pads.png"
157  * The noise analysis functions are overloaded in the GETActarDemAnalyser
158  * class to define also a noise histogram for the ACTAR TPC (demonstrator)
159  * pad layout (following the GETSystem lookup table).
160  * This picture shows the same event as the previous picture, for pads
161  * instead of electronics channels.
162  *
163  * \image html "AnalyserNoise_Cumul.png"
164  * It is possible to cumulate the results for all events in a 2D histogram
165  * using the GETSystemAnalyser::FillCumulNoiseHisto.
166  *
167  *
168  *
169  * \section get_analyser_baseline Baseline fluctuations monitoring analysis
170  *
171  * While the noise analysis is defined for a single event, the
172  * <B>baseline fluctuation</B> analysis compares the current event
173  * to the previous ones, to check that the system is in stable
174  * conditions.
175  * It appears to be a good monitor for the AsAd-AGET calibration and
176  * clock alignment.
177  *
178  * The analysis is created by the GETSystemAnalyser::InitBaseFluctuations
179  * function.
180  * Like for the noise analysis, the time buckets interval \f$[i_0;i_1]\f$
181  * must be chosen so that real signal should not appear in the analysis
182  * range.
183  * Note that the interval may be different than the one used for the
184  * noise analysis.
185  * In addition, a warnig threshold is also defined: if the baseline
186  * fluctuation overpasses this threshold for one or more channels, a
187  * warning is issued on the terminal output.
188  *
189  * Since the analysis compares current event to the previous ones,
190  * it requires several events before being effective.
191  * The analysis works as follows:
192  * - for the first few events, only the average (over events) baseline
193  * is built;
194  * - for event number \e n, the average baseline (from previous
195  * events) of channel \e j is:
196  * \f[\left< B_{j}^{(n)} \right> = \frac{1}{n - 1}
197  \cdot \sum_{k=0}^{n-1}
198  \left< S_j^{(k)} \right>_{[i_0;i_1]}\f]
199  * where \f$\left< S_{j}^{(k)} \right>\f$ is computed, for event \e k in
200  * the same way than for noise analysis;
201  * - for a given channel, the signal is taken into account only if the
202  * channel contains data;
203  * - the baseline variation for channel \e j of event \e n is:
204  * \f[\Delta B_{j}^{(n)} = \left< B_{j}^{(n)} \right> - \left< S_{j}^{(n)} \right>\f]
205  *
206  * This baseline fluctuations analysis is performed on the raw data, in
207  * GETSystemAnalyser::AnalyseRawEvent function.
208  *
209  * If the analysis is defined, when an event is analysed, the baseline
210  * fluctuation for each channel is stored in an histogram
211  * (GETSystemAnalyser::GetBaseFluctuationsHisto).
212  *
213  * This analysis does not work when the zero suppress mode is active.
214  *
215  *
216  * \image html "AnalyserBaseline_Event.png"
217  * This picture shows the baseline fluctuation histogram for one event,
218  * indicating a problem for channels around 1000-1100.
219  *
220  * \image html "AnalyserBaseline_Cumul.png"
221  * It is possible to cumulate the results for all events in a 2D histogram
222  * using the GETSystemAnalyser::FillCumulFluctuationsHisto.
223  *
224  *
225  *
226  * \section get_analyser_resolution Maximum amplitude resolution analysis
227  *
228  * The resolution analysis proposes a tool to estimate the channel
229  * resolution for run files with constant signal on each channel,
230  * such as pulser calibration measurements.
231  *
232  * The analysis stores, on an event by event basis, the maximum amplitude
233  * of all channel in a 2D histogram (channel number versus amplitude).
234  * Then the RMS is computed for each channel, and stored in the
235  * \b resolution histogram, that is recomputed for each event.
236  *
237  * Note: it has been designed to optimize the GET clocks offsets.
238  *
239  *
240  * \section get_analyser_datanum Channels data count monitoring analysis
241  *
242  * This analysis checks the number of data (from the circular buffer
243  * memory) have been read from the data frame, for each channel.
244  * In principle, for a sample depth of 512 time buckets, this
245  * number should be exactly 512 or 0 (if partial readout mode is on).
246  * This is true if the zero suppress mode is off.
247  *
248  * The analysis is defined by the GETSystemAnalyser::InitDataNumberCheck
249  * function, that sets the interval \f$[n_0;n_1]\f$ in which the number
250  * of read data is considered bad.
251  * This interval should be for example \f$[0;511]\f$ in full readout mode
252  * and \f$[1;511]\f$ in partial readout mode.
253  *
254  * When analysing an event, if some channels have a number of data in
255  * this interval, a warning is issued.
256  *
257  *
258  *
259  * \section get_analyser_datacont Data continuity (or accidents) monitoring analysis
260  *
261  * A possible result of problems in the GET system hardware configuration
262  * process is to get corrupted data.
263  * This may happen in several ways, like the example below or with
264  * absolutly inconsistant channels data.
265  *
266  * The data continuity proposes a test based on a maximum accepted variation
267  * \e dmax between values of contiguous time buckets.
268  * This limit is set by the GETSystemAnalyser::InitDataContinuityCheck
269  * function.
270  *
271  * In order to accept fast signal variations that may happen (for short
272  * peaking times), the analysis test checks an abnormal increase and
273  * decrease of the signal (or the inverse).
274  *
275  * \image html "AnalyserContinuity_Event.png"
276  * This picture illustrate the type of problem that can be detected
277  * by the continuity analysis.
278  *
279  */
280 
282 {
283  //------------------------------------------------------------
284  /*! \object_doc */
286  //------------------------------------------------------------
287 
288  friend class GETSystem;
289 
290  protected:
291 
292  GETSystem * get_ptr; ///< Pointer to the GET system object
293  GETHitMask * hit_mask; ///< Pointer to the hit mask (same as base class hit mask, but known as GETHitMaskXY)
294 
295  u_short selected_data; ///< Information on the channel data to analyse: GET::signalOut (default), GET::signalTst or GET::signalRec
296 
297  bool * channel_bad; ///< Whether the channel contains bad data
298  bool channel_bad_flag; ///< Whether there are bad channels
299 
300  u_int events_count; ///< Number of events since analysis cleard
301  u_int events_skip; ///< Number of first events to skip for analysis
302 
303  // Full events histograms
304  TH2D * h_full_event_raw; ///< Pointer to the histogram with full raw data (before processing)
305  TH2D * h_full_event_cor; ///< Pointer to the histogram with full data after corrections (if any)
306 
307  // Channels maximum analysis
308  TH1D * h_channels_max_raw; ///< Pointer to the channels summary histogram with maximum raw output values
309  TH1D * h_channels_max_cor; ///< Pointer to the channels summary histogram with maximum corrected output values
310  TH1I * h_channels_data_num; ///< Pointer to the channels summary histogram with number of raw data per channel
311 
312  // the followings are defined to avoid calculating several times
313  // the same data
314  u_short amplitude_mode; ///< Signal amplitude analysis mode
315  double amplitude_window; ///< Signal amplitude analysis window size (for fit or average)
316 
317  u_short timing_mode; ///< Signal timing analysis mode
318  double timing_cfd_fraction; ///< CFD fraction for timing analysis
319  double timing_cfd_delay; ///< CFD offset for timing analysis
320 
321  bool amax_computed; ///< Whether the maximum amplitude / time is computed
322  double * amax_amplitude; ///< Array of maximum amplitude values
323  double * amax_time; ///< Array of maximum amplitude times
324 
325  double ch_max_signal; ///< Maximum channel amplitude value
326  u_int ch_max_index; ///< Channel with maximum amplitude
327 
328  // multiple maxima analysis (only for pads, not for FPN)
329  RExtremaFinder mmax_finder; ///< Multiple maxima analyser
330  bool mmax_analysis; ///< Whether multiple maxima analysis is requested
331  bool mmax_computed; ///< Whether multiple maxima analysis is performed
332  u_int mmax_max; ///< Maximum number of maxima per channel
333  u_int * mmax_num; ///< Number of maxima for each channel
334  double ** mmax_amplitude; ///< Maxima values arrays for each channel
335  double ** mmax_time; ///< Maxima times arrays for each channel
336  double mmax_scale; ///< Scaling factor for amplitude
337 
338  // Number of data per channel
339  bool data_num_on; ///< Whether the analysis of number of data per channel is ON
340  int data_num_min; ///< Lower value for bad range of data / channel
341  int data_num_max; ///< Upper value for bad range of data / channel
342  int data_num_bad; ///< Number of bad channels in analysis of the data per channel
343 
344  // Data continuity check
345  bool data_cont_on; ///< Whether the analysis of data discontinuity is ON
346  double data_cont_max; ///< Maximum variation for continuity
347  int data_cont_bad; ///< Number of bad channels in analysis of the data continuity
348 
349  // Amplitude resolution analysis
350  bool resol_on; ///< Whether amplitude resolution analysis is ON
351  int resol_dim; ///< Dimension of amplitude axis
352  double resol_min; ///< Lower limit of amplitude axis
353  double resol_max; ///< Upper limit of amplitude axis
354  double resol_step; ///< Lower limit of amplitude axis
355  TH2I * h_resol_ampl; ///< Pointer to the channels versus amplitude maximum histogram
356  TH1D * h_resol_rms; ///< Pointer to the channels amplitude variations histogram
357 
358  // Noise analysis
359  bool rms_on; ///< Whether noise analysis is ON
360  u_int rms_imin; ///< Lower limit for RMS analysis
361  u_int rms_imax; ///< Upper limit for RMS analysis
362  TH1D * h_channels_rms; ///< Pointer to the channels RMS analysis summary histogram
363 
364  // Baseline fluctuations analysis
365  bool fluct_on; ///< Whether baseline fluctuations analysis is ON
366  u_int fluct_imin; ///< Lower limit for baseline fluctuations analysis
367  u_int fluct_imax; ///< Upper limit for baseline fluctuations analysis
368  double fluct_warn; ///< Baseline fluctuation value to issue a warning
369  int fluct_bad; ///< Number of bad channels in fluctuations analysis
370  double * fluct_sum; ///< Cumulated values for baseline check
371  int * fluct_cnt; ///< Number of events for baseline check
372  TH1D * h_channels_fluct; ///< Pointer to the channels baseline fluctuations analysis summary average histogram
373 
374 
375  public:
376  //----------------------------------------------------------
377  /** @name Constructors, affectation, destructor */
378  //@{
379  GETSystemAnalyser ( GETSystem * get = NULL );
380  virtual ~GETSystemAnalyser ( );
381  //@}
382 
383  //----------------------------------------------------------
384  /** @name General functions */
385  //@{
386  virtual void Reset ( );
387  virtual int SetSystem ( GETSystem * gptr );
388  u_int GetChannelNumber ( ) const; // inline
389 
390  void SetEventsSkip ( u_int n ); // inline
391  u_int GetEventsSkip ( ); // inline
392  u_int GetAnalysisEventsCounter ( ); // inline
393 
394  void SetSelectedData ( u_short id ); // inline
395  int GetSelectedData ( ) const; // inline
396  //@}
397 
398  //----------------------------------------------------------
399  /** @name Main analysis functions, called by GETSystem */
400  //@{
401  virtual void ClearAnalysis ( );
402  virtual int AnalyseRunStart ( );
403  virtual int AnalyseRunStop ( );
404 
405  virtual void ClearEvent ( );
406  virtual int AnalyseRawEvent ( );
407  virtual int AnalyseCorEvent ( );
408 
409  virtual void BadChannelsWarning ( );
410 
411  virtual double GetMaximumSignal ( ) const; // inline
412  virtual u_int GetMaximumChannel ( ) const; // inline
413  //@}
414 
415  //----------------------------------------------------------
416  /** @name Predefined analysis configuration files */
417  //@{
418  virtual int ReadConfigFile ( const string & cfg );
419  virtual int ReadConfigFile ( FILE * fp );
420  virtual bool ConfigCommand ( const GString & code, const GString & args = "", FILE * fptr = NULL );
421  //@}
422 
423  //----------------------------------------------------------
424  /** @name Full event data */
425  //@{
426  TH2D * CreateFullEventRawHisto ( const string & hname );
427  TH2D * CreateFullEventCorHisto ( const string & hname );
428 
429  TH2D * GetFullEventRawHisto ( ) const; // inline
430  TH2D * GetFullEventCorHisto ( ) const; // inline
431  //@}
432 
433  //----------------------------------------------------------
434  /** @name Channels amplitude analysis */
435  //@{
436  void SetAmplitudeMode ( u_short mode, double win = 0. );
437  void SetAmplitudeWindow ( double win );
438 
439  void SetTimingMode ( u_short mode );
440  void SetTimingModeCFD ( double frac, double delay );
441 
442  virtual int CalcChannelOutput ( u_int ic, double & vmax, double & tmax );
443  virtual int CalcChannelMaxima ( u_int ic );
444  void SetMaximaScaling ( double fact ); // inline
445 
446  void InitAmplitudeData ( );
447  void InitMaximaData ( );
448  void ResetMaximaData ( );
449  void ClearAmplitudeData ( );
450  bool IsAmplitudeDataComputed ( ) const; // inline
451  bool IsMaximaDataComputed ( ) const; // inline
452  virtual void ComputeAmplitudeData ( );
453 
454  TH1D * CreateChannelsMaxRawHisto ( const string & hname );
455  TH1D * CreateChannelsMaxCorHisto ( const string & hname );
456 
457  TH1D * GetChannelsMaxRawHisto ( ) const; // inline
458  TH1D * GetChannelsMaxCorHisto ( ) const; // inline
459  //@}
460 
461  //----------------------------------------------------------
462  /** @name Analysis of number of data per channel */
463  //@{
464  virtual void InitDataNumberCheck ( u_int n0, u_int n1 );
465  bool IsDataNumberCheckON ( ) const; // inline
466 
467  virtual int ProcessDataNumberCheck ( );
468  virtual int GetDataNumberBadCount ( ) const; // inline
469  //@}
470 
471  //----------------------------------------------------------
472  /** @name Analysis of data continuity */
473  //@{
474  virtual void InitDataContinuityCheck ( double dmax );
475  bool IsDataContinuityCheckON ( ) const; // inline
476 
477  virtual bool ContinuityCheck ( GETSample & sample );
478  virtual int ProcessDataContinuityCheck ( );
479  virtual int GetDataContinuityBadCount ( ) const; // inline
480  //@}
481 
482  //----------------------------------------------------------
483  /** @name Noise analysis */
484  //@{
485  virtual void SetNoiseRange ( u_int i0 = 2, u_int i1 = 509 );
486  u_int GetNoiseIndexMin ( ) const; // inline
487  u_int GetNoiseIndexMax ( ) const; // inline
488  TH1D * GetChannelsNoiseHisto ( ) const; // inline
489  bool IsNoiseAnalysisON ( ) const; // inline
490 
491  virtual int ProcessNoiseAnalysis ( );
492  virtual int FillCumulNoiseHisto ( TH2 * hptr );
493  //@}
494 
495  //----------------------------------------------------------
496  /** @name Amplitude resolution analysis */
497  //@{
498  virtual void InitResolutionAnalysis ( int n, double amin, double amax );
499  virtual void ClearResolutionAnalysis ( );
500  bool IsResolutionAnalysisON ( ) const; // inline
501  TH2I * GetResolutionMaxHisto ( ) const; // inline
502  TH1D * GetResolutionHisto ( ) const; // inline
503 
504  virtual int ProcessResolutionAnalysis ( );
505 
506  //@}
507 
508  //----------------------------------------------------------
509  /** @name Baseline fluctuations analysis */
510  //@{
511  virtual void InitBaseFluctuations ( u_int i0 = 2, u_int i1 = 32, double warn = 0. );
512  virtual void ClearBaseFluctuations ( );
513  TH1D * GetBaseFluctuationsHisto ( ) const; // inline
514  bool IsFluctuationsAnalysisON ( ) const; // inline
515 
516  virtual int ProcessFluctuationsAnalysis ( );
517  virtual int GetFluctuationsBadCount ( ) const; // inline
518  virtual int FillCumulFluctuationsHisto ( TH2 * hptr );
519  //@}
520 
521 
522  //----------------------------------------------------------
523  /** @name ROOT related functions */
524  //@{
525  public:
526 
527  TH1D * CreateChannelsHisto1D ( const string & name, const string & ytit = "", bool fpn = true );
528  TH2D * CreateChannelsHisto2D ( const string & name, int ny, double ymin, double ymax, const string & ytit = "", bool fpn = true );
529  TH1I * CreateChannelsHisto1I ( const string & name, const string & ytit = "", bool fpn = true );
530  TH2I * CreateChannelsHisto2I ( const string & name, int ny, double ymin, double ymax, const string & ytit = "", bool fpn = true );
531 
532  // the filling functions may be used for Tst, Out or Rec signals from
533  // the GET system channels
534 
535  TH2D * CreateFullEventHisto ( const string & name, bool fpn = true );
536  TH2D * CreateFullEventHisto ( const string & name,
537  int ny, double ymin, double ymax, bool fpn = true ); // inline
538  int FillFullEventHisto ( TH2D * hptr, bool reset = true, bool fpn = true, double scale = 1. );
539 
540  TH1D * CreateChannelSummaryHisto ( const string & name, bool fpn = true ); // inline
541  int FillChannelsSummaryHisto ( TH1D * hptr, u_short mode = GET::dataMaxSignal, bool fpn = true, bool reset = true );
542  int CumulChannelsSummaryHisto ( TH2 * hptr, u_short mode = GET::dataMaxSignal, bool fpn = true );
543 
544  TH1D ** CreateAllChannelsHisto ( const string & prefix = "GET_", const string & suffix = "" );
545  int FillAllChannelsHisto ( TH1D ** htab, bool reset = true );
546 
547  /*! for use within ROOT.*/
549  //@}
550 };
551 
552 
553 //----------------------------------------------------------------------
554 // Inline functions
555 #include "icc/GETSystemAnalyser.icc"
556 
557 
558 //======================================================================
559 #endif
560 
int * fluct_cnt
Number of events for baseline check.
Definition: GETSystemAnalyser.hh:371
bool IsAmplitudeDataComputed() const
Definition: GETSystemAnalyser.icc:82
void SetMaximaScaling(double fact)
Definition: GETSystemAnalyser.icc:98
TH2D * CreateChannelsHisto2D(const string &name, int ny, double ymin, double ymax, const string &ytit="", bool fpn=true)
Definition: GETSystemAnalyser.cpp:2251
double * amax_time
Array of maximum amplitude times.
Definition: GETSystemAnalyser.hh:323
RExtremaFinder mmax_finder
Multiple maxima analyser.
Definition: GETSystemAnalyser.hh:329
u_int events_count
Number of events since analysis cleard.
Definition: GETSystemAnalyser.hh:300
double ** mmax_amplitude
Maxima values arrays for each channel.
Definition: GETSystemAnalyser.hh:334
virtual int ProcessResolutionAnalysis()
Definition: GETSystemAnalyser.cpp:1930
int data_num_min
Lower value for bad range of data / channel.
Definition: GETSystemAnalyser.hh:340
virtual int AnalyseRawEvent()
Definition: GETSystemAnalyser.cpp:284
void SetTimingMode(u_short mode)
Definition: GETSystemAnalyser.cpp:1039
TH1D * GetResolutionHisto() const
Definition: GETSystemAnalyser.icc:167
virtual void ComputeAmplitudeData()
Definition: GETSystemAnalyser.cpp:1432
bool fluct_on
Whether baseline fluctuations analysis is ON.
Definition: GETSystemAnalyser.hh:365
GETSystem * get_ptr
Pointer to the GET system object.
Definition: GETSystemAnalyser.hh:292
int data_num_max
Upper value for bad range of data / channel.
Definition: GETSystemAnalyser.hh:341
void ResetMaximaData()
Definition: GETSystemAnalyser.cpp:1355
TH1D * h_channels_fluct
Pointer to the channels baseline fluctuations analysis summary average histogram. ...
Definition: GETSystemAnalyser.hh:372
u_short timing_mode
Signal timing analysis mode.
Definition: GETSystemAnalyser.hh:317
u_int GetEventsSkip()
Definition: GETSystemAnalyser.icc:25
TH1D * CreateChannelsMaxRawHisto(const string &hname)
Definition: GETSystemAnalyser.cpp:1475
void SetTimingModeCFD(double frac, double delay)
Definition: GETSystemAnalyser.cpp:1058
double mmax_scale
Scaling factor for amplitude.
Definition: GETSystemAnalyser.hh:336
virtual void ClearEvent()
Definition: GETSystemAnalyser.cpp:252
TH2I * GetResolutionMaxHisto() const
Definition: GETSystemAnalyser.icc:163
void InitMaximaData()
Definition: GETSystemAnalyser.cpp:1379
TH1D * CreateChannelsMaxCorHisto(const string &hname)
Definition: GETSystemAnalyser.cpp:1493
virtual void BadChannelsWarning()
Definition: GETSystemAnalyser.cpp:384
void SetSelectedData(u_short id)
Definition: GETSystemAnalyser.icc:36
static const u_short dataMaxSignal
Maximum value of signal data.
Definition: GETCommon.hh:115
u_int events_skip
Number of first events to skip for analysis.
Definition: GETSystemAnalyser.hh:301
virtual int GetFluctuationsBadCount() const
Definition: GETSystemAnalyser.icc:183
virtual void InitDataNumberCheck(u_int n0, u_int n1)
Definition: GETSystemAnalyser.cpp:1525
int FillFullEventHisto(TH2D *hptr, bool reset=true, bool fpn=true, double scale=1.)
Definition: GETSystemAnalyser.cpp:2390
TH1D * GetChannelsMaxRawHisto() const
Definition: GETSystemAnalyser.icc:102
TH1D * h_resol_rms
Pointer to the channels amplitude variations histogram.
Definition: GETSystemAnalyser.hh:356
bool mmax_analysis
Whether multiple maxima analysis is requested.
Definition: GETSystemAnalyser.hh:330
virtual int AnalyseCorEvent()
Definition: GETSystemAnalyser.cpp:339
bool * channel_bad
Whether the channel contains bad data.
Definition: GETSystemAnalyser.hh:297
u_int rms_imin
Lower limit for RMS analysis.
Definition: GETSystemAnalyser.hh:360
TH1D * h_channels_max_cor
Pointer to the channels summary histogram with maximum corrected output values.
Definition: GETSystemAnalyser.hh:309
virtual int ProcessFluctuationsAnalysis()
Definition: GETSystemAnalyser.cpp:2098
virtual int FillCumulFluctuationsHisto(TH2 *hptr)
Definition: GETSystemAnalyser.cpp:2159
int resol_dim
Dimension of amplitude axis.
Definition: GETSystemAnalyser.hh:351
virtual int GetDataContinuityBadCount() const
Definition: GETSystemAnalyser.icc:129
virtual int FillCumulNoiseHisto(TH2 *hptr)
Definition: GETSystemAnalyser.cpp:1814
TH2D * h_full_event_raw
Pointer to the histogram with full raw data (before processing)
Definition: GETSystemAnalyser.hh:304
double amplitude_window
Signal amplitude analysis window size (for fit or average)
Definition: GETSystemAnalyser.hh:315
virtual int ProcessNoiseAnalysis()
Definition: GETSystemAnalyser.cpp:1768
double * fluct_sum
Cumulated values for baseline check.
Definition: GETSystemAnalyser.hh:370
GETHitMask * hit_mask
Pointer to the hit mask (same as base class hit mask, but known as GETHitMaskXY)
Definition: GETSystemAnalyser.hh:293
u_int fluct_imax
Upper limit for baseline fluctuations analysis.
Definition: GETSystemAnalyser.hh:367
virtual int GetDataNumberBadCount() const
Definition: GETSystemAnalyser.icc:118
Definition: GETHitMask.hh:29
u_int mmax_max
Maximum number of maxima per channel.
Definition: GETSystemAnalyser.hh:332
int fluct_bad
Number of bad channels in fluctuations analysis.
Definition: GETSystemAnalyser.hh:369
virtual int ReadConfigFile(const string &cfg)
Definition: GETSystemAnalyser.cpp:439
double resol_step
Lower limit of amplitude axis.
Definition: GETSystemAnalyser.hh:354
bool resol_on
Whether amplitude resolution analysis is ON.
Definition: GETSystemAnalyser.hh:350
bool IsFluctuationsAnalysisON() const
Definition: GETSystemAnalyser.icc:178
TH1D ** CreateAllChannelsHisto(const string &prefix="GET_", const string &suffix="")
Definition: GETSystemAnalyser.cpp:2639
TH1I * h_channels_data_num
Pointer to the channels summary histogram with number of raw data per channel.
Definition: GETSystemAnalyser.hh:310
virtual void InitDataContinuityCheck(double dmax)
Definition: GETSystemAnalyser.cpp:1594
bool IsMaximaDataComputed() const
Definition: GETSystemAnalyser.icc:87
virtual int CalcChannelMaxima(u_int ic)
Definition: GETSystemAnalyser.cpp:1268
virtual void InitResolutionAnalysis(int n, double amin, double amax)
Definition: GETSystemAnalyser.cpp:1874
u_int ch_max_index
Channel with maximum amplitude.
Definition: GETSystemAnalyser.hh:326
double timing_cfd_fraction
CFD fraction for timing analysis.
Definition: GETSystemAnalyser.hh:318
int CumulChannelsSummaryHisto(TH2 *hptr, u_short mode=GET::dataMaxSignal, bool fpn=true)
Definition: GETSystemAnalyser.cpp:2554
virtual int CalcChannelOutput(u_int ic, double &vmax, double &tmax)
Definition: GETSystemAnalyser.cpp:1087
int data_cont_bad
Number of bad channels in analysis of the data continuity.
Definition: GETSystemAnalyser.hh:347
bool IsDataContinuityCheckON() const
Definition: GETSystemAnalyser.icc:125
GETSystemAnalyser(GETSystem *get=NULL)
Definition: GETSystemAnalyser.cpp:19
void ClearAmplitudeData()
Definition: GETSystemAnalyser.cpp:1409
double resol_min
Lower limit of amplitude axis.
Definition: GETSystemAnalyser.hh:352
virtual bool ConfigCommand(const GString &code, const GString &args="", FILE *fptr=NULL)
Definition: GETSystemAnalyser.cpp:550
double ** mmax_time
Maxima times arrays for each channel.
Definition: GETSystemAnalyser.hh:335
TH1D * GetChannelsMaxCorHisto() const
Definition: GETSystemAnalyser.icc:106
double fluct_warn
Baseline fluctuation value to issue a warning.
Definition: GETSystemAnalyser.hh:368
TH1D * h_channels_rms
Pointer to the channels RMS analysis summary histogram.
Definition: GETSystemAnalyser.hh:362
bool mmax_computed
Whether multiple maxima analysis is performed.
Definition: GETSystemAnalyser.hh:331
TH1D * CreateChannelsHisto1D(const string &name, const string &ytit="", bool fpn=true)
Definition: GETSystemAnalyser.cpp:2217
RRealSampleFFT GETSample
Define the data type for samples.
Definition: GETCommon.hh:27
u_int GetChannelNumber() const
Definition: GETSystemAnalyser.icc:12
int FillAllChannelsHisto(TH1D **htab, bool reset=true)
Definition: GETSystemAnalyser.cpp:2688
bool IsResolutionAnalysisON() const
Definition: GETSystemAnalyser.icc:159
TH1D * GetBaseFluctuationsHisto() const
Definition: GETSystemAnalyser.icc:174
virtual void ClearBaseFluctuations()
Definition: GETSystemAnalyser.cpp:2077
double resol_max
Upper limit of amplitude axis.
Definition: GETSystemAnalyser.hh:353
void SetAmplitudeMode(u_short mode, double win=0.)
Definition: GETSystemAnalyser.cpp:1007
int FillChannelsSummaryHisto(TH1D *hptr, u_short mode=GET::dataMaxSignal, bool fpn=true, bool reset=true)
Definition: GETSystemAnalyser.cpp:2469
virtual void SetNoiseRange(u_int i0=2, u_int i1=509)
Definition: GETSystemAnalyser.cpp:1700
TH2I * h_resol_ampl
Pointer to the channels versus amplitude maximum histogram.
Definition: GETSystemAnalyser.hh:355
ClassDef(GETSystemAnalyser, 0)
virtual void Reset()
Definition: GETSystemAnalyser.cpp:112
virtual void InitBaseFluctuations(u_int i0=2, u_int i1=32, double warn=0.)
Definition: GETSystemAnalyser.cpp:2002
Definition: GETSystemAnalyser.hh:281
TH2I * CreateChannelsHisto2I(const string &name, int ny, double ymin, double ymax, const string &ytit="", bool fpn=true)
Definition: GETSystemAnalyser.cpp:2318
void InitAmplitudeData()
Definition: GETSystemAnalyser.cpp:1329
u_int GetNoiseIndexMin() const
Definition: GETSystemAnalyser.icc:138
int data_num_bad
Number of bad channels in analysis of the data per channel.
Definition: GETSystemAnalyser.hh:342
u_int fluct_imin
Lower limit for baseline fluctuations analysis.
Definition: GETSystemAnalyser.hh:366
u_short amplitude_mode
Signal amplitude analysis mode.
Definition: GETSystemAnalyser.hh:314
virtual void ClearResolutionAnalysis()
Definition: GETSystemAnalyser.cpp:1914
TH1I * CreateChannelsHisto1I(const string &name, const string &ytit="", bool fpn=true)
Definition: GETSystemAnalyser.cpp:2284
virtual ~GETSystemAnalyser()
Definition: GETSystemAnalyser.cpp:100
void SetAmplitudeWindow(double win)
Definition: GETSystemAnalyser.cpp:1027
TH1D * GetChannelsNoiseHisto() const
Definition: GETSystemAnalyser.icc:148
virtual int AnalyseRunStop()
Definition: GETSystemAnalyser.cpp:243
void SetEventsSkip(u_int n)
Definition: GETSystemAnalyser.icc:21
TH2D * CreateFullEventCorHisto(const string &hname)
Definition: GETSystemAnalyser.cpp:982
u_int GetNoiseIndexMax() const
Definition: GETSystemAnalyser.icc:144
u_int rms_imax
Upper limit for RMS analysis.
Definition: GETSystemAnalyser.hh:361
virtual int AnalyseRunStart()
Definition: GETSystemAnalyser.cpp:237
bool amax_computed
Whether the maximum amplitude / time is computed.
Definition: GETSystemAnalyser.hh:321
u_short selected_data
Information on the channel data to analyse: GET::signalOut (default), GET::signalTst or GET::signalRe...
Definition: GETSystemAnalyser.hh:295
TH2D * h_full_event_cor
Pointer to the histogram with full data after corrections (if any)
Definition: GETSystemAnalyser.hh:305
bool rms_on
Whether noise analysis is ON.
Definition: GETSystemAnalyser.hh:359
TH1D * h_channels_max_raw
Pointer to the channels summary histogram with maximum raw output values.
Definition: GETSystemAnalyser.hh:308
TH2D * CreateFullEventRawHisto(const string &hname)
Definition: GETSystemAnalyser.cpp:965
double data_cont_max
Maximum variation for continuity.
Definition: GETSystemAnalyser.hh:346
virtual int ProcessDataContinuityCheck()
Definition: GETSystemAnalyser.cpp:1655
TH1D * CreateChannelSummaryHisto(const string &name, bool fpn=true)
Definition: GETSystemAnalyser.icc:211
GObject(GETSystemAnalyser)
u_int * mmax_num
Number of maxima for each channel.
Definition: GETSystemAnalyser.hh:333
TH2D * CreateFullEventHisto(const string &name, bool fpn=true)
Definition: GETSystemAnalyser.cpp:2360
u_int GetAnalysisEventsCounter()
Definition: GETSystemAnalyser.icc:29
virtual u_int GetMaximumChannel() const
Definition: GETSystemAnalyser.icc:63
TH2D * GetFullEventCorHisto() const
Definition: GETSystemAnalyser.icc:74
double * amax_amplitude
Array of maximum amplitude values.
Definition: GETSystemAnalyser.hh:322
bool IsNoiseAnalysisON() const
Definition: GETSystemAnalyser.icc:152
virtual void ClearAnalysis()
Definition: GETSystemAnalyser.cpp:224
TH2D * GetFullEventRawHisto() const
Definition: GETSystemAnalyser.icc:70
double timing_cfd_delay
CFD offset for timing analysis.
Definition: GETSystemAnalyser.hh:319
virtual double GetMaximumSignal() const
Definition: GETSystemAnalyser.icc:53
int GetSelectedData() const
Definition: GETSystemAnalyser.icc:43
bool data_num_on
Whether the analysis of number of data per channel is ON.
Definition: GETSystemAnalyser.hh:339
virtual int SetSystem(GETSystem *gptr)
Definition: GETSystemAnalyser.cpp:175
virtual int ProcessDataNumberCheck()
Definition: GETSystemAnalyser.cpp:1556
Definition: GETSystem.hh:126
bool IsDataNumberCheckON() const
Definition: GETSystemAnalyser.icc:113
bool channel_bad_flag
Whether there are bad channels.
Definition: GETSystemAnalyser.hh:298
virtual bool ContinuityCheck(GETSample &sample)
Definition: GETSystemAnalyser.cpp:1624
double ch_max_signal
Maximum channel amplitude value.
Definition: GETSystemAnalyser.hh:325
bool data_cont_on
Whether the analysis of data discontinuity is ON.
Definition: GETSystemAnalyser.hh:345