-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
129 lines (93 loc) · 5.1 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
-----------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
electronScattering
------------------
Electron scattering benchmark (T. O'Shea and B. Faddegon)
- J. Ramos-Mendez Updated physics list
- J. Ramos-Mendez Fixed spikes produced by scattered e- at cosTheta = 0
- J. Ramos-Mendez Added analysis.py. It depends on root software and python
1- GEOMETRY DEFINITION
The geometry is described in the enclosed documument : NRCC_electron_scat.pdf
A "World" volume contains a "Frame" made of Air.
The Frame contains : ExitWindow, ScatterFoil, MonitorChbr, Bag.
The Bag contains a Gas volume, which contains 2 aluminium Rings
The Scoring plane is the end-plane of the Frame
The default geometry is constructed in DetectorConstruction class.
The parameters of the ScatterFoil (material and thickness) must be defined
via 2 UI commands : see the macro scatter.mac
2- PHYSICS LIST
Physics lists can be local (eg. in this example) or from G4 kernel
physics_lists subdirectory.
Local physics lists:
- "local" standard EM physics with current 'best' options setting.
these options are explicited in PhysListEmStandard
- "standardSS" standard EM physics with single Coulomb scattering
instead of multiple scattering
From geant4/source/physics_lists/builders:
- "emstandard_opt0" recommended standard EM physics for LHC
- "emstandard_opt1" best CPU performance standard physics for LHC
- "emstandard_opt2" alternative models
- "emstandard_opt3" current state of art for EM physics
analog to "local"above
Physics lists and options can be (re)set with UI commands
Please, notice that options set through G4EmProcessOPtions are global, eg
for all particle types. In G4 builders, it is shown how to set options per
particle type.
3- PRIMARY GENERATOR : mono-enegetic pencil beam
The primary kinematic consists of a single particle which hits the detector
perpendicular to the input face (ExitWindow). The type of the particle and its
energy are set in the PrimaryGeneratorAction class, and can be changed via
the G4 build-in commands of ParticleGun class.
(see the macros provided with this example)
The incident beam has a Gaussian-shaped spatial distribution. The rms of the
Gaussian can be define with an UI command built in PrimaryGeneratorMessenger.
4- VISUALIZATION
The Visualization Manager is set in the main().
The initialisation of the drawing is done via the commands in vis.mac
In interactive session:
PreInit or Idle > /control/execute vis.mac
The example has a default view which is a longitudinal view of the detector.
The tracks are drawn at the end of event, and erased at the end of run.
Optionaly one can choose to draw all particles, only the charged, or none.
This command is defined in EventActionMessenger class.
5- TRACKING
One can limit 'by hand' the step lenght of the particle. As an example,
this limitation is implemented as a 'full' process : see StepMax class and its
Messenger. The 'StepMax process' is registered in the Physics List.
6- DETECTOR RESPONSE
At the end of a run, from the histogram(s), one can study different
physics quantities, via the histograms defined below.
An ascii file corresponding to histo 4 (see below) is automatically written.
7- List of the built-in histograms
----------------------------------
The test contains 4 built-in 1D histograms, which are managed by
G4AnalysisManager class and its Messenger. The histos can be individually activated
with the command :
/analysis/h1/set id nbBins valMin valMax unit
where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
(see the macros xxxx.mac).
1 "(charged particles): projected angle at Scoring plane"
2 "(charged particles): dN/dS at Scoring plane"
3 "(charged particles): d(N/cost)/dS at Scoring plane"
4 "(charged particles): normalized d(N/cost)/dS at Scoring plane"
5 "(charged particles); scattering angle theta"
6 "(charged particles); measured scattering angle theta"
The histograms can be viewed using ROOT or PAW.
One can control the name and format of the histograms file with the command:
/analysis/setFileName name (default nrccBenchmark)
It is possible to choose the format of the histogram file : root (default),
xml, csv, by using namespace in HistoManager.hh
It is also possible to print selected histograms on an ascii file:
/analysis/h1/setAscii id
All selected histos will be written on a file name.ascii (default nrccBenchmark)
8- HOW TO START ?
- execute electronScattering in 'batch' mode from macro files e.g.
% electronScattering myMacro.mac
- execute electronScattering in 'interactive' mode with visualization e.g.
% electronScattering
Then type your commands, for instance :
Idle> control/execute vis.mac
Idle> run/beamOn 5
....