Belle II Software development
|
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 parameters. | |
PerigeeCircle (double curvature, double phi0, double impact) | |
Constructor from the perigee parameters. | |
PerigeeCircle (const PerigeeParameters &perigeeParameters) | |
Constructor from the perigee parameters. | |
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. | |
PerigeeCircle | conformalTransformed () const |
Returns a copy of the circle in conformal space. | |
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. | |
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. | |
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. | |
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 strictly follows the forward direction of the circle. | |
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. | |
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. | |
Private Member Functions | |
PerigeeCircle (double curvature, double phi0, const Vector2D &phi0Vec, double impact) | |
Constructor taking all stored parameters for internal use. | |
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 | ( | ) |
Default constructor for ROOT compatibility.
Definition at line 42 of file PerigeeCircle.cc.
PerigeeCircle | ( | double | curvature, |
const Vector2D & | phi0Vec, | ||
double | impact | ||
) |
Constructor from the perigee parameters.
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 parameters.
The direction of travel at the perigee is given as azimuth angle
Definition at line 55 of file PerigeeCircle.cc.
|
explicit |
Constructor from the perigee parameters.
Definition at line 63 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.
|
explicit |
Constructor from a two dimensional line.
Definition at line 79 of file PerigeeCircle.cc.
|
explicit |
Constructor promoting the generalized circle.
Definition at line 84 of file PerigeeCircle.cc.
|
explicit |
Constructor from a two dimensional circle in center / radius representation.
Definition at line 89 of file PerigeeCircle.cc.
|
inline |
Gives the signed radius of the circle. If it was a line this will be infinity.
Definition at line 340 of file PerigeeCircle.h.
|
inline |
Getter for the apogee of the circle. If it was a line both components will be infinity.
Definition at line 304 of file PerigeeCircle.h.
|
private |
Helper method to calculate the arc length to a point at distance delta to the perigee and dr to circle.
Definition at line 266 of file PerigeeCircle.cc.
|
private |
Helper method to calculate the arc length between to points on the circle from a given direct secant length.
Definition at line 273 of file PerigeeCircle.cc.
Calculates the arc length between two points of closest approach on the circle.
The arc length is signed positive 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.
|
inline |
Getter for the arc length for a full round of the circle.
Definition at line 322 of file PerigeeCircle.h.
double arcLengthTo | ( | const Vector2D & | point | ) | const |
Calculates the arc length between the perigee and the given point.
Definition at line 236 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.
Vector2D atArcLength | ( | double | arcLength | ) | const |
Calculates the point, which lies at the give perpendicular travel distance (counted from the perigee)
Definition at line 116 of file PerigeeCircle.cc.
Calculates the two points with the given cylindrical radius on the generalised circle.
Definition at line 280 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.
|
inline |
Getter for the center of the circle. If it was a line both components will be infinity.
Definition at line 298 of file PerigeeCircle.h.
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 strictly follows the forward direction of the circle.
If the generalized circle is truly 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.
Calculates the point of closest approach on the circle to the given point.
Definition at line 315 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.
|
inline |
Getter for the signed curvature.
Definition at line 416 of file PerigeeCircle.h.
|
inline |
Getter for d0 parameter of the common Belle2::Helix representation.
Definition at line 410 of file PerigeeCircle.h.
|
inline |
Getter for the proper signed distance of the point to the circle.
Definition at line 210 of file PerigeeCircle.h.
double distance | ( | double | fastDistance | ) | const |
Helper function to translate the linearised distance to the proper distance.
Definition at line 320 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.
|
inline |
Helper function to translate the proper distance to the linearized distance measure of the circle retaining the sign of the distance.
Definition at line 238 of file PerigeeCircle.h.
|
inline |
Getter for the linearised distance to the origin.
Definition at line 229 of file PerigeeCircle.h.
|
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 positive counterclockwise.
Definition at line 109 of file PerigeeCircle.cc.
|
static |
Constructor with the four parameters of the generalized circle.
Definition at line 101 of file PerigeeCircle.cc.
|
static |
Constructor with the four parameters of the generalized circle.
Definition at line 94 of file PerigeeCircle.cc.
Gradient of the distance field, hence indicates the direction of increasing distance.
Definition at line 268 of file PerigeeCircle.h.
|
inline |
Getter for the signed distance of the origin to the circle.
Definition at line 434 of file PerigeeCircle.h.
void invalidate | ( | ) |
Sets all circle parameters to zero.
Definition at line 160 of file PerigeeCircle.cc.
|
inline |
Indicates if the perigee parameters represent a closed circle.
Definition at line 256 of file PerigeeCircle.h.
|
inline |
Indicates whether to given point lies in the forward direction from the perigee.
Definition at line 186 of file PerigeeCircle.h.
|
inline |
Indicates whether to given point lies in the forward direction from the perigee.
Definition at line 180 of file PerigeeCircle.h.
bool isInvalid | ( | ) | const |
|
inline |
Indicates if the perigee parameters represent a line.
Definition at line 250 of file PerigeeCircle.h.
|
inline |
Indicates if the point is on the right or left side of the circle.
Definition at line 244 of file PerigeeCircle.h.
|
inline |
Indicates if the combination of the circle parameters makes up a valid circle.
Definition at line 94 of file PerigeeCircle.h.
|
inline |
Gives the maximal cylindrical radius the circle reaches.
Definition at line 316 of file PerigeeCircle.h.
|
inline |
Gives the minimal cylindrical radius the circle reaches (unsigned)
Definition at line 310 of file PerigeeCircle.h.
|
inline |
Getter for the generalised circle parameter n0.
Definition at line 351 of file PerigeeCircle.h.
|
inline |
Getter for the generalised circle parameters n1.
Definition at line 363 of file PerigeeCircle.h.
|
inline |
Getter for the generalised circle parameters n1 and n2.
Definition at line 357 of file PerigeeCircle.h.
|
inline |
Getter for the generalised circle parameters n2.
Definition at line 370 of file PerigeeCircle.h.
|
inline |
Getter for the generalised circle parameter n3.
Definition at line 377 of file PerigeeCircle.h.
Unit normal vector from the circle to the given point.
Definition at line 274 of file PerigeeCircle.h.
|
inline |
Getter for omega parameter of the common Belle2::Helix which is the wrong sign curvature.
Definition at line 404 of file PerigeeCircle.h.
|
inline |
Getter for the orientation of the circle.
Definition at line 262 of file PerigeeCircle.h.
void passiveMoveBy | ( | const Vector2D & | by | ) |
Moves the coordinates system by the given vector. Updates perigee parameters in place.
Definition at line 174 of file PerigeeCircle.cc.
PerigeeJacobian passiveMoveByJacobian | ( | const Vector2D & | by | ) | const |
Computes the Jacobi matrix for a move of the coordinate system by the given vector.
Definition at line 183 of file PerigeeCircle.cc.
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.
Definition at line 190 of file PerigeeCircle.cc.
|
inline |
Getter for the perigee point.
Definition at line 292 of file PerigeeCircle.h.
|
inline |
Getter for the three perigee parameters in the order defined by EPerigeeParameter.h.
Definition at line 440 of file PerigeeCircle.h.
|
inline |
Gives the signed perimeter of the circle.
Definition at line 328 of file PerigeeCircle.h.
|
inline |
Getter for the azimuth angle of the direction of flight at the perigee.
Definition at line 422 of file PerigeeCircle.h.
|
inline |
Getter for the unit vector of the direction of flight at the perigee.
Definition at line 428 of file PerigeeCircle.h.
|
inline |
Gives the signed radius of the circle. If it was a line this will be infinity.
Definition at line 334 of file PerigeeCircle.h.
void reverse | ( | ) |
Flips the orientation of the circle in place.
Definition at line 126 of file PerigeeCircle.cc.
PerigeeCircle reversed | ( | ) | const |
Returns a copy of the circle with opposite orientation.
Definition at line 134 of file PerigeeCircle.cc.
void setCenterAndRadius | ( | const Vector2D & | center, |
double | absRadius, | ||
ERotation | orientation = ERotation::c_CounterClockwise |
||
) |
Setter for the circle center and radius.
Definition at line 334 of file PerigeeCircle.cc.
|
inline |
Setter for signed curvature.
Definition at line 451 of file PerigeeCircle.h.
|
inline |
Sets the impact parameter of the circle.
Definition at line 471 of file PerigeeCircle.h.
|
inline |
Setter for four generalised circle parameters.
Definition at line 398 of file PerigeeCircle.h.
|
inline |
Setter for generalised circle parameters from a normal line.
Definition at line 392 of file PerigeeCircle.h.
void setN | ( | double | n0, |
const Vector2D & | n12, | ||
double | n3 = 0.0 |
||
) |
Setter for four generalised circle parameters.
Definition at line 345 of file PerigeeCircle.cc.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets the azimuth angle of the direction of flight at the perigee.
Definition at line 457 of file PerigeeCircle.h.
|
inline |
Getter for the tangtial vector at the perigee.
Definition at line 286 of file PerigeeCircle.h.
Tangential vector to the circle near the given position.
Definition at line 280 of file PerigeeCircle.h.
|
private |
Memory for the signed curvature.
Definition at line 503 of file PerigeeCircle.h.
|
private |
Memory for the signed impact parameter.
Definition at line 512 of file PerigeeCircle.h.
|
private |
Memory for the azimuth angle of the direction of flight at the perigee.
Definition at line 506 of file PerigeeCircle.h.
|
private |
Cached unit direction of flight at the perigee.
Definition at line 509 of file PerigeeCircle.h.