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 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Name Size       Last modified (GMT) Description
Back Parent directory       2024-12-05 15:16:16
Folder geant3/       2024-12-05 15:16:16
Folder include/       2024-12-05 15:16:16
Folder src/       2024-12-05 15:16:16
File CMakeLists.txt 2234 bytes       2024-12-05 15:16:16
File GNUmakefile 408 bytes       2024-12-05 15:16:16
File History 22717 bytes       2024-12-05 15:16:16
File README 8448 bytes       2024-12-05 15:16:16
File TestEm3-geom.out 29574 bytes       2024-12-05 15:16:16
C++ file TestEm3.cc 3766 bytes       2024-12-05 15:16:16
File TestEm3.in 879 bytes       2024-12-05 15:16:16
File TestEm3.out 32348 bytes       2024-12-05 15:16:16
File atlashec.mac 625 bytes       2024-12-05 15:16:16
File dedx.mac 527 bytes       2024-12-05 15:16:16
File emtutor.mac 377 bytes       2024-12-05 15:16:16
File geom.mac 430 bytes       2024-12-05 15:16:16
File ionC12.mac 483 bytes       2024-12-05 15:16:16
File lhcb.mac 1026 bytes       2024-12-05 15:16:16
File linac.mac 650 bytes       2024-12-05 15:16:16
File lockwood.mac 555 bytes       2024-12-05 15:16:16
File plotHisto.C 609 bytes       2024-12-05 15:16:16
File run01.mac 933 bytes       2024-12-05 15:16:16
File run02.mac 570 bytes       2024-12-05 15:16:16
File stepMax.mac 272 bytes       2024-12-05 15:16:16
File storeTables.mac 491 bytes       2024-12-05 15:16:16
File tileCal.mac 595 bytes       2024-12-05 15:16:16
File vis.mac 2029 bytes       2024-12-05 15:16:16

  1 -------------------------------------------------------------------
  2 
  3      =========================================================
  4      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
  5      =========================================================
  6 
  7                             TestEm3
  8                             -------
  9   
 10  How to collect energy deposition in a sampling calorimeter.
 11  How to survey energy flow.
 12  how to print stopping power. 
 13 
 14  1- GEOMETRY DEFINITION
 15  
 16   The calorimeter is a box made of a given number of layers.
 17   A layer consists of a sequence of various absorbers (maximum MaxAbsor=9).
 18   The layer is replicated.
 19  
 20   Parameters defining the calorimeter :
 21     - the number of layers,
 22     - the number of absorbers within a layer,   
 23     - the material of the absorbers,
 24     - the thickness of the absorbers,
 25     - the transverse size of the calorimeter (the input face is a square). 
 26  
 27   In addition a transverse uniform magnetic field can be applied.
 28  
 29   The default geometry is constructed in DetectorConstruction class, but all
 30   of the above parameters can be modified interactively via the commands 
 31   defined in the DetectorMessenger class.
 32 
 33 
 34         |<----layer 0---------->|<----layer 1---------->|<----layer 2---------->|
 35         |           |           |                       |                       |
 36         ==========================================================================
 37         ||          |           ||          |           ||          |           ||
 38         ||          |           ||          |           ||          |           ||
 39         ||   abs 1  | abs 2     ||   abs 1  | abs 2     ||   abs 1  | abs 2     ||
 40         ||          |           ||          |           ||          |           ||
 41         ||          |           ||          |           ||          |           ||
 42  beam   ||          |           ||          |           ||          |           ||
 43 ======> ||          |           ||          |           ||          |           ||
 44         ||          |           ||          |           ||          |           ||
 45         ||          |           ||          |           ||          |           ||
 46         ||          |           ||          |           ||          |           ||
 47         ||          |           ||          |           ||          |           ||
 48         ||   cell 1 | cell 2    ||   cell 3 | cell 4    ||   cell 5 | cell 6    ||
 49         ==========================================================================
 50         ^           ^           ^           ^           ^           ^           ^
 51         pln1        pln2        pln3       pln4        pln5        pln6       pln7
 52  
 53   NB. The number of absorbers and the number of layers can be set to 1.
 54   In this case we have a unique homogeneous block of matter, which looks like 
 55   a bubble chamber rather than a calorimeter ...
 56   (see the macro emtutor.mac)
 57  
 58  2- PHYSICS LISTS
 59  
 60   Physics lists are based on modular design. Several modules are instantiated:
 61   1. Transportation
 62   2. EM physics
 63   3. Decays
 64   4. StepMax - for step limitation
 65 
 66   EM physics builders can be local (eg. in this example) or from G4 kernel
 67   physics_lists subdirectory.
 68 
 69   Local physics builders:  
 70   - "local" standard EM physics with current 'best' options setting.
 71               these options are explicited in PhysListEmStandard
 72   
 73   From geant4/source/physics_lists/builders:  
 74   - "emstandard_opt0" recommended standard EM physics for LHC
 75   - "emstandard_opt1" best CPU performance standard physics for LHC
 76   - "emstandard_opt2" similar fast simulation
 77   - "emstandard_opt3" best standard EM options - analog to "local" above
 78   - "emstandard_opt4" best current advanced EM options standard + lowenergy
 79   - "emstandardWVI" standard EM physics and WentzelVI multiple scattering
 80   - "emstandardSS"  standard EM physics and single scattering model
 81   - "emlivermore"  low-energy EM physics using Livermore data
 82   - "empenelope"   low-energy EM physics implementing Penelope models
 83   - "emlowenergy"  low-energy EM physics implementing experimental
 84                     low-energy models
 85       
 86   Physics lists and options can be (re)set with UI commands.
 87     
 88  3- AN EVENT : THE PRIMARY GENERATOR
 89  
 90   The primary kinematic consists of a single particle which hits the calorimeter
 91   perpendicular to the input face. The type of the particle and its energy are 
 92   set in the PrimaryGeneratorAction class, and can be changed via the 
 93   G4 build-in commands of G4ParticleGun class (see the macros provided with this 
 94   example).
 95   
 96   In addition one can choose randomly the impact point of the incident particle.
 97   The corresponding interactive command is built in PrimaryGeneratorMessenger.
 98   
 99   A RUN is a set of events.
100   
101   TestEm3 computes the energy deposited per absorber and the energy flow through
102   the calorimeter.
103         
104  4- VISUALIZATION
105  
106   The Visualization Manager is set in the main() (see TestEm3.cc).
107   The initialisation of the drawing is done via the commands :
108   /vis/... in the macro vis.mac. In interactive session:
109   PreInit or Idle > /control/execute vis.mac
110   
111   The default view is a longitudinal view of the calorimeter.
112   
113   The tracks are drawn at the end of event, and erased at the end of run.
114   Optionally one can choose to draw all particles, only the charged ones, or
115   none. This command is defined in EventActionMessenger class.
116   
117  5- PHYSICS DEMO
118  
119   The particle's type and the physics processes which will be available
120   in this example are set in PhysicsList class.
121   
122   In addition a built-in interactive command (/process/inactivate processName)
123   allows to activate/inactivate the processes one by one.
124   Then one can well visualize the processes one by one, especially 
125   in the bubble chamber setup with a transverse magnetic field.
126  
127   As a homework try to visualize a gamma conversion alone, 
128   or the effect of the multiple scattering.
129 
130   Notice that one can control the maximum step size, via the
131   StepMax process and the command /testem/stepMax
132   (see StepMax and PhysicsList classes)
133  
134  6- HOW TO START ?
135  
136   - Execute TestEm3 in 'batch' mode from macro files
137       % TestEm3   run01.mac
138  
139   - Execute TestEm3 in 'interactive mode' with visualization
140     % TestEm3
141     ....
142     Idle> type your commands. For instance:
143     Idle> /control/execute run01.mac
144     ....
145     Idle> exit
146 
147   Macros provided in this example:
148   - atlashec.mac: ATLAS HEC model
149   - dedx.mac: to control dE/dx calculation: 1 layer; minimum ionizing particle
150   - emtutor.mac: for tutorial; interactivity + visualisation
151   - geom.mac: to play with geometry
152   - ionC12.mac: ion C12, 1 layer
153   - lhcb.mac: LHCB ECAL model
154   - linac.mac: Linac/Ecal from Graham Wilson
155   - lockwood.mac: Al-Au-Al 1 layer (G.L.Lockwood et al. SAND79-0414 (1980))
156   - run01.mac: Lead-liquidArgon 50 layers; electron 1 GeV
157   - run02.mac: Tungsten-Silicon 50 layers; electron 1 GeV
158   - stepMax.mac: to illustrate step max mechanism  
159   - storeTables.mac: show how to store and retrieve physics tables
160   - tileCal.mac: ATLAS tileCal
161   - vis.mac: to activate visualization
162 
163  7- HISTOGRAMS
164  
165  Testem3 can produce histograms : 
166   histo 1 : energy deposit in absorber 1
167   histo 2 : energy deposit in absorber 2
168   ...etc...........
169   histo 10 : total energy deposit
170     
171   histo 11 : longitudinal profile of energy deposit in absorber 1 (MeV/event)
172   histo 12 : longitudinal profile of energy deposit in absorber 2 (MeV/event)  
173   ...etc...........  
174   
175   histo 21 : energy flow (MeV/event)
176   histo 22 : lateral energy leak (MeV/event)  
177   histo 23 : total energy leakage
178   histo 24 : total energy: Edep + Eleak
179       
180   NB. Numbering scheme for histograms:
181   layer     : from 1 to NbOfLayers (included)
182   absorbers : from 1 to NbOfAbsor (included)
183   planes    : from 1 to NbOfLayers*NbOfAbsor + 1 (included)
184   
185  One can control the binning of the histo with the command:
186   /analysis/h1/set   idAbsor  nbin  Emin  Emax  unit 
187   where unit is the desired energy unit for that histo (see TestEm3.in).
188          
189   One can control the name of the histograms file with the command:
190   /analysis/setFileName  name  (default testem3)
191    
192   It is possible to choose the format of the histogram file : root (default),
193   xml, csv, by using namespace in HistoManager.hh 
194     
195  It is also possible to print selected histograms on an ascii file:
196  /analysis/h1/setAscii id
197  All selected histos will be written on a file name.ascii  (default testem3)
198