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::InRun>();
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)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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
std::unique_ptr< std::ifstream > reader
unsigned int skipEvents
Number of events to skip.
void put(std::auto_ptr< PROD > product)
Put a new product.
volatile std::atomic< bool > shutdown_flag false
void mcatnloupevnt_(int *, int *, int *)
static void readHEPEUP(HEPEUP *hepeup)
virtual void beginRun(edm::Run &run)
static HepMC::HEPEVT_Wrapper wrapper