86 char* path = getenv(
"PHYSLIST");
91 G4cout <<
"### G4PhysListFactorySingleton WARNING: " 92 <<
" environment variable PHYSLIST is not defined" 94 <<
" Default Physics Lists " << name
101 G4VModularPhysicsList*
104 G4VModularPhysicsList* p = 0;
138 std::vector<G4String> physicsReplacements;
152 G4cout <<
"### G4PhysListFactorySingleton WARNING: " 153 <<
"PhysicsList " << nameNoReplace
154 <<
"(originally=\"" << name <<
"\")" 157 }
else if ( physicsReplacements.size() != 0 ) {
163 for (
size_t k=0; k<physicsReplacements.size(); ++k) {
164 G4String procName = physicsReplacements[k];
166 G4cout <<
"### G4PhysListFactorySingleton WARNING: " 167 <<
"G4PhysicsProcesFactorySingleton had no process \"" 168 << procName <<
"\" registered" << G4endl;
170 G4cout <<
"### G4PhysListFactorySingleton: ReplacePhysics(" 171 << procName <<
")" << G4endl;
173 p->ReplacePhysics(pctor);
184 std::vector<G4String> physicsReplacements;
191 const std::vector<G4String>&
209 G4cout <<
"G4VModularPhysicsLists in " 210 <<
"G4PhysicsProcessFactorySingleton are: " 212 if ( list.empty() ) G4cout <<
" ... no registered lists" << G4endl;
214 for (
size_t indx=0; indx < list.size(); ++indx ) {
215 G4cout <<
" [" << std::setw(2) << indx <<
"] " 216 <<
"\"" << list[indx] <<
"\"" << G4endl;
219 G4cout <<
"G4PhysicsProcessFactorySingleton supports variants of the above" 220 << G4endl <<
"with physics process replacements:" << G4endl;
222 G4cout <<
" ... no registered replacements" << G4endl;
224 G4bool printPhysicsProcesses =
false;
233 if ( ! known ) printPhysicsProcesses =
true;
234 G4cout <<
" " << std::setw(10) << key <<
" ==> " 235 << std::setw(30) << procName <<
" " 236 << ( (known)?
"known":
"*** unknown ***" ) << G4endl;
261 std::vector<G4String>& physicsReplace,
266 physicsReplace.clear();
273 size_t i = nameNoReplace.find(key);
274 if ( i != std::string::npos ) {
276 nameNoReplace.erase(i,key.size());
280 physicsReplace.push_back(procName);
282 G4cout <<
"G4PhysListFactorySingleton::GetBaseName " 283 <<
"\"" << key <<
"\" ==> \"" << procName <<
"\" not found" 295 return nameNoReplace;
static G4PhysListFactorySingleton * fgTheInstance
std::map< G4String, PhysListCtorFuncPtr_t > fFunctionMap
std::map< G4String, G4String > fPhysicsReplaceList
G4String GetBaseName(G4String name, std::vector< G4String > &physicsReplacements, G4bool &allKnown)
const std::vector< G4String > & AvailablePhysLists() const
G4VModularPhysicsList *(* PhysListCtorFuncPtr_t)()
std::vector< G4String > listnames
static G4PhysicsProcessFactorySingleton & Instance()
G4bool RegisterPhysicsReplacement(G4String key, G4String physics)
G4PhysListFactorySingleton()
G4bool IsKnownPhysicsProcess(const G4String &)
virtual ~G4PhysListFactorySingleton()
G4bool IsReferencePhysList(const G4String &)
G4bool RegisterCreator(G4String name, PhysListCtorFuncPtr_t ctorptr, G4bool *ptr)
G4VPhysicsConstructor * GetPhysicsProcess(const G4String &)
void PrintAvailablePhysLists() const
static G4PhysListFactorySingleton & Instance()
G4VModularPhysicsList * ReferencePhysList()
G4VModularPhysicsList * GetReferencePhysList(const G4String &)
void PrintAvailablePhysicsProcesses() const
std::map< G4String, G4bool * > fBoolPtrMap