4 #include <HepMC/GenEvent.h> 5 #include <HepMC/IO_BaseClass.h> 7 #include <ThePEG/Repository/Repository.h> 8 #include <ThePEG/EventRecord/Event.h> 9 #include <ThePEG/Config/ThePEG.h> 10 #include <ThePEG/LesHouches/LesHouchesReader.h> 27 class HepRandomEngine;
36 bool initializeForInternalPartons();
37 bool initializeForExternalPartons();
38 bool declareStableParticles(
const std::vector<int> &pdgIds);
43 bool generatePartonsAndHadronize();
49 const char *
classname()
const {
return "ThePEGHadronizer"; }
59 boost::shared_ptr<lhef::LHEProxy>
proxy_;
66 eventsToPrint(pset.getUntrackedParameter<unsigned
int>(
"eventsToPrint", 0)),
67 handlerDirectory_(pset.getParameter<
std::
string>(
"eventHandlers"))
83 std::ostringstream ss;
86 std::ostringstream logstream;
88 "/LHEReader:ProxyID " + ss.str(), logstream);
89 edm::LogInfo(
"Generator|LHEInterface") << logstream.str();
105 eg_->integratedXSec() / ThePEG::picobarn,
106 eg_->integratedXSecErr() / ThePEG::picobarn));
111 edm::LogInfo(
"Generator|ThePEGHadronizer") <<
"Start production";
118 edm::LogWarning(
"Generator|ThePEGHadronizer") <<
"EGPtr::shoot() thrown an exception, event skipped: " << exc.what();
121 edm::LogWarning(
"Generator|ThePEGHadronizer") <<
"EGPtr::shoot() thrown an unknown exception, event skipped";
126 edm::LogWarning(
"Generator|ThePEGHadronizer") <<
"thepegEvent not initialized";
131 if (!
event().
get()) {
132 edm::LogWarning(
"Generator|ThePEGHadronizer") <<
"genEvent not initialized";
141 edm::LogInfo(
"Generator|ThePEGHadronizer") <<
"Start production";
149 double mergeweight = 1.0;
154 edm::LogWarning(
"Generator|ThePEGHadronizer") <<
"EGPtr::shoot() thrown an exception, event skipped: " << exc.what();
158 edm::LogWarning(
"Generator|ThePEGHadronizer") <<
"EGPtr::shoot() thrown an unknown exception, event skipped";
164 edm::LogWarning(
"Generator|ThePEGHadronizer") <<
"thepegEvent not initialized";
170 if (!
event().
get()) {
171 edm::LogWarning(
"Generator|ThePEGHadronizer") <<
"genEvent not initialized";
183 event()->set_pdf_info(pdf);
198 event()->set_pdf_info(pdf);
212 edm::LogInfo(
"Generator|ThePEGHadronizer") <<
"Event produced";
unsigned int eventsToPrint
void initRepository(const edm::ParameterSet ¶ms) const
edm::HadronizerFilter< ThePEGHadronizer, gen::ExternalDecayDriver > ThePEGHadronizerFilter
#define DEFINE_FWK_MODULE(type)
void count(LHERunInfo::CountMode count, double weight=1.0, double matchWeight=1.0)
const std::string handlerDirectory_
static double pthat(const ThePEG::EventPtr &event)
void setInternalXSec(const XSec &xsec)
const HEPEUP * getHEPEUP() const
std::auto_ptr< HepMC::GenEvent > & event()
bool declareStableParticles(const std::vector< int > &pdgIds)
GenRunInfoProduct & runInfo()
bool initializeForInternalPartons()
lhef::LHEEvent * lheEvent()
edm::GeneratorFilter< ThePEGHadronizer, gen::ExternalDecayDriver > ThePEGGeneratorFilter
void fillPdfInfo(HepMC::PdfInfo *info) const
void flushRandomNumberGenerator()
ThePEG::EventPtr thepegEvent
std::auto_ptr< HepMC::IO_BaseClass > iobc_
static std::auto_ptr< HepMC::GenEvent > convert(const ThePEG::EventPtr &event)
bool generatePartonsAndHadronize()
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
std::auto_ptr< GenEventInfoProduct > & eventInfo()
ThePEGHadronizer(const edm::ParameterSet ¶ms)
bool initializeForExternalPartons()
boost::shared_ptr< lhef::LHEProxy > proxy_
const char * classname() const
~ThePEGHadronizer() override
bool declareSpecialSettings(const std::vector< std::string >)
const boost::shared_ptr< lhef::LHERunInfo > & getLHERunInfo() const
static void clearAuxiliary(HepMC::GenEvent *hepmc, HepMC::PdfInfo *pdf)
static boost::shared_ptr< LHEProxy > create()
static void fillAuxiliary(HepMC::GenEvent *hepmc, HepMC::PdfInfo *pdf, const ThePEG::EventPtr &event)