13#define TRGCDC_SHORT_NAMES
15#include "trg/cdc/HoughPlane.h"
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();
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)
Constructor.
float xMin(void) const
returns min. of x.
unsigned nY(void) const
return # of y bins.
float xMax(void) const
returns max. of x.
void id(unsigned serialId, unsigned &x, unsigned &y) const
returns x and y for serialID.
TRGCDCHoughPlaneBase(const std::string &name, const TRGCDCHoughTransformation &transformation, unsigned nX, float xMin, float xMax, unsigned nY, float yMin, float yMax)
Constructor.
float yMax(void) const
returns max. of y.
void clear(void) override
clear all entries.
virtual void voteByPattern(float xOffset, int weight=1)
Votes using a pattern.
std::string name(void) const
returns name.
unsigned nX(void) const
returns # of x bins.
float yMin(void) const
returns min. of y.
virtual ~TRGCDCHoughPlane()
Destructor.
Abstract base class for different kinds of events.