13#define TRGCDC_SHORT_NAMES
15#include "trg/cdc/HoughPlane.h"
33 _cell(new int[nX * nY]),
208 const unsigned n =
nX() *
nY();
211 for (
unsigned i = 0; i < n; i++)
219 for (
unsigned i = 0; i < n; i++)
228 std::cout <<
"TRGCDCHoughPlane::vote !!! pattern is note defined" << std::endl;
229 if ((xOffset < 0) || (xOffset > 1))
230 std::cout <<
"TRGCDCHoughPlane::vote !!! xOffset should be (0 - 1). xOffset="
231 << xOffset << std::endl;
234 const unsigned x = unsigned(
nX() * xOffset);
235 const unsigned p = x ? (x - 1) *
nY() : 0;
236 const unsigned n =
nX() *
nY();
A class to represent a Hough parameter plane.
unsigned * _patterns
Curve patterns.
int *const _cell
Counters.
unsigned _nPatterns
# of curve patterns.
void registerPattern(unsigned id) override
Registers a pattern on a Hough plane with (r, phi=0).
TRGCDCHoughPlane(const std::string &name, const TRGCDCHoughTransformation &transformation, unsigned nX, float xMin, float xMax, unsigned nY, float yMin, float yMax)
Contructor.
unsigned nY(void) const
return # of y bins.
void id(unsigned serialId, unsigned &x, unsigned &y) const
returns x and y for serialID.
void clear(void) override
clear all entries.
virtual void voteByPattern(float xOffset, int weight=1)
Votes using a pattern.
unsigned nX(void) const
returns # of x bins.
virtual ~TRGCDCHoughPlane()
Destructor.
Abstract base class for different kinds of events.