43 fpPathFinder =
nullptr;
48 fpMassNavigator =
nullptr;
49 fMassNavigatorId = -1;
61 if(fpMassNavigator ==
nullptr) abort();
66 if (worldPV ==
nullptr)
68 G4Exception(
"G4ITSafetyHelper::InitialiseNavigator",
70 "Found that existing tracking Navigator has NULL world");
97 currentMaxStep, newSafety);
116 if ((moveLengthSq > 0.0))
118 if (!fUseParallelGeometries)
121 newSafety = fpMassNavigator->ComputeSafety(
position, maxLength,
true);
130 if (newSafety < maxLength)
158 ed <<
" Safety Sphere: Radius = " <<
fpTrackState->fLastSafety;
160 ed <<
" New Location : Move = " << moveVec.
mag2();
161 ed <<
" Position = " << newPosition <<
G4endl;
162 G4Exception(
"G4ITSafetyHelper::ReLocateWithinVolume",
"GeomNav999",
164 "Unsafe Move> Asked to relocate beyond 'Safety sphere'.");
169 if (!fUseParallelGeometries)
171 fpMassNavigator->LocateGlobalPointWithinVolume(newPosition);
175 fpPathFinder->
ReLocate(newPosition);
182 if (!fUseParallelGeometries)
184 fpMassNavigator->LocateGlobalPointAndSetup(newPosition, &newDirection,
true,
189 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)
~G4ITSafetyHelper() override
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()
void NewTrackState() override
StateTypeHandle fpTrackState