The run category manages collections of events (runs). In a single run the events share the detector implementation, physics conditions and primary generation.
The classes associated with the run category can be considered as the main and higher level application programming interface (API) used in a Geant4 application. A simple applicaiton will use concrete classes provided with the toolkit, the developer will provide the detector description a primary genertor (possibly using one of the general purpose ones provided with the toolkit), define the physics for the application (the physics list, possibly one of the few provided with the toolkit) and optional user actions to interact with the simulation itself.
In few cases it is however necessary to modify the default behavior of one or more classes in this category to allow for a user-customization. As an example the class G4MTRunManager extends the basic run-manager class to take into account event level parallelism via multi-threading.
During a run some states of the application are invariant and cannot be modified: the physics list (i.e. the list of processes attached to each particle) and the detector layout (not that some geometry primitives allow for changing parameters during the event run: parametrizations. However technically the class instances representing the detector layout do not change during a run).
The relevant classes for the run category are shown here. This show, in particular, the relation between classes for the case of a multi-threaded application. For a sequential applicaiton the diagram is simplified since no G4WorkerRunManager class exist and G4MTRunManager is replaced by G4RunManager:
For a descriptiont of multi-threading functionality refer to "Parallelism in Geant4: multi-threading capabilities" chapter.
One of the main functions of the run category is to control the life-cycle of a Geant4 application, again with reference to the case of a multi-threaded application the following schema describes it:
A list of the main classes for the category is provided: