|
|
Go to the documentation of this file.
5 #include <HepMC/GenEvent.h>
6 #include <HepMC/IO_BaseClass.h>
8 #include <ThePEG/Repository/Repository.h>
9 #include <ThePEG/EventRecord/Event.h>
10 #include <ThePEG/Config/ThePEG.h>
11 #include <ThePEG/LesHouches/LesHouchesReader.h>
29 #include <Herwig/API/HerwigAPI.h>
30 #include "CLHEP/Random/RandomEngine.h"
33 class HepRandomEngine;
55 const char*
classname()
const {
return "Herwig7Hadronizer"; }
67 std::shared_ptr<lhef::LHEProxy>
proxy_;
79 eventsToPrint(
pset.getUntrackedParameter<unsigned
int>(
"eventsToPrint", 0)),
80 handlerDirectory_(
pset.getParameter<
std::
string>(
"eventHandlers")),
96 edm::LogInfo(
"Generator|Herwig7Hadronizer") <<
"No run step for Herwig chosen. Program will be aborted.";
105 <<
"Read in of LHE files is not supported in this way. You can read them manually if necessary.";
119 edm::LogInfo(
"Generator|Herwig7Hadronizer") <<
"Start production";
125 <<
"EGPtr::shoot() thrown an exception, event skipped: " << exc.what();
130 edm::LogWarning(
"Generator|Herwig7Hadronizer") <<
"thepegEvent not initialized";
136 edm::LogWarning(
"Generator|Herwig7Hadronizer") <<
"genEvent not initialized";
145 <<
"Read in of LHE files is not supported in this way. You can read them manually if necessary.";
161 edm::LogInfo(
"Generator|Herwig7Hadronizer") <<
"Event produced";
172 int weights_number =
thepegEvent->optionalWeights().size();
174 if (weights_number > 1) {
177 std::map<std::string, double> weights_map =
thepegEvent->optionalWeights();
178 for (std::map<std::string, double>::iterator it = weights_map.begin(); it != weights_map.end(); it++) {
188 BaseHadronizer::randomizeIndex(
lumi, rengine);
const char * classname() const
bool declareSpecialSettings(const std::vector< std::string >)
void setInternalXSec(const XSec &xsec)
Log< level::Info, false > LogInfo
Log< level::Warning, false > LogWarning
#define DEFINE_FWK_MODULE(type)
unsigned int eventsToPrint
std::unique_ptr< GenLumiInfoHeader > getGenLumiInfoHeader() const override
bool initializeForInternalPartons()
std::unique_ptr< GenEventInfoProduct > & eventInfo()
bool initializeForExternalPartons()
void initRepository(const edm::ParameterSet ¶ms)
ThePEG::EventPtr thepegEvent
std::auto_ptr< HepMC::IO_BaseClass > iobc_
void setPEGRandomEngine(CLHEP::HepRandomEngine *)
edm::ParameterSet paramSettings
std::shared_ptr< lhef::LHEProxy > proxy_
Log< level::Error, false > LogError
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
static double pthat(const ThePEG::EventPtr &event)
Herwig7Hadronizer(const edm::ParameterSet ¶ms)
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
std::unique_ptr< HepMC::GenEvent > & event()
const std::string handlerDirectory_
void randomizeIndex(edm::LuminosityBlock const &lumi, CLHEP::HepRandomEngine *rengine)
const std::string runFileName
unsigned int currentLumiBlock
static std::auto_ptr< HepMC::GenEvent > convert(const ThePEG::EventPtr &event)
edm::HadronizerFilter< Herwig7Hadronizer, gen::ExternalDecayDriver > Herwig7HadronizerFilter
GenRunInfoProduct & runInfo()
bool declareStableParticles(const std::vector< int > &pdgIds)
edm::GeneratorFilter< Herwig7Hadronizer, gen::ExternalDecayDriver > Herwig7GeneratorFilter
~Herwig7Hadronizer() override
unsigned int firstLumiBlock
bool generatePartonsAndHadronize()