Belle II Software development
HoughPlaneMulti.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9//-----------------------------------------------------------------------------
10// Description : A class to represent multi Hough parameter planes
11//-----------------------------------------------------------------------------
12
13#ifndef TRGCDCHoughPlaneMulti_FLAG_
14#define TRGCDCHoughPlaneMulti_FLAG_
15
16#include "trg/cdc/HoughPlane.h"
17
18#ifdef TRGCDC_SHORT_NAMES
19#define TCHPlaneMulti TRGCDCHoughPlaneMulti
20#endif
21
22namespace Belle2 {
28//#define N_LAYERS 64
30#define N_LAYERS 6
31
34
35 public:
37 TRGCDCHoughPlaneMulti(const std::string& name,
39 unsigned nX,
40 float xMin,
41 float xMax,
42 unsigned nY,
43 float yMin,
44 float yMax,
45 unsigned nLayers);
46
48 virtual ~TRGCDCHoughPlaneMulti();
49
50 public:// Selectors
52 using TRGCDCHoughPlane::nActiveCellsInPattern; // to be checked
54 virtual unsigned nActiveCellsInPattern(unsigned layerId) const;
55
57 void dump(const std::string& message = std::string(""),
58 const std::string& prefix = std::string("")) const override;
59
60 public:// Modifiers
62 void clear(void) override;
63
65 using TRGCDCHoughPlaneBase::vote; // to be checked
67 void vote(float rx,
68 float ry,
69 float charge,
70 const TRGCDCHoughTransformation& hough,
71 unsigned weight,
72 unsigned layerId);
73 // using TRGCDCHoughPlaneBase::vote; // to be checked
75 void vote(float phi, unsigned layerId, int weight);
77 void merge(void);
78
80 void registerPattern(unsigned id) override;
81
82 private:
83// AList<TRGCDCHoughPlane> _layers;
85 unsigned _nLayers;
90 };
91
92 inline
93 void
95 {
96 for (unsigned i = 0; i < N_LAYERS; i++)
97 if (_usage[i])
98 _layers[i]->clear();
100 }
101
102 inline
103 void
105 {
107 }
108
109 inline
110 unsigned
112 {
113// return _layers[id]->nActiveCellsInPattern();
114 return 999;
115 }
116
117 inline
118 void
119 TRGCDCHoughPlaneMulti::dump(const std::string& a, const std::string& b) const
120 {
122 }
123
125} // namespace Belle2
126
127#endif
A class to represent a Hough parameter plane.
unsigned _nLayers
number of layers
virtual unsigned nActiveCellsInPattern(void) const
returns # of active cells in the pattern.
Definition: HoughPlane.h:159
TRGCDCHoughPlane * _layers[N_LAYERS]
layers of TRGCDCHoughPlane
bool _usage[N_LAYERS]
usage of each layer
A class to represent a Hough parameter plane.
Definition: HoughPlane.h:30
An abstract class to represent a Hough transformation.
void registerPattern(unsigned id) override
registers a pattern..
virtual void vote(float rx, float ry, int weight=1)
Voring.
float xMin(void) const
returns min. of x.
virtual void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
unsigned nY(void) const
return # of y bins.
virtual ~TRGCDCHoughPlaneMulti()
Destructor.
float xMax(void) const
returns max. of x.
float charge(void) const
returns charge for this plane.
virtual unsigned nActiveCellsInPattern(void) const
returns # of active cells in the pattern.
Definition: HoughPlane.h:159
void id(unsigned serialId, unsigned &x, unsigned &y) const
returns x and y for serialID.
#define N_LAYERS
number of layers
void vote(float rx, float ry, float charge, const TRGCDCHoughTransformation &hough, unsigned weight, unsigned layerId)
vote
void merge(void)
merge function
float yMax(void) const
returns max. of y.
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const override
dump debug info
void clear(void) override
Clears all entries.
const TRGCDCHoughTransformation & transformation(void) const
returns Hough transformation object.
std::string name(void) const
returns name.
unsigned nX(void) const
returns # of x bins.
float yMin(void) const
returns min. of y.
Abstract base class for different kinds of events.