Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Physics/NuclearState/NuclearModelMap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down