GDML Modules Help

I’m trying to write a GDML geometry using the option to insert other GDML files in mother volumes. However, the documentation (page 39 - http://lcgapp.cern.ch/project/simu/framework/GDML/doc/GDMLmanual.pdf ) isn’t very clear about what you can include in the child file–can you only have one volume in the file, and is that logical or physical? Or can you have a full geometry with several volumes made of different materials? I’ve tried doing the latter, but am just having my Geant4 application crash without any helpful error messages.

1 Like

Is it possible for you to share the GDML file? Anyways I generally use the attached format for a similar purpose.

Can you provide more info on how you are importing?

Thanks!

I was trying to import as shown in the bottom of the image, where ccd.gdml is a self-contained file with several volumes made of different materials. Should I instead be making different GDML files for each volume?

In your example, how are you importing those volumes? Are they located in separate files, and if so could you give an example of the format of one of those child files?

You can have multiple volumes within the child volume. I agree that sometimes the crashes are not very helpful.

I would check first that the issue is the child file by removing it and just using one gdml file, no child files.

If it runs fine with no child files then at least you know where the issue is. Each gdml file needs to have a ‘World’ volume that is logical (not physical). In the parent gdml file you call the child file as a physical volume. In the child gdml document the world volume should have the same name as the file.

e.g:
Inside the parent document:
parent

and inside the child document called Child.gdml
child

Note that the call to the child file in the parent is a relative path from the executable, not from the the location of the gdml.

I hope this helps

2 Likes

Hi My GDML format has many volumes, and I import these all as a single GDML file. I put this combined GDML geometry in a hard-coded C++ based volume. Further please check the path of the files ‘ccd.gdml’ etc, they should be where your executable is.

My humble suggestion is to try importing a simple geometry i.e. only “detector” and then one by one add complexity to corner out the lines which are causing the fault.

Cheers!