remage
Simulation framework for HPGe-based experiments
 
Loading...
Searching...
No Matches
RMGVGenerator Class Referenceabstract

Abstract base class for primary generators. More...

#include <RMGVGenerator.hh>

Inheritance diagram for RMGVGenerator:

Public Member Functions

 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.
 
virtual void SetParticlePosition (G4ThreeVector vec)=0
 Set the primary vertex position.
 
virtual void GeneratePrimaries (G4Event *event)=0
 Generate primary particles for an event.
 
void SetReportingFrequency (int freq)
 
std::string GetGeneratorName ()
 

Protected Attributes

std::string fGeneratorName
 
std::unique_ptr< G4UImessengerfMessenger
 
int fReportingFrequency = 1000
 

Detailed Description

Abstract base class for primary generators.

This class defines the interface for generators that create the primary particle(s) and set their vertex position(s) for a simulation event.

Member Function Documentation

◆ BeginOfRunAction()

virtual void RMGVGenerator::BeginOfRunAction ( const G4Run * )
inlinevirtual

Called at the beginning of a run.

Derived generators can perform any necessary initialization in this method.

Reimplemented in RMGGeneratorCosmicMuons, RMGGeneratorDecay0, RMGGeneratorFromFile, RMGGeneratorMUSUNCosmicMuons, and RMGGeomBench.

◆ EndOfRunAction()

virtual void RMGVGenerator::EndOfRunAction ( const G4Run * )
inlinevirtual

Called at the end of a run.

Derived generators can perform any necessary finalization in this method.

Reimplemented in RMGGeneratorCosmicMuons, RMGGeneratorDecay0, RMGGeneratorFromFile, RMGGeneratorMUSUNCosmicMuons, and RMGGeomBench.

◆ GeneratePrimaries()

virtual void RMGVGenerator::GeneratePrimaries ( G4Event * event)
pure virtual

Generate primary particles for an event.

Derived generators must implement this method to create primary particles and add them to the given G4Event.

Parameters
eventPointer to the G4Event.

Implemented in RMGGeneratorCosmicMuons, RMGGeneratorDecay0, RMGGeneratorFromFile, RMGGeneratorG4Gun, RMGGeneratorGPS, RMGGeneratorMUSUNCosmicMuons, and RMGGeomBench.

◆ SetParticlePosition()

virtual void RMGVGenerator::SetParticlePosition ( G4ThreeVector vec)
pure virtual

Set the primary vertex position.

This pure virtual method must be implemented by derived classes to set the primary vertex position for the generator.

Parameters
vecThe desired primary vertex position.

Implemented in RMGGeneratorCosmicMuons, RMGGeneratorDecay0, RMGGeneratorFromFile, RMGGeneratorG4Gun, RMGGeneratorGPS, RMGGeneratorMUSUNCosmicMuons, and RMGGeomBench.


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