diff --git a/src/Physics/NuclearState/NuclearModelMap.cxx b/src/Physics/NuclearState/NuclearModelMap.cxx index c31e176ab..0dd515e1b 100644 --- a/src/Physics/NuclearState/NuclearModelMap.cxx +++ b/src/Physics/NuclearState/NuclearModelMap.cxx @@ -155,7 +155,9 @@ void NuclearModelMap::LoadConfig(void) for(RgIMap::const_iterator it = entries.begin(); it != entries.end(); ++it){ const std::string& key = it->first; // Does it start with the right string? - if(key.compare(0, keyStart.size(), keyStart.c_str()) == 0){ + // Edit: Protect from descending keys (NuclearModel@Pdg should not descend into subalgs) + if( (key.compare(0, keyStart.size(), keyStart.c_str()) == 0) && + (key.find("/") == std::string::npos) ){ // The rest is the PDG code const int pdg = atoi(key.c_str()+keyStart.size()); const int Z = pdg::IonPdgCodeToZ(pdg);