10 #include "Rivet/AnalysisHandler.hh"
11 #include "Rivet/Analysis.hh"
19 using namespace Rivet;
25 _outFileName(pset.getParameter<std::string>(
"OutputFile"))
28 std::vector<std::string> analysisNames = pset.
getParameter<std::vector<std::string> >(
"AnalysisNames");
36 const std::set< AnaHandle, AnaHandleLess > & analyses =
_analysisHandler.analyses();
38 std::set< AnaHandle, AnaHandleLess >::const_iterator ibeg = analyses.begin();
39 std::set< AnaHandle, AnaHandleLess >::const_iterator iend = analyses.end();
40 std::set< AnaHandle, AnaHandleLess >::const_iterator iana;
41 double xsection = -1.;
43 for (iana = ibeg; iana != iend; ++iana){
44 if ((*iana)->needsCrossSection())
45 (*iana)->setCrossSection(xsection);
54 char * cmsswbase = getenv(
"CMSSW_BASE");
55 char * cmsswrelease = getenv(
"CMSSW_RELEASE_BASE");
56 std::string rivetref, rivetinfo;
57 rivetref =
"RIVET_REF_PATH=" + string(cmsswbase) +
"/src/GeneratorInterface/RivetInterface/data:" + string(cmsswrelease) +
"/src/GeneratorInterface/RivetInterface/data";
58 rivetinfo =
"RIVET_INFO_PATH=" + string(cmsswbase) +
"/src/GeneratorInterface/RivetInterface/data:" + string(cmsswrelease) +
"/src/GeneratorInterface/RivetInterface/data";
59 putenv(strdup(rivetref.c_str()));
60 putenv(strdup(rivetinfo.c_str()));
74 const HepMC::GenEvent *myGenEvent = evt->GetEvent();
T getParameter(std::string const &) const
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
virtual void endRun(const edm::Run &, const edm::EventSetup &)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
edm::InputTag _hepmcCollection
Rivet::AnalysisHandler _analysisHandler
RivetAnalyzer(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const