CMS 3D CMS Logo

Py8HMC3InterfaceBase.h
Go to the documentation of this file.
1 #ifndef gen_Py8HMC3InterfaceBase_h
2 #define gen_Py8HMC3InterfaceBase_h
3 
4 #include <vector>
5 #include <string>
6 
10 
11 #include <Pythia8/Pythia.h>
12 #include <Pythia8Plugins/HepMC3.h>
13 
14 namespace Pythia8 {
15  class EvtGenDecays;
16 }
17 
18 namespace CLHEP {
19  class HepRandomEngine;
20 }
21 
22 namespace gen {
23 
25  public:
27  ~Py8HMC3InterfaceBase() override = default;
28 
29  virtual bool generatePartonsAndHadronize() = 0;
30  bool decay() { return true; } // NOT used - let's call it "design imperfection"
31  bool readSettings(int); // common func
32  void makeTmpSLHA(const std::string&); //helper for above
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); }
42 
43  protected:
44  std::unique_ptr<Pythia8::Pythia> fMasterGen;
45  std::unique_ptr<Pythia8::Pythia> fDecayer;
46  HepMC3::Pythia8ToHepMC3 toHepMC;
48 
49  unsigned int pythiaPylistVerbosity;
52  unsigned int maxEventsToPrint;
53 
54  // EvtGen plugin
55  //
56  bool useEvtGen;
57  std::shared_ptr<Pythia8::EvtGenDecays> evtgenDecays;
60  std::vector<std::string> evtgenUserFiles;
61 
63 
64  private:
66  };
67 } // namespace gen
68 #endif
virtual void finalizeEvent()=0
bool declareSpecialSettings(const std::vector< std::string > &)
bool declareStableParticles(const std::vector< int > &)
HepMC3::Pythia8ToHepMC3 toHepMC
Py8HMC3InterfaceBase(edm::ParameterSet const &ps)
std::unique_ptr< Pythia8::Pythia > fDecayer
~Py8HMC3InterfaceBase() override=default
virtual bool initializeForInternalPartons()=0
double v[5][pyjets_maxn]
void makeTmpSLHA(const std::string &)
virtual const char * classname() const =0
std::shared_ptr< P8RndmEngine > P8RndmEnginePtr
Definition: PythiaDecays.h:14
std::unique_ptr< Pythia8::Pythia > fMasterGen
virtual bool generatePartonsAndHadronize()=0
std::shared_ptr< Pythia8::EvtGenDecays > evtgenDecays
std::vector< std::string > evtgenUserFiles
void p8SetRandomEngine(CLHEP::HepRandomEngine *v)