13#ifndef TRGCDCHoughPlane_FLAG_
14#define TRGCDCHoughPlane_FLAG_
17#include "trg/cdc/HoughPlaneBase.h"
19#ifdef TRGCDC_SHORT_NAMES
20#define TCHPlane TRGCDCHoughPlane
56 unsigned entry(
unsigned id)
const override;
59 unsigned entry(
unsigned x,
unsigned y)
const override;
74 void clear(
void)
override;
88 void add(
unsigned cellId,
int weight)
override;
117 memset(
_cell, 0,
nX() *
nY() *
sizeof(
int));
125 memset(
_cell, 0,
nX() *
nY() *
sizeof(
int));
151 for (
unsigned i = 0; i <
nX() *
nY(); i++)
A class to represent a Hough parameter plane.
A class to represent a Hough parameter plane.
A class to represent a Hough parameter plane.
TRGCDCHoughPlane(TRGCDCHoughPlane &)=delete
Copy construtor, deleted.
unsigned * _patterns
Curve patterns.
int *const _cell
Counters.
unsigned _nPatterns
# of curve patterns.
TRGCDCHoughPlane & operator=(TRGCDCHoughPlane &)=delete
Assignment operator, deleted.
void registerPattern(unsigned id) override
Registers a pattern on a Hough plane with (r, phi=0).
virtual void clear(void)=0
Clears all entries.
float xMin(void) const
returns min. of x.
unsigned nY(void) const
return # of y bins.
void add(unsigned cellId, int weight) override
Add to a cell.
float xMax(void) const
returns max. of x.
virtual unsigned nActiveCellsInPattern(void) const
returns # of active cells in the pattern.
void id(unsigned serialId, unsigned &x, unsigned &y) const
returns x and y for serialID.
unsigned serialId(unsigned x, unsigned y) const
returns serial ID for position (x, y).
int maxEntry(void) const override
returns max. entry in a plane.
float yMax(void) const
returns max. of y.
void clear(void) override
clear all entries.
const TRGCDCHoughTransformation & transformation(void) const
returns Hough transformation object.
virtual void voteByPattern(float xOffset, int weight=1)
Votes using a pattern.
std::string name(void) const
returns name.
unsigned entry(unsigned id) const override
returns entry in a cell.
unsigned nX(void) const
returns # of x bins.
void clearCells(void)
Clears entires only.
float yMin(void) const
returns min. of y.
virtual ~TRGCDCHoughPlane()
Destructor.
unsigned setEntry(unsigned serialId, unsigned n) override
Sets entry.
Abstract base class for different kinds of events.