GET library
GETChannel Class Reference

#include <GETChannel.hh>

Inheritance diagram for GETChannel:
GETObject

Public Member Functions

Constructors, affectation, destructor
 GETChannel (u_int n=0, double dt=0.01L)
 
virtual ~GETChannel ()
 
GET configuration
virtual int ResetConfig ()
 
const GETCfgChannelGetConfig () const
 
GETCfgChannelGetConfig ()
 
bool IsFPNChannel () const
 
bool IsSignalChannel () const
 
Initialization functions
virtual void Reset ()
 
virtual void Init (u_int n, double dt)
 
virtual void SetTimeStep (double dt)
 
virtual void ClearEvent ()
 
virtual void ValidDataSet ()
 
virtual void ValidSimulSet ()
 
bool IsModeData () const
 
bool IsModeSimul () const
 
GET system core objects functions
int GetSignalId () const
 
virtual string GetObjectId () const
 
virtual u_int GetChannelCount () const
 
virtual u_int GetChildrenNumber () const
 
virtual const GETObjectGetChild (u_int i) const
 
virtual GETObjectGetChild (u_int i)
 
u_short GetLastCell () const
 
u_int GetSaturationCount () const
 
virtual u_int GetReadoutMultiplicity (bool fpn=true) const
 
virtual double GetSignalSum (u_short info=GET::signalOut)
 
Channel samples (Test, Output, Reconstructed) function
bool GetReadoutFlag () const
 
u_int GetReadoutCount () const
 
GETSampleTstSample ()
 
GETSampleOutSample ()
 
GETSampleRecSample ()
 
virtual int ProcessData (bool in_noise=true)
 
virtual int ProcessOutFromTst (bool in_noise=true, bool out_noise=true)
 
virtual int ProcessRecFromOut (bool out_corr=true)
 
virtual int ProcessOutputCorrection ()
 
virtual int ApplyOutputNoise (GETSample &out_sample)
 
virtual int ApplyOutputCorrection (GETSample &cor_sample)
 
ROOT related functions
 ClassDef (GETChannel, 0)
 
- Public Member Functions inherited from GETObject
 GETObject ()
 
virtual ~GETObject ()
 
int GetId () const
 
virtual string GetFullId () const
 
virtual u_int GetSignalChannelCount () const
 
virtual u_int GetTotalChannelCount () const
 
virtual GETChannelGetSignalChannel (u_int n)
 
virtual GETChannelGetTotalChannel (u_int n)
 
virtual GETChannelGetChannel (u_int n)
 
const GETObjectGetParent () const
 
GETObjectGetParent ()
 
u_int GetSampleDim ()
 
double GetTimeStep ()
 
virtual void InitLocalData (u_int n, double dt)
 
virtual void SetResponse (GETResponse *ptr, bool recur=true, bool fpn=false)
 
virtual void SetResponse (GETResponse &obj, bool recur=true, bool fpn=false)
 
virtual void SetFilter (GETFilter *ptr, bool recur=true, bool fpn=false)
 
virtual void SetFilter (GETFilter &obj, bool recur=true, bool fpn=false)
 
virtual void SetNoiseIn (GETSignalModifier *ptr, bool recur=true, bool fpn=false)
 
virtual void SetNoiseIn (GETSignalModifier &obj, bool recur=true, bool fpn=false)
 
virtual void SetNoiseOut (GETSignalModifier *ptr, bool recur=true, bool fpn=false)
 
virtual void SetNoiseOut (GETSignalModifier &obj, bool recur=true, bool fpn=false)
 
virtual void SetOutputCorrection (GETProcess *ptr, bool recur=true, bool fpn=false)
 
virtual void SetOutputCorrection (GETProcess &obj, bool recur=true, bool fpn=false)
 
virtual void RemoveOutputCorrection ()
 
virtual void SetOutputCorrectionList (bool warn=true)
 
virtual void AddOutputCorrection (GETProcess *ptr, bool recur=true, bool fpn=false)
 
virtual void AddOutputCorrection (GETProcess &obj, bool recur=true, bool fpn=false)
 
GETResponseGetResponse (bool force=true)
 
GETFilterGetFilter (bool force=true)
 
GETSignalModifierGetNoiseIn (bool force=true)
 
GETSignalModifierGetNoiseOut (bool force=true)
 
GETProcessGetOutputCorrection (bool force=true)
 
 ClassDef (GETObject, 0)
 

Protected Attributes

GETCfgChannelconfig
 Configuration data.
 
u_short data_mode
 Whether data comes from an experimental file or from simulation.
 
bool is_read
 Flag indicating whether the channel was read (from exp. raw data)
 
u_int read_count
 Number of data read for the channel (from exp. raw data)
 
u_int satur_count
 Number of data over saturation threshold.
 
int sig_id
 Signal channel identifier (0-63 for signal, 64-67 for FPN)
 
GETSample signal_out
 Output signal from AGET.
 
GETSample signal_rec
 Reconstructed signal (filtering and deconvolution)
 
GETSample signal_tst
 Test (input) signal (for simulation)
 
- Protected Attributes inherited from GETObject
GETProcessLink filter
 Signal processing filter.
 
int id
 Object identifier number (set by the parent, in filiation)
 
GETProcessLink noise_in
 Simulation input noise generator.
 
GETProcessLink noise_out
 Simulation output noise generator.
 
GETProcessLink output_corr
 Output signal correction before reconstruction of input.
 
GETObjectparent
 Parent AGet chip.
 
GETProcessLink response
 Signal response function.
 

Private Member Functions

 GObject (GETChannel)
 

Friends

class GETAGet
 
class GETCfgChannel
 
class GETSystem
 

Detailed Description

This class defines the mechanism for a single channel processing. It can be used in 2 ways:

  • to analyse some "real" data: the data coming from the electronics is set in the output sample, and processed to estimate the input signal (deconvolution of the response function); in this case, an additionnal output noise can be defined (the input noise has to be set directly in the input test sample).
  • to simulate some data, setting an input signal that is transformed using the response function before being processed.

The GETChannel defines 3 signal samples objects:

  • the test sample: input signal (from simulations);
  • the output sample: the result from simulation input processing (with optional output noise) or the result from a real measurement;
  • the reconstructed sample, from inverse processing of the output, with optional signal filtering.
Examples:
TestChannel.C.

Constructor & Destructor Documentation

GETChannel::GETChannel ( u_int  n = 0,
double  dt = 0.01L 
)

Base constructor.

Parameters
nsampling size of the channels
dtsampling period (us)

References config, data_mode, Init(), GET::modeData, and sig_id.

GETChannel::~GETChannel ( )
virtual

Destructor.

References config.

Member Function Documentation

int GETChannel::ApplyOutputCorrection ( GETSample cor_sample)
virtual

Function that applies the output correction for the channel and store the result in the argument sample. The function returns a non-0 value if an error occured (if the required signals are not defined).

Parameters
cor_samplesample where result is stored

References GETObject::GetFullId(), GETObject::GetOutputCorrection(), GETProcessLink::IsDefined(), GETObject::output_corr, GETProcess::ProcessSample(), and signal_out.

Referenced by ProcessOutputCorrection(), and ProcessRecFromOut().

int GETChannel::ApplyOutputNoise ( GETSample out_sample)
virtual

Function that applies the output noise for the channel and store the result in the argument sample. The function returns a non-0 value if an error occured (if the required signals are not defined).

Parameters
out_samplesample where result is stored

References GETObject::GetFullId(), GETObject::GetNoiseOut(), GETProcessLink::IsDefined(), GETObject::noise_out, GETSignalModifier::ProcessSample(), and signal_out.

GETChannel::ClassDef ( GETChannel  ,
 
)

for use within ROOT.

void GETChannel::ClearEvent ( )
virtual

Clears all input/outout signals from each channel of each AGET chip.

References data_mode, is_read, GET::modeUndefined, read_count, satur_count, signal_out, signal_rec, and signal_tst.

u_int GETChannel::GetChannelCount ( ) const
inlinevirtual

Return the total number of channels under the object.

Reimplemented from GETObject.

const GETObject * GETChannel::GetChild ( u_int  i) const
inlinevirtual

Return a GET core child object (NULL since channels have no children).

Parameters
ichild number

Implements GETObject.

GETObject * GETChannel::GetChild ( u_int  i)
inlinevirtual

Return a GET core child object (NULL since channels have no children).

Parameters
ichild number

Implements GETObject.

u_int GETChannel::GetChildrenNumber ( ) const
inlinevirtual

Return the number of GET core children objects.

Implements GETObject.

const GETCfgChannel * GETChannel::GetConfig ( ) const
inline

Return the pointer to the related GET configuration.

References config.

GETCfgChannel * GETChannel::GetConfig ( )
inline

Return the pointer to the related GET configuration.

References config.

u_short GETChannel::GetLastCell ( ) const

Return the last cell read from parent AGet if defined (otherwise, the function returns 0.

References GETObject::parent.

Referenced by GETPhaseCorrection::ProcessSample().

string GETChannel::GetObjectId ( ) const
inlinevirtual

Return the object string identifier.

Implements GETObject.

u_int GETChannel::GetReadoutCount ( ) const
inline

Return the number of data that have been read for the channel.

References read_count.

Referenced by GETActarEventReader::AnalysisEvent(), and GETSystemAnalyser::ProcessDataNumberCheck().

bool GETChannel::GetReadoutFlag ( ) const
inline

Get the readout flag indicating if the channel some data was read.

References read_count.

Referenced by GETActarEventReader::AnalysisEvent(), and GETSystemAnalyser::CumulChannelsSummaryHisto().

u_int GETChannel::GetReadoutMultiplicity ( bool  fpn = true) const
virtual

Return the number of read channels: for the channel, it can be 0 or 1.

Parameters
fpnindicates if the FPN channels should be counted

Reimplemented from GETObject.

References IsSignalChannel(), and read_count.

u_int GETChannel::GetSaturationCount ( ) const
inline

Return the number of data over saturation threshold (by readout function of the GET system.

References satur_count.

Referenced by GETActarEventReader::HistoClickedSlot(), GETActarEventReader::HistoEventSlot(), and GETSystem::IsChannelSaturated().

int GETChannel::GetSignalId ( ) const
inline

Return the signal channel index (-1 if undefined).

References sig_id.

double GETChannel::GetSignalSum ( u_short  info = GET::signalOut)
virtual

Return the sum of the signal channels (FPN are not included.

Parameters
infosamples used for signal summing: GET::signalOut (default) GET::signalTst or GET::signalRec

Reimplemented from GETObject.

References OutSample(), RecSample(), GET::signalRec, GET::signalTst, and TstSample().

Referenced by GETAGet::GetSignalSum().

GETChannel::GObject ( GETChannel  )
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 GETChannel::Init ( u_int  n,
double  dt 
)
virtual

Initialisation of all individual channels.

Parameters
nsampling size of the channels
dtsampling time step

References GETObject::InitLocalData(), read_count, sig_id, signal_out, signal_rec, and signal_tst.

Referenced by GETChannel(), and GETAGet::Init().

bool GETChannel::IsFPNChannel ( ) const
bool GETChannel::IsModeData ( ) const
inline

Return true if the channel is in data mode: output sample is defined.

References data_mode, and GET::modeData.

bool GETChannel::IsModeSimul ( ) const
inline

Return true if the channel is in data mode: test input sample is defined.

References data_mode, and GET::modeSimul.

GETSample & GETChannel::OutSample ( )
inline

Return the (reference to the) output sample (GET output data, from experiment or after simulation input processing).

Examples:
Demonstrator_Noise.C, Demonstrator_RMS1.C, and TestChannel.C.

References signal_out.

Referenced by GETActarEventReader::AnalysisEvent(), GETActarTpcAnalyser::ApplyOffTrackCorrection(), GETSystemAnalyser::CalcChannelMaxima(), GETSystemAnalyser::CalcChannelOutput(), GETActarTpcAnalyser::ComputeSumInt(), GETSystemAnalyser::CreateAllChannelsHisto(), GETSystemAnalyser::CreateFullEventHisto(), GETActarTpcAnalyser::CreateInTrackMeanHisto(), GETActarTpcAnalyser::CreateOffTrackMeanHisto(), GETSystemAnalyser::CumulChannelsSummaryHisto(), GETActarEventReader::DefinePadSpectrum(), GETActarTpcAnalyser::Export3D_POV(), GETActarTpcAnalyser::ExportPads_POV(), GETRCoBo::ExtractCoBoFrame(), GETSystemAnalyser::FillAllChannelsHisto(), GETActarTpcAnalyser::FillAutoHistograms(), GETSystemAnalyser::FillChannelsSummaryHisto(), GETSystemAnalyser::FillFullEventHisto(), GETActarTpcAnalyser::FillHistogram3D(), GETActarTpcAnalyser::FillHistogramXTmax(), GETActarTpcAnalyser::FillHistogramYTmax(), GETActarTpcAnalyser::FillPadHistogram(), GETSystem::GetMaximumChannel(), GETActarTpc::GetSignalBoundaries(), GetSignalSum(), GETSystem::OutputCorrectFPN(), GETSystem::ProcessCoBoFrameData(), GETSystemAnalyser::ProcessDataContinuityCheck(), GETSystemAnalyser::ProcessFluctuationsAnalysis(), GETSystemAnalyser::ProcessNoiseAnalysis(), GETActarTpcAnalyser::ProcessOffTrackAnalysis(), GETSignalModifier::ProcessSample(), GETResponse::ProcessSample(), GETProcessSerie::ProcessSample(), GETFilter::ProcessSample(), GETRCoBo::ReadEvent(), GETHitMaskXY::UpdateMask(), GETHitMask::UpdateMask(), and GETSystem::ZeroSuppression().

int GETChannel::ProcessData ( bool  in_noise = true)
virtual

Compute samples for the channel: for a simulated input (test channel input sample), the output is computed from response function (see ProcessOutFromTst function), and for simulated or experimental data, the reconstructed signal sample is computed (see ProcessRecFromOut function). The function returns a non-0 value if an error occured (if the required signals are not defined).

Parameters
in_noiseindicate whether the input sample is modified by the input noise process (in such case, the function should not be called several times for the same channel - for the same event - since the noise would be added several times)

Reimplemented from GETObject.

References data_mode, GETObject::GetFullId(), GET::modeSimul, GET::modeUndefined, ProcessOutFromTst(), and ProcessRecFromOut().

int GETChannel::ProcessOutFromTst ( bool  in_noise = true,
bool  out_noise = true 
)
virtual

Function that computes the output signal sample from the test (simulation) input. If the channel defines an input and/or an output noise generator, the corresponding noise is included in the processing.

In case of an input noise, after the function call, the input sample is modified or not due to this noise, according to the in_noise argument.

The function returns a non-0 value if an error occured (if the required signals are not defined).

Parameters
in_noiseindicate whether the input sample is modified by the input noise process (in such case, the function should not be called several times for the same channel - for the same event - since the noise would be added several times)
out_noiseindicate whether the output noise should be applied (this is defined to allow to separately apply the output noise in processes decomposition)

Reimplemented from GETObject.

Examples:
TestChannel.C.

References GETObject::GetFullId(), GETObject::GetNoiseIn(), GETObject::GetNoiseOut(), GETObject::GetResponse(), GETProcessLink::IsDefined(), GETObject::noise_in, GETObject::noise_out, GETSignalModifier::ProcessSample(), GETResponse::ProcessSample(), GETObject::response, signal_out, signal_tst, and GET::signalTst.

Referenced by ProcessData().

int GETChannel::ProcessOutputCorrection ( )
virtual

Function that applies the ouput correction to the channel data. If the channel is defined as experimental data, the correction is applied only if the channel was read.

Reimplemented from GETObject.

References ApplyOutputCorrection(), data_mode, GETObject::GetFullId(), is_read, GETProcessLink::IsDefined(), GET::modeSimul, GETObject::output_corr, and signal_out.

int GETChannel::ProcessRecFromOut ( bool  out_corr = true)
virtual

Function that computes the reconstructed signal sample from the output (AGet response). If the channel defines processing filter, the output is filtered before the deconvolution of the channel output with AGet response function. The function returns a non-0 value if an error occured (if the required signals are not defined).

Parameters
out_corrwhether the output correction should apply (if it has not been applied yet)

Reimplemented from GETObject.

Examples:
TestChannel.C.

References ApplyOutputCorrection(), GETObject::filter, GETObject::GetFilter(), GETObject::GetFullId(), GETObject::GetResponse(), GETProcessLink::IsDefined(), GETObject::output_corr, GETResponse::ProcessSample(), GETFilter::ProcessSample(), signal_out, and signal_rec.

Referenced by ProcessData().

void GETChannel::Reset ( )
virtual

Function resetting the channel. It currently does nothing.

References read_count, and sig_id.

int GETChannel::ResetConfig ( )
virtual

Removes the configuration architecture.

References config.

void GETChannel::SetTimeStep ( double  dt)
virtual

Set the time step for the samples of the channel. The minimum value is 0.01 us.

Parameters
dtnew time step (in us)

Reimplemented from GETObject.

References signal_out, signal_rec, and signal_tst.

void GETChannel::ValidDataSet ( )
virtual

Function setting output sample (from experimental file) as valid and setting channel data mode to GET::modeData.

Reimplemented from GETObject.

References data_mode, GET::modeData, signal_out, signal_rec, and signal_tst.

void GETChannel::ValidSimulSet ( )
virtual

Function setting test (input) sample (from simulation) as valid and setting channel data mode to GET::modeSimul.

Reimplemented from GETObject.

References data_mode, GET::modeSimul, signal_out, signal_rec, and signal_tst.


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