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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 include/       2024-12-05 15:16:16
Folder src/       2024-12-05 15:16:16
File CMakeLists.txt 2341 bytes       2024-12-05 15:16:16
File GNUmakefile 408 bytes       2024-12-05 15:16:16
File History 21899 bytes       2024-12-05 15:16:16
File README 6523 bytes       2024-12-05 15:16:16
C++ file TestEm1.cc 3794 bytes       2024-12-05 15:16:16
File TestEm1.in 534 bytes       2024-12-05 15:16:16
File TestEm1.out 37519 bytes       2024-12-05 15:16:16
File alphaRange.mac 688 bytes       2024-12-05 15:16:16
File annihil.mac 621 bytes       2024-12-05 15:16:16
File brems.mac 935 bytes       2024-12-05 15:16:16
File decayinfly.mac 355 bytes       2024-12-05 15:16:16
File erange.mac 673 bytes       2024-12-05 15:16:16
File etaDecay.mac 403 bytes       2024-12-05 15:16:16
File gammaconversion.mac 629 bytes       2024-12-05 15:16:16
File geantino.mac 242 bytes       2024-12-05 15:16:16
File ionRange.mac 695 bytes       2024-12-05 15:16:16
File ionis.mac 803 bytes       2024-12-05 15:16:16
File pRange.mac 685 bytes       2024-12-05 15:16:16
File photoelec.mac 864 bytes       2024-12-05 15:16:16
File photon.mac 373 bytes       2024-12-05 15:16:16
File plotHisto.C 577 bytes       2024-12-05 15:16:16
File radioactive.mac 625 bytes       2024-12-05 15:16:16
File range.mac 724 bytes       2024-12-05 15:16:16
File runs.mac 855 bytes       2024-12-05 15:16:16
File stepMax.mac 263 bytes       2024-12-05 15:16:16
File vis.mac 2158 bytes       2024-12-05 15:16:16

  1 -------------------------------------------------------------------
  2 
  3      =========================================================
  4      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
  5      =========================================================
  6 
  7                             TestEm1
  8                             -------
  9   How to count processes.
 10   How to activate/inactivate processes.
 11   How to survey the tracking, in particular the range of charged particles.
 12   How to define a maximum step size.
 13   
 14  1 - GEOMETRY DEFINITION
 15  
 16   It is a simple box which represents a 'semi infinite' homogeneous medium.
 17   
 18   Two parameters define the geometry :
 19    - the material of the box,
 20    - the full size of the box.
 21     
 22   In addition a transverse uniform magnetic field can be applied.
 23      e.g. /globalField/setValue 0 0 5 tesla   
 24 
 25   The default geometry is constructed in DetectorConstruction class, but all of 
 26   the above parameters can be changed interactively via the commands defined in 
 27   the DetectorMessenger class.
 28   
 29  2 - PHYSICS LIST
 30 
 31   Physics lists are based on modular design. Several modules are instantiated:
 32   1. Transportation
 33   2. EM physics
 34   3. Decays
 35   4. StepMax - for step limitation
 36  
 37   EM physics builders can be local (eg. in this example) or from G4 kernel
 38   physics_lists subdirectory.
 39      
 40   Local physics builder:   
 41    - "local"    standard EM physics with current 'best' options setting.
 42                   these options are explicited in PhysListEmStandard
 43     
 44   From geant4/source/physics_lists/builders:   
 45    - "emstandard_opt0" recommended standard EM physics for LHC
 46    - "emstandard_opt1" best CPU performance standard physics for LHC
 47    - "emstandard_opt2" similar fast simulation
 48    - "emstandard_opt3" best standard EM options - analog to "local" above
 49    - "emstandard_opt4" best current advanced EM options standard + lowenergy
 50    - "emstandardSS"  standard EM physics and single scattering model
 51    - "emlivermore"  low-energy EM physics using Livermore data
 52    - "empenelope"   low-energy EM physics implementing Penelope models
 53    - "emlowenergy"  low-energy EM physics implementing experimental
 54                     low-energy models
 55 
 56   Physics lists and options can be (re)set with UI commands
 57     
 58   A few commands have been added to PhysicsList, in order to set the production 
 59   threshold for secondaries for gamma and e-/e+.
 60   
 61  3 - AN EVENT : THE PRIMARY GENERATOR
 62  
 63   The primary kinematic consists of a single particle starting at the left face 
 64   of the box. The type of the particle and its energy are set in the 
 65   PrimaryGeneratorAction class, and can be changed via the G4 build-in commands 
 66   of G4ParticleGun class (see the macros provided with this example).
 67   
 68   In addition one can choose randomly the impact point of the incident particle.
 69   The corresponding interactive command is built in PrimaryGeneratorMessenger.  
 70         
 71  4 - VISUALIZATION
 72  
 73   The Visualization Manager is set in the main () (see TestEm1.cc).
 74   The initialisation of the drawing is done via the commands /vis/... in the 
 75   macro vis.mac. To get visualisation:
 76   > /control/execute vis.mac
 77   
 78   The detector has a default view which is a longitudinal view of the box.
 79   
 80   The tracks are drawn at the end of event, and erased at the end of run.
 81   
 82  5 - PHYSICS SURVEY
 83  
 84   The particle's type and the physics processes which will be available in this 
 85   example are set in PhysicsList class.
 86   
 87   A set of macros defining various run conditions are provided. The processes 
 88   are actived/inactivated together with differents cuts, in order to survey the
 89   processes one by one.
 90 
 91   The number of produced secondaries are counted, the number of steps, and the 
 92   number of process calls responsible of the step.
 93   
 94  6 - HOW TO START ?
 95  
 96   - execute TestEm1 in 'batch' mode from macro files
 97   % TestEm1   runs.mac
 98     
 99   - execute TestEm1 in 'interactive mode' with visualization
100   % TestEm1
101   ....
102   Idle> type your commands
103   ....
104   Idle> exit
105 
106   Macros provided in this example:
107   - brems.mac: Bremsstrahlung only
108   - erange.mac: compute the csda range of primary particle
109   - geantino.mac: geantino as primary particle
110   - ionis.mac: Ionisation only
111   - photoelec.mac: 100 keV photon photoelectric effect
112   - radioactive.mac: use radioactive ion as primary particle
113   - range.mac: compute the csda range of the primary particle
114                with or without fluctuations
115   - erange.mac, pRange.mac, alphaRange.mac, ionRange.mac: variants of range.mac
116                to play with StepFunction()         
117   - runs.mac: electron 100 MeV; all processes
118 
119   Macros to be run interactively:
120   - annihil.mac: To visualise 100 MeV e+ annihilation
121   - decayinfly.mac: To visualise decay in fly of N16
122   - etaDecay.mac: to visualise decay of eta particle
123   - gammaconversion.mac: To visualise gamma conversion and e+ annihilation
124   - photon.mac: To visualiza p300 keV photon beam
125   - stepMax.mac: to test command /testem/stepMax
126   - vis.mac: To activate visualization
127 
128  7 - TRACKING : StepMax
129  
130   In order to control the accuracy of the deposition, the user can limit
131   'by hand' the maximum  step size of charged particles.
132   As an example, this limitation is implemented as a 'full' process :
133   see StepMax class and its Messenger. The 'StepMax process' is registered
134   in the Physics List. 
135     
136  8 - HISTOGRAMS
137  
138   Testem1 produces several histo which are saved as testem1.root by default.
139   Content of these histo:  
140       1 : track length of primary particle
141       2 : number of steps primary particle
142       3 : step size of primary particle
143       4 : total energy deposit
144       5 : energy of charged secondaries at creation
145       6 : energy of neutral secondaries at creation
146       7 : NIEL energy
147       8 : energy leakage
148       9 : energy deposit + leakage
149       
150    The histograms are managed by G4AnalysisManager class and its Messenger. 
151    The histos can be individually activated with the command :
152    /analysis/h1/set id nbBins  valMin valMax unit 
153    where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
154    
155    One can control the name of the histograms file with the command:
156    /analysis/setFileName  name  (default testem1)
157    
158    It is possible to choose the format of the histogram file : root (default),
159    hdf5, xml, csv, by changing the default file type in HistoManager.cc
160      
161    It is also possible to print selected histograms on an ascii file:
162    /analysis/h1/setAscii id
163    All selected histos will be written on a file name.ascii  (default testem1)