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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 egs4/       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 2137 bytes       2024-12-05 15:16:16
File GNUmakefile 412 bytes       2024-12-05 15:16:16
File History 17626 bytes       2024-12-05 15:16:16
File README 6224 bytes       2024-12-05 15:16:16
C++ file TestEm2.cc 3767 bytes       2024-12-05 15:16:16
File TestEm2.in 641 bytes       2024-12-05 15:16:16
File TestEm2.out 41902 bytes       2024-12-05 15:16:16
File egs4.mac 527 bytes       2024-12-05 15:16:16
File plotHisto.C 517 bytes       2024-12-05 15:16:16
File run01.mac 472 bytes       2024-12-05 15:16:16
File run02.mac 540 bytes       2024-12-05 15:16:16
File run03.mac 622 bytes       2024-12-05 15:16:16
File stepMax.mac 243 bytes       2024-12-05 15:16:16
File test.mac 754 bytes       2024-12-05 15:16:16
File vis.mac 2023 bytes       2024-12-05 15:16:16

  1 -------------------------------------------------------------------
  2 
  3      =========================================================
  4      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
  5      =========================================================
  6 
  7                             TestEm2
  8                             -------
  9           
 10      How to do shower profiles in an homogenous medium, with virtual
 11      voxelisation.
 12 
 13  1- GEOMETRY DEFINITION
 14 
 15      The geometry consists of a cylinder of homogenous material.
 16 
 17      The default geometry is constructed in DetectorConstruction class,
 18      but all of the above parameters can be modified interactively via
 19      the commands defined in the DetectorMessenger class.
 20 
 21      Material can be choosen: Air Water lAr Al Fe BGO PbWO4 Pb.
 22      eg: /testem/det/setMat PbWO4
 23      
 24      The cylinder is virtually sliced longitudinally (slice) and radially 
 25      (ring).  The size of the slices and rings are expressed in radiation 
 26      length units and can be changed.
 27      eg: /testem/det/setLbin 20   1.    ---> 20 slices of 1. radl
 28          /testem/det/setRbin  5   0.25  --->  5 rings of 0.25 radl
 29          /testem/det/update             ---> rebuild the geometry
 30    
 31      (MaxBin = 500 in both directions)   
 32 
 33      An uniform magnetic field along the cylinder axis can be set.
 34      eg: /globalField/setValue 0 0 5 tesla 
 35      
 36  2- PHYSICS LISTS
 37 
 38     Physics lists are based on modular design. Several modules are instantiated:
 39     1. Transportation
 40     2. EM physics
 41     3. Decays
 42     4. StepMax - for step limitation
 43  
 44     EM physics builders can be local (eg. in this example) or from G4 kernel
 45     physics_lists subdirectory.
 46  
 47     Local physics builders:  
 48     - "local" standard EM physics with current 'best' options setting.
 49                 these options are explicited in PhysListEmStandard
 50     
 51     From geant4/source/physics_lists/builders:
 52      - "emstandard_opt0" recommended standard EM physics for LHC
 53      - "emstandard_opt1" best CPU performance standard physics for LHC
 54      - "emstandard_opt2" similar fast simulation
 55      - "emstandard_opt3" best standard EM options - analog to "local" above
 56      - "emstandard_opt4" best current advanced EM options standard + lowenergy
 57      - "emstandardWVI" standard EM physics and WentzelVI multiple scattering
 58      - "emstandardSS"  standard EM physics and single scattering model
 59      - "emlivermore"  low-energy EM physics using Livermore data
 60      - "empenelope"   low-energy EM physics implementing Penelope models
 61      - "emlowenergy"  low-energy EM physics implementing experimental
 62                       low-energy models
 63 
 64     Physics lists and options can be (re)set with UI commands
 65     
 66  3- AN EVENT : THE PRIMARY GENERATOR
 67 
 68      The primary kinematic consists of a single particle which hits the
 69      cylinder perpendicular to the input face. The type of the particle
 70      and its energy are set in the PrimaryGeneratorAction class, and can
 71      changed via the G4 build-in commands of G4ParticleGun class (see
 72      the macros provided with this example).
 73 
 74      A RUN is a set of events.
 75 
 76  4- VISUALIZATION
 77 
 78      The Visualization Manager is set in the main() (see TestEm2.cc).
 79      The initialisation of the drawing is done via the commands
 80      /vis/.. in the macro vis.mac. In interactive session:
 81      PreInit or Idle > /control/execute vis.mac
 82 
 83      The detector has a default view which is a longitudinal view of the
 84      cylinder.
 85 
 86      The tracks are drawn at the end of event, and erased at the end of run.
 87      Optionally one can choose to draw all particles, only the charged one,
 88      or none. This command is defined in EventActionMessenger class.
 89 
 90  5- PHYSICS DEMO
 91 
 92      The particle's type and the physics processes which will be available
 93      in this example are set in PhysicsList class.
 94 
 95      In addition a build-in interactive command (/process/inactivate procname)
 96      allows to activate/inactivate the processes one by one.
 97 
 98      The threshold for producing secondaries can be changed.
 99      eg: /testem/phys/setCuts 100 microm
100          /run/initialize
101    
102      The shower profiles are histogramed, if histograming is activated.
103      They can be also printed with the command /testem/run/verbose 1   
104 
105  6- HOW TO START ?
106 
107      - Execute TestEm2 in 'batch' mode from macro files
108     % TestEm2   run01.mac
109 
110      - Execute TestEm2 in 'batch' mode using multi-threading
111     % TestEm2   run01.mac 4
112        here 4 is number of threads, it should be user defined,
113        optimal value depends on hardware
114 
115      - Execute TestEm2 in 'interactive mode' with visualization
116     % TestEm2
117     ....
118     Idle> type your commands
119       ....
120     Idle> exit
121 
122 
123      Macros provided in this example:
124      - egs4.mac:
125           Fe; L = 20 radl; R = 5 radl; electron 30 GeV
126           (EGS4 simulation: Particle Data Group - Phys.Rev.D 50-3 - August94)
127      - run01.mac: PbWO4; L = 20 radl; R = 5 radl; electron 5 GeV
128      - run02.mac: Al; L = 13.5 radl; R = 1.35 radl; electron 1 GeV
129           (Electron-induced cascade showers: J&H Crannel - Phys. Rev. 184-2 -    August69)
130      - run03.mac: H2O; L = 9.97 radl; R = 0.665 radl; electron 1 GeV
131           (Electron-induced cascade showers: J&H Crannel - Phys. Rev. 184-2 -    August69)
132      - test.mac: PbWO4; L = 20 radl; R = 5 radl; electron 5 GeV   
133      - stepMax.mac: chargedgeantino in PbWO4; To illustrate step max mechanism; 
134      - vis.mac: to activate visualization
135 
136  7- HISTOGRAMS
137 
138    TestEm2 produces several histograms:
139 
140      Content of these histo:
141 
142       1 : energy deposit       per event
143       2 : charged track length per event
144       3 : neutral track length per event
145 
146       4 : longitudinal energy profile
147       5 : rms of longitudinal energy profile      
148       6 : cumulated longitudinal energy profile
149       7 : rms of cumulated longitudinal energy profile
150 
151       8 : radial energy profile
152       9 : rms of radial energy profile      
153      10 : cumulated radial energy profile
154      11 : rms of cumulated radial energy profile
155 
156  To define the output file name with histograms, use the UI command :
157 
158    "/analysis/setFileName name"
159    
160  The format of the histogram file can be : root (default),
161  xml, csv, by selecting g4nnn.hh in RunAction.hh 
162