Warning, /geant4/examples/extended/electromagnetic/TestEm7/README is written in an unsupported language. File is not indexed.
0001 -------------------------------------------------------------------
0002
0003 =========================================================
0004 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
0005 =========================================================
0006
0007 TestEm7
0008 -------
0009
0010 How to produce a Bragg curve in a water phantom.
0011 How to compute the dose in 'test volumes' called tallies.
0012 How to define a maximum step size.
0013
0014 1- GEOMETRY DEFINITION
0015
0016 The geometry consists of a single block of a homogenous material,
0017 placed in a world.
0018
0019 Three parameters define the geometry :
0020 - the material of the box,
0021 - the thickness of the box (sizeX),
0022 - the transverse dimension of the box (sizeYZ).
0023
0024 The default is 20 cm of water.
0025
0026 In addition a transverse uniform magnetic field can be applied.
0027
0028 The default geometry is constructed in DetectorConstruction class,
0029 but all of the above parameters can be changed interactively via
0030 the commands defined in the DetectorMessenger class.
0031
0032 The size, matter, positions of several test-volumes (tallies) can be
0033 defined via UI commands : /testem/det/tally...
0034
0035 2- PHYSICS LIST
0036
0037 Physics lists can be local (eg. in this example) or from G4 kernel
0038 physics_lists subdirectory.
0039
0040 Local physics lists:
0041 - "local" standard EM physics with current 'best' options setting.
0042 these options are explicited in PhysListEmStandard
0043 - "standardSS" standard EM physics with single Coulomb scattering
0044 instead of multiple scattering;
0045 - "standardNR" standard EM physics with single Coulomb scattering
0046 process G4ScreenedNuclearRecoil instead of the
0047 multiple scattering for ions with energy less than
0048 100 MeV/nucleon; the new process was developed
0049 by M.H. Mendenhall and R.A. Weller from Vanderbuilt
0050 University and published in NIM B 277 (2005) 420.
0051 The process is released in this example with its
0052 mathematical tool c2_functions
0053
0054 From geant4/source/physics_lists/builders:
0055 - "emstandard_opt0" recommended standard EM physics for LHC
0056 - "emstandard_opt1" best CPU performance standard physics for LHC
0057 - "emstandard_opt2" similar fast simulation
0058 - "emstandard_opt3" best standard EM options - analog to "local" above
0059 - "emstandard_opt4" best current advanced EM options standard + lowenergy
0060 - "emstandardWVI" standard EM physics and WentzelVI multiple scattering
0061 - "emstandardSS" standard EM physics and single scattering model
0062 - "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
0063 - "emlivermore" low-energy EM physics using Livermore data
0064 - "empenelope" low-energy EM physics implementing Penelope models
0065 - "emlowenergy" low-energy EM physics implementing experimental
0066 low-energy models
0067
0068 Decay and StepMax processes are added to each list.
0069
0070 Optional components can be added:
0071 - "elastic" elastic scattering of hadrons
0072 - "HElastic"
0073 - "QElastic"
0074 - "binary" QBBC configuration of hadron inelastic models
0075 - "binary_ion" Binary ion inelastic models
0076 - "ionIoni" Ion gas models
0077
0078 Physics lists and options can be (re)set with UI commands
0079
0080 3- AN EVENT : THE PRIMARY GENERATOR
0081
0082 The primary kinematic consists of a single particle which hits the
0083 block perpendicular to the input face. The type of the particle
0084 and its energy are set in the PrimaryGeneratorAction class, and can
0085 changed via the G4 build-in commands of G4ParticleGun class (see
0086 the macros provided with this example).
0087 The default is a 160 MeV proton.
0088
0089 In addition one can define randomly the impact point of the incident
0090 particle. The corresponding interactive command is built in
0091 PrimaryGeneratorMessenger class.
0092
0093 A RUN is a set of events.
0094
0095 4- DOSE IN 'TEST-VOLUMES'
0096
0097 The energy deposited in the test-volumes (tallies) defined in
0098 DetectorConstruction are printed at EndOfRun, both in MeV and gray.
0099
0100 5- VISUALIZATION
0101
0102 The Visualization Manager is set in the main().
0103 The initialisation of the drawing is done via the command
0104 > /control/execute vis.mac
0105
0106 The detector has a default view which is a longitudinal view of the box.
0107
0108 The tracks are drawn at the end of event, and erased at the end of run.
0109 Optionally one can choose to draw all particles, only the charged one,
0110 or none. This command is defined in EventActionMessenger class.
0111
0112 6- HOW TO START ?
0113
0114 - execute Test in 'batch' mode from macro files
0115 % TestEm7 proton.mac
0116
0117 - execute Test in 'interactive mode' with visualization
0118 % TestEm7
0119 ....
0120 Idle> type your commands
0121 ....
0122 Idle> exit
0123
0124 7- HISTOGRAM OF THE BRAGG PEAK
0125
0126 Testem7 computes the total energy deposited along the trajectory of
0127 the incident particle : the so-called Bragg peak.
0128
0129 In order to control the accuracy of the deposition, the user can limit
0130 the maximum allowed for the step size of charged particles.
0131 (command /testem/stepMax )
0132
0133 The result is a 1D histogram, which is the total energy deposited
0134 along the trajectory of the incident particle.
0135
0136 The bin size is equal to stepMax. The number of bins is determined by
0137 the thickness of the absorber (with a minimum of 100 bins).
0138 The total energy deposited is plotted in MeV/mm per incident particle.
0139
0140 The next histogram allows to have a zoom around the Bragg peak. Its binning
0141 should be defined via UI command:
0142 /analysis/h1/set 2 nbins xmin xmax unit
0143
0144 The last histogram shows the projectile range. Its bining should be defined
0145 similary by the UI command:
0146 /analysis/h1/set 3 nbins xmin xmax unit
0147
0148 One can control the name of the histograms file with the command:
0149 /analysis/setFileName name (default testem7)
0150
0151 It is possible to choose the format of the histogram file : root (default),
0152 xml, csv, by using namespace in HistoManager.hh
0153
0154 It is also possible to print selected histograms on an ascii file:
0155 /analysis/h1/setAscii id
0156 All selected histos will be written on a file name.ascii (default testem7)