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
gen::Py8InterfaceBase::fMasterGen
std::unique_ptr< Pythia8::Pythia > fMasterGen
Definition: Py8InterfaceBase.h:47
gen::Py8InterfaceBase::evtgenDecays
std::shared_ptr< Pythia8::EvtGenDecays > evtgenDecays
Definition: Py8InterfaceBase.h:62
gen::Py8InterfaceBase::makeTmpSLHA
void makeTmpSLHA(const std::string &)
Definition: Py8InterfaceBase.cc:183
gen::Py8InterfaceBase::ascii_io
HepMC::IO_AsciiParticles * ascii_io
Definition: Py8InterfaceBase.h:57
BaseHadronizer.h
gen::Py8InterfaceBase::initializeForInternalPartons
virtual bool initializeForInternalPartons()=0
gen::Py8InterfaceBase::decay
bool decay()
Definition: Py8InterfaceBase.h:33
P8RndmEngine.h
gen::Py8InterfaceBase::~Py8InterfaceBase
~Py8InterfaceBase() override
Definition: Py8InterfaceBase.h:30
gen::BaseHadronizer
Definition: BaseHadronizer.h:46
gen::P8RndmEngine
Definition: P8RndmEngine.h:27
gen::Py8InterfaceBase::p8RndmEngine_
P8RndmEngine p8RndmEngine_
Definition: Py8InterfaceBase.h:70
gen::Py8InterfaceBase::finalizeEvent
virtual void finalizeEvent()=0
Pythia8
Definition: PythiaDecays.h:21
gen::Py8InterfaceBase::Py8InterfaceBase
Py8InterfaceBase(edm::ParameterSet const &ps)
Definition: Py8InterfaceBase.cc:21
gen::Py8InterfaceBase::useEvtGen
bool useEvtGen
Definition: Py8InterfaceBase.h:61
gen::Py8InterfaceBase::pythiaHepMCVerbosityParticles
bool pythiaHepMCVerbosityParticles
Definition: Py8InterfaceBase.h:55
ParameterCollector.h
gen
Definition: PythiaDecays.h:13
gen::Py8InterfaceBase::evtgenUserFiles
std::vector< std::string > evtgenUserFiles
Definition: Py8InterfaceBase.h:65
gen::Py8InterfaceBase::pythiaPylistVerbosity
unsigned int pythiaPylistVerbosity
Definition: Py8InterfaceBase.h:53
CLHEP
Definition: CocoaGlobals.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
gen::Py8InterfaceBase::randomEngine
P8RndmEngine & randomEngine()
Definition: Py8InterfaceBase.h:44
gen::Py8InterfaceBase::generatePartonsAndHadronize
virtual bool generatePartonsAndHadronize()=0
gen::Py8InterfaceBase::declareStableParticles
bool declareStableParticles(const std::vector< int > &)
Definition: Py8InterfaceBase.cc:195
edm::ParameterSet
Definition: ParameterSet.h:47
gen::Py8InterfaceBase::evtgenPdlFile
std::string evtgenPdlFile
Definition: Py8InterfaceBase.h:64
gen::Py8InterfaceBase::maxEventsToPrint
unsigned int maxEventsToPrint
Definition: Py8InterfaceBase.h:56
gen::v
double v[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:76
gen::Py8InterfaceBase::classname
virtual const char * classname() const =0
gen::Py8InterfaceBase::pythiaHepMCVerbosity
bool pythiaHepMCVerbosity
Definition: Py8InterfaceBase.h:54
gen::Py8InterfaceBase::toHepMC
HepMC::Pythia8ToHepMC toHepMC
Definition: Py8InterfaceBase.h:49
gen::P8RndmEngine::setRandomEngine
void setRandomEngine(CLHEP::HepRandomEngine *v)
Definition: P8RndmEngine.h:34
gen::Py8InterfaceBase::declareSpecialSettings
bool declareSpecialSettings(const std::vector< std::string > &)
Definition: Py8InterfaceBase.cc:222
gen::Py8InterfaceBase::fParameters
edm::ParameterSet fParameters
Definition: Py8InterfaceBase.h:51
gen::Py8InterfaceBase::statistics
virtual void statistics()
Definition: Py8InterfaceBase.cc:237
gen::Py8InterfaceBase
Definition: Py8InterfaceBase.h:27
gen::Py8InterfaceBase::fDecayer
std::unique_ptr< Pythia8::Pythia > fDecayer
Definition: Py8InterfaceBase.h:48
gen::Py8InterfaceBase::evtgenDecFile
std::string evtgenDecFile
Definition: Py8InterfaceBase.h:63
gen::Py8InterfaceBase::readSettings
bool readSettings(int)
Definition: Py8InterfaceBase.cc:82
gen::Py8InterfaceBase::slhafile_
std::string slhafile_
Definition: Py8InterfaceBase.h:67
gen::Py8InterfaceBase::p8SetRandomEngine
void p8SetRandomEngine(CLHEP::HepRandomEngine *v)
Definition: Py8InterfaceBase.h:43