GET library
GETHitMaskXY.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GETHitMaskXY.hh
3  *
4  * Include file for the GETHitMaskXY class.
5  */
6 //======================================================================
7 
8 #ifndef GET_HIT_MASK_XY_HH
9 #define GET_HIT_MASK_XY_HH
10 
11 //----------------------------------------------------------------------
12 #include "GETHitMask.hh"
13 
14 #include <TH2.h>
15 
16 //======================================================================
17 /*! \class GETHitMaskXY
18  *
19  * This class defines a XY (2 dimension) hit mask for pad plane
20  * detectors.
21  *
22  * The lloup-table of the GET system must be defined before
23  * defining a pads (XY) hit mask for the system.
24  */
25 class GETHitMaskXY : public GETHitMask
26 {
27  //------------------------------------------------------------
28  /*! \object_doc */
30  //------------------------------------------------------------
31 
32  using GETHitMask::IsHit;
33  using GETHitMask::IsValid;
35  using GETHitMask::SetHit;
37 
38  protected:
39  u_int nhit_pads; ///< Number of valid pads hit
40 
41  int ixmin; ///< Lower bin on X axis
42  int ixmax; ///< Upper bin on X axis
43  int iymin; ///< Lower bin on Y axis
44  int iymax; ///< Upper bin on Y axis
45  int itmin; ///< Lower bin on T axis
46  int itmax; ///< Upper bin on T axis
47 
48  int ic_chmax; ///< Electronic channel index of channel with max. signal
49  int ix_chmax; ///< X pad index of channel with max. signal
50  int iy_chmax; ///< Y pad index of channel with max. signal
51  int it_chmax; ///< Time bucket of channel with max. signal
52 
53  public:
54  //----------------------------------------------------------
55  /** @name Constructors, affectation, destructor */
56  //@{
57  GETHitMaskXY ( GETSystem * get = NULL );
58  GETHitMaskXY ( const GETHitMaskXY & mask );
59  GETHitMaskXY & operator = ( const GETHitMaskXY & mask );
60  virtual ~GETHitMaskXY ( );
61 
62  virtual void CopyData ( const GETHitMaskXY & mask );
63  //@}
64 
65  //----------------------------------------------------------
66  /** @name Hit mask data */
67  //@{
68  virtual void ClearHitMask ( );
69  virtual u_int UpdateMask ( );
70 
71  virtual u_int GetNhitPads ( ) const; // inline
72 
73  virtual bool IsHit ( u_int ix, u_int iy ) const;
74  virtual bool IsValid ( u_int ix, u_int iy ) const;
75  virtual bool IsValidHit ( u_int ix, u_int iy ) const;
76  virtual void SetHit ( u_int ix, u_int iy, bool b = true );
77  virtual void SetValid ( u_int ix, u_int iy, bool b = true );
78  virtual void SetBorder ( u_int n = 1, bool b = false );
79  virtual void MaskBorder ( u_int n = 1 ); // inline
80 
81  virtual GETHitMaskXY & ExpandHits ( u_int n = 1 );
82 
83  int GetIXmin ( ) const; // inline
84  int GetIXmax ( ) const; // inline
85  int GetIYmin ( ) const; // inline
86  int GetIYmax ( ) const; // inline
87  int GetITmin ( ) const; // inline
88  int GetITmax ( ) const; // inline
89 
90  u_int GetBoundaries ( int & ix0, int & ix1,
91  int & iy0, int & iy1,
92  int & it0, int & it1 );
93 
94  GETChannel * GetMaxSignalChannel ( ) const;
95  int GetMaxSignalIndex ( ) const; // inline
96  int GetMaxSignalIX ( ) const; // inline
97  int GetMaxSignalIY ( ) const; // inline
98  int GetMaxSignalIT ( ) const; // inline
99  //@}
100 
101  //----------------------------------------------------------
102  /** @name ROOT related functions */
103  //@{
104  public:
105 
106  int Fill2DMaskHisto ( TH2 * hptr );
107 
108  /*! for use within ROOT.*/
110  //@}
111 };
112 
113 
114 //----------------------------------------------------------------------
115 // Inline functions
116 #include "icc/GETHitMaskXY.icc"
117 
118 
119 //======================================================================
120 #endif
virtual void SetBorder(u_int n=1, bool b=false)
Definition: GETHitMaskXY.cpp:228
int itmax
Upper bin on T axis.
Definition: GETHitMaskXY.hh:46
GETChannel * GetMaxSignalChannel() const
Definition: GETHitMaskXY.cpp:328
virtual bool IsValidHit(u_int ix, u_int iy) const
Definition: GETHitMaskXY.cpp:423
int iy_chmax
Y pad index of channel with max. signal.
Definition: GETHitMaskXY.hh:50
int GetMaxSignalIX() const
Definition: GETHitMaskXY.icc:55
virtual void SetValid(u_int ix, u_int iy, bool b=true)
Definition: GETHitMaskXY.cpp:456
int GetIYmin() const
Definition: GETHitMaskXY.icc:33
int GetMaxSignalIT() const
Definition: GETHitMaskXY.icc:63
Definition: GETChannel.hh:41
int ixmin
Lower bin on X axis.
Definition: GETHitMaskXY.hh:41
int iymax
Upper bin on Y axis.
Definition: GETHitMaskXY.hh:44
int GetIXmin() const
Definition: GETHitMaskXY.icc:25
int Fill2DMaskHisto(TH2 *hptr)
Definition: GETHitMaskXY.cpp:477
u_int GetBoundaries(int &ix0, int &ix1, int &iy0, int &iy1, int &it0, int &it1)
Definition: GETHitMaskXY.cpp:356
int GetITmin() const
Definition: GETHitMaskXY.icc:41
Definition: GETHitMaskXY.hh:25
int GetITmax() const
Definition: GETHitMaskXY.icc:45
Definition: GETHitMask.hh:29
GObject(GETHitMaskXY)
virtual void SetHit(u_int ic, bool b=true)
Definition: GETHitMask.icc:85
int iymin
Lower bin on Y axis.
Definition: GETHitMaskXY.hh:43
virtual bool IsHit(u_int ic) const
Definition: GETHitMask.icc:65
virtual bool IsValid(u_int ix, u_int iy) const
Definition: GETHitMaskXY.cpp:389
int ix_chmax
X pad index of channel with max. signal.
Definition: GETHitMaskXY.hh:49
int GetMaxSignalIndex() const
Definition: GETHitMaskXY.icc:51
virtual void ClearHitMask()
Definition: GETHitMaskXY.cpp:123
GETHitMaskXY(GETSystem *get=NULL)
Definition: GETHitMaskXY.cpp:22
virtual bool IsHit(u_int ix, u_int iy) const
Definition: GETHitMaskXY.cpp:406
virtual void SetHit(u_int ix, u_int iy, bool b=true)
Definition: GETHitMaskXY.cpp:441
int ixmax
Upper bin on X axis.
Definition: GETHitMaskXY.hh:42
virtual GETHitMaskXY & ExpandHits(u_int n=1)
Definition: GETHitMaskXY.cpp:272
virtual void SetValid(u_int ic, bool b=true)
Definition: GETHitMask.icc:78
virtual u_int GetNhitPads() const
Definition: GETHitMaskXY.icc:19
virtual bool IsValidHit(u_int ic) const
Definition: GETHitMask.icc:71
virtual u_int UpdateMask()
Definition: GETHitMaskXY.cpp:149
int GetIXmax() const
Definition: GETHitMaskXY.icc:29
int ic_chmax
Electronic channel index of channel with max. signal.
Definition: GETHitMaskXY.hh:48
int it_chmax
Time bucket of channel with max. signal.
Definition: GETHitMaskXY.hh:51
virtual bool IsValid(u_int ic) const
Definition: GETHitMask.icc:58
int GetMaxSignalIY() const
Definition: GETHitMaskXY.icc:59
u_int nhit_pads
Number of valid pads hit.
Definition: GETHitMaskXY.hh:39
ClassDef(GETHitMaskXY, 0)
virtual void MaskBorder(u_int n=1)
Definition: GETHitMaskXY.icc:12
GETHitMaskXY & operator=(const GETHitMaskXY &mask)
Definition: GETHitMaskXY.cpp:75
virtual void CopyData(const GETHitMaskXY &mask)
Definition: GETHitMaskXY.cpp:99
virtual ~GETHitMaskXY()
Definition: GETHitMaskXY.cpp:87
Definition: GETSystem.hh:126
int itmin
Lower bin on T axis.
Definition: GETHitMaskXY.hh:45
int GetIYmax() const
Definition: GETHitMaskXY.icc:37