17 #include "CLHEP/Random/RandExponential.h" 18 #include "CLHEP/Random/RandFlat.h" 32 produces<HepMCProduct>(
"unsmeared");
33 produces<GenEventInfoProduct>();
42 CLHEP::HepRandomEngine* engine = &rng->
getEngine(
e.streamID());
45 cout <<
" ExpoRandomPtGunProducer : Begin New Event Generation" << endl;
61 HepMC::GenVertex* Vtx =
new HepMC::GenVertex(HepMC::FourVector(0., 0., 0.));
66 for (
unsigned int ip = 0; ip <
fPartIDs.size(); ++ip) {
72 while (pt < fMinPt || pt >
fMaxPt) {
80 double mass = PData->mass().value();
86 double energy2 = mom * mom +
mass *
mass;
93 Part->suggest_barcode(barcode);
95 Vtx->add_particle_out(Part);
107 APart->suggest_barcode(barcode);
109 Vtx->add_particle_out(APart);
113 fEvt->add_vertex(Vtx);
114 fEvt->set_event_number(
e.id().event());
115 fEvt->set_signal_process_id(20);
122 BProduct->addHepMCData(
fEvt);
131 cout <<
" FlatRandomPtGunProducer : Event Generation Done " << endl;
T getParameter(std::string const &) const
ExpoRandomPtGunProducer(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
~ExpoRandomPtGunProducer() override
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
Geom::Theta< T > theta() const