From 852fbc1728782c876d1dafa92a5689b99abef958 Mon Sep 17 00:00:00 2001 From: Markus Frank <markus.frank@cern.ch> Date: Tue, 8 Apr 2014 12:44:18 +0000 Subject: [PATCH] Remove dependency from G4Assembly.hh, which is not necessary. --- DDG4/src/Geant4Converter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DDG4/src/Geant4Converter.cpp b/DDG4/src/Geant4Converter.cpp index 7db13e4ee..d0a15f295 100644 --- a/DDG4/src/Geant4Converter.cpp +++ b/DDG4/src/Geant4Converter.cpp @@ -47,7 +47,6 @@ #include "G4Element.hh" #include "G4SDManager.hh" -#include "G4Assembly.hh" #include "G4Box.hh" #include "G4Trd.hh" #include "G4Tubs.hh" @@ -302,7 +301,10 @@ void* Geant4Converter::handleSolid(const string& name, const TGeoShape* shape) c return solid; } else if (shape->IsA() == TGeoShapeAssembly::Class()) { - solid = (G4VSolid*) new G4Assembly(); + // Assemblies have no corresponding 'shape' in Geant4. Ignore the shape translation. + // It does not harm, since this 'shape' is never accessed afterwards. + data().g4Solids[shape] = solid; + return solid; } else if (shape->IsA() == TGeoBBox::Class()) { const TGeoBBox* s = (const TGeoBBox*) shape; -- GitLab