5 #include <HepMC/GenEvent.h> 6 #include <HepMC/IO_BaseClass.h> 8 #include <ThePEG/Repository/Repository.h> 9 #include <ThePEG/EventRecord/Event.h> 10 #include <ThePEG/Config/ThePEG.h> 11 #include <ThePEG/LesHouches/LesHouchesReader.h> 28 class HepRandomEngine;
37 bool initializeForInternalPartons();
38 bool initializeForExternalPartons();
39 bool declareStableParticles(
const std::vector<int> &pdgIds);
44 bool generatePartonsAndHadronize();
50 const char *
classname()
const {
return "Herwig7Hadronizer"; }
60 boost::shared_ptr<lhef::LHEProxy>
proxy_;
69 eventsToPrint(pset.getUntrackedParameter<unsigned
int>(
"eventsToPrint", 0)),
70 handlerDirectory_(pset.getParameter<
std::
string>(
"eventHandlers")),
71 runFileName(pset.getParameter<
std::
string>(
"run"))
90 edm::LogInfo(
"Generator|Herwig7Hadronizer") <<
"No run step for Herwig chosen. Program will be aborted.";
98 edm::LogError(
"Herwig7 interface") <<
"Read in of LHE files is not supported in this way. You can read them manually if necessary.";
111 eg_->integratedXSec() / ThePEG::picobarn,
112 eg_->integratedXSecErr() / ThePEG::picobarn));
118 edm::LogInfo(
"Generator|Herwig7Hadronizer") <<
"Start production";
125 edm::LogWarning(
"Generator|Herwig7Hadronizer") <<
"EGPtr::shoot() thrown an exception, event skipped: " << exc.what();
130 edm::LogWarning(
"Generator|Herwig7Hadronizer") <<
"thepegEvent not initialized";
135 if (!
event().
get()) {
136 edm::LogWarning(
"Generator|Herwig7Hadronizer") <<
"genEvent not initialized";
146 edm::LogError(
"Herwig7 interface") <<
"Read in of LHE files is not supported in this way. You can read them manually if necessary.";
164 edm::LogInfo(
"Generator|Herwig7Hadronizer") <<
"Event produced";
~Herwig7Hadronizer() override
bool generatePartonsAndHadronize()
static double pthat(const ThePEG::EventPtr &event)
void initRepository(const edm::ParameterSet ¶ms)
#define DEFINE_FWK_MODULE(type)
std::unique_ptr< HepMC::IO_BaseClass > iobc_
void setInternalXSec(const XSec &xsec)
GenRunInfoProduct & runInfo()
bool declareSpecialSettings(const std::vector< std::string >)
bool initializeForExternalPartons()
edm::GeneratorFilter< Herwig7Hadronizer, gen::ExternalDecayDriver > Herwig7GeneratorFilter
unsigned int eventsToPrint
static std::unique_ptr< HepMC::GenEvent > convert(const ThePEG::EventPtr &event)
edm::ParameterSet paramSettings
edm::HadronizerFilter< Herwig7Hadronizer, gen::ExternalDecayDriver > Herwig7HadronizerFilter
bool initializeForInternalPartons()
std::unique_ptr< HepMC::GenEvent > & event()
boost::shared_ptr< lhef::LHEProxy > proxy_
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
std::unique_ptr< GenEventInfoProduct > & eventInfo()
Herwig7Hadronizer(const edm::ParameterSet ¶ms)
ThePEG::EventPtr thepegEvent
const char * classname() const
void flushRandomNumberGenerator()
const std::string handlerDirectory_
const std::string runFileName
bool declareStableParticles(const std::vector< int > &pdgIds)