44 fFirstCall(true), fVerbose(0)
53 fMassNavigatorId = -1;
65 if(fpMassNavigator == 0) abort();
72 G4Exception(
"G4ITSafetyHelper::InitialiseNavigator",
74 "Found that existing tracking Navigator has NULL world");
101 G4double linstep = fpMassNavigator->CheckNextStep(position, direction,
102 currentMaxStep, newSafety);
121 if ((moveLengthSq > 0.0))
123 if (!fUseParallelGeometries)
126 newSafety = fpMassNavigator->ComputeSafety(position, maxLength,
true);
135 if (newSafety < maxLength)
163 ed <<
" Safety Sphere: Radius = " <<
fpTrackState->fLastSafety;
165 ed <<
" New Location : Move = " << moveVec.
mag2();
166 ed <<
" Position = " << newPosition <<
G4endl;
167 G4Exception(
"G4ITSafetyHelper::ReLocateWithinVolume",
"GeomNav999",
169 "Unsafe Move> Asked to relocate beyond 'Safety sphere'.");
174 if (!fUseParallelGeometries)
176 fpMassNavigator->LocateGlobalPointWithinVolume(newPosition);
180 fpPathFinder->
ReLocate(newPosition);
187 if (!fUseParallelGeometries)
189 fpMassNavigator->LocateGlobalPointAndSetup(newPosition, &newDirection,
true,
194 fpPathFinder->
Locate(newPosition, newDirection);
static G4PathFinder * GetInstance()
void Locate(const G4ThreeVector &position, const G4ThreeVector &direction, G4bool relativeSearch=true)
std::ostringstream G4ExceptionDescription
G4double CheckNextStep(const G4ThreeVector &position, const G4ThreeVector &direction, const G4double currentMaxStep, G4double &newSafety)
void ReLocate(const G4ThreeVector &position)
void ReLocateWithinVolume(const G4ThreeVector &pGlobalPoint)
static G4ITTransportationManager * GetTransportationManager()
StateTypeHandle fpTrackState
G4double ComputeSafety(const G4ThreeVector &globalPoint)
virtual void NewTrackState()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void InitialiseNavigator()
G4ITNavigator * GetNavigatorForTracking() const
G4double ComputeSafety(const G4ThreeVector &pGlobalPoint, G4double maxRadius=DBL_MAX)
void Locate(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &direction)