 |
Belle II Software
release-05-02-19
|
12 #include <tracking/trackFindingCDC/geometry/GeneralizedCircle.h>
13 #include <tracking/trackFindingCDC/geometry/Line2D.h>
14 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
16 #include <tracking/trackFindingCDC/numerics/Quadratic.h>
17 #include <tracking/trackFindingCDC/numerics/EForwardBackward.h>
18 #include <tracking/trackFindingCDC/numerics/ERightLeft.h>
19 #include <tracking/trackFindingCDC/numerics/ERotation.h>
20 #include <tracking/trackFindingCDC/numerics/ESign.h>
31 namespace TrackFindingCDC {
40 class ParameterLine2D {
73 const EForwardBackward orientation)
76 Vector2D(orientation, orientation *
slope));
111 double fromSignedRadius,
112 const Vector2D& toCenter,
113 double toSignedRadius);
211 double distance(
const double first,
const double second)
const
289 return (line.tangential().cross(
support()) - line.tangential().cross(line.support())) /
304 return solveQuadraticABC(a, b, c);
331 void moveBy(
const Vector2D& by)
402 double map(
const double first)
const
443 std::ostream&
operator<<(std::ostream& output,
const ParameterLine2D& line);
void invert()
Turns the line into its inverse function in place. Orientation will be flipped as well.
ERightLeft isRightOrLeft(const Vector2D &point) const
Return if the point given is right or left of the line.
void setSecond(const double second)
Setter for the second coordinate.
double intersectionAt(const Line2D &line) const
Gives the line parameter where the two lines meet. Infinity for parallels.
Vector2D orthogonal() const
Orthogonal vector to the counterclockwise direction.
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
static ParameterLine2D touchingCircles(const Vector2D &fromCenter, double fromSignedRadius, const Vector2D &toCenter, double toSignedRadius)
Constructs a line touching two circles in one point each.
void reverse()
Reverses the tangential vector inplace.
ParameterLine2D inverted() const
Gives the line assoziated with the inverse function as a copy.
bool isLeft(const Vector2D &rhs) const
Return if the point given is left of the line.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
double normalize()
Normalizes the vector to unit length.
EForwardBackward alignedWithSecond() const
Indicates if the tangential vector point in a commmon direction with the second coordinate axes.
double normSquared() const
Calculates .
void passiveMoveBy(const Vector2D &by)
Moves the coordinate system in the given direction in place.
double intercept() const
Second coordinate for first being zero.
Vector2D at(const double parameter) const
Evaluates the line formula at the parameter given.
double closestToOriginAt() const
Gives the line parameter at the closest approach to the origin.
double second() const
Getter for the second coordinate.
bool isNull() const
Checks if the vector is the null vector.
bool isInvalid() const
Check it the line is in an invalid state.
bool isRight(const Vector2D &rhs) const
Return if the point given is right of the line.
EForwardBackward
Enumeration to represent the distinct possibilities of the right left passage information.
A line with a support point and tangential vector.
double dot(const Vector2D &rhs) const
Calculates the two dimensional dot product.
void setFirst(const double first)
Setter for the first coordinate.
double map(const double first) const
Method mapping the first coordinate to the second according to the line.
Vector2D m_support
Support vector of the line.
double first() const
Getter for the first coordinate.
double n3() const
Getter for the fourth circle parameter.
Vector2D m_tangential
Tangential vector of the line.
double cross(const Vector2D &rhs) const
Calculated the two dimensional cross product.
void passiveMoveAlongSecond(const double second)
Moves the coordinate system along the second coordinate axes in place.
double fastDistance(const Vector2D &point) const
Approximate distance.
double orthogonalComp(const Vector2D &relativTo) const
Calculates the component orthogonal to the given vector.
Vector2D gradient(const Vector2D &point) const
Gradient of the distance field Gives the gradient of the approximated distance field for the given po...
void invalidate()
Clear all information from the line.
void moveAlongSecond(const double second)
Moves the line along the second coordinate axes in place.
Abstract base class for different kinds of events.
double distanceToOrigin() const
Gives the signed distance of the origin.
void swapCoordinates()
Swaps the coordinates in place.
ParameterLine2D reversed() const
Makes a copy line which has the opposite tangential vector but same support point.
double inverseSlope() const
The inveres line slope.
static ParameterLine2D fromSlopeIntercept(const double slope, const double intercept)
Constructs a line with slope and intercept.
Vector2D closest(const Vector2D &point) const
Gives the position at the closest approach on the line to point.
Vector2D & reverse()
Reverses the direction of the vector in place.
static ParameterLine2D throughPoints(const Vector2D &start, const Vector2D &end)
Static constructor for a line between to points.
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
double lengthOnCurve(const Vector2D &from, const Vector2D &to) const
Denotes the length on the line between the two points.
void moveAlongFirst(const double first)
Moves the line along the first coordinate axes in place.
Vector2D closestToOrigin() const
Gives the position of closest approach to the origin.
ParameterLine2D()
Default constructor for ROOT compatibility.
double closestAt(const Vector2D &point) const
Gives the line parameter at the closest approach to point.
double slope() const
The line slope.
Vector2D intersection(const Line2D &line) const
Gives the point where the two lines meet. Infinities for parallels.
void passiveMoveAlongFirst(const double first)
Moves the coordinate system along the first coordinate axes in place.
double inverseMap(const double second) const
Method for the inverse mapping the second coordinate to the first according to the line.
A two dimensional normal line.
double distance(const Vector2D &point) const
Gives the signed distance of a point to the line.
const Vector2D & tangential() const
Gives the tangential vector of the line.
double operator()(const double first) const
Operator mapping the first coordinate to the second according to the line.
double norm() const
Calculates the length of the vector.
void normalize()
Normalizes the tangential vector inplace.
std::pair< double, double > intersectionsAt(const GeneralizedCircle &genCircle) const
Gives the line parameters of this line, where it intersects with the generalized circle.
void passiveMoveAtBy(const double delta)
Moves the support point by the given amount of the parameter in the forward direction.
const Vector2D & support() const
Gives the support vector of the line.
Vector2D normal() const
Gives the normal vector of the line.
EForwardBackward alignedWithFirst() const
Indicates if the tangential vector point in a commmon direction with the first coordinate axes.
double zero() const
First coordinate for second being zero.
void set(const double first, const double second)
Setter for both coordinate.
double absoluteDistance(const Vector2D &point) const
Gives the unsigned distance of a point to the line.
void moveBy(const Vector2D &by)
Moves the line in the given direction in place. Corresponds to an active transformation.