/**
@mainpage g4beamline
g4beamline is a program to run geant4 simulations of beamlines. It is
designed to be easy to use, extremely flexible, and easily extensible.
Callback | Description |
Reading Input File | Commands execute, elements construct their objects. For any command class, reading its command generates a call to command(), while for elements the place command generates a call to construct(). Most element commands create a new class instance in command() which holds the values of its arguments; the heavy work is performed in construct(), such as creating solids, logical and physical volumes, and placing them into the Geant4 world. |
callback(0) | Callback pre-Tune particle. |
- | Tune particle is tracked, including BeginOfRunAction, BeginOfEventAction, PreUserTrackingAction (multiple times), UserSteppingAction (multiple times), ZSteppingAction (multiple times), StackingAction (multiple times), PostUserTrackingAction, EndOfEventAction, EndOfRunAction. |
- | Reference particle is tracked, including BeginOfRunAction, BeginOfEventAction, PreUserTrackingAction, UserSteppingAction (multiple times), ZSteppingAction (multiple times), StackingAction, PostUserTrackingAction, EndOfEventAction, EndOfRunAction. |
callback(1) | Callback post-Reference particle. |
BeginOfRunAction | Start of a run tracking beam. |
BeginOfEventAction | Just before each event is processed. |
PreUserTrackingAction | Just before each track is tracked. |
UserSteppingAction | During tracking, each 'physics' step. This is the most common callback, and can be conditioned on the step being in a specific physical volume, and on the state (Tune, Reference, Beam). |
ZSteppingAction | During tracking, each 'physics' step at a specific Z value (centerline coordinates). |
StackingAction | During tracking, when placing secondary track onto stack. |
PostUserTrackingAction | Just after each track is tracked. |
EndOfEventAction | Just after each event is processed. |
EndOfRunAction | End of a run tracking beam. |
callback(2) | Callback post-beam tracking. |
Note that the Tune particle consists of a run with one event containing one or more tracks (depends on how often the Tune particle must be re-tracked during tuning). The Reference particle consists of a run with one event containing one track. So the corresponding Geant4 callbacks happen for these two runs as well as for the run containing all of the beam tracks.
For visualization, callback(4) is called after callback(1) and after the selected viewer is set up. For each image, a run is simulated with visualization of its tracks enabled.
For special situations, such as collective tracking, callback(3) is called just after callback(1), and the program exits after all registered callback(3)-s return.
There are additional callbacks that are not related to runs, events, or tracking:
BLCommand | Registers command names and maps them to implementation classes. |
BLCollectiveComputation | Registered with BLRunManager to perform collective computations. |
BLManager | In addition to the above callbacks, it also registers the BLPhysics object, BLBeam objects, and BLUserCode objects. |
BLNTuple | Registers NTuple Handlers to implement the different types of NTuples, and also registers callbacks to be called by the appendRow() function of specific NTuples. |
BLGlobalField | Registers individual instances of BLElementField that implement the electromagnetic field of an individual element. Handles field overlaps, and uses bounding boxes for efficiency. |
**/