Warning, /geant4/examples/extended/hadronic/Hadr09/README.md is written in an unsupported language. File is not indexed.
0001 \page ExampleHadr09 Example Hadr09
0002
0003 This example shows how to use Geant4 as a generator for simulating
0004 inelastic hadron-nuclear interactions.
0005
0006 The class HadronicGenerator is the "generator".
0007 The main hadronic models (FTFP, QGSP, BERT, BIC, IonBIC, INCL)
0008 and some combinations of two of them - in a transition energy region,
0009 similarly to what happens in physics lists - are available.
0010 See include/HadronicGenerator.hh for more detailed information.
0011
0012 The main, Hadr09.cc, shows an example of how to use it.
0013 It samples randomly the projectile hadron, its energy, its direction
0014 and the target material, and then it calls the generator.
0015 Some information regarding the secondaries which are produced can be
0016 printed out.
0017 See the comments in Hadr09.cc for more information and how eventually
0018 to change some of its configurations.
0019 Notice that Hadr09.cc does nothing really useful: users should consider
0020 to use eventually only the class HadronicGenerator.
0021
0022 (The file `Hadr09.cc-ION_PROJECTILE` shows an example of a ion-ion
0023 collision, for fixed type of projectile ion, target ion, projectile
0024 kinetic energy, and projectile direction.
0025 This file is obtained from Hadr09.cc with minimal changes.)
0026
0027 Notice that the Geant4 run-manager is not used.
0028
0029 ## HOW TO START ?
0030
0031 To build it:
0032 ```
0033 mkdir Build; cd Build
0034 cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
0035 -DGeant4_DIR=/path-to-geant4-libraries ../.
0036 make
0037 ```
0038
0039 To run it:
0040 ```
0041 ./Hadr09
0042 ```
0043
0044 which simulates 1000 hadron-nucleus collisions, randomnly selected, and
0045 prints out some information about the secondaries produced in these
0046 interactions. It takes only a few seconds to run.
0047
0048 Note: this example has been included in Geant4 10.7, but it should work
0049 also for early versions of Geant4, in particular 10.6, 10.5 and 10.4.