Geant4 Cross Reference |
1 2 ========================================= 3 Geant4 - an Object-Oriented Toolkit for S 4 ========================================= 5 6 Hadr06 7 ------ 8 9 Survey energy deposition and particle's flu 10 Use PhysicsConstructor objects rather than 11 12 13 1- MATERIALS AND GEOMETRY DEFINITION 14 15 The geometry is a single sphere (absorber) 16 17 Two parameters define the geometry : 18 - the radius of the sphere 19 - the material of the sphere 20 21 The default geometry (R=30 cm of water) is 22 DetectorConstruction, but the above paramet 23 via commands defined in DetectorMessenger. 24 25 The absorber is surrounded by a World volum 26 27 A function, and its associated UI command, 28 directly from a single isotope. 29 30 To be identified by the ThermalScattering m 31 material must have a specific name (see G4P 32 Examples of such materials are build in Det 33 34 2- PHYSICS LIST 35 36 "Full" set of physics processes are register 37 objects rather than complete pre-defined G4 38 way gives more freedom to register physics. 39 40 Physics constructors are either constructors 41 or 'local'. They include : HadronElastic, Ha 42 RadioactiveDecay and Electomagnetic. 43 (see geant4/source/physics_lists/constructor 44 45 HadronElasticPhysicsHP include a model for t 46 defined in NeutronHPMesseger. 47 48 GammmaNuclearPhysics is a subset of G4Bertin 49 50 ElectromagneticPhysics is a simplified versi 51 52 Several hadronic physics options are control 53 To trigger them, see Hadr06.cc 54 55 3- AN EVENT : THE PRIMARY GENERATOR 56 57 The primary kinematic is a single particle 58 centre of the sphere. The type of the parti 59 PrimaryGeneratorAction (neutron 14 MeV), an 60 build-in commands of ParticleGun class (see 61 this example). 62 63 4- PHYSICS 64 65 The program computes and plots energy depos 66 (absorber) and the flux of particles leavin 67 Processes invoked and particles generated d 68 69 5- HISTOGRAMS 70 71 The test contains 24 built-in 1D histograms 72 73 1 "total energy deposit" 74 2 "Edep (MeV/mm) profile along 75 3 "total kinetic energy flow" 76 4 "energy spectrum of gamma at 77 5 "energy spectrum of e+- at c 78 6 "energy spectrum of neutrons 79 7 "energy spectrum of protons 80 8 "energy spectrum of deuteron 81 9 "energy spectrum of alphas a 82 10 "energy spectrum of all othe 83 11 "energy spectrum of all othe 84 12 "energy spectrum of all othe 85 13 "energy spectrum of all othe 86 14 "energy spectrum of emerging 87 15 "energy spectrum of emerging 88 16 "energy spectrum of emerging 89 17 "energy spectrum of emerging 90 18 "energy spectrum of emerging 91 19 "energy spectrum of emerging 92 20 "energy spectrum of all othe 93 21 "energy spectrum of all othe 94 22 "energy spectrum of all othe 95 23 "energy spectrum of all othe 96 24 "total energy released : ede 97 98 The histograms are managed by the HistoMana 99 The histos can be individually activated wi 100 /analysis/h1/set id nbBins valMin valMax u 101 where unit is the desired unit for the hist 102 103 One can control the name of the histograms 104 /analysis/setFileName name (default Hadr0 105 106 It is possible to choose the format of the 107 xml, csv, by using namespace in HistoManage 108 109 It is also possible to print selected histo 110 /analysis/h1/setAscii id 111 All selected histos will be written on a fi 112 113 6- VISUALIZATION 114 115 The Visualization Manager is set in the mai 116 The initialisation of the drawing is done v 117 /vis/... in the macro vis.mac. To get visua 118 > /control/execute vis.mac 119 120 The tracks are drawn at the end of event, a 121 gamma green 122 neutron yellow 123 negative particles (e-, ...) red 124 positive particles (e+, ions, ...) blue 125 126 7- HOW TO START ? 127 128 Execute Hadr06 in 'batch' mode from macro f 129 % Hadr06 run1.mac 130 131 Execute Hadr06 in 'interactive mode' with v 132 % Hadr06 133 Idle> control/execute vis.mac 134 .... 135 Idle> type your commands 136 .... 137 Idle> exit 138 139 Macros provided in this example: 140 - hadr06.in: macro used in Geant4 testing to 141 - graphite.mac: neutron,14 MeV, in graphite 142 - run1.mac: neutron,14 MeV, in Li7 143 - singleFission.mac: single fission in U235 144 145 Macros to be run interactively: 146 - debug.mac: water with thermal scattering 147 - fission.mac: U235 148 - vis.mac: To activate visualization 149