Skip to content

Commit

Permalink
Merge pull request #34436 from colizz/dev-120X-fixModuleNameAsExterna…
Browse files Browse the repository at this point in the history
…lGenFilter

Use the original GEN module name for ExternalGeneratorFilter in recognizing generator types
  • Loading branch information
cmsbuild authored Jul 16, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 6141238 + 4c45163 commit fdf2a2f
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PhysicsTools/JetMCAlgos/plugins/HadronAndPartonSelector.cc
Original file line number Diff line number Diff line change
@@ -142,6 +142,11 @@ void HadronAndPartonSelector::produce(edm::Event& iEvent, const edm::EventSetup&
if (genEvtInfoProduct.isValid()) {
const edm::StableProvenance& prov = iEvent.getStableProvenance(genEvtInfoProduct.id());
moduleName = edm::moduleName(prov, iEvent.processHistory());
if (moduleName == "ExternalGeneratorFilter") {
moduleName = edm::parameterSet(prov, iEvent.processHistory()).getParameter<std::string>("@external_type");
edm::LogInfo("SpecialModule") << "GEN events are produced by ExternalGeneratorFilter, "
<< "which is a wrapper of the original module: " << moduleName;
}
}

if (moduleName.find("Pythia6") != std::string::npos)
5 changes: 5 additions & 0 deletions TopQuarkAnalysis/TopEventProducers/src/TopDecaySubset.cc
Original file line number Diff line number Diff line change
@@ -247,6 +247,11 @@ TopDecaySubset::ShowerModel TopDecaySubset::checkShowerModel(edm::Event& event)
if (genEvtInfoProduct.isValid()) {
const edm::StableProvenance& prov = event.getStableProvenance(genEvtInfoProduct.id());
moduleName = edm::moduleName(prov, event.processHistory());
if (moduleName == "ExternalGeneratorFilter") {
moduleName = edm::parameterSet(prov, event.processHistory()).getParameter<std::string>("@external_type");
edm::LogInfo("SpecialModule") << "GEN events are produced by ExternalGeneratorFilter, "
<< "which is a wrapper of the original module: " << moduleName;
}
}

ShowerModel shower(kStart);

0 comments on commit fdf2a2f

Please sign in to comment.