Geant4 Cross Reference |
>> 1 $Id: README,v 1.13 2004/09/27 09:35:30 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 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. >> 13 To make these process more visible, the usually much more frequent >> 14 gamma conversion to a pair of electrons and the standard positron >> 15 processes are not selected in the physics list. 12 16 13 1- GEOMETRY DEFINITION 17 1- GEOMETRY DEFINITION 14 18 15 The geometry consists of a single block o 19 The geometry consists of a single block of a homogenous material. 16 20 17 Two parameters define the geometry : 21 Two parameters define the geometry : 18 - the material of the box, << 22 - the material of the box, 19 - the (full) size of the box. << 23 - the (full) size of the box. 20 The default is 500 m of iron. 24 The default is 500 m of iron. 21 25 22 In addition a transverse uniform magnetic 26 In addition a transverse uniform magnetic field can be applied. 23 27 24 The default geometry is constructed in De 28 The default geometry is constructed in DetectorConstruction class, 25 but all of the above parameters can be ch 29 but all of the above parameters can be changed interactively via 26 the commands defined in the DetectorMesse 30 the commands defined in the DetectorMessenger class. 27 31 28 2- PHYSICS LIST 32 2- PHYSICS LIST 29 << 33 30 Physics Lists are based on modular design << 34 The particle list is the one of novice/exampleN03. 31 instantiated: << 35 The physics list contains the 'standard' electromagnetic processes, 32 1. Transportation << 36 and decay. 33 2. EM physics << 37 34 3. Decays << 38 For Gamma, only the GammaConversionToMuons has been registered. 35 4. StepMax - for step limitation << 39 Futhermore, a high production cut (1 km, which gives infinity in energy) 36 << 40 prevent any production of delta-electrons from ionization or gamma 37 The electromagnetic physics is chosen fro << 41 from bremsstrahlung. 38 physics constructors in the physics_list << 42 For Positrons, only the annihilation process is selected. 39 << 43 40 Cross sections can be enhanced (see below << 41 44 42 3- AN EVENT : THE PRIMARY GENERATOR 45 3- AN EVENT : THE PRIMARY GENERATOR 43 46 44 The primary kinematic consists of a singl 47 The primary kinematic consists of a single particle which hits the 45 block perpendicular to the input face. Th 48 block perpendicular to the input face. The type of the particle 46 and its energy are set in the PrimaryGene 49 and its energy are set in the PrimaryGeneratorAction class, and can 47 changed via the G4 build-in commands of G << 50 changed via the G4 build-in commands of ParticleGun class (see 48 the macros provided with this example). 51 the macros provided with this example). 49 The default is a Gamma of 100 TeV. 52 The default is a Gamma of 100 TeV. 50 53 51 In addition one can choose randomly the i 54 In addition one can choose randomly the impact point of the incident 52 particle. The corresponding interactive c 55 particle. The corresponding interactive command is built in 53 PrimaryGeneratorMessenger class. 56 PrimaryGeneratorMessenger class. 54 57 55 A RUN is a set of events. 58 A RUN is a set of events. >> 59 56 60 57 4- VISUALIZATION 61 4- VISUALIZATION 58 62 59 The Visualization Manager is set in the m << 63 The Visualization Manager is set in the main(). 60 The initialisation of the drawing is done 64 The initialisation of the drawing is done via the command 61 > /control/execute vis.mac 65 > /control/execute vis.mac 62 66 63 The detector has a default view which is 67 The detector has a default view which is a longitudinal view of the box. 64 68 65 The tracks are drawn at the end of event, 69 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 << 70 Optionaly one can choose to draw all particles, only the charged one, 67 or none. This command is defined in Event 71 or none. This command is defined in EventActionMessenger class. 68 72 69 5- PHYSICS DEMO 73 5- PHYSICS DEMO 70 74 71 The particle's type and the physics proce << 75 The particle's type and the physic processes which will be available 72 in this example are set in PhysicsList cl 76 in this example are set in PhysicsList class. 73 77 74 In addition a build-in interactive comman << 78 In addition a build-in interactive command (/process/inactivate proname) 75 allows to activate/inactivate the process 79 allows to activate/inactivate the processes one by one. 76 80 77 The threshold for producing secondaries c 81 The threshold for producing secondaries can be changed. 78 eg: /run/particle/setCut 100 micrometer 82 eg: /run/particle/setCut 100 micrometer 79 /run/initialize 83 /run/initialize 80 << 84 81 To visualize the GammaConversionToMuons : 85 To visualize the GammaConversionToMuons : 82 /control/execute run01.mac 86 /control/execute run01.mac 83 /control/execute vis.mac << 87 /control/execute vis.mac 84 /run/beamOn << 88 /run/beamOn 85 << 89 86 To visualize the AnnihiToMuPair : 90 To visualize the AnnihiToMuPair : 87 /control/execute run11.mac 91 /control/execute run11.mac 88 /control/execute vis.mac << 92 /control/execute vis.mac 89 /run/beamOn << 93 /run/beamOn 90 << 94 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 ? 95 6- HOW TO START ? 96 96 >> 97 - compile and link to generate an executable >> 98 % cd geant4/examples/extended/electromagnetic/TestEm6 >> 99 % gmake >> 100 97 - execute Test in 'batch' mode from macr 101 - execute Test in 'batch' mode from macro files 98 % TestEm6 run01.mac 102 % TestEm6 run01.mac 99 103 100 - execute Test in 'interactive mode' wit 104 - execute Test in 'interactive mode' with visualization 101 % TestEm6 105 % TestEm6 102 .... 106 .... 103 Idle> type your commands 107 Idle> type your commands 104 .... 108 .... 105 Idle> exit 109 Idle> exit >> 110 >> 111 7- HISTOGRAMS 106 112 107 7- HOW TO INCREASE STATISTICS ON gamma -> mu+ << 113 Testem6 produces 6 histograms which illustrate the final state of >> 114 the GammaConversionToMuons process. See their definitions in RunAction.cc >> 115 >> 116 The histograms are saved as testem6.paw >> 117 >> 118 Note that, by default, histograms are disabled. To activate them, uncomment >> 119 G4ANALYSIS_USE in GNUmakefile. >> 120 >> 121 >> 122 8- Using histograms >> 123 ------------------- >> 124 >> 125 By default the histograms are not activated. To activate histograms >> 126 the environment variable G4ANALYSIS_USE should be defined. For instance >> 127 uncomment the flag G4ANALYSIS_USE in GNUmakefile. >> 128 >> 129 To use histograms any of implementations of AIDA interfaces should >> 130 be available (see http://aida.freehep.org). >> 131 >> 132 A package including AIDA and extended interfaces also using Python >> 133 is PI, available from: http://cern.ch/pi . >> 134 >> 135 Once installed PI or PI-Lite in a specified local area $MYPY, it is >> 136 required to add the installation path to $PATH, i.e. for example, >> 137 for release 1.2.1 of PI: >> 138 >> 139 setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin >> 140 >> 141 CERN users can use the PATH to the LCG area on AFS. >> 142 >> 143 Before compilation of the example it is optimal to clean up old >> 144 files: >> 145 >> 146 gmake histclean >> 147 gmake >> 148 >> 149 Before running the example the command should be issued: >> 150 >> 151 eval `aida-config --runtime csh` >> 152 >> 153 It is possible to choose the format of the histogram file (hbook, root, XML): >> 154 comment/uncomment 1 line in the constructor of RunAction. >> 155 >> 156 >> 157 9- HOW TO INCREASE STATISTICS ON gamma -> mu+mu- ? 108 158 109 The processes of gamma -> mu+mu- and e+e 159 The processes of gamma -> mu+mu- and e+e- -> mu+mu- 110 have a low cross section but can be impor 160 have a low cross section but can be important 111 for leakage through thick absorbers and c 161 for leakage through thick absorbers and calorimeters. 112 Straight forward simulation will be quite 162 Straight forward simulation will be quite time consuming. 113 To make the processes more visible, the c 163 To make the processes more visible, the cross section can be 114 artificially increased by some factor (he 164 artificially increased by some factor (here 1000) 115 using the commands (only effective after 165 using the commands (only effective after /run/initialize) 116 166 117 /testem/phys/SetGammaToMuPairFac 1000 167 /testem/phys/SetGammaToMuPairFac 1000 118 /testem/phys/SetAnnihiToMuPairFac 1000 168 /testem/phys/SetAnnihiToMuPairFac 1000 119 169 120 << 121 8- HISTOGRAMS << 122 << 123 Testem6 produces 6 histograms, h1 - h6, whic << 124 the final state of the GammaConversionToMuon << 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 << 130 By default the histograms are saved as teste << 131 << 132 The format of the histogram file can be : ro << 133 by selecting the analysis manager default fi <<