Skip to content

Commit

Permalink
Cleanup redundant edm ParameterSet exist in RecoLuminosity
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongeun committed Jun 3, 2022
1 parent 9c0c506 commit 1da1a78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
11 changes: 3 additions & 8 deletions RecoLuminosity/LumiProducer/plugins/BunchSpacingProducer.cc
Expand Up @@ -39,13 +39,8 @@ BunchSpacingProducer::BunchSpacingProducer::BunchSpacingProducer(const edm::Para
// register your products
produces<unsigned int>();
bunchSpacing_ = consumes<int>(edm::InputTag("addPileupInfo", "bunchSpacing"));
overRide_ = false;
if (iConfig.exists("overrideBunchSpacing")) {
overRide_ = iConfig.getParameter<bool>("overrideBunchSpacing");
if (overRide_) {
bunchSpacingOverride_ = iConfig.getParameter<unsigned int>("bunchSpacingOverride");
}
}
overRide_ = iConfig.getParameter<bool>("overrideBunchSpacing");
bunchSpacingOverride_ = iConfig.getParameter<unsigned int>("bunchSpacingOverride");
}

BunchSpacingProducer::~BunchSpacingProducer() {}
Expand Down Expand Up @@ -82,7 +77,7 @@ void BunchSpacingProducer::fillDescriptions(edm::ConfigurationDescriptions& desc
desc.add<bool>("overrideBunchSpacing", false); // true for prompt reco
desc.add<unsigned int>("bunchSpacingOverride", 25); // override value

descriptions.add("bunchSpacingProducer", desc);
descriptions.add("BunchSpacingProducer", desc);
}

#include "FWCore/Framework/interface/MakerMacros.h"
Expand Down
@@ -1,6 +1,9 @@
import FWCore.ParameterSet.Config as cms
bunchSpacingProducer = cms.EDProducer("BunchSpacingProducer")

import RecoLuminosity.LumiProducer.BunchSpacingProducer_cfi as _mod

bunchSpacingProducer = _mod.BunchSpacingProducer.clone()

from Configuration.Eras.Modifier_run2_50ns_specific_cff import run2_50ns_specific
run2_50ns_specific.toModify( bunchSpacingProducer, bunchSpacingOverride = cms.uint32(50))
run2_50ns_specific.toModify( bunchSpacingProducer, overrideBunchSpacing = cms.bool(True))
run2_50ns_specific.toModify( bunchSpacingProducer, bunchSpacingOverride = 50)
run2_50ns_specific.toModify( bunchSpacingProducer, overrideBunchSpacing = True)

0 comments on commit 1da1a78

Please sign in to comment.