16 declareInterface<TrkDistanceFinderNeutralNeutral>(
this);
22std::pair<Amg::Vector3D,double>
25 double & distanceOnAxis)
const {
34 double p1p2=Mom1.dot(Mom2);
35 double p1DR0=Mom1.dot(DeltaR0);
36 double p2DR0=Mom2.dot(DeltaR0);
37 double p1p1=Mom1.mag2();
38 double p2p2=Mom2.mag2();
40 double lambda1=(p1DR0*p2p2-p1p2*p2DR0)/(p1p2*p1p2-p1p1*p2p2);
41 double lambda2=(p1DR0*p1p2-p1p1*p2DR0)/(p1p2*p1p2-p1p1*p2p2);
46 ATH_MSG_VERBOSE (
"x1fin " << pos1.x() <<
"y1fin " << pos1.y() <<
"z1fin " << pos1.z());
47 ATH_MSG_VERBOSE (
"x2fin " << pos2.x() <<
"y2fin " << pos2.y() <<
"z2fin " << pos2.z());
49 double distance = (pos1-pos2).
mag();
51 distanceOnAxis = lambda1/sqrt(p1p1);
53 ATH_MSG_VERBOSE (
"orig distance " << DeltaR0.mag() <<
" final distance " << distance);
57 return std::pair<Amg::Vector3D,double>(pos1,distance);
Scalar mag() const
mag method
#define ATH_MSG_VERBOSE(x)
const Amg::Vector3D & momentum() const
const Amg::Vector3D & position() const
TrkDistanceFinderNeutralNeutral(const std::string &t, const std::string &n, const IInterface *p)
~TrkDistanceFinderNeutralNeutral()
std::pair< Amg::Vector3D, double > getPointAndDistance(const Trk::NeutralTrack &, const Trk::NeutralTrack &, double &) const
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.