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
void setPEGRandomEngine (CLHEP::HepRandomEngine *)
 
 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)
 
void setRandomEngine (CLHEP::HepRandomEngine *v)
 
virtual void statistics ()
 
virtual double totalBranchingRatio (int pdgId) const
 
virtual ~Hadronisation ()
 

Private Member Functions

std::auto_ptr< HepMC::GenEvent > doHadronisation ()
 
void doInit ()
 
virtual void doSetRandomEngine (CLHEP::HepRandomEngine *v) override
 
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 42 of file ThePEGHadronisation.cc.

Constructor & Destructor Documentation

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

Definition at line 73 of file ThePEGHadronisation.cc.

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

73  :
74  ThePEGInterface(params),
75  Hadronisation(params),
76  handlerDirectory_(params.getParameter<string>("eventHandlers"))
77 {
78  initRepository(params);
80  initLHE();
81 }
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 87 of file ThePEGHadronisation.cc.

88 {
89 }

Member Function Documentation

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

Implements lhef::Hadronisation.

Definition at line 91 of file ThePEGHadronisation.cc.

References ThePEGInterface::clearAuxiliary(), ThePEGInterface::convert(), ThePEGInterface::eg_, event(), ThePEGInterface::fillAuxiliary(), ThePEGInterface::flushRandomNumberGenerator(), lhef::Hadronisation::getRawEvent(), and proxy_.

92 {
93  edm::LogInfo("Generator|LHEInterface") << "Start production";
94 
95  proxy_->loadEvent(getRawEvent());
96 
97  ThePEG::EventPtr thepegEvent;
98  try {
100  thepegEvent = eg_->shoot();
101  } catch(ThePEG::Stop) {
102  // no event
103  }
104 
105  if (!thepegEvent) {
106  edm::LogWarning("Generator|LHEInterface")
107  << "thepegEvent not initialized";
108  return std::auto_ptr<HepMC::GenEvent>();
109  }
110 
111  std::auto_ptr<HepMC::GenEvent> event = convert(thepegEvent);
112  if (!event.get())
113  return event;
114 
115  HepMC::PdfInfo pdf;
116  clearAuxiliary(event.get(), &pdf);
117  getRawEvent()->fillPdfInfo(&pdf);
118  fillAuxiliary(event.get(), &pdf, thepegEvent);
119  event->set_pdf_info(pdf);
120 
121  return event;
122 }
const boost::shared_ptr< LHEEvent > & getRawEvent() const
Definition: Hadronisation.h:65
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 83 of file ThePEGHadronisation.cc.

84 {
85 }
virtual void lhef::ThePEGHadronisation::doSetRandomEngine ( CLHEP::HepRandomEngine *  v)
inlineoverrideprivatevirtual

Reimplemented from lhef::Hadronisation.

Definition at line 49 of file ThePEGHadronisation.cc.

void setPEGRandomEngine(CLHEP::HepRandomEngine *)
void lhef::ThePEGHadronisation::initLHE ( )
private

Definition at line 62 of file ThePEGHadronisation.cc.

References contentValuesCheck::ss.

Referenced by ThePEGHadronisation().

63 {
64  ostringstream ss;
65  ss << proxy_->getID();
66 
67  ostringstream logstream;
68  ThePEG::Repository::exec("set " + handlerDirectory_ +
69  "/LHEReader:ProxyID " + ss.str(), logstream);
70  edm::LogInfo("Generator|LHEInterface") << logstream.str();
71 }
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 124 of file ThePEGHadronisation.cc.

References ThePEGInterface::initGenerator(), and proxy_.

126 {
127  proxy_->loadRunInfo(runInfo);
128  initGenerator();
129 }
boost::shared_ptr< LHEProxy > proxy_

Member Data Documentation

const std::string lhef::ThePEGHadronisation::handlerDirectory_
private

Definition at line 59 of file ThePEGHadronisation.cc.

boost::shared_ptr<LHEProxy> lhef::ThePEGHadronisation::proxy_
private

Definition at line 57 of file ThePEGHadronisation.cc.

Referenced by doHadronisation(), newRunInfo(), and ThePEGHadronisation().