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 namespace Pythia8 {
18  class EvtGenDecays;
19 }
20 
21 namespace CLHEP {
22  class HepRandomEngine;
23 }
24 
25 namespace gen {
26 
28  public:
30  ~Py8InterfaceBase() override {}
31 
32  virtual bool generatePartonsAndHadronize() = 0;
33  bool decay() { return true; } // NOT used - let's call it "design imperfection"
34  bool readSettings(int); // common func
35  void makeTmpSLHA(const std::string&); //helper for above
36  virtual bool initializeForInternalPartons() = 0;
37  bool declareStableParticles(const std::vector<int>&); // common func
38  bool declareSpecialSettings(const std::vector<std::string>&); // common func
39  virtual void finalizeEvent() = 0;
40  virtual void statistics();
41  virtual const char* classname() const = 0;
42 
43  void p8SetRandomEngine(CLHEP::HepRandomEngine* v) { p8RndmEngine_.setRandomEngine(v); }
45 
46  protected:
47  std::unique_ptr<Pythia8::Pythia> fMasterGen;
48  std::unique_ptr<Pythia8::Pythia> fDecayer;
49  HepMC::Pythia8ToHepMC toHepMC;
50  // ParameterCollector fParameters;
52 
53  unsigned int pythiaPylistVerbosity;
56  unsigned int maxEventsToPrint;
57  HepMC::IO_AsciiParticles* ascii_io;
58 
59  // EvtGen plugin
60  //
61  bool useEvtGen;
62  std::shared_ptr<Pythia8::EvtGenDecays> evtgenDecays;
65  std::vector<std::string> evtgenUserFiles;
66 
68 
69  private:
71  };
72 } // namespace gen
73 #endif
bool declareSpecialSettings(const std::vector< std::string > &)
virtual bool initializeForInternalPartons()=0
std::shared_ptr< Pythia8::EvtGenDecays > evtgenDecays
std::unique_ptr< Pythia8::Pythia > fDecayer
void makeTmpSLHA(const std::string &)
HepMC::IO_AsciiParticles * ascii_io
void p8SetRandomEngine(CLHEP::HepRandomEngine *v)
Py8InterfaceBase(edm::ParameterSet const &ps)
double v[5][pyjets_maxn]
std::vector< std::string > evtgenUserFiles
void setRandomEngine(CLHEP::HepRandomEngine *v)
Definition: P8RndmEngine.h:34
P8RndmEngine p8RndmEngine_
virtual void finalizeEvent()=0
virtual bool generatePartonsAndHadronize()=0
unsigned int pythiaPylistVerbosity
bool declareStableParticles(const std::vector< int > &)
P8RndmEngine & randomEngine()
unsigned int maxEventsToPrint
virtual const char * classname() const =0
HepMC::Pythia8ToHepMC toHepMC
std::unique_ptr< Pythia8::Pythia > fMasterGen
edm::ParameterSet fParameters