GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | Protected Attributes
GGSGeneratorAction Class Reference

Base class for GGS generator actions. More...

#include <GGSGeneratorAction.h>

Inheritance diagram for GGSGeneratorAction:
Inheritance graph
[legend]
Collaboration diagram for GGSGeneratorAction:
Collaboration graph
[legend]

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
 

Detailed Description

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.

Member Function Documentation

unsigned int GGSGeneratorAction::GetNDiscarded ( ) const
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.

Returns
the number of discarded events.

Definition at line 49 of file GGSGeneratorAction.h.

49 { return _nDiscarded; }
virtual GGSParameters GGSGeneratorAction::GetParameters ( ) const
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.

Returns
The generation parameters object.

Reimplemented in GGSGunGeneratorAction, GGSMultiParticleGeneratorAction, GGSHEPEvtGeneratorAction, and GGSGPSGeneratorAction.

Definition at line 60 of file GGSGeneratorAction.h.

60 { return GGSParameters(); }
Class for storing parameters.
Definition: GGSParameters.h:29

The documentation for this class was generated from the following file: