39 : fLastSafetyPosition(0.0,0.0,0.0)
55 if( worldPV ==
nullptr )
59 "Found that existing tracking Navigator has NULL world");
90 fLastSafety = newSafety;
107 if( (moveLengthSq > 0.0 ) )
109 if( !fUseParallelGeometries )
115 if( newSafety < maxLength )
117 fLastSafety= newSafety;
126 fLastSafety= newSafety;
137 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 )
173 fpPathFinder->
ReLocate( newPosition );
180 if( !fUseParallelGeometries )
187 fpPathFinder->
Locate( newPosition, newDirection );
199 if( !fUseParallelGeometries )
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
CLHEP::Hep3Vector G4ThreeVector
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
virtual void LocateGlobalPointWithinVolume(const G4ThreeVector &position)
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=nullptr, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
G4double CheckNextStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
G4VPhysicalVolume * GetWorldVolume() const
virtual G4bool RecheckDistanceToCurrentBoundary(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double CurrentProposedStepLength, G4double *prDistance, G4double *prNewSafety=nullptr) const
G4double ComputeSafety(const G4ThreeVector &globalPoint)
void ReLocate(const G4ThreeVector &position)
void Locate(const G4ThreeVector &position, const G4ThreeVector &direction, G4bool relativeSearch=true)
G4bool RecheckDistanceToCurrentBoundary(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double *prDistance, G4double *prNewSafety=nullptr) const
static G4PathFinder * GetInstance()
G4bool RecheckDistanceToCurrentBoundary(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double *prDistance, G4double *prNewSafety=nullptr) const
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)
static G4TransportationManager * GetTransportationManager()
G4Navigator * GetNavigatorForTracking() const
G4int ActivateNavigator(G4Navigator *aNavigator)