Belle II Software  release-05-01-25
HoughPlaneMulti.h
1 //-----------------------------------------------------------------------------
2 // $Id$
3 //-----------------------------------------------------------------------------
4 // Filename : HoughPlaneMulti.h
5 // Section : TRG CDC
6 // Owner : Yoshihito Iwasaki
7 // Email : yoshihito.iwasaki@kek.jp
8 //-----------------------------------------------------------------------------
9 // Description : A class to represent multi Hough parameter planes
10 //-----------------------------------------------------------------------------
11 // $Log$
12 //-----------------------------------------------------------------------------
13 
14 #ifndef TRGCDCHoughPlaneMulti_FLAG_
15 #define TRGCDCHoughPlaneMulti_FLAG_
16 
17 #include "trg/cdc/HoughPlane.h"
18 
19 #ifdef TRGCDC_SHORT_NAMES
20 #define TCHPlaneMulti TRGCDCHoughPlaneMulti
21 #endif
22 
23 namespace Belle2 {
29 //#define N_LAYERS 64
31 #define N_LAYERS 6
32 
35 
36  public:
38  TRGCDCHoughPlaneMulti(const std::string& name,
40  unsigned nX,
41  float xMin,
42  float xMax,
43  unsigned nY,
44  float yMin,
45  float yMax,
46  unsigned nLayers);
47 
49  virtual ~TRGCDCHoughPlaneMulti();
50 
51  public:// Selectors
53  using TRGCDCHoughPlane::nActiveCellsInPattern; // to be checked
55  virtual unsigned nActiveCellsInPattern(unsigned layerId) const;
56 
58  void dump(const std::string& message = std::string(""),
59  const std::string& prefix = std::string("")) const override;
60 
61  public:// Modifiers
63  void clear(void) override;
64 
66  using TRGCDCHoughPlaneBase::vote; // to be checked
68  void vote(float rx,
69  float ry,
70  float charge,
71  const TRGCDCHoughTransformation& hough,
72  unsigned weight,
73  unsigned layerId);
74  // using TRGCDCHoughPlaneBase::vote; // to be checked
76  void vote(float phi, unsigned layerId, int weight);
78  void merge(void);
79 
81  void registerPattern(unsigned id) override;
82 
83  private:
84 // AList<TRGCDCHoughPlane> _layers;
86  unsigned _nLayers;
91  };
92 
93  inline
94  void
96  {
97  for (unsigned i = 0; i < N_LAYERS; i++)
98  if (_usage[i])
99  _layers[i]->clear();
101  }
102 
103  inline
104  void
106  {
108  }
109 
110  inline
111  unsigned
113  {
114 // return _layers[id]->nActiveCellsInPattern();
115  return 999;
116  }
117 
118  inline
119  void
120  TRGCDCHoughPlaneMulti::dump(const std::string& a, const std::string& b) const
121  {
123  }
124 
126 } // namespace Belle2
127 
128 #endif
Belle2::TRGCDCHoughPlaneMulti
A class to represent a Hough parameter plane.
Definition: HoughPlaneMulti.h:34
Belle2::TRGCDCHoughPlaneBase::dump
virtual void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
Definition: HoughPlaneBase.cc:224
Belle2::TRGCDCHoughPlaneMulti::clear
void clear(void) override
Clears all entries.
Definition: HoughPlaneMulti.h:95
Belle2::TRGCDCHoughPlane
A class to represent a Hough parameter plane.
Definition: HoughPlane.h:31
Belle2::TRGCDCHoughPlaneMulti::vote
void vote(float rx, float ry, float charge, const TRGCDCHoughTransformation &hough, unsigned weight, unsigned layerId)
vote
Definition: HoughPlaneMulti.cc:62
Belle2::TRGCDCHoughPlaneMulti::_layers
TRGCDCHoughPlane * _layers[N_LAYERS]
layers of TRGCDCHoughPlane
Definition: HoughPlaneMulti.h:88
Belle2::TRGCDCHoughPlaneBase::yMax
float yMax(void) const
returns max. of y.
Definition: HoughPlaneBase.h:320
Belle2::TRGCDCHoughPlaneBase::name
std::string name(void) const
returns name.
Definition: HoughPlaneBase.h:244
Belle2::TRGCDCHoughPlaneBase::id
void id(unsigned serialId, unsigned &x, unsigned &y) const
returns x and y for serialID.
Definition: HoughPlaneBase.h:484
Belle2::TRGCDCHoughPlaneBase::charge
float charge(void) const
returns charge for this plane.
Definition: HoughPlaneBase.h:230
Belle2::TRGCDCHoughPlaneMulti::~TRGCDCHoughPlaneMulti
virtual ~TRGCDCHoughPlaneMulti()
Destructor.
Definition: HoughPlaneMulti.cc:55
Belle2::TRGCDCHoughTransformation
An abstract class to represent a Hough transformation.
Definition: HoughTransformation.h:32
Belle2::TRGCDCHoughPlaneMulti::dump
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const override
dump debug info
Definition: HoughPlaneMulti.h:120
Belle2::TRGCDCHoughPlaneBase::nY
unsigned nY(void) const
return # of y bins.
Definition: HoughPlaneBase.h:297
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TRGCDCHoughPlaneMulti::merge
void merge(void)
merge function
Definition: HoughPlaneMulti.cc:84
N_LAYERS
#define N_LAYERS
number of layers
Definition: HoughPlaneMulti.h:31
Belle2::TRGCDCHoughPlaneMulti::registerPattern
void registerPattern(unsigned id) override
registers a pattern..
Definition: HoughPlaneMulti.h:105
Belle2::TRGCDCHoughPlaneBase::transformation
const TRGCDCHoughTransformation & transformation(void) const
returns Hough transformation object.
Definition: HoughPlaneBase.h:523
Belle2::TRGCDCHoughPlane::nActiveCellsInPattern
virtual unsigned nActiveCellsInPattern(void) const
returns # of active cells in the pattern.
Definition: HoughPlane.h:153
Belle2::TRGCDCHoughPlaneBase::xMin
float xMin(void) const
returns min. of x.
Definition: HoughPlaneBase.h:258
Belle2::TRGCDCHoughPlaneMulti::_nLayers
unsigned _nLayers
number of layers
Definition: HoughPlaneMulti.h:86
Belle2::TRGCDCHoughPlaneBase::xMax
float xMax(void) const
returns max. of x.
Definition: HoughPlaneBase.h:274
Belle2::TRGCDCHoughPlaneBase::vote
virtual void vote(float rx, float ry, int weight=1)
Voring.
Definition: HoughPlaneBase.h:507
Belle2::TRGCDCHoughPlaneBase::nX
unsigned nX(void) const
returns # of x bins.
Definition: HoughPlaneBase.h:251
Belle2::TRGCDCHoughPlaneBase::yMin
float yMin(void) const
returns min. of y.
Definition: HoughPlaneBase.h:304
Belle2::TRGCDCHoughPlaneMulti::_usage
bool _usage[N_LAYERS]
usage of each layer
Definition: HoughPlaneMulti.h:90