- Timestamp:
- Dec 16, 2009, 12:14:47 PM (15 years ago)
- Location:
- trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml
- Files:
-
- 2 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/AllResources/Control/UIcommands/_.html
r904 r1222 3 3 <p><hr><p> 4 4 <h2>Sub-directories : </h2><dl> 5 <p><br><p><dt><a href="_adjoint_.html">/adjoint/</a> 6 <p><dd>Adjoint (Reverse Monte Carlo) commands. 5 7 <p><br><p><dt><a href="_control_.html">/control/</a> 6 8 <p><dd>UI control commands. … … 32 34 <p><dd>Commands for materials 33 35 </dl><p><hr><p> 36 34 37 <h2>Commands : </h2><dl> 38 <p><br><p><dt><b>cd, pwd</b> 39 <p><dd> 40 change, display the current command directory.<br> 41 <p><br><p><dt><b>ls, lc</b> 42 <p><dd> 43 list commands and subdirectories in the current directory.<br> 44 <p><br><p><dt><b>history</b> 45 <p><dd> 46 show previous commands.<br> 47 <p><br><p><dt><b>!historyID</b> 48 <p><dd> 49 reissue previous command.<br> 50 <p><br><p><dt><b>?command</b> 51 <p><dd> 52 show current parameter values of the command.<br> 53 <p><br><p><dt><b>help command</b> 54 <p><dd> 55 show command help.<br> 56 <p><br><p><dt><b>exit</b> 57 <p><dd> 58 terminate the session.<br> 59 60 35 61 </dl></body></html> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Appendix/makeFile.xml
r1213 r1222 454 454 <varlistentry> 455 455 <term> 456 G4UI_BUILD_XM_SESSION 457 </term> 458 <listitem> 459 Specifies to include in kernel library the <emphasis>XM</emphasis>. 460 </listitem> 461 </varlistentry> 462 <varlistentry> 463 <term> 464 G4UI_USE_XM 465 </term> 466 <listitem> 467 Specifies to use the <emphasis>XM</emphasis> 456 G4UI_BUILD_XM_SESSION, G4UI_BUILD_XAW_SESSION 457 </term> 458 <listitem> 459 Specifies to include in kernel library the <emphasis>XM</emphasis> or 460 <emphasis>XAW</emphasis> Motif-based user interfaces. 461 </listitem> 462 </varlistentry> 463 <varlistentry> 464 <term> 465 G4UI_USE_XM, G4UI_USE_XAW 466 </term> 467 <listitem> 468 Specifies to use the <emphasis>XM</emphasis> or <emphasis>XAW</emphasis> 468 469 interfaces in the application to be built. 469 470 </listitem> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Appendix/pythonInterface.xml
r1211 r1222 3 3 <!-- [History] --> 4 4 <!-- Created by Koichi Murakami, Dec-2008 --> 5 <!-- Correct typo by KM Dec-2009 --> 5 6 <!-- --> 6 7 <!-- ******************************************************** --> 7 8 8 9 9 <!-- ******************* Section (Level#1) ****************** --> 10 10 <sect1 id="sect.PythonInterface"> … … 15 15 <para> 16 16 Python is a popular scripting language with an interactive interpreter. 17 Geant4Py, a Geant4-Python bridge, provides a bridge for Geant4 classes. 17 Geant4Py, a Geant4-Python bridge, provides a bridge for Geant4 classes. 18 18 This enables to directly access Geant4 classes from Python scripting. 19 User applications can be easily configured with many Python 19 User applications can be easily configured with many Python 20 20 third-party modules, such as PyROOT, on the Python software bus. 21 21 </para> … … 37 37 38 38 <para> 39 Geant4Py requires 40 <ulink url="http://www.boost.org/">Boost-C++ external library</ulink>, 39 Geant4Py requires 40 <ulink url="http://www.boost.org/">Boost-C++ external library</ulink>, 41 41 which helps Python binding of C++ codes. 42 A Precompiled package is available for many Linux distributions 42 A Precompiled package is available for many Linux distributions 43 43 (SL, SuSE, Ubuntu, etc) and Mac OSX. 44 44 </para> 45 45 46 46 <para> 47 Geant4 libraries can be built as "static" and "granular", 48 where library components (variables, functions, ...) 49 used in the application are linked statically and shipped 50 with the application. 51 On the other hands, in dynamic binding, the library components 52 are not included in the application, and their binding is 53 carried out at run time. 54 The modular approach of Python is based on dynamic binding mechanism, 55 so you have Geant4 shared libraries are required instead. 56 </para> 57 58 <para> 59 For generic information about building Geant4 libraries, 47 Geant4 libraries can be built as "static" and "granular", 48 where library components (variables, functions, ...) 49 used in the application are linked statically and shipped 50 with the application. 51 On the other hands, in dynamic binding, the library components 52 are not included in the application, and their binding is 53 carried out at run time. 54 The modular approach of Python is based on dynamic binding mechanism, 55 so you have Geant4 shared libraries are required instead. 56 </para> 57 58 <para> 59 For generic information about building Geant4 libraries, 60 60 please refer to the <ulink url="http://cern.ch/geant4/G4UsersDocuments/UsersGuides/InstallationGuide/html/">Installation Guide</ulink>. 61 61 </para> 62 62 63 63 <para> 64 Here are some tips for manually building "global" and "shared" libraries 64 Here are some tips for manually building "global" and "shared" libraries 65 65 from an already existing "static + granular" installation. 66 66 After setting additional environment variables like: … … 129 129 </informalexample> 130 130 131 In addition, it is required that all header files are installed 131 In addition, it is required that all header files are installed 132 132 in a single directory. 133 133 … … 139 139 </informalexample> 140 140 141 This will collect all relevant header files 141 This will collect all relevant header files 142 142 in <literal>$G4INSTALL/include</literal> (or <literal>$G4INCLUDE</literal>). 143 143 </para> 144 144 145 145 <para> 146 There are a lso additional tools for helping building a Geant4 library in146 There are additional tools for helping building a Geant4 library in 147 147 the directory <literal>g4py/tools/</literal>. 148 148 </para> … … 213 213 <programlisting> 214 214 # ./configure linux64 215 --with-g4-incdir=/opt/heplib/Geant4/geant4.9.3/include 216 --with-g4-libdir=/opt/heplib/Geant4/geant4.9.3/slib/Linux-g++ 217 --with-clhep-incdir=/opt/heplib/CLHEP/2.0.4. 4/include218 --with-clhep-libdir=/opt/heplib/CLHEP/2.0.4. 4/lib219 --with-clhep-lib=CLHEP-2.0.4. 4220 </programlisting> 221 </informalexample> 222 223 The configure script automatically check your environment, 224 and create <literal>config/config.gmk</literal>, 225 which describes your envrionment. 226 227 After executing the configure script successfully, then 215 --with-g4-incdir=/opt/heplib/Geant4/geant4.9.3/include 216 --with-g4-libdir=/opt/heplib/Geant4/geant4.9.3/slib/Linux-g++ 217 --with-clhep-incdir=/opt/heplib/CLHEP/2.0.4.5/include 218 --with-clhep-libdir=/opt/heplib/CLHEP/2.0.4.5/lib 219 --with-clhep-lib=CLHEP-2.0.4.5 220 </programlisting> 221 </informalexample> 222 223 The configure script automatically check your environment, 224 and create <literal>config/config.gmk</literal>, 225 which describes your envrionment. 226 227 After executing the configure script successfully, then 228 228 229 229 <informalexample> … … 246 246 247 247 <para> 248 <emphasis role="bold">PYTHONPATH</emphasis> environment variable 248 <emphasis role="bold">PYTHONPATH</emphasis> environment variable 249 249 should be set at tun time. 250 <emphasis role="bold">PYTHONPATH</emphasis> environment variable indicates 251 Python module search directories, given by a colon-separated list 252 of directories. Practically, the variable is 250 <emphasis role="bold">PYTHONPATH</emphasis> environment variable indicates 251 Python module search directories, given by a colon-separated list 252 of directories. Practically, the variable is 253 253 <literal>(your g4py directory)/lib</literal>. 254 254 </para> … … 264 264 <programlisting> 265 265 # python 266 Python 2. 5.2 (r252:60911, Aug 1 2008, 00:37:21)267 [GCC 4. 3.2] on linux2266 Python 2.6.2 (r262:71600, Oct 24 2009, 03:15:21) 267 [GCC 4.4.1 [gcc-4_4-branch revision 150839]] on linux2 268 268 Type "help", "copyright", "credits" or "license" for more information. 269 269 >>> from Geant4 import * … … 277 277 278 278 Visualization Manager instantiating... 279 >>> 279 >>> 280 280 </programlisting> 281 281 </informalexample> … … 290 290 <para> 291 291 When importing the Geant4 module, the <literal>G4RunManager</literal> 292 object will be automatically instantiated. Geant4 singleton objects are also 293 automatically instantiated. These singleton objects can be accessed 292 object will be automatically instantiated. Geant4 singleton objects are also 293 automatically instantiated. These singleton objects can be accessed 294 294 by "gXXXX" variables, like "gRunManager". 295 295 … … 301 301 gElementTable gParticleIterator gUImanager 302 302 gEmCalculator gParticleTable gVisManager 303 gEventManager gProcessTable 304 gExceptionHandler gProductionCutsTable 305 gG4Date gRunManager 306 gG4VERSION_NUMBER gRunManagerKernel 307 gG4Version gStackManager 308 gGeometryManager gStartUISession 309 gGetCurrentValues gStateManager 303 gEventManager gProcessTable 304 gExceptionHandler gProductionCutsTable 305 gG4Date gRunManager 306 gG4VERSION_NUMBER gRunManagerKernel 307 gG4Version gStackManager 308 gGeometryManager gStartUISession 309 gGetCurrentValues gStateManager 310 310 </programlisting> 311 311 </informalexample> … … 319 319 320 320 <para> 321 Once a Python object of a Geant4 class instantiated, 321 Once a Python object of a Geant4 class instantiated, 322 322 Geant4 methods can be directly called the same way as in C++. 323 323 … … 352 352 353 353 <para> 354 Geant4Py provides additional utility modules called "g4py" in the directory 355 <literal>site-modules</literal>. It consists of predifined geometries, 354 Geant4Py provides additional utility modules called "g4py" in the directory 355 <literal>site-modules</literal>. It consists of predifined geometries, 356 356 materials, physics lists, primary generator actions, and so on. 357 357 </para> … … 363 363 364 364 <para> 365 The <emphasis>ezgeom</emphasis> module provides an alternative way 366 of defining simple geometry. 365 The <emphasis>ezgeom</emphasis> module provides an alternative way 366 of defining simple geometry. 367 367 An example code for defining a simple geometry is shown here: 368 368 </para> … … 396 396 397 397 <para> 398 The <emphasis>NISTmaterials</emphasis> module provides an instant 398 The <emphasis>NISTmaterials</emphasis> module provides an instant 399 399 use of Geant4 NIST materials. 400 400 An example code for creating NIST materials: … … 418 418 419 419 <para> 420 The <emphasis>ParticleGun</emphasis> module provides 420 The <emphasis>ParticleGun</emphasis> module provides 421 421 a primary generator action with <literal>G4ParticleGun</literal>. 422 422 An example code is shown here: … … 456 456 457 457 <para> 458 There are some examples of Geant4Py in the directories 458 There are some examples of Geant4Py in the directories 459 459 <literal>"tests/"</literal> and <literal>"examples/"</literal>. 460 460 </para> 461 461 462 In the <literal>"tests/"</literal> directory, 462 In the <literal>"tests/"</literal> directory, 463 463 464 464 <informalexample> … … 474 474 </informalexample> 475 475 476 The <literal>"examples/"</literal> directory contains 476 The <literal>"examples/"</literal> directory contains 477 477 a set of examples of Geant4Py. 478 478 … … 483 483 <para> 484 484 An example of "water phantom dosimetry". 485 This demo program shows that a Geant4 application well coworks with Root 486 on Python front end. VisManager, PrimaryGeneratorAction, UserAction-s, 485 This demo program shows that a Geant4 application well coworks with Root 486 on Python front end. VisManager, PrimaryGeneratorAction, UserAction-s, 487 487 histogramming with Root are implemented in Python; 488 488 <itemizedlist> … … 521 521 <para> 522 522 GUI interface of ExN03, which can control geometry configuration, 523 intial particle condition, physics processes, cut value, 523 intial particle condition, physics processes, cut value, 524 524 magnetic field and visualization outputs. 525 525 </para> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Control/commands.xml
r904 r1222 34 34 </para> 35 35 36 36 37 <note> 37 38 <title> … … 49 50 50 51 <para> 51 <ulink url="./AllResources/Control/UIcommands/_.html"> 52 List of built-in commands 53 </ulink> 52 The following is a short summary of available commands. You can also 53 see the all available commands by executeing 'help' in your UI session. 54 55 <itemizedlist spacing="compact"> 56 <listitem><para> 57 <ulink url="./AllResources/Control/UIcommands/_.html"> 58 List of built-in commands</ulink> 59 </para></listitem> 60 </itemizedlist> 54 61 </para> 62 55 63 56 64 </sect1> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Detector/electroMagneticField.xml
r904 r1222 13 13 <!-- Corrections, changes by: John APOSTOLAKIS, 7-Jul-2005 --> 14 14 <!-- Converted to DocBook: Katsuya Amako, Aug-2006 --> 15 <!-- Corrections, changes by: John APOSTOLAKIS,15-Dec-2009 --> 15 16 <!-- --> 16 17 <!-- ******************************************************** --> … … 441 442 442 443 <para> 444 A new stepper for propagation in magnetic field is available in 445 release 9.3. Choosing the G4NystromRK4 stepper provides accuracy 446 near that of G4ClassicalRK4 (4th order) with a significantly reduced 447 cost in field evaluation. Using a novel analytical expression for 448 estimating the error of a proposed step and the Nystrom reuse of the 449 mid-point field value, it requires only 2 additional field 450 evaluations per attempted step, in place of 10 field evaluations of 451 ClassicalRK4 (which uses the general midpoint method for estimating 452 the step error.) 453 454 <informalexample> 455 <programlisting> 456 G4Mag_UsualEqRhs* 457 pMagFldEquation = new G4Mag_UsualEqRhs(fMagneticField); 458 fStepper = new G4NystromRK4( pMagFldEquation ); 459 </programlisting> 460 </informalexample> 461 </para> 462 463 <para> 464 It is proposed as an alternative stepper in the case of a pure 465 magnetic field. It is not applicable for the simulation of electric 466 or full electromagnetic or other types of field. For a pure 467 magnetic field, results should be fully compatible with the results 468 of ClassicalRK4 in nearly all cases. ( The only potential exceptions 469 are large steps for tracks with small momenta - which cannot be 470 integrated well by any RK method except the Helical extended methods.) 471 </para> 472 473 <para> 443 474 You can choose an alternative stepper either when the field 444 475 manager is constructed or later. At the construction of the … … 546 577 the position of the track after a number of boundary crossings is 547 578 directly proportional to the number of boundaries. 579 </para> 580 581 </sect3> 582 583 584 <!-- ******************* Section (Level#3) ****************** --> 585 <sect3 id="sect.EMField.Pract.RedNumCall"> 586 <title> 587 Reducing the number of field calls to speed-up simulation 588 </title> 589 590 <para> 591 An additional method to reduce the number of field evaluations is 592 to utilise the new class G4CachedMagneticField class. It is 593 applicable only for pure magnetic fields which do not vary with time. 594 595 596 <informalexample> 597 <programlisting> 598 G4MagneticField * pMagField; // Your field - Defined elsewhere 599 600 G4double distanceConst = 2.5 * millimeter; 601 G4MagneticField * pCachedMagField= new G4CachedMagneticField( pMagField, distanceConst); 602 </programlisting> 603 </informalexample> 548 604 </para> 549 605 -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Detector/geomNav.xml
r1211 r1222 432 432 The optimisation can be switched off in such cases, by invoking the 433 433 following method with argument <literal>skip = 0</literal>: 434 435 <!-- ******* Bridgehead ******* --> 436 <bridgehead renderas='sect4'> 437 Phantoms with only one material 438 </bridgehead> 439 440 <para> 441 If you want to describe a phantom of a unique material, you may spare some memory by not filling the set of indices of materials of each voxel. If the method <literal>SetMaterialIndices()</literal> is not invoked, the index for all voxels will be 0, that is the first (and unique) material in your list. 442 </para> 434 443 435 444 <informalexample> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Examples/AdvancedCodes.xml
r1211 r1222 40 40 <itemizedlist spacing="compact"> 41 41 <listitem><para> 42 <ulink url="http://geant4advancedexampleswg.wikispaces.com/ExamplesDocumentation/">43 <emphasis role="bold">air_shower</emphasis>44 </ulink>45 , a simulation of the ULTRA detector with Fresnel lenses46 for UV and charged particles detection in cosmic rays.47 </para></listitem>48 <listitem><para>49 42 <ulink url="http://geant4advancedexampleswg.wikispaces.com/file/view/EcalDocumentationFile.pdf"> 50 43 <emphasis role="bold">amsEcal</emphasis> … … 53 46 </para></listitem> 54 47 <listitem><para> 55 <ulink url="http://geant4advancedexampleswg.wikispaces.com/brachytherapyExample /">48 <ulink url="http://geant4advancedexampleswg.wikispaces.com/brachytherapyExample"> 56 49 <emphasis role="bold">brachytherapy</emphasis> 57 50 </ulink> … … 59 52 energy deposit in a Phantom filled with soft tissue. 60 53 </para></listitem> 54 55 <listitem><para> 56 <ulink url="http://geant4advancedexampleswg.wikispaces.com/CompositeCalorimeter"> 57 <emphasis role="bold">composite_calorimeter</emphasis> 58 </ulink> 59 , test-beam simulation of the CMS Hadron calorimeter at LHC. 60 </para></listitem> 61 62 <listitem><para> 63 <ulink url="http://geant4advancedexampleswg.wikispaces.com/Gamma-rayTelescope"> 64 <emphasis role="bold">gammaray_telescope</emphasis> 65 </ulink> 66 , illustrating an application to typical gamma ray telescopes with a 67 flexible configuration. 68 </para></listitem> 69 61 70 <listitem><para> 62 <ulink url="http://g eant4advancedexampleswg.wikispaces.com/hadrontherapyExample/">71 <ulink url="http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy"> 63 72 <emphasis role="bold">hadrontherapy</emphasis> 64 73 </ulink> 65 , illustrating a application simulating an hadron therapy beam line 66 for medical physics. 74 : it is an advanced tool for people interested in Monte Carlo studies related 75 to proton/ion therapy. Hadrontherapy permits the simulation of a typical hadron therapy beam line 76 (with all its elements) and the calculation of fundamentals quantities of 77 interests: 3D dose distributions, fluences, stopping powers, production cross sections 78 for the produced secondary particle, etc.; In the near future 79 new tools will be added: Hadrontherapy will permit the calculation of LET and RBE for both 80 proton and ion beams and it will include the possibility to simulate a typical active scanning proton 81 therapy transport beam line. 82 Please contact the authors for more details on the upcoming features. 67 83 </para></listitem> 84 68 85 <listitem><para> 69 <ulink url="http://geant4advancedexampleswg.wikispaces.com/ ExamplesDocumentation/">86 <ulink url="http://geant4advancedexampleswg.wikispaces.com/Human_Phantom"> 70 87 <emphasis role="bold">human_phantom</emphasis> 71 88 </ulink> … … 74 91 <ulink url="http://cern.ch/gdml/">GDML</ulink> representation. 75 92 </para></listitem> 93 76 94 <listitem><para> 77 <ulink url="http://g eant4advancedexampleswg.wikispaces.com/MedicalLinac/">95 <ulink url="http://g4advancedexamples.lngs.infn.it/Examples/medical-linac"> 78 96 <emphasis role="bold">medical_linac</emphasis> 79 97 </ulink> … … 83 101 set-up is very similar to one used in clinical practice. 84 102 </para></listitem> 103 85 104 <listitem><para> 86 105 <ulink url="http://geant4advancedexampleswg.wikispaces.com/microbeamExample/"> … … 91 110 Bordeaux-Gradignan, France. 92 111 </para></listitem> 112 93 113 <listitem><para> 94 114 <ulink url="http://geant4advancedexampleswg.wikispaces.com/microdosimetryExample/"> … … 98 118 in liquid water using very low energy electromagnetic Geant4 DNA processes. 99 119 </para></listitem> 120 100 121 <listitem><para> 101 122 <ulink url="http://geant4advancedexampleswg.wikispaces.com/nanobeamExample/"> … … 106 127 France. 107 128 </para></listitem> 129 108 130 <listitem><para> 109 <ulink url="http://geant4advancedexampleswg.wikispaces.com/ ExamplesDocumentation/">131 <ulink url="http://geant4advancedexampleswg.wikispaces.com/PurgingMagnet"> 110 132 <emphasis role="bold">purging_magnet</emphasis> 111 133 </ulink> … … 114 136 simulating a strong purging magnet in a treatment head. 115 137 </para></listitem> 138 116 139 <listitem><para> 117 140 <ulink url="http://geant4advancedexampleswg.wikispaces.com/Radioprotection/"> … … 122 145 defined interplanetary space radiation environment. 123 146 </para></listitem> 124 <listitem><para> 125 <ulink url="http://geant4advancedexampleswg.wikispaces.com/Gamma-rayTelescope/"> 126 <emphasis role="bold">gammaray_telescope</emphasis> 127 </ulink> 128 , illustrating an application to typical gamma ray telescopes with a 129 flexible configuration. 130 </para></listitem> 147 131 148 <listitem><para> 132 149 <ulink url="http://geant4advancedexampleswg.wikispaces.com/X-rayTelescope/"> … … 142 159 , illustrating the emission of X-ray fluorescence and PIXE. 143 160 </para></listitem> 161 144 162 <listitem><para> 145 163 <ulink url="http://geant4advancedexampleswg.wikispaces.com/ExamplesDocumentation/UndergroundPhysics/"> … … 148 166 , illustrating an underground detector for dark matter searches. 149 167 </para></listitem> 150 <listitem><para> 151 <ulink url="http://geant4advancedexampleswg.wikispaces.com/CompositeCalorimeter/"> 152 <emphasis role="bold">composite_calorimeter</emphasis> 153 </ulink> 154 , test-beam simulation of the CMS Hadron calorimeter at LHC. 155 </para></listitem> 168 156 169 <listitem><para> 157 170 <ulink url="http://geant4advancedexampleswg.wikispaces.com/ExamplesDocumentation/lArCalorimeter/"> … … 161 174 Detector at LHC. 162 175 </para></listitem> 176 163 177 <listitem><para> 164 178 <ulink url="http://geant4advancedexampleswg.wikispaces.com/ExamplesDocumentation/Rich/"> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Examples/ExtendedCodes.xml
r1211 r1222 649 649 </para></listitem> 650 650 <listitem><para> 651 <ulink url="http://cern.ch/geant4/geant4_public/source/geant4/examples/extended/medical/electronScattering2/README"> 652 electronScattering2 653 </ulink> 654 - benchmark on electron scattering (second way to implement the same benchmark as the above) 655 </para></listitem> 656 <listitem><para> 651 657 <ulink url="http://cern.ch/geant4/geant4_public/source/geant4/examples/extended/medical/GammaTherapy/README"> 652 658 GammaTherapy -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Fundamentals/biasing.xml
r1211 r1222 2 2 <!-- --> 3 3 <!-- [History] --> 4 <!-- New section on Reverse MC: L. Desorgher, Dec-2009 --> 4 5 <!-- Converted to DocBook: Katsuya Amako, Aug-2006 --> 5 6 <!-- Changed by: Dennis Wright, 25-Jun-2002 --> … … 1099 1100 1100 1101 </sect2> 1102 1103 <!-- ******************* Section (Level#2) ****************** --> 1104 <sect2 id="sect.EvtBias.ReverseMC"> 1105 <title> 1106 Adjoint/Reverse Monte Carlo 1107 </title> 1108 1109 <para> 1110 Another powerful biasing technique available in Geant4 is the Reverse Monte Carlo (RMC) method, 1111 also known as the Adjoint Monte Carlo method. In this method particles are generated on the external 1112 boundary of the sensitive part of the geometry and then are tracked backward in the geometry till they 1113 reach the external source surface, 1114 or exceed an energy threshold. By this way the computing time is focused only on particle tracks 1115 that are contributing to the tallies. 1116 The RMC method is much rapid than the Forward MC method when the sensitive part of the geometry is 1117 small compared to the rest of the geometry and to the external source, that has to be extensive and 1118 not beam like. At the moment the RMC method is implemented in Geant4 only for some electromagnetic 1119 processes (see <xref linkend="sect.EvtBias.ReverseMC.InG4.Process" />). An example illustrating the use 1120 of the Reverse MC method in Geant4 is distributed within the Geant4 1121 toolkit in <emphasis role="bold">examples/extended/biasing/ReverseMC01</emphasis>. 1122 </para> 1123 1124 <!-- ******************* Section (Level#3) ****************** --> 1125 <sect3 id="sect.EvtBias.ReverseMC.InG4"> 1126 <title> 1127 Treatment of the Reverse MC method in Geant4 1128 </title> 1129 1130 <para> 1131 Different G4Adjoint classes have been implemented into the Geant4 1132 toolkit in order to run an adjoint/reverse simulation in a Geant4 application. 1133 This implementation is illustrated in <xref linkend="fig.EvtBias.ReverseMC.InG4_1" />. 1134 An adjoint run is divided in a serie of alternative adjoint and forward tracking of adjoint and normal particles. 1135 One Geant4 event treats one of this tracking phase. 1136 </para> 1137 1138 <figure id="fig.EvtBias.ReverseMC.InG4_1"> 1139 <title> 1140 Schematic view of an adjoint/reverse simulation in Geant4 1141 </title> 1142 <mediaobject> 1143 <imageobject role="fo"> 1144 <imagedata fileref="./AllResources/Fundamentals/ReverseMC_tracking.png" 1145 format="png" align="center" /> 1146 </imageobject> 1147 <imageobject role="html"> 1148 <imagedata fileref="./AllResources/Fundamentals/ReverseMC_tracking.png" 1149 format="png" align="center" /> 1150 </imageobject> 1151 </mediaobject> 1152 </figure> 1153 1154 1155 <!-- ******************* Section (Level#4) ****************** --> 1156 <sect4 id="sect.EvtBias.ReverseMC.InG4.AdjointTracking"> 1157 <title> 1158 Adjoint tracking phase 1159 </title> 1160 1161 <para> 1162 Adjoint particles (adjoint_e-, adjoint_gamma,...) are generated one by one on the so called adjoint source 1163 with random position, energy (1/E distribution) and direction. The adjoint source is the 1164 external surface of a user defined volume or of a user defined sphere. The adjoint 1165 source should contain one or several sensitive volumes and should be small compared to the entire geometry. 1166 The user can set the minimum and maximum energy of the adjoint source. After its 1167 generation the adjoint primary particle is tracked backward in the geometry till a user defined 1168 external surface 1169 (spherical or boundary of a volume) or is killed before if it reaches a user defined upper energy limit that 1170 represents the maximum energy of the external source. During the reverse tracking, reverse 1171 processes take place where the adjoint particle being tracked can be either scattered 1172 or transformed in another type of adjoint particle. During the reverse tracking the 1173 G4AdjointSimulationManager replaces the user defined primary, run, stepping, ... actions, by its own actions. 1174 A reverse tracking phase corresponds to one Geant4 event. 1175 </para> 1176 1177 </sect4> 1178 1179 <!-- ******************* Section (Level#4) ****************** --> 1180 <sect4 id="sect.EvtBias.ReverseMC.InG4.ForwardTracking"> 1181 <title> 1182 Forward tracking phase 1183 </title> 1184 1185 <para> 1186 When an adjoint particle reaches the external surface its weight, type, position, 1187 and direction are registered and a normal primary particle, with a type equivalent to the last generated primary 1188 adjoint, is generated with the same energy, position but opposite direction and is tracked in the forward direction 1189 in the sensitive region as in a forward MC simulation. 1190 During this forward tracking phase the 1191 event, stacking, stepping, tracking actions defined by the user for his forward simulation are used. 1192 By this clear separation between 1193 adjoint and forward tracking phases, the code of the user developed for a forward simulation 1194 should be only slightly modified to adapt it for an adjoint simulation (see <xref linkend="sect.EvtBias.ReverseMC.UserCoding" />). 1195 Indeed the computation of the signals is done by the same actions 1196 or classes that the one used in the forward simulation mode. 1197 A forward tracking phase corresponds to one G4 event. 1198 </para> 1199 1200 </sect4> 1201 1202 <!-- ******************* Section (Level#4) ****************** --> 1203 <sect4 id="sect.EvtBias.ReverseMC.InG4.Process"> 1204 <title> 1205 Reverse processes 1206 </title> 1207 1208 <para> 1209 During the reverse tracking, reverse processes act on the adjoint particles. 1210 The reverse processes that are at the moment available in Geant4 are the: 1211 <itemizedlist spacing="compact"> 1212 <listitem><para> 1213 Reverse discrete ionization for e-, proton and ions 1214 </para></listitem> 1215 <listitem><para> 1216 Continuous gain of energy by ionization and bremsstrahlung for e- and by ionization for protons and ions 1217 </para></listitem> 1218 <listitem><para> 1219 Reverse discrete e- bremsstrahlung 1220 </para></listitem> 1221 <listitem><para> 1222 Reverse photo-electric effect 1223 </para></listitem> 1224 <listitem><para> 1225 Reverse Compton scattering 1226 </para></listitem> 1227 <listitem><para> 1228 Approximated multiple scattering (see comment in <xref linkend="sect.EvtBias.ReverseMC.Limitation.ReverseMS"/>) 1229 </para></listitem> 1230 </itemizedlist> 1231 It is important to note that the electromagnetic reverse processes are cut dependent 1232 as their equivalent forward processes. The implementation of the reverse processes is based on 1233 the forward processes implemented in the G4 standard electromagnetic package. 1234 </para> 1235 1236 </sect4> 1237 1238 <!-- ******************* Section (Level#4) ****************** --> 1239 <sect4 id="sect.EvtBias.ReverseMC.InG4.RemarkOnNbEvents"> 1240 <title> 1241 Nb of adjoint particle types and nb of G4 events of an adjoint simulation 1242 </title> 1243 1244 <para> 1245 The list of type of adjoint and forward particles that are generated on the adjoint source 1246 and considered in the simulation is a function of the adjoint processes declared in the physics list. 1247 For example if only the e- and gamma electromagnetic processes are considered, 1248 only adjoint e- and adjoint gamma will be considered as primaries. 1249 In this case an adjoint event will be divided in four G4 event consisting in the reverse tracking of an adjoint e-, 1250 the forward tracking of its equivalent forward e-, the reverse tracking of 1251 an adjoint gamma, and the forward tracking of its equivalent forward gamma. 1252 In this case a run of 100 adjoint events will consist into 400 Geant4 events. 1253 If the proton ionization is also considered adjoint and forward protons are also generated as primaries 1254 and 600 Geant4 events are processed for 100 adjoint events. 1255 </para> 1256 1257 </sect4> 1258 1259 </sect3> 1260 1261 <!-- ******************* Section (Level#3) ****************** --> 1262 <sect3 id="sect.EvtBias.ReverseMC.UserCoding"> 1263 <title> 1264 How to update a G4 application to use the reverse Monte Carlo mode 1265 </title> 1266 1267 <para> 1268 Some modifications are needed to an existing Geant4 application in order to adapt 1269 it for the use of the reverse simulation mode 1270 (see also the G4 example <emphasis role="bold">examples/extended/biasing/ReverseMC01</emphasis>). 1271 It consists into the: 1272 1273 <itemizedlist spacing="compact"> 1274 <listitem><para> 1275 Creation of the adjoint simulation manager in the main code 1276 </para></listitem> 1277 <listitem><para> 1278 Optional declaration of user actions that will be used during the adjoint tracking phase 1279 </para></listitem> 1280 <listitem><para> 1281 Use of a special physics lists that combine the adjoint and forward processes 1282 </para></listitem> 1283 <listitem><para> 1284 Modification of the user analysis part of the code 1285 </para></listitem> 1286 </itemizedlist> 1287 </para> 1288 1289 1290 <!-- ******************* Section (Level#4) ****************** --> 1291 <sect4 id="sect.EvtBias.ReverseMC.UserCoding.Main"> 1292 <title> 1293 Creation of G4AdjointSimManager in the main 1294 </title> 1295 <para> 1296 The class G4AdjointSimManager represents the manager of an adjoint simulation. 1297 This static class should be created somewhere in the main code. The way to do that is illustrated below 1298 <informalexample> 1299 <programlisting> 1300 int main(int argc,char** argv) { 1301 ... 1302 G4AdjointSimManager* theAdjointSimManager = G4AdjointSimManager::GetInstance(); 1303 ... 1304 } 1305 </programlisting> 1306 </informalexample> 1307 By doing this the G4 application can be run in the reverse MC mode as well 1308 as in the forward MC mode. 1309 It is important to note that G4AdjointSimManager 1310 is not a new G4RunManager and that the creation of G4RunManager in the main and the declaration of the geometry, 1311 physics list, and user actions to G4RunManager is still needed. 1312 The definition of the adjoint and external sources and the start of an adjoint simulation can be controlled 1313 by G4UI commands in the directory <emphasis role="bold">/adjoint</emphasis>. 1314 </para> 1315 </sect4> 1316 1317 1318 <!-- ******************* Section (Level#4) ****************** --> 1319 <sect4 id="sect.EvtBias.ReverseMC.UserCoding.AdjointActions"> 1320 <title> 1321 Optional declaration of adjoint user actions 1322 </title> 1323 <para> 1324 During an adjoint simulation the user stepping, tracking, stacking and event actions declared to G4RunManager 1325 are used only during the G4 events dedicated to the forward tracking of normal particles in the sensitive region, 1326 while during the events where adjoint particles are tracked backward the following happen concerning these actions: 1327 1328 <itemizedlist spacing="compact"> 1329 <listitem><para> 1330 The user stepping action is replaced by G4AdjointSteppingAction that is reponsible to stop an adjoint track when 1331 it reaches the external source, exceed the maximum energy of the external source, or cross the adjoint source surface. 1332 If needed the user can declare its own stepping action that will be called by G4AdjointSteppingAction after the 1333 check of stopping track conditions. This stepping action can be different that the stepping action used for the 1334 forward simulation. It is declared to G4AdjointSimManager by the following lines of code : 1335 1336 <informalexample><programlisting> 1337 G4AdjointSimManager* theAdjointSimManager = G4AdjointSimManager::GetInstance(); 1338 theAdjointSimManager->SetAdjointSteppingAction(aUserDefinedSteppingAction); 1339 </programlisting></informalexample> 1340 1341 </para></listitem> 1342 1343 <listitem><para> 1344 No stacking, tracking and event actions are considered by default. If needed the user can declare to G4AdjointSimManager 1345 stacking, tracking and event actions that will be used only during the adjoint tracking phase. 1346 The following lines of code show how to declare these adjoint actions to G4AdjointSimManager: 1347 1348 <informalexample><programlisting> 1349 G4AdjointSimManager* theAdjointSimManager = G4AdjointSimManager::GetInstance(); 1350 theAdjointSimManager->SetAdjointEventAction(aUserDefinedEventAction); 1351 theAdjointSimManager->SetAdjointStackingAction(aUserDefinedStackingAction); 1352 theAdjointSimManager->SetAdjointTrackingAction(aUserDefinedTrackingAction); 1353 </programlisting></informalexample> 1354 1355 </para></listitem> 1356 1357 </itemizedlist> 1358 By default no user run action is considered in an adjoint simulation but if needed such action can be declared to 1359 G4AdjointSimManager as such: 1360 <informalexample><programlisting> 1361 G4AdjointSimManager* theAdjointSimManager = G4AdjointSimManager::GetInstance(); 1362 theAdjointSimManager->SetAdjointRunAction(aUserDefinedRunAction); 1363 </programlisting></informalexample> 1364 1365 </para> 1366 1367 </sect4> 1368 1369 <!-- ******************* Section (Level#4) ****************** --> 1370 <sect4 id="sect.EvtBias.ReverseMC.UserCoding.PhysicsList"> 1371 <title> 1372 Physics list for reverse and forward electromagnetic processes 1373 </title> 1374 1375 <para> 1376 To run an adjoint simulation a specific physics list should be used where existing G4 adjoint electromagnetic processes 1377 and their forward equivalent have to be declared. 1378 An example of such physics list is provided by the class G4AdjointPhysicsLits in the G4 example 1379 <emphasis role="bold">extended/biasing/ReverseMC01</emphasis>. 1380 </para> 1381 1382 </sect4> 1383 1384 <!-- ******************* Section (Level#4) ****************** --> 1385 <sect4 id="sect.EvtBias.ReverseMC.UserCoding.Analysis"> 1386 <title> 1387 Modification in the analysis part of the code 1388 </title> 1389 1390 <para> 1391 The user code should be modified to normalize the signals computed during the forward tracking phase to the weight of the last adjoint particle 1392 that reaches the external surface. 1393 This weight represents the statistical weight that the last full adjoint tracks (from the adjoint source 1394 to the external source) would have in a forward simulation. If multiplied by a signal and registered in function of energy 1395 and/or direction the simulation results will give an answer matrix of this signal. 1396 To normalize it to a given spectrum it has to be furthermore multiplied by a directional differential flux 1397 corresponding to this spectrum 1398 1399 The weight, direction, position , kinetic energy and type of the last adjoint particle that reaches the 1400 external source, and that would represents the primary of a forward simulation, can be get from G4AdjointSimManager by using for example the following line of codes 1401 <informalexample><programlisting> 1402 1403 G4AdjointSimManager* theAdjointSimManager = G4AdjointSimManager::GetInstance(); 1404 G4String particle_name = theAdjointSimManager->GetFwdParticleNameAtEndOfLastAdjointTrack(); 1405 G4int PDGEncoding= theAdjointSimManager->GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack(); 1406 G4double weight = theAdjointSimManager->GetWeightAtEndOfLastAdjointTrack(); 1407 G4double Ekin = theAdjointSimManager->GetEkinAtEndOfLastAdjointTrack(); 1408 G4double Ekin_per_nuc=theAdjointSimManager->GetEkinNucAtEndOfLastAdjointTrack(); // in case of ions 1409 G4ThreeVector dir = theAdjointSimManager->GetDirectionAtEndOfLastAdjointTrack(); 1410 G4ThreeVector pos = theAdjointSimManager->GetPositionAtEndOfLastAdjointTrack(); 1411 1412 </programlisting></informalexample> 1413 1414 </para> 1415 1416 <para> 1417 In order to have a code working for both forward and adjoint simulation mode, the extra code needed in user actions or analysis 1418 manager for the adjoint 1419 simulation mode can be separated to the code needed only for the normal forward simulation by using the following public method 1420 of G4AdjointSimManager: 1421 <informalexample><programlisting> 1422 G4bool GetAdjointSimMode(); 1423 </programlisting></informalexample> 1424 that returns true if an adjoint simulation is running and false if not. 1425 1426 </para> 1427 1428 <para> 1429 The following code example shows how to normalize a detector signal and compute an answer matrix 1430 in the case of an adjoint simulation. 1431 <example id="sect.EvtBias.ReverseMC.UserCoding.Analysis_1"> 1432 <title> 1433 Normalization in the case of an adjoint simulation. The detector signal S computed during the forward tracking 1434 phase is normalized to a primary source of e- with a differential directional flux given by the function F. 1435 An answer matrix of the signal is also computed. 1436 </title> 1437 1438 <programlisting> 1439 1440 G4double S = ...; // signal in the sensitive volume computed during a forward tracking phase 1441 1442 //Normalization of the signal for an adjoint simulation 1443 G4AdjointSimManager* theAdjSimManager = G4AdjointSimManager::GetInstance(); 1444 if (theAdjSimManager->GetAdjointSimMode()) { 1445 G4double normalized_S=0.; //normalized to a given e- primary spectrum 1446 G4double S_for_answer_matrix=0.; //for e- answer matrix 1447 1448 if (theAdjSimManager->GetFwdParticleNameAtEndOfLastAdjointTrack() == "e-"){ 1449 G4double ekin_prim = theAdjSimManager->GetEkinAtEndOfLastAdjointTrack(); 1450 G4ThreeVector dir_prim = theAdjointSimManager->GetDirectionAtEndOfLastAdjointTrack(); 1451 G4double weight_prim = theAdjSimManager->GetWeightAtEndOfLastAdjointTrack(); 1452 S_for_answer_matrix = S*weight_prim; 1453 normalized_S = S_for_answer_matrix*F(ekin_prim,dir); //F(ekin_prim,dir_prim) gives the differential directional flux of primary e- 1454 } 1455 //follows the code where normalized_S and S_for_answer_matrix are registered or whatever 1456 .... 1457 } 1458 1459 //analysis/normalization code for forward simulation 1460 else { 1461 ... 1462 } 1463 ... 1464 </programlisting> 1465 </example> 1466 1467 </para> 1468 1469 </sect4> 1470 1471 </sect3> 1472 1473 <!-- ******************* Section (Level#3) ****************** --> 1474 <sect3 id="sect.EvtBias.ReverseMC.Control"> 1475 <title> 1476 Control of an adjoint simulation 1477 </title> 1478 1479 <para> 1480 The G4UI commands in the directory 1481 <ulink url="./AllResources/Control/UIcommands/_adjoint_.html">/adjoint</ulink>. 1482 allow the user to : 1483 <itemizedlist spacing="compact"> 1484 <listitem><para> 1485 Define the adjoint source where adjoint primaries are generated 1486 </para></listitem> 1487 <listitem><para> 1488 Define the external source till which adjoint particles are tracked 1489 </para></listitem> 1490 <listitem><para> 1491 Start an adjoint simulation 1492 </para></listitem> 1493 </itemizedlist> 1494 </para> 1495 </sect3> 1496 1497 <!-- ******************* Section (Level#3) ****************** --> 1498 <sect3 id="sect.EvtBias.ReverseMC.Limitation"> 1499 <title> 1500 Known issues in the Reverse MC mode 1501 </title> 1502 1503 <!-- ******************* Section (Level#4) ****************** --> 1504 <sect4 id="sect.EvtBias.ReverseMC.Limitation.Weight"> 1505 <title> 1506 Occasional wrong high weight in the adjoint simulation 1507 </title> 1508 1509 <para> 1510 In rare cases an adjoint track may get a wrong high weight when reaching the external source. 1511 While this happens not often it may corrupt the simulation results significantly. This happens 1512 in some tracks where both reverse photo-electric and bremsstrahlung processes take place at low energy. 1513 We still need some investigations to remove this problem at the level of physical adjoint/reverse processes. 1514 However this problem can be solved at the level of event actions or analysis in the user code by adding a test on the 1515 normalized signal during an adjoint simulation. An example of such test has been implemented in the Geant4 example 1516 <emphasis role="bold"> extended/biasing/ReverseMC01 </emphasis>. 1517 In this implementation an event is rejected when the relative error of the computed normalized energy deposited 1518 increases during one event by more than 50% while the computed precision is already below 10%. 1519 </para> 1520 1521 </sect4> 1522 1523 <!-- ******************* Section (Level#4) ****************** --> 1524 <sect4 id="sect.EvtBias.ReverseMC.Limitation.ReverseBrem"> 1525 <title> 1526 Reverse bremsstrahlung 1527 </title> 1528 1529 <para> 1530 A difference between the differential cross sections used in the adjoint and forward bremsstrahlung 1531 models is the source of a higher flux of >100 keV gamma in the reverse simulation compared to the forward simulation mode. 1532 In principle the adjoint processes/models should make use of the direct differential cross section to sample 1533 the adjoint secondaries and compute the adjoint cross section. However due to the way the effective differential cross section is 1534 considered in the forward model G4eBremsstrahlungModel this was not possible to achieve for the reverse bremsstrahlung. 1535 Indeed the differential cross section used in G4AdjointeBremstrahlungModel is obtained by the numerical derivation 1536 over the cut energy of the direct cross section provided by G4eBremsstrahlungModel. 1537 This would be a correct procedure if the distribution of secondary in G4eBremsstrahlungModel 1538 would match this differential cross section. Unfortunately it is not the case as independent parameterization are used 1539 in G4eBremsstrahlungModel for both the cross sections and the sampling of secondaries. (It means that in the forward case 1540 if one would integrate the effective differential cross section considered in the simulation we would not find back 1541 the used cross section). 1542 In the future we plan to correct this problem by using an extra weight correction factor after the occurrence of a reverse 1543 bremsstrahlung. This weight factor should be the ratio between the differential CS used in the adjoint simulation and the 1544 one effectively used in the forward processes. As it is impossible to have a simple and direct access to the forward differential CS 1545 in G4eBremsstrahlungModel we are investigating the feasibility to use the differential CS considered in 1546 G4Penelope models. 1547 </para> 1548 1549 </sect4> 1550 1551 <!-- ******************* Section (Level#4) ****************** --> 1552 <sect4 id="sect.EvtBias.ReverseMC.Limitation.ReverseMS"> 1553 <title> 1554 Reverse multiple scattering 1555 </title> 1556 1557 <para> 1558 For the reverse multiple scattering the same model is used than in the forward case. 1559 This approximation makes that the discrepancy between the adjoint and forward 1560 simulation cases can get to a level of ~ 10-15% relative differences in the test cases that we have considered. 1561 In the future we plan to improve the adjoint multiple scattering models by forcing the computation of 1562 multiple scattering effect at the end of an adjoint step. 1563 </para> 1564 1565 </sect4> 1566 1567 </sect3> 1568 </sect2> 1101 1569 </sect1> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/GettingStarted/executeProgram.xml
r904 r1222 8 8 <!-- Proof read by: Joe Chuma, 15-Jun-1999 --> 9 9 <!-- Converted to DocBook: Katsuya Amako, Aug-2006 --> 10 <!-- Updated by : Koichi Murakami, Dec-2009 --> 10 11 <!-- --> 11 12 <!-- ******************************************************** --> … … 375 376 <para> 376 377 Most of the examples in the <literal>$G4INSTALL/examples/</literal> directory 377 have the following <literal>main()</literal>, which covers cases 2 and 3 378 above. Thus, the application can be run either in batch or 379 interactive mode. 378 have the following <literal>main()</literal>. 379 The application can be run either in batch or interactive mode. 380 380 381 381 <example id="programlist_HowToExec_5"> … … 411 411 if (argc==1) // Define UI terminal for interactive mode 412 412 { 413 G4UI session * session = new G4UIterminal;413 G4UIExecutive* session = new G4UIExecutive(argc, argv); 414 414 UI->ApplyCommand("/control/execute prerunN03.mac"); 415 415 session->SessionStart(); -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/GettingStarted/graphicalUserInterface.xml
r1213 r1222 2 2 <!-- --> 3 3 <!-- [History] --> 4 <!-- Converted to DocBook: Katsuya Amako, Aug-2006 --> 4 5 <!-- Update G4UIExecutive : Laurent Garnier, Dec-2009 --> 5 <!-- Converted to DocBook: Katsuya Amako, Aug-2006-->6 <!-- Reviced : Koichi Murakami, Dec-2009 --> 6 7 <!-- --> 7 8 <!-- ******************************************************** --> … … 28 29 29 30 <para> 30 The "intercoms" category 31 provides an expandable command interpreter. It is the key mechanism 32 of Geant4 to realize secure user interactions of all categories without 33 being annoyed by the dependencies among categories. The direct use 31 The "intercoms" category provides an expandable command interpreter. 32 It is the key mechanism of Geant4 to realize secure user interactions 33 in all categories without being annoyed by the dependencies among categories. 34 <!-- 35 The direct use 34 36 of Geant4 classes in a C++ program offers a first ground level of 35 37 interactivity, i.e., the batch session. As seen in the 36 38 examples/novice/N01, Geant4 commands and macros are to be 37 hard-coded in the program. 38 </para> 39 39 hard-coded in the program.--> 40 The Geant4 commands can be used both in a interactive terminal session and 41 in a batch mode with a maco file or a direct C++ call. 42 </para> 40 43 41 44 … … 49 52 50 53 <para> 51 To avoid too much programming, the 52 "intercoms" category provides the abstract class <emphasis>G4UIsession</emphasis> 53 that captures interactive commands . The concrete implementation of 54 the user interface and Graphical User Interfaces (GUI) is left to 55 the interfaces category. This interfacing strategy opens an 56 important door towards various user interface tools and allows 57 Geant4 to utilize the state-of-the-art GUI tools such as Motif, Qt, 58 and Java etc..The richness of the collaboration has permitted for 59 developers to offer various user interfaces to the Geant4 60 command system. Currently available are the following; 54 Geant4 can be controllled by a seriese of Geant4 UI commands. 55 The "intercoms" category provides the abstract class 56 <emphasis>G4UIsession</emphasis> that processes interactive commands. 57 The concrete implementation of (graphical) user interfaceis is located 58 in the "interfaces" category. This interfacing strategy opens an 59 important door towards various user interface tools, 60 and allows Geant4 to utilize the state-of-the-art GUI tools 61 such as Motif, Qt, and Java etc. 62 The richness of the collaboration realizes 63 various user interfaces to the Geant4 command system. 64 The following interfaces is currently available; 61 65 62 66 <orderedlist spacing="compact"> 63 67 <listitem><para> 64 Character terminal (dumb terminal and tcsh (bash)-like terminal),65 th e default user interface of Geant4,68 Character terminal (dumb terminal and tcsh-like terminal), 69 that is the default user interface of Geant4 66 70 </para></listitem> 67 71 <listitem><para> 68 Xm, Win32, Qt variations of the upperterminal by using a69 Motif, Qt or Windows widget to retrieve commands, and72 Xm, Xaw, Win32, Qt variations of the above terminal by using a 73 Motif, Athena, Qt or Windows widget 70 74 </para></listitem> 71 75 <listitem><para> 72 GAG, a fully Graphical User Interface and its network extension76 GAG, a fully graphical user interface and its network extension 73 77 GainServer of the client/server type. 74 78 </para></listitem> … … 77 81 78 82 <para> 79 Full implementation of the character 80 terminals (1 and 2) is included in the standard Geant4 distribution 81 in the <literal>source/interfaces/basic</literal> directory. As for GAG, 82 the front-end class is included 83 in the Geant4 distribution in the source/interfaces/GAG directory, 84 while its partner GUI package MOMO.jar is available in the standard Geant4 distribution 85 under the 86 <literal>environments/MOMO</literal> directory. MOMO.jar, Java archive file, contains 83 Implementation of the user sesssions (1 and 2) is included 84 in the <literal>source/interfaces/basic</literal> directory. 85 As for GAG, the front-end class is included 86 in the source/interfaces/GAG directory, 87 while its partner GUI package MOMO.jar is available 88 under the <literal>environments/MOMO</literal> directory. 89 MOMO.jar, Java archive file, contains 87 90 not only GAG, but also GGE and other helper packages. 88 Supplementary information is available 89 from the author's Webpage(see URL below).91 Supplementary information is available 92 from the author's web page (see URL below). 90 93 </para> 91 94 … … 114 117 <para> 115 118 These interfaces open a session on the character terminal. 116 <emphasis>G4UIterminal</emphasis> runs on all platform supported by Geant4, 117 including <emphasis>cygwin</emphasis> on Windows, 118 while <emphasis>G4UItcsh</emphasis> runs on Solaris and Linux. G4UItcsh 119 supports user-friendly key bindings a-la-tcsh (or bash); 119 <emphasis>G4UIterminal</emphasis> runs on all platforms supported by Geant4, 120 including <emphasis>cygwin</emphasis> on Windows. 121 122 The following built-in commands are available in 123 <emphasis>G4UIterminal</emphasis>; 124 125 <variablelist> 126 <varlistentry> 127 <term>cd, pwd</term> 128 <listitem> 129 change, display the current command directory. 130 </listitem> 131 </varlistentry> 132 133 <varlistentry> 134 <term>ls, lc</term> 135 <listitem> 136 list commands and subdirectories in the current directory. 137 </listitem> 138 </varlistentry> 139 140 <varlistentry> 141 <term>history</term> 142 <listitem> 143 show previous commands. 144 </listitem> 145 </varlistentry> 146 147 <varlistentry> 148 <term>!historyID</term> 149 <listitem> 150 reissue previous command. 151 </listitem> 152 </varlistentry> 153 154 <varlistentry> 155 <term>?command</term> 156 <listitem> 157 show current parameter values of the command. 158 </listitem> 159 </varlistentry> 160 161 <varlistentry> 162 <term>help command</term> 163 <listitem> 164 show command help. 165 </listitem> 166 </varlistentry> 167 168 <varlistentry> 169 <term>exit</term> 170 <listitem> 171 terminate the session. 172 </listitem> 173 </varlistentry> 174 </variablelist> 175 176 G4UItcsh supports user-friendly key bindings a-la-tcsh. 177 <emphasis>G4UItcsh</emphasis> runs on Solaris and Linux. 178 The following keybindings are supported; 120 179 121 180 <variablelist> … … 197 256 198 257 <para> 199 In addition, the following string substitutions are supported; 200 258 The example below shows how to set a user's prompt. 259 <informalexample> 260 <programlisting> 261 G4UItcsh* tcsh = new G4UItcsh(); 262 tcsh-> SetPrompt("%s>"); 263 </programlisting> 264 </informalexample> 265 266 The following strings are supported as substitutions in a prompt string. 201 267 <variablelist> 202 268 <varlistentry> … … 219 285 </varlistentry> 220 286 </variablelist> 287 </para> 288 289 <para> 290 Command history in a user's session is saved 291 in a file <literal>$(HOME)/.g4_hist</literal> 292 that is automatically read at the next session, 293 so that command history is available across sessions. 221 294 </para> 222 295 … … 226 299 <sect3 id="sect.HowToSetUpInter.DescInter.G4UIXm"> 227 300 <title> 228 <emphasis>G4UIXm</emphasis>, <emphasis>G4UI Qt</emphasis> and301 <emphasis>G4UIXm</emphasis>, <emphasis>G4UIXaw</emphasis>, <emphasis>G4UIQt</emphasis> and 229 302 <emphasis>G4UIWin32</emphasis> classes 230 303 </title> … … 232 305 <para> 233 306 These interfaces are versions of <emphasis>G4UIterminal</emphasis> 234 implemented over libraries Motif, Qt and WIN32 respectively.307 implemented over libraries Motif, Athena, Qt and WIN32 respectively. 235 308 <emphasis>G4UIXm</emphasis> uses the Motif XmCommand widget, 236 <emphasis>G4UIQt</emphasis> the Qt dialog 237 widget, and <emphasis>G4UIWin32</emphasis> the Windows "edit" component to do the 309 <emphasis>G4UIXaw</emphasis> the Athena dialog 310 widget, <emphasis>G4UIQt</emphasis> the Qt dialog widget, 311 and <emphasis>G4UIWin32</emphasis> the Windows "edit" component to do the 238 312 command capturing. These interfaces are useful if working in 239 313 conjunction with visualization drivers that use the Xt library, Qt library or … … 243 317 <para> 244 318 A command box is at disposal for entering or recalling Geant4 commands. 245 Command completion by typing &ldquo;TAB&rdquo;key is246 available on the command line. The shell commands "exit, cont,247 help, ls, cd..." are also supported. A menu bar c ouldbe customized319 Command completion by typing "TAB" key is 320 available in the command box. The shell commands "exit, cont, 321 help, ls, cd..." are also supported. A menu bar can be customized 248 322 through the <emphasis>AddMenu</emphasis> and 249 323 <emphasis>AddButton</emphasis> method. Ex: … … 278 352 279 353 <para> 280 <emphasis>G4UIXm</emphasis> runs on Unix/Linux with Motif. <emphasis>G4UIQt</emphasis> run 354 <emphasis>G4UIXm</emphasis> runs on Unix/Linux with Motif. <emphasis>G4UIXaw</emphasis>, 355 less user friendly, runs on Unix with Athena widgets. <emphasis>G4UIQt</emphasis> run 281 356 everywhere with Qt. 282 357 <emphasis>G4UIWin32</emphasis> runs on Windows. … … 307 382 <para> 308 383 Client GUIs, GAG and Gain have almost similar look-and-feel. So, 309 GAG's functionalities are briefly explained here. Please refer to310 the above URLfor details.384 GAG's functionalities are briefly explained here. 385 Please refer to the URL previously mentioned for details. 311 386 </para> 312 387 … … 318 393 an executable simulation program via pipes. Geant4's 319 394 front-end class <emphasis>G4UIGAG</emphasis> must be instantiated to 320 communicate with GAG. GAG runs on Linux and Windows. If MOMO.jar is in your 321 CLASSPATH, it can be run by a command; 395 communicate with GAG. GAG runs on Linux and Windows. MOMO.jar can be run by a command; 322 396 </para> 323 397 324 398 <informalexample> 325 399 <programlisting> 326 %java -jar MOMO.jar400 %java -jar $G4INSTALL/environments/MOMO/MOMO.jar 327 401 </programlisting> 328 402 </informalexample> … … 335 409 <term>GAG Menu:</term> 336 410 <listitem> 337 The menus are to choose and run a G EANT4 executable file, to kill or exit338 a G EANT4 process and to exit GAG. Upon the normal exit or an411 The menus are to choose and run a Geant4 executable file, to kill or exit 412 a Geant4 process and to exit GAG. Upon the normal exit or an 339 413 unexpected death of the Geant4 process, GAG window are 340 automatically reset to run another G EANT4 executable.341 </listitem> 342 </varlistentry> 343 <varlistentry> 344 <term>G EANT4 Command tree:</term>345 <listitem> 346 Upon the establishment of the pipe connection with the G EANT4 process, GAG displays414 automatically reset to run another Geant4 executable. 415 </listitem> 416 </varlistentry> 417 <varlistentry> 418 <term>Geant4 Command tree:</term> 419 <listitem> 420 Upon the establishment of the pipe connection with the Geant4 process, GAG displays 347 421 the command menu, using expandable tree browser whose look and feel is similar to 348 422 a file browser. Disabled commands are shown in opaque. GAG 349 doesn &rsquo;t display commands that are just below the root of423 doesn't display commands that are just below the root of 350 424 the command hierarchy. Direct type-in field is available for such 351 425 input. Guidance of command categories and commands are displayed … … 375 449 in the middle of a long session of execution. Log can be saved to a 376 450 file independent of the above redirection . GAG displays warning or 377 error messages from G EANT4 in a pop-up warning widget.451 error messages from Geant4 in a pop-up warning widget. 378 452 </listitem> 379 453 </varlistentry> … … 392 466 393 467 <para> 394 The libraries that do n't depend on external packages are created by default, using395 Geant4 configure scripts.468 The libraries that do not depend on external packages are created by default, 469 using Geant4 configure scripts. 396 470 They include <emphasis>G4UIterminal</emphasis>, <emphasis>G4UItcsh</emphasis> 397 471 and <emphasis>G4UIGAG</emphasis> in libraries <emphasis>libG4UIbasic.a/so</emphasis> and … … 401 475 402 476 <para> 403 To make the libraries of <emphasis>G4UIXm</emphasis>, 477 To make the libraries of <emphasis>G4UIXm</emphasis>, <emphasis>G4UIXaw</emphasis>, 404 478 <emphasis>G4UIQt</emphasis> and 405 479 <emphasis>G4UIWin32</emphasis> , respective environment variables 406 480 <emphasis role="bold">G4UI_BUILD_XM_SESSION</emphasis>, 407 <emphasis role="bold">G4UI_BUILD_QT_SESSION</emphasis> or 481 <emphasis role="bold">G4UI_BUILD_XAW_SESSION</emphasis>, 482 <emphasis role="bold">G4UI_BUILD_QT_SESSION</emphasis> and 408 483 <emphasis role="bold">G4UI_BUILD_WIN32_SESSION</emphasis> must be set 409 484 explicitly before creating libraries. … … 411 486 412 487 <para> 413 However, if the environment variable <emphasis role="bold">G4UI_NONE</emphasis> is488 If the environment variable <emphasis role="bold">G4UI_NONE</emphasis> is 414 489 set, no interface libraries are built at all. 415 490 </para> … … 432 507 <para> 433 508 To use a given interface 434 (<literal>G4UIxxx</literal> where <literal>xxx = terminal,Xm, Win32, Qt, 435 GAG, GainServer</literal>) in your program, you can do it by two ways : 509 (<literal>G4UIxxx</literal> where <literal>xxx = terminal,Xm, Xaw, Win32, Qt, 510 GAG, GainServer</literal>) in your program, there are two ways. 511 436 512 <itemizedlist spacing="compact"> 437 <listitem> <para>Calling G4UIxxx directly :513 <listitem> Calling G4UIxxx directly : 438 514 <informalexample> 439 515 <programlisting> … … 446 522 </programlisting> 447 523 </informalexample> 448 Note : For a tcsh session, the second line must be (See the examples in "examples/novice/N0x" in which the terminal session is used) : 449 524 525 If you want to select a session type according to your environment variable, 526 the code can be: 527 528 <informalexample> 529 <programlisting> 530 // to include the class definition in the main program: 531 #if defined(G4UI_USE_TCSH) 532 #include "G4UIterminal.hh" 533 #include "G4UItcsh.hh" 534 #elif defined(G4UI_USE_XM) 535 #include "G4UIXm.hh" 536 .... 537 #endif 538 539 #if defined(G4UI_USE_TCSH) 540 session = new G4UITerminal(new G4UItcsh); 541 #elif defined(G4UI_USE_XM) 542 session = new G4UIXm(argc,argv); 543 #elif ... 544 </programlisting> 545 </informalexample> 546 547 Note : For a tcsh session, the second line must be 450 548 <informalexample> 451 549 <programlisting> … … 453 551 </programlisting> 454 552 </informalexample> 455 456 </para></listitem> 457 <listitem><para>Using <emphasis>G4UIExecutive</emphasis> (implement in all novice examples) : 553 554 If the user wants to deactivate the default signal handler (soft abort) 555 raised by "Ctr-C", the false flag can be set in the second argument 556 of the <emphasis>G4UIterminal</emphasis> constructor like; 557 558 <informalexample> 559 <programlisting> 560 G4UIsession* session = new G4UIterminal(new G4UItcsh, false). 561 </programlisting> 562 </informalexample> 563 </listitem> 564 565 566 <listitem>Using <emphasis>G4UIExecutive</emphasis> 567 (implemented in all novice examples) : 568 569 The above code is rather troublesome. 570 This is more convenient way for choosing a session type. 458 571 <informalexample> 459 572 <programlisting> … … 471 584 </programlisting> 472 585 </informalexample> 473 </para> 474 </listitem> 586 </listitem> 475 587 </itemizedlist> 476 588 </para> 477 589 478 <para>The two methods are similar. If you want to choose between several viewer driver at load, with the <emphasis>first</emphasis> method you will have to write : 479 <informalexample> 480 <programlisting> 481 // to include the class definition in the main program: 482 #if defined(G4UI_USE_TCSH) 483 #include "G4UIterminal.hh" 484 #include "G4UItcsh.hh" 485 #elif defined(G4UI_USE_XM) 486 #include "G4UIXm.hh" 487 .... 488 #endif 489 490 #if defined(G4UI_USE_TCSH) 491 session = new G4UITerminal(new G4UITerminal); 492 #elif defined(G4UI_USE_XM) 493 session = new G4UIXm(argc,argv); 494 #elif ... 495 </programlisting> 496 </informalexample> 497 That is not realy simple. The best way to do this is the <emphasis>second</emphasis> method : 498 <informalexample> 499 <programlisting> 500 #ifdef G4UI_USE 501 #include "G4UIExecutive.hh" 502 #endif 503 ... 504 505 // to instantiate a session of your choice and start the session 506 // G4UIExecutive will open for you the good driver (depending on G4UI_USE_xxx flags) 507 #ifdef G4UI_USE 508 G4UIExecutive* ui = new G4UIExecutive(argc,argv); 509 #endif 510 </programlisting> 511 </informalexample> 512 513 </para> 514 <para> 515 If the user wants to deactivate the default signal handler (soft abort) 516 raised by "Ctr-C", the false flag can be set in the second argument 517 of the <emphasis>G4UIterminal</emphasis> constructor like; 518 519 <informalexample> 520 <programlisting> 521 G4UIsession* session = new G4UIterminal(new G4UItcsh, false). 522 </programlisting> 523 </informalexample> 524 </para> 525 526 <para> 527 Again, environment variable must be preset to select a given interface. But for your 528 convenience, some of them are set by defaults. 590 591 <para> 592 A corresponding environment variable must be preset 593 to select a given interface. 594 But some of them are set by defaults for your convenience. 529 595 530 596 <itemizedlist spacing="compact"> … … 536 602 always built (see "G4UI_BUILD.gmk") and linked, so the user can 537 603 instantiate one of these sessions without rebuilding the libraries 538 and without setting any environment variables. For backwards 604 and without setting any environment variables. 605 <!--For backwards 539 606 compatibility with user code, as typified by geant4/examples main 540 607 programs, the C-pre-processor variables corresponding to the … … 545 612 if he/she sets no environment variables, then the C-pre-processor variable 546 613 <emphasis role="bold">G4UI_USE_TERMINAL</emphasis> is set by default, 547 although there is no need to use it. 614 although there is no need to use it.--> 548 615 </para></listitem> 549 616 <listitem><para> 550 617 The environment variable <emphasis role="bold">G4UI_USE_XM</emphasis>, 551 <emphasis role="bold">G4UI_USE_QT</emphasis> or618 <emphasis role="bold">G4UI_USE_QT</emphasis>, <emphasis role="bold">G4UI_USE_XAW</emphasis> or 552 619 <emphasis role="bold">G4UI_USE_WIN32</emphasis> must be set to use the 553 620 respective interface. The file "$G4INSTALL/config/G4UI_USE.gmk" -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/GettingStarted/mainProgram.xml
r904 r1222 6 6 <!-- Proof read by: Joe Chuma, 14-Jun-1999 --> 7 7 <!-- Converted to DocBook: Katsuya Amako, Aug-2006 --> 8 <!-- Updated by Koichi Murakami, Dec-2009 --> 8 9 <!-- --> 9 10 <!-- ******************************************************** --> … … 362 363 #include "G4RunManager.hh" 363 364 #include "G4UImanager.hh" 364 <emphasis role="color_blue">#include "G4UI terminal.hh"</emphasis>365 <emphasis role="color_blue">#include "G4UIExecutive.hh"</emphasis> 365 366 #include "G4VisExecutive.hh" 366 367 … … 395 396 396 397 // get the pointer to the User Interface manager 397 G4UImanager* UI = G4UImanager::GetUIpointer();398 G4UImanager* UImanager = G4UImanager::GetUIpointer(); 398 399 399 400 <emphasis role="color_blue"> … … 401 402 // Define (G)UI terminal for interactive mode 402 403 { 403 G4UI session * session = new G4UIterminal;404 UI ->ApplyCommand("/control/execute prerun.g4mac");405 session->sessionStart();406 delete session;404 G4UIExecutive * ui = new G4UIExecutive(argc,argv); 405 UImanager->ApplyCommand("/control/execute prerun.g4mac"); 406 ui->sessionStart(); 407 delete ui; 407 408 } 408 409 else … … 411 412 G4String command = "/control/execute "; 412 413 G4String fileName = argv[1]; 413 UI ->ApplyCommand(command+fileName);414 UImanager->ApplyCommand(command+fileName); 414 415 } 415 416 </emphasis> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/TrackingAndPhysics/physicsProcess.xml
r1211 r1222 1 <!-- ******************************************************** -->1 <!-- ******************************************************** --> 2 2 <!-- --> 3 3 <!-- [History] --> … … 477 477 <itemizedlist spacing="compact"> 478 478 <listitem><para> 479 A general process in the sense that the same process/class480 is used to simulate the multiple scattering of the all charged481 particles (class name <emphasis>G4MultipleScattering</emphasis>)482 </para></listitem>483 <listitem><para>484 479 Alternative process for simulation of single Coulomb scattering 485 480 of all charged particles (class name <emphasis>G4CoulombScattering</emphasis>) … … 563 558 </para></listitem> 564 559 <listitem><para> 565 optional EM physics providing similar performance as g4 7.1p01 560 optional EM physics providing fast but less acurate electron transport due to 561 "Simple" method of step limitation by multiple scattering, reduced 562 step limitation by ionisation process and enabled "ApplyCuts" option 566 563 (class name <emphasis>G4EmStandardPhysics_option1</emphasis>) 567 564 </para></listitem> 568 565 <listitem><para> 569 Experimental EM physics with enabled "ApplyCuts" option 566 Experimental EM physics with enabled "ApplyCuts" option, <emphasis>G4WentzelVIModel</emphasis> 567 for muon multiple scattering 570 568 (class name <emphasis>G4EmStandardPhysics_option2</emphasis>) 571 569 </para></listitem> 572 570 <listitem><para> 573 EM physics for simulation with high accuracy 571 EM physics for simulation with high accuracy due to "UseDistanceToBoundary" multiple 572 scattering step limitation, reduced <emphasis>finalRange</emphasis> parameter of stepping function 573 optimized per particle type, <emphasis>G4WentzelVIModel</emphasis> 574 for muon multiple scattering and <emphasis>G4IonParameterisedLossModel</emphasis> for ion ionisation 574 575 (class name <emphasis>G4EmStandardPhysics_option3</emphasis>) 575 576 </para></listitem> 576 </itemizedlist> 577 <listitem><para> 578 Combined Standard and Low-energy EM physics constructors based on the Option3 constructor; 579 low-energy models are applied below 1 GeV: 580 <itemizedlist spacing="compact"> 581 <listitem><para> 582 Models based on Livermore data bases for electrons and gamma (<emphasis>G4EmLivermorePhysics</emphasis>); 583 </para></listitem> 584 <listitem><para> 585 Polarized models based on Livermore data bases for electrons and gamma (<emphasis>G4EmLivermorePolarizedPhysics</emphasis>); 586 </para></listitem> 587 <listitem><para> 588 Penelope models for electrons, positrons and gamma (<emphasis>G4EmPenelopePhysics</emphasis>); 589 </para></listitem> 590 <listitem><para> 591 Low-energy DNA physics (<emphasis>G4EmDNAPhysics</emphasis>). 592 </para></listitem> 593 </itemizedlist> 594 </para></listitem> </itemizedlist> 577 595 Examples of the registration of these physics constructor and 578 596 construction of alternative combinations of options are shown 579 in novice and extended examples ($G4INSTALL/examples/extended/electromagnetic).580 Novice and extended electromagnetic examples illustrating the use597 in novice, extended and advanced examples ($G4INSTALL/examples/extended/electromagnetic and $G4INSTALL/examples/advanced). 598 Examples illustrating the use 581 599 of electromagnetic processes are available as part of the Geant4 582 600 <ulink url="http://geant4.web.cern.ch/geant4/support/download.shtml"> … … 585 603 586 604 <para> 587 <emphasis role="bold">Options</emphasis> are available for steering the standard605 <emphasis role="bold">Options</emphasis> are available for steering of 588 606 electromagnetic processes. These options may be invoked either by 589 607 UI commands or by the interface class G4EmProcessOptions. This … … 672 690 SetBremsstrahlungTh(G4double) 673 691 </para></listitem> 692 <listitem><para> 693 SetPolarAngleLimit(G4double) 694 </para></listitem> 695 <listitem><para> 696 SetFactorForAngleLimit(G4double) 697 </para></listitem> 674 698 </itemizedlist> 675 699 </para> … … 682 706 <itemizedlist spacing="compact"> 683 707 <listitem><para> 684 fSimple - s tep limitation used in g4 7.1 version (used in QGSP_EMV Physics List)708 fSimple - simplified step limitation as in g4 7.1 version (used in QGSP_BERT_EMV Physics List) 685 709 </para></listitem> 686 710 <listitem><para> … … 764 788 </para></listitem> 765 789 <listitem><para> 790 FindIon(G4int Z, G4int A) 791 </para></listitem> 792 <listitem><para> 766 793 FindMaterial(const G4String&) 767 794 </para></listitem> … … 798 825 Further information is available in the web pages of the 799 826 Geant4 Low Energy Electromagnetic Physics Working Group, accessible 800 from the Geant4 web site, âwho we areâ section, then âworking groupsâ.827 from the Geant4 web site, “who we are” section, then “working groups”. 801 828 </para> 802 829 … … 1114 1141 1115 1142 <para> 1116 The default is âtrueâ, namely vacancies in atomic shells produced by the1143 The default is “true”, namely vacancies in atomic shells produced by the 1117 1144 interaction are handled by the G4AtomicDeexcitation module, possibly with 1118 the subsequent emission of fluorescence x-rays. If is set to âfalseâ1145 the subsequent emission of fluorescence x-rays. If is set to “false” 1119 1146 by the user, the energy released in the re-arrangement of atomic vacancies 1120 1147 is treated in the model as a local energy deposit, without emission of … … 1128 1155 An option is also available in these models to enable the production of 1129 1156 Auger electrons by the G4AtomicDeexcitation module ActivateAuger(G4bool). 1130 The default (coming from G4AtomicDeexcitation) is âfalseâ, namely only1157 The default (coming from G4AtomicDeexcitation) is “false”, namely only 1131 1158 fluorescence x-rays are emitted but not Auger electrons. One should 1132 1159 notice that this option has effect only if the usage of the atomic … … 1173 1200 <itemizedlist spacing="compact"> 1174 1201 <listitem><para> 1175 process class is ÂG4DNAElastic1176 </para></listitem> 1177 <listitem><para> 1178 two alternative model classes are Â: G4DNAScreenedRutherfordElasticModel1202 process class is G4DNAElastic 1203 </para></listitem> 1204 <listitem><para> 1205 two alternative model classes are : G4DNAScreenedRutherfordElasticModel 1179 1206 or G4DNAChampionElasticModel 1180 1207 </para></listitem> … … 1186 1213 <itemizedlist spacing="compact"> 1187 1214 <listitem><para> 1188 process class is G4DNAExcitation Â1215 process class is G4DNAExcitation 1189 1216 </para></listitem> 1190 1217 <listitem><para> … … 1198 1225 <itemizedlist spacing="compact"> 1199 1226 <listitem><para> 1200 process class is ÂG4DNAIonisation1227 process class is G4DNAIonisation 1201 1228 </para></listitem> 1202 1229 <listitem><para> … … 1218 1245 <itemizedlist spacing="compact"> 1219 1246 <listitem><para> 1220 process class is ÂG4DNAExcitation1247 process class is G4DNAExcitation 1221 1248 </para></listitem> 1222 1249 <listitem><para> … … 1244 1271 <itemizedlist spacing="compact"> 1245 1272 <listitem><para> 1246 process class is ÂG4DNAChargeDecrease1273 process class is G4DNAChargeDecrease 1247 1274 </para></listitem> 1248 1275 <listitem><para> … … 1276 1303 <itemizedlist spacing="compact"> 1277 1304 <listitem><para> 1278 process class is ÂG4DNAChargeIncrease1305 process class is G4DNAChargeIncrease 1279 1306 </para></listitem> 1280 1307 <listitem><para> … … 1296 1323 <itemizedlist spacing="compact"> 1297 1324 <listitem><para> 1298 process class is ÂG4DNAExcitation1325 process class is G4DNAExcitation 1299 1326 </para></listitem> 1300 1327 <listitem><para> … … 1320 1347 <itemizedlist spacing="compact"> 1321 1348 <listitem><para> 1322 process class is ÂG4DNAChargeIncrease1349 process class is G4DNAChargeIncrease 1323 1350 </para></listitem> 1324 1351 <listitem><para> … … 1340 1367 <itemizedlist spacing="compact"> 1341 1368 <listitem><para> 1342 process class is ÂG4DNAExcitation1369 process class is G4DNAExcitation 1343 1370 </para></listitem> 1344 1371 <listitem><para> … … 1364 1391 <itemizedlist spacing="compact"> 1365 1392 <listitem><para> 1366 process class is ÂG4DNAChargeIncrease1393 process class is G4DNAChargeIncrease 1367 1394 </para></listitem> 1368 1395 <listitem><para> … … 1376 1403 <itemizedlist spacing="compact"> 1377 1404 <listitem><para> 1378 process class is ÂG4DNAChargeDecrease1405 process class is G4DNAChargeDecrease 1379 1406 </para></listitem> 1380 1407 <listitem><para> … … 1396 1423 <itemizedlist spacing="compact"> 1397 1424 <listitem><para> 1398 process class is ÂG4DNAExcitation1425 process class is G4DNAExcitation 1399 1426 </para></listitem> 1400 1427 <listitem><para> … … 1420 1447 <itemizedlist spacing="compact"> 1421 1448 <listitem><para> 1422 process class is ÂG4DNAChargeDecrease1449 process class is G4DNAChargeDecrease 1423 1450 </para></listitem> 1424 1451 <listitem><para> … … 1536 1563 // construct baryons --- 1537 1564 // Geant4 DNA particles 1538 G4GenericIon::GenericIonDefinition() Â;1565 G4GenericIon::GenericIonDefinition() ; 1539 1566 G4DNAGenericIonsManager * genericIonsManager; 1540 1567 genericIonsManager=G4DNAGenericIonsManager::Instance(); … … 1860 1887 to the user to decide whethee this is desirable or not for his 1861 1888 particular problem. 1889 </para> 1890 1891 <para> 1892 A prototype of the compact version of neutron cross sections derived from HP database 1893 are provided with new classes <emphasis>G4NeutronHPElasticData</emphasis>, 1894 <emphasis>G4NeutronCaptureXS</emphasis>, 1895 <emphasis>G4NeutronElasticXS</emphasis>, 1896 and <emphasis>G4NeutronInelasticXS</emphasis>. 1862 1897 </para> 1863 1898 … … 3313 3348 bonding type (air-coupled or glued). The glue used is MeltMount, and the 3314 3349 ESR film used is VM2000. Each LUT consists of measured angular 3315 distributions with 4 º by 5º resolution in theta and phi, respectively,3316 for incidence angles from 0 º to 90º degrees, in 1º-steps. The code might3350 distributions with 4º by 5º resolution in theta and phi, respectively, 3351 for incidence angles from 0º to 90º degrees, in 1º-steps. The code might 3317 3352 in the future be updated by adding more LUTs, for instance, for other 3318 3353 scintillating materials (such as LSO or NaI). To use these LUT the user -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/TrackingAndPhysics/tracking.xml
r1208 r1222 575 575 576 576 <para> 577 <emphasis role="bold">Note :</emphasis>577 <emphasis role="bold">Note-1:</emphasis> 578 578 Users SHOULD NOT (and CAN NOT) change <emphasis>G4Track</emphasis> 579 579 in <literal>UserSteppingAction</literal>. 580 580 Only the exception is the <literal>TrackStatus</literal>. 581 </para> 582 583 <para> 584 <emphasis role="bold">Note-2:</emphasis> 585 Users have to be cautious to implement an unnatural/unphysical 586 action in these user actions. See the section 587 <link linkend="sect.OptUAct.EngyConsv"> 588 Killing Tracks in User Actions and Energy Conservation</link> 589 for more details. 581 590 </para> 582 591 -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/UserActions/optionalActions.xml
r904 r1222 27 27 <literal>G4RunManager</literal>. 28 28 </para> 29 30 <!-- ******************* Section (Level#2) ****************** --> 31 <sect2 id="sect.OptUAct.Usage"> 32 <title> 33 Usage of User Actions 34 </title> 29 35 30 36 <!-- ******* Bridgehead ******* --> … … 401 407 </para> 402 408 403 409 </sect2> 410 411 <!-- ******************* Section (Level#2) ****************** --> 412 <sect2 id="sect.OptUAct.EngyConsv"> 413 <title> 414 Killing Tracks in User Actions and Energy Conservation 415 </title> 416 417 <para> 418 In either of user action classes described in the previous section, 419 the user can implement an unnatural/unphysical action. A typical 420 example is to kill a track, which is under the simulation, in the 421 user stepping action. In this case the user have to be cautious of 422 the total energy conservation. The user stepping action itself does 423 not take care the energy or any physics quantity associated with 424 the killed track. Therefore if the user want to keep the total 425 energy of an event in this case, the lost track energy need to be 426 recorded by the user. 427 </para> 428 429 <para> 430 The same is true for user stacking or tracking actions. If the 431 user has killed a track in these actions the all physics information 432 associated with it would be lost and, for example, the total energy 433 conservation be broken. 434 </para> 435 436 <para> 437 If the user wants the Geant4 kernel to take care the total energy 438 conservation automatically when he/she has killed artificially 439 a track, the user has to use a killer process. For example if the 440 user uses G4UserLimits and G4UserSpecialCuts process, energy of 441 the killed track is added to the total energy deposit. 442 </para> 443 444 445 </sect2> 404 446 </sect1> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/commandcontrol.xml
r1211 r1222 888 888 The OpenGL drivers can also generate PostScript files, either from 889 889 a pull-down menu (Motif and Qt drivers) or with <literal>/vis/ogl/printEPS</literal>. 890 It can generate either vector ized or rasterizedPostScript890 It can generate either vector or bitmap PostScript 891 891 data with <literal>/vis/ogl/set/printMode</literal> ("vectored" or "pixmap"). 892 892 You can change the filename by <literal>/vis/ogl/set/printMode</literal> 893 And the print edsize by <literal>/vis/ogl/set/printSize</literal>893 And the print size by <literal>/vis/ogl/set/printSize</literal> 894 894 In generating vectorized PostScript data, hidden-surface 895 removal is performed ,based on the painter's algorithm after895 removal is performed based on the painter's algorithm after 896 896 dividing facets of shapes into small sub-triangles. 897 897 </para> 898 898 <para> 899 Note : Print stuff is done tanks to gl2ps library (incorporated in vis driver) 900 Due to a gl2ps limitation, printing an opengl view with <literal>/vis/viewer/set/hiddenMarker 1</literal> 901 will have the same effect as printing with <literal>/vis/viewer/set/hiddenMarker 0</literal> 902 </para> 903 <para> 904 Note : <literal>/vis/ogl/set/printSize</literal> command can be used to print 905 EPS files larger than screen size. The only size limitation is graphics card 899 Note that a fundamental limitation of the gl2ps library used for this PostScript printing causes 900 the <literal>/vis/viewer/set/hiddenMarker</literal> command to be ignored. 901 Trajectories will always be fully drawn in the printEPS output 902 even when the hiddenMarker hidden line removal option has been set to hide these trajectories 903 in the corresponding OpenGL view. 904 </para> 905 <para> 906 The <literal>/vis/ogl/set/printSize</literal> command can be used to print EPS files even larger 907 than the current screen resolution. This can allow creation of very large images, suitable for 908 creation of posters, etc. The only size limitation is the graphics card's 906 909 viewport dimension: GL_MAX_VIEWPORT_DIMS 907 910 -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/introduction.xml
r1211 r1222 543 543 <listitem><para> 544 544 Introduction to Geant4 Visualization ( 545 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4Vis Tutorial.pdf">545 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisIntroduction.pdf"> 546 546 pdf</ulink>, 547 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4Vis Tutorial.ppt">547 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisIntroduction.ppt"> 548 548 ppt</ulink> ) 549 549 </para></listitem> 550 550 <listitem><para> 551 Status of Geant4 Visualization (giving current status and a 552 summary of what has been improved over the last few releases) ( 553 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisStatus.pdf"> 551 Geant4 Visualization Commands ( 552 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf"> 554 553 pdf</ulink>, 555 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4Vis Status.ppt">554 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisCommands.ppt"> 556 555 ppt</ulink> ) 556 </para></listitem> 557 <listitem><para> 558 Geant4 Advanced Visualization ( 559 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisAdvanced.pdf"> 560 pdf</ulink>, 561 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisAdvanced.ppt"> 562 ppt</ulink> ) 563 </para></listitem> 564 <listitem><para> 565 How to Make a Movie ( 566 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/HowToMakeAMovie.pdf"> 567 pdf</ulink>, 568 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/HowToMakeAMovie.ppt"> 569 ppt</ulink> ) 570 </para></listitem> 571 <listitem><para> 572 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4HepRAppTutorial/G4HepRAppTutorial.html"> 573 Geant4 Visualization Tutorial using the HepRApp HepRep Browser</ulink> 574 </para></listitem> 575 <listitem><para> 576 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html"> 577 Geant4 Visualization Tutorial using the OpenGL Event Display</ulink> 578 </para></listitem> 579 <listitem><para> 580 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4DAWNTutorial/G4DAWNTutorial.html"> 581 Geant4 Visualization Tutorial using the DAWN Event Display</ulink> 557 582 </para></listitem> 558 583 <listitem><para> -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/markertext.xml
r904 r1222 259 259 260 260 <para> 261 Text is currently drawn only by the OpenGL drivers, such as OGLIX, OGLIXm, OGLIQt and OpenInventor. 262 It is not yet supported on other drivers, including the Windows OpenGL drivers, HepRep, etc. 263 </para> 264 265 <para> 261 266 Note that class <emphasis>G4Text</emphasis> also inherits <emphasis>G4VMarker</emphasis>. 262 267 Size of text is recognized as "font size", i.e., height of the -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/visdrivers.xml
r1211 r1222 6 6 <!-- Updates for Qt and HepRApp: Joseph Perl, Dec-2008 --> 7 7 <!-- Added a reference: Laurent Garnier, Dec-2009 --> 8 <!-- Updates for gMocren and HepRepFile: --> 9 <!-- Joseph Perl, Dec-2009 --> 8 10 <!-- --> 9 11 <!-- ******************************************************** --> … … 64 66 </para></listitem> 65 67 <listitem><para> 68 <xref linkend="sect.VisDrv.Mocren" /> 69 gMocren 70 </para></listitem> 71 <listitem><para> 66 72 <xref linkend="sect.VisDrv.DetTree" /> 67 73 ASCIITree … … 310 316 </para> 311 317 <para> 312 More information scan be found here : <xref linkend="sect.VisCntCmmd.SvVwPs" />318 More information can be found here : <xref linkend="sect.VisCntCmmd.SvVwPs" /> 313 319 </para> 314 320 … … 364 370 <listitem><para> 365 371 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html"> 366 Geant4 Visualization Tutorial372 http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html 367 373 </ulink> 368 374 using the OpenGL Graphics System … … 608 614 609 615 <para> 610 Several environment variables are available to override some of616 Several commands are available to override some of 611 617 HepRepFile's defaults 612 618 … … 614 620 <listitem><para> 615 621 You can specify a different directory for the heprep output 616 files by setting the environment variable G4HEPREPFILE_DIR, as in:622 files by using the setFileDir command, as in: 617 623 618 624 <informalexample> 619 625 <programlisting> 620 export G4HEPREPFILE_DIR=someOtherDir/someOtherSubDir626 /vis/heprep/setFileDir <someOtherDir/someOtherSubDir> 621 627 </programlisting> 622 628 </informalexample> … … 624 630 <listitem><para> 625 631 You can specify a different file name (the part before the 626 number) by setting the environment variable G4HEPREPFILE_NAME, as in:632 number) by using the setFileName command, as in: 627 633 628 634 <informalexample> 629 635 <programlisting> 630 export G4HEPREPFILE_NAME=myFileName636 /vis/heprep/setFileName <my_file_name> 631 637 </programlisting> 632 638 </informalexample> 633 639 634 which will produce files named myFileName0.heprep,635 myFileName1.heprep, etc.640 which will produce files named <my_file_name>0.heprep, 641 <my_file_name>1.heprep, etc. 636 642 </para></listitem> 637 643 <listitem><para> 638 644 You can specify that each file should overwrite the previous 639 file (always rewriting to the same file name) by setting the 640 environment variable G4HEPREPFILE_OVERWRITE, as in: 645 file (always rewriting to the same file name) by using the setOverwrite command, as in: 641 646 642 647 <informalexample> 643 648 <programlisting> 644 export G4HEPREPFILE_OVERWRITE=1649 /vis/heprep/setOverwrite true 645 650 </programlisting> 646 651 </informalexample> … … 661 666 from the HepRep file. But for very large files, if you know that 662 667 you will never want to make these parts visible, you can choose to 663 have them left entirely out of the file. Set the environment 664 variable G4HEPREPFILE_CULL, as in: 668 have them left entirely out of the file. Use the /vis/heprep/setCullInvisibles command, as in: 665 669 666 670 <informalexample> 667 671 <programlisting> 668 export G4HEPREPFILE_CULL=1672 /vis/heprep/setCullInvisibles true 669 673 </programlisting> 670 674 </informalexample> … … 1473 1477 </programlisting> 1474 1478 </informalexample> 1479 </para> 1480 1481 </sect2> 1482 1483 1484 <!-- ******************* Section (Level#2) ****************** --> 1485 <sect2 id="sect.VisDrv.Mocren"> 1486 <title> 1487 gMocren 1488 </title> 1489 1490 <para> 1491 The gMocrenFile driver creates a gdd file 1492 suitable for viewing with the gMocren volume visualizer. 1493 gMocren, a sophisticated tool for rendering volume data, 1494 can show volume data such as Geant4 dose distrubutions 1495 overlaid with scoring grids, trajectories and detector geometry. 1496 gMocren provides additional advanced functionality such as transfer functions, colormap editing, 1497 image rotation, image scaling, and image clipping. 1498 </para> 1499 1500 <para> 1501 gMocren is further described at 1502 <ulink url="http://geant4.kek.jp/gMocren/"> 1503 http://geant4.kek.jp/gMocren/ 1504 </ulink>. 1505 At this link you will find the gMocren download, the user manual, a tutorial and some example gdd data files. 1506 </para> 1507 1508 <para> 1509 Please note that the gMocren file driver is currently considered a Beta release. 1510 Users are encouraged to try this driver, and feedback is welcome, but users should be aware that features of 1511 this driver may change in upcoming releases. 1512 </para> 1513 1514 <para> 1515 To send volume data from Geant4 scoring to a gMocren file, the user needs to tell the gMocren driver the 1516 name of the specific scoring volume that is to be displayed. 1517 For scoring done in C++, this is the name of the sensitive volume. 1518 For command-based scoring, this is the name of the scoring mesh. 1519 1520 <informalexample> 1521 <programlisting> 1522 /vis/gMocren/setVolumeName <volume_name> 1523 </programlisting> 1524 </informalexample> 1525 </para> 1526 1527 <para> 1528 The following is an example of the minimum command sequence to send command-based scoring data to the a gMocren file: 1529 1530 <informalexample> 1531 <programlisting> 1532 # an example of a command-based scoring definition 1533 /score/create/boxMesh scoringMesh # name of the scoring mesh 1534 /score/mesh/boxSize 10. 10. 10. cm # dimension of the scoring mesh 1535 /score/mesh/nBin 10 10 10 # number of divisions of the scoring mesh 1536 /score/quantity/energyDeposit eDep # quantity to be scored 1537 /score/close 1538 # configuration of the gMocren-file driver 1539 /vis/scene/create 1540 /vis/open gMocrenFile 1541 /vis/gMocren/setVolumeName scoringMesh 1542 </programlisting> 1543 </informalexample> 1544 </para> 1545 1546 <para> 1547 To add detector geometry to this file: 1548 1549 <informalexample> 1550 <programlisting> 1551 /vis/viewer/flush 1552 </programlisting> 1553 </informalexample> 1554 </para> 1555 1556 <para> 1557 To add trajectories and primitive scorer hits to this file: 1558 1559 <informalexample> 1560 <programlisting> 1561 /vis/scene/add/trajectories 1562 /vis/scene/add/pshits 1563 /run/beamOn 1 1564 </programlisting> 1565 </informalexample> 1566 </para> 1567 1568 <para> 1569 gMocrenFile will write a file named G4_00.gd to the current directory. 1570 Subsequent draws will create files named g4_01.gdd, g4_02.gdd, etc. 1571 An alternate output directory can be specified with an environment variable: 1572 1573 <informalexample> 1574 <programlisting> 1575 export G4GMocrenFile_DEST_DIR=<someOtherDir/someOtherSubDir/> 1576 </programlisting> 1577 </informalexample> 1578 </para> 1579 1580 <para> 1581 View the resuling gMocren files with the gMocren viewer, available from: 1582 <ulink url="http://geant4.kek.jp/gMocren/"> 1583 http://geant4.kek.jp/gMocren/ 1584 </ulink>. 1475 1585 </para> 1476 1586 … … 1597 1707 <para> 1598 1708 The GAGTree driver provides a listing of the detector geometry tree 1599 within GAG, the Geant Adaptive GUI, ( 1600 <ulink url="http://erpc1.naruto-u.ac.jp/~geant4"> 1601 http://erpc1.naruto-u.ac.jp/~geant4 1602 </ulink> 1603 ). GAG allows "folding/un-folding" a part of the geometry tree, using 1709 within GAG, the Geant Adaptive GUI, from $G4INSTALL/environments/MOMO/MOMO.jar. 1710 GAG allows "folding/un-folding" a part of the geometry tree, using 1604 1711 the <emphasis>Tree Widget</emphasis> in Java: 1605 1712
Note: See TracChangeset
for help on using the changeset viewer.