The General Geometry Description (GGD) is a software system to generate a description of a constructive solid geometry specifically as used by Geant4 or ROOT applications are as represented in GDML files. It is implemented as a pure Python module gegede
.
The core of GeGeDe relies on Pint to enforce the consistent use of units.
Additional functionality, particularly with regards to export, is provided by other modules:
- GDML
- requires lxml for emitting XML for GDML
- ROOT
- for ROOT-based tests and direct ROOT export, PyROOT is needed
For running the tests nose is useful.
GGD is designed along layers each of which allows the user-programmer access.
- params
- high level, human-centric configuration mechanism
- builders
- structured, procedural geometry constructor code
- objects
- the in-memory representation of the final geometry
- export
- conversion to formats suitable to exchange the data with other applications.
At the highest level is a simple configuration language for end-user setting of parameters that are consumed by the next layer, the builders. The builders are instances of classes which are responsible for constructing some portion of an overall geometry. They may also manage some number of other (sub)builders to handle specific construction details. The geometry is constructed by building an in-memory representation of general geometry objects. Finally these objects may be exported into a number of forms including GDML, “plain old (Python) data” and JSON. Each layer provides for extension to novel uses.
Each layer contains a tutorial:
See also the GeGeDe Example project.
T.B.D.
GGD can be installed in the usual “Python way”:
$ python setup.py install
More info in the installation document.