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