Metadata-Version: 2.4
Name: gegede
Version: 0.11
Summary: General Geometry Description
Author-email: Brett Viren <brett.viren@gmail.com>
Maintainer-email: Brett Viren <brett.viren@gmail.com>
License-Expression: AGPL-3.0-or-later
Keywords: geometry,schema,generator,geant4,gdml
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: lxml>=5.3.0
Requires-Dist: pdoc>=15.0.1
Requires-Dist: pint>=0.24.4
Provides-Extra: root
Requires-Dist: ROOT; extra == "root"
Provides-Extra: test
Requires-Dist: pytest>=8.3.4; extra == "test"

# What is this?

The General Geometry Description (GGD) is a software system to generate a description of a [constructive solid geometry](http://en.wikipedia.org/wiki/Constructive_solid_geometry) specifically as used by [Geant4](http://geant4.web.cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/Detector/geometry.html) or [ROOT](http://root.cern.ch/root/html534/guides/users-guide/Geometry.html) applications are as represented in [GDML](http://cern.ch/gdml) files. It is implemented as a pure Python module `gegede`.


# Install

GeGeDe is effectively now Python 3 only and can be installed in any of the "usual" ways. In short:

```
uv tool install git+https://github.com/brettviren/gegede
```

See the [installation](./doc/install.md) document for details.


# How do I use it?

GGD is designed along layers each of which allows the user-programmer access.

![img](highlevel.png)

-   **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.


# Tutorial

Each layer contains a tutorial:

-   [Configuration](./doc/configuration.md)
-   [Builders](./doc/builders.md)
-   [Construction](./doc/construction.md)
-   [Exporting](./doc/exporting.md)

See also the [GeGeDe Example](https://github.com/brettviren/gegede-example) project.


# Reference

T.B.D.


# GeGeDe Users

-   [DUNE GGD](https://github.com/DUNE/duneggd) geometries for DUNE (far) detectors.
-   [DUNE ND GGD](https://github.com/DUNE/dunendggd) geometries for (some) DUNE near detectors
-   [GeGeDe Examples](https://github.com/brettviren/gegede-example)
