Skip to content

Commit

Permalink
Move average calculations outside of jet constituents loop
Browse files Browse the repository at this point in the history
  • Loading branch information
nurfikri89 committed Jun 2, 2023
1 parent 8cc6f24 commit c4b3672
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions RecoJets/JetProducers/src/PileupJetIdAlgo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,10 @@ PileupJetIdentifier PileupJetIdAlgo::computeIdVariables(const reco::Jet* jet,
float dphi = reco::deltaPhi(*icand, *jet);
sum_deta += deta * weight2;
sum_dphi += dphi * weight2;
if (sumW2 > 0) {
ave_deta = sum_deta / sumW2;
ave_dphi = sum_dphi / sumW2;
}
}
if (sumW2 > 0) {
ave_deta = sum_deta / sumW2;
ave_dphi = sum_dphi / sumW2;
}

// // Finalize all variables
Expand Down

0 comments on commit c4b3672

Please sign in to comment.