Warning, /geant4/examples/extended/medical/electronScattering/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 electronScattering
0008 ------------------
0009
0010 Electron scattering benchmark (T. O'Shea and B. Faddegon)
0011
0012 1- GEOMETRY DEFINITION
0013
0014 The geometry is described in the enclosed documument : NRCC_electron_scat.pdf
0015
0016 A "World" volume contains a "Frame" made of Air.
0017 The Frame contains : ExitWindow, ScatterFoil, MonitorChbr, Bag.
0018 The Bag contains a Gas volume, which contains 2 aluminium Rings
0019 The Scoring plane is the end-plane of the Frame
0020
0021 The default geometry is constructed in DetectorConstruction class.
0022 The parameters of the ScatterFoil (material and thickness) must be defined
0023 via 2 UI commands : see the macro scatter.mac
0024
0025 2- PHYSICS LIST
0026
0027 Physics lists can be local (eg. in this example) or from G4 kernel
0028 physics_lists subdirectory.
0029
0030 Local physics lists:
0031 - "local" standard EM physics with current 'best' options setting.
0032 these options are explicited in PhysListEmStandard
0033 - "standardSS" standard EM physics with single Coulomb scattering
0034 instead of multiple scattering
0035
0036 From geant4/source/physics_lists/builders:
0037 - "emstandard_opt0" recommended standard EM physics for LHC
0038 - "emstandard_opt1" best CPU performance standard physics for LHC
0039 - "emstandard_opt2" alternative models
0040 - "emstandard_opt3" current state of art for EM physics
0041 analog to "local"above
0042
0043 Physics lists and options can be (re)set with UI commands
0044
0045 Please, notice that options set through G4EmProcessOPtions are global, eg
0046 for all particle types. In G4 builders, it is shown how to set options per
0047 particle type.
0048
0049
0050 3- PRIMARY GENERATOR : mono-enegetic pencil beam
0051
0052 The primary kinematic consists of a single particle which hits the detector
0053 perpendicular to the input face (ExitWindow). The type of the particle and its
0054 energy are set in the PrimaryGeneratorAction class, and can be changed via
0055 the G4 build-in commands of ParticleGun class.
0056 (see the macros provided with this example)
0057
0058 The incident beam has a Gaussian-shaped spatial distribution. The rms of the
0059 Gaussian can be define with an UI command built in PrimaryGeneratorMessenger.
0060
0061 4- VISUALIZATION
0062
0063 The Visualization Manager is set in the main().
0064 The initialisation of the drawing is done via the commands in vis.mac
0065 In interactive session:
0066 PreInit or Idle > /control/execute vis.mac
0067
0068 The example has a default view which is a longitudinal view of the detector.
0069
0070 The tracks are drawn at the end of event, and erased at the end of run.
0071 Optionaly one can choose to draw all particles, only the charged, or none.
0072 This command is defined in EventActionMessenger class.
0073
0074 5- TRACKING
0075
0076 One can limit 'by hand' the step lenght of the particle. As an example,
0077 this limitation is implemented as a 'full' process : see StepMax class and its
0078 Messenger. The 'StepMax process' is registered in the Physics List.
0079
0080 6- DETECTOR RESPONSE
0081
0082 At the end of a run, from the histogram(s), one can study different
0083 physics quantities, via the histograms defined below.
0084
0085 An ascii file corresponding to histo 4 (see below) is automatically written.
0086
0087
0088 7- List of the built-in histograms
0089 ----------------------------------
0090
0091 The test contains 4 built-in 1D histograms, which are managed by
0092 G4AnalysisManager class and its Messenger. The histos can be individually activated
0093 with the command :
0094 /analysis/h1/set id nbBins valMin valMax unit
0095 where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
0096 (see the macros xxxx.mac).
0097
0098 1 "(charged particles): projected angle at Scoring plane"
0099 2 "(charged particles): dN/dS at Scoring plane"
0100 3 "(charged particles): d(N/cost)/dS at Scoring plane"
0101 4 "(charged particles): normalized d(N/cost)/dS at Scoring plane"
0102 5 "(charged particles); scattering angle theta"
0103 6 "(charged particles); measured scattering angle theta"
0104
0105 The histograms can be viewed using ROOT or PAW.
0106
0107 One can control the name and format of the histograms file with the command:
0108 /analysis/setFileName name (default nrccBenchmark)
0109 It is possible to choose the format of the histogram file : root (default),
0110 xml, csv, by using namespace in HistoManager.hh
0111 It is also possible to print selected histograms on an ascii file:
0112 /analysis/h1/setAscii id
0113 All selected histos will be written on a file name.ascii (default nrccBenchmark)
0114
0115
0116 8- HOW TO START ?
0117
0118 - execute electronScattering in 'batch' mode from macro files e.g.
0119 % electronScattering myMacro.mac
0120
0121 - execute electronScattering in 'interactive' mode with visualization e.g.
0122 % electronScattering
0123 Then type your commands, for instance :
0124 Idle> control/execute vis.mac
0125 Idle> run/beamOn 5
0126 ....