source: trunk/examples/novice/N02/README@ 1189

Last change on this file since 1189 was 807, checked in by garnier, 17 years ago

update

File size: 5.6 KB
RevLine 
[807]1$Id: README,v 1.6 2006/03/31 14:02:13 maire Exp $
2-------------------------------------------------------------------
3
4 =========================================================
5 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
6 =========================================================
7
8 ExampleN02
9 ----------
10
11
12 This example simulates a simplified fixe target experiment.
13
14 1- GEOMETRY DEFINITION
15
16 The setup consists of a target followed by six chambers of increasing
17 transverse size. These chambers are located in a region called Tracker
18 region. Their shape are boxes, constructed as parametrised volumes
19 (ChamberParametrisation class).
20
21 The default geometry is constructed in DetectorConstruction class.
22 One can change the material of the target and of the chambers
23 interactively via the commands defined in the DetectorMessenger class.
24
25 In addition a transverse uniform magnetic field can be applied (see
26 N02MagneticField and DetectorMessenger classes).
27
28
29 2- PHYSICS LIST
30
31 The particle's type and the physic processes which will be available
32 in this example are set in PhysicsList class.
33
34 In this example, all the so called 'electromagnetic processes' are
35 introduced for gamma, charged leptons, and charged hadrons (see the
36 method PhysicsList::ConstructEM()).
37
38 An important data member of this class is the defaultCutValue which
39 defines the production threshold of secondary particles
40 (only Ionisation and Bremsstrahlung processes are concerned by this
41 CutValue).
42 Notice that the CutValue must be given in unit of length, corresponding
43 to the stopping range of the particle. It is automatically converted
44 in energy for each material, and a table is printed in the method
45 PhysicsList::SetCuts()
46
47 In addition the build-in interactive command:
48 /process/(in)activate processName
49 allows to activate/inactivate the processes one by one.
50
51
52 3- RUNS and EVENTS
53
54 The primary kinematic consists of a single particle which hits the
55 target perpendicular to the input face. The type of the particle
56 and its energy are set in the PrimaryGeneratorAction class, and can
57 be changed via the G4 build-in commands of ParticleGun class.
58
59 A RUN is a set of events.
60
61 The user has control:
62 -at Begin and End of each run (class RunAction)
63 -at Begin and End of each event (class EventAction)
64 -at Begin and End of each track (class TrackingAction, not used here)
65 -at End of each step (class SteppingAction)
66
67 The class SteppingVerbose prints some informations step per step,
68 under the control of the command: /tracking/verbose 1
69 It inherits from G4SteppingVerbose, and has been setup here in order
70 to illustrate how to extract informations from the G4 kernel during
71 the tracking of a particle.
72
73
74 4- USER' LIMITS
75
76 We illustrate how to introduce tracking constraints like maximum step
77 length, minimum kinetic energy ..etc.., via G4UserLimits class.
78 See DetectorConstruction and PhysicsList.
79
80 5- DETECTOR RESPONSE
81
82 A HIT is a record, track per track (even step per step), of all the
83 informations needed to simulate and analyse the detector response.
84
85 In this example the Tracker chambers are considered as the detector.
86 Therefore the chambers are declared 'sensitive detectors' (SD) in
87 the DetectorConstruction class.
88
89 Then, a Hit is defined as a set of 4 informations per step, inside
90 the chambers, namely:
91 - the track identifier (an integer),
92 - the chamber number,
93 - the total energy deposit in this step,
94 - the position of the deposit.
95
96 A given hit is an instance of the class TrackerHit which is created
97 during the tracking of a particle, step by step, in the method
98 TrackerSD::ProcessHits(). This hit is inserted in a HitsCollection.
99
100 The HitsCollection is printed at the end of event (via the method
101 TrackerSD::EndOfEvent()), under the control of the command: /hits/verbose 1
102
103
104 6- VISUALIZATION
105
106 The Visualization Manager is set in the main().
107 The initialisation of the drawing is done via a set of /vis/ commands
108 in the macro vis.mac. This macro is automatically read from
109 the main when running in interactive mode.
110
111 The tracks are automatically drawn at the end of event and erased at
112 the beginning of the next run.
113
114 The visualization (with OpenGL driver) assumes two things:
115 1- the visualisation & interfaces categories have been compiled
116 with the environment variable G4VIS_BUILD_OPENGLX_DRIVER.
117 2- exampleN02.cc has been compiled with G4VIS_USE_OPENGLX.
118
119 (The same with DAWNFILE instead of OPENGLX)
120
121
122 7- USER INTERFACES
123
124 The default command interface, called G4UIterminal, is done via
125 standart cin/G4cout.
126 On Linux and Sun-cc on can use a smarter command interface G4UItcsh.
127 It is enough to set the environment variable G4UI_USE_TCSH before
128 compiling exampleN02.cc
129
130
131 8- HOW TO START ?
132
133 - compile and link to generate an executable
134 % cd N02
135 % gmake
136
137 - execute N02 in 'batch' mode from macro files (without visualization)
138 % exampleN02 run1.mac
139
140 - execute N02 in 'interactive mode' with visualization
141 % exampleN02
142 ....
143 Idle> type your commands. For instance:
144 Idle> /run/beamOn 10
145 ....
146 Idle> /control/execute run2.mac
147 ....
148 Idle> exit
149
150
Note: See TracBrowser for help on using the repository browser.