GET library
|
#include <GETHitMask.hh>
Public Member Functions | |
Constructors, affectation, destructor | |
GETHitMask (GETSystem *get=NULL) | |
GETHitMask (const GETHitMask &mask) | |
GETHitMask & | operator= (const GETHitMask &mask) |
virtual | ~GETHitMask () |
virtual void | CopyData (const GETHitMask &mask) |
Hit mask building | |
virtual void | EraseMask () |
virtual int | InitMask () |
virtual void | ClearHitMask () |
virtual void | ClearValidMask () |
virtual void | InvertHits () |
virtual bool | IsMaskDefined () const |
virtual bool | IsMaskSet () const |
virtual void | SetDataInfo (u_short info) |
virtual u_short | GetDataInfo () const |
Hit mask data | |
GETSystem * | GetSystemPtr () const |
virtual u_int | GetSize () const |
virtual u_int | GetNhit () const |
virtual u_int | GetNhitValid () const |
virtual double | GetThreshold (u_int ic=0) const |
virtual void | SetThreshold (double thr) |
virtual void | SetThreshold (u_int ic, double thr) |
virtual void | SetThresholds (double *tab) |
virtual void | SetThresholds (const string &fname, double fact=1., double cst=0.) |
virtual u_int | UpdateMask () |
virtual void | SetValid (u_int ic, bool b=true) |
virtual void | SetHit (u_int ic, bool b=true) |
virtual bool | IsValid (u_int ic) const |
virtual bool | IsHit (u_int ic) const |
virtual bool | IsValidHit (u_int ic) const |
Read-write function | |
virtual int | WriteFileText (const string &fname) |
virtual int | CreateThresholdXML (const string &fname, const double rdiscri=0.05) |
ROOT related functions | |
ClassDef (GETHitMask, 0) | |
Protected Attributes | |
u_short | data_info |
The flag indicating on which data the mask acts (test, output or reconstructed sample) | |
GETSystem * | get_ptr |
Pointer to the GET system. | |
bool * | hit_table |
Table of hit channels. | |
bool | mask_set |
Whether the mask has been computed. | |
u_int | nhit |
Number of hit channels. | |
u_int | nhit_val |
Number of hit valid channels. | |
u_int | size |
Number of GET channels. | |
double * | threshold |
Current mask threshold table. | |
bool * | val_table |
Table of valid channels. | |
Private Member Functions | |
GObject (GETHitMask) | |
This class defines a mask for analysis of the hit channels of the detector.
It requires that the lookup table is defined for the GET system.
The hit mask associated a logical value to each channel, indicating that the channel signal is larger than a threshold.
GETHitMask::GETHitMask | ( | GETSystem * | get = NULL | ) |
Constructor from a GET system. The look-up table of the system must be defined in order to create the hit mask data. Otherwise, the mask must be initialised when the look-up table is defined.
References data_info, get_ptr, hit_table, InitMask(), mask_set, nhit, nhit_val, GET::signalOut, size, threshold, and val_table.
GETHitMask::GETHitMask | ( | const GETHitMask & | mask | ) |
|
virtual |
Destructor.
References EraseMask().
GETHitMask::ClassDef | ( | GETHitMask | , |
0 | |||
) |
for use within ROOT.
|
virtual |
Clear the hit mask (all channels hit set to false).
Reimplemented in GETHitMaskXY.
References hit_table, mask_set, nhit, nhit_val, and size.
Referenced by GETSystem::ClearEvent(), GETHitMaskXY::ClearHitMask(), InitMask(), SetThreshold(), SetThresholds(), and UpdateMask().
|
virtual |
|
virtual |
Copy all the data from the argument mask. Function called by copy constructor and affectation.
mask | object to copy |
References data_info, get_ptr, GetDataInfo(), GetNhit(), GetNhitValid(), GetSystemPtr(), GetThreshold(), hit_table, InitMask(), IsHit(), IsMaskSet(), IsValid(), mask_set, nhit, nhit_val, size, threshold, and val_table.
Referenced by GETHitMaskXY::CopyData(), GETHitMask(), and operator=().
|
virtual |
Create a XML configuration for acquisition interface containing the parameter values for the thresholds.
The effective threshold is coded from 0 to 127, with 7 bits:
The threshold value is adjusted according the gain bit that selects the dynamic range of the discriminator (register 2, bit 24, see AGET documentation), as a fraction R of the input range.
The full range of the discriminator thus corresponds to a fraction R of the maximum signal amplitude, considered here as the maximum coder value: 4096.
For each channel, the relation between the configuration threshold value thr(cfg) and the corresponding signal amplitude thr(val) is:
thr(cfg) = 128 * [thr(val) / (R * 4096)]
Then, for each AGET chip, the
fname | name of the file |
rdiscri | dynamic range of the discriminator |
References AGET_SIZE, get_ptr, GETCoBo::GetChildrenNumber(), GETAsAd::GetChildrenNumber(), GETAGet::GetChildrenNumber(), GETSystem::GetChildrenNumber(), and threshold.
|
virtual |
Delete the data tables of the hit mask.
References hit_table, mask_set, nhit, nhit_val, size, threshold, and val_table.
Referenced by InitMask(), and ~GETHitMask().
|
inlinevirtual |
Return the sample identifier on which the hit is checked: GET::signalOut, GET::signalTst or GET::signalRec.
References data_info.
Referenced by CopyData().
|
inlinevirtual |
Return the number of hit channels (valid or not) of the hit mask.
References nhit.
Referenced by CopyData().
|
inlinevirtual |
Return the number of hit valid channels of the hit mask.
References nhit_val.
Referenced by CopyData(), and GETActarTpcAnalyser::GetOffTrackPadsCount().
|
inlinevirtual |
Return the number of channels of the hit mask.
References size.
|
inline |
Return the pointer to the GET system object using the mask.
References get_ptr.
Referenced by CopyData().
|
inlinevirtual |
Return the current threshold value for a channel.
ic | electronics channel index |
References size, and threshold.
Referenced by GETSystemAnalyser::CalcChannelMaxima(), CopyData(), GETActarTpcAnalyser::Export3D_POV(), and GETActarTpcAnalyser::FillHistogram3D().
|
private |
Macro from GCpp library that defines the following functions:
|
virtual |
Initialise the hit mask data from the GET system. The look-up table of the GET system must be defined. The function returns 0 if no error occured.
References ClearHitMask(), ClearValidMask(), EraseMask(), get_ptr, GETObject::GetTotalChannelCount(), hit_table, GETLookupTable::IsTableSet(), GETSystem::LookupTable(), nhit, nhit_val, SetThreshold(), size, threshold, and val_table.
Referenced by CopyData(), and GETHitMask().
|
virtual |
|
inlinevirtual |
Return true if the channel is hit (and valid).
ic | electronics channel index |
References hit_table, IsMaskSet(), and size.
Referenced by CopyData().
|
inlinevirtual |
Return true if the mask data are defined.
Referenced by GETActarTpcAnalyser::Export3D_POV(), GETActarTpcAnalyser::ExportPads_POV(), GETActarTpcAnalyser::FillHistogram3D(), GETActarTpcAnalyser::FillHistogramXTmax(), GETActarTpcAnalyser::FillHistogramYTmax(), GETActarTpcAnalyser::FillPadHistogram(), GETHitMaskXY::GetBoundaries(), IsMaskSet(), GETHitMaskXY::SetBorder(), SetThreshold(), SetThresholds(), GETHitMaskXY::SetValid(), SetValid(), GETHitMaskXY::UpdateMask(), and UpdateMask().
|
inlinevirtual |
Return true if the hit mask has been computed.
References IsMaskDefined(), and mask_set.
Referenced by GETActarTpcAnalyser::AnalyseCorEvent(), GETSystemAnalyser::AnalyseCorEvent(), CopyData(), GETActarTpcAnalyser::Export3D_POV(), GETActarTpcAnalyser::ExportPads_POV(), GETActarTpcAnalyser::FillAutoHistograms(), GETActarTpcAnalyser::FillHistogram3D(), GETActarTpcAnalyser::FillHistogramXTmax(), GETActarTpcAnalyser::FillHistogramYTmax(), GETActarTpcAnalyser::FillPadHistogram(), GETHitMaskXY::GetBoundaries(), GETActarTpc::GetMaxSignalChannel(), GETHitMaskXY::GetMaxSignalChannel(), GETHitMaskXY::IsHit(), IsHit(), GETHitMaskXY::IsValid(), GETHitMaskXY::IsValidHit(), IsValidHit(), GETHitMaskXY::SetHit(), and SetHit().
|
inlinevirtual |
Return true if the channel is valid.
ic | electronics channel index |
References size, and val_table.
Referenced by CopyData(), InvertHits(), and UpdateMask().
|
inlinevirtual |
Return true if the channel is hit and valid.
ic | electronics channel index |
References hit_table, IsMaskSet(), size, and val_table.
Referenced by GETSystemAnalyser::CalcChannelMaxima(), and GETSystemAnalyser::CalcChannelOutput().
GETHitMask & GETHitMask::operator= | ( | const GETHitMask & | mask | ) |
|
inlinevirtual |
Defined the sample on which the hit is checked: GET::signalOut, GET::signalTst or GET::signalRec
info | data information |
References data_info.
Referenced by GETActarTpc::SetHitMask(), and GETSystemAnalyser::SetSelectedData().
|
inlinevirtual |
Set the hit status of a channel.
ic | electronics channel index |
b | hit status |
References hit_table, IsMaskSet(), and size.
|
virtual |
Set the threshold value for all channels. The hit channel mask is cleared.
thr | threshold value |
References ClearHitMask(), IsMaskDefined(), size, and threshold.
Referenced by GETSystemAnalyser::ConfigCommand(), InitMask(), and SetThresholds().
|
virtual |
Set the threshold value for one channels. The hit channel mask is not cleared.
ic | channel index |
thr | threshold value |
References IsMaskDefined(), and threshold.
|
virtual |
Set the thresholds value for individual channels, from an array of data. The hit channel mask is cleared.
tab | thresholds array |
References ClearHitMask(), IsMaskDefined(), size, and threshold.
|
virtual |
Set the thresholds from a file (resulting from noise analysis).
fname | noise (RMS) file name |
fact | multiplication factor for RMS |
cst | constant offset for threshold values |
References SetThreshold().
|
inlinevirtual |
Set the validation status of a channel.
ic | electronics channel index |
b | hit status |
References IsMaskDefined(), size, and val_table.
|
virtual |
Set the mask according to current event in the GET system, with thresholds currently defined. The function returns the number of hit channels. It sets the flag indicating that the mask is set to true (see IsMaskSet function).
Reimplemented in GETHitMaskXY.
References ClearHitMask(), data_info, get_ptr, GETSystem::GetChannel(), hit_table, IsMaskDefined(), IsValid(), mask_set, nhit, nhit_val, GETChannel::OutSample(), GETChannel::RecSample(), GET::signalRec, GET::signalTst, size, threshold, and GETChannel::TstSample().
Referenced by GETActarTpcAnalyser::AnalyseCorEvent(), and GETSystemAnalyser::AnalyseCorEvent().
|
virtual |