 |
Belle II Software
release-05-01-25
|
15 #include "trg/trg/Point2D.h"
16 #include "trg/cdc/HoughTransformationCircle.h"
27 const std::string& name)
41 const float r = (xReal * xReal + yReal * yReal) /
42 (2 * xReal * cos(x) + 2 * yReal * sin(x));
68 static const float PI2 = 2 * M_PI;
71 float d0 = atan(- xReal / yReal);
72 if (d0 < 0) d0 += PI2;
74 if (d1 > PI2) d1 -= PI2;
77 if ((x0 < d0) && (d0 < x1))
return true;
78 if ((x0 < d1) && (d1 < x1))
return true;
89 return diverge(xReal, yReal, x0, x1);
98 return diverge(xReal, yReal, x0, x1);
virtual TRGPoint2D convert(const TRGPoint2D &) const override
converts Point2D(phi, r) in real plane into Point2D(phi, r) in Hough plane.
A class to represent a point in 2D.
virtual ~TRGCDCHoughTransformationCircle()
Destructor.
virtual bool diverge(float xReal, float yReal, float x0, float x1) const override
returns true if Y diverges in given region.
virtual bool negativeDiverge(float xReal, float yReal, float x0, float x1) const override
returns true if Y diverges in given region.
Abstract base class for different kinds of events.
virtual TRGPoint2D circleCenter(const TRGPoint2D &) const
returns Point2D(phi, r) of a circle in real plane.
TRGCDCHoughTransformationCircle(const std::string &name)
Contructor.
virtual float y(float xReal, float yReal, float x) const override
returns Y coordinate in a Hough parameter plane.
virtual bool positiveDiverge(float xReal, float yReal, float x0, float x1) const override
returns true if Y diverges in given region.