43 : fUseParallelGeometries(false),
46 fLastSafetyPosition(0.0,0.0,0.0),
75 "Found that existing tracking Navigator has NULL world");
106 fLastSafety = newSafety;
122 G4double safeDistance = fRecomputeFactor*fLastSafety;
123 if( (moveLengthSq > 0.0 )
124 && (moveLengthSq >= safeDistance*safeDistance))
128 if( !fUseParallelGeometries )
138 newSafety = fLastSafety;
145 if( moveLengthSq > 0.0 )
147 moveLength= std::sqrt(moveLengthSq);
149 newSafety = fLastSafety-moveLength;
160 if( moveVec.
mag2() >
sqr(fLastSafety) )
164 ed <<
" Safety Sphere: Radius = " << fLastSafety;
165 ed <<
" Center = " << fLastSafetyPosition <<
G4endl;
166 ed <<
" New Location : Move = " << moveVec.
mag2();
167 ed <<
" Position = " << newPosition <<
G4endl;
169 "Unsafe Move> Asked to relocate beyond 'Safety sphere'.");
174 if( !fUseParallelGeometries )
180 fpPathFinder->
ReLocate( newPosition );
187 if( !fUseParallelGeometries)
194 fpPathFinder->
Locate( newPosition, newDirection );
CLHEP::Hep3Vector G4ThreeVector
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
virtual void LocateGlobalPointWithinVolume(const G4ThreeVector &position)
G4double CheckNextStep(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
G4VPhysicalVolume * GetWorldVolume() const
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
G4double ComputeSafety(const G4ThreeVector &globalPoint)
void ReLocate(const G4ThreeVector &position)
void Locate(const G4ThreeVector &position, const G4ThreeVector &direction, G4bool relativeSearch=true)
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)
static G4TransportationManager * GetTransportationManager()
G4Navigator * GetNavigatorForTracking() const
G4int ActivateNavigator(G4Navigator *aNavigator)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::ostringstream G4ExceptionDescription