CMS 3D CMS Logo

Herwig7Interface.h
Go to the documentation of this file.
1 
5 #ifndef GeneratorInterface_Herwig7Interface_Herwig7Interface_h
6 #define GeneratorInterface_Herwig7Interface_Herwig7Interface_h
7 
8 #include <memory>
9 #include <string>
10 
11 #include <HepMC/GenEvent.h>
12 #include <HepMC/PdfInfo.h>
13 #include <HepMC/IO_BaseClass.h>
14 
15 #include <ThePEG/Repository/EventGenerator.h>
16 #include <ThePEG/EventRecord/Event.h>
17 #include <ThePEG/Vectors/HepMCTraits.h>
18 
20 
23 
24 namespace ThePEG {
25 
26  template <>
27  struct HepMCTraits<HepMC::GenEvent> : public HepMCTraitsBase<HepMC::GenEvent,
28  HepMC::GenParticle,
29  HepMC::GenParticle *,
30  HepMC::GenVertex,
31  HepMC::GenVertex *,
32  HepMC::Polarization,
33  HepMC::PdfInfo> {};
34 
35 } // namespace ThePEG
36 
37 namespace CLHEP {
38  class HepRandomEngine;
39 }
40 
42 public:
44  ~Herwig7Interface() noexcept;
45 
46  void setPEGRandomEngine(CLHEP::HepRandomEngine *);
47 
48  ThePEG::EGPtr eg_;
49 
50 protected:
52  bool initGenerator();
54 
55  static std::auto_ptr<HepMC::GenEvent> convert(const ThePEG::EventPtr &event);
56 
57  static double pthat(const ThePEG::EventPtr &event);
58 
59  std::auto_ptr<HepMC::IO_BaseClass> iobc_;
60 
61  // HerwigUi contains settings piped to Herwig7
62  std::shared_ptr<Herwig::HerwigUIProvider> HwUI_;
63 
69  void callHerwigGenerator();
70 
71  // The Inputfile ist created according to the parameter set
73 
74 private:
75  std::shared_ptr<ThePEG::RandomEngineGlue::Proxy> randomEngineGlueProxy_;
76 
80  // File name containing Herwig input config
82  const unsigned int skipEvents_;
83  CLHEP::HepRandomEngine *randomEngine;
84 };
85 
86 #endif // GeneratorInterface_Herwig7Interface_Herwig7Interface_h
Herwig7Interface::skipEvents_
const unsigned int skipEvents_
Definition: Herwig7Interface.h:82
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
Herwig7Interface
Definition: Herwig7Interface.h:41
Herwig7Interface::Herwig7Interface
Herwig7Interface(const edm::ParameterSet &params)
Definition: Herwig7Interface.cc:52
HerwigUIProvider.h
ThePEG
Definition: Herwig7Interface.h:24
Herwig7Interface::createInputFile
void createInputFile(const edm::ParameterSet &params)
Definition: Herwig7Interface.cc:248
Herwig7Interface::flushRandomNumberGenerator
void flushRandomNumberGenerator()
Definition: Herwig7Interface.cc:217
CLHEP
Definition: CocoaGlobals.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Herwig7Interface::initRepository
void initRepository(const edm::ParameterSet &params)
Definition: Herwig7Interface.cc:85
edm::ParameterSet
Definition: ParameterSet.h:47
Herwig7Interface::initGenerator
bool initGenerator()
Definition: Herwig7Interface.cc:192
Herwig7Interface::iobc_
std::auto_ptr< HepMC::IO_BaseClass > iobc_
Definition: Herwig7Interface.h:59
Herwig7Interface::setPEGRandomEngine
void setPEGRandomEngine(CLHEP::HepRandomEngine *)
Definition: Herwig7Interface.cc:76
Herwig7Interface::callHerwigGenerator
void callHerwigGenerator()
Definition: Herwig7Interface.cc:141
Herwig7Interface::pthat
static double pthat(const ThePEG::EventPtr &event)
Definition: Herwig7Interface.cc:232
Herwig7Interface::HwUI_
std::shared_ptr< Herwig::HerwigUIProvider > HwUI_
Definition: Herwig7Interface.h:62
Herwig7Interface::randomEngine
CLHEP::HepRandomEngine * randomEngine
Definition: Herwig7Interface.h:83
Herwig7Interface::dataLocation_
const std::string dataLocation_
Definition: Herwig7Interface.h:77
HepMC
Definition: GenParticle.h:15
Herwig7Interface::~Herwig7Interface
~Herwig7Interface() noexcept
Definition: Herwig7Interface.cc:70
Herwig7Interface::dumpConfig_
std::string dumpConfig_
Definition: Herwig7Interface.h:81
ParameterSet.h
Herwig7Interface::convert
static std::auto_ptr< HepMC::GenEvent > convert(const ThePEG::EventPtr &event)
Definition: Herwig7Interface.cc:228
event
Definition: event.py:1
Herwig7Interface::eg_
ThePEG::EGPtr eg_
Definition: Herwig7Interface.h:48
Herwig7Interface::generator_
const std::string generator_
Definition: Herwig7Interface.h:78
Herwig7Interface::run_
const std::string run_
Definition: Herwig7Interface.h:79
RandomEngineGlue.h
Herwig7Interface::randomEngineGlueProxy_
std::shared_ptr< ThePEG::RandomEngineGlue::Proxy > randomEngineGlueProxy_
Definition: Herwig7Interface.h:75