Warning, /geant4/examples/extended/electromagnetic/TestEm3/README.md is written in an unsupported language. File is not indexed.
0001 \page ExampleTestEm3 Example TestEm3
0002
0003 - How to collect energy deposition in a sampling calorimeter.
0004 - How to survey energy flow.
0005 - How to print stopping power.
0006
0007 ## GEOMETRY DEFINITION
0008
0009 The calorimeter is a box made of a given number of layers.
0010 A layer consists of a sequence of various absorbers (maximum MaxAbsor=9).
0011 The layer is replicated.
0012
0013 Parameters defining the calorimeter :
0014 - the number of layers,
0015 - the number of absorbers within a layer,
0016 - the material of the absorbers,
0017 - the thickness of the absorbers,
0018 - the transverse size of the calorimeter (the input face is a square).
0019
0020 In addition a transverse uniform magnetic field can be applied.
0021
0022 The default geometry is constructed in DetectorConstruction class, but all
0023 of the above parameters can be modified interactively via the commands
0024 defined in the DetectorMessenger class.
0025
0026 <pre>
0027 |<----layer 0---------->|<----layer 1---------->|<----layer 2---------->|
0028 | | | | |
0029 ==========================================================================
0030 || | || | || | ||
0031 || | || | || | ||
0032 || abs 1 | abs 2 || abs 1 | abs 2 || abs 1 | abs 2 ||
0033 || | || | || | ||
0034 || | || | || | ||
0035 beam || | || | || | ||
0036 ======> || | || | || | ||
0037 || | || | || | ||
0038 || | || | || | ||
0039 || | || | || | ||
0040 || | || | || | ||
0041 || cell 1 | cell 2 || cell 3 | cell 4 || cell 5 | cell 6 ||
0042 ==========================================================================
0043 ^ ^ ^ ^ ^ ^ ^
0044 pln1 pln2 pln3 pln4 pln5 pln6 pln7
0045 </pre>
0046
0047 NB. The number of absorbers and the number of layers can be set to 1.
0048 In this case we have a unique homogeneous block of matter, which looks like
0049 a bubble chamber rather than a calorimeter ...
0050 (see the macro emtutor.mac)
0051
0052 ## PHYSICS LISTS
0053
0054 Physics lists are based on modular design. Several modules are instantiated:
0055 1. Transportation
0056 2. EM physics
0057 3. Decays
0058 4. StepMax - for step limitation
0059
0060 EM physics builders can be local (eg. in this example) or from G4 kernel
0061 physics_lists subdirectory.
0062
0063 Local physics builders:
0064 - "local" standard EM physics with current 'best' options setting.
0065 these options are explicited in PhysListEmStandard
0066
0067 From geant4/source/physics_lists/builders:
0068 - "emstandard_opt0" recommended standard EM physics for LHC
0069 - "emstandard_opt1" best CPU performance standard physics for LHC
0070 - "emstandard_opt2" similar fast simulation
0071 - "emstandard_opt3" best standard EM options - analog to "local" above
0072 - "emstandard_opt4" best current advanced EM options standard + lowenergy
0073 - "emstandardWVI" standard EM physics and WentzelVI multiple scattering
0074 - "emstandardSS" standard EM physics and single scattering model
0075 - "emlivermore" low-energy EM physics using Livermore data
0076 - "empenelope" low-energy EM physics implementing Penelope models
0077 - "emlowenergy" low-energy EM physics implementing experimental
0078 low-energy models
0079
0080 Physics lists and options can be (re)set with UI commands.
0081
0082 ## AN EVENT : THE PRIMARY GENERATOR
0083
0084 The primary kinematic consists of a single particle which hits the calorimeter
0085 perpendicular to the input face. The type of the particle and its energy are
0086 set in the PrimaryGeneratorAction class, and can be changed via the
0087 G4 build-in commands of G4ParticleGun class (see the macros provided with this
0088 example).
0089
0090 In addition one can choose randomly the impact point of the incident particle.
0091 The corresponding interactive command is built in PrimaryGeneratorMessenger.
0092
0093 A RUN is a set of events.
0094
0095 TestEm3 computes the energy deposited per absorber and the energy flow through
0096 the calorimeter.
0097
0098 ## VISUALIZATION
0099
0100 The Visualization Manager is set in the main().
0101 The initialisation of the drawing is done via the commands :
0102 /vis/... in the macro vis.mac. In interactive session:
0103 ```
0104 PreInit or Idle > /control/execute vis.mac
0105 ```
0106
0107 The default view is a longitudinal view of the calorimeter.
0108
0109 The tracks are drawn at the end of event, and erased at the end of run.
0110 Optionally one can choose to draw all particles, only the charged ones, or
0111 none. This command is defined in EventActionMessenger class.
0112
0113 ## PHYSICS DEMO
0114
0115 The particle's type and the physics processes which will be available
0116 in this example are set in PhysicsList class.
0117
0118 In addition a built-in interactive command (/process/inactivate processName)
0119 allows to activate/inactivate the processes one by one.
0120 Then one can well visualize the processes one by one, especially
0121 in the bubble chamber setup with a transverse magnetic field.
0122
0123 As a homework try to visualize a gamma conversion alone,
0124 or the effect of the multiple scattering.
0125
0126 Notice that one can control the maximum step size, via the
0127 StepMax process and the command /testem/stepMax
0128 ```
0129 /testem/stepMax 1 mm
0130 ```
0131 (see StepMax and PhysicsList classes)
0132
0133 ## HOW TO START ?
0134
0135 - Execute TestEm3 in 'batch' mode from macro files
0136 ```
0137 % ./TestEm3 run01.mac
0138 ```
0139
0140 - Execute TestEm3 in 'interactive mode' with visualization
0141 ```
0142 % ./TestEm3
0143 ....
0144 Idle> type your commands. For instance:
0145 Idle> /control/execute run01.mac
0146 ....
0147 Idle> exit
0148 ```
0149
0150 Macros provided in this example:
0151 - atlashec.mac: ATLAS HEC model
0152 - dedx.mac: to control dE/dx calculation: 1 layer; minimum ionizing particle
0153 - emtutor.mac: for tutorial; interactivity + visualisation
0154 - geom.mac: to play with geometry
0155 - ionC12.mac: ion C12, 1 layer
0156 - lhcb.mac: LHCB ECAL model
0157 - linac.mac: Linac/Ecal from Graham Wilson
0158 - lockwood.mac: Al-Au-Al 1 layer (G.L.Lockwood et al. SAND79-0414 (1980))
0159 - run01.mac: Lead-liquidArgon 50 layers; electron 1 GeV
0160 - run02.mac: Tungsten-Silicon 50 layers; electron 1 GeV
0161 - stepMax.mac: to illustrate step max mechanism
0162 - storeTables.mac: show how to store and retrieve physics tables
0163 - tileCal.mac: ATLAS tileCal
0164 - vis.mac: to activate visualization
0165
0166 ## HISTOGRAMS
0167
0168 Testem3 can produce histograms :
0169 - histo 1 : energy deposit in absorber 1
0170 - histo 2 : energy deposit in absorber 2
0171 - etc.
0172 - histo 10 : total energy deposit
0173
0174 - histo 11 : longitudinal profile of energy deposit in absorber 1 (MeV/event)
0175 - histo 12 : longitudinal profile of energy deposit in absorber 2 (MeV/event)
0176 - etc.
0177
0178 - histo 21 : energy flow (MeV/event)
0179 - histo 22 : lateral energy leak (MeV/event)
0180 - histo 23 : total energy leakage
0181 - histo 24 : total energy: Edep + Eleak
0182
0183 NB. Numbering scheme for histograms:
0184 - layer : from 1 to NbOfLayers (included)
0185 - absorbers : from 1 to NbOfAbsor (included)
0186 - planes : from 1 to NbOfLayers*NbOfAbsor + 1 (included)
0187
0188 One can control the binning of the histo with the command:
0189 ```
0190 /analysis/h1/set idAbsor nbin Emin Emax unit
0191 ```
0192 etc.,
0193 where unit is the desired energy unit for that histo (see TestEm3.in).
0194
0195 One can control the name of the histograms file with the command:
0196 ```
0197 /analysis/setFileName name (default testem3)
0198 ```
0199
0200 It is possible to choose the format of the histogram file : root (default),
0201 xml, csv, by changing the default file type in HistoManager.cc
0202
0203 It is also possible to print selected histograms on an ascii file:
0204 ```
0205 /analysis/h1/setAscii id
0206 ```
0207 All selected histos will be written on a file name.ascii (default testem3)