57 G4double sq_VecAZ, inner_prod, unit_projection ;
60 sq_VecAZ = VecAZ.mag2();
62 inner_prod=
VecAtoB.dot( VecAZ );
71 if( (0. <= unit_projection ) && (unit_projection <= 1.0 ) )
73 dist_sq= sq_VecAZ - unit_projection * inner_prod ;
80 if( unit_projection < 0. )
88 dist_sq = VecBZ.mag2();
96 if( dist_sq < 0.0 ) dist_sq = 0.0 ;
98 return std::sqrt(dist_sq) ;
107 return LineAB.
Dist( OtherPnt );
G4double Dist(G4ThreeVector OtherPnt) const
CLHEP::Hep3Vector G4ThreeVector
static G4double Distline(const G4ThreeVector &OtherPnt, const G4ThreeVector &LinePntA, const G4ThreeVector &LinePntB)
G4LineSection(const G4ThreeVector &PntA, const G4ThreeVector &PntB)