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