Warning, /geant4/examples/extended/electromagnetic/TestEm2/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 TestEm2
0008 -------
0009
0010 How to do shower profiles in an homogenous medium, with virtual
0011 voxelisation.
0012
0013 1- GEOMETRY DEFINITION
0014
0015 The geometry consists of a cylinder of homogenous material.
0016
0017 The default geometry is constructed in DetectorConstruction class,
0018 but all of the above parameters can be modified interactively via
0019 the commands defined in the DetectorMessenger class.
0020
0021 Material can be choosen: Air Water lAr Al Fe BGO PbWO4 Pb.
0022 eg: /testem/det/setMat PbWO4
0023
0024 The cylinder is virtually sliced longitudinally (slice) and radially
0025 (ring). The size of the slices and rings are expressed in radiation
0026 length units and can be changed.
0027 eg: /testem/det/setLbin 20 1. ---> 20 slices of 1. radl
0028 /testem/det/setRbin 5 0.25 ---> 5 rings of 0.25 radl
0029 /testem/det/update ---> rebuild the geometry
0030
0031 (MaxBin = 500 in both directions)
0032
0033 An uniform magnetic field along the cylinder axis can be set.
0034 eg: /globalField/setValue 0 0 5 tesla
0035
0036 2- PHYSICS LISTS
0037
0038 Physics lists are based on modular design. Several modules are instantiated:
0039 1. Transportation
0040 2. EM physics
0041 3. Decays
0042 4. StepMax - for step limitation
0043
0044 EM physics builders can be local (eg. in this example) or from G4 kernel
0045 physics_lists subdirectory.
0046
0047 Local physics builders:
0048 - "local" standard EM physics with current 'best' options setting.
0049 these options are explicited in PhysListEmStandard
0050
0051 From geant4/source/physics_lists/builders:
0052 - "emstandard_opt0" recommended standard EM physics for LHC
0053 - "emstandard_opt1" best CPU performance standard physics for LHC
0054 - "emstandard_opt2" similar fast simulation
0055 - "emstandard_opt3" best standard EM options - analog to "local" above
0056 - "emstandard_opt4" best current advanced EM options standard + lowenergy
0057 - "emstandardWVI" standard EM physics and WentzelVI multiple scattering
0058 - "emstandardSS" standard EM physics and single scattering model
0059 - "emlivermore" low-energy EM physics using Livermore data
0060 - "empenelope" low-energy EM physics implementing Penelope models
0061 - "emlowenergy" low-energy EM physics implementing experimental
0062 low-energy models
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 which hits the
0069 cylinder perpendicular to the input face. The type of the particle
0070 and its energy are set in the PrimaryGeneratorAction class, and can
0071 changed via the G4 build-in commands of G4ParticleGun class (see
0072 the macros provided with this example).
0073
0074 A RUN is a set of events.
0075
0076 4- VISUALIZATION
0077
0078 The Visualization Manager is set in the main() (see TestEm2.cc).
0079 The initialisation of the drawing is done via the commands
0080 /vis/.. in the macro vis.mac. In interactive session:
0081 PreInit or Idle > /control/execute vis.mac
0082
0083 The detector has a default view which is a longitudinal view of the
0084 cylinder.
0085
0086 The tracks are drawn at the end of event, and erased at the end of run.
0087 Optionally one can choose to draw all particles, only the charged one,
0088 or none. This command is defined in EventActionMessenger class.
0089
0090 5- PHYSICS DEMO
0091
0092 The particle's type and the physics processes which will be available
0093 in this example are set in PhysicsList class.
0094
0095 In addition a build-in interactive command (/process/inactivate procname)
0096 allows to activate/inactivate the processes one by one.
0097
0098 The threshold for producing secondaries can be changed.
0099 eg: /testem/phys/setCuts 100 microm
0100 /run/initialize
0101
0102 The shower profiles are histogramed, if histograming is activated.
0103 They can be also printed with the command /testem/run/verbose 1
0104
0105 6- HOW TO START ?
0106
0107 - Execute TestEm2 in 'batch' mode from macro files
0108 % TestEm2 run01.mac
0109
0110 - Execute TestEm2 in 'batch' mode using multi-threading
0111 % TestEm2 run01.mac 4
0112 here 4 is number of threads, it should be user defined,
0113 optimal value depends on hardware
0114
0115 - Execute TestEm2 in 'interactive mode' with visualization
0116 % TestEm2
0117 ....
0118 Idle> type your commands
0119 ....
0120 Idle> exit
0121
0122
0123 Macros provided in this example:
0124 - egs4.mac:
0125 Fe; L = 20 radl; R = 5 radl; electron 30 GeV
0126 (EGS4 simulation: Particle Data Group - Phys.Rev.D 50-3 - August94)
0127 - run01.mac: PbWO4; L = 20 radl; R = 5 radl; electron 5 GeV
0128 - run02.mac: Al; L = 13.5 radl; R = 1.35 radl; electron 1 GeV
0129 (Electron-induced cascade showers: J&H Crannel - Phys. Rev. 184-2 - August69)
0130 - run03.mac: H2O; L = 9.97 radl; R = 0.665 radl; electron 1 GeV
0131 (Electron-induced cascade showers: J&H Crannel - Phys. Rev. 184-2 - August69)
0132 - test.mac: PbWO4; L = 20 radl; R = 5 radl; electron 5 GeV
0133 - stepMax.mac: chargedgeantino in PbWO4; To illustrate step max mechanism;
0134 - vis.mac: to activate visualization
0135
0136 7- HISTOGRAMS
0137
0138 TestEm2 produces several histograms:
0139
0140 Content of these histo:
0141
0142 1 : energy deposit per event
0143 2 : charged track length per event
0144 3 : neutral track length per event
0145
0146 4 : longitudinal energy profile
0147 5 : rms of longitudinal energy profile
0148 6 : cumulated longitudinal energy profile
0149 7 : rms of cumulated longitudinal energy profile
0150
0151 8 : radial energy profile
0152 9 : rms of radial energy profile
0153 10 : cumulated radial energy profile
0154 11 : rms of cumulated radial energy profile
0155
0156 To define the output file name with histograms, use the UI command :
0157
0158 "/analysis/setFileName name"
0159
0160 The format of the histogram file can be : root (default),
0161 xml, csv, by selecting g4nnn.hh in RunAction.hh
0162