Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VNavigation Class Referenceabstract

G4VNavigation class holds the common navigation interface for all geometry navigator types. More...

#include <G4VNavigation.hh>

+ Inheritance diagram for G4VNavigation:

Public Member Functions

virtual ~G4VNavigation ()
 
virtual G4bool LevelLocate (G4NavigationHistory &history, const G4VPhysicalVolume *blockedVol, const G4int blockedNum, const G4ThreeVector &globalPoint, const G4ThreeVector *globalDirection, const G4bool pLocatedOnEdge, G4ThreeVector &localPoint)=0
 
virtual G4double ComputeStep (const G4ThreeVector &localPoint, const G4ThreeVector &localDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo)=0
 
virtual G4double ComputeSafety (const G4ThreeVector &globalpoint, const G4NavigationHistory &history, const G4double pMaxLength=DBL_MAX)=0
 
virtual void RelocateWithinVolume (G4VPhysicalVolume *, const G4ThreeVector &)
 
virtual G4int GetVerboseLevel () const
 
virtual void SetVerboseLevel (G4int level)
 
void CheckMode (G4bool mode)
 

Protected Attributes

G4int fVerbose = 0
 
G4bool fCheck = false
 

Detailed Description

G4VNavigation class holds the common navigation interface for all geometry navigator types.

Definition at line 48 of file G4VNavigation.hh.

Constructor & Destructor Documentation

◆ ~G4VNavigation()

virtual G4VNavigation::~G4VNavigation ( )
inlinevirtual

Virtual Destructor.

Definition at line 52 of file G4VNavigation.hh.

52{}

Member Function Documentation

◆ CheckMode()

void G4VNavigation::CheckMode ( G4bool mode)
inline

Set check mode. When enabled, forces navigator to run in "check mode", hence using additional verifications and stricter condictions for ensuring correctness. Effective only when G4VERBOSE is enabled.

Definition at line 144 of file G4VNavigation.hh.

144{ fCheck = mode; }

◆ ComputeSafety()

virtual G4double G4VNavigation::ComputeSafety ( const G4ThreeVector & globalpoint,
const G4NavigationHistory & history,
const G4double pMaxLength = DBL_MAX )
pure virtual

Compute the distance to the closest surface.

Parameters
[in]globalPointGlobal point.
[in]historyNavigation history.
[in]pMaxLengthMaximum step length beyond which volumes need not be checked.
Returns
Length from current point to closest surface.

Implemented in G4NormalNavigation, G4ParameterisedNavigation, G4RegularNavigation, and G4VoxelNavigation.

Referenced by G4SafetyCalculator::SafetyInCurrentVolume().

◆ ComputeStep()

virtual G4double G4VNavigation::ComputeStep ( const G4ThreeVector & localPoint,
const G4ThreeVector & localDirection,
const G4double currentProposedStepLength,
G4double & newSafety,
G4NavigationHistory & history,
G4bool & validExitNormal,
G4ThreeVector & exitNormal,
G4bool & exiting,
G4bool & entering,
G4VPhysicalVolume ** pBlockedPhysical,
G4int & blockedReplicaNo )
pure virtual

Compute the length of a step to the next boundary. Do not test against pBlockedPhysical. Identify the next candidate volume (if a daughter of current volume), and return it in pBlockedPhysical, blockedReplicaNo.

Parameters
[in]localPointLocal point
[in]localDirectionPointer to local direction or null pointer.
[in]currentProposedStepLengthCurrent proposed step length.
[in,out]newSafetyNew safety.
[in,out]historyNavigation history.
[in,out]validExitNormalFlag to indicate whether exit normal is valid or not.
[in,out]exitNormalExit normal.
[in,out]enteringFlag to indicate whether we are entering a volume.
[in,out]exitingFlag to indicate whether we are exiting a volume.
[in,out]pBlockedPhysicalBlocked physical volume that should be ignored in queries.
[in,out]blockedReplicaNoCopy number for blocked replica volumes.
Returns
Length from current point to next boundary surface along localDirection.

Implemented in G4NormalNavigation, G4ParameterisedNavigation, G4RegularNavigation, and G4VoxelNavigation.

Referenced by G4Navigator::ComputeStep().

◆ GetVerboseLevel()

virtual G4int G4VNavigation::GetVerboseLevel ( ) const
inlinevirtual

Get current verbosity level

Reimplemented in G4NormalNavigation, and G4VoxelNavigation.

Definition at line 133 of file G4VNavigation.hh.

133{ return fVerbose; }

◆ LevelLocate()

virtual G4bool G4VNavigation::LevelLocate ( G4NavigationHistory & history,
const G4VPhysicalVolume * blockedVol,
const G4int blockedNum,
const G4ThreeVector & globalPoint,
const G4ThreeVector * globalDirection,
const G4bool pLocatedOnEdge,
G4ThreeVector & localPoint )
pure virtual

Search positioned volumes in mother at current top level of history for volume containing globalPoint. Do not test against blockedVol. If a containing volume is found, push it onto navigation history state.

Parameters
[in,out]historyNavigation history.
[in,out]blockedVolBlocked volume that should be ignored in queries.
[in,out]blockedNumCopy number for blocked replica volumes.
[in,out]globalPointGlobal point
[in,out]globalDirectionPointer to global direction or null pointer.
[in,out]localPoint= global point in local system on entry, point in new system on exit.
Returns
Whether a containing volume has been found.

Implemented in G4NormalNavigation, G4ParameterisedNavigation, G4RegularNavigation, and G4VoxelNavigation.

Referenced by G4Navigator::LocateGlobalPointAndSetup().

◆ RelocateWithinVolume()

virtual void G4VNavigation::RelocateWithinVolume ( G4VPhysicalVolume * ,
const G4ThreeVector &  )
inlinevirtual

Update internal navigation state to take into account that location has been moved, but remains within the motherPhysical volume.

Parameters
[in]motherPhysicalCurrent physical volume.
[in]localPointLocal point.

Reimplemented in G4ParameterisedNavigation, G4VExternalNavigation, and G4VoxelNavigation.

Definition at line 126 of file G4VNavigation.hh.

128 {
129 /* do nothing by default */
130 }

◆ SetVerboseLevel()

virtual void G4VNavigation::SetVerboseLevel ( G4int level)
inlinevirtual

Set current verbosity level

Reimplemented in G4NormalNavigation, and G4VoxelNavigation.

Definition at line 136 of file G4VNavigation.hh.

136{ fVerbose = level; }

Member Data Documentation

◆ fCheck

◆ fVerbose

G4int G4VNavigation::fVerbose = 0
protected

Definition at line 147 of file G4VNavigation.hh.

Referenced by GetVerboseLevel(), and SetVerboseLevel().


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