6#ifndef SIMCORE_PRIMARYGENERATOR_H
7#define SIMCORE_PRIMARYGENERATOR_H
17#include "G4VPrimaryGenerator.hh"
22#include "Framework/Configure/Parameters.h"
24#include "Framework/RunHeader.h"
50 std::shared_ptr<PrimaryGenerator>,
73 std::string name() {
return name_; }
118#define DECLARE_GENERATOR(CLASS) \
119 FACTORY_REGISTRATION(simcore::PrimaryGenerator, CLASS)
Header holding Factory class and supporting macros.
#define DECLARE_FACTORY_WITH_WAREHOUSE(...)
This macro is used in the public portion of your prototype class declaration.
Class encapsulating parameters for configuring a processor.
Interface that defines a simulation primary generator.
virtual ~PrimaryGenerator()=default
Destructor.
virtual void GeneratePrimaryVertex(G4Event *)=0
Generate a Primary Vertex.
std::string name_
Name of the PrimaryGenerator.
double beamspot_y_size_
Extent of the beamspot in y [mm].
double beamspot_x_size_
Extent of the beamspot in x [mm].
virtual void RecordConfig(const std::string &id, ldmx::RunHeader &rh)=0
Record the configuration of the primary generator into the run header.
PrimaryGenerator(const std::string &name, const framework::config::Parameters ¶meters)
Constructor.
double beamspot_z_size_
Extent of the beamspot in z [mm].
bool useBeamspot() const
Check if beam spot smearing is enabled for this generator.
bool use_beamspot_
Flag denoting whether beam spot smearing is enabled for this generator.
void smearBeamspot(G4PrimaryVertex *primary_vertex)
Apply beam spot smearing to a primary vertex.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...