remage
Simulation framework for HPGe-based experiments
 
Loading...
Searching...
No Matches
RMGGeneratorGPS Class Reference

RMGVGenerator wrapper around Geant4's General Particle Source. More...

#include <RMGGeneratorGPS.hh>

Inheritance diagram for RMGGeneratorGPS:
Collaboration diagram for RMGGeneratorGPS:

Public Member Functions

void GeneratePrimaries (G4Event *event) override
 Generate a primary vertex from the GPS, optionally overriding the vertex position.
 
void SetParticlePosition (G4ThreeVector vec) override
 Override the centre coordinates of every GPS source for the next primary vertex.
 
- Public Member Functions inherited from RMGVGenerator
 RMGVGenerator (std::string name)
 
 RMGVGenerator (RMGVGenerator const &)=delete
 
RMGVGeneratoroperator= (RMGVGenerator const &)=delete
 
 RMGVGenerator (RMGVGenerator &&)=delete
 
RMGVGeneratoroperator= (RMGVGenerator &&)=delete
 
virtual void BeginOfRunAction (const G4Run *)
 Called at the beginning of a run.
 
virtual void EndOfRunAction (const G4Run *)
 Called at the end of a run.
 
void SetReportingFrequency (int freq)
 
std::string GetGeneratorName ()
 

Additional Inherited Members

- Protected Attributes inherited from RMGVGenerator
std::string fGeneratorName
 
std::unique_ptr< G4UImessengerfMessenger
 
int fReportingFrequency = 1000
 

Detailed Description

RMGVGenerator wrapper around Geant4's General Particle Source.

If a vertex position has been provided via SetParticlePosition, it is propagated to the centre of every GPS source before generating the primary vertex. Calls into the GPS are serialized through a class-wide mutex because G4GeneralParticleSource is not thread-safe (all worker threads share the same global state).

Member Function Documentation

◆ GeneratePrimaries()

void RMGGeneratorGPS::GeneratePrimaries ( G4Event * event)
inlineoverridevirtual

Generate a primary vertex from the GPS, optionally overriding the vertex position.

Implements RMGVGenerator.

◆ SetParticlePosition()

void RMGGeneratorGPS::SetParticlePosition ( G4ThreeVector vec)
inlineoverridevirtual

Override the centre coordinates of every GPS source for the next primary vertex.

Implements RMGVGenerator.


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