\processes\hadronic\models\im_r_matrix\G4XNNstarTable.cc const G4PhysicsVector* G4XNNstarTable::CrossSectionTable(const G4String& particleName) const (need break;inside for): G4double* sigmaPointer = 0; for (iter = xMap.begin(); iter != xMap.end(); ++iter) { G4String str = (*iter).first; if (str == particleName) { sigmaPointer = (*iter).second; } } Correct: G4double* sigmaPointer = 0; for (iter = xMap.begin(); iter != xMap.end(); ++iter) { G4String str = (*iter).first; if (str == particleName) { sigmaPointer = (*iter).second; break; } }
Thanks for this report. This is not a bug, the code searches the complete map, while your code would stop on str == particleName. Likely, the code should use map::find().