GET library
GETSystemAnalyser Class Reference

#include <GETSystemAnalyser.hh>

Inheritance diagram for GETSystemAnalyser:
GETActarTpcAnalyser

Public Member Functions

Constructors, affectation, destructor
 GETSystemAnalyser (GETSystem *get=NULL)
 
virtual ~GETSystemAnalyser ()
 
General functions
virtual void Reset ()
 
virtual int SetSystem (GETSystem *gptr)
 
GETSystemGetSystem ()
 
u_int GetChannelNumber () const
 
void SetEventsSkip (u_int n)
 
u_int GetEventsSkip ()
 
u_int GetAnalysisEventsCounter ()
 
virtual void IncrAnalysisEventCount ()
 
Analysis parameters
void SetSelectedData (u_short id)
 
void SetSelectedHitData (u_short id)
 
void SetSelectedSignalData (u_short id)
 
int GetSelectedHitData () const
 
int GetSelectedSignalData () const
 
void SetFullRec (bool b=true)
 
bool IsFullRecSet () const
 
virtual void SetRecTmin (double t)
 
virtual void SetRecTmax (double t)
 
virtual void SetRecTlimits (double t0, double t1)
 
double GetRecTmin () const
 
double GetRecTmax () const
 
u_int GetRecITmin () const
 
u_int GetRecITmax () const
 
Main analysis functions, called by GETSystem
virtual void ClearAnalysis ()
 
virtual int AnalyseRunStart ()
 
virtual int AnalyseRunStop ()
 
virtual void ClearEvent ()
 
virtual int OutputCorrection ()
 
virtual int AnalyseRawEvent ()
 
virtual int AnalyseCorEvent ()
 
virtual void BadChannelsWarning ()
 
virtual bool IsChannelBad (u_int ich) const
 
virtual u_int BadChannelCount () const
 
virtual double GetMaximumSignal () const
 
virtual u_int GetMaximumChannel () const
 
Predefined analysis configuration files
virtual int ReadConfigFile (const string &cfg)
 
virtual int ReadConfigFile (FILE *fp)
 
virtual bool ConfigCommand (const GString &code, const GString &args="", FILE *fptr=NULL)
 
Full event data
TH2D * CreateFullEventRawHisto (const string &hname)
 
TH2D * CreateFullEventCorHisto (const string &hname)
 
TH2D * GetFullEventRawHisto () const
 
TH2D * GetFullEventCorHisto () const
 
Channels amplitude analysis
virtual TF1 * PresetChannelFctParameters (double vmax, double tmax, double wid)
 
virtual int GetChannelFctAmplitude (u_int ic, double &vmax, double &tmax, double &wid)
 
virtual TF1 * SetChannelFctParameters (u_int ic)
 
void SetAmplitudeMode (u_short mode, double win=0.)
 
void SetAmplitudeWindow (double win)
 
u_short GetAmplitudeMode () const
 
void SetTimingMode (u_short mode)
 
void SetTimingModeCFD (double frac, double delay)
 
u_short GetTimingMode () const
 
virtual int CalcChannelAmplitude (u_int ic, double &vmax, double &tmax, double &wid)
 
virtual int CalcChannelMaxima (u_int ic)
 
void InitAmplitudeData ()
 
void InitMaximaData ()
 
void ResetMaximaData ()
 
void ClearAmplitudeData ()
 
virtual void ComputeAmplitudeData ()
 
bool IsAmplitudeDataComputed () const
 
double GetChannelAmplitude (u_int ich) const
 
double GetChannelTime (u_int ich) const
 
double GetChannelWidth (u_int ich) const
 
void SetMaximaScaling (double fact)
 
void SetMaximaDiffThreshold (double thr)
 
bool IsMaximaDataComputed () const
 
bool IsMultiMaxDefined () const
 
int GetMultiMaxTotal () const
 
double GetMultiMaxSumAll () const
 
int GetMultiMaxNum (u_int ich) const
 
double GetMultiMaxSum (u_int ich) const
 
double GetMultiMaxAmplitude (u_int ich, u_int imax) const
 
double GetMultiMaxWidth (u_int ich, u_int imax) const
 
double GetMultiMaxTime (u_int ich, u_int imax) const
 
TH1D * CreateChannelsMaxRawHisto (const string &hname)
 
TH1D * CreateChannelsMaxCorHisto (const string &hname)
 
TH1D * CreateChannelsTimeRawHisto (const string &hname)
 
TH1D * CreateChannelsTimeCorHisto (const string &hname)
 
TH1D * GetChannelsMaxRawHisto () const
 
TH1D * GetChannelsMaxCorHisto () const
 
Analysis of number of data per channel
virtual void InitDataNumberCheck (u_int n0, u_int n1)
 
bool IsDataNumberCheckON () const
 
virtual void SetDataNumberRejectThreshold (u_int nmin)
 
virtual int ProcessDataNumberCheck ()
 
virtual int GetDataNumberBadCount () const
 
virtual int BadDataNumberCorrect ()
 
Analysis of data continuity
virtual void InitDataContinuityCheck (double dmax)
 
bool IsDataContinuityCheckON () const
 
virtual bool ContinuityCheck (GETSample &sample)
 
virtual int ProcessDataContinuityCheck ()
 
virtual int GetDataContinuityBadCount () const
 
Noise analysis
virtual void SetNoiseRange (u_int i0=2, u_int i1=509)
 
u_int GetNoiseIndexMin () const
 
u_int GetNoiseIndexMax () const
 
TH1D * GetChannelsNoiseHisto () const
 
bool IsNoiseAnalysisON () const
 
virtual int ProcessNoiseAnalysis ()
 
virtual int FillCumulNoiseHisto (TH2 *hptr)
 
Amplitude resolution analysis
virtual void InitResolutionAnalysis (int n, double amin, double amax)
 
virtual void ClearResolutionAnalysis ()
 
bool IsResolutionAnalysisON () const
 
TH2I * GetResolutionMaxHisto () const
 
TH1D * GetResolutionHisto () const
 
virtual int ProcessResolutionAnalysis ()
 
Baseline fluctuations analysis
virtual void InitBaseFluctuations (u_int i0=2, u_int i1=32, double warn=0.)
 
virtual void ClearBaseFluctuations ()
 
TH1D * GetBaseFluctuationsHisto () const
 
bool IsFluctuationsAnalysisON () const
 
virtual int ProcessFluctuationsAnalysis ()
 
virtual int GetFluctuationsBadCount () const
 
virtual int FillCumulFluctuationsHisto (TH2 *hptr)
 
FPN test analysis
virtual void InitFPNtest (u_int i1min, u_int i1max, u_int i2min, u_int i2max, double dmin, double dmax)
 
bool IsFPNtestAnalysisON () const
 
virtual int ProcessFPNtestAnalysis ()
 
virtual int GetFPNtestBadCount () const
 
ROOT related functions
TH1D * CreateChannelsHisto1D (const string &name, const string &ytit="", bool fpn=true)
 
TH2D * CreateChannelsHisto2D (const string &name, int ny, double ymin, double ymax, const string &ytit="", bool fpn=true)
 
TH1I * CreateChannelsHisto1I (const string &name, const string &ytit="", bool fpn=true)
 
TH2I * CreateChannelsHisto2I (const string &name, int ny, double ymin, double ymax, const string &ytit="", bool fpn=true)
 
TH2D * CreateFullEventHisto (const string &name, bool fpn=true)
 
TH2D * CreateFullEventHisto (const string &name, int ny, double ymin, double ymax, bool fpn=true)
 
int FillFullEventHisto (TH2D *hptr, bool reset=true, bool fpn=true, double scale=1.)
 
TH1D * CreateChannelSummaryHisto (const string &name, bool fpn=true)
 
int FillChannelsSummaryHisto (TH1D *hptr, u_short fmod=GET::dataAmplitude, bool fpn=true, bool reset=true)
 
int CumulChannelsSummaryHisto (TH2 *hptr, u_short fmod=GET::dataAmplitude, bool fpn=true)
 
TH1D ** CreateAllChannelsHisto (const string &prefix="GET_", const string &suffix="")
 
int FillAllChannelsHisto (TH1D **htab, bool reset=true)
 
 ClassDef (GETSystemAnalyser, 0)
 

Protected Attributes

double * amax_amplitude
 Array of maximum amplitude values.
 
bool amax_computed
 Whether the maximum amplitude / time is computed.
 
double * amax_time
 Array of maximum amplitude times.
 
double * amax_width
 Array of width values.
 
u_short amplitude_mode
 Signal amplitude analysis mode.
 
double amplitude_window
 Signal amplitude analysis window size (for fit or average)
 
u_int ch_max_index
 Channel with maximum amplitude.
 
double ch_max_signal
 Maximum channel amplitude value.
 
bool * channel_bad
 Whether the channel contains bad data.
 
bool channel_bad_flag
 Whether there are bad channels.
 
bool cor_analysed
 Whether the corrected data analysis is performed.
 
int data_cont_bad
 Number of bad channels in analysis of the data continuity.
 
double data_cont_max
 Maximum variation for continuity.
 
bool data_cont_on
 Whether the analysis of data discontinuity is ON.
 
int data_num_bad
 Number of bad channels in analysis of the data per channel.
 
int data_num_max
 Upper value for bad range of data / channel.
 
int data_num_min
 Lower value for bad range of data / channel.
 
bool data_num_on
 Whether the analysis of number of data per channel is ON.
 
u_int data_num_reject
 Rejection threshold for channels with few data only.
 
u_int events_count
 Number of events since analysis cleard.
 
u_int events_skip
 Number of first events to skip for analysis.
 
double ** fit_channel_param
 Parameter values for each channel.
 
int fluct_bad
 Number of bad channels in fluctuations analysis.
 
int * fluct_cnt
 Number of events for baseline check.
 
u_int fluct_imax
 Upper limit for baseline fluctuations analysis.
 
u_int fluct_imin
 Lower limit for baseline fluctuations analysis.
 
bool fluct_on
 Whether baseline fluctuations analysis is ON.
 
double * fluct_sum
 Cumulated values for baseline check.
 
double fluct_warn
 Baseline fluctuation value to issue a warning.
 
int fpn_test_bad
 Number of bad channels in FPN test analysis.
 
double fpn_test_dmax
 Upper limit for difference between end average and beginning average.
 
double fpn_test_dmin
 Lower limit for difference between end average and beginning average.
 
u_int fpn_test_i1max
 Upper limit for average of the begining of the time window.
 
u_int fpn_test_i1min
 Lower limit for average of the begining of the time window.
 
u_int fpn_test_i2max
 Upper limit for average of the end of the time window.
 
u_int fpn_test_i2min
 Lower limit for average of the end of the time window.
 
bool fpn_test_on
 Whether the FPN test analysis is ON.
 
bool full_rec
 For reconstructed signal, plot full signal (no threshold on single time buckets)
 
GETSystemget_ptr
 Pointer to the GET system object.
 
TH1I * h_channels_data_num
 Pointer to the channels summary histogram with number of raw data per channel.
 
TH1D * h_channels_fluct
 Pointer to the channels baseline fluctuations analysis summary average histogram.
 
TH1D * h_channels_max_cor
 Pointer to the channels summary histogram with maximum corrected output values.
 
TH1D * h_channels_max_raw
 Pointer to the channels summary histogram with maximum raw output values.
 
TH1D * h_channels_rms
 Pointer to the channels RMS analysis summary histogram.
 
TH1D * h_channels_time_cor
 Pointer to the channels summary histogram with maximum corrected output values.
 
TH1D * h_channels_time_raw
 Pointer to the channels summary histogram with maximum raw output values.
 
TH2D * h_full_event_cor
 Pointer to the histogram with full data after corrections (if any)
 
TH2D * h_full_event_raw
 Pointer to the histogram with full raw data (before processing)
 
TH2I * h_resol_ampl
 Pointer to the channels versus amplitude maximum histogram.
 
TH1D * h_resol_rms
 Pointer to the channels amplitude variations histogram.
 
GETHitMaskhit_mask
 Pointer to the hit mask (same as base class hit mask, but known as GETHitMaskXY)
 
double ** mmax_amplitude
 Maxima values arrays for each channel.
 
bool mmax_analysis
 Whether multiple maxima analysis is requested.
 
bool mmax_computed
 Whether multiple maxima analysis is performed.
 
double mmax_diff_thr
 Maxima difference validation threshold.
 
RExtremaFinder mmax_finder
 Multiple maxima analyser.
 
u_int mmax_max
 Maximum number of maxima per channel.
 
u_short mmax_mode
 Calculation of multiple maxima amplitude: 0 standard, 1 gaus fits.
 
u_int * mmax_num
 Number of maxima for each channel.
 
double mmax_scale
 Scaling factor for amplitude.
 
double * mmax_sum
 Summed amplitudes of all maxima for each channel.
 
double mmax_sum_all
 Summed amplitudes of all channels.
 
double ** mmax_time
 Maxima times arrays for each channel.
 
u_int mmax_tot
 Total number of maxima for all channels.
 
double ** mmax_width
 Maxima width arrays for each channel.
 
bool raw_analysed
 Whether the raw data analysis is performed.
 
u_int rec_itmax
 Analysis upper time bin for reconstructed signal.
 
u_int rec_itmin
 Analysis lower time bin for reconstructed signal.
 
double rec_tmax
 Analysis time upper limits for reconstructed signal.
 
double rec_tmin
 Analysis time lower limits for reconstructed signal.
 
int resol_dim
 Dimension of amplitude axis.
 
double resol_max
 Upper limit of amplitude axis.
 
double resol_min
 Lower limit of amplitude axis.
 
bool resol_on
 Whether amplitude resolution analysis is ON.
 
double resol_step
 Lower limit of amplitude axis.
 
u_int rms_imax
 Upper limit for RMS analysis.
 
u_int rms_imin
 Lower limit for RMS analysis.
 
bool rms_on
 Whether noise analysis is ON.
 
u_short select_data_hit
 Information on the channel data to analyse for hit pattern: GET::signalOut (default), GET::signalTst or GET::signalRec.
 
u_short select_data_signal
 Information on the channel data for signal analysis: GET::signalOut (default), GET::signalTst or GET::signalRec.
 
double timing_cfd_delay
 CFD offset for timing analysis.
 
double timing_cfd_fraction
 CFD fraction for timing analysis.
 
u_short timing_mode
 Signal timing analysis mode.
 

Static Protected Attributes

static TF1 * fit_channel_fct = NULL
 Pointer to the function used in case of channel fitting.
 
static u_int fit_channel_npar = 0
 Number of parameters for the signal fit function.
 

Private Member Functions

 GObject (GETSystemAnalyser)
 

Friends

class GETSystem
 

Detailed Description

This is a base class for various analysis of experimental data from the GETSystem objects. When a GETSystemAnalyser object is associated to a GETSystem object, the analysis functions from this class are called by the GETSystem specific functions:

In addition, the function GETSystemAnalyser::ClearAnalysis may be called when all analysis data should be resetted. Note that this function is never called by the GETSystem class.

The GETSystemAnalyser::ClearEvent function is automatically called by the GETSystem object when its clears its own event data.

This class may be derived in order to perform specific analysis, eventually from a derived class of GETSystem: see for example the GETActarTpcAnalyser for the GETActarTpc system class.

Note
When a GETSystemAnalyser (or derived) class object is used to perform events analysis while the events are not read using the GETSystem (or derived) object event processing functions, then the analyser functions (GETSystemAnalyser::AnalyseRunStart, GETSystemAnalyser::AnalyseRunStop, GETSystemAnalyser::AnalyseRawEvent and GETSystemAnalyser::AnalyseCorEvent) are not called automatically.
This for example the case when events are read from simulation and imported in a GETSystem object. In this case, the functions must be explicitely called for the analysis to be performed and the histograms to be filled properly.

The GETSystemAnalyser class can perform various types of analysis, depending on what has been defined in terms of analysis parameters and histograms. The analysis concerning raw data are always performed on output data of the signal channels, while the corrected data anlysis can be performed on any of the signal, that can be selected with the GETSystemAnalyser::SetSelectedData() functions (which is meaningful for corrected output signal and for reconstructed signal, but may be meaningless for input/test signals).

The analysis available for the base class are:

In addition, it is possible to read the analysis parameters from a text file: see functions GETSystemAnalyser::ReadConfigFile and GETSystemAnalyser::ConfigCommand.

Constructor & Destructor Documentation

GETSystemAnalyser::GETSystemAnalyser ( GETSystem get = NULL)
GETSystemAnalyser::~GETSystemAnalyser ( )
virtual

Destructor. The histograms associated to the analysis are deleted.

References channel_bad, and Reset().

Member Function Documentation

int GETSystemAnalyser::AnalyseCorEvent ( )
virtual

Function called when the GETSystem has read an event, after applying corrections to the output samples. The function does the following actions:

  • update the hit mask;
  • fill automatic full corrected event (all channels) histogram if defined;
  • compute channels maximum amplitude and time for corrected data;
  • fill automatic corrected data channels maximum amplitude histogram if defined;
  • perfom some event checks if defined:
    • resolution analysis (for pulser runs)
    • noise analysis

Reimplemented in GETActarTpcAnalyser.

References amax_computed, ComputeAmplitudeData(), cor_analysed, GET::dataAmplitude, GET::dataTime, events_count, events_skip, FillChannelsSummaryHisto(), FillFullEventHisto(), h_channels_max_cor, h_channels_time_cor, h_full_event_cor, hit_mask, GETHitMask::IsMaskSet(), ProcessNoiseAnalysis(), ProcessResolutionAnalysis(), resol_on, rms_on, GET::signalOut, and GETHitMask::UpdateMask().

Referenced by GETSystem::AnalyseCorEvent().

int GETSystemAnalyser::AnalyseRawEvent ( )
virtual

Function called when the GETSystem has read an event, before applying corrections to the output samples. The function does the following actions:

  • fill automatic full raw event (all channels) histogram if defined;
  • compute channels maximum amplitude and time for raw data;
  • fill automatic raw data channels maximum amplitude histogram if defined;
  • perfom some event checks if defined:
    • number of data per channel,
    • signal (dis)continuity check,
    • fluctuations analysis

The raw event analysis is performed on output samples.

Reimplemented in GETActarTpcAnalyser.

References amax_computed, amplitude_mode, GET::amplitudeMaxSignal, ComputeAmplitudeData(), data_cont_on, data_num_on, GET::dataAmplitude, GET::dataTime, events_count, events_skip, FillChannelsSummaryHisto(), FillFullEventHisto(), fluct_on, fpn_test_on, h_channels_max_raw, h_channels_time_raw, h_full_event_raw, mmax_analysis, ProcessDataContinuityCheck(), ProcessDataNumberCheck(), ProcessFluctuationsAnalysis(), ProcessFPNtestAnalysis(), raw_analysed, select_data_hit, select_data_signal, SetSelectedData(), SetSelectedHitData(), SetSelectedSignalData(), and GET::signalOut.

Referenced by GETActarTpcAnalyser::AnalyseRawEvent(), and GETSystem::AnalyseRawEvent().

int GETSystemAnalyser::AnalyseRunStart ( )
virtual

Function called when the GETSystem starts processing a new file. Note that the ClearAnalysis function is not automatically called in this function.

Referenced by GETSystem::OpenRunFile(), and GETSystem::OpenRunSerie().

int GETSystemAnalyser::AnalyseRunStop ( )
virtual

Function called when the GETSystem stops processing a run file.

Referenced by GETSystem::CloseRunFile().

u_int GETSystemAnalyser::BadChannelCount ( ) const
virtual

Function counting and returning the number of bad channels, from the defined tests and analysis.

References channel_bad, channel_bad_flag, and GetChannelNumber().

Referenced by GETRunAsAdMean(), GETRunAsAdRMS(), GETSystemMean(), GETSystemMeanPower(), and GETSystemStdDeviation().

void GETSystemAnalyser::BadChannelsWarning ( )
virtual

Function sending a detailed warning message indicating where bad data have been detected in event analysis.

References channel_bad, channel_bad_flag, get_ptr, GETCoBo::GetChildrenNumber(), GETAsAd::GetChildrenNumber(), GETAGet::GetChildrenNumber(), and GETSystem::GetChildrenNumber().

Referenced by GETActarEventReader::AnalysisEvent().

int GETSystemAnalyser::BadDataNumberCorrect ( )
virtual

Function that tries to correct the bad read data, according to the data read count analysis. For channels with missing data, the function tries to find and set these data in the bad data list of GETSystem.

References AGET_SIZE, GETData::AsAd, ASAD_SIZE, GETSystem::bad_read_count, GETSystem::bad_read_data, GETData::Bucket, channel_bad, GETData::CoBo, GETSystem::event_count, get_ptr, GETSystem::GetCoBoNumber(), GETObject::GetReadoutFlag(), GETData::Info, GETChannel::IsReadOk(), GETChannel::OutSample(), and GETData::Value.

Referenced by ProcessDataNumberCheck().

int GETSystemAnalyser::CalcChannelAmplitude ( u_int  ic,
double &  vmax,
double &  tmax,
double &  wid 
)
virtual

Function computing the amplitude and the timing for a channel. They are estimated according to the calculation modes defined for the analyser (see SetAmplitudeMode function).

Note that the calculations that requires to analyse data are used only:

The function returns 0 if no error occured.

Parameters
icindex of channel to analyse
vmaxreturned value for the amplitude
tmaxreturned value for the timing
widreturned value for the width of signal

References amplitude_mode, amplitude_window, GET::amplitudeFit, GET::amplitudeIntegAll, GET::amplitudeIntegThr, GET::amplitudeIntegTOT, GET::amplitudeLocalAvg, GET::amplitudeLocalFitP2, GET::amplitudeMaxSignal, GET::amplitudeQuadraticMax, fit_channel_fct, fit_channel_npar, fit_channel_param, GET_FIT_PAR_MAX, get_ptr, GETSystem::GetChannel(), GetChannelFctAmplitude(), GETObject::GetFullId(), GETObject::GetSampleDim(), GETChannel::GetSaturationCount(), GETSystem::GetTestChannelIndex(), GETHitMask::GetThreshold(), GETObject::GetTimeStep(), GETTimingCFD(), hit_mask, GETChannel::IsFPNChannel(), GETHitMask::IsValidHit(), GETChannel::OutSample(), PresetChannelFctParameters(), rec_itmax, rec_itmin, GETChannel::RecSample(), select_data_signal, GETHitMask::SetValid(), GET::signalRec, GET::signalTst, timing_cfd_delay, timing_cfd_fraction, timing_mode, GET::timingCFD, GET::timingMaxSignal, GET::timingQuadraticMax, and GETChannel::TstSample().

Referenced by ComputeAmplitudeData().

int GETSystemAnalyser::CalcChannelMaxima ( u_int  ic)
virtual

Function performing the maxima search for a channel. Only the maxima above the channel threshold are considered. The function returns 0 if no error occured.

The amplitude of maxima corresponds to the integral amplitude of the signal around the maxima. The scaling factor GETSystemAnalyser::mmax_scale can be used to set a scaling factor (for example to convert from integral to signal maximum value, if the response function is known).

Parameters
icindex of channel to analyse

References get_ptr, GETSystem::GetChannel(), GETSystem::GetTestChannelIndex(), GETHitMask::GetThreshold(), hit_mask, GETHitMask::IsValidHit(), mmax_amplitude, mmax_diff_thr, mmax_finder, mmax_max, mmax_num, mmax_scale, mmax_sum, mmax_sum_all, mmax_time, mmax_tot, mmax_width, GETChannel::OutSample(), GETChannel::RecSample(), select_data_signal, GET::signalRec, GET::signalTst, and GETChannel::TstSample().

Referenced by ComputeAmplitudeData().

GETSystemAnalyser::ClassDef ( GETSystemAnalyser  ,
 
)

for use within ROOT.

void GETSystemAnalyser::ClearAmplitudeData ( )

Function that sets the maximum amplitudes and times to 0. For multiple maxima analysis, the number of maxima is set to 0 for each channel.

References amax_amplitude, amax_computed, amax_time, amax_width, amplitude_mode, GET::amplitudeFit, ch_max_index, ch_max_signal, GetChannelNumber(), mmax_computed, mmax_num, mmax_sum, mmax_sum_all, mmax_tot, and PresetChannelFctParameters().

Referenced by ClearEvent(), ComputeAmplitudeData(), InitAmplitudeData(), and SetSelectedSignalData().

void GETSystemAnalyser::ClearAnalysis ( )
virtual

Function that clears all current analysis results: histograms, baseline fluctuations,...

Reimplemented in GETActarTpcAnalyser.

References ClearBaseFluctuations(), ClearEvent(), ClearResolutionAnalysis(), events_count, fluct_on, and resol_on.

Referenced by GETActarTpcAnalyser::ClearAnalysis().

void GETSystemAnalyser::ClearBaseFluctuations ( )
virtual

Function that clears the baseline fluctuations analysis. The sum and event counts per channel are set to 0.

References fluct_bad, fluct_cnt, fluct_sum, get_ptr, GETSystem::GetChannelCount(), and h_channels_fluct.

Referenced by ClearAnalysis(), and InitBaseFluctuations().

void GETSystemAnalyser::ClearResolutionAnalysis ( )
virtual

Function that clears the resolution analysis. The corresponding histograms are resetted.

References h_resol_ampl, and h_resol_rms.

Referenced by ClearAnalysis().

bool GETSystemAnalyser::ConfigCommand ( const GString &  code,
const GString &  args = "",
FILE *  fptr = NULL 
)
virtual

Function that sets a configuration parameter from a command line.

The valid command line in the class are:

  • analysis configuration:
    • INCL <cfg_file>: include another configuration file
    • THR <val>: set global channels (software) threshold for all signals (test, out and reconstructed)
    • SATURATION <value> [mult]: set saturation limits
      • value: saturation amplitude
      • mult: number of data in the sample over saturation amplitude
    • MMAX <scale> <dthr>: perform multiple maxima analysis
    • FULL_REC: when analysing the reconstructed signal, use the whole sampling (between time limits), regardless of the channel threshold (see Reconstructed signal analysis)
    • REC_TLIMIT [<tmin> <tmax>]: when analysing the reconstructed signal, set the time limits of the analysis (see Reconstructed signal analysis)
    • AMPL <mode> [info]: set channel amplitude calculation mode:
      • mode = MAX: maximum signal amplitude
      • mode = INTEG or INTEG_ALL: integrate full sample signal
      • mode = INTEG_TOT: integrate signal over threshold around maximum
      • mode = INTEG_THR: integrate all signal above threshold
      • mode = FIT <fct> <data>: fit signal to extract amplitude value for the channel
        • accepted functions (with constant offset/background):
          • GAUS: Gauss function
          • GSC: Gauss x SinC function
          • SQ_GAUS: Square signal convoluted with Gauss function
          • SQ_GSC: Square signal convoluted with (Gauss x SinC) function
        • data information:
          • MAX: function amplitude parameter
          • INTEG or INTEG_ALL: full signal integral
          • INTEG_TOT: signal integral over threshold
      • mode = LOCAVG: local average signal amplitude around maximum, the additional info is the time window for averaging
      • mode = LOCP2: local quadratic fit around maximum, the additional info is the time window for fitting
    • TIME <mode> [info]: set channel timing calculation mode
      • mode = MAX: maximum signal time
      • mode = CFD <fraction> <delay>: use of a CFD algorithm, the additional information is the fraction and the delay for the CFD (positive values)
    • ANALYSE <info>: select the analysis to be processed (default is RAW and COR):
      • NONE remove all selected analysis
      • RAW perfom raw (output) data analysis
      • COR perfom corrected (output) data analysis
      • REC perfom reconstructed data analysis
    • SIGNAL <info>: select the analysed signal: [ TST | OUT | REC ] for hits and signal analysis (default is OUT) (this works only if the corresponding analysis is performed)
    • SIGNAL_HIT <info>: select the signal for hits analysis: [ TST | OUT | REC ] (default is OUT)
  • output signals correction processes:
    • BAD_READ_CORRECTION: set the GETSystem flag for correction of bad data read in CoBo frames
    • DATA0 <n>: set Data-0 correction for n time buckets; it is performed after the output corrections from GETSystem and before the output corrections (off-track correction...) of the analyser (it applies only if corrected data are analysed by GETSystem - see GETSystem::SelectAnalysis() function).
    • FPN <val>: set FPN corrections (1, 2, 4 or 0 for none)
    • SMOOTH <width>: add a smoothing (Gaussian) filter
    • CAL <file>: add calibration from file
    • BL_CORR <baseline_file>: set baseline correction from file
    • AUTO_BL_LIN <itmin1> <itmax1> <itmin2> <itmax2>: set linear automatic baseline correction from averages computed in 2 regions of the time sample
    • AUTO_BL_OFF <itmin> <itmax> : set automatic baseline offset correction from sample data in [itmin;itmax[
  • input signals reconstruction:
    • RF_FILE <filename> : read the channels response function from file (if it contains a "%A" pattern, it reads 1 file per AsAd, and the pattern is replaced by the AsAd serial number).
    • FILTER <args...> : define the filter for signal reconstruction; the valid arguments are:
      • LOW <Fcut> <n> : for a low-pass filter of order n
      • GAUS <Fcut> <wid> : for a Gauss filter of width wid
  • predefined analysis:
    • NOISE <i0> <i1>: set the noise (RMS) analysis between time buckets i0 and i1 (included)
    • BASE_CHK <i0> <i1> <limit>: set baseline fluctuation analysis between time buckets i0 and i1 (included), that should stay below the limit
    • READ_CHK <i0> <i1>: check the number of data per channel, that should be outside the range [i0,i1]
    • DELTA_CHK <diff>: check the continuity between time buckets, by setting a maximum difference between contiguous buckets
Parameters
codeparameter(s) identifier
argsadditional arguments
fptrfile pointer (in case more information should be read)

Reimplemented in GETActarTpcAnalyser.

References GET::amplitudeFitG, GET::amplitudeFitGSC, GET::amplitudeFitInteg, GET::amplitudeFitSqG, GET::amplitudeFitSqGSC, GET::amplitudeIntegAll, GET::amplitudeIntegThr, GET::amplitudeIntegTOT, GET::amplitudeLocal, GET::amplitudeLocalAvg, GET::amplitudeLocalFitP2, GET::amplitudeMaxSignal, GET::amplitudeQuadraticMax, GET::analyseRecAll, COBO_SIZE, GET::CoBoCorrectBadData, GET::CoBoCorrectFPN, GET::CoBoCorrectFPN1, GET::CoBoCorrectFPN2, GET::CoBoCorrectFPN4, GETLookupTable::DumpTable(), get_ptr, GETSystem::GetAnalysisFlags(), GETSystem::GetChannelCount(), GETSystem::GetHitMask(), GETObject::GetSampleDim(), GetSelectedHitData(), GETObject::GetTimeStep(), InitAmplitudeData(), InitBaseFluctuations(), InitDataContinuityCheck(), InitDataNumberCheck(), InitResolutionAnalysis(), GETSystem::LookupTable(), mmax_analysis, GETLookupTable::Read(), ReadConfigFile(), rec_itmax, rec_itmin, rec_tmax, rec_tmin, GETSystem::saturation_mult, GETSystem::saturation_value, SetAmplitudeMode(), GETSystem::SetAnalysis(), GETSystem::SetAutoBaseline(), GETSystem::SetAutoBLoffset(), GETSystem::SetBaselineCorrection(), GETSystem::SetCalibProcess(), GETSystem::SetCorDataAnalysis(), SetEventsSkip(), GETObject::SetFilter(), SetFullRec(), GETSystem::SetInputRecAnalysis(), SetMaximaDiffThreshold(), SetMaximaScaling(), SetNoiseRange(), GETSystem::SetOption(), GETSystem::SetOutputData0correction(), GETSystem::SetOutputSmoothing(), GETSystem::SetRawDataAnalysis(), SetRecTlimits(), GETSystem::SetResponseFunctions(), SetSelectedData(), SetSelectedHitData(), GETSystem::SetTestChannel(), GETHitMask::SetThreshold(), GETSystem::SetTimeCorrectionProcess(), SetTimingMode(), SetTimingModeCFD(), GET::signalOut, GET::signalRec, GET::signalTst, GET::timingCFD, GET::timingMaxSignal, and GET::timingQuadraticMax.

Referenced by GETActarTpcAnalyser::ConfigCommand(), and ReadConfigFile().

bool GETSystemAnalyser::ContinuityCheck ( GETSample sample)
virtual

Function returning true if no discontinuity is found in the data. A discontinuity is identified as data variation higher than the maximaum accepted value compared to both the next and the previous data.

Parameters
sampledata sample

References data_cont_max, and data_cont_on.

Referenced by ProcessDataContinuityCheck().

TH1D ** GETSystemAnalyser::CreateAllChannelsHisto ( const string &  prefix = "GET_",
const string &  suffix = "" 
)

Function allocating an array of histogram pointers and the corresponding histograms for each channel.

Each histogram in the array and the array itself must be deleted by the calling program after use.

Parameters
prefixprefix for channels histograms name
suffixsuffix for channels histograms name

References get_ptr, GETSystem::GetChannel(), GETSystem::GetChannelCount(), GETObject::GetFullId(), and GETChannel::OutSample().

TH1D * GETSystemAnalyser::CreateChannelsHisto1D ( const string &  name,
const string &  ytit = "",
bool  fpn = true 
)

Create a 1D histogram with channels indexes as X-axis.

Parameters
namehistogram name
ytittitle for the Y-axis
fpnwhether the FPN channels are included

References get_ptr, GETSystem::GetChannelCount(), and GETObject::GetSignalChannelCount().

Referenced by CreateChannelSummaryHisto(), and InitResolutionAnalysis().

TH1I * GETSystemAnalyser::CreateChannelsHisto1I ( const string &  name,
const string &  ytit = "",
bool  fpn = true 
)

Create a 1D histogram with channels indexes as X-axis.

Parameters
namehistogram name
ytittitle for the Y-axis
fpnwhether the FPN channels are included

References get_ptr, GETSystem::GetChannelCount(), and GETObject::GetSignalChannelCount().

TH2D * GETSystemAnalyser::CreateChannelsHisto2D ( const string &  name,
int  ny,
double  ymin,
double  ymax,
const string &  ytit = "",
bool  fpn = true 
)

Create a 2D histogram with channels indexes as X-axis.

Parameters
namename of the histogram
nynumber of bins for Y dimension
yminlower limit Y axis
ymaxupper limit Y axis
ytittitle for the Y-axis
fpnwhether the FPN channels are included

References get_ptr, GETSystem::GetChannelCount(), and GETObject::GetSignalChannelCount().

Referenced by CreateFullEventHisto().

TH2I * GETSystemAnalyser::CreateChannelsHisto2I ( const string &  name,
int  ny,
double  ymin,
double  ymax,
const string &  ytit = "",
bool  fpn = true 
)

Create a 2D histogram with channels indexes as X-axis.

Parameters
namename of the histogram
nynumber of bins for Y dimension
yminlower limit Y axis
ymaxupper limit Y axis
ytittitle for the Y-axis
fpnwhether the FPN channels are included

References get_ptr, GETSystem::GetChannelCount(), and GETObject::GetSignalChannelCount().

Referenced by InitResolutionAnalysis().

TH1D * GETSystemAnalyser::CreateChannelsMaxCorHisto ( const string &  hname)

Function that defines the histogram for channel maximum amplitude of corrected output data. This histogram is filled automatically by the AnalyseCorEvent function.

Parameters
hnamename for the histogram

References CreateChannelSummaryHisto(), and h_channels_max_cor.

Referenced by GETActarEventReader::CreateEvent().

TH1D * GETSystemAnalyser::CreateChannelsMaxRawHisto ( const string &  hname)

Function that defines the histogram for channel maximum amplitude of uncorrected output data. This histogram is filled automatically by the AnalyseRawEvent function.

Parameters
hnamename for the histogram

References CreateChannelSummaryHisto(), and h_channels_max_raw.

Referenced by GETActarEventReader::CreateEvent().

TH1D * GETSystemAnalyser::CreateChannelsTimeCorHisto ( const string &  hname)

Function that defines the histogram for channel time of corrected output data. This histogram is filled automatically by the AnalyseCorEvent function.

Parameters
hnamename for the histogram

References CreateChannelSummaryHisto(), and h_channels_time_cor.

Referenced by GETActarEventReader::CreateEvent().

TH1D * GETSystemAnalyser::CreateChannelsTimeRawHisto ( const string &  hname)

Function that defines the histogram for channel time of uncorrected output data. This histogram is filled automatically by the AnalyseRawEvent function.

Parameters
hnamename for the histogram

References CreateChannelSummaryHisto(), and h_channels_time_raw.

Referenced by GETActarEventReader::CreateEvent().

TH1D * GETSystemAnalyser::CreateChannelSummaryHisto ( const string &  name,
bool  fpn = true 
)
inline

Create an histogram to display a 1D channel summary, where the X dimension is the channel number.

Parameters
namename of the histogram
fpnwhether the FPN channels are included

References CreateChannelsHisto1D().

Referenced by CreateChannelsMaxCorHisto(), CreateChannelsMaxRawHisto(), CreateChannelsTimeCorHisto(), and CreateChannelsTimeRawHisto().

TH2D * GETSystemAnalyser::CreateFullEventCorHisto ( const string &  hname)

Function that defines the histogram for full event corrected output data. This histogram is filled automatically by the AnalyseRawEvent function.

Parameters
hnamename for the histogram

References CreateFullEventHisto(), and h_full_event_cor.

Referenced by GETActarEventReader::PresetSystemAnalysis().

TH2D * GETSystemAnalyser::CreateFullEventHisto ( const string &  name,
bool  fpn = true 
)

Create an histogram to display a full event. The X dimension is the channel number and the Y dimension is the channel content (time axis of channels).

The histogram must be deleted by calling program after use.

The Y dimension is set to the ADC range.

Parameters
namename of the histogram
fpnwhether the FPN channels are included

References get_ptr, GETObject::GetTotalChannel(), and GETChannel::OutSample().

Referenced by CreateFullEventCorHisto(), and CreateFullEventRawHisto().

TH2D * GETSystemAnalyser::CreateFullEventHisto ( const string &  name,
int  ny,
double  ymin,
double  ymax,
bool  fpn = true 
)
inline

Create an histogram to display a full event. The X dimension is the channel number and the Y dimension is the channel content. The Y range is set argument values.

The histogram must be deleted by calling program after use.

Parameters
namename of the histogram
nynumber of bins for Y dimension
yminlower limit Y axis
ymaxupper limit Y axis
fpnwhether the FPN channels are included

References CreateChannelsHisto2D().

TH2D * GETSystemAnalyser::CreateFullEventRawHisto ( const string &  hname)

Function that defines the histogram for full event uncorrected output data. This histogram is filled automatically by the AnalyseRawEvent function.

Parameters
hnamename for the histogram

References CreateFullEventHisto(), and h_full_event_raw.

Referenced by GETActarEventReader::PresetSystemAnalysis().

int GETSystemAnalyser::CumulChannelsSummaryHisto ( TH2 *  hptr,
u_short  fmod = GET::dataAmplitude,
bool  fpn = true 
)

Function filling a 2D histogram (i.e. from CreateFullEventHisto function) with data from current event channels (output, reconstructed or test sample, according to selected data). One value per channel is incremented depending on mode argument. The histogram is not resetted before filling.

Parameters
hptrhistogram pointer
fmoddata selected for filling: GET::dataAmplitude (default), GET::dataIntegral or GET::dataTime; if the bit GET::dataNoSat is set, the saturated channels are skipped in histogram filling
fpnwhether the FPN channels are included

References amax_amplitude, amax_time, channel_bad, ComputeAmplitudeData(), GET::dataIntegral, GET::dataNoBad, GET::dataNoSat, GET::dataTime, get_ptr, GETSystem::GetChannel(), GETSystem::GetChannelCount(), GETObject::GetReadoutFlag(), GETObject::GetSignalChannelCount(), IsAmplitudeDataComputed(), GETSystem::IsChannelSaturated(), GETChannel::IsSignalChannel(), GETChannel::OutSample(), GETChannel::RecSample(), select_data_signal, GET::signalRec, GET::signalTst, and GETChannel::TstSample().

Referenced by ProcessResolutionAnalysis().

int GETSystemAnalyser::FillAllChannelsHisto ( TH1D **  htab,
bool  reset = true 
)

Function filling a set of single histogram with channels signal (output, reconstructed or test sample, according to selected data). The histogram pointers must have been stored in the htab array (i.e. from CreateAllChannelsHisto function). The histograms are resetted before filling. The function returns 0 if no error occured, a positive value in case of error, and a negative value if some histograms were not filled.

Parameters
htabarray of histogram pointers
resetwhether the histograms are resetted before filling

References get_ptr, GETSystem::GetChannel(), GETSystem::GetChannelCount(), GETObject::GetSampleDim(), GETChannel::OutSample(), GETChannel::RecSample(), select_data_signal, GET::signalRec, GET::signalTst, and GETChannel::TstSample().

int GETSystemAnalyser::FillChannelsSummaryHisto ( TH1D *  hptr,
u_short  fmod = GET::dataAmplitude,
bool  reset = true,
bool  fpn = true 
)

Function filling a 2D histogram (i.e. from CreateFullEventHisto function) with data from current event channels (output, reconstructed or test sample, according to selected data). One value per channel is incremented depending on mode argument. The histogram is not resetted before filling.

Parameters
hptrhistogram pointer
fmoddata selected for filling: GET::dataAmplitude (default), GET::dataIntegral or GET::dataTime; if the bit GET::dataNoSat is set, the saturated channels are skipped in histogram filling
fpnwhether the FPN channels are included
resetwhether the histogram is resetted before filling

References amax_amplitude, amax_time, channel_bad, ComputeAmplitudeData(), GET::dataIntegral, GET::dataNoBad, GET::dataNoSat, GET::dataTime, get_ptr, GETSystem::GetChannel(), GETSystem::GetChannelCount(), GETObject::GetSignalChannelCount(), IsAmplitudeDataComputed(), GETSystem::IsChannelSaturated(), GETChannel::IsSignalChannel(), GETChannel::OutSample(), GETChannel::RecSample(), select_data_signal, GET::signalRec, GET::signalTst, and GETChannel::TstSample().

Referenced by GETActarTpcAnalyser::AnalyseCorEvent(), AnalyseCorEvent(), and AnalyseRawEvent().

int GETSystemAnalyser::FillCumulFluctuationsHisto ( TH2 *  hptr)
virtual

Fills the argument 2D histogram with fluctuations analysis result.

Parameters
hptrhistogram pointer (2D)

References fluct_on, GetChannelNumber(), and h_channels_fluct.

int GETSystemAnalyser::FillCumulNoiseHisto ( TH2 *  hptr)
virtual

Fills the argument 2D histogram with noise analysis result.

Parameters
hptrhistogram pointer (2D)

References GetChannelNumber(), h_channels_rms, and rms_on.

int GETSystemAnalyser::FillFullEventHisto ( TH2D *  hptr,
bool  reset = true,
bool  fpn = true,
double  scale = 1. 
)

Function filling a 2D histogram (i.e. from CreateFullEventHisto function) with current event (output, reconstructed or test sample, according to selected data). The histogram is resetted before filling.

Parameters
hptrhistogram pointer
resetwhether the histograms are resetted before filling
fpnwhether the FPN channels are included
scalescaling of signal before filling (this may be used if the histogram binning is different than the data samples)

References get_ptr, GETSystem::GetChannel(), GETSystem::GetChannelCount(), GETObject::GetSignalChannelCount(), GETObject::GetTimeStep(), GETChannel::IsSignalChannel(), GETChannel::OutSample(), GETChannel::RecSample(), select_data_signal, GET::signalRec, GET::signalTst, and GETChannel::TstSample().

Referenced by GETActarTpcAnalyser::AnalyseCorEvent(), AnalyseCorEvent(), and AnalyseRawEvent().

u_short GETSystemAnalyser::GetAmplitudeMode ( ) const
inline

Return the mode selected for channel amplitude.

References amplitude_mode.

Referenced by GETActarEventReader::DefineChannelSpectrum(), and GETActarEventReader::PresetSystemAnalysis().

u_int GETSystemAnalyser::GetAnalysisEventsCounter ( )
inline

Return the number of events since the last analysis clear.

References events_count.

TH1D * GETSystemAnalyser::GetBaseFluctuationsHisto ( ) const
inline

Return the pointer to the corresponding histogram.

References h_channels_fluct.

Referenced by GETActarEventReader::AnalysisEvent().

double GETSystemAnalyser::GetChannelAmplitude ( u_int  ich) const
inline

Return the channel amplitude as calculated according to the analyser amplitude mode.

Parameters
ichchannel index

References amax_amplitude.

int GETSystemAnalyser::GetChannelFctAmplitude ( u_int  ic,
double &  vmax,
double &  tmax,
double &  wid 
)
virtual

Extract the channel fit amplitude data from the fit function parameters. The function returns 0 if no problem occured, -1 for a bad channel, and a positive value in case of parameter problem.

Parameters
icindex of channel to analyse
vmaxreturned value for the amplitude
tmaxreturned value for the timing
widreturned value for the width of signal

References amplitude_mode, GET::amplitudeFitInteg, fit_channel_fct, get_ptr, GET_SIGMA_TO_FWHM, GET_SQRT_2PI, GETSystem::GetChannel(), getFctGaus, getFctGausSinC, getFctSquareGaus, getFctSquareGausSinC, GETObject::GetSampleDim(), GETObject::GetTimeStep(), and GETChannel::IsFPNChannel().

Referenced by CalcChannelAmplitude().

TH1D * GETSystemAnalyser::GetChannelsMaxCorHisto ( ) const
inline

Return the pointer to the corresponding histogram (corrected output).

References h_channels_max_cor.

TH1D * GETSystemAnalyser::GetChannelsMaxRawHisto ( ) const
inline

Return the pointer to the corresponding histogram (raw output).

References h_channels_max_raw.

TH1D * GETSystemAnalyser::GetChannelsNoiseHisto ( ) const
inline

Return the pointer to the channels noise histogram of current event.

References h_channels_rms.

Referenced by GETActarEventReader::AnalysisEvent().

double GETSystemAnalyser::GetChannelTime ( u_int  ich) const
inline

Return the channel timing as calculated according to the analyser timing mode.

Parameters
ichchannel index

References amax_time.

Referenced by GETHitMaskXY::SetValidChannels().

double GETSystemAnalyser::GetChannelWidth ( u_int  ich) const
inline

Return the channel signal width as calculated according to the analyser amplitude mode.

Parameters
ichchannel index

References amax_width.

int GETSystemAnalyser::GetDataContinuityBadCount ( ) const
inlinevirtual

Return the number of channels for which data continuity is bad.

References data_cont_bad.

Referenced by GETActarEventReader::AnalysisEvent().

int GETSystemAnalyser::GetDataNumberBadCount ( ) const
inlinevirtual

Return the number of channels for which number of data is in the rejection range.

References data_num_bad.

Referenced by GETActarEventReader::AnalysisEvent().

u_int GETSystemAnalyser::GetEventsSkip ( )
inline

Return the number of events to skip at the beginning of analysis.

References events_skip.

int GETSystemAnalyser::GetFluctuationsBadCount ( ) const
inlinevirtual

Return the number of channels for which the baseline difference with the average is over the warning threshold.

References fluct_bad.

Referenced by GETActarEventReader::AnalysisEvent().

int GETSystemAnalyser::GetFPNtestBadCount ( ) const
inlinevirtual

Return the number of FPN channels for which the FPN test failed.

References fpn_test_bad.

TH2D * GETSystemAnalyser::GetFullEventCorHisto ( ) const
inline

Return the pointer to the corresponding histogram (corrected output).

References h_full_event_raw.

TH2D * GETSystemAnalyser::GetFullEventRawHisto ( ) const
inline

Return the pointer to the corresponding histogram (raw output).

References h_full_event_raw.

u_int GETSystemAnalyser::GetMaximumChannel ( ) const
inlinevirtual

Return the index of the signal channel with maximum amplitude value for the selected data (input/test or reconstructed). This value is stored when the event is processed by the analyser, which make this function faster than the GETSystem::GetMaximumChannel function.

References ch_max_index.

Referenced by GETActarEventReader::AnalysisEvent().

double GETSystemAnalyser::GetMaximumSignal ( ) const
inlinevirtual

Return the maximum channel amplitude value for the selected data (input/test or reconstructed). This value is stored when the event is processed by the analyser, which make this function faster than the GETSystem::GetMaximumChannel function.

References ch_max_signal.

Referenced by GETActarEventReader::AnalysisEvent().

double GETSystemAnalyser::GetMultiMaxAmplitude ( u_int  ich,
u_int  imax 
) const
inline

Return the amplitude of a maximum for a channel if the multiple maxima analysis is performed.

Parameters
ichchannel index
imaxmaximum index

References GetChannelNumber(), mmax_amplitude, mmax_computed, and mmax_num.

Referenced by GETActarEventReader::HistoClickedSlot().

int GETSystemAnalyser::GetMultiMaxNum ( u_int  ich) const
inline

Return the number of maxima for a channel if the multiple maxima analysis is performed.

Parameters
ichchannel index

References GetChannelNumber(), mmax_computed, and mmax_num.

Referenced by GETActarEventReader::HistoClickedSlot().

double GETSystemAnalyser::GetMultiMaxSum ( u_int  ich) const
inline

Return the summed amplitudes of a maximum for a channel if the multiple maxima analysis is performed.

Parameters
ichchannel index

References GetChannelNumber(), mmax_computed, and mmax_sum.

double GETSystemAnalyser::GetMultiMaxSumAll ( ) const
inline

Return the summed amplitudes of all channels, from multiple maxima analysis.

References mmax_sum_all.

Referenced by GETActarEventReader::AnalysisEvent().

double GETSystemAnalyser::GetMultiMaxTime ( u_int  ich,
u_int  imax 
) const
inline

Return the time of a maximum for a channel if the multiple maxima analysis is performed.

Parameters
ichchannel index
imaxmaximum index

References GetChannelNumber(), mmax_computed, mmax_num, and mmax_time.

Referenced by GETActarEventReader::HistoClickedSlot().

int GETSystemAnalyser::GetMultiMaxTotal ( ) const
inline

Return the total number of maxima for all channels if the multiple maxima analysis is performed.

References mmax_tot.

double GETSystemAnalyser::GetMultiMaxWidth ( u_int  ich,
u_int  imax 
) const
inline

Return the width of a maximum for a channel if the multiple maxima analysis is performed.

Parameters
ichchannel index
imaxmaximum index

References GetChannelNumber(), mmax_computed, mmax_num, and mmax_width.

u_int GETSystemAnalyser::GetNoiseIndexMax ( ) const
inline

Return the upper time bucket index of noise analysis. (the index is included in the analysis).

References rms_imax.

u_int GETSystemAnalyser::GetNoiseIndexMin ( ) const
inline

Return the lower time bucket index of noise analysis (the index is included in the analysis).

References rms_imin.

u_int GETSystemAnalyser::GetRecITmax ( ) const
inline

Return the analysis upper time bin (excluded) for reconstructed signal.

References rec_itmax.

u_int GETSystemAnalyser::GetRecITmin ( ) const
inline

Return the analysis lower time bin (included) for reconstructed signal.

References rec_itmin.

double GETSystemAnalyser::GetRecTmax ( ) const
inline

Return the analysis time upper limits for reconstructed signal.

References rec_tmax.

double GETSystemAnalyser::GetRecTmin ( ) const
inline

Return the analysis time lower limits for reconstructed signal.

References rec_tmin.

TH1D * GETSystemAnalyser::GetResolutionHisto ( ) const
inline

Return the pointer to the channels resolution histogram.

References h_resol_rms.

Referenced by GETActarEventReader::AnalysisEvent().

TH2I * GETSystemAnalyser::GetResolutionMaxHisto ( ) const
inline

Return the pointer to the channel versus maximum amplitude histogram.

References h_resol_ampl.

int GETSystemAnalyser::GetSelectedHitData ( ) const
inline

Return the analysed data for hit pattern: output (default), input/test or reconstructed signals.

References select_data_hit.

Referenced by ConfigCommand().

int GETSystemAnalyser::GetSelectedSignalData ( ) const
inline

Return the analysed signal data: output (default), input/test or reconstructed signals.

References select_data_signal.

Referenced by GETActarEventReader::DefineChannelSpectrum(), GETActarEventReader::PadPlaneButton1DoubleClick(), GETActarEventReader::PresetSystemAnalysis(), and GETActarEventReader::ReadEvent().

GETSystem * GETSystemAnalyser::GetSystem ( )
inline

Return the pointer to the GET system.

References get_ptr.

u_short GETSystemAnalyser::GetTimingMode ( ) const
inline

Return the mode selected for channel amplitude.

References timing_mode.

GETSystemAnalyser::GObject ( GETSystemAnalyser  )
private

Macro from GCpp library that defines the following functions:

  • ClassName(): return the real class name of the object
  • StaticClassName(): return the used class name of the object (that may be a base class of the real object).
  • IsInstanceOf<T>(): return true if the current object is an instance of the template class name argument
  • Clone(): return an allocated copy of the object.
void GETSystemAnalyser::IncrAnalysisEventCount ( )
inlinevirtual

Increment the number of events from GETSystemAnalyser.

References events_count.

Referenced by GETSystem::AnalyseEvent().

void GETSystemAnalyser::InitAmplitudeData ( )

Function allocating the arrays for maximum amplitude and time estimates for all channels.

References amax_amplitude, amax_time, amax_width, ClearAmplitudeData(), fit_channel_param, GET_FIT_PAR_MAX, GetChannelNumber(), InitMaximaData(), mmax_analysis, mmax_finder, and ResetMaximaData().

Referenced by ConfigCommand(), and SetSystem().

void GETSystemAnalyser::InitBaseFluctuations ( u_int  i0 = 2,
u_int  i1 = 32,
double  warn = 0. 
)
virtual

Function initializing the baseline fluctuation analysis. If the histograms are not defined, they are allocated, else only the analysis condition are resetted.

Parameters
i0lower time bucket index of baseline analysis range
i1upper time bucket index of baseline analysis range
warnfluctuation level threshold to issue a warning

References ClearBaseFluctuations(), fluct_bad, fluct_cnt, fluct_imax, fluct_imin, fluct_on, fluct_sum, fluct_warn, get_ptr, GETSystem::GetChannelCount(), GETObject::GetSampleDim(), and h_channels_fluct.

Referenced by ConfigCommand().

void GETSystemAnalyser::InitDataContinuityCheck ( double  dmax = 0.)
virtual

Set the analysis of the data continuity. Set the argument to 0 to switch the analysis OFF.

Parameters
dmaxMaximum in a channel sample variation for continuity

References data_cont_bad, data_cont_max, data_cont_on, and get_ptr.

Referenced by ConfigCommand().

void GETSystemAnalyser::InitDataNumberCheck ( u_int  n0,
u_int  n1 
)
virtual

Set the analysis of the number of data read per channel. If the number of data read is between n1 and n2 (included), a warning is issued.

For example, in full readout mode, without zero suppression, the limits should be 0 and 511 since for each channel, 512 data may be read.

In partial readout mode, either 0 or 512 data shoulde be read for each channel, and the limits 1 and 511 may be defined

Set both limits to 0 to turn off the analysis

Parameters
n0lower limit of bad number of read data per channel
n1upper limit of bad number of read data per channel

References data_num_bad, data_num_max, data_num_min, data_num_on, and get_ptr.

Referenced by ConfigCommand().

void GETSystemAnalyser::InitFPNtest ( u_int  i1min,
u_int  i1max,
u_int  i2min,
u_int  i2max,
double  dmin,
double  dmax 
)
virtual

Initialization of the FPN test analysis (then the analysis is set ON).

Parameters
i1minlower limit for average of the begining of the time window
i1maxupper limit for average of the begining of the time window
i2minlower limit for average of the end of the time window
i2maxupper limit for average of the end of the time window
dminlower limit for difference between end average and beginning average
dmaxupper limit for difference between end average and beginning average

References fpn_test_bad, fpn_test_dmax, fpn_test_dmin, fpn_test_i1max, fpn_test_i1min, fpn_test_i2max, fpn_test_i2min, and fpn_test_on.

void GETSystemAnalyser::InitMaximaData ( )

Function allocating the arrays for multiple maxima estimates for all channels.

References get_ptr, GetChannelNumber(), GETObject::GetSampleDim(), mmax_amplitude, mmax_max, mmax_num, mmax_sum, mmax_time, mmax_width, and ResetMaximaData().

Referenced by InitAmplitudeData().

void GETSystemAnalyser::InitResolutionAnalysis ( int  n,
double  amin,
double  amax 
)
virtual

Function that defines the maximum amplitude resolution analysis.

A 2D histogram is created to store maximum amplitudes versus the channel number. If this histogram existed before, it is deleted and rect=reated in order to adapt the new dimensions

A 1D histogram is created (if not already existing) to get the resolution for each channel. This histogram is not recreated, since the channel number may not change.

Parameters
namplitude axis dimension
aminlower limit of amplitude axis
amaxupper limit of amplitude axis

References CreateChannelsHisto1D(), CreateChannelsHisto2I(), get_ptr, h_resol_ampl, h_resol_rms, resol_dim, resol_max, resol_min, resol_on, and resol_step.

Referenced by ConfigCommand().

bool GETSystemAnalyser::IsChannelBad ( u_int  ich) const
inlinevirtual

Return true if the analysis indicates the channel as bad.

Parameters
ichchannel index

References channel_bad, and GetChannelNumber().

Referenced by GETActarEventReader::AnalysisEvent().

bool GETSystemAnalyser::IsDataContinuityCheckON ( ) const
inline

Return true if the check of data continuity is set.

References data_cont_on.

bool GETSystemAnalyser::IsDataNumberCheckON ( ) const
inline

Return true if the check of data per channel is set.

References data_num_on.

Referenced by GETSystem::ProcessCoBoFrameData().

bool GETSystemAnalyser::IsFluctuationsAnalysisON ( ) const
inline

Return true if the baseline fluctuations analysis is defined.

References fluct_on.

Referenced by GETActarEventReader::CreateEvent().

bool GETSystemAnalyser::IsFPNtestAnalysisON ( ) const
inline

Return true if the FPN test analysis is ON.

References fpn_test_on.

bool GETSystemAnalyser::IsFullRecSet ( ) const
inline

Return true if the full reconstructed signal analysis mode is set.

References full_rec.

bool GETSystemAnalyser::IsMaximaDataComputed ( ) const
inline

Function that returns true is the channels maxima have been computed.

References mmax_computed.

Referenced by GETActarEventReader::HistoClickedSlot().

bool GETSystemAnalyser::IsMultiMaxDefined ( ) const
inline

Return true if the multiple maxima analysis is performed.

References mmax_analysis.

bool GETSystemAnalyser::IsNoiseAnalysisON ( ) const
inline

Return true if the noise analysis is defined.

References rms_on.

Referenced by GETActarEventReader::CreateEvent(), and GETActarEventReader::PresetSystemAnalysis().

bool GETSystemAnalyser::IsResolutionAnalysisON ( ) const
inline

Return true if the maximum amplitude resolution analysis is defined.

References resol_on.

Referenced by GETActarEventReader::CreateEvent().

int GETSystemAnalyser::OutputCorrection ( )
inlinevirtual

Function that applies specific corrections on the output channels (such as off-track signal correction for ACTAR TPC). This function is called after the output corrections of the GETSystem object, and before building the reconstrucetd signals and calling the corrected data analysis. The function does nothing in the base analyser class.

Reimplemented in GETActarTpcAnalyser.

Referenced by GETSystem::AnalyseEvent().

TF1 * GETSystemAnalyser::PresetChannelFctParameters ( double  vmax,
double  tmax,
double  wid 
)
virtual

Initializes the channel fit function parameters from the amplitude preanalysis values.

Parameters
vmaxsignal maximum amplitude
tmaxtime of maximum amplitude
widhalf maximum width

References amplitude_mode, GET::amplitudeFitFct, GET::amplitudeFitG, GET::amplitudeFitGSC, GET::amplitudeFitSqG, GET::amplitudeFitSqGSC, fit_channel_fct, fit_channel_npar, GET_FWHM_TO_SIGMA, get_ptr, GET_SQRT_2PI, getFctGaus, getFctGausSinC, getFctSquareGaus, getFctSquareGausSinC, and GETObject::GetTimeStep().

Referenced by CalcChannelAmplitude(), and ClearAmplitudeData().

int GETSystemAnalyser::ProcessDataContinuityCheck ( )
virtual

Perform the analysis of data continuity check. The function returns the number of bad channels, for which the number some variations passes the threshold.

References channel_bad, channel_bad_flag, ContinuityCheck(), data_cont_bad, data_cont_on, data_num_bad, get_ptr, GETSystem::GetChannel(), GetChannelNumber(), GETSystem::GetEventCount(), and GETChannel::OutSample().

Referenced by AnalyseRawEvent().

int GETSystemAnalyser::ProcessFluctuationsAnalysis ( )
virtual

Perform the baseline fluctuations analysis: the mean sample value in the analysis time range is compared to the average of previous events. The function returns the number of bad channels.

References channel_bad, channel_bad_flag, GETSystem::ChannelHasData(), fluct_bad, fluct_cnt, fluct_imax, fluct_imin, fluct_on, fluct_sum, fluct_warn, get_ptr, GETSystem::GetChannel(), GetChannelNumber(), GETSystem::GetEventCount(), h_channels_fluct, and GETChannel::OutSample().

Referenced by AnalyseRawEvent().

int GETSystemAnalyser::ProcessFPNtestAnalysis ( )
virtual

Function processing current event for the FPN test analysis.

The function returns 0 if the analysis has been performed correctly (whatever the result of the analysis, if there are bad channels or not).

References AGET_SIZE, ASAD_SIZE, channel_bad, channel_bad_flag, fpn_test_bad, fpn_test_dmax, fpn_test_dmin, fpn_test_i1max, fpn_test_i1min, fpn_test_i2max, fpn_test_i2min, fpn_test_on, get_ptr, GETSystem::GetCoBoNumber(), GETSystem::GetEventCount(), GETAGet::GetFPNChannel(), GETAGet::GetTotalChannelCount(), and GETChannel::OutSample().

Referenced by AnalyseRawEvent().

int GETSystemAnalyser::ProcessNoiseAnalysis ( )
virtual

Compute the noise (RMS) for all channels int the time range for noise analysis. The results are stored in the corresponding histogram.

Reimplemented in GETActarTpcAnalyser.

References get_ptr, GETSystem::GetChannel(), GetChannelNumber(), GETChannel::GetReadoutCount(), h_channels_rms, GETChannel::OutSample(), GETChannel::RecSample(), rms_imax, rms_imin, rms_on, select_data_signal, GET::signalRec, GET::signalTst, and GETChannel::TstSample().

Referenced by AnalyseCorEvent(), and GETActarTpcAnalyser::ProcessNoiseAnalysis().

int GETSystemAnalyser::ProcessResolutionAnalysis ( )
virtual

Function processing current event in the maximum amplitude resolution analysis. The maximum amplitude must have been previously computed (for example this is done by GETSystemAnalyser::ComputeAmplitudeData, that is called in the GETSystemAnalyser::AnalyseCorEvent function).

The function first add the current event to the 2D amplitude summary, then it computes the RMS for all channels, from the 2D histogram analysis, and stores the result in the resolution histogram.

The function returns 0 if the analysis has been performed correctly (whatever the result of the analysis, if there are bad channels or not).

References CumulChannelsSummaryHisto(), GET::dataAmplitude, get_ptr, GETSystem::GetChannelCount(), h_resol_ampl, h_resol_rms, resol_dim, resol_on, and resol_step.

Referenced by GETActarTpcAnalyser::AnalyseCorEvent(), and AnalyseCorEvent().

int GETSystemAnalyser::ReadConfigFile ( const string &  cfg)
virtual

Function that reads setup parameters for GET system.

The function returns 0 if no error occured, a positive value in case of file error and a negative value if some invalid commands are found.

Parameters
cfgconfiguration file name

Referenced by ConfigCommand().

int GETSystemAnalyser::ReadConfigFile ( FILE *  fp)
virtual

Function that reads setup parameters for GET system.

The function returns 0 if no error occured, a positive value in case of file error and a negative value if some invalid commands are found.

Parameters
fpsetup file pointer

References ConfigCommand().

void GETSystemAnalyser::ResetMaximaData ( )

Function deleting the arrays for multiple maxima estimates for all channels.

References mmax_amplitude, mmax_computed, mmax_num, mmax_sum, mmax_time, and mmax_tot.

Referenced by InitAmplitudeData(), and InitMaximaData().

void GETSystemAnalyser::SetAmplitudeWindow ( double  win)

This function amplitude analysis window around the maximum for local maximum analysis modes.

Parameters
winassociated analysis time window for local analysis

References amplitude_window.

Referenced by SetAmplitudeMode().

TF1 * GETSystemAnalyser::SetChannelFctParameters ( u_int  ic)
virtual
void GETSystemAnalyser::SetDataNumberRejectThreshold ( u_int  nmin)
inlinevirtual

Set the threshold number of data in a channel, below which the data are considered bad, and set in the bad read data of the GETSystem, in order to be considered in data correction. The channel is then considered as unread.

Parameters
nminminimum data in a channel

References data_num_reject.

void GETSystemAnalyser::SetEventsSkip ( u_int  n)
inline

Set the number of events to skip at the beginning of analysis: they are not analysed at all. An call the the GETSystemAnalyser::ClearAnalysis function resets the analysis event counter, and next n events will be skipped again.

Parameters
nnumber of events to skip

References events_skip.

Referenced by ConfigCommand().

void GETSystemAnalyser::SetFullRec ( bool  b = true)
inline

Set the filling mode for automatic histograms when using reconstructed signal: if true, then the full time sample is used for filling histograms, otherwhise only time buckects above threshold.

Parameters
bfull recontructed signal projection status

References full_rec.

Referenced by ConfigCommand().

void GETSystemAnalyser::SetMaximaDiffThreshold ( double  thr)
inline

Function that sets the difference threshold for maxima analysis. The maxima are considered as real maxima only if the relative difference with neighbour extrema is greater than the threshold.

Parameters
thrscaling factor

References mmax_diff_thr.

Referenced by ConfigCommand().

void GETSystemAnalyser::SetMaximaScaling ( double  fact)
inline

Function that sets the scaling factor for maxima analysis. The maxima are basically the integral of signal around the maxima. For example, for Gauss peaks, a factor 1/(sqrt(2*pi)*sigma) would then give amplitudes instead of integral signal for multiple maxima analysis.

Parameters
factscaling factor

References mmax_scale.

Referenced by ConfigCommand().

void GETSystemAnalyser::SetNoiseRange ( u_int  i0 = 2,
u_int  i1 = 509 
)
virtual

Defines or modify the limits (time bucket indexes) for the noise analysis. If not yet defined, the corresponding histogram is created and the noise analysis is turned ON.

If both limits are set to 0, the analysis is turned OFF (but the histogram is not deleted).

Parameters
i0lower time bucket for the analysis range
i1upper time bucket for the analysis range

Reimplemented in GETActarTpcAnalyser.

References get_ptr, GETSystem::GetChannelCount(), GETObject::GetSampleDim(), h_channels_rms, rms_imax, rms_imin, and rms_on.

Referenced by ConfigCommand(), and GETActarTpcAnalyser::SetNoiseRange().

void GETSystemAnalyser::SetRecTlimits ( double  t0,
double  t1 
)
virtual

Defines the time limits for reconstructed signal analysis.

Parameters
t0time lower limit value
t1time upper limit value

References SetRecTmax(), and SetRecTmin().

Referenced by ConfigCommand(), and SetSystem().

void GETSystemAnalyser::SetRecTmax ( double  t)
virtual

Defines the time upper limits for reconstructed signal analysis.

Parameters
ttime limit value

References get_ptr, GETObject::GetSampleDim(), GETObject::GetTimeStep(), rec_itmax, rec_tmax, rec_tmin, and SetRecTmin().

Referenced by SetRecTlimits(), and SetRecTmin().

void GETSystemAnalyser::SetRecTmin ( double  t)
virtual

Defines the time lower limits for reconstructed signal analysis.

Parameters
ttime limit value

References get_ptr, GETObject::GetSampleDim(), GETObject::GetTimeStep(), rec_itmin, rec_tmax, rec_tmin, and SetRecTmax().

Referenced by SetRecTlimits(), and SetRecTmax().

void GETSystemAnalyser::SetSelectedData ( u_short  id)
inline

Define the data to be analysed, for hit pattern and for signal analysis: output (default), input/test or reconstructed signals.

Parameters
idselected data (GET::signalOut, GET::signalTst or GET::signalRec)

References SetSelectedHitData(), and SetSelectedSignalData().

Referenced by AnalyseRawEvent(), ConfigCommand(), and GETActarTpcAnalyser::OutputCorrection().

void GETSystemAnalyser::SetSelectedHitData ( u_short  id)
inline

Define the data to be analysed, for hit pattern: output (default), input/test or reconstructed signals.

Parameters
idselected data (GET::signalOut, GET::signalTst or GET::signalRec)

References hit_mask, GETObject::id, select_data_hit, and GETHitMask::SetDataInfo().

Referenced by AnalyseRawEvent(), ConfigCommand(), GETActarTpcAnalyser::OutputCorrection(), and SetSelectedData().

void GETSystemAnalyser::SetSelectedSignalData ( u_short  id)
inline

Define the data for signal analysis: output (default), input/test or reconstructed signals.

Parameters
idselected data (GET::signalOut, GET::signalTst or GET::signalRec)

References ClearAmplitudeData(), get_ptr, GETObject::id, select_data_signal, GETSystem::SetInputRecAnalysis(), and GET::signalRec.

Referenced by AnalyseRawEvent(), GETActarTpcAnalyser::OutputCorrection(), and SetSelectedData().

int GETSystemAnalyser::SetSystem ( GETSystem gptr)
virtual

Define the GET system from which the data will be analysed. Note that all previously defined information is resetted. The GET system must be initialized (number of channels defined).

Parameters
gptrPointer to the GET system

Reimplemented in GETActarTpcAnalyser.

References channel_bad, channel_bad_flag, get_ptr, GETSystem::GetHitMask(), GETObject::GetSampleDim(), GETObject::GetTimeStep(), GETObject::GetTotalChannelCount(), hit_mask, InitAmplitudeData(), Reset(), and SetRecTlimits().

Referenced by GETSystem::SetAnalyser(), and GETActarTpcAnalyser::SetSystem().

void GETSystemAnalyser::SetTimingMode ( u_short  mode)

This function defines the procedure for the calculation of the channels timing analysis. The valid modes are:

References timing_mode, GET::timingMaxSignal, and GET::timingQuadraticMax.

Referenced by ConfigCommand().

void GETSystemAnalyser::SetTimingModeCFD ( double  frac,
double  delay 
)

This function selects the CFD procedure for the calculation of the channels timing analysis and sets the associated parameters.

Parameters
fracconstant fraction value
delayfraction signal delay

References timing_cfd_delay, timing_cfd_fraction, timing_mode, and GET::timingCFD.

Referenced by ConfigCommand().


The documentation for this class was generated from the following files: