diff --git a/DDG4/plugins/Geant4DetectorGeometryConstruction.cpp b/DDG4/plugins/Geant4DetectorGeometryConstruction.cpp index 4645b7ae0f6f0df691e49d4362608b8a59729f8d..2bb8687640f1377fe39b02c7ecd886113197df1a 100644 --- a/DDG4/plugins/Geant4DetectorGeometryConstruction.cpp +++ b/DDG4/plugins/Geant4DetectorGeometryConstruction.cpp @@ -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 ) {