Problem 2141 - GDML doesn't work when an <assembly> nested inside another <assembly>
Summary: GDML doesn't work when an <assembly> nested inside another <assembly>
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: persistency/gdml (show other problems)
Version: 10.5
Hardware: All Linux
: P4 minor
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2019-03-01 09:56 CET by Binbin Qi
Modified: 2019-03-04 15:48 CET (History)
0 users

See Also:


Attachments
A GDML file for Nested assembly example. (3.94 KB, text/plain)
2019-03-01 09:56 CET, Binbin Qi
Details

Note You need to log in before you can comment on or make changes to this problem.
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.