Problem 2141

Summary: GDML doesn't work when an <assembly> nested inside another <assembly>
Product: Geant4 Reporter: Binbin Qi <qbb180>
Component: persistency/gdmlAssignee: Gabriele Cosmo <Gabriele.Cosmo>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P4    
Version: 10.5   
Hardware: All   
OS: Linux   
Attachments: A GDML file for Nested assembly example.

Description Binbin Qi 2019-03-01 09:56:42 CET
Created attachment 547 [details]
A GDML file for Nested assembly example.

an <assembly> nested inside another <assembly> is not working the way I expected. Specifically, the inner assembly is not rendered in the VRML output file. 

A suggested fix as show bellow (in G4GDMLReadStructure::PhysvolRead() ):

   374    if (pAssembly)   // Fill assembly structure
   375    {
   376      if(assembly)                                       //Add this
   377      pAssembly->AddPlacedAssembly(assembly,transform);  //code
   378      if (!logvol) { return; }
   379      pAssembly->AddPlacedVolume(logvol, transform);
   380    }

In geant4-10.04, I have verified that this method works. In geant4-10.05, it is also feasible, but it is possible to encounter another problem ( https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2140) I reported.
Comment 1 Gabriele Cosmo 2019-03-04 15:48:38 CET
Thanks for the suggested patch. The fix is now included in our development and will be available in the next patch release.