An ellipse, for use in detector masks.
More...
|
| Ellipse (double xcenter, double ycenter, double xradius, double yradius, double theta=0.0) |
|
Ellipse * | clone () const |
|
bool | contains (const Bin1D &binx, const Bin1D &biny) const |
| Returns true if area defined by two bins is inside or on border of ellipse; more precisely, if mid point of two bins satisfy this condition. More...
|
|
bool | contains (double x, double y) const |
| Returns true if point with given coordinates is inside or on border of the shape. More...
|
|
double | getCenterX () const |
|
double | getCenterY () const |
|
double | getRadiusX () const |
|
double | getRadiusY () const |
|
double | getTheta () const |
|
virtual void | transferToCPP () |
| Used for Python overriding of clone (see swig/tweaks.py) More...
|
|
|
virtual void | print (std::ostream &ostr) const |
|
An ellipse, for use in detector masks.
Definition at line 23 of file Ellipse.h.
◆ Ellipse()
Ellipse::Ellipse |
( |
double |
xcenter, |
|
|
double |
ycenter, |
|
|
double |
xradius, |
|
|
double |
yradius, |
|
|
double |
theta = 0.0 |
|
) |
| |
- Parameters
-
xcenter | x-coordinate of Ellipse's center |
ycenter | y-coordinate of Ellipse's center |
xradius | Radius along x-axis |
yradius | Radius along y-axis |
theta | Angle of Ellipse rotation in radians |
Definition at line 23 of file Ellipse.cpp.
31 if (xradius <= 0.0 || yradius <= 0.0)
32 throw std::runtime_error(
33 "Ellipse::Ellipse(double xcenter, double ycenter, double xradius, double yradius) "
34 "-> Error. Radius can't be negative\n");
IShape2D(const char *name)
Referenced by clone().
◆ clone()
◆ contains() [1/2]
bool Ellipse::contains |
( |
const Bin1D & |
binx, |
|
|
const Bin1D & |
biny |
|
) |
| const |
|
virtual |
Returns true if area defined by two bins is inside or on border of ellipse; more precisely, if mid point of two bins satisfy this condition.
Implements IShape2D.
Definition at line 47 of file Ellipse.cpp.
bool contains(double x, double y) const
Returns true if point with given coordinates is inside or on border of the shape.
References Bin1D::center(), and contains().
◆ contains() [2/2]
bool Ellipse::contains |
( |
double |
x, |
|
|
double |
y |
|
) |
| const |
|
virtual |
◆ getCenterX()
double Ellipse::getCenterX |
( |
| ) |
const |
|
inline |
◆ getCenterY()
double Ellipse::getCenterY |
( |
| ) |
const |
|
inline |
◆ getRadiusX()
double Ellipse::getRadiusX |
( |
| ) |
const |
|
inline |
◆ getRadiusY()
double Ellipse::getRadiusY |
( |
| ) |
const |
|
inline |
◆ getTheta()
double Ellipse::getTheta |
( |
| ) |
const |
|
inline |
◆ print()
virtual void IShape2D::print |
( |
std::ostream & |
ostr | ) |
const |
|
inlineprotectedvirtualinherited |
◆ transferToCPP()
virtual void ICloneable::transferToCPP |
( |
| ) |
|
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 34 of file ICloneable.h.
◆ m_name
const char* const IShape2D::m_name |
|
privateinherited |
◆ m_theta
◆ m_xc
◆ m_xr
◆ m_yc
◆ m_yr
The documentation for this class was generated from the following files: