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.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]
1
2 Extended Example for G4GeneralParticleSource (GPS)
3 --------------------------------------------------
4
5 exgps is created to demonstrate the usage of G4GeneralParticleSource
6 for generating primary particle according to user defined distributions.
7 These range from simple monocromatic point source to complicated mutiple
8 sources with various biasing schemes.
9
10 http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides
11 /ForApplicationDeveloper/html/ch02s07.html
12
13
14 1 - GEOMETRY
15
16 Simple geometry consists of a "Vacuum" world and, in it, two other components:
17 - An alunimium box : 20 x 20 x 20 cm in size, cerntered at the origin.
18 - A SiO2 sphere (radius 5 cm) is placed at the centre of the aluminium box.
19
20 2 - PHYSICS
21
22 Tranportation process only for all particles.
23
24 3 - EVENT
25
26 The event generator is the G4GeneralParticleSource (GPS). The instantiation of
27 G4GeneralParticleSource is same as that for G4ParticleGun.
28 See the exGPSPrimaryGeneratorAction.cc file for details.
29
30 4 - VISUALIZATION
31
32 Visualisation of the geometry and the tracks is possible with many of the
33 G4 visualisation packages.
34 An example of displaying the geometry and tracks using OGL is given in the
35 macro vis.mac.
36
37 5 - HISTOGRAMS
38
39 This example implements an histo manager which creates histograms and
40 ntuples using Geant4 analysis tools.
41
42 The output file contains 6 histograms and one ntuple:
43
44 histo1D 1: energy spectrum.
45 histo1D 2: vertex: radial distribution dN/dv.
46 histo1D 3: angular distribution: cos(theta).
47 histo1D 4: angular distribution: phi.
48 histo2D 1: vertex position in the X-Y plane.
49 histo2D 2: vertex position in the X-Z plane.
50 histo2D 3: vertex position in the Y-Z plane.
51 histo2D 4: angular distribution: phi-cos(theta).
52 histo2D 5: angular distribution: of phi-theta.
53
54 In the ntuple the following data are recorded for each incident particle:
55
56 Particle ID
57 Incident Position (x,y,z);
58 Incident Angle (theta,phi);
59 Particle weight;
60
61 The histograms are managed by G4AnalysisManager class and its Messenger.
62 The histos can be individually activated with the command :
63 /analysis/h1/set id nbBins valMin valMax unit
64 where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
65
66 One can control the name of the histograms file with the command:
67 /analysis/setFileName name (default exgps)
68
69 It is possible to choose the format of the histogram file : root (default),
70 xml, csv, by using namespace in HistoManager.hh
71
72
73 6 - GETTING STARTED
74
75 - execute exgps in 'batch' mode from macro files
76 % exgps exgps.in
77
78 - execute exgps in 'interactive mode' with visualization
79 % exgps
80 ....
81 Idle> type your commands
82 ....
83 Idle> exit
84
85 7 - FURTHER EXAMPLES of MACRO FILES
86
87 There are a number of mac files in the ./macros subdirectory, to show the
88 various features of GPS.
89 Please see README file there for further informations.
90
91
92