|
actions
|
Generates primary vertices for each event. More...
#include <gPrimaryGeneratorAction.h>
Public Member Functions | |
| GPrimaryGeneratorAction (std::shared_ptr< GOptions > gopts) | |
| Constructs the primary generator action. | |
| ~GPrimaryGeneratorAction () override | |
| Destructor. Releases the internally owned particle gun. | |
| void | GeneratePrimaries (G4Event *event) override |
| Generates the primaries for the given event. | |
Public Member Functions inherited from GBase< GPrimaryGeneratorAction > | |
| GBase (const std::shared_ptr< GOptions > &gopt, std::string logger_name="") | |
| GBase (const std::shared_ptr< GLogger > &logger) | |
| GBase (const GBase &)=default | |
| GBase (GBase &&) noexcept=default | |
| virtual | ~GBase () |
| GBase & | operator= (const GBase &)=default |
| GBase & | operator= (GBase &&) noexcept=default |
Additional Inherited Members | |
Protected Attributes inherited from GBase< GPrimaryGeneratorAction > | |
| std::shared_ptr< GLogger > | log |
This action constructs a Geant4 particle gun (G4ParticleGun) and a list of configured Gparticle objects. For each event, it iterates over the list and delegates to each Gparticle instance to configure the gun and shoot into the event.
If no particles are configured, a default particle is created and used.
Definition at line 51 of file gPrimaryGeneratorAction.h.
| GPrimaryGeneratorAction::GPrimaryGeneratorAction | ( | std::shared_ptr< GOptions > | gopts | ) |
G4ParticleGun instance.| gopts | Shared configuration object used to retrieve particle definitions and logging settings. |
Definition at line 6 of file gPrimaryGeneratorAction.cc.
|
override |
Definition at line 21 of file gPrimaryGeneratorAction.cc.
|
override |
The method loops over the configured Gparticle list, logs particle details at higher verbosity, and invokes the per-particle shooting routine.
| event | The Geant4 event that will receive the generated primaries. |
Definition at line 27 of file gPrimaryGeneratorAction.cc.