diff --git a/GeneratorInterface/Core/plugins/GenWeightProductProducer.cc b/GeneratorInterface/Core/plugins/GenWeightProductProducer.cc index e8d18a93e5878..98075bedd6a3b 100644 --- a/GeneratorInterface/Core/plugins/GenWeightProductProducer.cc +++ b/GeneratorInterface/Core/plugins/GenWeightProductProducer.cc @@ -85,8 +85,7 @@ GenWeightProductProducer::beginLuminosityBlockProduce(edm::LuminosityBlock& iLum iLumi.getByToken(genLumiInfoToken_, genLumiInfoHandle); weightNames_ = genLumiInfoHandle->weightNames(); - - weightHelper_.parseWeightGroupsFromNames(weightNames_); + weightHelper_.parseWeightGroupsFromNames(weightNames_); } auto weightInfoProduct = std::make_unique(); for (auto& weightGroup : weightHelper_.weightGroups()) { diff --git a/PhysicsTools/NanoAOD/python/nanogen_cff.py b/PhysicsTools/NanoAOD/python/nanogen_cff.py index 8fba40c06dfb1..96ebd22e0b5f7 100644 --- a/PhysicsTools/NanoAOD/python/nanogen_cff.py +++ b/PhysicsTools/NanoAOD/python/nanogen_cff.py @@ -7,7 +7,8 @@ from PhysicsTools.NanoAOD.genWeightsTable_cfi import * genWeights = cms.EDProducer("GenWeightProductProducer", - genInfo = cms.InputTag("generator")) + genInfo = cms.InputTag("generator"), + genLumiInfoHeader = cms.InputTag("generator")) lheWeights = cms.EDProducer("LHEWeightProductProducer", lheSourceLabel = cms.string("externalLHEProducer")) @@ -15,6 +16,7 @@ lheWeightsTable = cms.EDProducer( "LHEWeightsTableProducer", lheWeights = cms.VInputTag(["externalLHEProducer", "lheWeights"]), + lheWeightPrecision = cms.int32(14), genWeights = cms.InputTag("genWeights"), # Warning: you can use a full string, but only the first character is read. # Note also that the capitalization is important! For example, 'parton shower' @@ -24,7 +26,8 @@ maxGroupsPerType = cms.vint32([1, -1, 1, 2, 1]), # If empty or not specified, no critieria is applied to filter on LHAPDF IDs pdfIds = cms.untracked.vint32([91400, 306000, 260000]), - lheWeightPrecision = cms.int32(14), + unknownOnlyIfEmpty = cms.untracked.vstring(['scale', 'PDF']), + unknownOnlyIfAllEmpty = cms.untracked.bool(False), ) nanoMetadata = cms.EDProducer("UniqueStringProducer",