Class RMGGeneratorFromFile

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class RMGGeneratorFromFile : public RMGVGenerator

Primary generator reading particle kinematics row-by-row from an ntuple file.

Each row of the input ntuple (LH5/HDF5/ROOT, opened through RMGAnalysisReader) specifies a Geant4 PDG id, kinetic energy, momentum direction and global time. The vertex position is supplied externally by the configured vertex generator via SetParticlePosition. The fNpart column allows several consecutive rows to be combined into a single multi-particle primary vertex.

Public Functions

RMGGeneratorFromFile()
~RMGGeneratorFromFile() = default
RMGGeneratorFromFile(RMGGeneratorFromFile const&) = delete
RMGGeneratorFromFile &operator=(RMGGeneratorFromFile const&) = delete
RMGGeneratorFromFile(RMGGeneratorFromFile&&) = delete
RMGGeneratorFromFile &operator=(RMGGeneratorFromFile&&) = delete
virtual void GeneratePrimaries(G4Event*) override

Read the next row(s) from the input ntuple and create the primary vertex.

inline virtual void SetParticlePosition(G4ThreeVector pos) override

Set the vertex position for the next call to GeneratePrimaries.

virtual void BeginOfRunAction(const G4Run*) override

Open the input file and bind the row reader to the configured ntuple columns.

virtual void EndOfRunAction(const G4Run*) override

Close the input file.

void OpenFile(std::string &name)

Set the path of the input ntuple file.