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.";
110 eg_->integratedXSec() / ThePEG::picobarn,
111 eg_->integratedXSecErr() / ThePEG::picobarn));
116 edm::LogInfo(
"Generator|Herwig7Hadronizer") <<
"Start production";
123 edm::LogWarning(
"Generator|Herwig7Hadronizer") <<
"EGPtr::shoot() thrown an exception, event skipped: " << exc.what();
128 edm::LogWarning(
"Generator|Herwig7Hadronizer") <<
"thepegEvent not initialized";
133 if (!
event().
get()) {
134 edm::LogWarning(
"Generator|Herwig7Hadronizer") <<
"genEvent not initialized";
144 edm::LogError(
"Herwig7 interface") <<
"Read in of LHE files is not supported in this way. You can read them manually if necessary.";
162 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::ParameterSet paramSettings
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_
const std::string runFileName
bool declareStableParticles(const std::vector< int > &pdgIds)