<Materials> section in GDML file

Does Geant4 only support predefined materials. I have users of my FreeCAD GDML workbench stating they have to delete the whole materials section of the GDML file by hand.

If the user has used/selected any Geant4 material it will not appear in the materials section. The materials section only contains definitions that would not be the standard ones.

Just received an email stating

In geant4, there is a example which load gdml file

Cf. geant4.11.00.b01/geant4.11.00.b01/examples/extended/persistency/gdml/G01

I have just tested it and It works well!

./load_gdml file.gdml

I am confused.

Geant4 (the code) certainly supports both predefined materials (through the G4NistManager) as well as building your own materials by instantating G4Element and G4Material objects.

The GDML interface should support both (e.g., if you reference G4_Cu material, it should pull that from G4NistManager, or if you define your own copper with its own name in the <material> section, that should also work.

Thanks - Okay Programmer error, I found a bug in the output of Non predefined Geant4 material, hopefully now fixed.

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