52{
56
57 if ( physTable != nullptr )
58 {
59
60 if ( physTable->size() < numberOfMCC )
61 {
62#ifdef G4VERBOSE
64 {
65 G4cout <<
"G4PhysicsTableHelper::PreparePhysicsTable: "
66 << " the table " << physTable << " size="
67 << physTable->size()
68 <<
" will be is resized to " << numberOfMCC <<
G4endl;
69 }
70#endif
71
72 physTable->
resize(numberOfMCC,
nullptr);
73 }
74 else if ( physTable->size() > numberOfMCC )
75 {
76
77
79 ed << "table " << physTable << " size=" << physTable->size()
80 << " is longer than number of material-cuts-couple " << numberOfMCC;
81 G4Exception(
"G4PhysicsTableHelper::PreparePhysicsTable()",
83 }
84 }
85 else
86 {
87
89 physTable->
resize(numberOfMCC,
nullptr);
90 }
91
92#ifdef G4VERBOSE
94 {
95 G4cout <<
"G4PhysicsTableHelper::PreparePhysicsTable: "
96 << " the table "<< physTable
97 <<
" size=" << numberOfMCC <<
G4endl;
98 }
99#endif
100
101
103
104 for (std::size_t idx = 0; idx <numberOfMCC; ++idx)
105 {
107
108
109
111
112
114 }
115
116 return physTable;
117}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
G4bool IsRecalcNeeded() const
void resize(std::size_t, G4PhysicsVector *vec=nullptr)
void ClearFlag(std::size_t i)
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()