17#include "CLHEP/Vector/ThreeVector.h"
18#include "CLHEP/Matrix/Vector.h"
19#include "CLHEP/Geometry/Point3D.h"
23 const Trajectory& traj2,
double f2,
double prec)
27 if (
status().failure())
return;
28 calcDist(traj1,traj2);
36 if (
status().failure())
return;
47 static Hep3Vector dir1,dir2;
52 Hep3Vector
delta = ((CLHEP::Hep3Vector)pos2) - ((CLHEP::Hep3Vector)pos1);
53 Hep3Vector between = dir1.cross( dir2 );
55 if (
status().success() != 3) {
56 between = between.unit();
57 _doca =
delta.dot(between);
60 double sign = (dir1.dot(dir2) > 0.) ? -1. : 1.;
61 _doca = (
delta -
delta.dot(dir1) * dir1).mag();
virtual HepPoint3D position(double) const =0
virtual void getInfo(double fltLen, HepPoint3D &pos, Hep3Vector &direction) const =0
const TrkErrCode & status() const
void minimize(const Trajectory &traj1, double f1, const Trajectory &traj2, double f2)
TrkPoca(const Trajectory &traj1, double flt1, const Trajectory &traj2, double flt2, double precision=1.e-5)