![]() |
![]() |
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 string | handlerDirectory_ |
boost::shared_ptr< LHEProxy > | proxy_ |
Definition at line 42 of file ThePEGHadronisation.cc.
lhef::ThePEGHadronisation::ThePEGHadronisation | ( | const edm::ParameterSet & | params | ) |
Definition at line 72 of file ThePEGHadronisation.cc.
References lhef::LHEProxy::create(), initLHE(), ThePEGInterface::initRepository(), and proxy_.
00072 : 00073 ThePEGInterface(params), 00074 Hadronisation(params), 00075 handlerDirectory_(params.getParameter<string>("eventHandlers")) 00076 { 00077 initRepository(params); 00078 00079 proxy_ = LHEProxy::create(); 00080 00081 initLHE(); 00082 }
lhef::ThePEGHadronisation::~ThePEGHadronisation | ( | ) |
std::auto_ptr< HepMC::GenEvent > lhef::ThePEGHadronisation::doHadronisation | ( | ) | [private, virtual] |
Implements lhef::Hadronisation.
Definition at line 92 of file ThePEGHadronisation.cc.
References ThePEGInterface::clearAuxiliary(), ThePEGInterface::convert(), ThePEGInterface::eg_, event(), ThePEGInterface::fillAuxiliary(), lhef::Hadronisation::getRawEvent(), and proxy_.
00093 { 00094 edm::LogInfo("Generator|LHEInterface") << "Start production"; 00095 00096 proxy_->loadEvent(getRawEvent()); 00097 00098 ThePEG::EventPtr thepegEvent; 00099 try { 00100 thepegEvent = eg_->shoot(); 00101 } catch(ThePEG::Stop) { 00102 // no event 00103 } 00104 00105 if (!thepegEvent) { 00106 edm::LogWarning("Generator|LHEInterface") 00107 << "thepegEvent not initialized"; 00108 return std::auto_ptr<HepMC::GenEvent>(); 00109 } 00110 00111 std::auto_ptr<HepMC::GenEvent> event = convert(thepegEvent); 00112 if (!event.get()) 00113 return event; 00114 00115 HepMC::PdfInfo pdf; 00116 clearAuxiliary(event.get(), &pdf); 00117 getRawEvent()->fillPdfInfo(&pdf); 00118 fillAuxiliary(event.get(), &pdf, thepegEvent); 00119 event->set_pdf_info(pdf); 00120 00121 return event; 00122 }
void lhef::ThePEGHadronisation::doInit | ( | ) | [private, virtual] |
void lhef::ThePEGHadronisation::initLHE | ( | ) | [private] |
Definition at line 59 of file ThePEGHadronisation.cc.
References handlerDirectory_, proxy_, and ss.
Referenced by ThePEGHadronisation().
00060 { 00061 ostringstream ss; 00062 ss << proxy_->getID(); 00063 00064 ostringstream logstream; 00065 00066 ThePEG::Repository::exec("cd " + handlerDirectory_, logstream); 00067 ThePEG::Repository::exec("set LHEReader:ProxyID " + ss.str(), logstream); 00068 00069 edm::LogInfo("Generator|LHEInterface") << logstream.str(); 00070 }
void lhef::ThePEGHadronisation::newRunInfo | ( | const boost::shared_ptr< LHERunInfo > & | runInfo | ) | [private, virtual] |
Reimplemented from lhef::Hadronisation.
Definition at line 124 of file ThePEGHadronisation.cc.
References ThePEGInterface::eg_, ThePEGInterface::initGenerator(), and proxy_.
00126 { 00127 proxy_->loadRunInfo(runInfo); 00128 00129 initGenerator(); 00130 00131 edm::Service<edm::RandomNumberGenerator> rng; 00132 eg_->setSeed(rng->mySeed()); 00133 }
const string lhef::ThePEGHadronisation::handlerDirectory_ [private] |
boost::shared_ptr<LHEProxy> lhef::ThePEGHadronisation::proxy_ [private] |
Definition at line 56 of file ThePEGHadronisation.cc.
Referenced by doHadronisation(), initLHE(), newRunInfo(), and ThePEGHadronisation().