| Geant4 User's Guide For Application Developers

1. Introduction

## 1.1 Scope of this manual

The User's Guide for Application Developers is the first manual the reader should consult when learning about Geant4 or developing a Geant4-based detector simulation program. This manual is designed to:

- introduce the first-time user to the Geant4 object-oriented detector simulation toolkit,
- provide a description of the available tools and how to use them, and
- supply the practical information required to develop and run simulation applications which may be used in real experiments.

This manual is intended to be an overview of the toolkit, rather than an exhaustive treatment of it. Related physics discussions are not included unless required for the description of a particular tool. Detailed discussions of the physics included in Geant4 can be found in the Physics Reference Manual. Details of the design and functionality of the Geant4 classes can be found in the User's Guide for Toolkit Developers, and a complete list of all Geant4 classes is given in the Software Reference Manual.

Geant4 is a completely new detector simulation toolkit written in the C++ language. The reader is assumed to have a basic knowledge of object-oriented programming using C++. No knowledge of earlier FORTRAN versions of Geant is required. Although Geant4 is a fairly complicated software system, only a relatively small part of it needs to be understood in order to begin developing detector simulation applications.

## 1.2 How to use this manual

A very basic introduction to Geant4 is presented in Chapter 2, "Getting Started with Geant4 - Running a Simple Example". It is a recipe for writing and running a simple Geant4 application program. New users of Geant4 should read this chapter first. It is strongly recommended that this chapter be read in conjunction with a Geant4 system installed and running on your computer. It is helpful to run the provided examples as they are discussed in the manual. To install the Geant4 system on your computer, please refer to the Installation Guide for Setting up Geant4 in Your Computing Environment.

Chapter 3, "Toolkit Fundamentals" discusses general Geant4 issues such as class categories and the physical units system. It goes on to discuss runs and events, which are the basic units of a simulation.

Chapter 4, "Detector Definition and Response" describes how to construct a detector from customized materials and geometric shapes, and embed it in electromagnetic fields. It also describes how to make the detector sensitive to particles passing through it and how to store this information.

How particles are propagated through a material is treated in Chapter 5, "Tracking and Physics". The Geant4 "philosophy" of particle tracking is presented along with summaries of the physics processes provided by the toolkit. The definition and implementation of Geant4 particles is discussed and a list of particle properties is provided.

Chapter 6, "User Actions" is a description of the "user hooks" by which the simulation code may be customized to perform special tasks.

Chapter 7, "Communication and Control" provides a summary of the commands available to the user to control the execution of the simulation. After Chapter 2, Chapters 6 and 7 are of formeost importance to the new application developer.

The display of detector geometry, tracks and events may be incorporated into a simulation application by using the tools described in Chapter 8, "Visualization".

Chapter 9, "Examples" provides a set of novice and advanced simulation codes which may be compiled and run "as is" from the Geant4 source code. These examples may be used as educational tools or as base code from which more complex applications are developed.

About the authors