Class RMGGeneratorGPS

Inheritance Relationships

Base Type

Class Documentation

class RMGGeneratorGPS : public RMGVGenerator

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).

Public Functions

inline RMGGeneratorGPS()
~RMGGeneratorGPS() = default
inline virtual void GeneratePrimaries(G4Event *event) override

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

inline virtual void SetParticlePosition(G4ThreeVector vec) override

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