CMS 3D CMS Logo

Py8InterfaceBase.h
Go to the documentation of this file.
1 #ifndef gen_Py8InterfaceBase_h
2 #define gen_Py8InterfaceBase_h
3 
4 #include <vector>
5 #include <string>
6 
10 
11 #include "HepMC/IO_AsciiParticles.h"
12 
13 #include <Pythia8/Pythia.h>
14 #include <Pythia8Plugins/HepMC2.h>
15 #include <Dire/Dire.h>
16 
17 class EvtGenDecays;
18 
19 namespace CLHEP {
20  class HepRandomEngine;
21 }
22 
23 namespace gen {
24 
26  public:
28  ~Py8InterfaceBase() override {}
29 
30  virtual bool generatePartonsAndHadronize() = 0;
31  bool decay() { return true; } // NOT used - let's call it "design imperfection"
32  bool readSettings(int); // common func
33  virtual bool initializeForInternalPartons() = 0;
34  bool declareStableParticles(const std::vector<int>&); // common func
35  bool declareSpecialSettings(const std::vector<std::string>&); // common func
36  virtual void finalizeEvent() = 0;
37  virtual void statistics();
38  virtual const char* classname() const = 0;
39 
40  void p8SetRandomEngine(CLHEP::HepRandomEngine* v) { p8RndmEngine_.setRandomEngine(v); }
41  P8RndmEngine& randomEngine() { return p8RndmEngine_; }
42 
43  protected:
44  std::unique_ptr<Pythia8::Pythia> fMasterGen;
45  std::unique_ptr<Pythia8::Pythia> fDecayer;
46  HepMC::Pythia8ToHepMC toHepMC;
47  // ParameterCollector fParameters;
49 
50  unsigned int pythiaPylistVerbosity;
53  unsigned int maxEventsToPrint;
54  HepMC::IO_AsciiParticles* ascii_io;
55 
56  // EvtGen plugin
57  //
58  bool useEvtGen;
59  std::shared_ptr<EvtGenDecays> evtgenDecays;
62  std::vector<std::string> evtgenUserFiles;
63 
65 
66  private:
68  };
69 } // namespace gen
70 #endif
std::unique_ptr< Pythia8::Pythia > fDecayer
std::shared_ptr< EvtGenDecays > evtgenDecays
HepMC::IO_AsciiParticles * ascii_io
void p8SetRandomEngine(CLHEP::HepRandomEngine *v)
std::vector< std::string > evtgenUserFiles
P8RndmEngine p8RndmEngine_
unsigned int pythiaPylistVerbosity
P8RndmEngine & randomEngine()
unsigned int maxEventsToPrint
HepMC::Pythia8ToHepMC toHepMC
std::unique_ptr< Pythia8::Pythia > fMasterGen
edm::ParameterSet fParameters