Warning, /geant4/examples/extended/electromagnetic/TestEm12/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 TestEm12
0008 --------
0009
0010
0011 How to plot a depth dose profile in spherical geometry.
0012
0013
0014 1- GEOMETRY DEFINITION
0015
0016 The geometry consists of a single sphere of an homogenous material.
0017 Optionally, the sphere can be divided in thin shells.
0018
0019 3 parameters define the geometry :
0020 - the material of the sphere,
0021 - the radius of the sphere (absorRadius),
0022 - the number of shells (nbOfLayers)
0023
0024 In addition a transverse uniform magnetic field can be applied.
0025
0026 The default geometry is constructed in DetectorConstruction class,
0027 but all of the above parameters can be changed interactively via
0028 the commands defined in the DetectorMessenger class.
0029
0030 2- PHYSICS LIST
0031
0032 Physics Lists are based on modular design. Several modules are instantiated:
0033 1. Transportation
0034 2. EM physics
0035 3. Decays
0036 4. StepMax - for step limitation
0037
0038 The following options for EM physics using builders from physics_lists
0039 sub-package are available:
0040 - "emstandard_opt0" recommended standard EM physics for LHC
0041 - "emstandard_opt1" best CPU performance standard physics for LHC
0042 - "emstandard_opt2" similar fast simulation
0043 - "emstandard_opt3" best standard EM options - analog to "local" above
0044 - "emstandard_opt4" best current advanced EM options standard + lowenergy
0045 - "emstandardWVI" standard EM physics and WentzelVI multiple scattering
0046 - "emstandardSS" standard EM physics and single scattering model
0047 - "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
0048 - "emlivermore" low-energy EM physics using Livermore data
0049 - "empenelope" low-energy EM physics implementing Penelope models
0050 - "emlowenergy" low-energy EM physics implementing experimental
0051 low-energy models
0052 - "dna" process and models for Geant4-DNA
0053 - "dna_opt1" process and models for Geant4-DNA
0054 - "dna_opt2" process and models for Geant4-DNA
0055 - "dna_opt3" process and models for Geant4-DNA
0056 - "dna_opt4" process and models for Geant4-DNA
0057 - "dna_opt5" process and models for Geant4-DNA
0058 - "dna_opt6" process and models for Geant4-DNA
0059 - "dna_opt7" process and models for Geant4-DNA
0060
0061 A local builder, PhysListEmStandard "local" (similar to opt0) is also
0062 available.
0063
0064 Physics lists and options can be (re)set with UI commands
0065
0066 3- AN EVENT : THE PRIMARY GENERATOR
0067
0068 The primary kinematic consists of a single particle randomly shot at
0069 the centre of the sphere. The type of the particle and its energy are set
0070 in the PrimaryGeneratorAction class, and can be changed via the G4
0071 built-in commands of ParticleGun class (see the macros provided with
0072 this example).
0073
0074 In addition one can deactivate the randomness of the direction of the
0075 incident particle. The corresponding interactive command is built in
0076 PrimaryGeneratorMessenger class.
0077
0078 A RUN is a set of events.
0079
0080 4- VISUALIZATION
0081
0082 The Visualization Manager is set in the main().
0083 The initialisation of the drawing is done via the commands
0084 /vis/... in the macro vis.mac. To get visualisation:
0085 > /control/execute vis.mac
0086
0087 The detector has a default view which is a longitudinal view of the
0088 box.
0089
0090 The tracks are drawn at the end of event, and erased at the end of run.
0091 Optionally one can choose to draw all particles, only the charged ones,
0092 or none. This command is defined in EventActionMessenger class.
0093
0094 5- HOW TO START ?
0095
0096 - execute TestEm12 in 'batch' mode from macro files
0097 % TestEm12 run01.mac
0098
0099 - execute TestEm12 in 'interactive mode' with visualization
0100 % TestEm12
0101 ....
0102 Idle> type your commands
0103 ....
0104 Idle> exit
0105
0106 Macros provided in this example:
0107 - berger.mac: e- (100 keV) on water
0108 - dna.mac: e- (1 keV) on water. DNA physics list
0109 - run01.mac: e- (4 MeV) on water. Step max from histos 1 and 8
0110 - run02.mac: e- (4 MeV) on water. Step max from geometry
0111
0112 Macros to be run interactively:
0113 - vis.mac: To activate visualization
0114
0115 6- TRACKING and STEP MAX
0116
0117 TestDm12 computes the total energy deposited along the trajectory of
0118 the incident particle : the so-called longitudinal energy profile,
0119 or depth dose distribution.
0120 The energy deposited (edep) is randomly distributed along the step (see
0121 SteppingAction).
0122
0123 In order to control the accuracy of the deposition, the maximum step size
0124 of charged particles is computed automatically from the binning of
0125 histograms 1 and 8 (see RunAction).
0126
0127 As an example, this limitation is implemented as a 'full' process :
0128 see StepMax class and its Messenger. The 'StepMax process' is registered
0129 in the Physics List.
0130
0131 StepMax is evaluated in RunAction::BeginOfRun() and passed
0132 to the StepMax process.
0133 A boolean UI command allows to deactivate this mechanism.
0134 Another UI command allows to define directly a stepMax value.
0135
0136 7- HISTOGRAMS
0137
0138 Testem12 has several predefined 1D histograms :
0139
0140 1 : energy profile dE/dr (in MeV/mm per event)
0141 2 : total energy deposited in the absorber
0142 3 : total track length of the primary track
0143 4 : step size of the primary track
0144 5 : projected range of the primary track
0145 6 : total track length of charged secondary tracks
0146 7 : step size of charged secondary tracks
0147 8 : normalized energy profile d(E/E0)/d(r/r0), where r0 is the range of
0148 the primary particle of energy E0
0149
0150 The histograms are managed by G4AnalysisManager class and its Messenger.
0151 The histos can be individually activated with the command :
0152 /analysis/h1/set id nbBins valMin valMax unit
0153 where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
0154
0155 One can control the name of the histograms file with the command:
0156 /analysis/setFileName name (default testem12)
0157
0158 It is possible to choose the format of the histogram file : root (default),
0159 xml, csv, by using namespace in HistoManager.hh
0160
0161 It is also possible to print selected histograms on an ascii file:
0162 /analysis/h1/setAscii id
0163 All selected histos will be written on a file name.ascii (default testem12)