Skip to content
Snippets Groups Projects
Commit a1269c4a authored by Andre Sailer's avatar Andre Sailer Committed by MarkusFrankATcernch
Browse files

DDG4 Only create volumemanager if not yet done

parent 54a6af86
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,10 @@ void Geant4DetectorGeometryConstruction::constructGeo(Geant4DetectorConstruction
ctxt->geometry = conv.create(world).detach();
g4map.attach(ctxt->geometry);
G4VPhysicalVolume* w = ctxt->geometry->world();
ctxt->lcdd.apply("DD4hepVolumeManager", 0, 0);
// Create Geant4 volume manager only if not yet available
if ( not g4map.volumeManager().isValid() ) {
ctxt->lcdd.apply("DD4hepVolumeManager", 0, 0);
}
// Create Geant4 volume manager
g4map.volumeManager();
if ( m_dumpHierarchy ) {
......
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