Abstract base class for vertex generators. More...
#include <RMGVVertexGenerator.hh>

Public Member Functions | |
| RMGVVertexGenerator (std::string name) | |
| RMGVVertexGenerator (RMGVVertexGenerator const &)=delete | |
| RMGVVertexGenerator & | operator= (RMGVVertexGenerator const &)=delete |
| RMGVVertexGenerator (RMGVVertexGenerator &&)=delete | |
| RMGVVertexGenerator & | operator= (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< G4UImessenger > | fMessenger |
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.
|
inlinevirtual |
Reimplemented in RMGVertexFromFile.
|
inlinevirtual |
Reimplemented in RMGVertexFromFile.
|
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.
| v | Reference to the G4ThreeVector to hold the generated vertex. |
Reimplemented in RMGVertexConfinement, RMGVertexFromFile, and RMGVertexFromPoint.
|
inlinenodiscard |
Get the maximum number of attempts for vertex generation.
|
inline |
Set the maximum number of attempts for vertex generation.
This controls how many iterations the generator will perform before giving up.
| val | The maximum number of attempts. |