Geant4 Cross Reference |
>> 1 $Id$ 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 TestEm6 8 TestEm6 8 ------- 9 ------- 9 This example is intended to test the proc 10 This example is intended to test the processes of gamma conversion 10 to a pair of muons and annihilation of po 11 to a pair of muons and annihilation of positrons with atomic 11 electrons to a pair of muons. 12 electrons to a pair of muons. 12 13 13 1- GEOMETRY DEFINITION 14 1- GEOMETRY DEFINITION 14 15 15 The geometry consists of a single block o 16 The geometry consists of a single block of a homogenous material. 16 17 17 Two parameters define the geometry : 18 Two parameters define the geometry : 18 - the material of the box, 19 - the material of the box, 19 - the (full) size of the box. 20 - the (full) size of the box. 20 The default is 500 m of iron. 21 The default is 500 m of iron. 21 22 22 In addition a transverse uniform magnetic 23 In addition a transverse uniform magnetic field can be applied. 23 24 24 The default geometry is constructed in De 25 The default geometry is constructed in DetectorConstruction class, 25 but all of the above parameters can be ch 26 but all of the above parameters can be changed interactively via 26 the commands defined in the DetectorMesse 27 the commands defined in the DetectorMessenger class. 27 28 28 2- PHYSICS LIST 29 2- PHYSICS LIST 29 30 30 Physics Lists are based on modular design 31 Physics Lists are based on modular design. Several modules are 31 instantiated: 32 instantiated: 32 1. Transportation 33 1. Transportation 33 2. EM physics 34 2. EM physics 34 3. Decays 35 3. Decays 35 4. StepMax - for step limitation 36 4. StepMax - for step limitation 36 37 37 The electromagnetic physics is chosen fro 38 The electromagnetic physics is chosen from one of the Geant4 EM 38 physics constructors in the physics_list 39 physics constructors in the physics_list library. 39 40 40 Cross sections can be enhanced (see below 41 Cross sections can be enhanced (see below). 41 42 42 3- AN EVENT : THE PRIMARY GENERATOR 43 3- AN EVENT : THE PRIMARY GENERATOR 43 44 44 The primary kinematic consists of a singl 45 The primary kinematic consists of a single particle which hits the 45 block perpendicular to the input face. Th 46 block perpendicular to the input face. The type of the particle 46 and its energy are set in the PrimaryGene 47 and its energy are set in the PrimaryGeneratorAction class, and can 47 changed via the G4 build-in commands of G 48 changed via the G4 build-in commands of G4ParticleGun class (see 48 the macros provided with this example). 49 the macros provided with this example). 49 The default is a Gamma of 100 TeV. 50 The default is a Gamma of 100 TeV. 50 51 51 In addition one can choose randomly the i 52 In addition one can choose randomly the impact point of the incident 52 particle. The corresponding interactive c 53 particle. The corresponding interactive command is built in 53 PrimaryGeneratorMessenger class. 54 PrimaryGeneratorMessenger class. 54 55 55 A RUN is a set of events. 56 A RUN is a set of events. 56 57 57 4- VISUALIZATION 58 4- VISUALIZATION 58 59 59 The Visualization Manager is set in the m 60 The Visualization Manager is set in the main() (see TestEm6.cc). 60 The initialisation of the drawing is done 61 The initialisation of the drawing is done via the command 61 > /control/execute vis.mac 62 > /control/execute vis.mac 62 63 63 The detector has a default view which is 64 The detector has a default view which is a longitudinal view of the box. 64 65 65 The tracks are drawn at the end of event, 66 The tracks are drawn at the end of event, and erased at the end of run. 66 Optionally one can choose to draw all par 67 Optionally one can choose to draw all particles, only the charged ones, 67 or none. This command is defined in Event 68 or none. This command is defined in EventActionMessenger class. 68 69 69 5- PHYSICS DEMO 70 5- PHYSICS DEMO 70 71 71 The particle's type and the physics proce 72 The particle's type and the physics processes which will be available 72 in this example are set in PhysicsList cl 73 in this example are set in PhysicsList class. 73 74 74 In addition a build-in interactive comman 75 In addition a build-in interactive command (/process/inactivate procname) 75 allows to activate/inactivate the process 76 allows to activate/inactivate the processes one by one. 76 77 77 The threshold for producing secondaries c 78 The threshold for producing secondaries can be changed. 78 eg: /run/particle/setCut 100 micrometer 79 eg: /run/particle/setCut 100 micrometer 79 /run/initialize 80 /run/initialize 80 << 81 81 To visualize the GammaConversionToMuons : 82 To visualize the GammaConversionToMuons : 82 /control/execute run01.mac 83 /control/execute run01.mac 83 /control/execute vis.mac 84 /control/execute vis.mac 84 /run/beamOn 85 /run/beamOn 85 << 86 86 To visualize the AnnihiToMuPair : 87 To visualize the AnnihiToMuPair : 87 /control/execute run11.mac 88 /control/execute run11.mac 88 /control/execute vis.mac 89 /control/execute vis.mac 89 /run/beamOn 90 /run/beamOn 90 << 91 91 Other macros: << 92 - run02.mac: the final state of the Gamma << 93 - run12.mac: test on carbon target with b << 94 << 95 6- HOW TO START ? 92 6- HOW TO START ? 96 93 97 - execute Test in 'batch' mode from macr 94 - execute Test in 'batch' mode from macro files 98 % TestEm6 run01.mac 95 % TestEm6 run01.mac 99 96 100 - execute Test in 'interactive mode' wit 97 - execute Test in 'interactive mode' with visualization 101 % TestEm6 98 % TestEm6 102 .... 99 .... 103 Idle> type your commands 100 Idle> type your commands 104 .... 101 .... 105 Idle> exit 102 Idle> exit 106 103 107 7- HOW TO INCREASE STATISTICS ON gamma -> mu+ 104 7- HOW TO INCREASE STATISTICS ON gamma -> mu+mu- ? 108 105 109 The processes of gamma -> mu+mu- and e+e 106 The processes of gamma -> mu+mu- and e+e- -> mu+mu- 110 have a low cross section but can be impor 107 have a low cross section but can be important 111 for leakage through thick absorbers and c 108 for leakage through thick absorbers and calorimeters. 112 Straight forward simulation will be quite 109 Straight forward simulation will be quite time consuming. 113 To make the processes more visible, the c 110 To make the processes more visible, the cross section can be 114 artificially increased by some factor (he 111 artificially increased by some factor (here 1000) 115 using the commands (only effective after 112 using the commands (only effective after /run/initialize) 116 113 117 /testem/phys/SetGammaToMuPairFac 1000 114 /testem/phys/SetGammaToMuPairFac 1000 118 /testem/phys/SetAnnihiToMuPairFac 1000 115 /testem/phys/SetAnnihiToMuPairFac 1000 119 116 120 117 121 8- HISTOGRAMS 118 8- HISTOGRAMS 122 119 123 Testem6 produces 6 histograms, h1 - h6, whic << 120 Testem6 produces 6 histograms which illustrate the final state of 124 the final state of the GammaConversionToMuon << 121 the GammaConversionToMuons process. See their definitions in RunAction.cc 125 with run02.mac and can be displayed with the << 126 << 127 The remaining histograms h7 - h16 show vario << 128 of eeToHadr/eeToMu, see their definitions in << 129 122 130 By default the histograms are saved as teste 123 By default the histograms are saved as testem6.root 131 124 132 The format of the histogram file can be : ro 125 The format of the histogram file can be : root (default), xml, csv, 133 by selecting the analysis manager default fi << 126 by selecting g4nnn.hh in RunAction.hh