GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
Public Member Functions
GGSHEPEvtGeneratorAction Class Reference

A generator action to produce particles using the HEPEvt generator. More...

#include <GGSHEPEvtGeneratorAction.h>

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

Public Member Functions

 GGSHEPEvtGeneratorAction ()
 Constructor.
 
void GeneratePrimaries (G4Event *anEvent)
 Generate primaries with GPS generator. More...
 
GGSParameters GetParameters () const
 Gets the generation parameters. More...
 
- Public Member Functions inherited from GGSGeneratorAction
 GGSGeneratorAction ()
 Constructor.
 
 ~GGSGeneratorAction ()
 Destructor.
 
unsigned int GetNDiscarded () const
 Returns the number of discarded events for the current event generation. More...
 

Additional Inherited Members

- Protected Attributes inherited from GGSGeneratorAction
unsigned long int _nDiscarded
 

Detailed Description

A generator action to produce particles using the HEPEvt generator.

Definition at line 23 of file GGSHEPEvtGeneratorAction.h.

Member Function Documentation

void GGSHEPEvtGeneratorAction::GeneratePrimaries ( G4Event *  anEvent)

Generate primaries with GPS generator.

Parameters
anEventthe current event.

Definition at line 31 of file GGSHEPEvtGeneratorAction.cpp.

31  {
32  if (!_hepEvtGenerator) {
33  _hepEvtGenerator = std::make_unique<G4HEPEvtInterface>(_hepEvtFile);
34  _hepEvtGenerator->SetParticlePosition(_hepEvtPos);
35  _hepEvtGenerator->SetParticleTime(_hepEvtTime);
36  }
37  _hepEvtGenerator->GeneratePrimaryVertex(anEvent);
38 }
GGSParameters GGSHEPEvtGeneratorAction::GetParameters ( ) const
virtual

Gets the generation parameters.

The parameters exported by the GGSGunGeneratorAction are:

General

Name | Type | Description | Exported -------------—| ------------—|-----------------------------------------------------—|-----------------------------------— generator | string | The name of the generator "hepEvt" | Always

Returns
The generation parameters object;

Reimplemented from GGSGeneratorAction.

Definition at line 40 of file GGSHEPEvtGeneratorAction.cpp.

40  {
41  GGSParameters params;
42  params.SetParam("generator", std::string("hepEvt"));
43  return params;
44 }
void SetParam(const std::string &name, T value)
Sets a parameter.
Class for storing parameters.
Definition: GGSParameters.h:29

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