 |
Belle II Software
release-05-01-25
|
14 #ifndef TRGCDCHoughPlaneMulti2_FLAG_
15 #define TRGCDCHoughPlaneMulti2_FLAG_
17 #include "trg/cdc/HoughPlane.h"
18 #include "trg/cdc/HoughPlaneBoolean.h"
20 #ifdef TRGCDC_SHORT_NAMES
21 #define TCHPlaneMulti2 TRGCDCHoughPlaneMulti2
33 class TRGCDCHoughPlaneMulti2 :
public TRGCDCHoughPlane {
58 const std::vector<unsigned>&
patternId(
unsigned cellId)
const;
61 const std::vector<unsigned>&
patternId(
unsigned layer,
62 unsigned cellId)
const;
64 void dump(
unsigned layerId)
const;
67 void dump(
const std::string& message = std::string(
""),
68 const std::string& prefix = std::string(
""))
const override;
73 void clear(
void)
override;
76 void clear(
unsigned layerId);
93 void vote(
unsigned layerId,
unsigned localId,
int weight = 1);
146 for (
unsigned i = 0; i <
N_LAYERS; i++)
158 for (
unsigned i = 0; i <
N_LAYERS; i++)
218 }
else if (a ==
"region") {
221 for (
unsigned i = 0; i <
_nLayers; i++) {
222 std::cout << b <<
name() <<
" : layer " << i << std::endl;
225 std::cout << b <<
name() <<
" : merged plane " << std::endl;
238 const std::vector<unsigned>&
240 unsigned cellId)
const
virtual ~TRGCDCHoughPlaneMulti2()
Destructor.
virtual void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
void clear(void) override
Clears all entries and regions.
const std::vector< unsigned > & patternId(unsigned cellId) const
returns pattern ID which activates specified cell.
unsigned nLayers(void) const
returns # of Hough Boolean layers.
float yMax(void) const
returns max. of y.
void vote(float rx, float ry, int weight=1) override
Votes.
unsigned serialId(unsigned x, unsigned y) const
returns serial ID for position (x, y).
std::string name(void) const
returns name.
float charge(void) const
returns charge for this plane.
unsigned setEntry(unsigned serialId, unsigned n) override
Sets entry.
unsigned nY(void) const
return # of y bins.
Abstract base class for different kinds of events.
void dump(unsigned layerId) const
Dumps debug information.
unsigned _nLayers
# of layers.
void merge(void)
Merge layers into one.
#define N_LAYERS
number of layers
TRGCDCHoughPlaneBoolean * _layers[N_LAYERS]
Hough plane for each layer.
void registerPattern(unsigned id) override
Registers a pattern on a Hough plane with (r, phi=0).
const TRGCDCHoughTransformation & transformation(void) const
returns Hough transformation object.
float xMin(void) const
returns min. of x.
void preparePatterns(unsigned nPatterns)
allocate memory for patterns.
unsigned setEntry(unsigned serialId, unsigned layerId, unsigned n)
Sets entry.
float xMax(void) const
returns max. of x.
void clearCells(void)
Clears entires only.
std::vector< unsigned > * _reverse
Pattern ID's for each cell.
virtual void vote(float rx, float ry, int weight=1)
Voring.
const std::vector< unsigned > & patternId(unsigned cellId) const
returns pattern ID which activates specified cell.
void finalizePatterns(void)
finalize patterns.
void preparePatterns(unsigned layerId, unsigned nPatterns)
allocate memory for patterns.
bool _usage[N_LAYERS]
Used or not.
A class to represent a Hough parameter plane.
void registerPattern(unsigned layerId, unsigned id)
registers a pattern..
void vote(float rx, float ry, int charge, unsigned layerId, int weight=1)
Voting.
void mergeOuters(void)
Merge outer layers into one.
unsigned nX(void) const
returns # of x bins.
float yMin(void) const
returns min. of y.
TRGCDCHoughPlaneMulti2(const std::string &name, const TRGCDCHoughTransformation &transformation, unsigned nX, float xMin, float xMax, unsigned nY, float yMin, float yMax, unsigned nLayers)
Contructor.