Warning, /geant4/examples/extended/electromagnetic/TestEm15/README is written in an unsupported language. File is not indexed.
0001 -------------------------------------------------------------------
0002
0003 =========================================================
0004 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
0005 =========================================================
0006
0007 TestEm15
0008 --------
0009
0010 How to compute and plot the final state of:
0011 - Multiple Scattering
0012 - Gamma Conversion
0013 considered as an isolated processes, see PHYSICS.
0014
0015 For Multiple Scattering, the method is exposed below.
0016
0017 For Gamma Conversion, when G4BetheHeitler5DModel Model is used,
0018 see README.gamma for Histograms and UI commands description.
0019
0020 1- GEOMETRY DEFINITION
0021
0022 It is a single box representing a 'semi infinite' homogeneous medium.
0023 Two parameters define the geometry:
0024 - the material of the box,
0025 - the (full) size of the box.
0026
0027 The default geometry (100 m of water) is constructed in
0028 DetectorConstruction, but the above parameters can be changed
0029 interactively via the commands defined in DetectorMessenger.
0030
0031 2- PHYSICS LIST
0032
0033 The physics list contains the standard electromagnetic processes.
0034 In order not to introduce 'artificial' constraints on the step size,
0035 there is no limitation from the maximum energy lost per step.
0036
0037 3- AN EVENT: THE PRIMARY GENERATOR
0038
0039 The primary kinematic consists of a single particle starting at the edge
0040 of the box. The type of the particle and its energy are set in
0041 PrimaryGeneratorAction (1 MeV electron), and can be changed via the G4
0042 build-in commands of ParticleGun class (see the macros provided with
0043 this example).
0044
0045 4- PHYSICS
0046
0047 All discrete processes are inactivated (see provided macros),
0048 so that Multiple Scattering or Gamma Conversion is 'forced' to
0049 determine the first step of the primary particle.
0050 The step size and the final state are computed and plotted.
0051 Then the event is immediately killed.
0052
0053 Multiple Scattering:
0054
0055 The result is compared with the 'input' data, i.e. with the cross
0056 sections stored in the PhysicsTables and used by Geant4.
0057 The stepMax command provides an additional control of the step size of
0058 the multiple scattering.
0059
0060
0061 5- HISTOGRAMS
0062
0063 The test contains 16 built-in 1D histograms, which are managed by
0064 G4AnalysisManager and its Messenger. The histos can be individually
0065 activated with the command:
0066 /analysis/h1/set id nbBins valMin valMax unit
0067 where unit is the desired unit for the histo (MeV or keV, etc..)
0068 (see the macros xxxx.mac).
0069
0070 1 Multiple Scattering. True step length
0071 2 Multiple Scattering. Geom step length
0072 3 Multiple Scattering. Ratio geomSl/trueSl
0073 4 Multiple Scattering. Lateral displacement: radius
0074 5 Multiple Scattering. Lateral displac: psi_space
0075 6 Multiple Scattering. Angular distrib: theta_plane
0076 7 Multiple Scattering. Phi-position angle
0077 8 Multiple Scattering. Phi-direction angle
0078 9 Multiple Scattering. Correlation: cos(phiPos-phiDir)
0079
0080 10 Gamma Conversion. Open Angle * Egamma
0081 11 Gamma Conversion. Log10(P recoil)
0082 12 Gamma Conversion. Phi P recoil angle
0083 13 Gamma Conversion. Phi P plus angle
0084 14 Gamma Conversion. 2 * cos(phiplus + phiminus) Asymmetry
0085 15 Gamma Conversion. E plus / E gamma
0086 16 Gamma Conversion. Phi of Gamma Polarization
0087
0088
0089 The histograms are managed by the HistoManager class and its Messenger.
0090 The histos can be individually activated with the command:
0091 /analysis/h1/set id nbBins valMin valMax unit
0092 where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
0093
0094 One can control the name of the histograms file with the command:
0095 /analysis/setFileName name (default testem15)
0096
0097 It is possible to choose the format of the histogram file : root (default),
0098 hdf5, xml, csv, by changing the default file type in HistoManager.cc
0099
0100 It is also possible to print selected histograms on an ascii file:
0101 /analysis/h1/setAscii id
0102 All selected histos will be written on a file name.ascii (default testem15)
0103
0104 6- VISUALIZATION
0105
0106 The Visualization Manager is set in the main().
0107 The initialization of the drawing is done via the commands
0108 /vis/... in the macro vis.mac. To get visualization:
0109 > /control/execute vis.mac
0110
0111 The detector has a default view which is a longitudinal view of the
0112 box.
0113
0114 The tracks are drawn at the end of event, and erased at the end of run.
0115
0116 7- HOW TO START ?
0117
0118 execute TestEm15 in 'batch' mode from macro files:
0119 % TestEm15 compt.mac
0120
0121 execute TestEm15 in 'interactive mode' with visualization:
0122 % TestEm15
0123 Idle> control/execute vis.mac
0124 ....
0125 Idle> type your commands
0126 ....
0127 Idle> exit
0128
0129 8 - MACROS
0130 The examples of macros for Multiple Scattering:
0131 electron.mac muon.mac proton.mac
0132
0133 The example of Gamma Conversion macro:
0134 gamma.mac - gamma to e+ e-
0135 gamma2mumu.mac gamma to mu+ mu-