40 : fLastSafetyPosition(0.0,0.0,0.0)
57 if( worldPV ==
nullptr )
61 "Found that existing tracking Navigator has NULL world");
88 fLastSafety = newSafety;
106 if( (moveLengthSq > 0.0 ) )
108 if( !fUseParallelGeometries )
111 newSafety = fpMassNavigator->ComputeSafety(
position, maxLength,
true);
114 if( newSafety < maxLength )
116 fLastSafety= newSafety;
123 newSafety = fpPathFinder->ComputeSafety(
position);
125 fLastSafety= newSafety;
136 newSafety = fLastSafety;
151 if( moveVec.
mag2() >
sqr(fLastSafety) )
155 ed <<
"Unsafe Move> Asked to relocate beyond 'Safety sphere'. Details: "
157 ed <<
" Safety Sphere: Radius = " << fLastSafety;
158 ed <<
" Center = " << fLastSafetyPosition <<
G4endl;
159 ed <<
" New Location : Move = " << moveVec.
mag();
160 ed <<
" Position = " << newPosition <<
G4endl;
161 G4Exception(
"G4SafetyHelper::ReLocateWithinVolume",
167 if( !fUseParallelGeometries )
169 fpMassNavigator->LocateGlobalPointWithinVolume( newPosition );
173 fpPathFinder->ReLocate( newPosition );
181 if( !fUseParallelGeometries )
183 fpMassNavigator->LocateGlobalPointAndSetup(newPosition, &newDirection,
188 fpPathFinder->Locate( newPosition, newDirection );
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
CLHEP::Hep3Vector G4ThreeVector
static G4PathFinder * GetInstance()
G4double ComputeSafety(const G4ThreeVector &pGlobalPoint, G4double maxRadius=DBL_MAX)
G4double CheckNextStep(const G4ThreeVector &position, const G4ThreeVector &direction, const G4double currentMaxStep, G4double &newSafety)
void InitialiseNavigator()
void Locate(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &direction)
void ReLocateWithinVolume(const G4ThreeVector &pGlobalPoint)
G4TransportationManager is a singleton class which stores the navigator used by the transportation pr...
static G4TransportationManager * GetTransportationManager()
G4Navigator * GetNavigatorForTracking() const
G4VPhysicalVolume is an abstract base class for the representation of a positioned volume....