GDML/ROOT - how to delete geometries from a GDML?

I am attempting a few things involving a ready-made GDML file, I have a few questions:

Firstly, is it possible to convert the GDML into a .root file which could then be read by the TGeoManager->Import functionality? And secondly, can I remove geometries from the GDML once made and re-save the stripped geometry as a GDML? In this second question I am not wanting to just “turn off” visibility I would like the nodes to actually be deleted.

Thank you for any information.

_ROOT Version: 6.22
Platform: Not Provided
Compiler: Not Provided


You can use:

TGeoManager::Import(“geometry.gdml”);
gGeoManager->Export(“geometry.root”);
TGeoManager::Import(“geometry.root”);

Yes, you can alter the gdml file if you know what you are doing (changes need to be consistent) - the parser will generally tell you if you do mistakes.

1 Like

Hi, Can you give me an example of how to delete a volume from the GDML? i am trying but it doesnt seem to be working

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.