G4Event represents an event. An object of this class
contains all inputs and outputs of the simulated event. This class
object is constructed in
G4RunManager and sent to
G4EventManager. The event currently being processed can be
obtained via the
getCurrentEvent() method of
G4Event object has four major types of information. Get
methods for this information are available in
- Primary vertexes and primary particles
Details are given in Section 3.6.
Trajectories are stored in G4TrajectoryContainer class objects and the pointer to this container is stored in
G4Event. The contents of a trajectory are given in Section 5.1.6.
- Hits collections
Collections of hits generated by sensitive detectors are kept in
G4HCofThisEventclass object and the pointer to this container class object is stored in
G4Event. See Section 4.4 for the details.
- Digits collections
Collections of digits generated by digitizer modules are kept in
G4DCofThisEventclass object and the pointer to this container class object is stored in
G4Event. See Section 4.5 for the details.
G4EventManager is the manager class to take care of one
event. It is responsible for:
G4PrimaryParticleobjects associated with the current
G4Trackobjects. All of
G4Trackobjects representing the primary particles are sent to
G4StackManagerand send it to
G4TrackingManager. The current
G4Trackobject is deleted by
G4EventManagerafter the track is simulated by
G4TrackingManager, if the track is marked as "killed".
In case the primary track is "suspended" or "postponed to next event" by
G4TrackingManager, it is sent back to the
G4Trackobjects returned by
G4TrackingManagerare also sent to
NULLfor the "pop" request,
G4EventManagerterminates the current processing event.
invokes the user-defined methods
G4UserEventActionclass. See Section 6.3 for details.
G4StackManager has three stacks, named
urgent, waiting and
postpone-to-next-event, which are objects
G4TrackStack class. By default, all
objects are stored in the urgent stack and handled in a
"last in first out" manner. In this case, the other two stacks are
not used. However, tracks may be routed to the other two stacks by
G4UserStackingAction concrete class.
If the methods of
G4UserStackingAction have been
overridden by the user, the postpone-to-next-event and
waiting stacks may contain tracks. At the beginning of an
G4StackManager checks to see if any tracks left over
from the previous event are stored in the postpone-to-next-event
stack. If so, it attemps to move them to the urgent
stack. But first the
PrepareNewEvent() method of
G4UserStackingAction is called. Here tracks may be
re-classified by the user and sent to the urgent or
waiting stacks, or deferred again to the
postpone-to-next-event stack. As the event is processed
G4StackManager pops tracks from the urgent stack
until it is empty. At this point the
NewStage() method of
G4UserStackingAction is called. In this method tracks from
the waiting stack may be sent to the urgent stack,
retained in the waiting stack or postponed to the next
Details of the user-defined methods of
G4UserStackingAction and how they affect track stack
management are given in Section 6.3.