diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasMTRunManager.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasMTRunManager.cxx index fca13ce528b25062907353ead6196a0c1104870e..abb018f478fecea1068eda11ed56c7ea051af0e0 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasMTRunManager.cxx +++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasMTRunManager.cxx @@ -62,6 +62,16 @@ void G4AtlasMTRunManager::InitializeGeometry() { ATH_MSG_INFO("InitializeGeometry"); + // Retrieve detector geo service + if (m_detGeoSvc.retrieve().isFailure()) { + ATH_MSG_ERROR("Could not retrieve the DetectorGeometrySvc"); + G4ExceptionDescription description; + description << "InitializeGeometry: Failed to retrieve IDetectorGeometrySvc."; + G4Exception("G4AtlasMTRunManager", "CouldNotRetrieveDetGeoSvc", + FatalException, description); + abort(); // to keep Coverity happy + } + // Set smartlessness G4LogicalVolumeStore *logicalVolumeStore = G4LogicalVolumeStore::GetInstance(); const G4String muonSys("Muon::MuonSys"); @@ -77,16 +87,6 @@ void G4AtlasMTRunManager::InitializeGeometry() } } - // Retrieve detector geo service - if (m_detGeoSvc.retrieve().isFailure()) { - ATH_MSG_ERROR("Could not retrieve the DetectorGeometrySvc"); - G4ExceptionDescription description; - description << "InitializeGeometry: Failed to retrieve IDetectorGeometrySvc."; - G4Exception("G4AtlasMTRunManager", "CouldNotRetrieveDetGeoSvc", - FatalException, description); - abort(); // to keep Coverity happy - } - // Create/assign detector construction SetUserInitialization( m_detGeoSvc->GetDetectorConstruction() ); if (userDetector) {