CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
lhef::ThePEGHadronisation Class Reference
Inheritance diagram for lhef::ThePEGHadronisation:
ThePEGInterface lhef::Hadronisation

Public Member Functions

 ThePEGHadronisation (const edm::ParameterSet &params)
 
 ~ThePEGHadronisation ()
 
- Public Member Functions inherited from ThePEGInterface
 ThePEGInterface (const edm::ParameterSet &params)
 
virtual ~ThePEGInterface ()
 
- Public Member Functions inherited from lhef::Hadronisation
virtual std::set< std::string > capabilities () const
 
void clear ()
 
 Hadronisation (const edm::ParameterSet &params)
 
std::auto_ptr< HepMC::GenEvent > hadronize ()
 
void init ()
 
virtual void matchingCapabilities (const std::set< std::string > &capabilities)
 
sigc::signal< void > & onBeforeHadronisation ()
 
sigc::signal< void > & onInit ()
 
sigc::signal< bool, const
boost::shared_ptr
< HepMC::GenEvent > & > & 
onShoweredEvent ()
 
bool setEvent (const boost::shared_ptr< LHEEvent > &event)
 
virtual void statistics ()
 
virtual double totalBranchingRatio (int pdgId) const
 
virtual ~Hadronisation ()
 

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< LHEProxyproxy_
 

Additional Inherited Members

- Public Types inherited from lhef::Hadronisation
typedef
edmplugin::PluginFactory
< Hadronisation *(const
edm::ParameterSet &)> 
Factory
 
- Static Public Member Functions inherited from lhef::Hadronisation
static std::auto_ptr
< Hadronisation
create (const edm::ParameterSet &params)
 
- Protected Member Functions inherited from ThePEGInterface
std::string dataFile (const std::string &fileName) const
 
std::string dataFile (const edm::ParameterSet &pset, const std::string &paramName) const
 
void flushRandomNumberGenerator ()
 
void initGenerator ()
 
void initRepository (const edm::ParameterSet &params) const
 
- Protected Member Functions inherited from lhef::Hadronisation
const boost::shared_ptr
< LHEEvent > & 
getRawEvent () const
 
bool showeredEvent (const boost::shared_ptr< HepMC::GenEvent > &event)
 
bool wantsShoweredEvent () const
 
bool wantsShoweredEventAsHepMC () const
 
- Static Protected Member Functions inherited from ThePEGInterface
static void clearAuxiliary (HepMC::GenEvent *hepmc, HepMC::PdfInfo *pdf)
 
static std::auto_ptr
< HepMC::GenEvent > 
convert (const ThePEG::EventPtr &event)
 
static void fillAuxiliary (HepMC::GenEvent *hepmc, HepMC::PdfInfo *pdf, const ThePEG::EventPtr &event)
 
static double pthat (const ThePEG::EventPtr &event)
 
- Protected Attributes inherited from ThePEGInterface
ThePEG::EGPtr eg_
 
std::auto_ptr
< HepMC::IO_BaseClass > 
iobc_
 

Detailed Description

Definition at line 38 of file ThePEGHadronisation.cc.

Constructor & Destructor Documentation

lhef::ThePEGHadronisation::ThePEGHadronisation ( const edm::ParameterSet params)

Definition at line 66 of file ThePEGHadronisation.cc.

References lhef::LHEProxy::create(), initLHE(), ThePEGInterface::initRepository(), and proxy_.

66  :
67  ThePEGInterface(params),
68  Hadronisation(params),
69  handlerDirectory_(params.getParameter<string>("eventHandlers"))
70 {
71  initRepository(params);
73  initLHE();
74 }
T getParameter(std::string const &) const
void initRepository(const edm::ParameterSet &params) const
ThePEGInterface(const edm::ParameterSet &params)
Hadronisation(const edm::ParameterSet &params)
const std::string handlerDirectory_
boost::shared_ptr< LHEProxy > proxy_
static boost::shared_ptr< LHEProxy > create()
Definition: LHEProxy.cc:41
lhef::ThePEGHadronisation::~ThePEGHadronisation ( )

Definition at line 80 of file ThePEGHadronisation.cc.

81 {
82 }

Member Function Documentation

std::auto_ptr< HepMC::GenEvent > lhef::ThePEGHadronisation::doHadronisation ( )
privatevirtual

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_.

85 {
86  edm::LogInfo("Generator|LHEInterface") << "Start production";
87 
88  proxy_->loadEvent(getRawEvent());
89 
90  ThePEG::EventPtr thepegEvent;
91  try {
93  thepegEvent = eg_->shoot();
94  } catch(ThePEG::Stop) {
95  // no event
96  }
97 
98  if (!thepegEvent) {
99  edm::LogWarning("Generator|LHEInterface")
100  << "thepegEvent not initialized";
101  return std::auto_ptr<HepMC::GenEvent>();
102  }
103 
104  std::auto_ptr<HepMC::GenEvent> event = convert(thepegEvent);
105  if (!event.get())
106  return event;
107 
108  HepMC::PdfInfo pdf;
109  clearAuxiliary(event.get(), &pdf);
110  getRawEvent()->fillPdfInfo(&pdf);
111  fillAuxiliary(event.get(), &pdf, thepegEvent);
112  event->set_pdf_info(pdf);
113 
114  return event;
115 }
const boost::shared_ptr< LHEEvent > & getRawEvent() const
Definition: Hadronisation.h:59
void flushRandomNumberGenerator()
ThePEG::EGPtr eg_
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
static std::auto_ptr< HepMC::GenEvent > convert(const ThePEG::EventPtr &event)
boost::shared_ptr< LHEProxy > proxy_
static void clearAuxiliary(HepMC::GenEvent *hepmc, HepMC::PdfInfo *pdf)
static void fillAuxiliary(HepMC::GenEvent *hepmc, HepMC::PdfInfo *pdf, const ThePEG::EventPtr &event)
void lhef::ThePEGHadronisation::doInit ( )
privatevirtual

Implements lhef::Hadronisation.

Definition at line 76 of file ThePEGHadronisation.cc.

77 {
78 }
void lhef::ThePEGHadronisation::initLHE ( )
private

Definition at line 55 of file ThePEGHadronisation.cc.

Referenced by ThePEGHadronisation().

56 {
57  ostringstream ss;
58  ss << proxy_->getID();
59 
60  ostringstream logstream;
61  ThePEG::Repository::exec("set " + handlerDirectory_ +
62  "/LHEReader:ProxyID " + ss.str(), logstream);
63  edm::LogInfo("Generator|LHEInterface") << logstream.str();
64 }
const std::string handlerDirectory_
boost::shared_ptr< LHEProxy > proxy_
void lhef::ThePEGHadronisation::newRunInfo ( const boost::shared_ptr< LHERunInfo > &  runInfo)
privatevirtual

Reimplemented from lhef::Hadronisation.

Definition at line 117 of file ThePEGHadronisation.cc.

References ThePEGInterface::initGenerator(), and proxy_.

119 {
120  proxy_->loadRunInfo(runInfo);
121  initGenerator();
122 }
boost::shared_ptr< LHEProxy > proxy_

Member Data Documentation

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().