Skip to content

Commit

Permalink
Update lheWeights config
Browse files Browse the repository at this point in the history
  • Loading branch information
kdlong committed Jan 20, 2020
1 parent 7daba24 commit 419a1cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 1 addition & 2 deletions GeneratorInterface/Core/plugins/GenWeightProductProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<GenWeightInfoProduct>();
for (auto& weightGroup : weightHelper_.weightGroups()) {
Expand Down
7 changes: 5 additions & 2 deletions PhysicsTools/NanoAOD/python/nanogen_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
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"))

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'
Expand All @@ -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",
Expand Down

0 comments on commit 419a1cd

Please sign in to comment.