Overview Contents Previous Next Geant4 User's Guide
For Application Developers
Geometry


4.1.9 A Simple Geometry Editor

GGE is the Geant4 Graphical Geometry Editor. It is implemented in JAVA and is part of the Momo environment. GGE aims to serve physicists who have a little knowledge of C++ and the Geant4 toolkit to construct his or her own detector geometry in a graphical manner.

GGE provides methods to:

  1. construct a detector geometry including G4Element, G4Material, G4Solids, G4LogicalVolume, G4PVPlacement, etc.
  2. view the detector geometry using existing visualization system like DAWN
  3. keep the detector object in a persistent way
  4. produce corresponding C++ codes after the norm of Geant4 toolkit
  5. make a Geant4 executable under adequate environment
GGE is implemented with Java, using Java Foundation Class, Swing-1.0.2. In essence, GGE is made a set of tables which contain all relevant parameters to construct a simple detector geometry.
The software, installation instructions and notes for GGE and other JAVA-based UI tools can be freely downloaded from the Geant4 GUI and Environments web site of Naruto University of Education in Japan.

Materials: elements and mixtures

GGE provides the database of elements in a form of the periodic table, which users can use to construct new materials. GGE provides a pre-constructed database of materials taken from the PDG book. They can be loaded, used, edited and saved as persistent objects.

Users can also create new materials either from scratch or by combining other materials.

Solids

The most popular CSG solids (G4Box, G4Tubs, G4Cons, G4Trd) and specific BREPs solids (Pcons, Pgons) are supported at present. All related parameters of such a solid can be specified in a parameter widget.

Users will be able to view each solid using DAWN.

Logical Volume

GGE can specify the following items:

NameSolid Material VisAttribute

The construction and assignment of appropriate entities for G4FieldManager and G4VSensitiveDetector are left to the user.

Physical Volume

A single copy of a physical volume can be created. Also repeated copies can be created in several manners. First, a user can translate the logical volume linearly.

Name LogicalVolume MotherVolume Many X0, Y0, Z0 Direction StepSize Unit CopyNumber

Combined translation and rotation are also possible, placing an object repeatedly on a ``cylindrical'' pattern. Simple models of replicas and parametrised volume are also implemented. In the replicas, a volume is slices to create new sub-volumes. In parametrised volumes, several patterns of volumes can be created.

Generation of C++ code: MyDetectorConstruction.cc

By simply pushing a button, source code in the form of an include file and a source file are created. They are called MyDetectorConstruction.cc and .hh files. They reflect all current user modifications in real-time.

Visualization

Examples of individual solids can be viewed with the help of DAWN. The visualization of the whole geometry is be done after the compilation of the source code MyDetectorConstruction.cc with appropriate parts of Geant4. (In particular only the geometry and visualization, together with the small other parts they depend on, are needed.)


About the authors