13 mDirection = d.unit();
18 return mOrigin + pathlength * mDirection;
23 return mDirection.dot(point - mOrigin);
28 return at(pathlength(point));
33 double cosAngle = mDirection.dot(line.
direction());
34 double delta = cosAngle * cosAngle - 1;
36 double pathlength = (distance.dot(mDirection) - cosAngle * distance.dot(line.
direction())) / delta;
37 double pathlength2 = (cosAngle * distance.dot(mDirection) - distance.dot(line.
direction())) / delta;
38 return at(pathlength) - line.
at(pathlength2);
43 double cosAngle = mDirection.dot(line.
direction());
44 double delta = cosAngle * cosAngle - 1;
45 double s = pathlength(line.
origin());
47 return make_pair(-(s + t * cosAngle) / delta, -(s * cosAngle + t) / delta);
StThreeVectorD at(double pathlength) const
Point at a given path length along the line.
StThreeVectorD perigee(const StThreeVectorD &point) const
Perigee, i.e. Closest point on the line to a given point.
StThreeVectorD dca(const Line &line) const
DCA = Distance of Closest Approach to a given line.
double pathlength(const StThreeVectorD &point) const
Pathlength of a given point from the origin of the line.
StThreeVectorD direction() const
Direction vector of the line (normalized to the unit vector)
StThreeVectorD origin() const
Origin of the line.
pair< double, double > pathlengths(const Line &line) const
Pathlengths of the points of closest approach between the lines.