Geant4: Chapter 6.  User Actions

6.1.  Mandatory User Actions and Initializations

Three user initialization class objects are registered with the run manager (Section in the user's main() program, which takes ownership. The user must not delete these objects directly, and they must be created using 'new'. Within the G4UserActionInitialization class (Section 6.1.3), the user must instantiate and register a concrete G4VUserPrimaryGeneratorAction subclass, which generates the primary particles for each event.

6.1.1.  G4VUserDetectorConstruction

Example 6.1.  G4VUserDetectorConstruction