Skip to content

Commit

Permalink
Merge pull request #39490 from fabiocos/fc-fixinfinvalid
Browse files Browse the repository at this point in the history
MTD Validation: add protection against infinite weight in simpvz histogram
  • Loading branch information
cmsbuild authored Sep 27, 2022
2 parents 4561e8f + 431ff5e commit 6a9df97
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Validation/MtdValidation/plugins/Primary4DVertexValidation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,10 @@ void Primary4DVertexValidation::analyze(const edm::Event& iEvent, const edm::Eve

//fill vertices histograms here in a new loop
for (unsigned int is = 0; is < simpv.size(); is++) {
// protect against particle guns with very displaced vertices
if (std::isinf(1. / puLineDensity(simpv.at(is).z))) {
continue;
}
meSimPVZ_->Fill(simpv.at(is).z, 1. / puLineDensity(simpv.at(is).z));
if (is == 0 && optionalPlots_) {
meSimPosInSimOrigCollection_->Fill(simpv.at(is).OriginalIndex);
Expand Down

0 comments on commit 6a9df97

Please sign in to comment.