Skip to content

Commit

Permalink
PFProducer fix for PFMuonAlgo fillPSetDescription
Browse files Browse the repository at this point in the history
  • Loading branch information
hatakeyamak committed Jul 27, 2020
1 parent 92997c6 commit 4826119
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions RecoParticleFlow/PFProducer/plugins/PFProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,27 @@ PFProducer::PFProducer(const edm::ParameterSet& iConfig)

// Reading new EGamma selection cuts
bool useProtectionsForJetMET(false);

// Reading new EGamma ubiased collections and value maps
if (use_EGammaFilters_) {

inputTagPFEGammaCandidates_ =
consumes<edm::View<reco::PFCandidate>>((iConfig.getParameter<edm::InputTag>("PFEGammaCandidates")));
inputTagValueMapGedElectrons_ =
consumes<edm::ValueMap<reco::GsfElectronRef>>(iConfig.getParameter<edm::InputTag>("GedElectronValueMap"));
inputTagValueMapGedPhotons_ =
consumes<edm::ValueMap<reco::PhotonRef>>(iConfig.getParameter<edm::InputTag>("GedPhotonValueMap"));
useProtectionsForJetMET = iConfig.getParameter<bool>("useProtectionsForJetMET");

const edm::ParameterSet pfEGammaFiltersParams =
iConfig.getParameter<edm::ParameterSet>("PFEGammaFiltersParameters");
pfegamma_ = std::make_unique<PFEGammaFilters>(pfEGammaFiltersParams);

}

// EGamma filters
pfAlgo_.setEGammaParameters(use_EGammaFilters_, useProtectionsForJetMET);

//Secondary tracks and displaced vertices parameters

bool rejectTracks_Bad = iConfig.getParameter<bool>("rejectTracks_Bad");
Expand All @@ -174,15 +184,6 @@ PFProducer::PFProducer(const edm::ParameterSet& iConfig)
if (useCalibrationsFromDB_)
calibrationsLabel_ = iConfig.getParameter<std::string>("calibrationsLabel");

// EGamma filters
pfAlgo_.setEGammaParameters(use_EGammaFilters_, useProtectionsForJetMET);

if (use_EGammaFilters_) {
const edm::ParameterSet pfEGammaFiltersParams =
iConfig.getParameter<edm::ParameterSet>("PFEGammaFiltersParameters");
pfegamma_ = std::make_unique<PFEGammaFilters>(pfEGammaFiltersParams);
}

// Secondary tracks and displaced vertices parameters
pfAlgo_.setDisplacedVerticesParameters(
rejectTracks_Bad, rejectTracks_Step45, usePFNuclearInteractions, usePFConversions, usePFDecays, dptRel_DispVtx);
Expand Down Expand Up @@ -349,7 +350,7 @@ void PFProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions)

// For PFMuonAlgo
edm::ParameterSetDescription psd_PFMuonAlgo;
PFEGammaFilters::fillPSetDescription(psd_PFMuonAlgo);
PFMuonAlgo::fillPSetDescription(psd_PFMuonAlgo);
desc.add<edm::ParameterSetDescription>("PFMuonAlgoParameters", psd_PFMuonAlgo);

// Input displaced vertices
Expand Down

0 comments on commit 4826119

Please sign in to comment.