Geant4 Cross Reference |
>> 1 $Id: README,v 1.3 2008-09-26 20:15:04 maire Exp $ 1 ---------------------------------------------- 2 ------------------------------------------------------------------- 2 3 3 ========================================= 4 ========================================================= 4 Geant4 - an Object-Oriented Toolkit for S 5 Geant4 - an Object-Oriented Toolkit for Simulation in HEP 5 ========================================= 6 ========================================================= 6 7 7 TestEm17 8 TestEm17 8 -------- 9 -------- 9 This example is intended to check impl 10 This example is intended to check implementation of the processes 10 of muon interactions: ionization, dire << 11 of muon interactions: ionization, direct (e+,e-) production, 11 pair production, bremsstrahlung, and mu-nucl << 12 bremsstrahlung, mu-nuclear interaction. 12 It allows to compute differential cross sect 13 It allows to compute differential cross sections (as function of the 13 energy transfered to secondaries), total cro << 14 energy transfered to secondaries), total cross sections and to compare 14 with analytic calculations. 15 with analytic calculations. 15 16 16 1- GEOMETRY DEFINITION 17 1- GEOMETRY DEFINITION 17 18 18 It is a single box of homogeneous medium. 19 It is a single box of homogeneous medium. 19 Two parameters define the geometry : 20 Two parameters define the geometry : 20 - the material of the box, 21 - the material of the box, 21 - the (full) size of the box. 22 - the (full) size of the box. 22 23 23 The default geometry (1 m of Iron) is constr 24 The default geometry (1 m of Iron) is constructed in 24 DetectorConstruction, but the above paramete 25 DetectorConstruction, but the above parameters can be changed 25 interactively via the commands defined in De 26 interactively via the commands defined in DetectorMessenger. 26 27 27 2- PHYSICS LIST 28 2- PHYSICS LIST 28 29 29 The Physics List of the example uses the mai << 30 The Physics List of the example uses the main local physics constructor 30 (builder) called "local", which includ << 31 (builder) which called "standard". In this builder a limited set 31 processes under study. As an alternati << 32 of physics processes are defined for muons, pions and proton: 32 and "emstandard_opt4" constructors may << 33 ionisation, bremsstrahlung and e+e- pair production. Energy range 33 << 34 for these processes is from 100*eV to 1000*PeV. 34 Default energy range for EM processes << 35 is from 100*eV to 1000*PeV. << 36 35 37 Optionally "muNucl" builder may be add 36 Optionally "muNucl" builder may be added activating muon-nuclear 38 inelastic interaction. 37 inelastic interaction. 39 38 40 3- AN EVENT : THE PRIMARY GENERATOR 39 3- AN EVENT : THE PRIMARY GENERATOR 41 40 42 The primary kinematic consists of a single p 41 The primary kinematic consists of a single particle starting at the edge 43 of the box. The type of the particle and its 42 of the box. The type of the particle and its energy are set in 44 PrimaryGeneratorAction (mu+ 10 TeV), and can 43 PrimaryGeneratorAction (mu+ 10 TeV), and can be changed via the G4 45 build-in commands of ParticleGun class (see 44 build-in commands of ParticleGun class (see the macros provided with 46 this example). 45 this example). 47 46 48 4- PHYSICS 47 4- PHYSICS 49 48 50 The incident particle is a muon. During the 49 The incident particle is a muon. During the tracking, secondary 51 particles are killed. 50 particles are killed. 52 51 53 The number of interactions are plotted as a 52 The number of interactions are plotted as a function of the energy 54 transfered to the secondaries. 53 transfered to the secondaries. 55 The total number of interactions is recorded << 54 The total number of interactions is recorded, and the total cross section 56 section computed from this. << 55 computed from this. 57 56 58 At RunAction::EndOfRun(..), the above << 57 At EndOfRun, the above results are compared with analytic calculations. 59 calculations. The functions computing << 58 The functions which compute the theoretical cross sections have been 60 provided by the G4 MEPhI group, and implemen << 59 provided by the G4 MEPhI group, and grouped in MuCrossSection class. 61 60 62 5- HISTOGRAMS 61 5- HISTOGRAMS 63 62 64 The test contains built-in 1D histograms for << 63 The test contains 4 built-in 1D histograms, which are managed by the 65 Monte Carlo simulation, which are mana << 64 HistoManager class and its Messenger. 66 and its Messenger: << 67 65 68 1 Relative muon transferred energy dis << 66 1 Monte-Carlo relative transferred energy distribution histo 69 (log10(eps/Emu kin) for knock-on e 67 (log10(eps/Emu kin) for knock-on electrons (ionization) 70 2 -"- direct (e+,e-) pair production << 68 2 -"- direct (e+,e-) pair production 71 3 -"- bremsstrahlung by muons << 69 3 -"- bremsstrahlung 72 4 -"- nuclear interaction by muons << 70 4 -"- nuclear interaction 73 5 ionistion for hadrons << 71 74 6 (e+,e-) pair production by hadrons << 75 7 bremsstrahlung by hadrons << 76 8 direct mu+,mu- pair production by muons << 77 << 78 The histos can be activated individually wit 72 The histos can be activated individually with the command : 79 /testem/histo/setHisto id nbBins valMin val 73 /testem/histo/setHisto id nbBins valMin valMax : 80 min and max values of log10(eps/Emu 74 min and max values of log10(eps/Emu kin). 81 75 82 At EndOfRun the corresponding histos for ana 76 At EndOfRun the corresponding histos for analytic calculations are 83 automatically created and filled (histo 11 t << 77 automatically created and filled (histo 9 to 12), and the comparison >> 78 (G4 divided by theory) is done in histos 17 to 20. 84 79 85 One can control the name and the type of the 80 One can control the name and the type of the histograms file with 86 the command: << 81 the commands: 87 /testem/histo/setFileName name (default te 82 /testem/histo/setFileName name (default testem17) 88 << 83 /testem/histo/setFileType name (default root) >> 84 >> 85 Note that, by default, histograms are disabled. To activate them, >> 86 uncomment the flag G4ANALYSIS_USE in GNUmakefile. >> 87 89 6- VISUALIZATION 88 6- VISUALIZATION 90 89 91 The Visualization Manager is set in the main 90 The Visualization Manager is set in the main(). 92 The initialisation of the drawing is done vi 91 The initialisation of the drawing is done via the commands 93 /vis/... in the macro vis.mac. To get visual 92 /vis/... in the macro vis.mac. To get visualisation: 94 > /control/execute vis.mac 93 > /control/execute vis.mac 95 94 96 The detector has a default view which is a l 95 The detector has a default view which is a longitudinal view of the 97 box. 96 box. 98 97 99 The tracks are drawn at the end of event, an 98 The tracks are drawn at the end of event, and erased at the end of run. 100 99 101 7- HOW TO START ? 100 7- HOW TO START ? 102 101 >> 102 compile and link to generate an executable >> 103 % cd geant4/examples/extended/electromagnetic/TestEm17 >> 104 % gmake >> 105 103 execute TestEm17 in 'batch' mode from macro 106 execute TestEm17 in 'batch' mode from macro files : 104 % TestEm17 allproc.mac 107 % TestEm17 allproc.mac 105 108 106 execute TestEm17 in 'interactive mode' with 109 execute TestEm17 in 'interactive mode' with visualization : 107 % TestEm17 110 % TestEm17 108 Idle> control/execute vis.mac 111 Idle> control/execute vis.mac 109 .... 112 .... 110 Idle> type your commands 113 Idle> type your commands 111 .... 114 .... 112 Idle> exit 115 Idle> exit >> 116 >> 117 8- USING HISTOGRAMS >> 118 >> 119 By default the histograms are not activated. To activate histograms >> 120 the environment variable G4ANALYSIS_USE should be defined. For instance >> 121 uncomment the flag G4ANALYSIS_USE in GNUmakefile. >> 122 >> 123 Before compilation of the example it is optimal to clean up old files: >> 124 gmake histclean >> 125 gmake >> 126 >> 127 To use histograms, at least one of the AIDA implementations should be >> 128 available. See InstallAida.txt >> 129