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 
16 class EvtGenDecays;
17 
18 namespace CLHEP {
19  class HepRandomEngine;
20 }
21 
22 namespace gen {
23 
25 
26  public:
27 
29  virtual ~Py8InterfaceBase() {}
30 
31  virtual bool generatePartonsAndHadronize() = 0;
32  bool decay() { return true; } // NOT used - let's call it "design imperfection"
33  bool readSettings( int ); // common func
34  virtual bool initializeForInternalPartons() = 0;
35  bool declareStableParticles( const std::vector<int>& ); // common func
36  bool declareSpecialSettings( const std::vector<std::string>& ); // common func
37  virtual void finalizeEvent() = 0;
38  virtual void statistics();
39  virtual const char* classname() const = 0;
40 
41  void p8SetRandomEngine(CLHEP::HepRandomEngine* v) { p8RndmEngine_.setRandomEngine(v); }
42  P8RndmEngine& randomEngine() { return p8RndmEngine_; }
43 
44  protected:
45 
46  std::auto_ptr<Pythia8::Pythia> fMasterGen;
47  std::auto_ptr<Pythia8::Pythia> fDecayer;
48  HepMC::Pythia8ToHepMC toHepMC;
49 // ParameterCollector fParameters;
51 
52  unsigned int pythiaPylistVerbosity;
55  unsigned int maxEventsToPrint;
56  HepMC::IO_AsciiParticles* ascii_io;
57 
58  // EvtGen plugin
59  //
60  bool useEvtGen;
61  std::auto_ptr<EvtGenDecays> evtgenDecays;
64  std::vector<std::string> evtgenUserFiles;
65 
67 
68  private:
69 
71  };
72 }
73 #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