Warning, /geant4/examples/extended/hadronic/Hadr07/README is written in an unsupported language. File is not indexed.
0001
0002 =========================================================
0003 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
0004 =========================================================
0005
0006 Hadr07
0007 ------
0008
0009 Survey energy deposition and particle's flux from an hadronic cascade.
0010 Use PhysicsConstructor objects rather than predefined G4 PhysicsLists.
0011 Show how to plot a depth dose profile in a rectangular box.
0012
0013
0014 1- MATERIALS AND GEOMETRY DEFINITION
0015
0016 The geometry consists of a stack of one or several blocks of homogenous
0017 material, called absorbers.
0018
0019 A minimum of 4 parameters define the geometry :
0020 - the number of absorbers (NbOfAbsor)
0021 - the material of each absorber,
0022 - the thickness of each absorber,
0023 - the tranverse dimension of the stack (sizeYZ)
0024
0025 In addition a transverse uniform magnetic field can be applied.
0026 eg: /globalField/setValue 0 0 5 tesla
0027
0028 The absorber is surrounded by a World volume (vacuum)
0029
0030 A function, and its associated UI command, allows to build a material
0031 directly from a single isotope.
0032
0033 The default geometry is built in DetectorConstruction, but the above parameters
0034 can be changed interactively via commands defined in DetectorMessenger.
0035
0036 To be identified by the ThermalScattering module, the elements composing a
0037 material must have a specific name (see G4ParticleHPThermalScatteringNames.cc)
0038 Examples of such materials are build in Hadr06/src/DetectorConstruction.
0039
0040 2- PHYSICS LIST
0041
0042 "Full" set of physics processes are registered, but via PhysicsConstructor
0043 objects rather than complete pre-defined G4 physics lists. This alternative
0044 way gives more freedom to register physics.
0045
0046 Physics constructors are either constructors provided in Geant4 (with G4 prefix)
0047 or 'local'. They include : HadronElastic, HadronInelastic, IonsInelastic,
0048 GammaNuclear, RadioactiveDecay and Electomagnetic.
0049 (see geant4/source/physics_lists/constructors)
0050
0051 HadronElasticPhysicsHP include a model for thermalized neutrons,
0052 under the control of a comman defined in NeutronHPMesseger.
0053
0054 GammmaNuclearPhysics is a subset of G4BertiniElectroNuclearBuilder.
0055
0056 ElectromagneticPhysics is a simplified version of G4EmStandardPhysics.
0057
0058 Several hadronic physics options are controlled by environment variables.
0059 To select them, see Hadr07.cc
0060
0061 3- AN EVENT : THE PRIMARY GENERATOR
0062
0063 The primary kinematic consists of a single particle starting at the
0064 left face of the box. The type of the particle and its energy are set
0065 in the PrimaryGeneratorAction class, and can be changed via the G4
0066 build-in commands of G4ParticleGun class (see the macros provided with
0067 this example).
0068
0069 In addition one can choose randomly the impact point of the incident
0070 particle. The corresponding interactive command is built in
0071 PrimaryGeneratorMessenger class.
0072
0073 A RUN is a set of events.
0074
0075 4- PHYSICS
0076
0077 The program computes the energy deposited in each absorber,
0078 and the flux of particles emerging in the world.
0079 Processes invoked and particles generated are listed.
0080
0081 5- HISTOGRAMS
0082
0083 The test has several built-in 1D histograms, which are managed by
0084 G4AnalysisManager and its Messenger. The histos can be individually
0085 activated with the command :
0086 /analysis/h1/set id nbBins valMin valMax unit
0087 where unit is the desired unit for the histo (MeV or keV, etc..)
0088 (see the macros xxxx.mac).
0089
0090 1 "total energy deposited in absorber 1
0091 2 "total energy deposited in absorber 2
0092 ...........................................
0093 9 "total energy deposited in absorber 9
0094 10 "Edep (MeV/mm) profile along absorbers"
0095 11 "total Energy deposited in all absorbers"
0096 12 "total Energy leakage"
0097 13 "total Energy released"
0098
0099 One can control the name of the histograms file with the command:
0100 /analysis/setFileName name (default Hadr07)
0101
0102 It is possible to choose the format of the histogram file : root (default),
0103 xml, csv, by using namespace in HistoManager.hh
0104
0105 It is also possible to print selected histograms on an ascii file:
0106 /analysis/h1/setAscii id
0107 All selected histos will be written on a file name.ascii (default Hadr07)
0108
0109 6- TRACKING and STEP MAX
0110
0111 Hadr07 computes the distribution of energy deposited along the trajectory of
0112 the incident particle : the so-called longitudinal energy profile,
0113 or depth dose distribution (histogram 10).
0114 The energy deposited (edep) is randomly distribued along the step (see
0115 SteppingAction).
0116
0117 In order to control the accuracy of the deposition, the maximum step size
0118 of charged particles is computed automatically from the binning of
0119 histogram 10.
0120
0121 As an example, this limitation is implemented as a 'full' process :
0122 see StepMax class and its Messenger. The 'StepMax process' is registered
0123 in the Physics List, via a physicsConstructor object (a builder).
0124
0125 StepMax is evaluated in the StepMax process.
0126 A boolean UI command allows to deactivate this mechanism.
0127 Another UI command allows to define directly a stepMax value.
0128
0129
0130 7- VISUALIZATION
0131
0132 The Visualization Manager is set in the main().
0133 The initialisation of the drawing is done via the commands
0134 /vis/... in the macro vis.mac. To get visualisation:
0135 > /control/execute vis.mac
0136
0137 The tracks are drawn at the end of event, and erased at the end of run.
0138 gamma green
0139 neutron yellow
0140 negative particles (e-, ...) red
0141 positive particles (e+, ions, ...) blue
0142
0143 8- HOW TO START ?
0144
0145 Execute Hadr07 in 'batch' mode from macro files :
0146 % Hadr07 neutron.mac
0147
0148 Execute Hadr07 in 'interactive mode' with visualization :
0149 % Hadr07
0150 Idle> control/execute vis.mac
0151 ....
0152 Idle> type your commands
0153 ....
0154 Idle> exit
0155
0156 Macros provided in this example:
0157 - hadr07.in: macro used in Geant4 testing to produce hadr07.out
0158 - neutron.mac: neutron (14.1 MeV) in 30 cm of Li7
0159 - multiLayers.mac : example of multilayers : Air, Water, G4Bone
0160 - Na22.mac: multilayers. Radioactive source
0161 - alpha.mac: alpha (400 MeV). Limit the step size from histo 10
0162 - ionC12.mac: C12 (2.4 GeV). Limit the step size from histo 10
0163 - water.mac: e- (4 MeV) in Water
0164
0165 Macros to be run interactively:
0166 - proton.mac: proton (1 GeV). Multilayers
0167 - vis.mac: To activate visualization