Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4RegularNavigationHelper Class Reference

G4RegularNavigationHelper is a singleton utility class for navigation on regular structures, providing step lengths counting for each regular voxel of the structure. More...

#include <G4RegularNavigationHelper.hh>

Public Member Functions

 ~G4RegularNavigationHelper ()=default
void ClearStepLengths ()
void AddStepLength (G4int copyNo, G4double slen)
const std::vector< std::pair< G4int, G4double > > & GetStepLengths ()

Static Public Member Functions

static G4RegularNavigationHelperInstance ()

Friends

class G4ThreadLocalSingleton< G4RegularNavigationHelper >

Detailed Description

G4RegularNavigationHelper is a singleton utility class for navigation on regular structures, providing step lengths counting for each regular voxel of the structure.

Definition at line 52 of file G4RegularNavigationHelper.hh.

Constructor & Destructor Documentation

◆ ~G4RegularNavigationHelper()

G4RegularNavigationHelper::~G4RegularNavigationHelper ( )
default

Default Destructor.

Member Function Documentation

◆ AddStepLength()

void G4RegularNavigationHelper::AddStepLength ( G4int copyNo,
G4double slen )

Stores step in container, associated to given voxel.

Parameters
[in]copyNoVoxel number.
[in]slenValue of step length to store.

Definition at line 48 of file G4RegularNavigationHelper.cc.

49{
50 theStepLengths.emplace_back(copyNo,slen );
51}

Referenced by G4RegularNavigation::ComputeStepSkippingEqualMaterials().

◆ ClearStepLengths()

void G4RegularNavigationHelper::ClearStepLengths ( )

Resets the state.

Definition at line 41 of file G4RegularNavigationHelper.cc.

42{
43 theStepLengths.clear();
44}

Referenced by G4RegularNavigation::ComputeStepSkippingEqualMaterials().

◆ GetStepLengths()

const std::vector< std::pair< G4int, G4double > > & G4RegularNavigationHelper::GetStepLengths ( )

Returns the collection of stored steps per voxels.

Definition at line 56 of file G4RegularNavigationHelper.cc.

57{
58 return theStepLengths;
59}

Referenced by G4EnergySplitter::GetFirstVoxelID(), G4EnergySplitter::GetLastVoxelID(), G4EnergySplitter::GetVoxelID(), and G4EnergySplitter::SplitEnergyInVolumes().

◆ Instance()

◆ G4ThreadLocalSingleton< G4RegularNavigationHelper >

Definition at line 1 of file G4RegularNavigationHelper.hh.


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