CMS 3D CMS Logo

Herwig7Interface.h
Go to the documentation of this file.
1 
6 #ifndef GeneratorInterface_Herwig7Interface_Herwig7Interface_h
7 #define GeneratorInterface_Herwig7Interface_Herwig7Interface_h
8 
9 
10 
11 #include <memory>
12 #include <string>
13 
14 #include <boost/shared_ptr.hpp>
15 
16 #include <HepMC/GenEvent.h>
17 #include <HepMC/PdfInfo.h>
18 #include <HepMC/IO_BaseClass.h>
19 
20 #include <ThePEG/Repository/EventGenerator.h>
21 #include <ThePEG/EventRecord/Event.h>
22 
24 
28 
29 namespace CLHEP {
30  class HepRandomEngine;
31 }
32 
34  public:
35  Herwig7Interface(const edm::ParameterSet &params);
37 
38  void setPEGRandomEngine(CLHEP::HepRandomEngine*);
39 
40  ThePEG::EGPtr eg_;
41 
42 
43 
44  protected:
45  void initRepository(const edm::ParameterSet &params);
46  bool initGenerator();
47  void flushRandomNumberGenerator();
48 
49  static std::auto_ptr<HepMC::GenEvent>
50  convert(const ThePEG::EventPtr &event);
51 
52  static double pthat(const ThePEG::EventPtr &event);
53 
54 
55 
56  std::auto_ptr<HepMC::IO_BaseClass> iobc_;
57 
58  // HerwigUi contains settings piped to Herwig7
60 
66  void callHerwigGenerator();
67 
68 
69  // The Inputfile ist created according to the parameter set
70  void createInputFile(const edm::ParameterSet &params);
71 
72 
73 
74  private:
75  boost::shared_ptr<ThePEG::RandomEngineGlue::Proxy>
77 
81  // File name containing Herwig input config
83  const unsigned int skipEvents_;
84 };
85 
86 
87 
88 
89 
90 
91 
92 #endif // GeneratorInterface_Herwig7Interface_Herwig7Interface_h
std::auto_ptr< HepMC::IO_BaseClass > iobc_
const std::string dataLocation_
std::string dumpConfig_
ThePEG::EGPtr eg_
const std::string run_
def convert(infile, ofile)
const std::string generator_
const unsigned int skipEvents_
boost::shared_ptr< ThePEG::RandomEngineGlue::Proxy > randomEngineGlueProxy_
Herwig::HerwigUIProvider * HwUI_
Definition: event.py:1