Belle II Software  release-08-01-10
G4SafeNavigator Class Reference

Guards against leaving the physical volume. More...

Collaboration diagram for G4SafeNavigator:

Public Member Functions

G4VPhysicalVolume * GetWorldVolume () const
 Returns the Geant4 world volume.
 
void SetWorldVolume (G4VPhysicalVolume *pWorld)
 Sets the Geant4 world volume.
 
G4VPhysicalVolume * LocateGlobalPointAndSetup (const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
 Use Geant4's LocateGlobalPointAndSetup to get a G4VPhysicalVolume or use cached values from previous calls.
 
G4double CheckNextStep (const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
 Check if within world volume and call Geant4's CheckNextStep.
 
G4VPhysicalVolume * ResetHierarchyAndLocate (const G4ThreeVector &point, const G4ThreeVector &direction, const G4TouchableHistory &h)
 Call Geant4's ResetHierarchyAndLocate to get a G4VPhysicalVolume or use cached values from previous calls.
 
void SetGeometricallyLimitedStep ()
 Calls Geant4's SetGeometricallyLimitedStep.
 
G4TouchableHistory * CreateTouchableHistory () const
 Call Geant4's CreateTouchableHistory.
 

Private Member Functions

void installOurExceptionHandler ()
 Install our specific exception handler and cache the one which was set before. More...
 
void uninstallAndCheckOurExceptionHandler ()
 Reinstate the previously used exception handler and check whether a critical exception was recorded by our exception handler. More...
 

Private Attributes

G4ThreeVector lastpoint_
 the last point which has been queried with G4
 
G4VPhysicalVolume * lastvolume_ {0}
 the last volume which has been queried
 
G4Navigator nav_
 Geant4's navigator which calls are forwarded to.
 
const G4VSolid * worldsolid_ {0}
 The topmost solid of the G4 world.
 
G4VExceptionHandler * otherHandler = nullptr
 Stores the pointer to exception handler which this class temporarily replaces for most calls.
 
Geant4MaterialInterfaceExceptioHandler exceptionHandler
 Custom exception handler to handle stuck tracks properly (and abort)
 

Detailed Description

Guards against leaving the physical volume.

Not inheriting from G4Navigator because CheckNextStep is not virtual.

Definition at line 105 of file Geant4MaterialInterface.cc.

Member Function Documentation

◆ installOurExceptionHandler()

void installOurExceptionHandler ( )
inlineprivate

Install our specific exception handler and cache the one which was set before.

Be sure to call uninstallAndCheckOurExceptionHandler() once the G4Navigator call is completed.

Definition at line 168 of file Geant4MaterialInterface.cc.

◆ uninstallAndCheckOurExceptionHandler()

void uninstallAndCheckOurExceptionHandler ( )
inlineprivate

Reinstate the previously used exception handler and check whether a critical exception was recorded by our exception handler.

If so, throw a Genfit exception.

Definition at line 179 of file Geant4MaterialInterface.cc.


The documentation for this class was generated from the following file: