Skip to content

Commit

Permalink
Merge CMSSW_9_4_X into CMSSW_9_4_AN_X.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmsbuild committed Oct 1, 2018
2 parents 0a13740 + 0c429d7 commit 9967d3b
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions GeneratorInterface/RivetInterface/plugins/HTXSRivetProducer.cc
Expand Up @@ -6,7 +6,7 @@
*
*/

#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "FWCore/Framework/interface/one/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/Run.h"
Expand All @@ -28,7 +28,7 @@ using namespace Rivet;
using namespace edm;
using namespace std;

class HTXSRivetProducer : public edm::stream::EDProducer<> {
class HTXSRivetProducer : public edm::one::EDProducer<edm::one::WatchRuns> {
public:

explicit HTXSRivetProducer(const edm::ParameterSet& cfg) :
Expand All @@ -44,16 +44,14 @@ class HTXSRivetProducer : public edm::stream::EDProducer<> {
produces<HTXS::HiggsClassification>("HiggsClassification").setBranchAlias("HiggsClassification");

}
~HTXSRivetProducer() override;
~HTXSRivetProducer() ;

private:

void beginJob();
void produce( edm::Event&, const edm::EventSetup&) override;
void endJob();
void produce( edm::Event&, const edm::EventSetup&) ;

void beginRun(edm::Run const& iRun, edm::EventSetup const& es) override;
void endRun(edm::Run const& iRun, edm::EventSetup const& es) override;
void beginRun(edm::Run const& iRun, edm::EventSetup const& es) override ;
void endRun(edm::Run const& iRun, edm::EventSetup const& es) override ;

edm::EDGetTokenT<edm::HepMCProduct> _hepmcCollection;
edm::EDGetTokenT<LHERunInfoProduct> _lheRunInfo;
Expand All @@ -72,10 +70,6 @@ class HTXSRivetProducer : public edm::stream::EDProducer<> {
HTXSRivetProducer::~HTXSRivetProducer(){
}

void HTXSRivetProducer::beginJob(){
_analysisHandler.addAnalysis(_HTXS);
}

void HTXSRivetProducer::produce( edm::Event & iEvent, const edm::EventSetup & ) {

//get the hepmc product from the event
Expand Down Expand Up @@ -130,6 +124,8 @@ void HTXSRivetProducer::produce( edm::Event & iEvent, const edm::EventSetup & )

if (_isFirstEvent){

_analysisHandler.addAnalysis(_HTXS);

// set the production mode if not done already
if ( _prodMode == "GGF" ) m_HiggsProdMode = HTXS::GGF;
else if ( _prodMode == "VBF" ) m_HiggsProdMode = HTXS::VBF;
Expand All @@ -150,7 +146,7 @@ void HTXSRivetProducer::produce( edm::Event & iEvent, const edm::EventSetup & )

// at this point the production mode must be known
if (m_HiggsProdMode == HTXS::UNKNOWN) {
edm::LogInfo ("HTXSRivetProducer") << "HTXSRivetProducer WARNING: HiggsProduction mode is UNKNOWN" << endl;
edm::LogInfo ("HTXSRivetProducer") << "HTXSRivetProducer WARNING: HiggsProduction mode is UNKNOWN" << endl;
}

// initialize rivet analysis
Expand All @@ -169,12 +165,9 @@ void HTXSRivetProducer::produce( edm::Event & iEvent, const edm::EventSetup & )
}
}

void HTXSRivetProducer::endJob(){
_HTXS->printClassificationSummary();
}

void HTXSRivetProducer::endRun(edm::Run const& iRun, edm::EventSetup const& es)
{
_HTXS->printClassificationSummary();
}

void HTXSRivetProducer::beginRun(edm::Run const& iRun, edm::EventSetup const& es) {
Expand Down

0 comments on commit 9967d3b

Please sign in to comment.