14#include "G4PrimaryVertex.hh"
15#include "Randomize.hh"
23 auto beam_spot{parameters.
get<std::vector<double>>(
"beam_spot_smear", {})};
24 if (!beam_spot.empty()) {
26 beamspot_x_size_ = beam_spot[0];
27 beamspot_y_size_ = beam_spot[1];
28 beamspot_z_size_ = beam_spot.size() > 2 ? beam_spot[2] : 0.;
35 double x0_i = primary_vertex->GetX0();
36 double y0_i = primary_vertex->GetY0();
37 double z0_i = primary_vertex->GetZ0();
49 primary_vertex->SetPosition(x0_f, y0_f, z0_f);
#define DEFINE_FACTORY(classtype)
This should go into an implementation file for your prototype class.
Header file for PrimaryGenerator.
Class encapsulating parameters for configuring a processor.
const T & get(const std::string &name) const
Retrieve the parameter of the given name.
Interface that defines a simulation primary generator.
double beamspot_y_size_
Extent of the beamspot in y [mm].
double beamspot_x_size_
Extent of the beamspot in x [mm].
PrimaryGenerator(const std::string &name, const framework::config::Parameters ¶meters)
Constructor.
double beamspot_z_size_
Extent of the beamspot in z [mm].
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 ...