Skip to content
Snippets Groups Projects
Commit 2b88c3f3 authored by Justin Chiu's avatar Justin Chiu
Browse files

G4AtlasMTRunManager: initialize geometry before setting smartlessness.

If the detector geometry service is not initialized before retrieving
the logical volume store, the setting of the smartlessness will fail
silently. This commit moves the initialization beforehand. The new order
mirrors the order of the serial version, G4AtlasRunManager. If the
smartlessness is not set, Geant4's default value is used. This results
in a different voxelization, which was the cause of the safety
calculation discrepancy between serial and MT reported in ATLASSIM-3630.
parent 30288b89
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment