GGS(GenericGEANT4Simulation)Software
2.7.0
|
Base class for GGS generator actions. More...
#include <GGSGeneratorAction.h>
Public Member Functions | |
GGSGeneratorAction () | |
Constructor. | |
~GGSGeneratorAction () | |
Destructor. | |
unsigned int | GetNDiscarded () const |
Returns the number of discarded events for the current event generation. More... | |
virtual GGSParameters | GetParameters () const |
Returns the generator parameters. More... | |
Protected Attributes | |
unsigned long int | _nDiscarded |
Base class for GGS generator actions.
This class inherits from G4VUserPrimaryGeneratorAction and adds some specific GGS features like an interface to retrieve the number of discarded events during event generation. User defined generator actions does not have to inherit from GGSGeneratorAction to be used in GGS: they can inherit from G4VUserPrimaryGeneratorAction as usual, but doing so they won't be able to take advantage of the GGS extensions of the interface declared by this class.
Definition at line 31 of file GGSGeneratorAction.h.
|
inline |
Returns the number of discarded events for the current event generation.
Some generator actions can impose some constraints on generated events, e.g., acceptance checks, and continue to generate until an event fulfills the requirements and is then simulated. This method returns the number of discarded events during the generation of the last simulated event. This counter has to be reset at the beginning of the generation of each event by the derived class.
Definition at line 49 of file GGSGeneratorAction.h.
|
inlinevirtual |
Returns the generator parameters.
Derived classes can override this method to return a parameters object with the generation parameters. The actual exported parameters depend on the actual generator implementation; the only required parameter is "generator", which corresponds to a string value holding the generator's name.
Reimplemented in GGSGunGeneratorAction, GGSMultiParticleGeneratorAction, GGSHEPEvtGeneratorAction, and GGSGPSGeneratorAction.
Definition at line 60 of file GGSGeneratorAction.h.