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.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]
1
2 =========================================================
3 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
4 =========================================================
5
6 Hadr07
7 ------
8
9 Survey energy deposition and particle's flux from an hadronic cascade.
10 Use PhysicsConstructor objects rather than predefined G4 PhysicsLists.
11 Show how to plot a depth dose profile in a rectangular box.
12
13
14 1- MATERIALS AND GEOMETRY DEFINITION
15
16 The geometry consists of a stack of one or several blocks of homogenous
17 material, called absorbers.
18
19 A minimum of 4 parameters define the geometry :
20 - the number of absorbers (NbOfAbsor)
21 - the material of each absorber,
22 - the thickness of each absorber,
23 - the tranverse dimension of the stack (sizeYZ)
24
25 In addition a transverse uniform magnetic field can be applied.
26 eg: /globalField/setValue 0 0 5 tesla
27
28 The absorber is surrounded by a World volume (vacuum)
29
30 A function, and its associated UI command, allows to build a material
31 directly from a single isotope.
32
33 The default geometry is built in DetectorConstruction, but the above parameters
34 can be changed interactively via commands defined in DetectorMessenger.
35
36 To be identified by the ThermalScattering module, the elements composing a
37 material must have a specific name (see G4ParticleHPThermalScatteringNames.cc)
38 Examples of such materials are build in Hadr06/src/DetectorConstruction.
39
40 2- PHYSICS LIST
41
42 "Full" set of physics processes are registered, but via PhysicsConstructor
43 objects rather than complete pre-defined G4 physics lists. This alternative
44 way gives more freedom to register physics.
45
46 Physics constructors are either constructors provided in Geant4 (with G4 prefix)
47 or 'local'. They include : HadronElastic, HadronInelastic, IonsInelastic,
48 GammaNuclear, RadioactiveDecay and Electomagnetic.
49 (see geant4/source/physics_lists/constructors)
50
51 HadronElasticPhysicsHP include a model for thermalized neutrons,
52 under the control of a comman defined in NeutronHPMesseger.
53
54 GammmaNuclearPhysics is a subset of G4BertiniElectroNuclearBuilder.
55
56 ElectromagneticPhysics is a simplified version of G4EmStandardPhysics.
57
58 Several hadronic physics options are controlled by environment variables.
59 To select them, see Hadr07.cc
60
61 3- AN EVENT : THE PRIMARY GENERATOR
62
63 The primary kinematic consists of a single particle starting at the
64 left face of the box. The type of the particle and its energy are set
65 in the PrimaryGeneratorAction class, and can be changed via the G4
66 build-in commands of G4ParticleGun class (see the macros provided with
67 this example).
68
69 In addition one can choose randomly the impact point of the incident
70 particle. The corresponding interactive command is built in
71 PrimaryGeneratorMessenger class.
72
73 A RUN is a set of events.
74
75 4- PHYSICS
76
77 The program computes the energy deposited in each absorber,
78 and the flux of particles emerging in the world.
79 Processes invoked and particles generated are listed.
80
81 5- HISTOGRAMS
82
83 The test has several built-in 1D histograms, which are managed by
84 G4AnalysisManager and its Messenger. The histos can be individually
85 activated with the command :
86 /analysis/h1/set id nbBins valMin valMax unit
87 where unit is the desired unit for the histo (MeV or keV, etc..)
88 (see the macros xxxx.mac).
89
90 1 "total energy deposited in absorber 1
91 2 "total energy deposited in absorber 2
92 ...........................................
93 9 "total energy deposited in absorber 9
94 10 "Edep (MeV/mm) profile along absorbers"
95 11 "total Energy deposited in all absorbers"
96 12 "total Energy leakage"
97 13 "total Energy released"
98
99 One can control the name of the histograms file with the command:
100 /analysis/setFileName name (default Hadr07)
101
102 It is possible to choose the format of the histogram file : root (default),
103 xml, csv, by using namespace in HistoManager.hh
104
105 It is also possible to print selected histograms on an ascii file:
106 /analysis/h1/setAscii id
107 All selected histos will be written on a file name.ascii (default Hadr07)
108
109 6- TRACKING and STEP MAX
110
111 Hadr07 computes the distribution of energy deposited along the trajectory of
112 the incident particle : the so-called longitudinal energy profile,
113 or depth dose distribution (histogram 10).
114 The energy deposited (edep) is randomly distribued along the step (see
115 SteppingAction).
116
117 In order to control the accuracy of the deposition, the maximum step size
118 of charged particles is computed automatically from the binning of
119 histogram 10.
120
121 As an example, this limitation is implemented as a 'full' process :
122 see StepMax class and its Messenger. The 'StepMax process' is registered
123 in the Physics List, via a physicsConstructor object (a builder).
124
125 StepMax is evaluated in the StepMax process.
126 A boolean UI command allows to deactivate this mechanism.
127 Another UI command allows to define directly a stepMax value.
128
129
130 7- VISUALIZATION
131
132 The Visualization Manager is set in the main().
133 The initialisation of the drawing is done via the commands
134 /vis/... in the macro vis.mac. To get visualisation:
135 > /control/execute vis.mac
136
137 The tracks are drawn at the end of event, and erased at the end of run.
138 gamma green
139 neutron yellow
140 negative particles (e-, ...) red
141 positive particles (e+, ions, ...) blue
142
143 8- HOW TO START ?
144
145 Execute Hadr07 in 'batch' mode from macro files :
146 % Hadr07 neutron.mac
147
148 Execute Hadr07 in 'interactive mode' with visualization :
149 % Hadr07
150 Idle> control/execute vis.mac
151 ....
152 Idle> type your commands
153 ....
154 Idle> exit
155
156 Macros provided in this example:
157 - hadr07.in: macro used in Geant4 testing to produce hadr07.out
158 - neutron.mac: neutron (14.1 MeV) in 30 cm of Li7
159 - multiLayers.mac : example of multilayers : Air, Water, G4Bone
160 - Na22.mac: multilayers. Radioactive source
161 - alpha.mac: alpha (400 MeV). Limit the step size from histo 10
162 - ionC12.mac: C12 (2.4 GeV). Limit the step size from histo 10
163 - water.mac: e- (4 MeV) in Water
164
165 Macros to be run interactively:
166 - proton.mac: proton (1 GeV). Multilayers
167 - vis.mac: To activate visualization