43 fFirstCall(true), fVerbose(0)
52 fMassNavigatorId = -1;
64 if(fpMassNavigator == 0) abort();
71 G4Exception(
"G4ITSafetyHelper::InitialiseNavigator",
73 "Found that existing tracking Navigator has NULL world");
101 currentMaxStep, newSafety);
120 if ((moveLengthSq > 0.0))
122 if (!fUseParallelGeometries)
125 newSafety = fpMassNavigator->ComputeSafety(
position, maxLength,
true);
134 if (newSafety < maxLength)
162 ed <<
" Safety Sphere: Radius = " <<
fpTrackState->fLastSafety;
164 ed <<
" New Location : Move = " << moveVec.
mag2();
165 ed <<
" Position = " << newPosition <<
G4endl;
166 G4Exception(
"G4ITSafetyHelper::ReLocateWithinVolume",
"GeomNav999",
168 "Unsafe Move> Asked to relocate beyond 'Safety sphere'.");
173 if (!fUseParallelGeometries)
175 fpMassNavigator->LocateGlobalPointWithinVolume(newPosition);
179 fpPathFinder->
ReLocate(newPosition);
186 if (!fUseParallelGeometries)
188 fpMassNavigator->LocateGlobalPointAndSetup(newPosition, &newDirection,
true,
193 fpPathFinder->
Locate(newPosition, newDirection);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
void Locate(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &direction)
void InitialiseNavigator()
void ReLocateWithinVolume(const G4ThreeVector &pGlobalPoint)
G4double ComputeSafety(const G4ThreeVector &pGlobalPoint, G4double maxRadius=DBL_MAX)
G4double CheckNextStep(const G4ThreeVector &position, const G4ThreeVector &direction, const G4double currentMaxStep, G4double &newSafety)
static G4ITTransportationManager * GetTransportationManager()
G4ITNavigator * GetNavigatorForTracking() const
G4double ComputeSafety(const G4ThreeVector &globalPoint)
void ReLocate(const G4ThreeVector &position)
void Locate(const G4ThreeVector &position, const G4ThreeVector &direction, G4bool relativeSearch=true)
static G4PathFinder * GetInstance()
virtual void NewTrackState()
StateTypeHandle fpTrackState