1 | <HTML> |
---|
2 | <HEAD> |
---|
3 | <TITLE>Introduction to Geant4</TITLE> |
---|
4 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
---|
5 | <META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; AIX 4.1) [Netscape]"> |
---|
6 | <!-- Changed by: Dennis Wright, 26-Nov-2002 --> |
---|
7 | </HEAD> |
---|
8 | <BODY> |
---|
9 | |
---|
10 | |
---|
11 | <TABLE WIDTH="100%" > |
---|
12 | <TR> |
---|
13 | <TD> |
---|
14 | <A HREF="../../../Overview/html/index.html"> |
---|
15 | <IMG SRC="../../../resources/html/IconsGIF/Overview.gif" ALT="Overview"></A> |
---|
16 | <A HREF="index.html"> |
---|
17 | <IMG SRC="../../../resources/html/IconsGIF/Contents.gif" ALT="Contents"></A> |
---|
18 | <IMG SRC="../../../resources/html/IconsGIF/PreviousGR.gif" ALT="Previous"> |
---|
19 | <IMG SRC="../../../resources/html/IconsGIF/NextGR.gif" ALT="Next"></A> |
---|
20 | </TD> |
---|
21 | |
---|
22 | <TD ALIGN=RIGHT><FONT COLOR="#238E23"><FONT SIZE=-1> |
---|
23 | <B>Geant4 User's Documents</B></FONT></FONT> |
---|
24 | </TD> |
---|
25 | </TR> |
---|
26 | </TABLE> |
---|
27 | <P> |
---|
28 | <BR> |
---|
29 | |
---|
30 | <CENTER><B><FONT COLOR="#238E23"><FONT SIZE=+4> |
---|
31 | Introduction to Geant4 |
---|
32 | </FONT></FONT></B></CENTER> |
---|
33 | <P> |
---|
34 | <BR> |
---|
35 | |
---|
36 | <HR ALIGN="Center" SIZE="7%"> |
---|
37 | |
---|
38 | <!-- ============================================== Section --> |
---|
39 | <A NAME="1."></A> |
---|
40 | <H2>1. Geant4 Scope of Application</H2> |
---|
41 | |
---|
42 | Geant4 is a free software package composed of tools which can be used to |
---|
43 | accurately simulate the passage of particles through matter. All aspects |
---|
44 | of the simulation process have been included in the toolkit: |
---|
45 | <UL> |
---|
46 | <LI>the geometry of the system,</LI> |
---|
47 | <LI>the materials involved,</LI> |
---|
48 | <LI>the fundamental particles of interest,</LI> |
---|
49 | <LI>the generation of primary events, |
---|
50 | <LI>the tracking of particles through materials and electromagnetic fields, |
---|
51 | <LI>the physics processes governing particle interactions, |
---|
52 | <LI>the response of sensitive detector components, |
---|
53 | <LI>the generation of event data, |
---|
54 | <LI>the storage of events and tracks, |
---|
55 | <LI>the visualization of the detector and particle trajectories, and |
---|
56 | <LI>the capture and analysis of simulation data at different levels of |
---|
57 | detail and refinement.</LI> |
---|
58 | </UL> |
---|
59 | |
---|
60 | Users may construct stand-alone applications or applications built upon |
---|
61 | another object-oriented framework. In either case the toolkit will support |
---|
62 | them from the initial problem definition to the production of results and |
---|
63 | graphics for publication. To this end, the toolkit includes: |
---|
64 | <UL> |
---|
65 | <LI>user interfaces, |
---|
66 | <LI>built-in steering routines, and |
---|
67 | <LI>command interpreters |
---|
68 | </UL> |
---|
69 | which operate at every level of the simulation. |
---|
70 | |
---|
71 | <P> |
---|
72 | At the heart of Geant4 is an abundant set of physics models to handle the |
---|
73 | interactions of particles with matter across a very wide energy range. Data |
---|
74 | and expertise have been drawn from many sources around the world and in this |
---|
75 | respect, Geant4 acts as a repository which incorporates a large part of all |
---|
76 | that is known about particle interactions. |
---|
77 | |
---|
78 | <P> |
---|
79 | Geant4 is written in C++ and exploits advanced software-engineering |
---|
80 | techniques and object-oriented technology to achieve transparency. For |
---|
81 | example, the way in which cross sections are input or computed is separated |
---|
82 | from the way in which they are used or accessed. The user can overload both |
---|
83 | of these features. Similarly, the computation of the final state can be |
---|
84 | divided into alternative or complementary models, according to the energy |
---|
85 | range, the particle type, and the material. To build a specific application |
---|
86 | the user-physicist chooses from among these options and implements code in |
---|
87 | user action classes supplied by the toolkit. A serious problem with |
---|
88 | previous simulation codes was the difficulty of adding new or variant |
---|
89 | physics models; development was difficult due to the increased size, |
---|
90 | complexity and interdependency of the procedure-based code. In contrast, |
---|
91 | object-oriented methods help manage complexity and limit dependencies by |
---|
92 | defining a uniform interface and common organizational principles for all |
---|
93 | physics models. Within this framework the functionality of models can be |
---|
94 | more easily recognized and understood, and the creation and addition of new |
---|
95 | models is a well-defined procedure that entails little or no modification to |
---|
96 | the existing code. |
---|
97 | |
---|
98 | <A NAME="2."></A> |
---|
99 | <H2>2. History of Geant4</H2> |
---|
100 | |
---|
101 | These ideas first appeared in two studies done independently at CERN and KEK |
---|
102 | in 1993. Both groups sought to investigate how modern computing techniques |
---|
103 | could be applied to improve the existing FORTRAN based Geant3 simulation |
---|
104 | program. Activities were merged in the fall of 1994 and a formal proposal, |
---|
105 | RD44, to construct an entirely new program based on object-oriented |
---|
106 | technology was submitted to CERN's Detector Research and Development |
---|
107 | Committee. The initiative grew to become a large international |
---|
108 | collaboration of physicist programmers and software engineers from a number |
---|
109 | of institutes and universities participating in a range of high-energy |
---|
110 | physics experiments in Europe, Japan, Canada and the United States. The |
---|
111 | objective was to write a detector simulation program which had the |
---|
112 | functionality and flexibility necessary to meet the requirements of the next |
---|
113 | generation of subatomic physics experiments. The initial scope quickly |
---|
114 | widened when it became apparent that such a tool would also benefit the |
---|
115 | nuclear, accelerator, space and medical physics community, with more |
---|
116 | individuals joining from these fields of science. |
---|
117 | |
---|
118 | <P> |
---|
119 | The RD44 project represented a pioneering effort in redesigning a major CERN |
---|
120 | software package for a modern object-oriented (OO) environment based on C++. |
---|
121 | The R&D phase was completed in December 1998 with the delivery of the first |
---|
122 | production release. The collaboration was subsequently renamed Geant4 and |
---|
123 | reinstated on the basis of a formal Memorandum of Understanding (MoU) signed |
---|
124 | by many of the same national institutes, laboratories and large HEP |
---|
125 | experiments who participated in RD44. The agreement addresses the program |
---|
126 | management, maintenance and user support during the production phase and the |
---|
127 | continued development and refinement of the toolkit. It is subject to tacit |
---|
128 | renewal every two years and sets out a collaboration structure defined by a |
---|
129 | Collaboration Board (CB), a Technical Steering Board (TSB) and several |
---|
130 | working groups. |
---|
131 | |
---|
132 | <P> |
---|
133 | The collaboration now profits from the accumulated experience of many |
---|
134 | contributors to the field of Monte Carlo simulation of physics detectors and |
---|
135 | physical processes. While geographically distributed software development |
---|
136 | and large-scale object-oriented systems are no longer a novelty, Geant4, in |
---|
137 | terms of the size and scope of the code and the number of contributors, may |
---|
138 | well represent the largest and most ambitious project of its kind outside |
---|
139 | the corporate world. A clean overall problem decomposition has led to a |
---|
140 | clear hierarchical structure of domains. Every section of the Geant4 |
---|
141 | software, which corresponds to a releasable component (library), is |
---|
142 | individually managed by a working group of experts. In addition, there is a |
---|
143 | working group for each of the activities: testing and quality assurance, |
---|
144 | software management and documentation management. A release coordinator |
---|
145 | heads each group. This consequent distribution of responsibility among a |
---|
146 | relative large number of people permits a support structure whereby |
---|
147 | outside users can address questions directly to the appropriate expert. |
---|
148 | |
---|
149 | <A NAME="3."></A> |
---|
150 | <H2>3. Overview of Geant4 Functionality</H2> |
---|
151 | |
---|
152 | The Geant4 class category diagram is shown in Fig. 1. |
---|
153 | <p> |
---|
154 | Categories at the bottom of the diagram are used by virtually all higher |
---|
155 | categories and provide the foundation of the toolkit.</p> |
---|
156 | |
---|
157 | The |
---|
158 | <UL> |
---|
159 | <LI><i>global</i> |
---|
160 | </UL> |
---|
161 | category covers the system of units, constants, numerics and random number |
---|
162 | handling. |
---|
163 | <p> |
---|
164 | The two categories: |
---|
165 | |
---|
166 | <UL> |
---|
167 | <LI><i>materials</i> |
---|
168 | <LI><i>particles</i> |
---|
169 | </UL> |
---|
170 | |
---|
171 | implement facilities necessary to describe the physical properties of |
---|
172 | particles and materials for the simulation of particle-matter interactions. |
---|
173 | <P> |
---|
174 | The |
---|
175 | <UL> |
---|
176 | <LI><i>geometry</i> |
---|
177 | </UL> |
---|
178 | |
---|
179 | module offers the ability to describe a geometrical structure and propagate |
---|
180 | particles efficiently through it. |
---|
181 | <p> |
---|
182 | <center> |
---|
183 | <table> |
---|
184 | <tr> |
---|
185 | <td> |
---|
186 | <IMG SRC="introductionToGeant4.src/classCategory.gif"></a> |
---|
187 | </td> |
---|
188 | </tr> |
---|
189 | <tr> |
---|
190 | <td align=center> |
---|
191 | Fig. 1 Geant4 class categories |
---|
192 | </td> |
---|
193 | </tr> |
---|
194 | </table> |
---|
195 | </center> |
---|
196 | |
---|
197 | |
---|
198 | <P> |
---|
199 | Above these reside categories required to describe the tracking of particles |
---|
200 | and the physical processes they undergo. The |
---|
201 | |
---|
202 | <UL> |
---|
203 | <LI><i>track</i> |
---|
204 | </UL> |
---|
205 | |
---|
206 | category contains classes for tracks and steps, used by the |
---|
207 | <UL> |
---|
208 | <LI><i>processes</i> |
---|
209 | </UL> |
---|
210 | |
---|
211 | category, which contains implementations of models of physical interactions: electromagnetic interactions of leptons, photons, |
---|
212 | hadrons and ions, and hadronic interactions. |
---|
213 | <p> |
---|
214 | All processes are invoked by the |
---|
215 | <UL> |
---|
216 | <LI><i>tracking</i> |
---|
217 | </UL> |
---|
218 | |
---|
219 | category, which manages their contribution to the evolution of a track's state |
---|
220 | and provides information in sensitive volumes for hits and digitization. |
---|
221 | |
---|
222 | <P> |
---|
223 | Above these the |
---|
224 | <UL> |
---|
225 | <LI><i>event</i> |
---|
226 | </UL> |
---|
227 | |
---|
228 | category manages events in terms of their tracks and the |
---|
229 | <UL> |
---|
230 | <LI><i>run</i> |
---|
231 | </UL> |
---|
232 | |
---|
233 | category manages collections of events that share a common beam and detector |
---|
234 | implementation. A |
---|
235 | |
---|
236 | <UL> |
---|
237 | <LI><i>readout</i> |
---|
238 | </UL> |
---|
239 | |
---|
240 | category allows the handling of pile-up. |
---|
241 | |
---|
242 | <P> |
---|
243 | Finally capabilities that use all of these categories and connect to |
---|
244 | facilities outside the toolkit through abstract interfaces, provide |
---|
245 | <i>visualization</i>, <i>persistency</i> and user <i>interface</i> |
---|
246 | capabilities. |
---|
247 | |
---|
248 | <BR> |
---|
249 | |
---|
250 | <A NAME="4."></A> |
---|
251 | <H2>4. Geant4 User Support</H2> |
---|
252 | |
---|
253 | The collaboration offers support for Geant4, providing |
---|
254 | <UL> |
---|
255 | <LI>assistance with problems relating to the code, |
---|
256 | <LI>consultation on using the toolkit, and |
---|
257 | <LI>response to enhancement requests. |
---|
258 | </UL> |
---|
259 | |
---|
260 | A user can also expect assistance in |
---|
261 | <UL> |
---|
262 | <LI>investigating aberrant results. |
---|
263 | </UL> |
---|
264 | |
---|
265 | Users of the software who encounter a problem in running the code can use an |
---|
266 | <UL> |
---|
267 | <LI>Internet-based <a href="http://cern.ch/geant4/problemreport">problem reporting system</a>. |
---|
268 | </UL> |
---|
269 | |
---|
270 | The system is open to all users. It is set up automatically to assign problem |
---|
271 | reports to the responsible person according to the category affected. The |
---|
272 | contact person may then respond directly or forward it to a colleague. This |
---|
273 | system is a customized version of the open source reporting tool |
---|
274 | <a target="_ext" href="http://bugzilla.mozilla.org">Bugzilla</a>. Besides routing the |
---|
275 | problem to specialists, it tracks and documents the responses until the |
---|
276 | problem is resolved. |
---|
277 | |
---|
278 | <P> |
---|
279 | New requirements, such as requests for new functionality, are presented to |
---|
280 | and decided by the Technical Steering Board (TSB). The TSB sets the |
---|
281 | priorities and agrees on time-scales for the fulfillment of new |
---|
282 | requirements. Such support is guaranteed to collaboration members, while |
---|
283 | requests from non-members are handled on a <i>best effort</i> basis. |
---|
284 | |
---|
285 | <P> |
---|
286 | For each member organisation a contact person |
---|
287 | <a href="http://cern.ch/geant4/collaboration/steering_board/members.shtml">(TSB member)</a> has been designated who acts as a first reference for Geant4 |
---|
288 | users in that locality, which may include affiliated institutions, user |
---|
289 | groups, and others in the same geographic area. The contact person will |
---|
290 | respond to enquiries, help resolve simple problems, and forward more |
---|
291 | specialized queries to the relevant expert(s). |
---|
292 | |
---|
293 | <P> |
---|
294 | Beyond that, a list of frequently asked questions |
---|
295 | <a href="FAQ.html">(FAQs)</a>, and an internet-based |
---|
296 | <a targer="_ext" href="http://geant4-hn.slac.stanford.edu:5090/Geant4-HyperNews/index">user forum</a> complete the available Geant4 user support. |
---|
297 | <BR> |
---|
298 | |
---|
299 | <A NAME="5."></A> |
---|
300 | <H2>5. Software Knowledge Required to Use the Geant4 Toolkit</H2> |
---|
301 | |
---|
302 | In general, there are three types of users: |
---|
303 | <UL> |
---|
304 | <LI>the <b>end user</b>, |
---|
305 | <LI>the <b>application programmer</b>, |
---|
306 | </UL> |
---|
307 | |
---|
308 | and for large simulation tasks: |
---|
309 | <UL> |
---|
310 | <LI>the <b>framework provider</b>. |
---|
311 | </UL> |
---|
312 | |
---|
313 | The <b>end user</b> runs the simulation program by controlling run time |
---|
314 | parameters. The interface with the program may be a graphical user |
---|
315 | interface, an interactive command line interface, or the macro-based system |
---|
316 | for batch. The end user needs a basic knowledge of how to control the |
---|
317 | program flow but does not necessarily have to know object-oriented |
---|
318 | programming or C++. |
---|
319 | |
---|
320 | <P> |
---|
321 | The <b>application programmer</b> is central to any simulation task. A firm |
---|
322 | knowledge of C++ is required to implement code in user action classes to |
---|
323 | specify, at a minimum, the detector description, the relevant particles and |
---|
324 | physics processes, and the initial event kinematics. A manual for the |
---|
325 | application programmer is found in the |
---|
326 | <a href="../../../UsersGuides/ForApplicationDeveloper/html/index.html">User's Guide: For Application Developers</a>. |
---|
327 | |
---|
328 | <P> |
---|
329 | Using standard components of Geant4, a <b>framework provider</b> would add |
---|
330 | interfaces to external tools, such as for example, to Computer Aided Design |
---|
331 | (CAD) programs, Object-Oriented Data Base Management Systems (ODBMS) and |
---|
332 | graphics systems. This requires the development of new classes overloading |
---|
333 | standard Geant4 functionality and hence a solid understanding of |
---|
334 | object-oriented Programming. A manual for the framework provider is found in the |
---|
335 | <a href="../../../UsersGuides/ForToolkitDeveloper/html/index.html">User's Guide: For Toolkit Developers</a>. |
---|
336 | <p> |
---|
337 | |
---|
338 | |
---|
339 | <B>References</B> |
---|
340 | <P> |
---|
341 | All user documentation can be found on the Geant4 homepage |
---|
342 | <a href="http://cern.ch/geant4">http://cern.ch/geant4</a>. |
---|
343 | <P> |
---|
344 | References for Object-Oriented Technology: |
---|
345 | <UL> |
---|
346 | <LI>Grady Booch, Object-Oriented Analysis and Design with Applications The Benjamin/Cummings Publishing Co. Inc, 1994, |
---|
347 | ISBN 0-8053-5340-2 |
---|
348 | <LI>R.C.Martin, Designing Object-Oriented C++ Applications Using The Booch Method, Prentice Hall 1995, ISBN |
---|
349 | 0-13-203837-4; |
---|
350 | <LI>E. Gamma, et al., Design Patterns - Elements of Reusable Object-Oriented Software, Addison Wesley 1995, ISBN |
---|
351 | 0-201-63361-2; |
---|
352 | </UL> |
---|
353 | |
---|
354 | References for C++: |
---|
355 | <UL> |
---|
356 | <LI>B.Stroustrup, C++ Programming Language 3rd Edition, Addison Wesley, |
---|
357 | ISBN: 0-201-88954-4</LI> |
---|
358 | <LI>I.Pohl, Object-Oriented Programming Using C++, 2nd Edition, Addison |
---|
359 | Wesley, ISBN: 0-201-89550-1.</LI> |
---|
360 | </UL> |
---|
361 | <BR> |
---|
362 | |
---|
363 | <A NAME="6."></A> |
---|
364 | <H2>6. Computing Environment Required by the Geant4 Toolkit</H2> |
---|
365 | |
---|
366 | The Geant4 toolkit is available for a variety of operating systems: |
---|
367 | <UL> |
---|
368 | <LI>flavors of UNIX, |
---|
369 | <LI>Linux, |
---|
370 | <LI>and Windows systems. |
---|
371 | </UL> |
---|
372 | |
---|
373 | In order to link and build the program only two underlying software packages are mandatory: |
---|
374 | <UL> |
---|
375 | <LI>CLHEP (Class Library of High Energy Physics) and the |
---|
376 | <LI>STL (Standard Template Library for fundamental classes like C++ containers and strings). |
---|
377 | </UL> |
---|
378 | |
---|
379 | The Geant4 source code is available from the |
---|
380 | <a href="http://cern.ch/geant4">Geant4 web pages</a> |
---|
381 | while CLHEP is available from the |
---|
382 | <a target="_ext" href="http://cern.ch/clhep">CLHEP Home Page</a>. |
---|
383 | For details on setting up the computing environment see the |
---|
384 | <a href="../../../UsersGuides/InstallationGuide/html/index.html">Installation Guide</a>. |
---|
385 | |
---|
386 | </BODY> |
---|
387 | </HTML> |
---|
388 | |
---|