remage
Simulation framework for HPGe-based experiments
 
Loading...
Searching...
No Matches
RMGMasterGenerator Class Reference
Inheritance diagram for RMGMasterGenerator:
Collaboration diagram for RMGMasterGenerator:

Public Types

enum class  Confinement { kUnConfined , kVolume , kFromFile , kFromPoint }
 Enumeration for specifying the primary vertex confinement strategy. More...
 
enum class  Generator {
  kG4gun , kGPS , kBxDecay0 , kFromFile ,
  kCosmicMuons , kMUSUNCosmicMuons , kUserDefined , kGeomBench ,
  kUndefined
}
 Enumeration for selecting the primary generator mode. More...
 

Public Member Functions

 RMGMasterGenerator (RMGMasterGenerator const &)=delete
 
RMGMasterGeneratoroperator= (RMGMasterGenerator const &)=delete
 
 RMGMasterGenerator (RMGMasterGenerator &&)=delete
 
RMGMasterGeneratoroperator= (RMGMasterGenerator &&)=delete
 
void GeneratePrimaries (G4Event *event) override
 Generate primary vertices for the event.
 
RMGVGeneratorGetGenerator ()
 Get the current primary generator.
 
RMGVVertexGeneratorGetVertexGenerator ()
 Get the current vertex generator.
 
Confinement GetConfinement () const
 Retrieve the current vertex confinement strategy.
 
void SetConfinement (Confinement code)
 Set the primary vertex confinement strategy.
 
void SetConfinementString (std::string code)
 Set the vertex confinement strategy using a string.
 
void SetUserGenerator (RMGVGenerator *gen)
 Set a user-defined primary generator.
 
void SetGenerator (Generator gen)
 Select one of the built-in primary generator modes.
 
void SetGeneratorString (std::string gen)
 Set the primary generator mode using a string.
 

Member Enumeration Documentation

◆ Confinement

Enumeration for specifying the primary vertex confinement strategy.

Enumerator
kUnConfined 

No confinement is applied here; the generator has the duty to sample a primary vertex.

kVolume 

The primary vertex is confined to a specific detector volume.

kFromFile 

The primary vertex is read from an external file.

kFromPoint 

The primary vertex is always at a fixed position.

◆ Generator

enum class RMGMasterGenerator::Generator
strong

Enumeration for selecting the primary generator mode.

Enumerator
kG4gun 

The standard Geant4 particle gun.

kGPS 

The Geant4 General Particle Source.

kBxDecay0 

The BxDecay0 generator for double beta decay processes.

kFromFile 

A generator that reads primary vertex data from an external file.

kCosmicMuons 

A simple cosmic muon generator.

kMUSUNCosmicMuons 

The MUSUN-based cosmic muon generator.

kUserDefined 

A user-specified custom generator.

kGeomBench 

The benchmark generator.

kUndefined 

Undefined generator mode.

Member Function Documentation

◆ GeneratePrimaries()

void RMGMasterGenerator::GeneratePrimaries ( G4Event * event)
override

Generate primary vertices for the event.

This method delegates the creation of primary vertices to the configured generator. Depending on the selected generator mode (e.g. G4gun, GPS, BxDecay0, CosmicMuons, etc.), it produces one or more primary vertices for the event.

Parameters
eventPointer to the G4Event to which the primary vertices will be added.

◆ GetConfinement()

Confinement RMGMasterGenerator::GetConfinement ( ) const
inlinenodiscard

Retrieve the current vertex confinement strategy.

Returns
The currently selected Confinement mode (kUnConfined, kVolume, or kFromFile).

◆ GetGenerator()

RMGVGenerator * RMGMasterGenerator::GetGenerator ( )
inline

Get the current primary generator.

Returns
Pointer to the configured RMGVGenerator instance.

◆ GetVertexGenerator()

RMGVVertexGenerator * RMGMasterGenerator::GetVertexGenerator ( )
inline

Get the current vertex generator.

Returns
Pointer to the configured RMGVVertexGenerator instance.

◆ SetConfinement()

void RMGMasterGenerator::SetConfinement ( RMGMasterGenerator::Confinement code)

Set the primary vertex confinement strategy.

The confinement strategy determines how the primary vertex is generated, for example whether to generate it from a detector volume or to load it from an input file.

Parameters
codeThe Confinement mode to set.

◆ SetConfinementString()

void RMGMasterGenerator::SetConfinementString ( std::string code)

Set the vertex confinement strategy using a string.

The provided string is converted to a Confinement enum value.

Parameters
codeThe string specifying the confinement mode (e.g., "kUnConfined", "kVolume", "kFromFile").

◆ SetGenerator()

void RMGMasterGenerator::SetGenerator ( RMGMasterGenerator::Generator gen)

Select one of the built-in primary generator modes.

This method sets the generator mode (e.g., kG4gun, kGPS, kBxDecay0, kCosmicMuons, etc.) to be used when generating primary vertices.

Parameters
genThe generator mode to use.

◆ SetGeneratorString()

void RMGMasterGenerator::SetGeneratorString ( std::string gen)

Set the primary generator mode using a string.

The method converts the provided string into a Generator enum value.

Parameters
genThe string representing the generator type (e.g., "kG4gun", "kGPS", "kBxDecay0", "kCosmicMuons", "kMUSUNCosmicMuons", etc.).

◆ SetUserGenerator()

void RMGMasterGenerator::SetUserGenerator ( RMGVGenerator * gen)

Set a user-defined primary generator.

This method allows the registration of a custom generator. The user-defined generator pointer is owned by the manager.

Parameters
genPointer to an instance of a custom RMGVGenerator.

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