Changeset 1222 for trunk/documents


Ignore:
Timestamp:
Dec 16, 2009, 12:14:47 PM (14 years ago)
Author:
garnier
Message:

CVS update

Location:
trunk/documents/UserDoc
Files:
49 added
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/documents/UserDoc/DocBookUsersGuides/ChangesHistory/ChangesHistory.html

    r1208 r1222  
    1515
    1616<br /><br /><br /><br />
     17
     18
     19<!-- ============================================== Section -->
     20<HR ALIGN="Center">
     21<font COLOR="#238E23">
     22<h2>Version: Geant4 9.3 (December 2009) </h2>
     23</font>
     24<HR ALIGN="Center">
     25<br />
     26
     27<p>
     28<b><u>Installation Guide</u></b>
     29</p>
     30<ul>
     31<b>- Modified Chapters/Sections</b>
     32  <ul>
     33    <li>1. Installation Introduction
     34    <li>2. Installation Procedures
     35    <li>3. Tips for Installing on Windows
     36  </ul>
     37</ul>
     38
     39<p>
     40<b><u>User's Guide: For Application Developers</u></b>
     41</p>
     42<ul>
     43<b>- Newly Added Chapters/Sections</b>
     44  <ul>
     45    <li>3.7.3 Adjoint/Reverse Monte Carlo
     46    <li>4.3.2.6 Reducing the number of field calls to speed-up simulatio
     47    <li>6.2.2 Killing Tracks in User Actions and Energy Conservation 
     48</ul>
     49<br />
     50
     51<b>- Modified Chapters/Sections</b>
     52  <ul>
     53    <li>2.1 How to Define the main() Program
     54    <li>2.4.1 Particle Definition
     55    <li>2.7 How to Make an Executable Program
     56    <li>2.8 How to Set Up an Interactive Session
     57    <li>2.9 How to Execute a Program
     58    <li>3.2 Global  Usage Classes
     59    <li>3.3 System of units
     60    <li>3.7 Event Biasing Techniques
     61    <li>4.1 Geometry
     62    <li>4.1.8 The Geometry Navigator
     63    <li>4.3.2.4 Choosing a Stepper
     64    <li>4.8 Command-based scoring
     65    <li>5.1.1 Basic Concepts
     66    <li>5.1.4 User Actions
     67    <li>5.2.1.2 Low Energy Electromagnetic Processes
     68    <li>5.2.1.3 Very Low energy Electromagnetic Processes (Geant4-DNA extension)
     69    <li>5.2.5 Opptical Photon processes
     70    <li>6.2 Optional User Actions
     71    <li>7.1 Built-in Commands
     72    <li>8.1 Introduction to Visualization
     73    <li>8.2 Adding Visualization to Your Executable
     74    <li>8.3 The Visualization Drivers
     75    <li>8.4 Controlling Visualization from Commands
     76    <li>8.9 Polylines, Markers and Text
     77    <li>9.2 Extended Examples
     78    <li>9.3 Advanced Examples
     79    <li>Appendix 1 Tips for Program Compilation 
     80    <li>Appendix 2 Histogramming
     81    <li>Appendix 5 Makefiles and Environment Variables
     82    <li>Appendix 6 Step-by-Step Installation Guides
     83    <li>Appendix 7 Development and debug tools
     84    <li>Appendix 8 Python Interface
     85  </ul>
     86</ul>
     87
     88<p>
     89<b><u>Physics Reference Manual</u></b>
     90</p>
     91
     92<ul>
     93<b>- Newly Added Chapters/Sections</b>
     94  <ul>
     95    <li>12.10.13 ICRU 73-based energy loss model
     96  </ul>
     97<br />
     98
     99<b>- Modified Chapters/Sections</b>
     100  <ul>
     101    <li>7.4 Conversion from range cut to kinetic energycut
     102    <li>7.5.9 Implementation Details
     103    <li>8.2.1 Cross Section and Energy Loss
     104    <li>9.1 Ionization
     105    <li>12.11 Penelope physics
     106  </ul>
     107</ul>
     108
    17109
    18110<!-- ============================================== Section -->
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/AllResources/Control/UIcommands/_.html

    r904 r1222  
    33<p><hr><p>
    44<h2>Sub-directories : </h2><dl>
     5<p><br><p><dt><a href="_adjoint_.html">/adjoint/</a>
     6<p><dd>Adjoint (Reverse Monte Carlo) commands.
    57<p><br><p><dt><a href="_control_.html">/control/</a>
    68<p><dd>UI control commands.
     
    3234<p><dd>Commands for materials
    3335</dl><p><hr><p>
     36
    3437<h2>Commands : </h2><dl>
     38<p><br><p><dt><b>cd, pwd</b>
     39<p><dd>
     40change, display the current command directory.<br>
     41<p><br><p><dt><b>ls, lc</b>
     42<p><dd>
     43list commands and subdirectories in the current directory.<br>
     44<p><br><p><dt><b>history</b>
     45<p><dd>
     46show previous commands.<br>
     47<p><br><p><dt><b>!historyID</b>
     48<p><dd>
     49reissue previous command.<br>
     50<p><br><p><dt><b>?command</b>
     51<p><dd>
     52show current parameter values of the command.<br>
     53<p><br><p><dt><b>help command</b>
     54<p><dd>
     55show command help.<br>
     56<p><br><p><dt><b>exit</b>
     57<p><dd>
     58terminate the session.<br>
     59   
     60
    3561</dl></body></html>
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Appendix/makeFile.xml

    r1213 r1222  
    454454  <varlistentry>
    455455    <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>
    468469      interfaces in the application to be built.
    469470    </listitem>
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Appendix/pythonInterface.xml

    r1211 r1222  
    33<!--  [History]                                               -->
    44<!--    Created by Koichi Murakami, Dec-2008                  -->
     5<!--    Correct typo by KM Dec-2009                           -->
    56<!--                                                          -->
    67<!-- ******************************************************** -->
    78
    8 
    99<!-- ******************* Section (Level#1) ****************** -->
    1010<sect1 id="sect.PythonInterface">
     
    1515<para>
    1616Python is a popular scripting language with an interactive interpreter.
    17 Geant4Py, a Geant4-Python bridge, provides a bridge for Geant4 classes. 
     17Geant4Py, a Geant4-Python bridge, provides a bridge for Geant4 classes.
    1818This enables to directly access Geant4 classes from Python scripting.
    19 User applications can be easily configured with many Python 
     19User applications can be easily configured with many Python
    2020third-party modules, such as PyROOT, on the Python software bus.
    2121</para>
     
    3737
    3838<para>
    39 Geant4Py requires 
    40 <ulink url="http://www.boost.org/">Boost-C++ external library</ulink>, 
     39Geant4Py requires
     40<ulink url="http://www.boost.org/">Boost-C++ external library</ulink>,
    4141which helps Python binding of C++ codes.
    42 A Precompiled package is available for many Linux distributions 
     42A Precompiled package is available for many Linux distributions
    4343(SL, SuSE, Ubuntu, etc) and Mac OSX.
    4444</para>
    4545
    4646<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, 
     47Geant4 libraries can be built as "static" and "granular",
     48where library components (variables, functions, ...)
     49used in the application are linked statically and shipped
     50with the application.
     51On the other hands, in dynamic binding, the library components
     52are not included in the application, and their binding is
     53carried out at run time.
     54The modular approach of Python is based on dynamic binding mechanism,
     55so you have Geant4 shared libraries are required instead.
     56</para>
     57
     58<para>
     59For generic information about building Geant4 libraries,
    6060please refer to the <ulink url="http://cern.ch/geant4/G4UsersDocuments/UsersGuides/InstallationGuide/html/">Installation Guide</ulink>.
    6161</para>
    6262
    6363<para>
    64 Here are some tips for manually building "global" and "shared" libraries 
     64Here are some tips for manually building "global" and "shared" libraries
    6565from an already existing "static + granular" installation.
    6666After setting additional environment variables like:
     
    129129</informalexample>
    130130
    131 In addition, it is required that all header files are installed 
     131In addition, it is required that all header files are installed
    132132in a single directory.
    133133
     
    139139</informalexample>
    140140
    141 This will collect all relevant header files 
     141This will collect all relevant header files
    142142in <literal>$G4INSTALL/include</literal> (or <literal>$G4INCLUDE</literal>).
    143143</para>
    144144
    145145<para>
    146 There are also additional tools for helping building a Geant4 library in
     146There are additional tools for helping building a Geant4 library in
    147147the directory <literal>g4py/tools/</literal>.
    148148</para>
     
    213213<programlisting>
    214214# ./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/include
    218   --with-clhep-libdir=/opt/heplib/CLHEP/2.0.4.4/lib
    219   --with-clhep-lib=CLHEP-2.0.4.4
    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 
     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
     223The configure script automatically check your environment,
     224and create <literal>config/config.gmk</literal>,
     225which describes your envrionment.
     226
     227After executing the configure script successfully, then
    228228
    229229<informalexample>
     
    246246
    247247<para>
    248 <emphasis role="bold">PYTHONPATH</emphasis> environment variable 
     248<emphasis role="bold">PYTHONPATH</emphasis> environment variable
    249249should 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
     251Python module search directories, given by a colon-separated list
     252of directories. Practically, the variable is
    253253<literal>(your g4py directory)/lib</literal>.
    254254</para>
     
    264264<programlisting>
    265265# python
    266 Python 2.5.2 (r252:60911, Aug  1 2008, 00:37:21)
    267 [GCC 4.3.2] on linux2
     266Python 2.6.2 (r262:71600, Oct 24 2009, 03:15:21)
     267[GCC 4.4.1 [gcc-4_4-branch revision 150839]] on linux2
    268268Type "help", "copyright", "credits" or "license" for more information.
    269269&gt;&gt;&gt; from Geant4 import *
     
    277277
    278278Visualization Manager instantiating...
    279 &gt;&gt;&gt; 
     279&gt;&gt;&gt;
    280280</programlisting>
    281281</informalexample>
     
    290290<para>
    291291When 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 
     292object will be automatically instantiated. Geant4 singleton objects are also
     293automatically instantiated. These singleton objects can be accessed
    294294by "gXXXX" variables, like "gRunManager".
    295295
     
    301301gElementTable           gParticleIterator       gUImanager
    302302gEmCalculator           gParticleTable          gVisManager
    303 gEventManager           gProcessTable           
    304 gExceptionHandler       gProductionCutsTable   
    305 gG4Date                 gRunManager             
    306 gG4VERSION_NUMBER       gRunManagerKernel       
    307 gG4Version              gStackManager           
    308 gGeometryManager        gStartUISession         
    309 gGetCurrentValues       gStateManager           
     303gEventManager           gProcessTable
     304gExceptionHandler       gProductionCutsTable
     305gG4Date                 gRunManager
     306gG4VERSION_NUMBER       gRunManagerKernel
     307gG4Version              gStackManager
     308gGeometryManager        gStartUISession
     309gGetCurrentValues       gStateManager
    310310</programlisting>
    311311</informalexample>
     
    319319
    320320<para>
    321 Once a Python object of a Geant4 class instantiated, 
     321Once a Python object of a Geant4 class instantiated,
    322322Geant4 methods can be directly called the same way as in C++.
    323323
     
    352352
    353353<para>
    354 Geant4Py provides additional utility modules called "g4py" in the directory 
    355 <literal>site-modules</literal>. It consists of predifined geometries, 
     354Geant4Py provides additional utility modules called "g4py" in the directory
     355<literal>site-modules</literal>. It consists of predifined geometries,
    356356materials, physics lists, primary generator actions, and so on.
    357357</para>
     
    363363
    364364<para>
    365 The <emphasis>ezgeom</emphasis> module provides an alternative way 
    366 of defining simple geometry. 
     365The <emphasis>ezgeom</emphasis> module provides an alternative way
     366of defining simple geometry.
    367367An example code for defining a simple geometry is shown here:
    368368</para>
     
    396396
    397397<para>
    398 The <emphasis>NISTmaterials</emphasis> module provides an instant 
     398The <emphasis>NISTmaterials</emphasis> module provides an instant
    399399use of Geant4 NIST materials.
    400400An example code for creating NIST materials:
     
    418418
    419419<para>
    420 The <emphasis>ParticleGun</emphasis> module provides 
     420The <emphasis>ParticleGun</emphasis> module provides
    421421a primary generator action with <literal>G4ParticleGun</literal>.
    422422An example code is shown here:
     
    456456
    457457<para>
    458 There are some examples of Geant4Py in the directories 
     458There are some examples of Geant4Py in the directories
    459459<literal>"tests/"</literal> and <literal>"examples/"</literal>.
    460460</para>
    461461
    462 In the <literal>"tests/"</literal> directory, 
     462In the <literal>"tests/"</literal> directory,
    463463
    464464<informalexample>
     
    474474</informalexample>
    475475
    476 The <literal>"examples/"</literal> directory contains 
     476The <literal>"examples/"</literal> directory contains
    477477a set of examples of Geant4Py.
    478478
     
    483483<para>
    484484An 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, 
     485This demo program shows that a Geant4 application well coworks with Root
     486on Python front end. VisManager, PrimaryGeneratorAction, UserAction-s,
    487487histogramming with Root are implemented in Python;
    488488<itemizedlist>
     
    521521<para>
    522522GUI interface of ExN03, which can control geometry configuration,
    523 intial particle condition, physics processes, cut value, 
     523intial particle condition, physics processes, cut value,
    524524magnetic field and visualization outputs.
    525525</para>
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Control/commands.xml

    r904 r1222  
    3434</para>
    3535
     36
    3637<note>
    3738<title>
     
    4950
    5051<para>
    51 <ulink url="./AllResources/Control/UIcommands/_.html">
    52 List of built-in commands
    53 </ulink>
     52The following is a short summary of available commands. You can also
     53see 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>
    5461</para>
     62
    5563
    5664</sect1>
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Detector/electroMagneticField.xml

    r904 r1222  
    1313<!--    Corrections, changes by: John APOSTOLAKIS, 7-Jul-2005 -->
    1414<!--    Converted to DocBook: Katsuya Amako, Aug-2006         -->
     15<!--    Corrections, changes by: John APOSTOLAKIS,15-Dec-2009 -->
    1516<!--                                                          -->
    1617<!-- ******************************************************** -->
     
    441442
    442443<para>
     444A new stepper for propagation in magnetic field is available in
     445release 9.3.  Choosing the G4NystromRK4 stepper provides accuracy
     446near that of G4ClassicalRK4 (4th order) with a significantly reduced
     447cost in field evaluation.   Using a novel analytical expression for
     448estimating the error of a proposed step and the Nystrom reuse of the
     449mid-point field value, it requires only 2 additional field
     450evaluations per attempted step, in place of 10 field evaluations of
     451ClassicalRK4 (which uses the general midpoint method for estimating
     452the 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>
     464It is proposed as an alternative stepper in the case of a pure
     465magnetic field.  It is not applicable for the simulation of electric
     466or full electromagnetic or other types of field.  For a pure
     467magnetic field, results should be fully compatible with the results
     468of ClassicalRK4 in nearly all cases.  ( The only potential exceptions
     469are large steps for tracks with small momenta - which cannot be
     470integrated well by any RK method except the Helical extended methods.)
     471</para>
     472
     473<para>
    443474You can choose an alternative stepper either when the field
    444475manager is constructed or later. At the construction of the
     
    546577the position of the track after a number of boundary crossings is
    547578directly 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>
     587Reducing the number of field calls to speed-up simulation
     588</title>
     589
     590<para>
     591An additional method to reduce the number of field evaluations is
     592to utilise the new class G4CachedMagneticField class.  It is
     593applicable 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>
    548604</para>
    549605
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Detector/geomNav.xml

    r1211 r1222  
    432432The optimisation can be switched off in such cases, by invoking the
    433433following method with argument <literal>skip = 0</literal>:
     434
     435<!-- ******* Bridgehead ******* -->
     436<bridgehead renderas='sect4'>
     437Phantoms with only one material
     438</bridgehead>
     439
     440<para>
     441If 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>
    434443
    435444<informalexample>
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Examples/AdvancedCodes.xml

    r1211 r1222  
    4040<itemizedlist spacing="compact">
    4141  <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 lenses
    46     for UV and charged particles detection in cosmic rays.
    47   </para></listitem>
    48   <listitem><para>
    4942    <ulink url="http://geant4advancedexampleswg.wikispaces.com/file/view/EcalDocumentationFile.pdf">
    5043    <emphasis role="bold">amsEcal</emphasis>
     
    5346  </para></listitem>
    5447  <listitem><para>
    55     <ulink url="http://geant4advancedexampleswg.wikispaces.com/brachytherapyExample/">
     48    <ulink url="http://geant4advancedexampleswg.wikispaces.com/brachytherapyExample">
    5649    <emphasis role="bold">brachytherapy</emphasis>
    5750    </ulink>
     
    5952    energy deposit in a Phantom filled with soft tissue.
    6053  </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
    6170  <listitem><para>
    62     <ulink url="http://geant4advancedexampleswg.wikispaces.com/hadrontherapyExample/">
     71    <ulink url="http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy">
    6372    <emphasis role="bold">hadrontherapy</emphasis>
    6473    </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
     75to 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
     77interests: 3D dose distributions, fluences, stopping powers, production cross sections
     78for the produced secondary particle, etc.; In the near future
     79new tools will be added: Hadrontherapy will permit the calculation of LET and RBE for both
     80proton and ion beams and it will include the possibility to simulate a typical active scanning proton
     81therapy transport beam line.
     82Please contact the authors for more details on the upcoming features.
    6783  </para></listitem>
     84
    6885  <listitem><para>
    69     <ulink url="http://geant4advancedexampleswg.wikispaces.com/ExamplesDocumentation/">
     86    <ulink url="http://geant4advancedexampleswg.wikispaces.com/Human_Phantom">
    7087    <emphasis role="bold">human_phantom</emphasis>
    7188    </ulink>
     
    7491    <ulink url="http://cern.ch/gdml/">GDML</ulink> representation.
    7592  </para></listitem>
     93
    7694  <listitem><para>
    77     <ulink url="http://geant4advancedexampleswg.wikispaces.com/MedicalLinac/">
     95    <ulink url="http://g4advancedexamples.lngs.infn.it/Examples/medical-linac">
    7896    <emphasis role="bold">medical_linac</emphasis>
    7997    </ulink>
     
    83101    set-up is very similar to one used in clinical practice.
    84102  </para></listitem>
     103
    85104  <listitem><para>
    86105    <ulink url="http://geant4advancedexampleswg.wikispaces.com/microbeamExample/">
     
    91110    Bordeaux-Gradignan, France.
    92111  </para></listitem>
     112
    93113  <listitem><para>
    94114    <ulink url="http://geant4advancedexampleswg.wikispaces.com/microdosimetryExample/">
     
    98118    in liquid water using very low energy electromagnetic Geant4 DNA processes.
    99119  </para></listitem>
     120
    100121  <listitem><para>
    101122    <ulink url="http://geant4advancedexampleswg.wikispaces.com/nanobeamExample/">
     
    106127    France.
    107128  </para></listitem>
     129
    108130  <listitem><para>
    109     <ulink url="http://geant4advancedexampleswg.wikispaces.com/ExamplesDocumentation/">
     131    <ulink url="http://geant4advancedexampleswg.wikispaces.com/PurgingMagnet">
    110132    <emphasis role="bold">purging_magnet</emphasis>
    111133    </ulink>
     
    114136    simulating a strong purging magnet in a treatment head.
    115137  </para></listitem>
     138
    116139  <listitem><para>
    117140    <ulink url="http://geant4advancedexampleswg.wikispaces.com/Radioprotection/">
     
    122145    defined interplanetary space radiation environment.
    123146  </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 
    131148  <listitem><para>
    132149    <ulink url="http://geant4advancedexampleswg.wikispaces.com/X-rayTelescope/">
     
    142159    , illustrating the emission of X-ray fluorescence and PIXE.
    143160  </para></listitem>
     161
    144162  <listitem><para>
    145163    <ulink url="http://geant4advancedexampleswg.wikispaces.com/ExamplesDocumentation/UndergroundPhysics/">
     
    148166    , illustrating an underground detector for dark matter searches.
    149167  </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 
    156169  <listitem><para>
    157170    <ulink url="http://geant4advancedexampleswg.wikispaces.com/ExamplesDocumentation/lArCalorimeter/">
     
    161174    Detector at LHC.
    162175  </para></listitem>
     176
    163177  <listitem><para>
    164178    <ulink url="http://geant4advancedexampleswg.wikispaces.com/ExamplesDocumentation/Rich/">
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Examples/ExtendedCodes.xml

    r1211 r1222  
    649649  </para></listitem>
    650650  <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>
    651657    <ulink url="http://cern.ch/geant4/geant4_public/source/geant4/examples/extended/medical/GammaTherapy/README">
    652658    GammaTherapy
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Fundamentals/biasing.xml

    r1211 r1222  
    22<!--                                                          -->
    33<!--  [History]                                               -->
     4<!--    New section on Reverse MC: L. Desorgher, Dec-2009     -->
    45<!--    Converted to DocBook: Katsuya Amako, Aug-2006         -->
    56<!--    Changed by: Dennis Wright, 25-Jun-2002                -->
     
    10991100
    11001101</sect2>
     1102
     1103<!-- ******************* Section (Level#2) ****************** -->
     1104<sect2 id="sect.EvtBias.ReverseMC">
     1105<title>
     1106Adjoint/Reverse Monte Carlo
     1107</title>
     1108
     1109<para>
     1110Another powerful biasing technique available in Geant4 is the Reverse Monte Carlo (RMC) method,
     1111also known as the Adjoint Monte Carlo method. In this method  particles are generated  on the external
     1112boundary  of the sensitive  part of the  geometry and then are tracked backward in the geometry till they
     1113reach  the external source surface,
     1114or exceed an energy threshold. By this way the computing time is focused only on particle tracks
     1115that are contributing to the tallies.
     1116The RMC  method is much rapid than the Forward MC method when the sensitive part of the geometry is
     1117small compared to the rest of the geometry and to the external source,  that has to be  extensive and
     1118not beam like. At the moment the RMC method is implemented in Geant4 only for some electromagnetic
     1119processes (see <xref linkend="sect.EvtBias.ReverseMC.InG4.Process" />). An example illustrating the use
     1120of the Reverse MC method in Geant4 is distributed within the Geant4
     1121toolkit 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>
     1127Treatment of the  Reverse MC method in Geant4
     1128</title>
     1129
     1130<para>
     1131Different G4Adjoint classes have been implemented into the Geant4
     1132toolkit in order to run an adjoint/reverse simulation in a Geant4 application.
     1133This implementation is illustrated in  <xref linkend="fig.EvtBias.ReverseMC.InG4_1" />.
     1134An adjoint run is divided in a serie of alternative adjoint and forward tracking  of adjoint and normal particles.
     1135One 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>
     1158Adjoint 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
     1163with  random position,  energy (1/E distribution) and direction. The adjoint source is the
     1164external surface of a user defined volume or of a user defined sphere. The adjoint
     1165source should contain one or several sensitive volumes and should be small compared to the entire geometry.
     1166The user can set the minimum and maximum energy of the adjoint source. After its
     1167generation 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
     1170represents the maximum energy of the external source. During the reverse tracking, reverse
     1171processes take place where  the adjoint particle being tracked can be either scattered
     1172or transformed in another type of adjoint particle. During the reverse tracking the
     1173G4AdjointSimulationManager replaces the user defined primary, run, stepping, ... actions, by its own actions.
     1174A 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>
     1182Forward tracking phase
     1183</title>
     1184
     1185<para>
     1186When an adjoint particle reaches the external surface its weight, type,  position,
     1187and direction are registered and a  normal primary particle, with a type equivalent to the last generated primary
     1188adjoint, is generated with the same energy, position but opposite direction  and is  tracked in the forward direction
     1189in the sensitive region as in a forward MC simulation.
     1190During this forward tracking phase the 
     1191event, stacking, stepping, tracking actions defined by the user for his forward simulation are used.
     1192By this clear separation between
     1193adjoint and forward tracking phases, the code of the user developed for a forward simulation
     1194should be only slightly  modified to adapt it for an adjoint simulation (see <xref linkend="sect.EvtBias.ReverseMC.UserCoding" />).
     1195Indeed  the computation of the signals is done by the same actions
     1196or classes that the one used in the forward simulation mode.   
     1197A 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>
     1205Reverse processes
     1206</title>
     1207
     1208<para>
     1209During the reverse tracking, reverse processes act on the adjoint particles.
     1210The 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>
     1231It is important to note that the electromagnetic reverse processes are cut dependent
     1232as their equivalent forward processes. The implementation of the reverse processes is based on
     1233the 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>
     1241Nb of adjoint particle types and nb of G4 events of an adjoint simulation
     1242</title>
     1243
     1244<para>
     1245The list of type of adjoint and forward particles that are generated on the adjoint source
     1246and considered in the simulation  is a function of the adjoint processes declared in the physics list.
     1247For example if only the e- and gamma electromagnetic processes are considered,
     1248only adjoint e- and adjoint gamma will be considered as primaries.
     1249In this case an adjoint event will be divided in four G4 event consisting in  the reverse tracking of an adjoint e-,
     1250the forward tracking of its equivalent forward e-, the reverse tracking of
     1251an adjoint gamma, and the forward tracking of its equivalent forward gamma.
     1252In this case a run of 100 adjoint events will consist into 400 Geant4 events.
     1253If the proton ionization is also considered adjoint and forward protons are also generated as primaries
     1254and 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>
     1264How to update a G4 application  to use the reverse Monte Carlo mode
     1265</title>
     1266
     1267<para>
     1268Some modifications are needed  to an existing  Geant4 application in order to adapt
     1269it for the use of the reverse simulation mode
     1270(see also the G4 example <emphasis role="bold">examples/extended/biasing/ReverseMC01</emphasis>).
     1271It 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>
     1293Creation of   G4AdjointSimManager in the main
     1294</title>
     1295<para>
     1296The class G4AdjointSimManager represents the manager  of an adjoint simulation.
     1297This 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>
     1307By doing this  the G4 application  can be   run in the reverse  MC mode as well
     1308 as in the forward MC mode. 
     1309It is important to note that G4AdjointSimManager
     1310is 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.
     1312The   definition of  the adjoint and external sources and the start of an adjoint simulation can be controlled
     1313by   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>
     1321Optional declaration of adjoint user actions
     1322</title>
     1323<para>
     1324During 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>
     1330The user stepping action is replaced by G4AdjointSteppingAction that is reponsible to stop an adjoint track when
     1331it reaches the external source,  exceed the maximum energy of the external source, or cross the adjoint source surface.
     1332If needed the user can declare its own stepping action  that will be called by  G4AdjointSteppingAction after the
     1333check of stopping track conditions. This stepping action can be different that the stepping action used for the
     1334forward simulation. It is declared to G4AdjointSimManager by the following lines of code :
     1335       
     1336<informalexample><programlisting>
     1337   G4AdjointSimManager* theAdjointSimManager = G4AdjointSimManager::GetInstance();
     1338   theAdjointSimManager-&gt;SetAdjointSteppingAction(aUserDefinedSteppingAction);
     1339</programlisting></informalexample>
     1340                 
     1341</para></listitem>
     1342
     1343<listitem><para>
     1344No stacking, tracking and event actions are considered by default. If needed the user can declare to G4AdjointSimManager
     1345stacking, tracking and event actions that will be used only during the adjoint tracking phase.
     1346The following lines of code show how to declare these adjoint actions to G4AdjointSimManager:
     1347
     1348<informalexample><programlisting>
     1349   G4AdjointSimManager* theAdjointSimManager = G4AdjointSimManager::GetInstance();
     1350   theAdjointSimManager-&gt;SetAdjointEventAction(aUserDefinedEventAction);
     1351   theAdjointSimManager-&gt;SetAdjointStackingAction(aUserDefinedStackingAction);
     1352   theAdjointSimManager-&gt;SetAdjointTrackingAction(aUserDefinedTrackingAction);
     1353</programlisting></informalexample>
     1354
     1355</para></listitem>
     1356       
     1357</itemizedlist>
     1358By 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-&gt;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>
     1372Physics list for reverse and forward electromagnetic processes
     1373</title>
     1374
     1375<para>
     1376To run an adjoint simulation a specific physics list should be used where existing G4 adjoint electromagnetic processes
     1377and 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>
     1387Modification in the analysis part of the code
     1388</title>
     1389
     1390<para>
     1391The  user code should be modified to  normalize the signals computed during the forward tracking phase to the weight of the last adjoint particle
     1392that reaches the external surface.
     1393This weight represents the  statistical weight  that the last full adjoint tracks (from the adjoint source
     1394to the external source)  would have in a forward  simulation.   If multiplied by a signal  and registered in function of energy
     1395and/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   
     1399The 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-&gt;GetFwdParticleNameAtEndOfLastAdjointTrack();
     1405   G4int PDGEncoding= theAdjointSimManager-&gt;GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack();
     1406   G4double weight = theAdjointSimManager-&gt;GetWeightAtEndOfLastAdjointTrack();
     1407   G4double Ekin  = theAdjointSimManager-&gt;GetEkinAtEndOfLastAdjointTrack();
     1408   G4double Ekin_per_nuc=theAdjointSimManager-&gt;GetEkinNucAtEndOfLastAdjointTrack(); // in case of ions
     1409   G4ThreeVector dir =  theAdjointSimManager-&gt;GetDirectionAtEndOfLastAdjointTrack();
     1410   G4ThreeVector pos = theAdjointSimManager-&gt;GetPositionAtEndOfLastAdjointTrack();
     1411   
     1412</programlisting></informalexample>
     1413
     1414</para>
     1415
     1416<para>
     1417In order to have a code working for both forward and adjoint simulation mode, the extra code needed in user actions or analysis
     1418manager  for the adjoint
     1419simulation mode can be separated to the code needed only for the normal forward  simulation by using the following public method
     1420of G4AdjointSimManager:
     1421<informalexample><programlisting>
     1422G4bool GetAdjointSimMode();
     1423</programlisting></informalexample>
     1424that returns true if   an adjoint simulation is running and false if not.
     1425
     1426</para>
     1427
     1428<para>
     1429The following   code example shows how  to normalize a detector signal and compute an answer matrix
     1430in the case of an adjoint simulation.
     1431 <example id="sect.EvtBias.ReverseMC.UserCoding.Analysis_1">
     1432<title>
     1433Normalization in the case of an adjoint simulation. The detector signal S computed during the forward tracking
     1434phase is normalized to a primary source of e-  with a differential directional flux given by the function F.
     1435An 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-&gt;GetEkinAtEndOfLastAdjointTrack();
     1450            G4ThreeVector dir_prim =  theAdjointSimManager-&gt;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>
     1476Control of an adjoint simulation
     1477</title>
     1478
     1479<para>
     1480The G4UI  commands in the directory 
     1481<ulink url="./AllResources/Control/UIcommands/_adjoint_.html">/adjoint</ulink>.
     1482allow 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>
     1500Known issues in the Reverse MC mode 
     1501</title>
     1502
     1503<!-- ******************* Section (Level#4) ****************** -->
     1504<sect4 id="sect.EvtBias.ReverseMC.Limitation.Weight">
     1505<title>
     1506Occasional wrong high weight in the adjoint simulation
     1507</title>
     1508
     1509<para>
     1510In rare cases an adjoint track may get a wrong high weight when  reaching the external source.
     1511While this happens not often it may corrupt the simulation results significantly. This happens
     1512in some tracks where  both  reverse photo-electric and bremsstrahlung processes take place at low energy.
     1513We still need some investigations to remove this problem  at the level of physical adjoint/reverse processes.
     1514However  this problem can be solved  at the level of event actions or analysis in the user code by adding a test on the
     1515normalized 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>.
     1517In this implementation  an event is rejected when the relative error of the computed  normalized energy deposited
     1518increases 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>
     1526Reverse bremsstrahlung
     1527</title>
     1528
     1529<para>
     1530A 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.
     1532In 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.
     1535Indeed the differential cross section used in G4AdjointeBremstrahlungModel  is obtained by the numerical derivation
     1536over the cut energy of the direct cross section provided  by G4eBremsstrahlungModel.
     1537This would be a correct procedure if the  distribution of secondary in   G4eBremsstrahlungModel 
     1538would 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
     1544one 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>
     1554Reverse multiple scattering
     1555</title>
     1556 
     1557<para>
     1558For the reverse multiple scattering  the same model is used than  in the forward case.
     1559This approximation makes that the discrepancy between the adjoint and forward
     1560simulation cases can get to a level of ~ 10-15% relative differences in the test cases that we have considered.
     1561In 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>
    11011569</sect1>
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/GettingStarted/executeProgram.xml

    r904 r1222  
    88<!--    Proof read by: Joe Chuma,  15-Jun-1999                -->
    99<!--    Converted to DocBook: Katsuya Amako, Aug-2006         -->
     10<!--    Updated by : Koichi Murakami, Dec-2009                -->
    1011<!--                                                          -->
    1112<!-- ******************************************************** -->
     
    375376<para>
    376377Most 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.
     378have the following <literal>main()</literal>.
     379The application can be run either in batch or interactive mode.
    380380
    381381<example id="programlist_HowToExec_5">
     
    411411  if (argc==1)   // Define UI terminal for interactive mode 
    412412    {
    413      G4UIsession * session = new G4UIterminal;
     413     G4UIExecutive* session = new G4UIExecutive(argc, argv);
    414414     UI-&gt;ApplyCommand("/control/execute prerunN03.mac");   
    415415     session-&gt;SessionStart();
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/GettingStarted/graphicalUserInterface.xml

    r1213 r1222  
    22<!--                                                          -->
    33<!--  [History]                                               -->
     4<!--    Converted to DocBook: Katsuya Amako, Aug-2006         -->
    45<!--    Update G4UIExecutive : Laurent Garnier, Dec-2009      -->
    5 <!--    Converted to DocBook: Katsuya Amako, Aug-2006         -->
     6<!--    Reviced : Koichi Murakami, Dec-2009                   -->
    67<!--                                                          -->
    78<!-- ******************************************************** -->
     
    2829
    2930<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
     31The "intercoms" category provides an expandable command interpreter.
     32It is the key mechanism of Geant4 to realize secure user interactions
     33in all categories without being annoyed by the dependencies among categories.
     34<!--
     35The direct use
    3436of Geant4 classes in a C++ program offers a first ground level of
    3537interactivity, i.e., the batch session. As seen in the
    3638examples/novice/N01, Geant4 commands and macros are to be
    37 hard-coded in the program.
    38 </para>
    39 
     39hard-coded in the program.-->
     40The Geant4 commands can be used both in a interactive terminal session and
     41in a batch mode with a maco file or a direct C++ call.
     42</para>
    4043
    4144
     
    4952
    5053<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;
     54Geant4 can be controllled by a seriese of Geant4 UI commands.
     55The "intercoms" category provides the abstract class
     56<emphasis>G4UIsession</emphasis> that processes interactive commands.
     57The concrete implementation of (graphical) user interfaceis is located
     58in the "interfaces" category. This interfacing strategy opens an
     59important door towards various user interface tools,
     60and allows Geant4 to utilize the state-of-the-art GUI tools
     61such as Motif, Qt, and Java etc.
     62The richness of the collaboration realizes
     63various user interfaces to the Geant4 command system.
     64The following interfaces is currently available;
    6165
    6266<orderedlist spacing="compact">
    6367  <listitem><para>
    64   Character terminal (dumb terminal and tcsh(bash)-like terminal),
    65   the default user interface of Geant4,
     68  Character terminal (dumb terminal and tcsh-like terminal),
     69  that is the default user interface of Geant4
    6670  </para></listitem>
    6771  <listitem><para>
    68   Xm, Win32, Qt variations of the upper terminal by using a
    69   Motif, Qt or Windows widget to retrieve commands, and
     72  Xm, Xaw, Win32, Qt variations of the above terminal by using a
     73  Motif, Athena, Qt or Windows widget
    7074  </para></listitem>
    7175  <listitem><para>
    72   GAG, a fully Graphical User Interface and its network extension
     76  GAG, a fully graphical user interface and its network extension
    7377  GainServer of the client/server type.
    7478  </para></listitem>
     
    7781
    7882<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
     83Implementation of the user sesssions (1 and 2) is included
     84in the <literal>source/interfaces/basic</literal> directory.
     85As for GAG, the front-end class is included
     86in the source/interfaces/GAG directory,
     87while its partner GUI package MOMO.jar is available
     88under the <literal>environments/MOMO</literal> directory.
     89MOMO.jar, Java archive file, contains
    8790not only GAG, but also GGE and other helper packages.
    88 Supplementary information is available
    89 from the author's Webpage(see URL below).
     91Supplementary information is available 
     92from the author's web page (see URL below).
    9093</para>
    9194
     
    114117<para>
    115118These 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,
     120including <emphasis>cygwin</emphasis> on Windows.
     121
     122The 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
     176G4UItcsh supports user-friendly key bindings a-la-tcsh.
     177<emphasis>G4UItcsh</emphasis> runs on Solaris and Linux.
     178The following keybindings are supported;
    120179
    121180<variablelist>
     
    197256
    198257<para>
    199 In addition, the following string substitutions are supported;
    200 
     258The example below shows how to set a user's prompt.
     259<informalexample>
     260<programlisting>
     261  G4UItcsh* tcsh = new G4UItcsh();
     262  tcsh-> SetPrompt("%s&gt;");
     263</programlisting>
     264</informalexample>
     265
     266The following strings are supported as substitutions in a prompt string.
    201267<variablelist>
    202268  <varlistentry>
     
    219285  </varlistentry>
    220286</variablelist>
     287</para>
     288
     289<para>
     290Command history in a user's session is saved
     291in a file <literal>$(HOME)/.g4_hist</literal>
     292that is automatically read at the next session,
     293so that command history is available across sessions.
    221294</para>
    222295
     
    226299<sect3 id="sect.HowToSetUpInter.DescInter.G4UIXm">
    227300<title>
    228 <emphasis>G4UIXm</emphasis>, <emphasis>G4UIQt</emphasis> and
     301<emphasis>G4UIXm</emphasis>, <emphasis>G4UIXaw</emphasis>, <emphasis>G4UIQt</emphasis> and
    229302<emphasis>G4UIWin32</emphasis> classes
    230303</title>
     
    232305<para>
    233306These interfaces are versions of <emphasis>G4UIterminal</emphasis>
    234 implemented over libraries Motif, Qt and WIN32 respectively.
     307implemented over libraries Motif, Athena, Qt and WIN32 respectively.
    235308<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
     310widget, <emphasis>G4UIQt</emphasis> the Qt dialog widget,
     311and <emphasis>G4UIWin32</emphasis> the Windows "edit" component to do the
    238312command capturing. These interfaces are useful if working in
    239313conjunction with visualization drivers that use the Xt library, Qt library or
     
    243317<para>
    244318A command box is at disposal for entering or recalling Geant4 commands.
    245 Command completion by typing &amp;ldquo;TAB&amp;rdquo; key is
    246 available on the command line. The shell commands "exit, cont,
    247 help, ls, cd..." are also supported. A menu bar could be customized
     319Command completion by typing "TAB" key is
     320available in the command box. The shell commands "exit, cont,
     321help, ls, cd..." are also supported. A menu bar can be customized
    248322through the <emphasis>AddMenu</emphasis> and
    249323<emphasis>AddButton</emphasis> method. Ex:
     
    278352
    279353<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>,
     355less user friendly, runs on Unix with Athena widgets. <emphasis>G4UIQt</emphasis> run
    281356everywhere with Qt.
    282357<emphasis>G4UIWin32</emphasis> runs on Windows.
     
    307382<para>
    308383Client GUIs, GAG and Gain have almost similar look-and-feel. So,
    309 GAG's functionalities are briefly explained here. Please refer to
    310 the above URL for details.
     384GAG's functionalities are briefly explained here.
     385Please refer to the URL previously mentioned for details.
    311386</para>
    312387
     
    318393 an executable simulation program via pipes. Geant4's
    319394front-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;
     395communicate with GAG. GAG runs on Linux and Windows.  MOMO.jar can be run by a command;
    322396</para>
    323397
    324398<informalexample>
    325399<programlisting>
    326    %java -jar MOMO.jar
     400   %java -jar  $G4INSTALL/environments/MOMO/MOMO.jar
    327401</programlisting>
    328402</informalexample>
     
    335409    <term>GAG Menu:</term>
    336410    <listitem>
    337     The menus are to choose and run a GEANT4 executable file, to kill or exit
    338     a GEANT4 process and to exit GAG. Upon the normal exit or an
     411    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
    339413    unexpected death of the Geant4 process, GAG window are
    340     automatically reset to run another GEANT4 executable.   
    341     </listitem>
    342   </varlistentry>
    343   <varlistentry>
    344     <term>GEANT4 Command tree:</term>
    345     <listitem>
    346     Upon the establishment of the pipe connection with the GEANT4 process, GAG displays
     414    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
    347421    the command menu, using expandable tree browser whose look and feel is similar to
    348422    a file browser. Disabled commands are shown in opaque. GAG
    349     doesn &amp;rsquo;t display commands that are just below the root of
     423    doesn't display commands that are just below the root of
    350424    the command hierarchy. Direct type-in field is available for such
    351425    input. Guidance of command categories and commands are displayed
     
    375449    in the middle of a long session of execution. Log can be saved to a
    376450    file independent of the above redirection . GAG displays warning or
    377     error messages from GEANT4 in a pop-up warning widget.
     451    error messages from Geant4 in a pop-up warning widget.
    378452    </listitem>
    379453  </varlistentry>
     
    392466
    393467<para>
    394 The libraries that don't depend on external packages are created by default, using
    395 Geant4 configure scripts.
     468The libraries that do not depend on external packages are created by default,
     469using Geant4 configure scripts.
    396470They include <emphasis>G4UIterminal</emphasis>, <emphasis>G4UItcsh</emphasis>
    397471and <emphasis>G4UIGAG</emphasis> in libraries <emphasis>libG4UIbasic.a/so</emphasis> and
     
    401475
    402476<para>
    403 To make the libraries of <emphasis>G4UIXm</emphasis>,
     477To make the libraries of <emphasis>G4UIXm</emphasis>, <emphasis>G4UIXaw</emphasis>,
    404478 <emphasis>G4UIQt</emphasis> and
    405479<emphasis>G4UIWin32</emphasis> , respective environment variables
    406480<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
    408483<emphasis role="bold">G4UI_BUILD_WIN32_SESSION</emphasis> must be set
    409484explicitly before creating libraries.
     
    411486
    412487<para>
    413 However, if the environment variable <emphasis role="bold">G4UI_NONE</emphasis> is
     488If the environment variable <emphasis role="bold">G4UI_NONE</emphasis> is
    414489set, no interface libraries are built at all.
    415490</para>
     
    432507<para>
    433508To 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,
     510GAG, GainServer</literal>) in your program, there are two ways.
     511
    436512<itemizedlist spacing="compact">
    437    <listitem><para> Calling G4UIxxx directly :
     513   <listitem> Calling G4UIxxx directly :
    438514   <informalexample>
    439515   <programlisting>
     
    446522   </programlisting>
    447523   </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
    450548   <informalexample>
    451549   <programlisting>
     
    453551   </programlisting>
    454552   </informalexample>
    455    
    456    </para></listitem>
    457    <listitem><para>Using <emphasis>G4UIExecutive</emphasis> (implement in all novice examples) :
     553
     554If the user wants to deactivate the default signal handler (soft abort)
     555raised by "Ctr-C", the false flag can be set in the second argument
     556of 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.
    458571     <informalexample>
    459572     <programlisting>
     
    471584     </programlisting>
    472585     </informalexample>
    473 </para>
    474 </listitem>
     586   </listitem>
    475587</itemizedlist>
    476588</para>
    477589
    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>
     592A corresponding environment variable must be preset
     593to select a given interface.
     594But some of them are set by defaults for your convenience.
    529595
    530596<itemizedlist spacing="compact">
     
    536602   always built (see "G4UI_BUILD.gmk") and linked, so the user can
    537603   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
    539606   compatibility with user code, as typified by geant4/examples main
    540607   programs, the C-pre-processor variables corresponding to the
     
    545612   if he/she sets no environment variables, then the C-pre-processor variable
    546613   <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.-->
    548615   </para></listitem>
    549616   <listitem><para>
    550617   The environment variable <emphasis role="bold">G4UI_USE_XM</emphasis>,
    551 <emphasis role="bold">G4UI_USE_QT</emphasis> or
     618<emphasis role="bold">G4UI_USE_QT</emphasis>,   <emphasis role="bold">G4UI_USE_XAW</emphasis> or
    552619   <emphasis role="bold">G4UI_USE_WIN32</emphasis> must be set to use the
    553620   respective interface. The file "$G4INSTALL/config/G4UI_USE.gmk"
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/GettingStarted/mainProgram.xml

    r904 r1222  
    66<!--    Proof read by: Joe Chuma,  14-Jun-1999                -->
    77<!--    Converted to DocBook: Katsuya Amako, Aug-2006         -->
     8<!--    Updated by Koichi Murakami, Dec-2009                  -->
    89<!--                                                          -->
    910<!-- ******************************************************** -->
     
    362363 #include "G4RunManager.hh"
    363364 #include "G4UImanager.hh"
    364  <emphasis role="color_blue">#include "G4UIterminal.hh"</emphasis>
     365 <emphasis role="color_blue">#include "G4UIExecutive.hh"</emphasis>
    365366 #include "G4VisExecutive.hh"
    366367
     
    395396   
    396397   // get the pointer to the User Interface manager
    397    G4UImanager* UI = G4UImanager::GetUIpointer();
     398   G4UImanager* UImanager = G4UImanager::GetUIpointer();
    398399
    399400 <emphasis role="color_blue">
     
    401402   // Define (G)UI terminal for interactive mode
    402403   {
    403      G4UIsession * session = new G4UIterminal;
    404      UI-&gt;ApplyCommand("/control/execute prerun.g4mac");
    405      session-&gt;sessionStart();
    406      delete session;
     404     G4UIExecutive * ui = new G4UIExecutive(argc,argv);
     405     UImanager-&gt;ApplyCommand("/control/execute prerun.g4mac");
     406     ui-&gt;sessionStart();
     407     delete ui;
    407408   }
    408409   else
     
    411412     G4String command = "/control/execute ";
    412413     G4String fileName = argv[1];
    413      UI-&gt;ApplyCommand(command+fileName);
     414     UImanager-&gt;ApplyCommand(command+fileName);
    414415   }
    415416</emphasis>
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/TrackingAndPhysics/physicsProcess.xml

    r1211 r1222  
    1 <!-- ******************************************************** -->
     1<!-- ******************************************************** -->
    22<!--                                                          -->
    33<!--  [History]                                               -->
     
    477477    <itemizedlist spacing="compact">
    478478      <listitem><para>
    479         A general process in the sense that the same process/class
    480         is used to simulate the multiple scattering of the all charged
    481         particles  (class name <emphasis>G4MultipleScattering</emphasis>)
    482       </para></listitem>
    483       <listitem><para>
    484479        Alternative process for simulation of single Coulomb scattering
    485480        of all charged particles (class name <emphasis>G4CoulombScattering</emphasis>)
     
    563558      </para></listitem>
    564559      <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
    566563        (class name <emphasis>G4EmStandardPhysics_option1</emphasis>)
    567564      </para></listitem>
    568565      <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
    570568        (class name <emphasis>G4EmStandardPhysics_option2</emphasis>)
    571569      </para></listitem>
    572570      <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
    574575        (class name <emphasis>G4EmStandardPhysics_option3</emphasis>)
    575576      </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>
    577595Examples of the registration of these physics constructor and
    578596construction 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 use
     597in novice, extended and advanced examples ($G4INSTALL/examples/extended/electromagnetic and $G4INSTALL/examples/advanced).
     598Examples illustrating the use
    581599of electromagnetic processes are available as part of the Geant4
    582600<ulink url="http://geant4.web.cern.ch/geant4/support/download.shtml">
     
    585603
    586604<para>
    587 <emphasis role="bold">Options</emphasis> are available for steering the standard
     605<emphasis role="bold">Options</emphasis> are available for steering of
    588606electromagnetic processes. These options may be invoked either by
    589607UI commands or by the interface class G4EmProcessOptions. This
     
    672690     SetBremsstrahlungTh(G4double)
    673691   </para></listitem>
     692   <listitem><para>
     693     SetPolarAngleLimit(G4double)
     694   </para></listitem>
     695   <listitem><para>
     696     SetFactorForAngleLimit(G4double)
     697   </para></listitem>
    674698</itemizedlist>
    675699</para>
     
    682706<itemizedlist spacing="compact">
    683707   <listitem><para>
    684      fSimple - step 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)
    685709   </para></listitem>
    686710   <listitem><para>
     
    764788   </para></listitem>
    765789   <listitem><para>
     790     FindIon(G4int Z, G4int A)
     791   </para></listitem>
     792   <listitem><para>
    766793     FindMaterial(const G4String&amp;)
    767794   </para></listitem>
     
    798825Further information is available in the web pages of the
    799826Geant4 Low Energy Electromagnetic Physics Working Group, accessible
    800 from the Geant4 web site, “who we are” section, then “working groups”.
     827from the Geant4 web site, “who we are” section, then “working groups”.
    801828</para>
    802829
     
    11141141
    11151142<para>
    1116 The default is “true”, namely vacancies in atomic shells produced by the
     1143The default is “true”, namely vacancies in atomic shells produced by the
    11171144interaction are handled by the G4AtomicDeexcitation module, possibly with
    1118 the subsequent emission of fluorescence x-rays. If is set to “false”
     1145the subsequent emission of fluorescence x-rays. If is set to “false”
    11191146by the user, the energy released in the re-arrangement of atomic vacancies
    11201147is treated in the model as a local energy deposit, without emission of
     
    11281155An option is also available in these models to enable the production of
    11291156Auger electrons by the G4AtomicDeexcitation module ActivateAuger(G4bool).
    1130 The default (coming from G4AtomicDeexcitation) is “false”, namely only
     1157The default (coming from G4AtomicDeexcitation) is “false”, namely only
    11311158fluorescence x-rays are emitted but not Auger electrons. One should
    11321159notice that this option has effect only if the usage of the atomic
     
    11731200    <itemizedlist spacing="compact">
    11741201      <listitem><para>
    1175         process class is G4DNAElastic
    1176       </para></listitem>
    1177       <listitem><para>
    1178         two alternative model classes are : G4DNAScreenedRutherfordElasticModel
     1202        process class is G4DNAElastic
     1203      </para></listitem>
     1204      <listitem><para>
     1205        two alternative model classes are : G4DNAScreenedRutherfordElasticModel
    11791206        or G4DNAChampionElasticModel
    11801207      </para></listitem>
     
    11861213    <itemizedlist spacing="compact">
    11871214      <listitem><para>
    1188         process class is G4DNAExcitation 
     1215        process class is G4DNAExcitation 
    11891216      </para></listitem>
    11901217      <listitem><para>
     
    11981225    <itemizedlist spacing="compact">
    11991226      <listitem><para>
    1200         process class is G4DNAIonisation
     1227        process class is G4DNAIonisation
    12011228      </para></listitem>
    12021229      <listitem><para>
     
    12181245    <itemizedlist spacing="compact">
    12191246      <listitem><para>
    1220         process class is G4DNAExcitation
     1247        process class is G4DNAExcitation
    12211248      </para></listitem>
    12221249      <listitem><para>
     
    12441271    <itemizedlist spacing="compact">
    12451272      <listitem><para>
    1246         process class is G4DNAChargeDecrease
     1273        process class is G4DNAChargeDecrease
    12471274      </para></listitem>
    12481275      <listitem><para>
     
    12761303    <itemizedlist spacing="compact">
    12771304      <listitem><para>
    1278         process class is G4DNAChargeIncrease
     1305        process class is G4DNAChargeIncrease
    12791306      </para></listitem>
    12801307      <listitem><para>
     
    12961323    <itemizedlist spacing="compact">
    12971324      <listitem><para>
    1298         process class is G4DNAExcitation
     1325        process class is G4DNAExcitation
    12991326      </para></listitem>
    13001327      <listitem><para>
     
    13201347    <itemizedlist spacing="compact">
    13211348      <listitem><para>
    1322         process class is G4DNAChargeIncrease
     1349        process class is G4DNAChargeIncrease
    13231350      </para></listitem>
    13241351      <listitem><para>
     
    13401367    <itemizedlist spacing="compact">
    13411368      <listitem><para>
    1342         process class is G4DNAExcitation
     1369        process class is G4DNAExcitation
    13431370      </para></listitem>
    13441371      <listitem><para>
     
    13641391    <itemizedlist spacing="compact">
    13651392      <listitem><para>
    1366         process class is G4DNAChargeIncrease
     1393        process class is G4DNAChargeIncrease
    13671394      </para></listitem>
    13681395      <listitem><para>
     
    13761403    <itemizedlist spacing="compact">
    13771404      <listitem><para>
    1378         process class is G4DNAChargeDecrease
     1405        process class is G4DNAChargeDecrease
    13791406      </para></listitem>
    13801407      <listitem><para>
     
    13961423    <itemizedlist spacing="compact">
    13971424      <listitem><para>
    1398         process class is G4DNAExcitation
     1425        process class is G4DNAExcitation
    13991426      </para></listitem>
    14001427      <listitem><para>
     
    14201447    <itemizedlist spacing="compact">
    14211448      <listitem><para>
    1422         process class is G4DNAChargeDecrease
     1449        process class is G4DNAChargeDecrease
    14231450      </para></listitem>
    14241451      <listitem><para>
     
    15361563// construct baryons ---
    15371564// Geant4 DNA particles
    1538 G4GenericIon::GenericIonDefinition() ;
     1565G4GenericIon::GenericIonDefinition() ;
    15391566G4DNAGenericIonsManager * genericIonsManager;
    15401567genericIonsManager=G4DNAGenericIonsManager::Instance();
     
    18601887to the user to decide whethee this is desirable or not for his
    18611888particular problem.
     1889</para>
     1890
     1891<para>
     1892A prototype of the compact version of neutron cross sections derived from HP database
     1893are provided with new classes <emphasis>G4NeutronHPElasticData</emphasis>,
     1894<emphasis>G4NeutronCaptureXS</emphasis>,
     1895<emphasis>G4NeutronElasticXS</emphasis>,
     1896and <emphasis>G4NeutronInelasticXS</emphasis>.
    18621897</para>
    18631898
     
    33133348bonding type (air-coupled or glued). The glue used is MeltMount, and the
    33143349ESR 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 might
     3350distributions with 4º by 5º resolution in theta and phi, respectively,
     3351for incidence angles from 0º to 90º degrees, in 1º-steps. The code might
    33173352in the future be updated by adding more LUTs, for instance, for other
    33183353scintillating materials (such as LSO or NaI). To use these LUT the user
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/TrackingAndPhysics/tracking.xml

    r1208 r1222  
    575575
    576576<para>
    577 <emphasis role="bold">Note:</emphasis>
     577<emphasis role="bold">Note-1:</emphasis>
    578578Users SHOULD NOT (and CAN NOT) change <emphasis>G4Track</emphasis>
    579579in  <literal>UserSteppingAction</literal>.
    580580Only the exception is the <literal>TrackStatus</literal>.
     581</para>
     582
     583<para>
     584<emphasis role="bold">Note-2:</emphasis>
     585Users have to be cautious to implement an unnatural/unphysical
     586action in these user actions. See the section
     587<link linkend="sect.OptUAct.EngyConsv">
     588Killing Tracks in User Actions and Energy Conservation</link>
     589for more details.
    581590</para>
    582591
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/UserActions/optionalActions.xml

    r904 r1222  
    2727<literal>G4RunManager</literal>.
    2828</para>
     29
     30<!-- ******************* Section (Level#2) ****************** -->
     31<sect2 id="sect.OptUAct.Usage">
     32<title>
     33Usage of User Actions
     34</title>
    2935
    3036<!-- ******* Bridgehead ******* -->
     
    401407</para>
    402408
    403 
     409</sect2>
     410
     411<!-- ******************* Section (Level#2) ****************** -->
     412<sect2 id="sect.OptUAct.EngyConsv">
     413<title>
     414Killing Tracks in User Actions and Energy Conservation
     415</title>
     416
     417<para>
     418In either of user action classes described in the previous section,
     419the user can implement an unnatural/unphysical action. A typical
     420example is to kill a track, which is under the simulation, in the
     421user stepping action. In this case the user have to be cautious of
     422the total energy conservation. The user stepping action itself does
     423not take care the energy or any physics quantity associated with
     424the killed track. Therefore if the user want to keep the total
     425energy of an event in this case, the lost track energy need to be
     426recorded by the user.
     427</para>
     428
     429<para>
     430The same is true for user stacking or tracking actions. If the
     431user has killed a track in these actions the all physics information
     432associated with it would be lost and, for example, the total energy
     433conservation be broken. 
     434</para>
     435
     436<para>
     437If the user wants the Geant4 kernel to take care the total energy
     438conservation automatically when he/she has killed artificially
     439a track, the user has to use a killer process. For example if the
     440user uses G4UserLimits and G4UserSpecialCuts process, energy of
     441the killed track is added to the total energy deposit.
     442</para>
     443
     444
     445</sect2>
    404446</sect1>
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/commandcontrol.xml

    r1211 r1222  
    888888The OpenGL drivers can also generate PostScript files, either from
    889889a pull-down menu (Motif and Qt drivers) or with <literal>/vis/ogl/printEPS</literal>.
    890 It can generate either vectorized or rasterized PostScript
     890It can generate either vector or bitmap PostScript
    891891data with <literal>/vis/ogl/set/printMode</literal> ("vectored" or "pixmap").
    892892You can change the filename by <literal>/vis/ogl/set/printMode</literal>
    893 And the printed size by <literal>/vis/ogl/set/printSize</literal>
     893And the print size by <literal>/vis/ogl/set/printSize</literal>
    894894In generating vectorized PostScript data, hidden-surface
    895 removal is performed, based on the painter's algorithm after
     895removal is performed based on the painter's algorithm after
    896896dividing facets of shapes into small sub-triangles.
    897897</para>
    898898<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
     899Note that a fundamental limitation of the gl2ps library used for this PostScript printing causes
     900the <literal>/vis/viewer/set/hiddenMarker</literal> command to be ignored.
     901Trajectories will always be fully drawn in the printEPS output
     902even when the hiddenMarker hidden line removal option has been set to hide these trajectories
     903in the corresponding OpenGL view.
     904</para>
     905<para>
     906The <literal>/vis/ogl/set/printSize</literal> command can be used to print EPS files even larger
     907than the current screen resolution. This can allow creation of very large images, suitable for
     908creation of posters, etc.  The only size limitation is the graphics card's
    906909viewport dimension: GL_MAX_VIEWPORT_DIMS
    907910
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/introduction.xml

    r1211 r1222  
    543543  <listitem><para>
    544544    Introduction to Geant4 Visualization (
    545     <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisTutorial.pdf">
     545    <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisIntroduction.pdf">
    546546    pdf</ulink>,
    547     <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisTutorial.ppt">
     547    <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisIntroduction.ppt">
    548548    ppt</ulink> )
    549549  </para></listitem>
    550550  <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">
    554553    pdf</ulink>,
    555     <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisStatus.ppt">
     554    <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisCommands.ppt">
    556555    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>
    557582  </para></listitem>
    558583  <listitem><para>
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/markertext.xml

    r904 r1222  
    259259
    260260<para>
     261Text is currently drawn only by the OpenGL drivers, such as OGLIX, OGLIXm, OGLIQt and OpenInventor.
     262It is not yet supported on other drivers, including the Windows OpenGL drivers, HepRep, etc.
     263</para>
     264
     265<para>
    261266Note that class <emphasis>G4Text</emphasis> also inherits <emphasis>G4VMarker</emphasis>.
    262267Size of text is recognized as "font size", i.e., height of the
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/visdrivers.xml

    r1211 r1222  
    66<!--    Updates for Qt and HepRApp: Joseph Perl, Dec-2008     -->
    77<!--    Added a reference: Laurent Garnier, Dec-2009          -->
     8<!--    Updates for gMocren and HepRepFile:                   -->
     9<!--                            Joseph Perl, Dec-2009         -->
    810<!--                                                          -->
    911<!-- ******************************************************** -->
     
    6466  </para></listitem>
    6567  <listitem><para>
     68    <xref linkend="sect.VisDrv.Mocren" />
     69    gMocren
     70  </para></listitem>
     71  <listitem><para>
    6672    <xref linkend="sect.VisDrv.DetTree" />
    6773    ASCIITree
     
    310316</para>
    311317<para>
    312 More informations can be found here :  <xref linkend="sect.VisCntCmmd.SvVwPs" />
     318More information can be found here :  <xref linkend="sect.VisCntCmmd.SvVwPs" />
    313319</para>
    314320
     
    364370  <listitem><para>
    365371    <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html">
    366     Geant4 Visualization Tutorial
     372    http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html
    367373    </ulink>
    368374    using the OpenGL Graphics System
     
    608614
    609615<para>
    610 Several environment variables are available to override some of
     616Several commands are available to override some of
    611617HepRepFile's defaults
    612618
     
    614620  <listitem><para>
    615621    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:
    617623
    618624    <informalexample>
    619625    <programlisting>
    620      export G4HEPREPFILE_DIR=someOtherDir/someOtherSubDir
     626    /vis/heprep/setFileDir &lt;someOtherDir/someOtherSubDir&gt;
    621627    </programlisting>
    622628    </informalexample>
     
    624630  <listitem><para>
    625631    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:
    627633
    628634    <informalexample>
    629635    <programlisting>
    630      export G4HEPREPFILE_NAME=myFileName
     636    /vis/heprep/setFileName &lt;my_file_name&gt;
    631637    </programlisting>
    632638    </informalexample>
    633639
    634     which will produce files named myFileName0.heprep,
    635     myFileName1.heprep, etc.
     640    which will produce files named &lt;my_file_name&gt;0.heprep,
     641    &lt;my_file_name&gt;1.heprep, etc.
    636642  </para></listitem>
    637643  <listitem><para>
    638644    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:
    641646
    642647    <informalexample>
    643648    <programlisting>
    644      export G4HEPREPFILE_OVERWRITE=1
     649    /vis/heprep/setOverwrite true
    645650    </programlisting>
    646651    </informalexample>
     
    661666    from the HepRep file. But for very large files, if you know that
    662667    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:
    665669
    666670    <informalexample>
    667671    <programlisting>
    668      export G4HEPREPFILE_CULL=1
     672    /vis/heprep/setCullInvisibles true
    669673    </programlisting>
    670674    </informalexample>
     
    14731477</programlisting>
    14741478</informalexample>
     1479</para>
     1480
     1481</sect2>
     1482
     1483
     1484<!-- ******************* Section (Level#2) ****************** -->
     1485<sect2 id="sect.VisDrv.Mocren">
     1486<title>
     1487gMocren
     1488</title>
     1489
     1490<para>
     1491The gMocrenFile driver creates a gdd file
     1492suitable for viewing with the gMocren volume visualizer.
     1493gMocren, a sophisticated tool for rendering volume data,
     1494can show volume data such as Geant4 dose distrubutions
     1495overlaid with scoring grids, trajectories and detector geometry.
     1496gMocren provides additional advanced functionality such as transfer functions, colormap editing,
     1497image rotation, image scaling, and image clipping.
     1498</para>
     1499
     1500<para>
     1501gMocren is further described at
     1502<ulink url="http://geant4.kek.jp/gMocren/">
     1503http://geant4.kek.jp/gMocren/
     1504</ulink>.
     1505At this link you will find the gMocren download, the user manual, a tutorial and some example gdd data files.
     1506</para>
     1507
     1508<para>
     1509Please note that the gMocren file driver is currently considered a Beta release.
     1510Users are encouraged to try this driver, and feedback is welcome, but users should be aware that features of
     1511this driver may change in upcoming releases.
     1512</para>
     1513
     1514<para>
     1515To send volume data from Geant4 scoring to a gMocren file, the user needs to tell the gMocren driver the
     1516name of the specific scoring volume that is to be displayed.
     1517For scoring done in C++, this is the name of the sensitive volume.
     1518For command-based scoring, this is the name of the scoring mesh.
     1519
     1520<informalexample>
     1521<programlisting>
     1522     /vis/gMocren/setVolumeName &lt;volume_name&gt;
     1523</programlisting>
     1524</informalexample>
     1525</para>
     1526
     1527<para>
     1528The 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>
     1547To add detector geometry to this file:
     1548
     1549<informalexample>
     1550<programlisting>
     1551    /vis/viewer/flush
     1552</programlisting>
     1553</informalexample>
     1554</para>
     1555
     1556<para>
     1557To 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>
     1569gMocrenFile will write a file named G4_00.gd to the current directory.
     1570Subsequent draws will create files named g4_01.gdd, g4_02.gdd, etc.
     1571An alternate output directory can be specified with an environment variable:
     1572
     1573<informalexample>
     1574<programlisting>
     1575    export G4GMocrenFile_DEST_DIR=&lt;someOtherDir/someOtherSubDir/&gt;
     1576</programlisting>
     1577</informalexample>
     1578</para>
     1579
     1580<para>
     1581View the resuling gMocren files with the gMocren viewer, available from:
     1582<ulink url="http://geant4.kek.jp/gMocren/">
     1583http://geant4.kek.jp/gMocren/
     1584</ulink>.
    14751585</para>
    14761586
     
    15971707<para>
    15981708The 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
     1709within GAG, the Geant Adaptive GUI, from $G4INSTALL/environments/MOMO/MOMO.jar.
     1710GAG allows "folding/un-folding" a part of the geometry tree, using
    16041711the <emphasis>Tree Widget</emphasis> in Java:
    16051712
  • trunk/documents/UserDoc/DocBookUsersGuides/PhysicsReferenceManual/latex/electromagnetic/lowenergy/hadrons.tex

    r1211 r1222  
    785785
    786786
     787\subsection{ICRU 73-based energy loss model}
     788The ICRU 73 \cite{hlei.ICRU73} report contains stopping power tables
     789for ions with atomic numbers 3--18 and 26, covering a range of different
     790elemental and compound target materials. The stopping powers derive from
     791calculations with the PASS code \cite{hlei.sigm02}, which implements the
     792binary stopping theory described in \cite{hlei.sigm02,hlei.sigm00}.  Tables
     793in ICRU 73 extend over an energy range up to 1 GeV/nucleon. All stopping
     794powers were incorporated into Geant4 and are available through a
     795parameterisation model ({\tt G4IonParametrisedLossModel}). For a few
     796materials revised stopping powers were included (water, water vapor, nylon type
     7976 and 6/6 from P. Sigmund et al \cite{hlei.sigm09a} and copper from P. Sigmund
     798\cite{hlei.sigm09b}), which replace the corresponding tables of the original
     799ICRU 73 report.
     800
     801To account for secondary electron production above $T_{c}$, the continuous
     802energy loss per unit path length is calculated according to
     803\begin{equation}
     804\label{hlei.rstp}
     805\frac{dE}{dx}\bigg|_{T<T_C} = \bigg(\frac{dE}{dx}\bigg)_{ICRU73} -
     806\bigg(\frac{dE}{dx}\bigg)_{\delta}
     807\end{equation}
     808where $(dE/dx)_{ICRU73}$ refers to stopping powers obtained by interpolating
     809ICRU 73 tables and $(dE/dx)_{\delta}$ is the mean energy transferred to
     810$\delta$-electrons per path length given by
     811\begin{equation}
     812\bigg(\frac{dE}{dx}\bigg)_{\delta} = \sum_{i} n_{at,i} \int_{T_c}^{T_{max}}
     813\frac{d\sigma_i(T)}{dT} T dT
     814\label{}
     815\end{equation}
     816where the index $i$ runs over all elements composing the material, $n_{at,i}$
     817is the number of atoms of the element $i$ per volume, $T_{max}$ is the maximum
     818energy transferable to an electron according to formula (\ref{hlei.a1}) and
     819$d\sigma_i/dT$ specifies the differential cross section per atom for producing
     820an $\delta$-electron following equation (\ref{hlei.bbb}).
     821
     822For compound targets not considered in the ICRU 73 report, the first term on
     823the rightern side in equation (\ref{hlei.rstp}) is computed by applying Bragg's
     824additivity rule \cite{hlei.ICRU49} if tables for all elemental components are
     825available in ICRU 73.
     826
     827
     828
    787829\subsection{Status of this document}
    788830
     
    79383519.01.2002 Minor corrections (mma) \\
    79483613.05.2002 Minor corrections (V.Ivanchenko) \\
    795 28.08.2002 Minor corrections (V.Ivanchenko)
     83728.08.2002 Minor corrections (V.Ivanchenko) \\
     83811.12.2009 Modified by A. Lechner to add ICRU 73 section
    796839
    797840\begin{latexonly}
     
    862905\bibitem{hlei.Gryzinski1} M. Gryzinski, Phys. Rev. A 135 (1965) 305.
    863906\bibitem{hlei.Gryzinski2} M. Gryzinski, Phys. Rev. A 138 (1965) 322.
     907\bibitem{hlei.ICRU73}
     908Stopping of Ions Heavier Than Helium,
     909ICRU Report 73, Oxford University Press (2005).
     910\bibitem{hlei.sigm02}
     911P.~Sigmund and A.~Schinner,
     912Nucl. Instr. Meth. in Phys. Res. B 195 (2002) 64.
     913\bibitem{hlei.sigm00}
     914P.~Sigmund and A.~Schinner,
     915Eur. Phys. J. D 12  (2000) 425.
     916\bibitem{hlei.sigm09a}
     917P.~Sigmund, A.~Schinner and H.~Paul,
     918Errata and Addenda for ICRU Report 73, Stopping of Ions Heavier
     919than Helium (2009).
     920\bibitem{hlei.sigm09b}
     921Personal communication with P.~Sigmund (2009).
    864922\end{thebibliography}
    865923
     
    932990\item M. Gryzinski, Phys. Rev. A 135 (1965) 305.
    933991\item M. Gryzinski, Phys. Rev. A 138 (1965) 322.
     992\item
     993Stopping of Ions Heavier Than Helium,
     994ICRU Report 73, Oxford University Press (2005).
     995\item
     996P.~Sigmund and A.~Schinner,
     997Nucl. Instr. Meth. in Phys. Res. B 195 (2002) 64.
     998\item
     999P.~Sigmund and A.~Schinner,
     1000Eur. Phys. J. D 12  (2000) 425.
     1001\item
     1002P.~Sigmund, A.~Schinner and H.~Paul,
     1003Errata and Addenda for ICRU Report 73, Stopping of Ions Heavier than Helium (2009).
     1004\item
     1005Personal communication with P.~Sigmund (2009).
     1006
    9341007\end{enumerate}
    9351008
  • trunk/documents/UserDoc/DocBookUsersGuides/PhysicsReferenceManual/latex/electromagnetic/miscellaneous/setcuts.tex

    r1211 r1222  
    1818one geometry is valid also for the other geometries.
    1919
    20 The value of cut is defined only for electrons, positrons and gamma.
     20The value of cut is defined for electrons, positrons, gamma and protons.
    2121At the beginning of initialization of Geant4 physics the conversion from unique
    2222{\it cut in range} to cuts in kinetic energy for each {\it G4MaterialCutsCouple}
     
    4040the corresponding kinetic energy can be found out. If obtained $cut in energy$
    4141cannot be below
    42 the parameter $lowlimit$ (default $1 \; keV$).
     42the parameter $lowlimit$ (default $1 \; keV$) and above $highlimit$ (default $10 \; GeV$).
    4343If in specific application lower cut is required,
    4444then the allowed energy cut needs to be extended:\\
    4545\\
    4646{\it \footnotesize G4ProductionCutsTable::GetProductionCutsTable()$\to$SetEnergyRange(lowlimit,highlimit);}
    47 
     47or via UI commands
     48$$/cuts/setMinCutEnergy\;\; 100\;\; eV$$
     49$$/cuts/setMaxCutEnergy\;\; 100\;\; TeV$$
    4850In contrary to electrons, gammas has no range, so some approximation should
    4951be used for range to energy conversion.
     
    7375{\it highlimit}.
    7476
     77The cut for proton is introduced with Geant4 v9.3. The main goal
     78of this cut is to limit production of all recoil ions including protons
     79 in elastic scattering
     80processes. A simple linear conversion formula is used to compute energy threshold from the value
     81of cut in range, in particular, the cut in range $1~mm$ corresponds
     82to the production threshold $100 keV$.
     83
    7584The conversion from range to energy can be studied using {\it G4EmCalculator}
    7685class. This class allows access or recalculation of energy loss, ranges and
     
    9099   04.12.04 minor re-wording by D.H. Wright \\
    91100   18.05.07 rewritten by V. Ivanchenko \\
    92    11.12.08 minor revision by V. Ivanchenko \\
     101   11.12.08 minor revision by V. Ivanchenko, Geant4 v9.2 \\
     102   11.12.09 minor revision by V. Ivanchenko, Geant4 v9.3 \\
    93103
    94104\begin{latexonly}
  • trunk/documents/UserDoc/DocBookUsersGuides/PhysicsReferenceManual/latex/electromagnetic/standard/hion.tex

    r1211 r1222  
    244244\subsubsection{Nuclear Stopping}
    245245
    246 For scaled energies below $T_{lim} = 2 MeV$ the contribution of non-ionizing energy loss
    247 needs to be taken into account. The additional energy loss due to {\it nuclear stopping power}
    248 $\Delta T_N \Delta s$ is added the the energy loss. The process {\it G4ionIonisation}
    249 has a flag, which allows to switch on or off this correction. For that the method\\
    250 \\
    251 {\it G4ionIonisation::ActivateNuclearStopping(G4bool)}
    252 \\
    253 \\
    254 can be used. By default
    255 this correction is active and the ICRU'49 parameterisation \cite{hion.ICRU49} is used.
     246Nuclear stopping due to elastic ion-ion scattering since Geant4 v9.3
     247can be simulated with the continuous process
     248{\it G4NuclearStopping}. By default
     249this correction is active and the ICRU'49 parameterisation \cite{hion.ICRU49} is used,
     250which is implemented in the model class {\it G4ICRU49NuclearStoppingModel}. 
    256251
    257252
  • trunk/documents/UserDoc/DocBookUsersGuides/PhysicsReferenceManual/latex/electromagnetic/standard/msc.tex

    r1211 r1222  
    1515\item
    1616G4MuMultipleScattering.
    17 \item
    18 G4MultipleScattering;
    1917\end{itemize}
    2018For concrete simulation the {\it G4VMscModel} interface is used, which is an extension
     
    2220\begin{itemize}
    2321\item
    24 G4UrbanMscModel;
     22G4UrbanMscModel90 - Geant4 v9.0 applied to muons, hadrons and ions;
    2523\item
    26 G4UrbanMscModel2;
     24G4UrbanMscModel92 - Geant4 v9.2 (current default) applied for electron and positron;
    2725\item
    28 G4UrbanMscModel90;
     26G4UrbanMscModel93 - Geant4 v9.3 applied for electron and positron for Option2, Option3 and other EM Physics Lists;
    2927\item
    30 G4WentzelVIModel.
     28G4GoudsmitSaundersonModel - for electrons and positrons (beta-version);
     29\item
     30G4WentzelVIModel - for muons and hadrons, should be included in Physics Lists together with G4CoulombScattering process;
    3131\end{itemize}
    32 The last model is not yet in the production mode, so below we will concentrate
    33 on models developed by L.~Urban \cite{msc.urban}. Today default model for
    34 electrons and positrons is {\it G4UrbanMscModel2}, for hadrons - {\it G4UrbanMscModel90}.
     32The last models are not yet in the production mode, so below we will concentrate
     33on models developed by L.~Urban \cite{msc.urban}.
    3534
    3635\subsection{Introduction}
     
    811810 08.12.08  revised by L. Urb\'an, for Geant4 V9.2 \\
    812811 11.12.08  minor revision by V. Ivanchenko \\
     812 11.12.09  minor revision by V. Ivanchenko, for Geant4 v9.3 \\
    813813 
    814814\begin{latexonly}
  • trunk/documents/UserDoc/UsersGuides/PhysicsReferenceManual/latex/electromagnetic/lowenergy/CVS/Entries

    r1211 r1222  
    66/compton.tex/1.7/Mon Dec  7 10:31:00 2009//
    77/gammaconversion.tex/1.6/Mon Dec  7 10:31:00 2009//
    8 /hadrons.tex/1.26/Mon Dec  7 10:31:00 2009//
    98/ionisation.tex/1.1/Mon Dec  7 10:31:00 2009//
    109/ionisation2.tex/1.9/Mon Dec  7 10:31:00 2009//
     
    1514/rayleigh.tex/1.10/Mon Dec  7 10:31:00 2009//
    1615/relaxation.tex/1.5/Mon Dec  7 10:31:00 2009//
     16/hadrons.tex/1.27/Wed Dec 16 10:07:42 2009//
    1717D
  • trunk/documents/UserDoc/UsersGuides/PhysicsReferenceManual/latex/electromagnetic/lowenergy/hadrons.tex

    r1208 r1222  
    784784continuous and the discrete parts of the process.
    785785
     786\subsection{ICRU 73-based energy loss model}
     787The ICRU 73 \cite{hlei.ICRU73} report contains stopping power tables
     788for ions with atomic numbers 3--18 and 26, covering a range of different
     789elemental and compound target materials. The stopping powers derive from
     790calculations with the PASS code \cite{hlei.sigm02}, which implements the
     791binary stopping theory described in \cite{hlei.sigm02,hlei.sigm00}.  Tables
     792in ICRU 73 extend over an energy range up to 1 GeV/nucleon. All stopping
     793powers were incorporated into Geant4 and are available through a
     794parameterisation model ({\tt G4IonParametrisedLossModel}). For a few
     795materials revised stopping powers were included (water, water vapor, nylon type
     7966 and 6/6 from P. Sigmund et al \cite{hlei.sigm09a} and copper from P. Sigmund
     797\cite{hlei.sigm09b}), which replace the corresponding tables of the original
     798ICRU 73 report.
     799
     800To account for secondary electron production above $T_{c}$, the continuous
     801energy loss per unit path length is calculated according to
     802\begin{equation}
     803\label{hlei.rstp}
     804\frac{dE}{dx}\bigg|_{T<T_C} = \bigg(\frac{dE}{dx}\bigg)_{ICRU73} -
     805\bigg(\frac{dE}{dx}\bigg)_{\delta}
     806\end{equation}
     807where $(dE/dx)_{ICRU73}$ refers to stopping powers obtained by interpolating
     808ICRU 73 tables and $(dE/dx)_{\delta}$ is the mean energy transferred to
     809$\delta$-electrons per path length given by
     810\begin{equation}
     811\bigg(\frac{dE}{dx}\bigg)_{\delta} = \sum_{i} n_{at,i} \int_{T_c}^{T_{max}}
     812\frac{d\sigma_i(T)}{dT} T dT
     813\label{}
     814\end{equation}
     815where the index $i$ runs over all elements composing the material, $n_{at,i}$
     816is the number of atoms of the element $i$ per volume, $T_{max}$ is the maximum
     817energy transferable to an electron according to formula (\ref{hlei.a1}) and
     818$d\sigma_i/dT$ specifies the differential cross section per atom for producing
     819an $\delta$-electron following equation (\ref{hlei.bbb}).
     820
     821For compound targets not considered in the ICRU 73 report, the first term on
     822the rightern side in equation (\ref{hlei.rstp}) is computed by applying Bragg's
     823additivity rule \cite{hlei.ICRU49} if tables for all elemental components are
     824available in ICRU 73.
    786825
    787826\subsection{Status of this document}
     
    79383219.01.2002 Minor corrections (mma) \\
    79483313.05.2002 Minor corrections (V.Ivanchenko) \\
    795 28.08.2002 Minor corrections (V.Ivanchenko)
     83428.08.2002 Minor corrections (V.Ivanchenko) \\
     83511.12.2009 Modified by A. Lechner to add ICRU 73 section
    796836
    797837\begin{latexonly}
     
    862902\bibitem{hlei.Gryzinski1} M. Gryzinski, Phys. Rev. A 135 (1965) 305.
    863903\bibitem{hlei.Gryzinski2} M. Gryzinski, Phys. Rev. A 138 (1965) 322.
     904\bibitem{hlei.ICRU73}
     905Stopping of Ions Heavier Than Helium,
     906ICRU Report 73, Oxford University Press (2005).
     907\bibitem{hlei.sigm02}
     908P.~Sigmund and A.~Schinner,
     909Nucl. Instr. Meth. in Phys. Res. B 195 (2002) 64.
     910\bibitem{hlei.sigm00}
     911P.~Sigmund and A.~Schinner,
     912Eur. Phys. J. D 12  (2000) 425.
     913\bibitem{hlei.sigm09a}
     914P.~Sigmund, A.~Schinner and H.~Paul,
     915Errata and Addenda for ICRU Report 73, Stopping of Ions Heavier
     916than Helium (2009).
     917\bibitem{hlei.sigm09b}
     918Personal communication with P.~Sigmund (2009).
    864919\end{thebibliography}
    865920
     
    932987\item M. Gryzinski, Phys. Rev. A 135 (1965) 305.
    933988\item M. Gryzinski, Phys. Rev. A 138 (1965) 322.
     989\item
     990Stopping of Ions Heavier Than Helium,
     991ICRU Report 73, Oxford University Press (2005).
     992\item
     993P.~Sigmund and A.~Schinner,
     994Nucl. Instr. Meth. in Phys. Res. B 195 (2002) 64.
     995\item
     996P.~Sigmund and A.~Schinner,
     997Eur. Phys. J. D 12  (2000) 425.
     998\item
     999P.~Sigmund, A.~Schinner and H.~Paul,
     1000Errata and Addenda for ICRU Report 73, Stopping of Ions Heavier than Helium (2009).
     1001\item
     1002Personal communication with P.~Sigmund (2009).
    9341003\end{enumerate}
    9351004
Note: See TracChangeset for help on using the changeset viewer.