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  public:
28  ~Py8InterfaceBase() override {}
29 
30  virtual bool generatePartonsAndHadronize() = 0;
31  bool decay() { return true; } // NOT used - let's call it "design imperfection"
32  bool readSettings(int); // common func
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  HepMC::Pythia8ToHepMC toHepMC;
47  // ParameterCollector fParameters;
49 
50  unsigned int pythiaPylistVerbosity;
53  unsigned int maxEventsToPrint;
54  HepMC::IO_AsciiParticles* ascii_io;
55 
56  // EvtGen plugin
57  //
58  bool useEvtGen;
59  std::shared_ptr<EvtGenDecays> evtgenDecays;
62  std::vector<std::string> evtgenUserFiles;
63 
65 
66  private:
68  };
69 } // namespace gen
70 #endif
gen::Py8InterfaceBase::fMasterGen
std::unique_ptr< Pythia8::Pythia > fMasterGen
Definition: Py8InterfaceBase.h:44
gen::Py8InterfaceBase::ascii_io
HepMC::IO_AsciiParticles * ascii_io
Definition: Py8InterfaceBase.h:54
BaseHadronizer.h
gen::Py8InterfaceBase::initializeForInternalPartons
virtual bool initializeForInternalPartons()=0
gen::Py8InterfaceBase::decay
bool decay()
Definition: Py8InterfaceBase.h:31
P8RndmEngine.h
gen::Py8InterfaceBase::~Py8InterfaceBase
~Py8InterfaceBase() override
Definition: Py8InterfaceBase.h:28
gen::BaseHadronizer
Definition: BaseHadronizer.h:46
gen::Py8InterfaceBase::evtgenDecays
std::shared_ptr< EvtGenDecays > evtgenDecays
Definition: Py8InterfaceBase.h:59
gen::P8RndmEngine
Definition: P8RndmEngine.h:27
gen::Py8InterfaceBase::p8RndmEngine_
P8RndmEngine p8RndmEngine_
Definition: Py8InterfaceBase.h:67
gen::Py8InterfaceBase::finalizeEvent
virtual void finalizeEvent()=0
gen::Py8InterfaceBase::Py8InterfaceBase
Py8InterfaceBase(edm::ParameterSet const &ps)
Definition: Py8InterfaceBase.cc:17
gen::Py8InterfaceBase::useEvtGen
bool useEvtGen
Definition: Py8InterfaceBase.h:58
gen::Py8InterfaceBase::pythiaHepMCVerbosityParticles
bool pythiaHepMCVerbosityParticles
Definition: Py8InterfaceBase.h:52
ParameterCollector.h
gen
Definition: PythiaDecays.h:13
gen::Py8InterfaceBase::evtgenUserFiles
std::vector< std::string > evtgenUserFiles
Definition: Py8InterfaceBase.h:62
gen::Py8InterfaceBase::pythiaPylistVerbosity
unsigned int pythiaPylistVerbosity
Definition: Py8InterfaceBase.h:50
CLHEP
Definition: CocoaGlobals.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
gen::Py8InterfaceBase::randomEngine
P8RndmEngine & randomEngine()
Definition: Py8InterfaceBase.h:41
gen::Py8InterfaceBase::generatePartonsAndHadronize
virtual bool generatePartonsAndHadronize()=0
gen::Py8InterfaceBase::declareStableParticles
bool declareStableParticles(const std::vector< int > &)
Definition: Py8InterfaceBase.cc:180
edm::ParameterSet
Definition: ParameterSet.h:36
gen::Py8InterfaceBase::evtgenPdlFile
std::string evtgenPdlFile
Definition: Py8InterfaceBase.h:61
gen::Py8InterfaceBase::maxEventsToPrint
unsigned int maxEventsToPrint
Definition: Py8InterfaceBase.h:53
gen::v
double v[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:74
gen::Py8InterfaceBase::classname
virtual const char * classname() const =0
gen::Py8InterfaceBase::pythiaHepMCVerbosity
bool pythiaHepMCVerbosity
Definition: Py8InterfaceBase.h:51
gen::Py8InterfaceBase::toHepMC
HepMC::Pythia8ToHepMC toHepMC
Definition: Py8InterfaceBase.h:46
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:207
gen::Py8InterfaceBase::fParameters
edm::ParameterSet fParameters
Definition: Py8InterfaceBase.h:48
gen::Py8InterfaceBase::statistics
virtual void statistics()
Definition: Py8InterfaceBase.cc:222
gen::Py8InterfaceBase
Definition: Py8InterfaceBase.h:25
gen::Py8InterfaceBase::fDecayer
std::unique_ptr< Pythia8::Pythia > fDecayer
Definition: Py8InterfaceBase.h:45
gen::Py8InterfaceBase::evtgenDecFile
std::string evtgenDecFile
Definition: Py8InterfaceBase.h:60
gen::Py8InterfaceBase::readSettings
bool readSettings(int)
Definition: Py8InterfaceBase.cc:78
gen::Py8InterfaceBase::slhafile_
std::string slhafile_
Definition: Py8InterfaceBase.h:64
gen::Py8InterfaceBase::p8SetRandomEngine
void p8SetRandomEngine(CLHEP::HepRandomEngine *v)
Definition: Py8InterfaceBase.h:40