12 #include "CLHEP/Random/RandGaussQ.h" 44 ,
fPDG(pset.get<
int>(
"pdgcode", 2212))
45 ,
fMass(pset.get<
double>(
"mass", 0.938272))
48 ,
fVertex(CLHEP::Hep3Vector(0., 0., 0.))
52 std::vector<double> mom = pset.get<std::vector<double>>(
"momentum");
58 std::vector<double> momsig =
59 pset.get<std::vector<double>>(
"momentum_sigma", std::vector<double>());
62 if (momsig.size() >= 2)
64 if (momsig.size() >= 3)
67 std::vector<double> vtx = pset.get<std::vector<double>>(
"vertex", std::vector<double>());
75 long seed = pset.get<
long>(
"RNDMSeed", -1);
80 seed = time(0) + getpid();
82 ((seed & 0xFFFF0000) >> 16) | ((seed & 0x0000FFFF) << 16);
83 seed = seed % 900000000;
86 fRandom =
new CLHEP::RandGaussQ(
89 produces<GenParticleCollection>();
117 CLHEP::Hep3Vector
tmp(tmpx, tmpy, tmpz);
120 CLHEP::HepLorentzVector mom4(tmp, e);
125 event.put(std::move(gens));
base_engine_t & createEngine(seed_t seed)
EventGenerator(fhicl::ParameterSet const &pset)
EDProducer(fhicl::ParameterSet const &pset)
CLHEP::Hep3Vector fVertex
std::vector< GenParticle > GenParticleCollection
void produce(art::Event &event) override
CLHEP::Hep3Vector fMomentum
#define DEFINE_ART_MODULE(klass)
CLHEP::RandGaussQ * fRandom
virtual ~EventGenerator()
CLHEP::Hep3Vector fMomentumSig
Event finding and building.