[904] | 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.Edit"> |
---|
| 12 | <title> |
---|
| 13 | A Simple Geometry Editor |
---|
| 14 | </title> |
---|
| 15 | |
---|
| 16 | <para> |
---|
[1211] | 17 | GGE is the acronym for Geant4 Graphical Geometry Editor. GGE aims to assist |
---|
| 18 | physicists who have a little knowledge on C++ and the Geant4 |
---|
| 19 | toolkit to construct his or her own detector geometry. In essence, GGE is made up of |
---|
| 20 | a set of tables which can contain all relevant parameters to construct |
---|
| 21 | a simple detector geometry. Tables for scratch or compound materials, tables for logical |
---|
| 22 | and physical volumes are provided. From the values in the tables, C++ source codes are automatically |
---|
| 23 | generated. |
---|
[904] | 24 | </para> |
---|
| 25 | |
---|
| 26 | <para> |
---|
| 27 | GGE provides methods to: |
---|
| 28 | |
---|
| 29 | <orderedlist spacing="compact"> |
---|
| 30 | <listitem><para> |
---|
| 31 | construct a detector geometry including <literal>G4Element</literal>, |
---|
| 32 | <literal>G4Material</literal>, <literal>G4Solids</literal>, |
---|
| 33 | <literal>G4LogicalVolume</literal>, |
---|
| 34 | <literal>G4PVPlacement</literal>, etc. |
---|
| 35 | </para></listitem> |
---|
| 36 | <listitem><para> |
---|
[1211] | 37 | view the detector geometry using existing visualization system, DAWN |
---|
[904] | 38 | </para></listitem> |
---|
| 39 | <listitem><para> |
---|
[1211] | 40 | keep the detector object in a persistent way, either in GDML format (currently only logical volumes are supported) or Java serialized format. |
---|
[904] | 41 | </para></listitem> |
---|
| 42 | <listitem><para> |
---|
| 43 | produce corresponding C++ codes after the norm of Geant4 toolkit |
---|
| 44 | </para></listitem> |
---|
| 45 | <listitem><para> |
---|
[1211] | 46 | make a Geant4 executable, in collaboration with another component of MOMO, i.e., GPE, or Geant4 Physics Editor. |
---|
[904] | 47 | </para></listitem> |
---|
| 48 | </orderedlist> |
---|
| 49 | </para> |
---|
| 50 | |
---|
| 51 | <para> |
---|
[1211] | 52 | GGE can be found in the standard |
---|
| 53 | Geant4 distribution under the <literal>$G4INSTALL/environments/MOMO/MOMO.jar</literal>. |
---|
| 54 | JRE (Java Run-time Environment) is prerequisite to run MOMO.jar, Java archive file of MOMO. |
---|
| 55 | MOMO contains GGE, GPE, GAG and other helper tools. Further information is available from the |
---|
| 56 | Web pages below. |
---|
[904] | 57 | </para> |
---|
| 58 | <para> |
---|
[1211] | 59 | MOMO = GGE + GPE + GAG: |
---|
| 60 | <ulink url="http://www-geant4.kek.jp/~yoshidah"> |
---|
| 61 | http://www-geant4.kek.jp/~yoshidah |
---|
| 62 | </ulink> |
---|
[904] | 63 | </para> |
---|
| 64 | |
---|
| 65 | <!-- ******************* Section (Level#3) ****************** --> |
---|
| 66 | <sect3 id="sect.Geom.Edit.Mate"> |
---|
| 67 | <title> |
---|
| 68 | Materials: elements and mixtures |
---|
| 69 | </title> |
---|
| 70 | |
---|
| 71 | <para> |
---|
[1211] | 72 | GGE provides the database of elements in the form of the periodic |
---|
| 73 | table, from which users can select element(s) to construct new materials. |
---|
| 74 | They can be loaded, used, edited and saved as Java persistent |
---|
| 75 | objects or in a GDML file. In <literal>$G4INSTALL/enviroments/MOMO</literal>, |
---|
| 76 | a pre-constructed database of materials taken from the PDG book, <literal>PDG.xml</literal> |
---|
| 77 | is present. |
---|
[904] | 78 | </para> |
---|
| 79 | |
---|
| 80 | <para> |
---|
| 81 | Users can also create new materials either from scratch or by |
---|
| 82 | combining other materials. |
---|
| 83 | |
---|
| 84 | <itemizedlist spacing="compact"> |
---|
| 85 | <listitem><para> |
---|
[1211] | 86 | By selecting an element in the periodic table, default values as shown below are copied to a row in the table. |
---|
[904] | 87 | <para> |
---|
| 88 | <informaltable> |
---|
| 89 | <tgroup cols="11"> |
---|
| 90 | <tbody> |
---|
| 91 | <row> |
---|
| 92 | <entry>Use</entry> |
---|
| 93 | <entry>Name</entry> |
---|
| 94 | <entry>A</entry> |
---|
| 95 | <entry>Z</entry> |
---|
| 96 | <entry>Density</entry> |
---|
| 97 | <entry>Unit</entry> |
---|
| 98 | <entry>State</entry> |
---|
| 99 | <entry>Temperature</entry> |
---|
| 100 | <entry>Unit</entry> |
---|
| 101 | <entry>Pressure</entry> |
---|
| 102 | <entry>Unit</entry> |
---|
| 103 | </row> |
---|
| 104 | </tbody> |
---|
| 105 | </tgroup> |
---|
| 106 | </informaltable> |
---|
| 107 | </para> |
---|
| 108 | <para> |
---|
[1211] | 109 | <emphasis role="bold">Use</emphasis> marks the used materials. |
---|
| 110 | Only the elements and materials used in the logical volumes are |
---|
[904] | 111 | kept in the detector object and are used to generate C++ |
---|
[1211] | 112 | constructors. |
---|
[904] | 113 | </para> |
---|
| 114 | </para></listitem> |
---|
| 115 | <listitem><para> |
---|
[1211] | 116 | By selecting multiple elements in the periodic table, a material from a combination of |
---|
| 117 | elements is assigned to a row of the compound material table. The minimum actions user |
---|
| 118 | have to do is to give a name to the |
---|
| 119 | material and define its density. |
---|
[904] | 120 | <para> |
---|
| 121 | <informaltable> |
---|
| 122 | <tgroup cols="9"> |
---|
| 123 | <tbody> |
---|
| 124 | <row> |
---|
| 125 | <entry>Use</entry> |
---|
| 126 | <entry>Name</entry> |
---|
| 127 | <entry>Elements</entry> |
---|
| 128 | <entry>Density</entry> |
---|
| 129 | <entry>Unit</entry> |
---|
| 130 | <entry>State</entry> |
---|
| 131 | <entry>Temperature</entry> |
---|
| 132 | <entry>Unit</entry> |
---|
| 133 | <entry>Pressure</entry> |
---|
| 134 | <entry>Unit</entry> |
---|
| 135 | </row> |
---|
| 136 | </tbody> |
---|
| 137 | </tgroup> |
---|
| 138 | </informaltable> |
---|
| 139 | </para> |
---|
| 140 | |
---|
| 141 | <para> |
---|
| 142 | By clicking the column <emphasis role="bold">Elements</emphasis>, a new |
---|
| 143 | window is open to select one of two methods: |
---|
| 144 | |
---|
| 145 | <itemizedlist spacing="compact"> |
---|
| 146 | <listitem><para> |
---|
[1211] | 147 | Add an element, giving its fraction by weight |
---|
[904] | 148 | </para></listitem> |
---|
| 149 | <listitem><para> |
---|
[1211] | 150 | Add an element, giving its number of atoms. |
---|
[904] | 151 | </para></listitem> |
---|
| 152 | </itemizedlist> |
---|
| 153 | </para> |
---|
| 154 | </para></listitem> |
---|
| 155 | </itemizedlist> |
---|
| 156 | </para> |
---|
| 157 | |
---|
| 158 | </sect3> |
---|
| 159 | |
---|
| 160 | <!-- ******************* Section (Level#3) ****************** --> |
---|
| 161 | <sect3 id="sect.Geom.Edit.Solids"> |
---|
| 162 | <title> |
---|
| 163 | Solids |
---|
| 164 | </title> |
---|
| 165 | |
---|
| 166 | <para> |
---|
| 167 | The most popular CSG solids (<literal>G4Box</literal>, <literal>G4Tubs</literal>, |
---|
| 168 | <literal>G4Cons</literal>, <literal>G4Trd</literal>) and specific BREPs solids |
---|
[1211] | 169 | (Pcons, Pgons) are supported. All relevant parameters of such a |
---|
| 170 | solid can be specified in the parameter table, which pops up upon selection. |
---|
[904] | 171 | </para> |
---|
| 172 | |
---|
| 173 | <para> |
---|
[1211] | 174 | Color, or the visualization attribute of a logical volume can be created, |
---|
| 175 | using color chooser panel. |
---|
| 176 | Users can view each solid using DAWN. |
---|
[904] | 177 | </para> |
---|
| 178 | |
---|
| 179 | </sect3> |
---|
| 180 | |
---|
| 181 | <!-- ******************* Section (Level#3) ****************** --> |
---|
| 182 | <sect3 id="sect.Geom.Edit.LogVol"> |
---|
| 183 | <title> |
---|
| 184 | Logical Volume |
---|
| 185 | </title> |
---|
| 186 | |
---|
| 187 | <para> |
---|
| 188 | GGE can specify the following items: |
---|
| 189 | |
---|
| 190 | <informaltable> |
---|
| 191 | <tgroup cols="4"> |
---|
| 192 | <tbody> |
---|
| 193 | <row> |
---|
| 194 | <entry>Name</entry> |
---|
| 195 | <entry>Solid</entry> |
---|
| 196 | <entry>Material</entry> |
---|
| 197 | <entry>VisAttribute</entry> |
---|
| 198 | </row> |
---|
| 199 | </tbody> |
---|
| 200 | </tgroup> |
---|
| 201 | </informaltable> |
---|
| 202 | </para> |
---|
| 203 | |
---|
| 204 | <para> |
---|
[1211] | 205 | The lists of solid types, names of the materials defined in the material tables, and |
---|
| 206 | names of user-defined visualization attributes are shown automatically in respective table cell for user's choices. |
---|
| 207 | </para> |
---|
| 208 | <para> |
---|
[904] | 209 | The construction and assignment of appropriate entities for |
---|
| 210 | <literal>G4FieldManager</literal> and <literal>G4VSensitiveDetector</literal> |
---|
| 211 | are left to the user. |
---|
| 212 | </para> |
---|
| 213 | |
---|
| 214 | </sect3> |
---|
| 215 | |
---|
| 216 | <!-- ******************* Section (Level#3) ****************** --> |
---|
| 217 | <sect3 id="sect.Geom.Edit.PhysVol"> |
---|
| 218 | <title> |
---|
| 219 | Physical Volume |
---|
| 220 | </title> |
---|
| 221 | |
---|
| 222 | <para> |
---|
[1211] | 223 | Geant4 enables users to create a physical volume in different ways; the mother volume |
---|
| 224 | can be either a logical or a physical one, spatial rotation can be either |
---|
| 225 | with respect to the volume or to the frame to which the volume is attached. GGE is prepared for |
---|
| 226 | such four combinatorial cases to construct a physical volume. |
---|
| 227 | </para> |
---|
| 228 | <para> |
---|
| 229 | Five simple cases of creating physical volumes are supported by GGE. |
---|
| 230 | Primo, a single copy of a physical volume can be created by a translation and rotation. Secondo, repeated copies can be created by repeated linear translations. |
---|
| 231 | A logical volume is translated in a Cartesian direction, starting from the initial position, |
---|
| 232 | with a given step size. |
---|
| 233 | Mother volume can be either |
---|
| 234 | another logical volume or a physical volume. |
---|
[904] | 235 | |
---|
[1211] | 236 | |
---|
[904] | 237 | <informaltable> |
---|
| 238 | <tgroup cols="9"> |
---|
| 239 | <tbody> |
---|
| 240 | <row> |
---|
| 241 | <entry>Name</entry> |
---|
| 242 | <entry>LogicalVolume</entry> |
---|
[1211] | 243 | <entry>Type and name of MotherVolume</entry> |
---|
[904] | 244 | <entry>Many</entry> |
---|
| 245 | <entry>X0, Y0, Z0</entry> |
---|
| 246 | <entry>Direction</entry> |
---|
| 247 | <entry>StepSize</entry> |
---|
| 248 | <entry>Unit</entry> |
---|
| 249 | <entry>CopyNumber</entry> |
---|
| 250 | </row> |
---|
| 251 | </tbody> |
---|
| 252 | </tgroup> |
---|
| 253 | </informaltable> |
---|
| 254 | </para> |
---|
| 255 | |
---|
| 256 | <para> |
---|
[1211] | 257 | Third, repeated copies are created by rotation around an axis, placing an |
---|
| 258 | object repeatedly on a ``cylindrical'' pattern. |
---|
| 259 | Fourth, replicas are created by slicing a volume along a Cartesian direction. |
---|
| 260 | Fifth, replicas are created by cutting a volume cylindrically. |
---|
[904] | 261 | </para> |
---|
| 262 | |
---|
| 263 | </sect3> |
---|
| 264 | |
---|
| 265 | <!-- ******************* Section (Level#3) ****************** --> |
---|
| 266 | <sect3 id="sect.Geom.Edit.GeneCode"> |
---|
| 267 | <title> |
---|
[1211] | 268 | Generation of C++ code: |
---|
[904] | 269 | </title> |
---|
| 270 | |
---|
| 271 | <para> |
---|
[1211] | 272 | User has to type in a class name to his |
---|
| 273 | geometry, for example, <literal>MyDetectorConstruction</literal>. Then, with a mouse button click, |
---|
| 274 | source codes in the form of an |
---|
| 275 | include file and a source file are created and shown in the editor panel. In this example, they are |
---|
| 276 | <literal>MyDetectorConstruction.cc</literal> and <literal>MyDetectorConstruction.hh</literal> files. |
---|
| 277 | They reflect all current user modifications in the tables in real-time. |
---|
[904] | 278 | </para> |
---|
| 279 | |
---|
| 280 | </sect3> |
---|
| 281 | |
---|
| 282 | <!-- ******************* Section (Level#3) ****************** --> |
---|
| 283 | <sect3 id="sect.Geom.Edit.Vis"> |
---|
| 284 | <title> |
---|
| 285 | Visualization |
---|
| 286 | </title> |
---|
| 287 | |
---|
| 288 | <para> |
---|
[1211] | 289 | The whole geometry can be visualized after the |
---|
[904] | 290 | compilation of the source code <literal>MyDetectorConstruction.cc</literal> |
---|
| 291 | with appropriate parts of Geant4. (In particular only the geometry |
---|
| 292 | and visualization, together with the small other parts they depend |
---|
[1211] | 293 | on, are needed.) MOMO provides Physics Editor to create standard electromagnetic physics |
---|
| 294 | and a minimum main program. See the on-line document in MOMO. |
---|
[904] | 295 | </para> |
---|
| 296 | |
---|
| 297 | |
---|
| 298 | </sect3> |
---|
| 299 | </sect2> |
---|