17 #include "CLHEP/Random/RandFlat.h" 32 produces<HepMCProduct>(
"unsmeared");
33 produces<GenEventInfoProduct>();
35 cout <<
"Internal FlatRandomEGun is initialzed" << endl;
45 CLHEP::HepRandomEngine* engine = &rng->
getEngine(
e.streamID());
48 cout <<
" FlatRandomEGunProducer : Begin New Event Generation" << endl;
64 HepMC::GenVertex* Vtx =
new HepMC::GenVertex(HepMC::FourVector(0., 0., 0.));
69 for (
unsigned int ip = 0; ip <
fPartIDs.size(); ip++) {
75 double mass = PData->mass().value();
90 Part->suggest_barcode(barcode);
92 Vtx->add_particle_out(Part);
101 APart->suggest_barcode(barcode);
103 Vtx->add_particle_out(APart);
106 fEvt->add_vertex(Vtx);
107 fEvt->set_event_number(
e.id().event());
108 fEvt->set_signal_process_id(20);
115 BProduct->addHepMCData(
fEvt);
125 cout <<
" FlatRandomEGunProducer : Event Generation Done " << endl;
FlatRandomEGunProducer(const ParameterSet &pset)
T getParameter(std::string const &) const
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
void produce(Event &e, const EventSetup &es) override
~FlatRandomEGunProducer() override