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  virtual bool initializeForInternalPartons() = 0;
36  bool declareStableParticles( const std::vector<int>& ); // common func
37  bool declareSpecialSettings( const std::vector<std::string>& ); // common func
38  virtual void finalizeEvent() = 0;
39  virtual void statistics();
40  virtual const char* classname() const = 0;
41 
42  void p8SetRandomEngine(CLHEP::HepRandomEngine* v) { p8RndmEngine_.setRandomEngine(v); }
43  P8RndmEngine& randomEngine() { return p8RndmEngine_; }
44 
45  protected:
46 
47  std::auto_ptr<Pythia8::Pythia> fMasterGen;
48  std::auto_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::auto_ptr<EvtGenDecays> evtgenDecays;
65  std::vector<std::string> evtgenUserFiles;
66 
68 
69  private:
70 
72  };
73 }
74 #endif
std::auto_ptr< Pythia8::Pythia > fMasterGen
std::auto_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
std::auto_ptr< Pythia8::Pythia > fDecayer
HepMC::Pythia8ToHepMC toHepMC
edm::ParameterSet fParameters