Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MTD Validation: add protection against infinite weight in simpvz histogram #39490

Merged
merged 2 commits into from
Sep 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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