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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
3 =========================================================
4 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
5 =========================================================
6
7 AnaEx02
8 -------
9 Examples AnaEx01 and AnaEx02 show the usage of histogram and tuple
10 manipulations using G4Analysis and ROOT compliant systems on the same
11 scenario. All analysis manipulations (histo booking, filling, saving histos
12 in a file, etc...) are located in one class : HistoManager, implementation of
13 which is different in each example. All the other classes are same in all
14 three examples.
15
16 This example shows the usage of histogram and tuple manipulations using
17 ROOT system. Please install ROOT before building this example:
18 http://root.cern.ch
19
20 The example is an adaptation of examples/novice/N03. It describes a simple
21 sampling calorimeter setup.
22
23 1- Detector description
24 -----------------------
25
26 The calorimeter is a box made of a given number of layers. A layer
27 consists of an absorber plate and of a detection gap. The layer is
28 replicated.
29
30 Six parameters define the calorimeter :
31 - the material of the absorber,
32 - the thickness of an absorber plate,
33 - the material of the detection gap,
34 - the thickness of a gap,
35 - the number of layers,
36 - the transverse size of the calorimeter (the input face is a square).
37
38 The default geometry is constructed in DetectorConstruction class,
39 but all of the above parameters can be modified interactively via
40 the commands defined in the DetectorMessenger class.
41
42 |<----layer 0---------->|<----layer 1---------->|<----layer 2---------->|
43 | | | |
44 ==========================================================================
45 || | || | || | ||
46 || | || | || | ||
47 beam || absorber | gap || absorber | gap || absorber | gap ||
48 ======> || | || | || | ||
49 || | || | || | ||
50 ==========================================================================
51
52 2- Physics list
53 ---------------
54
55 The particle's type and the physic processes which will be available
56 in this example are set in the FTFP_BERT physics list.
57
58 3- Action Initialization
59 ------------------------
60
61 A newly introduced class, ActionInitialization,
62 instantiates and registers to Geant4 kernel all user action classes
63 which are defined thread-local and a run action class
64 which is defined both thread-local and global.
65
66 The thread-local action classes are defined in
67 ActionInitialization::Build()
68 and the global run action class is defined in
69 ActionInitialization::BuildForMaster().
70 Note that ActionInitialization::Build() is also used to
71 instatiate user action clasess in sequential mode.
72
73 4- An event : PrimaryGeneratorAction
74 ------------------------------------
75
76 The primary kinematic consists of a single particle which hits the
77 calorimeter perpendicular to the input face. The type of the particle
78 and its energy are set in the PrimaryGeneratorAction class, and can
79 be changed via the G4 build-in commands of ParticleGun class.
80
81
82 5- Histograms
83 -------------
84 To produce histograms, ROOT system must be installed
85
86 AnaEx02 can produce 4 histograms :
87
88 EAbs : total energy deposit in absorber per event
89 EGap : total energy deposit in gap per event
90 LAbs : total track length of charged particles in absorber per event
91 LGap : total track length of charged particles in gap per event
92
93 And 2 Ntuples :
94 - Ntuple1:
95 - one row per event : EnergyAbs EnergyGap
96 - Ntuple2:
97 - one row per event : TrackLAbs TrackLGap
98
99 These histos and ntuples are booked in HistoManager and filled from
100 EventAction.
101
102 One can control the name of the histograms file :
103 default name : AnaEx02
104 format : root
105
106 See HistoManager constructor
107
108 6- How to build
109 ---------------
110
111 An additional step is needed when building the example with GNUmake
112 due to using the extra shared directory:
113 % cd path_to_AnaEx02/AnaEx02
114 % gmake setup
115 % gmake
116
117 This will copy the files from shared in the example include and src;
118 to remove these files:
119 % gmake clean_setup
120
121 7- How to run
122 --------------
123
124 - Execute AnaEx02 in the 'interactive mode' with visualization:
125 % ./AnaEx02
126 and type in the commands from run.mac line by line:
127 Idle> /control/verbose 2
128 Idle> /tracking/verbose 1
129 Idle> /run/beamOn 10
130 Idle> ...
131 Idle> exit
132 or
133 Idle> /control/execute run.mac
134 ....
135 Idle> exit
136
137 - Execute AnaEx02 in the 'batch' mode from macro files
138 (without visualization)
139 % ./AnaEx02 run.mac
140 % ./AnaEx02 run.mac > run.out
141
142 The AnaEx02.in macro is used in Geant4 testing.
143
144
145