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