| 1 |
|
|---|
| 2 | =========================================================
|
|---|
| 3 | Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
|---|
| 4 | =========================================================
|
|---|
| 5 |
|
|---|
| 6 | Extended Example for G4RadioactiveDecay
|
|---|
| 7 | --------------------
|
|---|
| 8 |
|
|---|
| 9 | The exRDM is created to show how to use the G4RadioactiveDecay process to simulate the decays of
|
|---|
| 10 | radioactive isotopes as well as the induced radioactivity resulted from nuclear interactions.
|
|---|
| 11 |
|
|---|
| 12 | In this example a simple geometry consists of a cylindric target placed in the centre of a tube detector
|
|---|
| 13 | is constructed. Various primary event generation and tallying options are available. Further documentations
|
|---|
| 14 | are available at
|
|---|
| 15 |
|
|---|
| 16 | http://reat.space.qinetiq.com/septimess/exrdm
|
|---|
| 17 |
|
|---|
| 18 | 1. GEOMETRY
|
|---|
| 19 |
|
|---|
| 20 | Material: There are 7 pre-defined materials:
|
|---|
| 21 | "Vacuum" "Air" "Silicon" "Aluminium" "Lead" "Germanium" and "CsI"
|
|---|
| 22 |
|
|---|
| 23 | User can add a new material at the "PreIni" state, using the command
|
|---|
| 24 | /geometry/material/add
|
|---|
| 25 |
|
|---|
| 26 | For the geometry, the world is filled with "Air" and there are two components in it
|
|---|
| 27 |
|
|---|
| 28 | - Target: A cylinder placed at the origin along the z-axis. The default size of the cylinder is
|
|---|
| 29 | 0.5 cm radius and 1 cm in length, and its default material is "CsI".
|
|---|
| 30 |
|
|---|
| 31 | - Detector:A tube cerntred at the origin along the z-axis, with inner radius matching the
|
|---|
| 32 | radius of the target. The default thickness of the tube is 2 cm and it is
|
|---|
| 33 | 5 cm long. The default material is "Germanium".
|
|---|
| 34 |
|
|---|
| 35 | The user can change the target/detector size and material at the at the "PreIni" state, using the
|
|---|
| 36 | commands in the directory
|
|---|
| 37 |
|
|---|
| 38 | /exrdm/det
|
|---|
| 39 |
|
|---|
| 40 | 2. PHYSICS
|
|---|
| 41 |
|
|---|
| 42 | The following physics processes are included by default:
|
|---|
| 43 |
|
|---|
| 44 | - Standard electromagnetic:
|
|---|
| 45 | photo-electric effect
|
|---|
| 46 | Compton scattering
|
|---|
| 47 | pair production
|
|---|
| 48 | bremsstrahlung
|
|---|
| 49 | ionization
|
|---|
| 50 | multiple scattering
|
|---|
| 51 | annihilation
|
|---|
| 52 |
|
|---|
| 53 | - Decay
|
|---|
| 54 |
|
|---|
| 55 | - Radioactive Decay
|
|---|
| 56 | By default it is applied through out the geometry. The user can limit it to just the target by
|
|---|
| 57 | commands
|
|---|
| 58 |
|
|---|
| 59 | /grdm/noVolumes
|
|---|
| 60 | /grdm/selectVolume Target
|
|---|
| 61 |
|
|---|
| 62 | - Hadronic processes:
|
|---|
| 63 | Hadronic processes are not invoked by default. They can be activated by the user at the "PreIni"
|
|---|
| 64 | state via the command
|
|---|
| 65 |
|
|---|
| 66 | /exrdm/phys/SelectPhysics
|
|---|
| 67 |
|
|---|
| 68 | The options are:
|
|---|
| 69 |
|
|---|
| 70 | "Hadron" - Physicslist comsists of Binary_Cascade, HP_Neutron, QGSP, and LHEP, or
|
|---|
| 71 | the standdard hadron physics list avaible in the G4 distribution, i.e.
|
|---|
| 72 | "QGSP_BERT", "QGSP_BIC", "QGSP_HP", "LHEP_BERT", "LHEP_BERT_HP", "LHEP_BIC",
|
|---|
| 73 | "LHEP_BIC_HP".
|
|---|
| 74 |
|
|---|
| 75 | 3. EVENT:
|
|---|
| 76 |
|
|---|
| 77 | The event generator is based on the G4GeneralParticleSource (GPS) which allows the user to
|
|---|
| 78 | control all aspects of the initial states of the events. In this example, however, only simple features
|
|---|
| 79 | of the GPS are employed to generate the incident beam or the initial radio-isotopes. By default the
|
|---|
| 80 | incident particle is travelling along the + z-axis and the incident position is at the -Z end
|
|---|
| 81 | of the geometry.
|
|---|
| 82 |
|
|---|
| 83 | 4. DETECTOR RESPONSE:
|
|---|
| 84 |
|
|---|
| 85 | No Geant4 HITS and SD are defined in this example. If the variable "G4ANALYSIS_USE" is defined, all
|
|---|
| 86 | the relevant information of the simulation is collected at the "UserSteppingAction" stage. These
|
|---|
| 87 | include:
|
|---|
| 88 |
|
|---|
| 89 | - Emission particles in the RadioactiveDecay process:
|
|---|
| 90 | particle PDGcode,
|
|---|
| 91 | partilce kinetic energy,
|
|---|
| 92 | particle creation time,
|
|---|
| 93 | particle weight.
|
|---|
| 94 |
|
|---|
| 95 | Note: the residual nuclei is not considered as an emitted particle.
|
|---|
| 96 |
|
|---|
| 97 | - Radio-Isotopes. All the radioactive isotopes produced in the simulation:
|
|---|
| 98 | isotope PDGcode,
|
|---|
| 99 | isotope creation time,
|
|---|
| 100 | isotope weight.
|
|---|
| 101 |
|
|---|
| 102 | - Energy depositions in the target and detector by prodicts of the RadioactiveDecay process:
|
|---|
| 103 | energy depostion (positive volue for target and negative for detector),
|
|---|
| 104 | time,
|
|---|
| 105 | weight.
|
|---|
| 106 |
|
|---|
| 107 | 5. VISUALIZATION:
|
|---|
| 108 |
|
|---|
| 109 | Visualisation of the geometry and the tracks is possible with many of the G4 visualisation packages. An
|
|---|
| 110 | example of display the geometry and tracks using VRML is given in the macro file macros/vis.mac.
|
|---|
| 111 |
|
|---|
| 112 | 6. ANALYSIS:
|
|---|
| 113 |
|
|---|
| 114 | This example implements an AIDA-compliant analysis system as well as the ROOT system, for accumulating
|
|---|
| 115 | and output histograms and ntuples. If the the user has an AIDA-compliant tool such as
|
|---|
| 116 | AIDAJNI, ANAPHE, OpenScientist or PI installed, the analysis part of this example can
|
|---|
| 117 | be activated by
|
|---|
| 118 |
|
|---|
| 119 | setenv G4ANALYSIS_USE 1
|
|---|
| 120 |
|
|---|
| 121 | before building the executable.
|
|---|
| 122 |
|
|---|
| 123 | The user can also use the executable with the ROOT system, if it is available. This is done by
|
|---|
| 124 |
|
|---|
| 125 | setenv G4ANALYSIS_USE_ROOT 1
|
|---|
| 126 |
|
|---|
| 127 | again before the compilation. The AIDA and ROOT systems can be used individually, or in parallel
|
|---|
| 128 | at the same time!
|
|---|
| 129 |
|
|---|
| 130 | If no analysis system is activated, there is no output file produced apart from the screen dump.
|
|---|
| 131 | A file called "exrdm.aida" is produced by default for AIDA system and "exrdm.root" if the ROOT
|
|---|
| 132 | system is selected.
|
|---|
| 133 |
|
|---|
| 134 | The user can change the name of this output file with the command
|
|---|
| 135 |
|
|---|
| 136 | /histo/fileName new-filename
|
|---|
| 137 |
|
|---|
| 138 | The output AIDA file by default is in xml format. The AIDA system allows the use of other file format
|
|---|
| 139 | such as "root" and "hbook". User can change the output format to "hbook" or "root" using the command
|
|---|
| 140 | /histo/fileType.e.g.
|
|---|
| 141 |
|
|---|
| 142 | /histo/fileType hbook
|
|---|
| 143 | /histo/fileType root
|
|---|
| 144 |
|
|---|
| 145 | When "root" format is selected for the AIDA system, the output AIDA file name is changed to
|
|---|
| 146 | fileName_aida.root. This is to separate it from the the ROOT system output file fileName.root, in case
|
|---|
| 147 | both systems are used.
|
|---|
| 148 |
|
|---|
| 149 | The output file, in "aida" or "hbook" or "root" format, conatins the 3 ntuples (100,200,300) which have
|
|---|
| 150 | been described in section 4. In addition, there are 7 histograms in the file:
|
|---|
| 151 |
|
|---|
| 152 | histogram 10: The Pulse Height Spectrum (PHS) of the target.
|
|---|
| 153 | histogram 11: The PHS of the detector.
|
|---|
| 154 | histogram 12: The combined PHS of the target and detector.
|
|---|
| 155 | histogram 13: The anti-coincidece PHS of the target.
|
|---|
| 156 | histogram 14: The anti-coincidece PHS of the detector.
|
|---|
| 157 | histogram 15: The coincidece PHS between the target and detector.
|
|---|
| 158 | histogram 16: The emitted particle energy spectrum.
|
|---|
| 159 |
|
|---|
| 160 | The binnings of each histogram can be changed with the command
|
|---|
| 161 |
|
|---|
| 162 | /histo/setHisto
|
|---|
| 163 |
|
|---|
| 164 | It is assumed the detector and target pulses both have an integration time of 1 microsecond, and the
|
|---|
| 165 | gate is 2 microsecond for the coincidence spectrum. The target and detctor have a threshold of 10 keV
|
|---|
| 166 | in the anti-/coincidence modes.
|
|---|
| 167 |
|
|---|
| 168 | Histograms 10-15 were derived from the same data stored in ntuple-300(the energy depositions), while
|
|---|
| 169 | Histogram 16 is obtained with data in ntuple-100 (the emission particles). The user should be able to
|
|---|
| 170 | reproduce these histograms, or new histograms, with the ntuple data in an off-line analyis tool.
|
|---|
| 171 |
|
|---|
| 172 | 7. GETTING STARTED:
|
|---|
| 173 |
|
|---|
| 174 | i) If you have an AIDA-compliant analysis system installed than you shall switch on the analysis part of
|
|---|
| 175 | example by
|
|---|
| 176 |
|
|---|
| 177 | setenv G4ANALYSIS_USE 1
|
|---|
| 178 |
|
|---|
| 179 | in addition if you want to add the ROOT link to the ROOT system, do
|
|---|
| 180 |
|
|---|
| 181 | setenv G4ANALYSIS_USE_ROOT 1
|
|---|
| 182 |
|
|---|
| 183 | Otherwise make sure the G4ANALYSIS_USE and G4ANALYSIS_USE_ROOT are not definded
|
|---|
| 184 |
|
|---|
| 185 | unsetenv G4ANALYSIS_USE
|
|---|
| 186 | unsetenv G4ANALYSIS_USE_ROOT
|
|---|
| 187 |
|
|---|
| 188 | ii) Build the exRDM executable:
|
|---|
| 189 |
|
|---|
| 190 | cd to exrdm
|
|---|
| 191 | gmake clean
|
|---|
| 192 | gmake
|
|---|
| 193 |
|
|---|
| 194 | Depends on the setup, gmake will create tmp and bin directories in your $G4TMP and $G4BIN directories.
|
|---|
| 195 | The executable, named exRDM, will be in $G4BIN/$G4SYSTEM/ directory.
|
|---|
| 196 |
|
|---|
| 197 | iii) Run the executable: while in the exrdm directory do
|
|---|
| 198 |
|
|---|
| 199 | $G4BIN/$G4SYSTEM/exRDM exrdm.in
|
|---|
| 200 |
|
|---|
| 201 | If all goes well, the execution shall be terminated in a few seconds. If G4ANALYSIS_USE is defined, one
|
|---|
| 202 | should see a "proton.aida" file created. If G4ANALYSIS_USE_ROOT is defined, there will be
|
|---|
| 203 | a proton.root file in the same directory.
|
|---|
| 204 |
|
|---|
| 205 | 8. FURTHER EXAMPLES:
|
|---|
| 206 |
|
|---|
| 207 | There are a number of g4mac files in the ./macros subdirectory, to show the features of the
|
|---|
| 208 | G4RadioactiveDecay process. Most of them will lead to the creation of an aida file in the same name
|
|---|
| 209 | of the micro file, which can be examed and analysed with an analysis tool such as OpenScientist ,or JAS3.
|
|---|
| 210 |
|
|---|
| 211 | vrml.mac: to visulise the geometry and the incident of one 100 MeV Cf240 isotope and its decay. A vrml
|
|---|
| 212 | file (g4_xx.vrml) is created at the end. If a default vrml viewer has been set, one shall
|
|---|
| 213 | see the geometru and track displayed automatically.
|
|---|
| 214 |
|
|---|
| 215 | u238c.mac: shows the decays of the U238 chain in analogue MC mode.
|
|---|
| 216 |
|
|---|
| 217 | th234c-b.mac: shows the decays of Th234 in variance reduction MC mode. All its secondaies in along the
|
|---|
| 218 | decay chains are generated. The default source profile and decay biasing schemes are used
|
|---|
| 219 | to determine the decay times and weights of the secondaries.
|
|---|
| 220 |
|
|---|
| 221 | proton-1gev.mac: simulation of 1 GeV protons incident on a lead target. The decays of the radio-siotopes
|
|---|
| 222 | created in the proton-lead interactions are simulated with RadioactiveDecay in analogue
|
|---|
| 223 | MC mode.
|
|---|
| 224 |
|
|---|
| 225 | proton-b.mac: same as proton-1geV.mac, but the decays of the radio-siotopes created in the proton-lead
|
|---|
| 226 | interactions are simulated with RadioactiveDecay in variance reduction MC mode. The isotopes
|
|---|
| 227 | and those along the decay chains are forced to decay in the time windows specified by the
|
|---|
| 228 | user in file measures.data, and the weights of the decay products are determined by the
|
|---|
| 229 | beam profile as defined in the beam.data file and their decay times.
|
|---|
| 230 |
|
|---|
| 231 | one-iso.mac: simple macro file to show how to simulate the decay of a specific radio-isotope. User can
|
|---|
| 232 | edit it to simulate which ever isotope he/she likes to try.
|
|---|
| 233 |
|
|---|
| 234 | neutron.mac: macrofile to show the incident of low energy neutrons on an user specified NaI target and
|
|---|
| 235 | the decays of the induced radio-isotopes. This shows how to define a new material in exrdm.
|
|---|
| 236 |
|
|---|
| 237 | ne24.mac: this shows the decays of Ne-24 to Na-24 in variance reduction MC mode. Further decays of Na-24
|
|---|
| 238 | are not simulated by applying the nucleuslimits in RadioactiveDecay. Two runs are carried out.
|
|---|
| 239 | One with the bracjing ratio biasing applied and one without.
|
|---|
| 240 |
|
|---|
| 241 | multiple-source.mac: to show the decays of different isotopes uniformly distributed through the target
|
|---|
| 242 | volume in a single run.
|
|---|
| 243 |
|
|---|
| 244 | isotopes.mac: to show the decays of a number of different isotopes in a single macro file.
|
|---|
| 245 |
|
|---|
| 246 |
|
|---|
| 247 | f24.mac: to show the different treatments one can apply to the decays of F24. i) the complete decay chain
|
|---|
| 248 | from F24 to Mg24, in analogue mode; ii) the complete chain, but in variance reduction mode;
|
|---|
| 249 | iii) restrict to the decay of F24 only in analogue mode; iv) restrict to the decay of F24 only but
|
|---|
| 250 | in variance reduction mode.
|
|---|
| 251 |
|
|---|
| 252 | as74.mac: The decays of As74 which has a rather complicated decay scheme. i) in analogue MC mode; ii) in
|
|---|
| 253 | variance reduction MC mode.
|
|---|
| 254 |
|
|---|
| 255 | test.mac: macro used to check if the right physics processes are assigned to different particles.
|
|---|
| 256 |
|
|---|