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 "Herwig7Hadronizer"; }
59 boost::shared_ptr<lhef::LHEProxy>
proxy_;
66 eventsToPrint(pset.getUntrackedParameter<unsigned
int>(
"eventsToPrint", 0)),
67 handlerDirectory_(pset.getParameter<
std::
string>(
"eventHandlers"))
81 edm::LogInfo(
"Generator|Herwig7Hadronizer") <<
"No run step for Herwig chosen. Program will be aborted.";
89 edm::LogError(
"Herwig7 interface") <<
"Read in of LHE files is not supported in this way. You can read them manually if necessary.";
101 eg_->integratedXSec() / ThePEG::picobarn,
102 eg_->integratedXSecErr() / ThePEG::picobarn));
107 edm::LogInfo(
"Generator|Herwig7Hadronizer") <<
"Start production";
114 edm::LogWarning(
"Generator|Herwig7Hadronizer") <<
"EGPtr::shoot() thrown an exception, event skipped: " << exc.what();
119 edm::LogWarning(
"Generator|Herwig7Hadronizer") <<
"thepegEvent not initialized";
124 if (!
event().
get()) {
125 edm::LogWarning(
"Generator|Herwig7Hadronizer") <<
"genEvent not initialized";
135 edm::LogError(
"Herwig7 interface") <<
"Read in of LHE files is not supported in this way. You can read them manually if necessary.";
153 edm::LogInfo(
"Generator|Herwig7Hadronizer") <<
"Event produced";
~Herwig7Hadronizer() override
bool generatePartonsAndHadronize()
static double pthat(const ThePEG::EventPtr &event)
void initRepository(const edm::ParameterSet ¶ms)
std::auto_ptr< HepMC::IO_BaseClass > iobc_
#define DEFINE_FWK_MODULE(type)
void setInternalXSec(const XSec &xsec)
std::auto_ptr< HepMC::GenEvent > & event()
GenRunInfoProduct & runInfo()
bool declareSpecialSettings(const std::vector< std::string >)
bool initializeForExternalPartons()
edm::GeneratorFilter< Herwig7Hadronizer, gen::ExternalDecayDriver > Herwig7GeneratorFilter
unsigned int eventsToPrint
edm::HadronizerFilter< Herwig7Hadronizer, gen::ExternalDecayDriver > Herwig7HadronizerFilter
static std::auto_ptr< HepMC::GenEvent > convert(const ThePEG::EventPtr &event)
bool initializeForInternalPartons()
std::auto_ptr< GenEventInfoProduct > & eventInfo()
boost::shared_ptr< lhef::LHEProxy > proxy_
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
Herwig7Hadronizer(const edm::ParameterSet ¶ms)
ThePEG::EventPtr thepegEvent
const char * classname() const
void flushRandomNumberGenerator()
const std::string handlerDirectory_
bool declareStableParticles(const std::vector< int > &pdgIds)