Skip to content

Commit

Permalink
Correct name of shower weights so they're stored
Browse files Browse the repository at this point in the history
  • Loading branch information
kdlong committed Jan 11, 2020
1 parent 8fcc230 commit 3dbdd4c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ GenWeightProductProducer::beginLuminosityBlockProduce(edm::LuminosityBlock& iLum
iLumi.getByToken(genLumiInfoToken_, genLumiInfoHandle);

weightNames_ = genLumiInfoHandle->weightNames();

weightHelper_.parseWeightGroupsFromNames(weightNames_);
}
auto weightInfoProduct = std::make_unique<GenWeightInfoProduct>();
Expand Down
3 changes: 1 addition & 2 deletions PhysicsTools/NanoAOD/plugins/LHEWeightsTableProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class LHEWeightsTableProducer : public edm::global::EDProducer<edm::LuminosityBl
size_t typeCount = 0;
gen::WeightType previousType = gen::WeightType::kUnknownWeights;

size_t index = 0;
for (const auto& groupInfo : weightInfos) {
std::string entryName = typeName;
gen::WeightType weightType = groupInfo.group->weightType();
Expand Down Expand Up @@ -141,7 +140,7 @@ class LHEWeightsTableProducer : public edm::global::EDProducer<edm::LuminosityBl

group = weightsHandle->weightGroupsAndIndicesByType(weightType);

if (maxStore < 0 || static_cast<int>(group.size()) < maxStore) {
if (maxStore < 0 || static_cast<int>(group.size()) <= maxStore) {
// Modify size in case one type of weight is present in multiple products
maxStore -= group.size();
return group;
Expand Down
2 changes: 1 addition & 1 deletion PhysicsTools/NanoAOD/python/nanogen_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# 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'
# must be lower case and 'PDF' must be capital
weightgroups = cms.vstring(['scale', 'PDF', 'matrix element', 'unknown', 'shower']),
weightgroups = cms.vstring(['scale', 'PDF', 'matrix element', 'unknown', 'parton shower']),
maxGroupsPerType = cms.vint32([1, -1, 1, 2, 1]),
pdfIds = cms.vint32([91400, 306000, 260000]),
lheWeightPrecision = cms.int32(14),
Expand Down

0 comments on commit 3dbdd4c

Please sign in to comment.