#include <G4LineSection.hh>
Definition at line 47 of file G4LineSection.hh.
Definition at line 70 of file G4LineSection.hh.
72 : EndpointA(PntA), VecAtoB(PntB-PntA)
74 fABdistanceSq = VecAtoB.
mag2();
Definition at line 33 of file G4LineSection.cc.
37 G4double sq_VecAZ, inner_prod, unit_projection ;
39 VecAZ= OtherPnt - EndpointA;
40 sq_VecAZ = VecAZ.
mag2();
42 inner_prod= VecAtoB.
dot( VecAZ );
46 if( fABdistanceSq != 0.0 )
49 unit_projection = inner_prod/fABdistanceSq;
51 if( (0. <= unit_projection ) && (unit_projection <= 1.0 ) )
53 dist_sq= sq_VecAZ - unit_projection * inner_prod ;
60 if( unit_projection < 0. )
68 dist_sq = VecBZ.
mag2();
74 dist_sq = (OtherPnt - EndpointA).mag2() ;
76 if( dist_sq < 0.0 ) dist_sq = 0.0 ;
78 return std::sqrt(dist_sq) ;
double dot(const Hep3Vector &) const
G4double G4LineSection::GetABdistanceSq |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: