Belle II Software
release-08-01-10
|
Extension of the generalized circle also caching the perigee coordinates. More...
#include <PerigeeCircle.h>
Public Member Functions | |
PerigeeCircle () | |
Default constructor for ROOT compatibility. | |
PerigeeCircle (double curvature, const Vector2D &phi0Vec, double impact) | |
Constructor from the perigee parammeters. More... | |
PerigeeCircle (double curvature, double phi0, double impact) | |
Constructor from the perigee parammeters. More... | |
PerigeeCircle (const PerigeeParameters &perigeeParameters) | |
Constructor from the perigee parammeters. | |
PerigeeCircle (const Line2D &n012) | |
Constructor from a two dimensional line. | |
PerigeeCircle (const GeneralizedCircle &n0123) | |
Constructor promoting the generalized circle. | |
PerigeeCircle (const Circle2D &circle) | |
Constructor from a two dimensional circle in center / radius representation. | |
void | invalidate () |
Sets all circle parameters to zero. | |
bool | isInvalid () const |
Indicates if all circle parameters are zero. | |
bool | isValid () const |
Indicates if the combination of the circle parameters makes up a valid circle. | |
void | reverse () |
Flips the orientation of the circle in place. | |
PerigeeCircle | reversed () const |
Returns a copy of the circle with opposite orientation. | |
void | conformalTransform () |
Transforms the generalized circle to conformal space inplace. More... | |
PerigeeCircle | conformalTransformed () const |
Returns a copy of the circle in conformal space. More... | |
void | passiveMoveBy (const Vector2D &by) |
Moves the coordinates system by the given vector. Updates perigee parameters in place. | |
PerigeeJacobian | passiveMoveByJacobian (const Vector2D &by) const |
Computes the Jacobi matrix for a move of the coordinate system by the given vector. | |
void | passiveMoveByJacobian (const Vector2D &by, PerigeeJacobian &jacobian) const |
Puts the Jacobi matrix for a move of the coordinate system by the given vector in the given matrix as an output argument. | |
Vector2D | atArcLength (double arcLength) const |
Calculates the point, which lies at the give perpendicular travel distance (counted from the perigee) | |
double | arcLengthTo (const Vector2D &point) const |
Calculates the arc length between the perigee and the given point. | |
double | arcLengthBetween (const Vector2D &from, const Vector2D &to) const |
Calculates the arc length between two points of closest approach on the circle. More... | |
double | arcLengthToCylindricalR (double cylindricalR) const |
Calculates the two dimensional arc length till the cylindrical radius is reached If the radius can not be reached return NAN. More... | |
std::pair< Vector2D, Vector2D > | atCylindricalR (double cylindricalR) const |
Calculates the two points with the given cylindrical radius on the generalised circle. | |
Vector2D | atCylindricalRForwardOf (const Vector2D &startPoint, double cylindricalR) const |
Approach on the circle with the given cylindrical radius that lies in the forward direction of a start point. More... | |
EForwardBackward | isForwardOrBackwardOf (const Vector2D &from, const Vector2D &to) const |
Indicates whether to given point lies in the forward direction from the perigee. | |
EForwardBackward | isForwardOrBackward (const Vector2D &to) const |
Indicates whether to given point lies in the forward direction from the perigee. | |
Vector2D | chooseNextForwardOf (const Vector2D &start, const Vector2D &end1, const Vector2D &end2) const |
Returns the one of two end point which is first reached from the given start if one stricly follows the forward direction of the circle. More... | |
Vector2D | closest (const Vector2D &point) const |
Calculates the point of closest approach on the circle to the given point. | |
double | distance (const Vector2D &point) const |
Getter for the proper signed distance of the point to the circle. | |
double | distance (double fastDistance) const |
Helper function to translate the linearised distance to the proper distance. | |
double | fastDistance (const Vector2D &point) const |
Getter for the linearised distance measure to a point. More... | |
double | fastImpact () const |
Getter for the linearised distance to the origin. | |
double | fastDistance (double distance) const |
Helper function to translate the proper distance to the linearized distance measure of the circle retaining the sign of the distance. | |
ERightLeft | isRightOrLeft (const Vector2D &point) const |
Indicates if the point is on the right or left side of the circle. | |
bool | isLine () const |
Indicates if the perigee parameters represent a line. | |
bool | isCircle () const |
Indicates if the perigee parameters represent a closed circle. | |
ERotation | orientation () const |
Getter for the orientation of the circle. | |
Vector2D | gradient (const Vector2D &point) const |
Gradient of the distance field, hence indicates the direction of increasing distance. | |
Vector2D | normal (const Vector2D &point) const |
Unit normal vector from the circle to the given point. | |
Vector2D | tangential (const Vector2D &point) const |
Tangential vector to the circle near the given position. | |
const Vector2D & | tangential () const |
Getter for the tangtial vector at the perigee. | |
Vector2D | perigee () const |
Getter for the perigee point. | |
Vector2D | center () const |
Getter for the center of the circle. If it was a line both components will be infinity. | |
Vector2D | apogee () const |
Getter for the apogee of the circle. If it was a line both components will be infinity. | |
double | minimalCylindricalR () const |
Gives the minimal cylindrical radius the circle reaches (unsigned) | |
double | maximalCylindricalR () const |
Gives the maximal cylindrical radius the circle reaches. | |
double | arcLengthPeriod () const |
Getter for the arc length for a full round of the circle. | |
double | perimeter () const |
Gives the signed perimeter of the circle. | |
double | radius () const |
Gives the signed radius of the circle. If it was a line this will be infinity. | |
double | absRadius () const |
Gives the signed radius of the circle. If it was a line this will be infinity. | |
void | setCenterAndRadius (const Vector2D ¢er, double absRadius, ERotation orientation=ERotation::c_CounterClockwise) |
Setter for the circle center and radius. | |
double | n0 () const |
Getter for the generalised circle parameter n0. | |
Vector2D | n12 () const |
Getter for the generalised circle parameters n1 and n2. | |
double | n1 () const |
Getter for the generalised circle parameters n1. | |
double | n2 () const |
Getter for the generalised circle parameters n2. | |
double | n3 () const |
Getter for the generalised circle parameter n3. | |
void | setN (double n0, double n1, double n2, double n3=0.0) |
Setter for four generalised circle parameters. | |
void | setN (double n0, const Vector2D &n12, double n3=0.0) |
Setter for four generalised circle parameters. | |
void | setN (const Line2D &n012) |
Setter for generalised circle parameters from a normal line. | |
void | setN (const GeneralizedCircle &n0123) |
Setter for four generalised circle parameters. | |
double | omega () const |
Getter for omega parameter of the common Belle2::Helix which is the wrong sign curvature. | |
double | d0 () const |
Getter for d0 parameter of the common Belle2::Helix representation. | |
double | curvature () const |
Getter for the signed curvature. | |
double | phi0 () const |
Getter for the azimuth angle of the direction of flight at the perigee. | |
const Vector2D & | phi0Vec () const |
Getter for the unit vector of the direction of flight at the perigee. | |
double | impact () const |
Getter for the signed distance of the origin to the circle. | |
PerigeeParameters | perigeeParameters () const |
Getter for the three perigee parameters in the order defined by EPerigeeParameter.h. | |
void | setCurvature (double curvature) |
Setter for signed curvature. | |
void | setPhi0 (double phi0) |
Sets the azimuth angle of the direction of flight at the perigee. | |
void | setPhi0 (const Vector2D &phi0Vec) |
Sets the unit direction of flight at the perigee. | |
void | setImpact (double impact) |
Sets the impact parameter of the circle. | |
void | setPerigeeParameters (double curvature, const Vector2D &phi0Vec, double impact) |
Setter for the perigee parameters. | |
void | setPerigeeParameters (double curvature, double phi0, double impact) |
Setter for the perigee parameters. | |
Static Public Member Functions | |
static PerigeeCircle | fromN (double n0, double n1, double n2, double n3=0) |
Constructor with the four parameters of the generalized circle. | |
static PerigeeCircle | fromN (double n0, const Vector2D &n12, double n3=0) |
Constructor with the four parameters of the generalized circle. | |
static PerigeeCircle | fromCenterAndRadius (const Vector2D ¢er, double absRadius, ERotation orientation=ERotation::c_CounterClockwise) |
Constructor from center, radius and a optional orientation. More... | |
Private Member Functions | |
PerigeeCircle (double curvature, double phi0, const Vector2D &phi0Vec, double impact) | |
Constructor taking all stored parameters for internal use. More... | |
double | arcLengthAtDeltaLength (double delta, double dr) const |
Helper method to calculate the arc length to a point at distance delta to the perigee and dr to circle. | |
double | arcLengthAtSecantLength (double secantLength) const |
Helper method to calculate the arc length between to points on the circle from a given direct secant length. | |
Private Attributes | |
double | m_curvature |
Memory for the signed curvature. | |
double | m_phi0 |
Memory for the azimuth angle of the direction of flight at the perigee. | |
Vector2D | m_phi0Vec |
Cached unit direction of flight at the perigee. | |
double | m_impact |
Memory for the signed impact parameter. | |
Extension of the generalized circle also caching the perigee coordinates.
Definition at line 36 of file PerigeeCircle.h.
PerigeeCircle | ( | double | curvature, |
const Vector2D & | phi0Vec, | ||
double | impact | ||
) |
Constructor from the perigee parammeters.
The direction of travel at the perigee is given as vector.
Definition at line 47 of file PerigeeCircle.cc.
PerigeeCircle | ( | double | curvature, |
double | phi0, | ||
double | impact | ||
) |
Constructor from the perigee parammeters.
The direction of travel at the perigee is given as azimuth angle
Definition at line 55 of file PerigeeCircle.cc.
|
private |
Constructor taking all stored parameters for internal use.
Nothing to do here
Definition at line 70 of file PerigeeCircle.cc.
Calculates the arc length between two points of closest approach on the circle.
The arc length is signed positiv for travel in orientation direction. In the circle case the arc length is between -pi*radius and pi*radius, hence the discontinuity is on the far side of the circle relative to the given from point. The points are essentially first taken to their closest approach before we take the length on the curve. For the line case the length is the distance component parallel to the line.
Definition at line 244 of file PerigeeCircle.cc.
double arcLengthToCylindricalR | ( | double | cylindricalR | ) | const |
Calculates the two dimensional arc length till the cylindrical radius is reached If the radius can not be reached return NAN.
Note that there are two solutions which have equivalent arc lengths with different sign Always return the positive solution.
Definition at line 256 of file PerigeeCircle.cc.
Approach on the circle with the given cylindrical radius that lies in the forward direction of a start point.
Calculates the point on the circle with cylindrical radius cylindricalR, which is closest following the circle in the direction of positive forward orientation This is particularly useful to extraplotate into a certain layer. In case no intersection with this cylindrical radius exists the function returns Vector2D(NAN,NAN)
startPoint | Start point from which to follow in the circle in the forward direction |
cylindricalR | Cylindrical radius of interest |
Definition at line 291 of file PerigeeCircle.cc.
Vector2D chooseNextForwardOf | ( | const Vector2D & | start, |
const Vector2D & | end1, | ||
const Vector2D & | end2 | ||
) | const |
Returns the one of two end point which is first reached from the given start if one stricly follows the forward direction of the circle.
If the generalized circle is truely a line none of the points might lie in the forward direction and Vector2D(NAN,NAN) is returned.
start | Point to start the traversal |
end1 | One possible end point |
end2 | Other possible end point |
Definition at line 298 of file PerigeeCircle.cc.
void conformalTransform | ( | ) |
Transforms the generalized circle to conformal space inplace.
Applies the conformal map in the self-inverse from X = x / (x^2 + y^2) and Y = y / (x^2 +y^2) inplace It works most easily by the exchange of the circle parameters n0 <-> n3
Definition at line 139 of file PerigeeCircle.cc.
PerigeeCircle conformalTransformed | ( | ) | const |
Returns a copy of the circle in conformal space.
Applies the conformal map in the self-inverse from X = x / (x^2 + y^2) and Y = y / (x^2 +y^2) and returns the result as a new circle It works most easily by the exchange of the circle parameters n0 <-> n3
Definition at line 149 of file PerigeeCircle.cc.
double fastDistance | ( | const Vector2D & | point | ) | const |
Getter for the linearised distance measure to a point.
Gives a fast signed approximation of the distance to the circle. The absolute value of the fast distance is accurate up to first order of distance/circle radius, hence best used with big circles and small distances. The sign of the fast distance indicates if the point is to the right or to the left of the circle.
Definition at line 327 of file PerigeeCircle.cc.
|
static |
Constructor from center, radius and a optional orientation.
The center and radius alone do not carry any orientation. However the perigee parameterisation does. Therefore the constructor also excepts an orientated representation from them. If no orientation is given, it defaults to mathematical positiv counterclockwise.
Definition at line 109 of file PerigeeCircle.cc.