Importing ASCII Text Models
Since release 9.2 of Geant4, it is also possible to import geometry setups
based on a plain text description, according to a well defined syntax for
identifying the different geometrical entities (solids, volumes, materials
and volume attributes) with associated parameters.
An example showing how to define a geometry in plain text format and import
it in a Geant4 application is shown in
examples/extended/persistency/P03. The example also covers
the case of associating a sensitive detector to one of the volumes defined
in the text geometry, the case of mixing C++ and text geometry definitions
and the case of defining new tags in the text format so that regions and
cuts by region can be defined in the text file. It also provides an example
of how to write a geometry text file from the in-memory Geant4 geometry.
For the details on the format see the dedicated
manual.