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

#include <G4MCCIndexConversionTable.hh>

Public Member Functions

 G4MCCIndexConversionTable ()
 
virtual ~G4MCCIndexConversionTable ()
 
void Reset (std::size_t size)
 
G4bool IsUsed (std::size_t index) const
 
void SetNewIndex (std::size_t index, std::size_t new_value)
 
G4int GetIndex (std::size_t index) const
 
std::size_t size () const
 

Protected Attributes

std::vector< G4intvecNewIndex
 

Detailed Description

Definition at line 45 of file G4MCCIndexConversionTable.hh.

Constructor & Destructor Documentation

◆ G4MCCIndexConversionTable()

G4MCCIndexConversionTable::G4MCCIndexConversionTable ( )

Definition at line 34 of file G4MCCIndexConversionTable.cc.

35{
36}

◆ ~G4MCCIndexConversionTable()

G4MCCIndexConversionTable::~G4MCCIndexConversionTable ( )
virtual

Definition at line 39 of file G4MCCIndexConversionTable.cc.

40{
41 vecNewIndex.clear();
42}

Member Function Documentation

◆ GetIndex()

G4int G4MCCIndexConversionTable::GetIndex ( std::size_t  index) const
inline

Definition at line 103 of file G4MCCIndexConversionTable.hh.

104{
105 if (index >= vecNewIndex.size()) return -1;
106
107 // get the index in the current production cut table
108 // for the indicated MCC in the file
109 return (vecNewIndex[index]);
110}

Referenced by G4ProductionCutsTable::RetrieveCutsInfo(), and G4PhysicsTableHelper::RetrievePhysicsTable().

◆ IsUsed()

G4bool G4MCCIndexConversionTable::IsUsed ( std::size_t  index) const
inline

Definition at line 82 of file G4MCCIndexConversionTable.hh.

83{
84 if (index >= vecNewIndex.size()) return false;
85
86 // returns 'true' if the indicated MCC in the file
87 // is used in the current production cut table
88 return (vecNewIndex[index] >= 0);
89}

Referenced by G4ProductionCutsTable::RetrieveCutsInfo(), and G4PhysicsTableHelper::RetrievePhysicsTable().

◆ Reset()

void G4MCCIndexConversionTable::Reset ( std::size_t  size)

Definition at line 45 of file G4MCCIndexConversionTable.cc.

46{
47 // reset conversion table
48 vecNewIndex.clear();
49 vecNewIndex.resize(siz, -1);
50}

Referenced by G4ProductionCutsTable::CheckMaterialCutsCoupleInfo().

◆ SetNewIndex()

void G4MCCIndexConversionTable::SetNewIndex ( std::size_t  index,
std::size_t  new_value 
)
inline

Definition at line 92 of file G4MCCIndexConversionTable.hh.

94{
95 if (index >= vecNewIndex.size()) return;
96
97 // set the index in the current production cut table
98 // for the indicated MCC in the file
99 vecNewIndex[index]=G4int(new_value);
100}
int G4int
Definition: G4Types.hh:85

Referenced by G4ProductionCutsTable::CheckMaterialCutsCoupleInfo().

◆ size()

std::size_t G4MCCIndexConversionTable::size ( ) const
inline

Member Data Documentation

◆ vecNewIndex

std::vector<G4int> G4MCCIndexConversionTable::vecNewIndex
protected

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