Import Geant4 11.0.2 source tree

This commit is contained in:
Gabriele Cosmo
2022-05-25 15:50:57 +02:00
parent de4f28d823
commit b3bf75a2a1
341 changed files with 93127 additions and 39343 deletions
@@ -220,11 +220,12 @@ void G4PhysicalVolumeStore::DeRegister(G4VPhysicalVolume* pVolume)
}
// ***************************************************************************
// Retrieve the first volume pointer in the container having that name
// Retrieve the first or last volume pointer in the container having that name
// ***************************************************************************
//
G4VPhysicalVolume*
G4PhysicalVolumeStore::GetVolume(const G4String& name, G4bool verbose) const
G4PhysicalVolumeStore::GetVolume(const G4String& name, G4bool verbose,
G4bool reverseSearch) const
{
G4PhysicalVolumeStore* store = GetInstance();
if (!store->mvalid) { store->UpdateMap(); }
@@ -240,7 +241,14 @@ G4PhysicalVolumeStore::GetVolume(const G4String& name, G4bool verbose) const
G4Exception("G4PhysicalVolumeStore::GetVolume()",
"GeomMgt1001", JustWarning, message);
}
return pos->second[0];
if(reverseSearch)
{
return pos->second[pos->second.size()-1];
}
else
{
return pos->second[0];
}
}
if (verbose)
{