GET library
GETHitMaskXY Class Reference

#include <GETHitMaskXY.hh>

Inheritance diagram for GETHitMaskXY:
GETHitMask

Public Member Functions

Constructors, affectation, destructor
 GETHitMaskXY (GETSystem *get=NULL)
 
 GETHitMaskXY (const GETHitMaskXY &mask)
 
GETHitMaskXYoperator= (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 GETHitMaskXYExpandHits (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)
 
GETChannelGetMaxSignalChannel () 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)
 
GETHitMaskoperator= (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
 
GETSystemGetSystemPtr () 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)
 
GETSystemget_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)
 

Detailed Description

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.

Constructor & Destructor Documentation

GETHitMaskXY::GETHitMaskXY ( 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 ic_chmax, it_chmax, itmax, itmin, ix_chmax, ixmax, ixmin, iy_chmax, iymax, iymin, and nhit_pads.

GETHitMaskXY::GETHitMaskXY ( const GETHitMaskXY mask)

Copy constructor.

Parameters
maskobject to copy

References CopyData(), ic_chmax, it_chmax, itmax, itmin, ix_chmax, ixmax, ixmin, iy_chmax, iymax, iymin, and nhit_pads.

GETHitMaskXY::~GETHitMaskXY ( )
virtual

Destructor.

Member Function Documentation

GETHitMaskXY::ClassDef ( GETHitMaskXY  ,
 
)

for use within ROOT.

void GETHitMaskXY::ClearHitMask ( )
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().

void GETHitMaskXY::CopyData ( const GETHitMaskXY mask)
virtual

Copy all the data from the argument mask. Function called by copy constructor and affectation.

Parameters
maskobject 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=().

GETHitMaskXY & GETHitMaskXY::ExpandHits ( u_int  n = 1)
virtual

Function that expands the hits around the current hit pattern.

Parameters
nnumber 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.

Parameters
hptrhistogram 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.

Parameters
ix0lower bin on X axis
ix1upper bin on X axis
iy0lower bin on Y axis
iy1upper bin on Y axis
it0lower bin on T axis
it1upper 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().

int GETHitMaskXY::GetITmax ( ) const
inline

Return the T upper boundary index of hit channels.

References itmax.

Referenced by CopyData(), and GetBoundaries().

int GETHitMaskXY::GetITmin ( ) const
inline

Return the T lower boundary index of hit channels.

References itmin.

Referenced by CopyData(), and GetBoundaries().

int GETHitMaskXY::GetIXmax ( ) const
inline

Return the X upper boundary index of hit channels.

References ixmax.

Referenced by CopyData(), and GetBoundaries().

int GETHitMaskXY::GetIXmin ( ) const
inline

Return the X lower boundary index of hit channels.

References ixmin.

Referenced by CopyData(), and GetBoundaries().

int GETHitMaskXY::GetIYmax ( ) const
inline

Return the Y upper boundary index of hit channels.

References iymax.

Referenced by CopyData(), and GetBoundaries().

int GETHitMaskXY::GetIYmin ( ) const
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().

int GETHitMaskXY::GetMaxSignalIndex ( ) const
inline

Return the index of the channel with maximum signal.

References ic_chmax.

Referenced by CopyData(), and GetMaxSignalChannel().

int GETHitMaskXY::GetMaxSignalIT ( ) const
inline

Return the T bucket index of the channel with maximum signal.

References it_chmax.

Referenced by CopyData(), and GETActarTpc::GetMaxSignalChannel().

int GETHitMaskXY::GetMaxSignalIX ( ) const
inline

Return the X pad index of the channel with maximum signal.

References ix_chmax.

Referenced by CopyData(), and GETActarTpc::GetMaxSignalChannel().

int GETHitMaskXY::GetMaxSignalIY ( ) const
inline

Return the Y pad index of the channel with maximum signal.

References iy_chmax.

Referenced by CopyData(), and GETActarTpc::GetMaxSignalChannel().

u_int GETHitMaskXY::GetNhitPads ( ) const
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().

GETHitMaskXY::GObject ( GETHitMaskXY  )
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.
bool GETHitMaskXY::IsHit ( u_int  ix,
u_int  iy 
) const
virtual

Return true if the pad is hit.

Parameters
ixX pad index
iyY pad index

References GETHitMask::get_ptr, GETLookupTable::GetChannel(), GETHitMask::hit_table, GETHitMask::IsMaskSet(), GETSystem::LookupTable(), and GETHitMask::size.

bool GETHitMaskXY::IsValid ( u_int  ix,
u_int  iy 
) const
virtual
void GETHitMaskXY::MaskBorder ( u_int  n = 1)
inlinevirtual

Set the validation mask to false for
lines of pads on the border of the pad plane.

Parameters
nnumber of pads rows

References SetBorder().

GETHitMaskXY & GETHitMaskXY::operator= ( const GETHitMaskXY mask)

Affectation operator.

Parameters
maskobject to copy

References CopyData().

void GETHitMaskXY::SetBorder ( u_int  n = 1,
bool  b = false 
)
virtual

Set the validation mask for
lines of pads on the border of the pad plane.

Parameters
nnumber of pads rows
bhit status of border pads

References GETHitMask::get_ptr, GETLookupTable::GetNpadX(), GETLookupTable::GetNpadY(), GETHitMask::IsMaskDefined(), GETSystem::LookupTable(), and SetValid().

Referenced by MaskBorder().

void GETHitMaskXY::SetHit ( u_int  ix,
u_int  iy,
bool  b = true 
)
virtual

Set the hit status of a channel.

Parameters
ixX pad index
iyY pad index
bhit status

References GETHitMask::get_ptr, GETLookupTable::GetChannel(), GETHitMask::hit_table, GETHitMask::IsMaskSet(), GETSystem::LookupTable(), and GETHitMask::size.

Referenced by ExpandHits().

void GETHitMaskXY::SetValid ( u_int  ix,
u_int  iy,
bool  b = true 
)
virtual

Set the valid status of a channel.

Parameters
ixX pad index
iyY pad index
bhit status

References GETHitMask::get_ptr, GETLookupTable::GetChannel(), GETHitMask::IsMaskDefined(), GETSystem::LookupTable(), GETHitMask::size, and GETHitMask::val_table.

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


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