17 #include "CLHEP/Random/RandFlat.h" 29 produces<HepMCProduct>(
"unsmeared");
30 produces<GenEventInfoProduct>();
39 CLHEP::HepRandomEngine* engine = &rng->
getEngine(
e.streamID());
42 cout <<
" FlatRandomPtGunProducer : Begin New Event Generation" << endl;
57 HepMC::GenVertex* Vtx =
new HepMC::GenVertex(HepMC::FourVector(0., 0., 0.));
62 for (
unsigned int ip = 0; ip <
fPartIDs.size(); ++ip) {
68 double mass = PData->mass().value();
74 double energy2 = mom * mom +
mass *
mass;
78 Part->suggest_barcode(barcode);
80 Vtx->add_particle_out(Part);
89 APart->suggest_barcode(barcode);
91 Vtx->add_particle_out(APart);
95 fEvt->add_vertex(Vtx);
96 fEvt->set_event_number(
e.id().event());
97 fEvt->set_signal_process_id(20);
104 BProduct->addHepMCData(
fEvt);
113 cout <<
" FlatRandomPtGunProducer : Event Generation Done " << endl;
void produce(Event &e, const EventSetup &es) override
~FlatRandomPtGunProducer() override
T getParameter(std::string const &) const
FlatRandomPtGunProducer(const ParameterSet &pset)
Sin< T >::type sin(const T &t)
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
ESHandle< HepPDT::ParticleDataTable > fPDGTable
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
std::vector< int > fPartIDs
HepPDT::ParticleData ParticleData
Geom::Theta< T > theta() const