8 #include <boost/bind.hpp> 42 ProducerSourceFromFiles(params, desc,
false),
43 gen::Herwig6Instance(),
44 skipEvents(params.getUntrackedParameter<unsigned
int>(
"skipEvents", 0)),
47 processCode(params.getParameter<
int>(
"processCode"))
49 std::vector<std::string> allFileNames =
fileNames();
52 if (allFileNames.size() != 1)
54 <<
"MCatNLOSource needs exactly one file specified. " <<std::endl;
60 throw cms::Exception(
"Generator|MCatNLOInterface") <<
"MCatNLOSource only supports the file: scheme. "<<std::endl;
66 produces<LHEEventProduct>();
67 produces<LHERunInfoProduct, edm::Transition::BeginRun>();
87 std::ostringstream ss;
88 ss << var <<
" = " << value <<
"\n";
95 std::ostringstream ss;
96 ss << var <<
"(" << index <<
") = " << value <<
"\n";
113 heprup.PDFGUP.first = 0;
114 heprup.PDFGUP.second = 0;
120 hw6header.
addLine(
"# Herwig6 parameters\n");
133 for(
unsigned int i=0;
i<1000; ++
i) {
144 double wgtmax_=1.000001;
151 runInfo->addHeader(hw6header);
169 if(lastEventDone)
return false;
175 if(lastEventDone)
return false;
virtual void produce(edm::Event &event)
static std::string makeConfigLine(const char *var, T value)
void mcatnloupinit_(int *, const char *, int)
std::vector< std::string > const & fileNames() const
static void readHEPRUP(HEPRUP *heprup)
virtual bool setRunAndEventInfo(edm::EventID &, edm::TimeValue_t &, edm::EventAuxiliary::ExperimentType &)
Abs< T >::type abs(const T &t)
MCatNLOSource(const edm::ParameterSet ¶ms, const edm::InputSourceDescription &desc)
unsigned long long TimeValue_t
virtual bool hwwarn(const std::string &fn, int code)
std::string fileName
Name of the input file.
boost::shared_ptr< lhef::LHERunInfo > runInfo
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.
void mcatnloupevnt_(int *, int *, int *)
static void readHEPEUP(HEPEUP *hepeup)
virtual void beginRun(edm::Run &run)
static HepMC::HEPEVT_Wrapper wrapper