G3toG4
------

G3toG4 is the Geant4 facility to convert Geant3 geometries into Geant4.
This is done in two stages. 

First, the user supplies a Geant3 .rz file containing the initialization
data structures. An executable, rztog4, reads this file and produces an
ascii ("call list") file containing instructions on how to build the
geometry. The source code for this is fortran. 

Second, a call list interpreter (G4BuildGeom.cc) reads these instructions
and builds the geometry in the user's G4 client code. Two examples of how
to use the call list interpreter are supplied in g3tog4/examples. 

The first example, cltog4, is a simple example which simply invokes the
call list interpreter method G4BuildGeom from G3toG4DetectorConstruction
class, builds the geometry and exits. 

The second example, clGeometry, is more complete and is patterned after
the novice G4 examples. It also invokes the call list interpreter, but in
addition, allows the geometry to be visualized and particles to be
tracked. Currently, G3toG4 does not provide a method for scoring hits in
G4.

To build these examples, especially the one involving visualization, the
user must have one or more of the following environment variables set:

setenv G4VIS_BUILD_<driver>_DRIVER
setenv G4VIS_USE_<driver>

where the G4-supported drivers are listed in $(G4BASE)/visualization/README.

To use the freeware Mesa API, you must have the environment variable
OGLHOME defined to point to the directory containing the Mesa lib/ directory
specific to your platform.

Then the user must build the global Geant4 libraries by issuing the
following command from the geant4/source directory: 

gmake global

To compile and build the G3toG4 libraries, simply type

gmake

from the top-level G3toG4 directory. 

To build the converter executable "rztog4", simply type

gmake bin

To build the example executables, simply type:

gmake examples

To make everything, simply type:

gmake all

To remove all G3toG4 libraries, executables and .d files, simply type

gmake clean

 the implementation (April '99)
----------------------------------------
- PGON, PCON are built using the CSG classes G4Polycone and G4Polyhedra.
- G3 MANY feature has not been tested.
- GsROTM is fully implemented and supports rotations and mirror reflections
- GSPOSP implemented via individual logical volumes for each instantiation
  (G4PVIndexed doesn't exist yet)
- GSDV* routines for dividing volumes implemented, using
  G4PVReplicas, G4PVParametrised
- GSROTM is implemented
- hits are not implemented. Hit code is do-nothing. (It is
  coded up, but hit class references are commented out.)
  The digits+hits code has to be updated before G3toG4's
  hit code can be activated.
- GSPART has to be updated.
- Usage of magnetic field class has to be turned on.

See History file for modification history.
