#include <G4PhysicsTableHelper.hh>
Definition at line 52 of file G4PhysicsTableHelper.hh.
◆ G4PhysicsTableHelper() [1/2]
G4PhysicsTableHelper::G4PhysicsTableHelper |
( |
| ) |
|
|
protected |
◆ ~G4PhysicsTableHelper()
G4PhysicsTableHelper::~G4PhysicsTableHelper |
( |
| ) |
|
|
protected |
◆ G4PhysicsTableHelper() [2/2]
◆ GetVerboseLevel()
G4int G4PhysicsTableHelper::GetVerboseLevel |
( |
| ) |
|
|
inlinestatic |
◆ operator=()
◆ PreparePhysicsTable()
Definition at line 64 of file G4PhysicsTableHelper.cc.
65{
68
69 if ( physTable !=0) {
70
71 if ( physTable->size() < numberOfMCC) {
72
74#ifdef G4VERBOSE
76 G4cerr <<
"G4PhysicsTableHelper::PreparePhysicsTable ";
77 G4cerr <<
"Physics Table "<< physTable ;
79 }
80#endif
81 } else if ( physTable->size() > numberOfMCC){
82
83
84 physTable->
resize(numberOfMCC);
85#ifdef G4VERBOSE
87 G4cerr <<
"G4PhysicsTableHelper::PreparePhysicsTable ";
88 G4cerr <<
"Physics Table "<< physTable ;
89 G4cerr <<
" is longer than number of material-cuts-couple " <<
G4endl;
90 }
91#endif
92 G4Exception(
"G4PhysicsTableHelper::PreparePhysicsTable()",
94 "Physics Table is inconsistent with material-cuts-couple");
95 }
96 } else {
97
99 if (physTable!=0) {
101 } else {
102 G4Exception(
"G4PhysicsTableHelper::PreparePhysicsTable()",
104 "Can't create Physics Table");
105 }
106 }
107
108#ifdef G4VERBOSE
110 if ( physTable !=0) {
111 G4cerr <<
"Physics Table size "<< physTable->size();
112 } else {
113 G4cerr <<
"Physics Table does not exist ";
114 }
115 G4cerr <<
": number of material-cuts-couple " << numberOfMCC <<
G4endl;
116 }
117#endif
118
119
121
122 for (size_t idx = 0; idx <numberOfMCC; idx +=1){
124
125
127
128
130 }
131
132 return physTable;
133}
G4DLLIMPORT std::ostream G4cerr
G4bool IsRecalcNeeded() const
void resize(size_t, G4PhysicsVector *vec=(G4PhysicsVector *)(0))
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Referenced by G4VEnergyLossProcess::BuildDEDXTable(), G4LossTableBuilder::BuildTableForModel(), G4eplusPolarizedAnnihilation::PreparePhysicsTable(), G4PolarizedCompton::PreparePhysicsTable(), G4VEmProcess::PreparePhysicsTable(), and G4VEnergyLossProcess::PreparePhysicsTable().
◆ RetrievePhysicsTable()
Definition at line 137 of file G4PhysicsTableHelper.cc.
140{
141 if (physTable == 0) return false;
142
143
146#ifdef G4VERBOSE
148 G4cerr <<
"G4PhysicsTableHelper::RetrievePhysicsTable ";
149 G4cerr <<
"Fail to retreive from "<< fileName <<
G4endl;
150 }
151#endif
152 G4Exception(
"G4ProductionCutsTable::RetrievePhysicsTable()",
153 "ProcCuts105",
154 JustWarning,
"Can not retrieve physics tables from file");
155 delete tempTable;
156 return false;
157 }
158
161
162
163 if ( tempTable->size() != converter->
size()){
164#ifdef G4VERBOSE
166 G4cerr <<
"G4PhysicsTableHelper::RetrievePhysicsTable ";
167 G4cerr <<
"Size of the physics table in "<< fileName;
168 G4cerr <<
"( size =" << tempTable->size() <<
")";
169 G4cerr <<
" is inconsistent with material-cut info";
170 G4cerr <<
"( size =" << converter->
size() <<
")";
172 }
173#endif
174 G4Exception(
"G4ProductionCutsTable::RetrievePhysicsTable()",
175 "ProcCuts106",
176 JustWarning,
"Retrived file is inconsistent with current physics tables ");
177 delete tempTable;
178 return false;
179 }
180
181
182 for (
size_t idx=0; idx<converter->
size(); idx++){
183 if (converter->
IsUsed(idx)){
184 if (converter->
GetIndex(idx)<0)
continue;
185 size_t i = converter->
GetIndex(idx);
187 if (vec !=0 ) delete vec;
188 (*physTable)[i] = (*tempTable)[idx];
190 }
191 }
192 tempTable->clear();
193 delete tempTable;
194
195 return true;
196}
G4int GetIndex(size_t index) const
G4bool IsUsed(size_t index) const
G4bool RetrievePhysicsTable(const G4String &filename, G4bool ascii=false)
const G4MCCIndexConversionTable * GetMCCIndexConversionTable() const
Referenced by G4VEmProcess::RetrievePhysicsTable().
◆ SetPhysicsVector()
◆ SetVerboseLevel()
void G4PhysicsTableHelper::SetVerboseLevel |
( |
G4int |
value | ) |
|
|
inlinestatic |
◆ verboseLevel
G4int G4PhysicsTableHelper::verboseLevel = 1 |
|
staticprotected |
The documentation for this class was generated from the following files: