6 double FlightDistance2D =
deltaV2V1(v1,v2).perp() ;
12 double sigmaFlightDistance2D2;
13 if( FlightDistance2D > 0.000001 )
14 sigmaFlightDistance2D2 = ( 1 / ( FlightDistance2D*FlightDistance2D ) ) *
terms2D ( v1 , v2 ) ;
16 sigmaFlightDistance2D2 = 0.0;
18 double sigmaFlightDistance2D ;
19 if ( sigmaFlightDistance2D2 >= 0 ) {
20 sigmaFlightDistance2D =
sqrt ( sigmaFlightDistance2D2 ) ;
23 std::cout <<
"DistanceOfVertices2D::distance : sigmaFlightDistance2D2 <= 0 : " << sigmaFlightDistance2D2 << std::endl ;
24 sigmaFlightDistance2D = 0.0 ;
27 return Measurement1D ( FlightDistance2D , sigmaFlightDistance2D ) ;
35 CLHEP::Hep3Vector v1ToV2 =
deltaV2V1 ( v1, v2 ) ;
37 if ( ( direction.x()*v1ToV2.x() + direction.y()*v1ToV2.y() ) > 0 ) sign2d = 1 ;
double terms2D(const TransientVertex &v1, const TransientVertex &v2)
CLHEP::Hep3Vector deltaV2V1(const TransientVertex &v1, const TransientVertex &v2)
virtual Measurement1D distance(const TransientVertex &, const TransientVertex &)
virtual Measurement1D signedDistance(const TransientVertex &, const TransientVertex &, const CLHEP::Hep3Vector &)