Warning, /geant4/examples/extended/electromagnetic/TestEm2/README.md is written in an unsupported language. File is not indexed.
0001 \page ExampleTestEm2 Example TestEm2
0002
0003 How to do shower profiles in an homogenous medium, with virtual
0004 voxelisation.
0005
0006 ## GEOMETRY DEFINITION
0007
0008 The geometry consists of a cylinder of homogenous material.
0009
0010 The default geometry is constructed in DetectorConstruction class,
0011 but all of the above parameters can be modified interactively via
0012 the commands defined in the DetectorMessenger class.
0013
0014 Material can be choosen: Air, Water, lAr, Al, Fe, BGO, PbWO4, Pb.
0015 eg:
0016 ```
0017 /testem/det/setMat PbWO4
0018 ```
0019
0020 The cylinder is virtually sliced longitudinally (slice) and radially
0021 (ring). The size of the slices and rings are expressed in radiation
0022 length units and can be changed.
0023 eg:
0024 ```
0025 /testem/det/setLbin 20 1. ---> 20 slices of 1. radl
0026 /testem/det/setRbin 5 0.25 ---> 5 rings of 0.25 radl
0027 ```
0028 (MaxBin = 500 in both directions)
0029
0030 An uniform magnetic field along the cylinder axis can be set.
0031 eg:
0032 ```
0033 /globalField/setValue 0 0 5 tesla
0034 ```
0035
0036 ## 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 ## 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 ## VISUALIZATION
0077
0078 The Visualization Manager is set in the main().
0079 The initialisation of the drawing is done via the commands
0080 `/vis/..` in the macro vis.mac. In interactive session:
0081 ```
0082 PreInit or Idle > /control/execute vis.mac
0083 ```
0084
0085 The detector has a default view which is a longitudinal view of the
0086 cylinder.
0087
0088 The tracks are drawn at the end of event, and erased at the end of run.
0089 Optionally one can choose to draw all particles, only the charged one,
0090 or none. This command is defined in EventActionMessenger class.
0091
0092 ## PHYSICS DEMO
0093
0094 The particle's type and the physics processes which will be available
0095 in this example are set in PhysicsList class.
0096
0097 In addition a build-in interactive command (`/process/inactivate procname`)
0098 allows to activate/inactivate the processes one by one.
0099
0100 The shower profiles are histogramed, if histograming is activated.
0101 They can be also printed with the command /testem/run/verbose 1
0102
0103 ## HOW TO START ?
0104
0105 - Execute TestEm2 in 'batch' mode from macro files
0106 ```
0107 % ./TestEm2 run01.mac
0108 ```
0109
0110 - Execute TestEm2 in 'batch' mode using multi-threading
0111 ```
0112 % ./TestEm2 run01.mac 4
0113 ```
0114 here 4 is number of threads, it should be user defined,
0115 optimal value depends on hardware
0116
0117 - Execute TestEm2 in 'interactive mode' with visualization
0118 ```
0119 % ./TestEm2
0120 ....
0121 Idle> type your commands
0122 ....
0123 Idle> exit
0124 ```
0125
0126 Macros provided in this example:
0127 - egs4.mac:
0128 Fe; L = 20 radl; R = 5 radl; electron 30 GeV
0129 (EGS4 simulation: Particle Data Group - Phys.Rev.D 50-3 - August94)
0130 - run01.mac: PbWO4; L = 20 radl; R = 5 radl; electron 5 GeV
0131 - run02.mac: Al; L = 13.5 radl; R = 1.35 radl; electron 1 GeV
0132 (Electron-induced cascade showers: J&H Crannel - Phys. Rev. 184-2 - August69)
0133 - run03.mac: H2O; L = 9.97 radl; R = 0.665 radl; electron 1 GeV
0134 (Electron-induced cascade showers: J&H Crannel - Phys. Rev. 184-2 - August69)
0135 - test.mac: PbWO4; L = 20 radl; R = 5 radl; electron 5 GeV
0136 - stepMax.mac: chargedgeantino in PbWO4; To illustrate step max mechanism;
0137 - vis.mac: to activate visualization
0138
0139 ## HISTOGRAMS
0140
0141 TestEm2 produces several histograms:
0142
0143 Content of these histo:
0144
0145 - 1 : energy deposit per event
0146 - 2 : charged track length per event
0147 - 3 : neutral track length per event
0148
0149 - 4 : longitudinal energy profile
0150 - 5 : rms of longitudinal energy profile
0151 - 6 : cumulated longitudinal energy profile
0152 - 7 : rms of cumulated longitudinal energy profile
0153
0154 - 8 : radial energy profile
0155 - 9 : rms of radial energy profile
0156 - 10 : cumulated radial energy profile
0157 - 11 : rms of cumulated radial energy profile
0158
0159 To define the output file name with histograms, use the UI command :
0160 ```
0161 /analysis/setFileName name
0162 ```
0163
0164 The format of the histogram file can be : root (default),
0165 xml, csv, by changing the default file type in RunAction.cc.