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

Abstract base class for vertex generators. More...

#include <RMGVVertexGenerator.hh>

Inheritance diagram for RMGVVertexGenerator:

Public Member Functions

 RMGVVertexGenerator (std::string name)
 
 RMGVVertexGenerator (RMGVVertexGenerator const &)=delete
 
RMGVVertexGeneratoroperator= (RMGVVertexGenerator const &)=delete
 
 RMGVVertexGenerator (RMGVVertexGenerator &&)=delete
 
RMGVVertexGeneratoroperator= (RMGVVertexGenerator &&)=delete
 
virtual void BeginOfRunAction (const G4Run *)
 
virtual void EndOfRunAction (const G4Run *)
 
virtual bool GenerateVertex (G4ThreeVector &v)
 Generate a primary vertex position.
 
void SetMaxAttempts (int val)
 Set the maximum number of attempts for vertex generation.
 
int GetMaxAttempts () const
 Get the maximum number of attempts for vertex generation.
 

Protected Attributes

std::string fGeneratorName
 
int fMaxAttempts = 100
 
const G4ThreeVector kDummyPrimaryPosition = G4ThreeVector(0, 0, 0)
 
std::unique_ptr< G4UImessengerfMessenger
 

Detailed Description

Abstract base class for vertex generators.

This class defines the interface for generating primary vertex positions in a simulation run. It provides hooks for run initialization (begin/end) and for generating a vertex. When BxDecay0 is available, it implements the bxdecay0::VertexGeneratorInterface.

Member Function Documentation

◆ BeginOfRunAction()

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

Reimplemented in RMGVertexFromFile.

◆ EndOfRunAction()

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

Reimplemented in RMGVertexFromFile.

◆ GenerateVertex()

virtual bool RMGVVertexGenerator::GenerateVertex ( G4ThreeVector & v)
inlinevirtual

Generate a primary vertex position.

Fills the provided vector v with the generated primary vertex position. If vertex generation is not implemented, v is set to a dummy position (0,0,0) and the function returns false.

Parameters
vReference to the G4ThreeVector to hold the generated vertex.
Returns
True if a valid vertex was generated, false otherwise.

Reimplemented in RMGVertexConfinement, RMGVertexFromFile, and RMGVertexFromPoint.

◆ GetMaxAttempts()

int RMGVVertexGenerator::GetMaxAttempts ( ) const
inlinenodiscard

Get the maximum number of attempts for vertex generation.

Returns
The maximum number of attempts.

◆ SetMaxAttempts()

void RMGVVertexGenerator::SetMaxAttempts ( int val)
inline

Set the maximum number of attempts for vertex generation.

This controls how many iterations the generator will perform before giving up.

Parameters
valThe maximum number of attempts.

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