GEMC and ROOT TGeo¶
GEMC geometry to ROOT¶
The geometry loaded in GEMC can be exported to a root file into TGeo objects.
Using the GUI, first save it to the GDML format by clicking the “to gdml” button:

Then inside root you can [1], [2]:
load it:
TGeoManager *geom = TGeoManager::Import("root.gdml")
visualize it:
geom->GetTopVolume()->Draw("ogl")
save it to a ROOT file:
TFile f("geo.root", "RECREATE") geom->Write()
You can then use various ROOT tools to navigate it, for example a TBrowser or the TGeoManager.
Footnotes