GET library
|
#include <GETHitMaskXY.hh>
Public Member Functions | |
Constructors, affectation, destructor | |
GETHitMaskXY (GETSystem *get=NULL) | |
GETHitMaskXY (const GETHitMaskXY &mask) | |
GETHitMaskXY & | operator= (const GETHitMaskXY &mask) |
virtual | ~GETHitMaskXY () |
virtual void | CopyData (const GETHitMaskXY &mask) |
Hit mask data | |
virtual void | ClearHitMask () |
virtual u_int | UpdateMask () |
virtual u_int | GetNhitPads () const |
virtual bool | IsHit (u_int ix, u_int iy) const |
virtual bool | IsValid (u_int ix, u_int iy) const |
virtual bool | IsValidHit (u_int ix, u_int iy) const |
virtual void | SetHit (u_int ix, u_int iy, bool b=true) |
virtual void | SetValid (u_int ix, u_int iy, bool b=true) |
virtual void | SetBorder (u_int n=1, bool b=false) |
virtual void | MaskBorder (u_int n=1) |
virtual GETHitMaskXY & | ExpandHits (u_int n=1) |
int | GetIXmin () const |
int | GetIXmax () const |
int | GetIYmin () const |
int | GetIYmax () const |
int | GetITmin () const |
int | GetITmax () const |
u_int | GetBoundaries (int &ix0, int &ix1, int &iy0, int &iy1, int &it0, int &it1) |
GETChannel * | GetMaxSignalChannel () const |
int | GetMaxSignalIndex () const |
int | GetMaxSignalIX () const |
int | GetMaxSignalIY () const |
int | GetMaxSignalIT () const |
ROOT related functions | |
int | Fill2DMaskHisto (TH2 *hptr) |
ClassDef (GETHitMaskXY, 0) | |
Public Member Functions inherited from GETHitMask | |
GETHitMask (GETSystem *get=NULL) | |
GETHitMask (const GETHitMask &mask) | |
GETHitMask & | operator= (const GETHitMask &mask) |
virtual | ~GETHitMask () |
virtual void | CopyData (const GETHitMask &mask) |
virtual void | EraseMask () |
virtual int | InitMask () |
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 |
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 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 |
virtual int | WriteFileText (const string &fname) |
virtual int | CreateThresholdXML (const string &fname, const double rdiscri=0.05) |
ClassDef (GETHitMask, 0) | |
Protected Attributes | |
int | ic_chmax |
Electronic channel index of channel with max. signal. | |
int | it_chmax |
Time bucket of channel with max. signal. | |
int | itmax |
Upper bin on T axis. | |
int | itmin |
Lower bin on T axis. | |
int | ix_chmax |
X pad index of channel with max. signal. | |
int | ixmax |
Upper bin on X axis. | |
int | ixmin |
Lower bin on X axis. | |
int | iy_chmax |
Y pad index of channel with max. signal. | |
int | iymax |
Upper bin on Y axis. | |
int | iymin |
Lower bin on Y axis. | |
u_int | nhit_pads |
Number of valid pads hit. | |
Protected Attributes inherited from GETHitMask | |
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 (GETHitMaskXY) | |
This class defines a XY (2 dimension) hit mask for pad plane detectors.
The lloup-table of the GET system must be defined before defining a pads (XY) hit mask for the system.
GETHitMaskXY::GETHitMaskXY | ( | GETSystem * | get = NULL | ) |
GETHitMaskXY::GETHitMaskXY | ( | const GETHitMaskXY & | mask | ) |
|
virtual |
Destructor.
GETHitMaskXY::ClassDef | ( | GETHitMaskXY | , |
0 | |||
) |
for use within ROOT.
|
virtual |
Clear the mask (all channels hit set to false).
Reimplemented from GETHitMask.
References GETHitMask::ClearHitMask(), ic_chmax, it_chmax, itmax, itmin, ix_chmax, ixmax, ixmin, iy_chmax, iymax, iymin, and nhit_pads.
Referenced by UpdateMask().
|
virtual |
Copy all the data from the argument mask. Function called by copy constructor and affectation.
mask | object to copy |
References GETHitMask::CopyData(), GetITmax(), GetITmin(), GetIXmax(), GetIXmin(), GetIYmax(), GetIYmin(), GetMaxSignalIndex(), GetMaxSignalIT(), GetMaxSignalIX(), GetMaxSignalIY(), GetNhitPads(), ic_chmax, it_chmax, itmax, itmin, ix_chmax, ixmax, ixmin, iy_chmax, iymax, iymin, and nhit_pads.
Referenced by GETHitMaskXY(), and operator=().
|
virtual |
Function that expands the hits around the current hit pattern.
n | number of pads around current hits. |
References GETHitMask::get_ptr, GetBoundaries(), GETLookupTable::GetChannel(), GETLookupTable::GetNpadX(), GETLookupTable::GetNpadY(), IsValidHit(), GETSystem::LookupTable(), and SetHit().
int GETHitMaskXY::Fill2DMaskHisto | ( | TH2 * | hptr | ) |
Function filling the 2D histogram with mask values: 1 for valid hit channels, 0 otherwise. The histogram can be created with the GETDemonstrator::CreatePadHistogram for example. The function uses the look-up table from the GET system.
hptr | histogram pointer |
References GETHitMask::get_ptr, GETLookupTable::GetIpx(), GETLookupTable::GetIpy(), GETLookupTable::GetPad(), IsValidHit(), GETSystem::LookupTable(), and GETHitMask::size.
Referenced by GETActarTpcAnalyser::ProcessOffTrackAnalysis().
u_int GETHitMaskXY::GetBoundaries | ( | int & | ix0, |
int & | ix1, | ||
int & | iy0, | ||
int & | iy1, | ||
int & | it0, | ||
int & | it1 | ||
) |
Function returning the X, Y and T boundaries of the hit channels. The boundaries are expressed in terms of bin numbers.
The function returns the number of channels for which the signal is over the threshold.
ix0 | lower bin on X axis |
ix1 | upper bin on X axis |
iy0 | lower bin on Y axis |
iy1 | upper bin on Y axis |
it0 | lower bin on T axis |
it1 | upper bin on T axis |
References GetITmax(), GetITmin(), GetIXmax(), GetIXmin(), GetIYmax(), GetIYmin(), GETHitMask::IsMaskDefined(), GETHitMask::IsMaskSet(), GETHitMask::nhit, and UpdateMask().
Referenced by ExpandHits(), and GETActarTpc::GetSignalBoundaries().
|
inline |
Return the T upper boundary index of hit channels.
References itmax.
Referenced by CopyData(), and GetBoundaries().
|
inline |
Return the T lower boundary index of hit channels.
References itmin.
Referenced by CopyData(), and GetBoundaries().
|
inline |
Return the X upper boundary index of hit channels.
References ixmax.
Referenced by CopyData(), and GetBoundaries().
|
inline |
Return the X lower boundary index of hit channels.
References ixmin.
Referenced by CopyData(), and GetBoundaries().
|
inline |
Return the Y upper boundary index of hit channels.
References iymax.
Referenced by CopyData(), and GetBoundaries().
|
inline |
Return the Y lower boundary index of hit channels.
References iymin.
Referenced by CopyData(), and GetBoundaries().
GETChannel * GETHitMaskXY::GetMaxSignalChannel | ( | ) | const |
Return the index of the channel with maximum signal.
References GETHitMask::get_ptr, GETSystem::GetChannel(), GetMaxSignalIndex(), and GETHitMask::IsMaskSet().
Referenced by GETActarTpc::GetMaxSignalChannel().
|
inline |
Return the index of the channel with maximum signal.
References ic_chmax.
Referenced by CopyData(), and GetMaxSignalChannel().
|
inline |
Return the T bucket index of the channel with maximum signal.
References it_chmax.
Referenced by CopyData(), and GETActarTpc::GetMaxSignalChannel().
|
inline |
Return the X pad index of the channel with maximum signal.
References ix_chmax.
Referenced by CopyData(), and GETActarTpc::GetMaxSignalChannel().
|
inline |
Return the Y pad index of the channel with maximum signal.
References iy_chmax.
Referenced by CopyData(), and GETActarTpc::GetMaxSignalChannel().
|
inlinevirtual |
Return the number of hit valid pads of the hit mask. This excludes the channels that are not connected to a pad (such as the FPN channels)
References nhit_pads.
Referenced by GETActarEventReader::AnalysisEvent(), and CopyData().
|
private |
Macro from GCpp library that defines the following functions:
|
virtual |
Return true if the pad is hit.
ix | X pad index |
iy | Y pad index |
References GETHitMask::get_ptr, GETLookupTable::GetChannel(), GETHitMask::hit_table, GETHitMask::IsMaskSet(), GETSystem::LookupTable(), and GETHitMask::size.
|
virtual |
Return true if the pad is valid.
ix | X pad index |
iy | Y pad index |
References GETHitMask::get_ptr, GETLookupTable::GetChannel(), GETHitMask::IsMaskSet(), GETSystem::LookupTable(), GETHitMask::size, and GETHitMask::val_table.
Referenced by GETActarTpcAnalyser::ApplyOffTrackCorrection(), GETActarTpcAnalyser::ProcessNoiseAnalysis(), and UpdateMask().
|
virtual |
Return true if the pad is hit and valid.
ix | X pad index |
iy | Y pad index |
References GETHitMask::get_ptr, GETLookupTable::GetChannel(), GETHitMask::hit_table, GETHitMask::IsMaskSet(), GETSystem::LookupTable(), GETHitMask::size, and GETHitMask::val_table.
Referenced by GETActarTpcAnalyser::ComputeSumInt(), GETActarTpcAnalyser::ComputeSumMax(), ExpandHits(), GETActarTpcAnalyser::Export3D_POV(), GETActarTpcAnalyser::ExportPads_POV(), Fill2DMaskHisto(), GETActarTpcAnalyser::FillAutoHistograms(), GETActarTpcAnalyser::FillHistogram3D(), GETActarTpcAnalyser::FillHistogramXTmax(), GETActarTpcAnalyser::FillHistogramYTmax(), GETActarTpcAnalyser::FillPadHistogram(), and GETActarTpcAnalyser::ProcessOffTrackAnalysis().
|
inlinevirtual |
Set the validation mask to false for
lines of pads on the border of the pad plane.
n | number of pads rows |
References SetBorder().
GETHitMaskXY & GETHitMaskXY::operator= | ( | const GETHitMaskXY & | mask | ) |
|
virtual |
Set the validation mask for
lines of pads on the border of the pad plane.
n | number of pads rows |
b | hit status of border pads |
References GETHitMask::get_ptr, GETLookupTable::GetNpadX(), GETLookupTable::GetNpadY(), GETHitMask::IsMaskDefined(), GETSystem::LookupTable(), and SetValid().
Referenced by MaskBorder().
|
virtual |
Set the hit status of a channel.
ix | X pad index |
iy | Y pad index |
b | hit status |
References GETHitMask::get_ptr, GETLookupTable::GetChannel(), GETHitMask::hit_table, GETHitMask::IsMaskSet(), GETSystem::LookupTable(), and GETHitMask::size.
Referenced by ExpandHits().
|
virtual |
Set the valid status of a channel.
ix | X pad index |
iy | Y pad index |
b | hit status |
References GETHitMask::get_ptr, GETLookupTable::GetChannel(), GETHitMask::IsMaskDefined(), GETSystem::LookupTable(), GETHitMask::size, and GETHitMask::val_table.
Referenced by GETActarTpcAnalyser::ConfigCommand(), and SetBorder().
|
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 from GETHitMask.
References ClearHitMask(), GETHitMask::data_info, GETHitMask::get_ptr, GETSystem::GetChannel(), GETLookupTable::GetIpx(), GETLookupTable::GetIpy(), GETLookupTable::GetPad(), GETHitMask::hit_table, ic_chmax, GETHitMask::IsMaskDefined(), IsValid(), it_chmax, itmax, itmin, ix_chmax, ixmax, ixmin, iy_chmax, iymax, iymin, GETSystem::LookupTable(), GETHitMask::mask_set, GETHitMask::nhit, nhit_pads, GETHitMask::nhit_val, GETChannel::OutSample(), GETChannel::RecSample(), GET::signalRec, GET::signalTst, GETHitMask::size, GETHitMask::threshold, and GETChannel::TstSample().
Referenced by GETActarTpcAnalyser::Export3D_POV(), GETActarTpcAnalyser::ExportPads_POV(), GETActarTpcAnalyser::FillAutoHistograms(), GETActarTpcAnalyser::FillHistogram3D(), GETActarTpcAnalyser::FillHistogramXTmax(), GETActarTpcAnalyser::FillHistogramYTmax(), GETActarTpcAnalyser::FillPadHistogram(), GetBoundaries(), and GETActarTpc::GetMaxSignalChannel().