[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> |
---|
| 17 | GGE is the Geant4 Graphical Geometry Editor. It is implemented |
---|
| 18 | in JAVA and is part of the Momo environment. GGE aims to serve |
---|
| 19 | physicists who have a little knowledge of C++ and the Geant4 |
---|
| 20 | toolkit to construct his or her own detector geometry in a |
---|
| 21 | graphical manner. |
---|
| 22 | </para> |
---|
| 23 | |
---|
| 24 | <para> |
---|
| 25 | GGE provides methods to: |
---|
| 26 | |
---|
| 27 | <orderedlist spacing="compact"> |
---|
| 28 | <listitem><para> |
---|
| 29 | construct a detector geometry including <literal>G4Element</literal>, |
---|
| 30 | <literal>G4Material</literal>, <literal>G4Solids</literal>, |
---|
| 31 | <literal>G4LogicalVolume</literal>, |
---|
| 32 | <literal>G4PVPlacement</literal>, etc. |
---|
| 33 | </para></listitem> |
---|
| 34 | <listitem><para> |
---|
| 35 | view the detector geometry using existing visualization system like DAWN |
---|
| 36 | </para></listitem> |
---|
| 37 | <listitem><para> |
---|
| 38 | keep the detector object in a persistent way |
---|
| 39 | </para></listitem> |
---|
| 40 | <listitem><para> |
---|
| 41 | produce corresponding C++ codes after the norm of Geant4 toolkit |
---|
| 42 | </para></listitem> |
---|
| 43 | <listitem><para> |
---|
| 44 | make a Geant4 executable under adequate environment |
---|
| 45 | </para></listitem> |
---|
| 46 | </orderedlist> |
---|
| 47 | </para> |
---|
| 48 | |
---|
| 49 | <para> |
---|
| 50 | GGE is implemented with Java, using Java Foundation Class, |
---|
| 51 | Swing and is part of Java MOMO Framework. In essence, GGE is made |
---|
| 52 | a set of tables which contain all relevant parameters to construct |
---|
| 53 | a simple detector geometry. |
---|
| 54 | </para> |
---|
| 55 | |
---|
| 56 | <para> |
---|
| 57 | The software, installation instructions and notes for GGE and other |
---|
| 58 | JAVA-based UI tools part of the MOMO Framework can be found in the |
---|
| 59 | Geant4 distribution under the <literal>geant4/enviroments/MOMO</literal> |
---|
| 60 | directory. |
---|
| 61 | </para> |
---|
| 62 | |
---|
| 63 | <!-- ******************* Section (Level#3) ****************** --> |
---|
| 64 | <sect3 id="sect.Geom.Edit.Mate"> |
---|
| 65 | <title> |
---|
| 66 | Materials: elements and mixtures |
---|
| 67 | </title> |
---|
| 68 | |
---|
| 69 | <para> |
---|
| 70 | GGE provides the database of elements in a form of the periodic |
---|
| 71 | table, which users can use to construct new materials. GGE provides |
---|
| 72 | a pre-constructed database of materials taken from the PDG book. |
---|
| 73 | They can be loaded, used, edited and saved as persistent |
---|
| 74 | objects. |
---|
| 75 | </para> |
---|
| 76 | |
---|
| 77 | <para> |
---|
| 78 | Users can also create new materials either from scratch or by |
---|
| 79 | combining other materials. |
---|
| 80 | |
---|
| 81 | <itemizedlist spacing="compact"> |
---|
| 82 | <listitem><para> |
---|
| 83 | creating a material from scratch: |
---|
| 84 | <para> |
---|
| 85 | <informaltable> |
---|
| 86 | <tgroup cols="11"> |
---|
| 87 | <tbody> |
---|
| 88 | <row> |
---|
| 89 | <entry>Use</entry> |
---|
| 90 | <entry>Name</entry> |
---|
| 91 | <entry>A</entry> |
---|
| 92 | <entry>Z</entry> |
---|
| 93 | <entry>Density</entry> |
---|
| 94 | <entry>Unit</entry> |
---|
| 95 | <entry>State</entry> |
---|
| 96 | <entry>Temperature</entry> |
---|
| 97 | <entry>Unit</entry> |
---|
| 98 | <entry>Pressure</entry> |
---|
| 99 | <entry>Unit</entry> |
---|
| 100 | </row> |
---|
| 101 | </tbody> |
---|
| 102 | </tgroup> |
---|
| 103 | </informaltable> |
---|
| 104 | </para> |
---|
| 105 | <para> |
---|
| 106 | Only the elements and materials used in the logical volumes are |
---|
| 107 | kept in the detector object and are used to generate C++ |
---|
| 108 | constructors. <emphasis role="bold">Use</emphasis> marks the used materials. |
---|
| 109 | </para> |
---|
| 110 | </para></listitem> |
---|
| 111 | <listitem><para> |
---|
| 112 | Constructor to create a material from a combination of |
---|
| 113 | elements, subsequently added via <literal>AddElement</literal> |
---|
| 114 | <para> |
---|
| 115 | <informaltable> |
---|
| 116 | <tgroup cols="9"> |
---|
| 117 | <tbody> |
---|
| 118 | <row> |
---|
| 119 | <entry>Use</entry> |
---|
| 120 | <entry>Name</entry> |
---|
| 121 | <entry>Elements</entry> |
---|
| 122 | <entry>Density</entry> |
---|
| 123 | <entry>Unit</entry> |
---|
| 124 | <entry>State</entry> |
---|
| 125 | <entry>Temperature</entry> |
---|
| 126 | <entry>Unit</entry> |
---|
| 127 | <entry>Pressure</entry> |
---|
| 128 | <entry>Unit</entry> |
---|
| 129 | </row> |
---|
| 130 | </tbody> |
---|
| 131 | </tgroup> |
---|
| 132 | </informaltable> |
---|
| 133 | </para> |
---|
| 134 | |
---|
| 135 | <para> |
---|
| 136 | By clicking the column <emphasis role="bold">Elements</emphasis>, a new |
---|
| 137 | window is open to select one of two methods: |
---|
| 138 | |
---|
| 139 | <itemizedlist spacing="compact"> |
---|
| 140 | <listitem><para> |
---|
| 141 | Add an element, giving fraction by weight |
---|
| 142 | </para></listitem> |
---|
| 143 | <listitem><para> |
---|
| 144 | Add an element, giving number of atoms. |
---|
| 145 | </para></listitem> |
---|
| 146 | </itemizedlist> |
---|
| 147 | </para> |
---|
| 148 | </para></listitem> |
---|
| 149 | </itemizedlist> |
---|
| 150 | </para> |
---|
| 151 | |
---|
| 152 | </sect3> |
---|
| 153 | |
---|
| 154 | <!-- ******************* Section (Level#3) ****************** --> |
---|
| 155 | <sect3 id="sect.Geom.Edit.Solids"> |
---|
| 156 | <title> |
---|
| 157 | Solids |
---|
| 158 | </title> |
---|
| 159 | |
---|
| 160 | <para> |
---|
| 161 | The most popular CSG solids (<literal>G4Box</literal>, <literal>G4Tubs</literal>, |
---|
| 162 | <literal>G4Cons</literal>, <literal>G4Trd</literal>) and specific BREPs solids |
---|
| 163 | (Pcons, Pgons) are supported at present. All related parameters of such a |
---|
| 164 | solid can be specified in a parameter widget. |
---|
| 165 | </para> |
---|
| 166 | |
---|
| 167 | <para> |
---|
| 168 | Users will be able to view each solid using DAWN. |
---|
| 169 | </para> |
---|
| 170 | |
---|
| 171 | </sect3> |
---|
| 172 | |
---|
| 173 | <!-- ******************* Section (Level#3) ****************** --> |
---|
| 174 | <sect3 id="sect.Geom.Edit.LogVol"> |
---|
| 175 | <title> |
---|
| 176 | Logical Volume |
---|
| 177 | </title> |
---|
| 178 | |
---|
| 179 | <para> |
---|
| 180 | GGE can specify the following items: |
---|
| 181 | |
---|
| 182 | <informaltable> |
---|
| 183 | <tgroup cols="4"> |
---|
| 184 | <tbody> |
---|
| 185 | <row> |
---|
| 186 | <entry>Name</entry> |
---|
| 187 | <entry>Solid</entry> |
---|
| 188 | <entry>Material</entry> |
---|
| 189 | <entry>VisAttribute</entry> |
---|
| 190 | </row> |
---|
| 191 | </tbody> |
---|
| 192 | </tgroup> |
---|
| 193 | </informaltable> |
---|
| 194 | </para> |
---|
| 195 | |
---|
| 196 | <para> |
---|
| 197 | The construction and assignment of appropriate entities for |
---|
| 198 | <literal>G4FieldManager</literal> and <literal>G4VSensitiveDetector</literal> |
---|
| 199 | are left to the user. |
---|
| 200 | </para> |
---|
| 201 | |
---|
| 202 | </sect3> |
---|
| 203 | |
---|
| 204 | <!-- ******************* Section (Level#3) ****************** --> |
---|
| 205 | <sect3 id="sect.Geom.Edit.PhysVol"> |
---|
| 206 | <title> |
---|
| 207 | Physical Volume |
---|
| 208 | </title> |
---|
| 209 | |
---|
| 210 | <para> |
---|
| 211 | A single copy of a physical volume can be created. Also repeated |
---|
| 212 | copies can be created in several manners. First, a user can |
---|
| 213 | translate the logical volume linearly. |
---|
| 214 | |
---|
| 215 | <informaltable> |
---|
| 216 | <tgroup cols="9"> |
---|
| 217 | <tbody> |
---|
| 218 | <row> |
---|
| 219 | <entry>Name</entry> |
---|
| 220 | <entry>LogicalVolume</entry> |
---|
| 221 | <entry>MotherVolume</entry> |
---|
| 222 | <entry>Many</entry> |
---|
| 223 | <entry>X0, Y0, Z0</entry> |
---|
| 224 | <entry>Direction</entry> |
---|
| 225 | <entry>StepSize</entry> |
---|
| 226 | <entry>Unit</entry> |
---|
| 227 | <entry>CopyNumber</entry> |
---|
| 228 | </row> |
---|
| 229 | </tbody> |
---|
| 230 | </tgroup> |
---|
| 231 | </informaltable> |
---|
| 232 | </para> |
---|
| 233 | |
---|
| 234 | <para> |
---|
| 235 | Combined translation and rotation are also possible, placing an |
---|
| 236 | object repeatedly on a ``cylindrical'' pattern. Simple models of |
---|
| 237 | replicas and parametrised volume are also implemented. In the |
---|
| 238 | replicas, a volume is slices to create new sub-volumes. In |
---|
| 239 | parametrised volumes, several patterns of volumes can be |
---|
| 240 | created. |
---|
| 241 | </para> |
---|
| 242 | |
---|
| 243 | </sect3> |
---|
| 244 | |
---|
| 245 | <!-- ******************* Section (Level#3) ****************** --> |
---|
| 246 | <sect3 id="sect.Geom.Edit.GeneCode"> |
---|
| 247 | <title> |
---|
| 248 | Generation of C++ code: <literal>MyDetectorConstruction.cc</literal> |
---|
| 249 | </title> |
---|
| 250 | |
---|
| 251 | <para> |
---|
| 252 | By simply pushing a button, source code in the form of an |
---|
| 253 | include file and a source file are created. They are called |
---|
| 254 | <literal>MyDetectorConstruction.cc</literal> and <literal>.hh</literal> files. |
---|
| 255 | They reflect all current user modifications in real-time. |
---|
| 256 | </para> |
---|
| 257 | |
---|
| 258 | </sect3> |
---|
| 259 | |
---|
| 260 | <!-- ******************* Section (Level#3) ****************** --> |
---|
| 261 | <sect3 id="sect.Geom.Edit.Vis"> |
---|
| 262 | <title> |
---|
| 263 | Visualization |
---|
| 264 | </title> |
---|
| 265 | |
---|
| 266 | <para> |
---|
| 267 | Examples of individual solids can be viewed with the help of |
---|
| 268 | DAWN. The visualization of the whole geometry is be done after the |
---|
| 269 | compilation of the source code <literal>MyDetectorConstruction.cc</literal> |
---|
| 270 | with appropriate parts of Geant4. (In particular only the geometry |
---|
| 271 | and visualization, together with the small other parts they depend |
---|
| 272 | on, are needed.) |
---|
| 273 | </para> |
---|
| 274 | |
---|
| 275 | |
---|
| 276 | </sect3> |
---|
| 277 | </sect2> |
---|