| 1 | <!-- ******************************************************** -->
|
|---|
| 2 | <!-- -->
|
|---|
| 3 | <!-- [History] -->
|
|---|
| 4 | <!-- Converted to DocBook: Katsuya Amako, Aug-2006 -->
|
|---|
| 5 | <!-- Changed by: Gabriele Cosmo, 18-Apr-2005 -->
|
|---|
| 6 | <!-- -->
|
|---|
| 7 | <!-- ******************************************************** -->
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 | <!-- ******************* Section (Level#2) ****************** -->
|
|---|
| 11 | <sect2 id="sect.Geom.ConvGeom">
|
|---|
| 12 | <title>
|
|---|
| 13 | Converting Geometries from Geant3.21
|
|---|
| 14 | </title>
|
|---|
| 15 |
|
|---|
| 16 | <!-- ******************* Section (Level#3) ****************** -->
|
|---|
| 17 | <sect3 id="sect.Geom.ConvGeom.App">
|
|---|
| 18 | <title>
|
|---|
| 19 | Approach
|
|---|
| 20 | </title>
|
|---|
| 21 |
|
|---|
| 22 | <para>
|
|---|
| 23 | <emphasis role="bold">G3toG4</emphasis> is the Geant4 facility to convert
|
|---|
| 24 | GEANT 3.21 geometries into Geant4. This is done in two stages:
|
|---|
| 25 |
|
|---|
| 26 | <orderedlist spacing="compact">
|
|---|
| 27 | <listitem><para>
|
|---|
| 28 | The user supplies a GEANT 3.21 RZ-file (.rz) containing the
|
|---|
| 29 | initialization data structures. An executable <literal>rztog4</literal> reads
|
|---|
| 30 | this file and produces an ASCII <emphasis>call list</emphasis> file containing
|
|---|
| 31 | instructions on how to build the geometry. The source code of
|
|---|
| 32 | <literal>rztog4</literal> is FORTRAN.
|
|---|
| 33 | </para></listitem>
|
|---|
| 34 | <listitem><para>
|
|---|
| 35 | A call list interpreter (<literal>G4BuildGeom.cc</literal>) reads these
|
|---|
| 36 | instructions and builds the geometry in the user's client code for
|
|---|
| 37 | Geant4.
|
|---|
| 38 | </para></listitem>
|
|---|
| 39 | </orderedlist>
|
|---|
| 40 | </para>
|
|---|
| 41 |
|
|---|
| 42 | </sect3>
|
|---|
| 43 |
|
|---|
| 44 | <!-- ******************* Section (Level#3) ****************** -->
|
|---|
| 45 | <sect3 id="sect.Geom.ConvGeom.Import">
|
|---|
| 46 | <title>
|
|---|
| 47 | Importing converted geometries into Geant4
|
|---|
| 48 | </title>
|
|---|
| 49 |
|
|---|
| 50 | <para>
|
|---|
| 51 | Two examples of how to use the call list interpreter are
|
|---|
| 52 | supplied in the directory <literal>examples/extended/g3tog4</literal>:
|
|---|
| 53 |
|
|---|
| 54 | <orderedlist spacing="compact">
|
|---|
| 55 | <listitem><para>
|
|---|
| 56 | <literal>cltog4</literal> is a simple example which simply invokes the
|
|---|
| 57 | call list interpreter method <literal>G4BuildGeom</literal> from the
|
|---|
| 58 | <literal>G3toG4DetectorConstruction</literal> class, builds the geometry and
|
|---|
| 59 | exits.
|
|---|
| 60 | </para></listitem>
|
|---|
| 61 | <listitem><para>
|
|---|
| 62 | <literal>clGeometry</literal>, is more complete and is patterned as for
|
|---|
| 63 | the novice Geant4 examples. It also invokes the call list
|
|---|
| 64 | interpreter, but in addition, allows the geometry to be visualized
|
|---|
| 65 | and particles to be tracked.
|
|---|
| 66 | </para></listitem>
|
|---|
| 67 | </orderedlist>
|
|---|
| 68 | </para>
|
|---|
| 69 |
|
|---|
| 70 | <para>
|
|---|
| 71 | To compile and build the G3toG4 libraries, you need to have set in
|
|---|
| 72 | your environment the variable <literal>G4LIB_BUILD_G3TOG4</literal> at the
|
|---|
| 73 | time of installation. The G3toG4 libraries are not built by
|
|---|
| 74 | default. Then, simply type
|
|---|
| 75 |
|
|---|
| 76 | <informalexample>
|
|---|
| 77 | <programlisting>
|
|---|
| 78 | gmake
|
|---|
| 79 | </programlisting>
|
|---|
| 80 | </informalexample>
|
|---|
| 81 |
|
|---|
| 82 | from the top-level <literal>source/g3tog4</literal> directory.
|
|---|
| 83 | </para>
|
|---|
| 84 |
|
|---|
| 85 | <para>
|
|---|
| 86 | To build the converter executable <literal>rztog4</literal>, simply
|
|---|
| 87 | type
|
|---|
| 88 |
|
|---|
| 89 | <informalexample>
|
|---|
| 90 | <programlisting>
|
|---|
| 91 | gmake bin
|
|---|
| 92 | </programlisting>
|
|---|
| 93 | </informalexample>
|
|---|
| 94 | </para>
|
|---|
| 95 |
|
|---|
| 96 | <para>
|
|---|
| 97 | To make everything, simply type:
|
|---|
| 98 |
|
|---|
| 99 | <informalexample>
|
|---|
| 100 | <programlisting>
|
|---|
| 101 | gmake global
|
|---|
| 102 | </programlisting>
|
|---|
| 103 | </informalexample>
|
|---|
| 104 | </para>
|
|---|
| 105 |
|
|---|
| 106 | <para>
|
|---|
| 107 | To remove all <literal>G3toG4</literal> libraries, executables and .d files,
|
|---|
| 108 | simply type
|
|---|
| 109 |
|
|---|
| 110 | <informalexample>
|
|---|
| 111 | <programlisting>
|
|---|
| 112 | gmake clean
|
|---|
| 113 | </programlisting>
|
|---|
| 114 | </informalexample>
|
|---|
| 115 | </para>
|
|---|
| 116 |
|
|---|
| 117 | </sect3>
|
|---|
| 118 |
|
|---|
| 119 | <!-- ******************* Section (Level#3) ****************** -->
|
|---|
| 120 | <sect3 id="sect.Geom.ConvGeom.Curr">
|
|---|
| 121 | <title>
|
|---|
| 122 | Current Status
|
|---|
| 123 | </title>
|
|---|
| 124 |
|
|---|
| 125 | <para>
|
|---|
| 126 | The package has been tested with the geometries from experiments
|
|---|
| 127 | like: BaBar, CMS, Atlas, Alice, Zeus, L3, and Opal.
|
|---|
| 128 | </para>
|
|---|
| 129 |
|
|---|
| 130 | <para>
|
|---|
| 131 | Here is a comprehensive list of features supported and not
|
|---|
| 132 | supported or implemented in the current version of the package:
|
|---|
| 133 |
|
|---|
| 134 | <itemizedlist spacing="compact">
|
|---|
| 135 | <listitem><para>
|
|---|
| 136 | Supported shapes: all GEANT 3.21 shapes except for
|
|---|
| 137 | <literal>GTRA</literal>, <literal>CTUB</literal>.
|
|---|
| 138 | </para></listitem>
|
|---|
| 139 | <listitem><para>
|
|---|
| 140 | <literal>PGON</literal>, <literal>PCON</literal> are built using the
|
|---|
| 141 | <emphasis>specific</emphasis> solids <literal>G4Polycone</literal> and
|
|---|
| 142 | <literal>G4Polyhedra</literal>.
|
|---|
| 143 | </para></listitem>
|
|---|
| 144 | <listitem><para>
|
|---|
| 145 | GEANT 3.21 <literal>MANY</literal> feature is only partially
|
|---|
| 146 | supported.
|
|---|
| 147 | <literal>MANY</literal> positions are resolved in the
|
|---|
| 148 | <literal>G3toG4MANY()</literal> function, which has to be processed before
|
|---|
| 149 | <literal>G3toG4BuildTree()</literal> (it is not called by default).
|
|---|
| 150 | In order to resolve <literal>MANY</literal>, the user code has to provide
|
|---|
| 151 | additional info using <literal>G4gsbool(G4String volName, G4String
|
|---|
| 152 | manyVolName)</literal> function for all the overlapping volumes.
|
|---|
| 153 | Daughters of overlapping volumes are then resolved automatically
|
|---|
| 154 | and should not be specified via <literal>Gsbool</literal>.
|
|---|
| 155 | <para>
|
|---|
| 156 | <emphasis role="bold">Limitation</emphasis>: a volume with a
|
|---|
| 157 | <literal>MANY</literal> position can have
|
|---|
| 158 | only this one position; if more than one position is needed a new
|
|---|
| 159 | volume has to be defined (<literal>gsvolu()</literal>) for each
|
|---|
| 160 | position.
|
|---|
| 161 | </para>
|
|---|
| 162 | </para></listitem>
|
|---|
| 163 | <listitem><para>
|
|---|
| 164 | <literal>GSDV*</literal> routines for dividing volumes are implemented,
|
|---|
| 165 | using <literal>G4PVReplica</literal>s, for shapes:
|
|---|
| 166 |
|
|---|
| 167 | <itemizedlist spacing="compact">
|
|---|
| 168 | <listitem><para>
|
|---|
| 169 | <literal>BOX</literal>, <literal>TUBE</literal>,
|
|---|
| 170 | <literal>TUBS</literal>, <literal>PARA</literal> - all axes;
|
|---|
| 171 | </para></listitem>
|
|---|
| 172 | <listitem><para>
|
|---|
| 173 | <literal>CONE</literal>, <literal>CONS</literal> - axes 2, 3;
|
|---|
| 174 | </para></listitem>
|
|---|
| 175 | <listitem><para>
|
|---|
| 176 | <literal>TRD1</literal>, <literal>TRD2</literal>,
|
|---|
| 177 | <literal>TRAP</literal> - axis 3;
|
|---|
| 178 | </para></listitem>
|
|---|
| 179 | <listitem><para>
|
|---|
| 180 | <literal>PGON</literal>, <literal>PCON</literal> - axis 2;
|
|---|
| 181 | </para></listitem>
|
|---|
| 182 | <listitem><para>
|
|---|
| 183 | <literal>PARA</literal> -axis 1; axis 2,3 for a special case
|
|---|
| 184 | </para></listitem>
|
|---|
| 185 | </itemizedlist>
|
|---|
| 186 | </para></listitem>
|
|---|
| 187 | <listitem><para>
|
|---|
| 188 | <literal>GSPOSP</literal> is implemented via individual logical volumes
|
|---|
| 189 | for each instantiation.
|
|---|
| 190 | </para></listitem>
|
|---|
| 191 | <listitem><para>
|
|---|
| 192 | <literal>GSROTM</literal> is implemented. Reflections of hierachies based
|
|---|
| 193 | on plain CSG solids are implemented through the <literal>G3Division</literal>
|
|---|
| 194 | class.
|
|---|
| 195 | </para></listitem>
|
|---|
| 196 | <listitem><para>
|
|---|
| 197 | Hits are not implemented.
|
|---|
| 198 | </para></listitem>
|
|---|
| 199 | <listitem><para>
|
|---|
| 200 | Conversion of GEANT 3.21 magnetic field is currently not
|
|---|
| 201 | supported. However, the usage of magnetic field has to be turned on.
|
|---|
| 202 | </para></listitem>
|
|---|
| 203 | </itemizedlist>
|
|---|
| 204 | </para>
|
|---|
| 205 |
|
|---|
| 206 |
|
|---|
| 207 | </sect3>
|
|---|
| 208 | </sect2>
|
|---|