39 : ProducerSourceFromFiles(params, desc,
false),
40 gen::Herwig6Instance(),
41 skipEvents(params.getUntrackedParameter<unsigned int>(
"skipEvents", 0)),
44 processCode(params.getParameter<int>(
"processCode")) {
45 std::vector<std::string> allFileNames =
fileNames(0);
48 if (allFileNames.size() != 1)
50 <<
"MCatNLOSource needs exactly one file specified. " << std::endl;
56 throw cms::Exception(
"Generator|MCatNLOInterface") <<
"MCatNLOSource only supports the file: scheme. " << std::endl;
62 produces<LHEEventProduct>();
63 produces<LHERunInfoProduct, edm::Transition::BeginRun>();
74 std::ostringstream
ss;
75 ss << var <<
" = " << value <<
"\n";
81 std::ostringstream
ss;
82 ss << var <<
"(" << index <<
") = " << value <<
"\n";
98 heprup.PDFGUP.first = 0;
99 heprup.PDFGUP.second = 0;
105 hw6header.
addLine(
"# Herwig6 parameters\n");
118 for (
unsigned int i = 0;
i < 1000; ++
i) {
129 double wgtmax_ = 1.000001;
135 runInfo->addHeader(hw6header);
145 int lastEventDone = 0;
bool hwwarn(const std::string &fn, int code) override
~MCatNLOSource() override
static std::string makeConfigLine(const char *var, T value)
void mcatnloupinit_(int *, const char *, int)
std::shared_ptr< lhef::LHERunInfo > runInfo
void produce(edm::Event &event) override
static void readHEPRUP(HEPRUP *heprup)
Abs< T >::type abs(const T &t)
MCatNLOSource(const edm::ParameterSet ¶ms, const edm::InputSourceDescription &desc)
unsigned long long TimeValue_t
void beginRun(edm::Run &run) override
std::string fileName
Name of the input file.
void put(std::unique_ptr< PROD > product)
Put a new product.
std::unique_ptr< std::ifstream > reader
unsigned int skipEvents
Number of events to skip.
bool setRunAndEventInfo(edm::EventID &, edm::TimeValue_t &, edm::EventAuxiliary::ExperimentType &) override
void mcatnloupevnt_(int *, int *, int *)
static void readHEPEUP(HEPEUP *hepeup)
static HepMC::HEPEVT_Wrapper wrapper
std::vector< std::string > fileNames(unsigned iCatalog) const