From e91e222ad6924dafb4e9efbdbbc68882d3f31200 Mon Sep 17 00:00:00 2001 From: Michail Date: Wed, 16 Sep 2015 14:50:23 +0200 Subject: [PATCH] Fixing the MET 0 bug --- .../PFClusterProducer/interface/PFRecHitQTests.h | 2 +- RecoParticleFlow/PFProducer/plugins/PFProducer.cc | 8 +++++--- RecoParticleFlow/PFProducer/plugins/PFProducer.h | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/RecoParticleFlow/PFClusterProducer/interface/PFRecHitQTests.h b/RecoParticleFlow/PFClusterProducer/interface/PFRecHitQTests.h index 2327385d4d757..aeff97a37e849 100644 --- a/RecoParticleFlow/PFClusterProducer/interface/PFRecHitQTests.h +++ b/RecoParticleFlow/PFClusterProducer/interface/PFRecHitQTests.h @@ -290,7 +290,7 @@ class PFRecHitQTestHCALThresholdVsDepth : public PFRecHitQTestBase { if (detid.depth() == depths_[i]) { if ( energysetPFMuonAndFakeParameters(iConfig); //Post cleaning of the HF - bool postHFCleaning + postHFCleaning_ = iConfig.getParameter("postHFCleaning"); double minHFCleaningPt = iConfig.getParameter("minHFCleaningPt"); @@ -368,7 +368,7 @@ PFProducer::PFProducer(const edm::ParameterSet& iConfig) { = iConfig.getParameter("minDeltaMet"); // Set post HF cleaning muon parameters - pfAlgo_->setPostHFCleaningParameters(postHFCleaning, + pfAlgo_->setPostHFCleaningParameters(postHFCleaning_, minHFCleaningPt, minSignificance, maxSignificance, @@ -617,7 +617,9 @@ PFProducer::produce(Event& iEvent, hfCopy.push_back( (*hfCleaned)[jhf] ); } } - pfAlgo_->checkCleaning( hfCopy ); + + if (postHFCleaning_) + pfAlgo_->checkCleaning( hfCopy ); // Save recovered HF candidates auto_ptr< reco::PFCandidateCollection > diff --git a/RecoParticleFlow/PFProducer/plugins/PFProducer.h b/RecoParticleFlow/PFProducer/plugins/PFProducer.h index cfc720013f550..99976e2cebabe 100644 --- a/RecoParticleFlow/PFProducer/plugins/PFProducer.h +++ b/RecoParticleFlow/PFProducer/plugins/PFProducer.h @@ -103,6 +103,8 @@ class PFProducer : public edm::stream::EDProducer<> { // Take PF cluster calibrations from Global Tag ? bool useCalibrationsFromDB_; + + bool postHFCleaning_; // Name of the calibration functions to read from the database // std::vector fToRead;