8 #include <tracking/trackFindingCDC/geometry/ParameterLine2D.h>
10 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
15 using namespace TrackFindingCDC;
18 const double fromSignedRadius,
20 const double toSignedRadius)
22 Vector2D connecting = toCenter - fromCenter;
25 const double norm = connecting.
normalize();
27 double kappa = (fromSignedRadius - toSignedRadius) / norm;
28 double cokappa =
sqrt(1 - kappa * kappa);
30 Vector2D fromPos =
Vector2D(connecting, kappa * fromSignedRadius, cokappa * fromSignedRadius);
31 fromPos += fromCenter;
33 Vector2D toPos =
Vector2D(connecting, kappa * toSignedRadius, cokappa * toSignedRadius);
41 output <<
"ParameterLine2D(" << line.support() <<
"," << line.tangential() <<
")";
A line with a support point and tangential vector.
static ParameterLine2D touchingCircles(const Vector2D &fromCenter, double fromSignedRadius, const Vector2D &toCenter, double toSignedRadius)
Constructs a line touching two circles in one point each.
static ParameterLine2D throughPoints(const Vector2D &start, const Vector2D &end)
Static constructor for a line between to points.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
double normalize()
Normalizes the vector to unit length.
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.