234 bool allKnown =
false;
246 size_t nb = availBases.size();
247 for (
size_t ib=0; ib<nb; ++ib) {
248 const G4String& testBase = availBases[ib];
249 size_t ipos = workingName.find(testBase);
251 if ( testBase.size() > plBase.size() ) {
254 if ( verb > 3 ) {
G4cout <<
" physlist current best guess: " << testBase <<
G4endl; }
256 if ( verb > 3 ) {
G4cout <<
" physlist match but shorter: " << testBase <<
G4endl; }
259 if ( verb > 3 ) {
G4cout <<
" physlist reject: " << testBase <<
G4endl; }
263 G4cout <<
" physlist " << name <<
", base known " << allKnown
264 <<
" chosen plBase \"" << plBase <<
"\"" <<
G4endl;
272 workingName.erase(0,plBase.size());
277 size_t ne = availExtras.size();
278 while ( ! workingName.empty() ) {
279 char c = workingName.
data()[0];
280 if (
'_' == c ||
'+' == c ) workingName.erase(0,1);
281 G4int replaceExtra = ( c !=
'+' );
283 G4bool extraKnown =
false;
284 for (
size_t ie=0; ie<ne; ++ie) {
285 const G4String& testExtra = availExtras[ie];
286 size_t ipos = workingName.find(testExtra);
288 if ( testExtra.size() > extraName.size() ) {
289 extraName = testExtra;
293 G4cout <<
" physextra current best guess: "
298 G4cout <<
" physextra match but shorter: "
313 G4cout <<
" physextra " << name <<
" [" << workingName <<
"]"
314 <<
", extra known " << extraKnown
315 <<
" chosen extra \"" << extraName <<
"\""
316 <<
" replace " << replaceExtra <<
G4endl;
322 std::map<G4String,G4String>::const_iterator itr =
323 physicsExtensions.find(extraName);
325 if ( itr != physicsExtensions.end() ) pcname = itr->second;
329 G4cout <<
" extraName \"" << extraName <<
"\" maps to physics ctor \""
330 << pcname <<
"\" which is itself realknown " << realknown
334 if ( ! realknown ) allKnown =
false;
335 physExt.push_back(extraName);
336 replace.push_back(replaceExtra);
338 workingName.erase(0,extraName.size());
342 G4cout <<
" workingName \"" << workingName <<
"\""
343 <<
" couldn't be found in the extensions list"
G4bool IsKnownPhysicsConstructor(const G4String &name)
G4GLOB_DLL std::ostream G4cout
const char * data() const
static G4PhysicsConstructorRegistry * Instance()
const std::vector< G4String > & AvailablePhysicsExtensions() const
const std::vector< G4String > & AvailablePhysLists() const