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:
construct a detector geometry including G4Element,
G4Material, G4Solids,
G4LogicalVolume,
G4PVPlacement, etc.
view the detector geometry using existing visualization system like DAWN
keep the detector object in a persistent way
produce corresponding C++ codes after the norm of Geant4 toolkit
make a Geant4 executable under adequate environment
GGE is implemented with Java, using Java Foundation Class,
Swing and is part of Java MOMO Framework. 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 part of the MOMO Framework can be found in the
Geant4 distribution under the geant4/enviroments/MOMO
directory.
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.
creating a material from scratch:
Use
Name
A
Z
Density
Unit
State
Temperature
Unit
Pressure
Unit
Only the elements and materials used in the logical volumes are
kept in the detector object and are used to generate C++
constructors. Use marks the used materials.
Constructor to create a material from a combination of
elements, subsequently added via AddElement
Use
Name
Elements
Density
Unit
State
Temperature
Unit
Pressure
Unit
By clicking the column Elements, a new
window is open to select one of two methods:
Add an element, giving fraction by weight
Add an element, giving number of atoms.
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:
Name
Solid
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.)