Skip to content

Commit

Permalink
Merge pull request #38046 from defranchis/backport_PSweights
Browse files Browse the repository at this point in the history
Adding sum of PS weights (backport)
  • Loading branch information
cmsbuild authored May 24, 2022
2 parents 0e65cbe + 5fb6860 commit 3d2a0f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PhysicsTools/NanoAOD/plugins/GenWeightsTableProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,13 @@ class GenWeightsTableProducer : public edm::global::EDProducer<edm::StreamCache<
"Sum of genEventWeight * LHEPdfWeight[i], divided by genEventSumw" + doclabel,
sumPDFs,
runCounter->sumw);
auto sumPS = runCounter->sumPS;
for (auto& val : sumPS)
val *= norm;
out->addVFloatWithNorm("PSSumw" + label,
"Sum of genEventWeight * PSWeight[i], divided by genEventSumw" + doclabel,
sumPS,
runCounter->sumw);
if (!runCounter->sumRwgt.empty()) {
auto sumRwgts = runCounter->sumRwgt;
for (auto& val : sumRwgts)
Expand Down

0 comments on commit 3d2a0f9

Please sign in to comment.