Belle II Software  release-08-01-10
Circle2D Class Reference

A two dimensional circle in its natural representation using center and radius as parameters. More...

#include <Circle2D.h>

Collaboration diagram for Circle2D:

Public Member Functions

 Circle2D ()
 Default constructor for ROOT compatibility. Creates an invalid circle.
 
 Circle2D (const Vector2D &center, const double radius)
 Constructs a circle with given center and radius/ orientation as given by the signedRadius.
 
 Circle2D (const Vector2D &center, const double absRadius, const ERotation ccwInfo)
 Constructs a circle with given center, absolut value of the radius and orientation.
 
void reverse ()
 Flips orientation the circle in place.
 
Circle2D reversed () const
 Returns a copy of the line with the reversed orientation.
 
void conformalTransform ()
 Transforms the circle to conformal space inplace. More...
 
Circle2D conformalTransformed () const
 Returns a copy of the circle in conformal space. More...
 
double distance (const Vector2D &point) const
 Calculates the signed distance of the point to the circle line.
 
double impact () const
 Returns the signed distance to the origin.
 
double absDistance (const Vector2D &point) const
 Returns the euclidian distance of the point to the circle line.
 
ERightLeft isRightOrLeft (const Vector2D &point) const
 Return if the point given is right or left of the line.
 
bool isLeft (const Vector2D &rhs) const
 Return if the point given is left of the circle line.
 
bool isRight (const Vector2D &rhs) const
 Return if the point given is right of the circle line.
 
Vector2D closest (const Vector2D &point) const
 Calculates the point of closest approach on the line to the point.
 
Vector2D perigee () const
 Returns the point closest to the origin.
 
Vector2D tangential () const
 Gives the tangential vector at the closest approach to the origin / at the perigee.
 
double tangentialPhi () const
 Gives to azimuth phi of the direction of flight at the perigee.
 
Vector2D gradient (const Vector2D &point) const
 Gradient of the distance field.
 
Vector2D normal (const Vector2D &point) const
 Normal vector to the circle near the given position.
 
Vector2D tangential (const Vector2D &point) const
 Tangential vector to the circle near the given position.
 
double openingAngle (const Vector2D &from, const Vector2D &to) const
 Calculates the angle between two points as seen from the center of the circle.
 
double arcLengthBetween (const Vector2D &from, const Vector2D &to) const
 Calculates the arc length between two points of closest approach on the circle.
 
double radius () const
 Getter for the signed radius.
 
double radiusSquared () const
 Getter for the squared radius.
 
double absRadius () const
 Getter for the absolute radius.
 
ERotation orientation () const
 Indicates if the circle is to be interpreted counterclockwise or clockwise.
 
Vector2D center () const
 Getter for the central point of the circle.
 
Transformations of the circle
void moveBy (const Vector2D &by)
 Activelly moves the circle in the direction given in place by the vector given.
 
void moveAlongFirst (const double first)
 Activelly moves the circle in the direction given in place along the first coordinate.
 
void moveAlongSecond (const double second)
 Activelly moves the circle in the direction given in place along the second coordinate.
 
void passiveMoveBy (const Vector2D &by)
 Passivelly move the coordinate system in place by the given vector.
 
void passiveMoveAlongFirst (const double first)
 Passivelly move the coordinate system in place along the first coordinate.
 
void passiveMoveAlongSecond (const double second)
 Passivelly move the coordinate system in place along the second coordinate.
 

Private Attributes

Vector2D m_center
 Memory for the central point.
 
double m_radius
 Memory for the signed radius.
 

Detailed Description

A two dimensional circle in its natural representation using center and radius as parameters.

Definition at line 26 of file Circle2D.h.

Member Function Documentation

◆ conformalTransform()

void conformalTransform ( )
inline

Transforms the circle to conformal space inplace.

Applies the conformal map in the self-inverse from

  • $X = x / (x^2 + y^2 - r^2)$
  • $Y = y / (x^2 + y^2 - r^2)$
  • $R = r / (x^2 + y^2 - r^2)$ inplace This is only stable for off origin circles. The numerical stability of the transformation is subjected to the denominator center().normSquared() - signedRadius() * signedRadius().

Definition at line 74 of file Circle2D.h.

75  {
76  double denominator = 1 / (center().normSquared() - radius() * radius());
77  m_center *= denominator;
78  m_radius *= -denominator;
79  }
double m_radius
Memory for the signed radius.
Definition: Circle2D.h:270
double radius() const
Getter for the signed radius.
Definition: Circle2D.h:197
Vector2D m_center
Memory for the central point.
Definition: Circle2D.h:267
Vector2D center() const
Getter for the central point of the circle.
Definition: Circle2D.h:221
double normSquared() const
Calculates .
Definition: Vector2D.h:181

◆ conformalTransformed()

Circle2D conformalTransformed ( ) const
inline

Returns a copy of the circle in conformal space.

Applies the conformal map in the self-inverse from

  • $X = x / (x^2 + y^2 - r^2)$
  • $Y = y / (x^2 + y^2 - r^2)$
  • $R = r / (x^2 + y^2 - r^2)$ and returns the result as new Circle2D This is only stable for off origin circles. The numerical stability of the transformation is subjected to the denominator center().normSquared() - signedRadius() * signedRadius().

Definition at line 92 of file Circle2D.h.


The documentation for this class was generated from the following file: