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 
27  public:
28 
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); }
44  P8RndmEngine& randomEngine() { return p8RndmEngine_; }
45 
46  protected:
47 
48  std::unique_ptr<Pythia8::Pythia> fMasterGen;
49  std::unique_ptr<Pythia8::Pythia> fDecayer;
50  HepMC::Pythia8ToHepMC toHepMC;
51 // ParameterCollector fParameters;
53 
54  unsigned int pythiaPylistVerbosity;
57  unsigned int maxEventsToPrint;
58  HepMC::IO_AsciiParticles* ascii_io;
59 
60  // EvtGen plugin
61  //
62  bool useEvtGen;
63  std::shared_ptr<EvtGenDecays> evtgenDecays;
66  std::vector<std::string> evtgenUserFiles;
67 
69 
70  private:
71 
73  };
74 }
75 #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