| 1 | <html>
|
|---|
| 2 | <head>
|
|---|
| 3 | <title>ADG: Geometry</title>
|
|---|
| 4 | </head>
|
|---|
| 5 |
|
|---|
| 6 | <!-- Changed by: Gabriele Cosmo, 18-Apr-2005 -->
|
|---|
| 7 | <!-- $Id: geomG3toG4.html,v 1.2 2006/06/09 13:59:44 gcosmo Exp $ -->
|
|---|
| 8 | <!-- $Name: $ -->
|
|---|
| 9 | <body>
|
|---|
| 10 | <table WIDTH="100%"><TR>
|
|---|
| 11 | <td>
|
|---|
| 12 | <a href="../../../../Overview/html/index.html">
|
|---|
| 13 | <IMG SRC="../../../../resources/html/IconsGIF/Overview.gif" ALT="Overview"></a>
|
|---|
| 14 | <a href="geometry.html">
|
|---|
| 15 | <IMG SRC="../../../../resources/html/IconsGIF/Contents.gif" ALT="Contents"></a>
|
|---|
| 16 | <a href="geomEditor.html">
|
|---|
| 17 | <IMG SRC="../../../../resources/html/IconsGIF/Previous.gif" ALT="Previous"></a>
|
|---|
| 18 | <a href="geomOverlap.html">
|
|---|
| 19 | <IMG SRC="../../../../resources/html/IconsGIF/Next.gif" ALT="Next"></a>
|
|---|
| 20 | </td>
|
|---|
| 21 | <td ALIGN="Right">
|
|---|
| 22 | <font SIZE="-1" COLOR="#238E23">
|
|---|
| 23 | <b>Geant4 User's Guide</b>
|
|---|
| 24 | <br>
|
|---|
| 25 | <b>For Application Developers</b>
|
|---|
| 26 | <br>
|
|---|
| 27 | <b>Geometry</b>
|
|---|
| 28 | </font>
|
|---|
| 29 | </td>
|
|---|
| 30 | </tr></table>
|
|---|
| 31 | <br><br>
|
|---|
| 32 |
|
|---|
| 33 | <a name="4.1.10">
|
|---|
| 34 | <h2>4.1.10 Converting Geometries from Geant 3.21</h2></a>
|
|---|
| 35 |
|
|---|
| 36 | <b>Approach</b>
|
|---|
| 37 | <p>
|
|---|
| 38 | <b>G3toG4</b> is the Geant4 facility to convert GEANT 3.21 geometries into
|
|---|
| 39 | Geant4. This is done in two stages:
|
|---|
| 40 | <ol>
|
|---|
| 41 | <li>The user supplies a GEANT 3.21 RZ-file (.rz) containing the initialization
|
|---|
| 42 | data structures. An executable <tt>rztog4</tt> reads this file and
|
|---|
| 43 | produces an ASCII <i>call list</i> file containing instructions on how to
|
|---|
| 44 | build the geometry. The source code of <tt>rztog4</tt> is FORTRAN.</li>
|
|---|
| 45 | <li>A call list interpreter (<tt>G4BuildGeom.cc</tt>) reads these instructions
|
|---|
| 46 | and builds the geometry in the user's client code for Geant4.</li>
|
|---|
| 47 | </ol>
|
|---|
| 48 | </p>
|
|---|
| 49 |
|
|---|
| 50 | <B>Importing converted geometries into Geant4</B>
|
|---|
| 51 | <P>
|
|---|
| 52 | Two examples of how to use the call list interpreter are supplied in
|
|---|
| 53 | the directory <tt>examples/extended/g3tog4</tt>:
|
|---|
| 54 | <ol>
|
|---|
| 55 | <li><tt>cltog4</tt> is a simple example which simply invokes the
|
|---|
| 56 | call list interpreter method <tt>G4BuildGeom</tt> from the
|
|---|
| 57 | <tt>G3toG4DetectorConstruction</tt> class, builds the geometry and
|
|---|
| 58 | exits.</li>
|
|---|
| 59 | <li><tt>clGeometry</tt>, is more complete and is patterned as for
|
|---|
| 60 | the novice Geant4 examples. It also invokes the call list interpreter,
|
|---|
| 61 | but in addition, allows the geometry to be visualized and particles to be
|
|---|
| 62 | tracked.</li>
|
|---|
| 63 | </ol>
|
|---|
| 64 | To compile and build the G3toG4 libraries, you need to have set in your
|
|---|
| 65 | environment the variable <tt>G4LIB_BUILD_G3TOG4</tt> at the time of
|
|---|
| 66 | installation. The G3toG4 libraries are not built by default. Then, simply type
|
|---|
| 67 |
|
|---|
| 68 | <pre>
|
|---|
| 69 | gmake
|
|---|
| 70 | </pre>
|
|---|
| 71 |
|
|---|
| 72 | from the top-level <tt>source/g3tog4</tt> directory.
|
|---|
| 73 | <P>
|
|---|
| 74 | To build the converter executable <tt>rztog4</tt>, simply type
|
|---|
| 75 |
|
|---|
| 76 | <pre>
|
|---|
| 77 | gmake bin
|
|---|
| 78 | </pre>
|
|---|
| 79 |
|
|---|
| 80 | To make everything, simply type:
|
|---|
| 81 |
|
|---|
| 82 | <pre>
|
|---|
| 83 | gmake global
|
|---|
| 84 | </pre>
|
|---|
| 85 |
|
|---|
| 86 | To remove all <tt>G3toG4</tt> libraries, executables and .d files, simply type
|
|---|
| 87 |
|
|---|
| 88 | <pre>
|
|---|
| 89 | gmake clean
|
|---|
| 90 | </pre>
|
|---|
| 91 |
|
|---|
| 92 | <B>Current Status</B>
|
|---|
| 93 | <P>
|
|---|
| 94 | The package has been tested with the geometries from experiments like:
|
|---|
| 95 | BaBar, CMS, Atlas, Alice, Zeus, L3, and Opal.<BR>
|
|---|
| 96 | Here is a comprehensive list of features supported and not supported or
|
|---|
| 97 | implemented in the current version of the package:
|
|---|
| 98 | <UL>
|
|---|
| 99 | <li>Supported shapes:
|
|---|
| 100 | all GEANT 3.21 shapes except for <tt>GTRA</tt>, <tt>CTUB</tt>.</li>
|
|---|
| 101 | <li><tt>PGON</tt>, <tt>PCON</tt> are built using the <i>specific</i> solids
|
|---|
| 102 | <tt>G4Polycone</tt> and <tt>G4Polyhedra</tt>.</li>
|
|---|
| 103 | <li>GEANT 3.21 <tt>MANY</tt> feature is only partially supported.<BR>
|
|---|
| 104 | <tt>MANY</tt> positions are resolved in the <tt>G3toG4MANY()</tt>
|
|---|
| 105 | function, which has to be processed before <tt>G3toG4BuildTree()</tt>
|
|---|
| 106 | (it is not called by default).<br>
|
|---|
| 107 | In order to resolve <tt>MANY</tt>, the user code has to provide
|
|---|
| 108 | additional info using <tt>G4gsbool(G4String volName,
|
|---|
| 109 | G4String manyVolName)</tt> function for all the overlapping volumes.
|
|---|
| 110 | Daughters of overlapping volumes are then resolved automatically and
|
|---|
| 111 | should not be specified via <tt>Gsbool</tt>.<BR>
|
|---|
| 112 | <B>Limitation</B>: a volume with a <tt>MANY</tt> position can have only
|
|---|
| 113 | this one position; if more than one position is needed a new volume has
|
|---|
| 114 | to be defined (<tt>gsvolu()</tt>) for each position.
|
|---|
| 115 | </li>
|
|---|
| 116 | <li><tt>GSDV*</tt> routines for dividing volumes are implemented, using
|
|---|
| 117 | <tt>G4PVReplica</tt>s, for shapes:</li>
|
|---|
| 118 | <UL>
|
|---|
| 119 | <li><tt>BOX</tt>, <tt>TUBE</tt>, <tt>TUBS</tt>, <tt>PARA</tt> - all axes;
|
|---|
| 120 | </li>
|
|---|
| 121 | <li><tt>CONE</tt>, <tt>CONS</tt> - axes 2, 3;</li>
|
|---|
| 122 | <li><tt>TRD1</tt>, <tt>TRD2</tt>, <tt>TRAP</tt> - axis 3;</li>
|
|---|
| 123 | <li><tt>PGON</tt>, <tt>PCON</tt> - axis 2;</li>
|
|---|
| 124 | <li><tt>PARA</tt> -axis 1; axis 2,3 for a special case</li>
|
|---|
| 125 | </UL>
|
|---|
| 126 | <li><tt>GSPOSP</tt> is implemented via individual logical volumes for each
|
|---|
| 127 | instantiation.</li>
|
|---|
| 128 | <li><tt>GSROTM</tt> is implemented. Reflections of hierachies based on plain
|
|---|
| 129 | CSG solids are implemented through the <tt>G3Division</tt> class.
|
|---|
| 130 | <li>Hits are not implemented.
|
|---|
| 131 | <li>Conversion of GEANT 3.21 magnetic field is currently not supported.
|
|---|
| 132 | However, the usage of magnetic field has to be turned on.
|
|---|
| 133 | </UL>
|
|---|
| 134 |
|
|---|
| 135 | <hr><a href="../../../../Authors/html/subjectsToAuthors.html">
|
|---|
| 136 | <i>About the authors</a></i> </P>
|
|---|
| 137 |
|
|---|
| 138 | </body>
|
|---|
| 139 | </html>
|
|---|