Public Member Functions | |
ThePEGHadronisation (const edm::ParameterSet ¶ms) | |
~ThePEGHadronisation () | |
Private Member Functions | |
std::auto_ptr< HepMC::GenEvent > | doHadronisation () |
void | doInit () |
void | initLHE () |
void | newRunInfo (const boost::shared_ptr< LHERunInfo > &runInfo) |
Private Attributes | |
const std::string | handlerDirectory_ |
boost::shared_ptr< LHEProxy > | proxy_ |
Definition at line 38 of file ThePEGHadronisation.cc.
lhef::ThePEGHadronisation::ThePEGHadronisation | ( | const edm::ParameterSet & | params | ) |
Definition at line 66 of file ThePEGHadronisation.cc.
References lhef::Hadronisation::create(), initLHE(), ThePEGInterface::initRepository(), and proxy_.
: ThePEGInterface(params), Hadronisation(params), handlerDirectory_(params.getParameter<string>("eventHandlers")) { initRepository(params); proxy_ = LHEProxy::create(); initLHE(); }
lhef::ThePEGHadronisation::~ThePEGHadronisation | ( | ) |
Definition at line 80 of file ThePEGHadronisation.cc.
{ }
std::auto_ptr< HepMC::GenEvent > lhef::ThePEGHadronisation::doHadronisation | ( | ) | [private, virtual] |
Implements lhef::Hadronisation.
Definition at line 84 of file ThePEGHadronisation.cc.
References ThePEGInterface::clearAuxiliary(), ThePEGInterface::convert(), ThePEGInterface::eg_, event(), ThePEGInterface::fillAuxiliary(), ThePEGInterface::flushRandomNumberGenerator(), lhef::Hadronisation::getRawEvent(), and proxy_.
{ edm::LogInfo("Generator|LHEInterface") << "Start production"; proxy_->loadEvent(getRawEvent()); ThePEG::EventPtr thepegEvent; try { flushRandomNumberGenerator(); thepegEvent = eg_->shoot(); } catch(ThePEG::Stop) { // no event } if (!thepegEvent) { edm::LogWarning("Generator|LHEInterface") << "thepegEvent not initialized"; return std::auto_ptr<HepMC::GenEvent>(); } std::auto_ptr<HepMC::GenEvent> event = convert(thepegEvent); if (!event.get()) return event; HepMC::PdfInfo pdf; clearAuxiliary(event.get(), &pdf); getRawEvent()->fillPdfInfo(&pdf); fillAuxiliary(event.get(), &pdf, thepegEvent); event->set_pdf_info(pdf); return event; }
void lhef::ThePEGHadronisation::doInit | ( | ) | [private, virtual] |
void lhef::ThePEGHadronisation::initLHE | ( | ) | [private] |
Definition at line 55 of file ThePEGHadronisation.cc.
Referenced by ThePEGHadronisation().
{ ostringstream ss; ss << proxy_->getID(); ostringstream logstream; ThePEG::Repository::exec("set " + handlerDirectory_ + "/LHEReader:ProxyID " + ss.str(), logstream); edm::LogInfo("Generator|LHEInterface") << logstream.str(); }
void lhef::ThePEGHadronisation::newRunInfo | ( | const boost::shared_ptr< LHERunInfo > & | runInfo | ) | [private, virtual] |
Reimplemented from lhef::Hadronisation.
Definition at line 117 of file ThePEGHadronisation.cc.
References ThePEGInterface::initGenerator(), and proxy_.
{ proxy_->loadRunInfo(runInfo); initGenerator(); }
const std::string lhef::ThePEGHadronisation::handlerDirectory_ [private] |
Definition at line 52 of file ThePEGHadronisation.cc.
boost::shared_ptr<LHEProxy> lhef::ThePEGHadronisation::proxy_ [private] |
Definition at line 50 of file ThePEGHadronisation.cc.
Referenced by doHadronisation(), newRunInfo(), and ThePEGHadronisation().