Geant4 Cross Reference |
1 ---------------------------------------------- 1 ------------------------------------------------------------------- 2 2 3 ========================================= 3 ========================================================= 4 Geant4 - an Object-Oriented Toolkit for S 4 Geant4 - an Object-Oriented Toolkit for Simulation in HEP 5 ========================================= 5 ========================================================= 6 6 7 TestEm15 7 TestEm15 8 -------- 8 -------- 9 9 10 How to compute and plot the final stat << 10 How to compute and plot the final state of Multiple Scattering 11 - Multiple Scattering << 11 or Gamma Conversion considered as an isolated processes. 12 - Gamma Conversion << 12 The method is exposed below : see item Physics. 13 considered as an isolated processes, see PHY << 13 14 << 15 For Multiple Scattering, the method is expos << 16 << 17 For Gamma Conversion, when G4BetheHeitler5DM << 18 see README.gamma for Histograms and UI comma << 19 << 20 1- GEOMETRY DEFINITION 14 1- GEOMETRY DEFINITION 21 << 15 22 It is a single box representing a 'sem 16 It is a single box representing a 'semi infinite' homogeneous medium. 23 Two parameters define the geometry: << 17 Two parameters define the geometry : 24 - the material of the box, 18 - the material of the box, 25 - the (full) size of the box. 19 - the (full) size of the box. 26 << 20 27 The default geometry (100 m of water) << 21 The default geometry (100 m of water) is constructed in 28 DetectorConstruction, but the above pa << 22 DetectorConstruction, but the above parameters can be changed 29 interactively via the commands defined 23 interactively via the commands defined in DetectorMessenger. 30 << 24 31 2- PHYSICS LIST 25 2- PHYSICS LIST 32 << 26 33 The physics list contains the standard 27 The physics list contains the standard electromagnetic processes. 34 In order not to introduce 'artificial' << 28 In order not to introduce 'artificial' constraints on the step size, 35 there is no limitation from the maximu << 29 there is no limitation from the maximum energy lost per step. 36 << 30 37 3- AN EVENT: THE PRIMARY GENERATOR << 31 3- AN EVENT : THE PRIMARY GENERATOR 38 << 32 39 The primary kinematic consists of a si 33 The primary kinematic consists of a single particle starting at the edge 40 of the box. The type of the particle a << 34 of the box. The type of the particle and its energy are set in 41 PrimaryGeneratorAction (1 MeV electron << 35 PrimaryGeneratorAction (1 MeV electron), and can be changed via the G4 42 build-in commands of ParticleGun class << 36 build-in commands of ParticleGun class (see the macros provided with 43 this example). 37 this example). 44 << 38 45 4- PHYSICS 39 4- PHYSICS 46 << 40 47 All discrete processes are inactivated 41 All discrete processes are inactivated (see provided macros), 48 so that Multiple Scattering or Gamma C 42 so that Multiple Scattering or Gamma Conversion is 'forced' to 49 determine the first step of the primar 43 determine the first step of the primary particle. 50 The step size and the final state are 44 The step size and the final state are computed and plotted. 51 Then the event is immediately killed. 45 Then the event is immediately killed. 52 << 46 53 Multiple Scattering: << 47 The result is compared with the 'input' data, i.e. with the cross 54 << 55 The result is compared with the 'input' data << 56 sections stored in the PhysicsTables a 48 sections stored in the PhysicsTables and used by Geant4. >> 49 57 The stepMax command provides an additi 50 The stepMax command provides an additional control of the step size of 58 the multiple scattering. 51 the multiple scattering. 59 << 52 60 53 61 5- HISTOGRAMS 54 5- HISTOGRAMS 62 << 55 63 The test contains 16 built-in 1D histo << 56 The test contains 16 built-in 1D histograms, which are managed by 64 G4AnalysisManager and its Messenger. T << 57 G4AnalysisManager and its Messenger. The histos can be individually 65 activated with the command: << 58 activated with the command : 66 /analysis/h1/set id nbBins valMin val << 59 /analysis/h1/set id nbBins valMin valMax unit 67 where unit is the desired unit for the 60 where unit is the desired unit for the histo (MeV or keV, etc..) 68 (see the macros xxxx.mac). 61 (see the macros xxxx.mac). 69 << 62 70 1 Multiple Scattering. True step 63 1 Multiple Scattering. True step length 71 2 Multiple Scattering. Geom step 64 2 Multiple Scattering. Geom step length 72 3 Multiple Scattering. Ratio geo 65 3 Multiple Scattering. Ratio geomSl/trueSl 73 4 Multiple Scattering. Lateral d 66 4 Multiple Scattering. Lateral displacement: radius 74 5 Multiple Scattering. Lateral d 67 5 Multiple Scattering. Lateral displac: psi_space 75 6 Multiple Scattering. Angular d 68 6 Multiple Scattering. Angular distrib: theta_plane 76 7 Multiple Scattering. Phi-posit 69 7 Multiple Scattering. Phi-position angle 77 8 Multiple Scattering. Phi-direc 70 8 Multiple Scattering. Phi-direction angle 78 9 Multiple Scattering. Correlati 71 9 Multiple Scattering. Correlation: cos(phiPos-phiDir) 79 72 80 10 Gamma Conversion. Open Angle * 73 10 Gamma Conversion. Open Angle * Egamma 81 11 Gamma Conversion. Log10(P reco 74 11 Gamma Conversion. Log10(P recoil) 82 12 Gamma Conversion. Phi P recoil 75 12 Gamma Conversion. Phi P recoil angle 83 13 Gamma Conversion. Phi P plus a 76 13 Gamma Conversion. Phi P plus angle 84 14 Gamma Conversion. 2 * cos(phip 77 14 Gamma Conversion. 2 * cos(phiplus + phiminus) Asymmetry 85 15 Gamma Conversion. E plus / E g 78 15 Gamma Conversion. E plus / E gamma 86 16 Gamma Conversion. Phi of Gamma 79 16 Gamma Conversion. Phi of Gamma Polarization 87 80 88 << 81 89 The histograms are managed by the HistoMana << 82 The histograms are managed by the HistoManager class and its Messenger. 90 The histos can be individually activated wi << 83 The histos can be individually activated with the command : 91 /analysis/h1/set id nbBins valMin valMax u << 84 /analysis/h1/set id nbBins valMin valMax unit 92 where unit is the desired unit for the hist 85 where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..) 93 << 86 94 One can control the name of the histograms 87 One can control the name of the histograms file with the command: 95 /analysis/setFileName name (default teste 88 /analysis/setFileName name (default testem15) 96 << 89 97 It is possible to choose the format of the 90 It is possible to choose the format of the histogram file : root (default), 98 hdf5, xml, csv, by changing the default fil << 91 hbook, xml, csv, by using namespace in HistoManager.hh 99 << 92 100 It is also possible to print selected histo 93 It is also possible to print selected histograms on an ascii file: 101 /analysis/h1/setAscii id 94 /analysis/h1/setAscii id 102 All selected histos will be written on a fi 95 All selected histos will be written on a file name.ascii (default testem15) 103 << 96 104 6- VISUALIZATION 97 6- VISUALIZATION 105 << 98 106 The Visualization Manager is set in th 99 The Visualization Manager is set in the main(). 107 The initialization of the drawing is d 100 The initialization of the drawing is done via the commands 108 /vis/... in the macro vis.mac. To get 101 /vis/... in the macro vis.mac. To get visualization: 109 > /control/execute vis.mac 102 > /control/execute vis.mac 110 << 103 111 The detector has a default view which << 104 The detector has a default view which is a longitudinal view of the 112 box. 105 box. 113 << 106 114 The tracks are drawn at the end of eve 107 The tracks are drawn at the end of event, and erased at the end of run. 115 << 108 116 7- HOW TO START ? 109 7- HOW TO START ? 117 << 110 118 execute TestEm15 in 'batch' mode from << 111 execute TestEm15 in 'batch' mode from macro files : 119 % TestEm15 compt.mac 112 % TestEm15 compt.mac 120 << 113 121 execute TestEm15 in 'interactive mode' << 114 execute TestEm15 in 'interactive mode' with visualization : 122 % TestEm15 115 % TestEm15 123 Idle> control/execute vis.mac 116 Idle> control/execute vis.mac 124 .... 117 .... 125 Idle> type your commands 118 Idle> type your commands 126 .... 119 .... 127 Idle> exit 120 Idle> exit 128 << 121 129 8 - MACROS 122 8 - MACROS 130 The examples of macros for Multiple Sca 123 The examples of macros for Multiple Scattering: 131 electron.mac muon.mac proton.mac 124 electron.mac muon.mac proton.mac 132 125 133 The example of Gamma Conversion macro: << 126 The example of Gamma Conversion macro : 134 gamma.mac - gamma to e+ e- << 127 gamma.mac 135 gamma2mumu.mac gamma to mu+ mu- <<