1 | G3toG4 |
---|
2 | ------ |
---|
3 | |
---|
4 | G3toG4 is the Geant4 facility to convert Geant3 geometries into Geant4. |
---|
5 | This is done in two stages. |
---|
6 | |
---|
7 | First, the user supplies a Geant3 .rz file containing the initialization |
---|
8 | data structures. An executable, rztog4, reads this file and produces an |
---|
9 | ascii ("call list") file containing instructions on how to build the |
---|
10 | geometry. The source code for this is fortran. |
---|
11 | |
---|
12 | Second, a call list interpreter (G4BuildGeom.cc) reads these instructions |
---|
13 | and builds the geometry in the user's G4 client code. |
---|
14 | |
---|
15 | Two examples of how to use the call list interpreter are supplied in |
---|
16 | examples/extended/g3tog4: |
---|
17 | - the first example, cltog4, is a simple example which simply invokes the |
---|
18 | call list interpreter method G4BuildGeom from G3toG4DetectorConstruction |
---|
19 | class, builds the geometry and exits. |
---|
20 | - the second example, clGeometry, is more complete and is patterned after |
---|
21 | the novice G4 examples. It also invokes the call list interpreter, but |
---|
22 | in addition, allows the geometry to be visualized and particles to be |
---|
23 | tracked. Currently, G3toG4 does not provide a method for scoring hits |
---|
24 | in G4. |
---|
25 | |
---|
26 | To build these examples, especially the one involving visualization, the |
---|
27 | user must have one or more of the following environment variables set: |
---|
28 | |
---|
29 | setenv G4VIS_BUILD_<driver>_DRIVER |
---|
30 | setenv G4VIS_USE_<driver> |
---|
31 | |
---|
32 | where the G4-supported drivers are listed in source/visualization/README. |
---|
33 | |
---|
34 | To use the freeware Mesa API, you must have the environment variable |
---|
35 | OGLHOME defined to point to the directory containing the Mesa lib/ directory |
---|
36 | specific to your platform. |
---|
37 | |
---|
38 | To compile and build the G3toG4 libraries, simply type |
---|
39 | |
---|
40 | gmake |
---|
41 | |
---|
42 | from the top-level G3toG4 directory. |
---|
43 | |
---|
44 | To build the converter executable "rztog4", simply type |
---|
45 | |
---|
46 | gmake bin |
---|
47 | |
---|
48 | To make everything, simply type: |
---|
49 | |
---|
50 | gmake global |
---|
51 | |
---|
52 | To remove all G3toG4 libraries, executables and .d files, simply type |
---|
53 | |
---|
54 | gmake clean |
---|
55 | |
---|
56 | the implementation (April 1999) |
---|
57 | ---------------------------------------- |
---|
58 | - PGON, PCON are built using the CSG classes G4Polycone and G4Polyhedra. |
---|
59 | - G3 MANY feature has not been tested. |
---|
60 | - GsROTM is fully implemented and supports rotations and mirror reflections |
---|
61 | - GSPOSP implemented via individual logical volumes for each instantiation |
---|
62 | (G4PVIndexed doesn't exist yet) |
---|
63 | - GSDV* routines for dividing volumes implemented, using |
---|
64 | G4PVReplicas, G4PVParametrised |
---|
65 | - GSROTM is implemented |
---|
66 | - hits are not implemented. Hit code is do-nothing. (It is |
---|
67 | coded up, but hit class references are commented out.) |
---|
68 | The digits+hits code has to be updated before G3toG4's |
---|
69 | hit code can be activated. |
---|
70 | - GSPART has to be updated. |
---|
71 | - Usage of magnetic field class has to be turned on. |
---|
72 | |
---|
73 | the implementation (February 2001) |
---|
74 | ---------------------------------------- |
---|
75 | - Supported shapes: all G3 shapes except for |
---|
76 | "HYPE", "GTRA", "CTUB" |
---|
77 | - G3 MANY feature is not supported. |
---|
78 | - GSDV* routines for dividing volumes implemented, using |
---|
79 | G4PVReplicas, for shapes: |
---|
80 | "BOX", "TUBE", "TUBS", "PARA" - all axes; |
---|
81 | "CONE", "CONS" - axes 2, 3; |
---|
82 | "TRD1", "TRD2", "TRAP" - axis 3; |
---|
83 | "PGON", "PCON" - axis 2; |
---|
84 | "PARA" -axis 1; axis 2,3 for a special case |
---|
85 | Unsupported shapes: |
---|
86 | "SPHE", "ELTU", "HYPE", "GTRA", "CTUB" |
---|
87 | |
---|
88 | the implementation (November 2001) |
---|
89 | ---------------------------------------- |
---|
90 | - Support for G3 MANY feature: |
---|
91 | |
---|
92 | MANY positions are resolved in G3toG4MANY function, |
---|
93 | which has to be processed before G3toG4BuildTree |
---|
94 | (it is not called by default). |
---|
95 | In order to resolve MANY user code has to provide |
---|
96 | additional info using G4gsbool(G4String volName, G4String manyVolName) |
---|
97 | function) for all overlapping volumes. Daughters of |
---|
98 | overlapping volumes are then resolved automatically |
---|
99 | and should not be specified via Gsbool. |
---|
100 | |
---|
101 | Limitation: a volume with a MANY position can have only this |
---|
102 | one position; if more than one position is needed a new volume |
---|
103 | has to be defined (gsvolu) for each position. |
---|
104 | |
---|
105 | See History file for modification history. |
---|