702 G4int firstNavigatorId= -1;
703 G4bool oneObtained=
false;
708 normalGlobalCrd= fpNavigator[
fIdNavLimiting ]->GetGlobalExitNormal( argPoint, &isObtained);
709 *argpObtained= isObtained;
715 std::vector<G4ITNavigator*>::iterator pNavIter=
718 for (
G4int num=0; num< fNoActiveNavigators ; ++pNavIter,++num )
727 if( !isObtained && (newNormal.
mag2() != 0.0) )
729 normalGlobalCrd= newNormal;
730 isObtained = oneObtained;
731 firstNavigatorId= num;
734 G4double dotNewPrevious= newNormal.
dot( normalGlobalCrd );
735 G4double productMagSq= normalGlobalCrd.mag2() * newNormal.
mag2();
736 if( productMagSq > 0.0 )
738 G4double productMag= std::sqrt( productMagSq );
739 dotNewPrevious /= productMag;
742 *argpObtained=
false;
746 std::ostringstream message;
747 message <<
"Clash of Normal from different Navigators!" <<
G4endl
748 <<
" Previous Navigator Id = " << firstNavigatorId <<
G4endl
749 <<
" Current Navigator Id = " << num <<
G4endl;
750 message <<
" Dot product of 2 normals = " << dotNewPrevious <<
G4endl;
751 message <<
" Normal (previous) = " << normalGlobalCrd <<
G4endl;
752 message <<
" Normal (current) = " << newNormal <<
G4endl;
753 G4Exception(
"G4ITMultiNavigator::GetGlobalExitNormal()",
"GeomNav0002",
770 std::ostringstream message;
772 <<
" candidate Navigators limiting the step!" <<
G4endl;
773 G4Exception(
"G4ITMultiNavigator::GetGlobalExitNormal()",
"GeomNav0002",
780 *argpObtained= isObtained;
781 return normalGlobalCrd;
double dot(const Hep3Vector &) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4ThreeVector GetGlobalExitNormal(const G4ThreeVector &CurrentE_Point, G4bool *obtained)
std::vector< G4ITNavigator * >::iterator GetActiveNavigatorsIterator()
static constexpr double perThousand