Skip to content

Commit

Permalink
use edm::isNotFinite
Browse files Browse the repository at this point in the history
  • Loading branch information
arizzi committed Jun 22, 2016
1 parent 7c4689a commit 365c976
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CommonTools/RecoAlgos/src/PrimaryVertexSorting.cc
Expand Up @@ -9,6 +9,7 @@
#include "fastjet/ClusterSequence.hh"
#include "fastjet/Selector.hh"
#include "fastjet/PseudoJet.hh"
#include "FWCore/Utilities/interface/isFinite.h"

using namespace fastjet;
using namespace std;
Expand All @@ -30,7 +31,7 @@ float PrimaryVertexSorting::score(const reco::Vertex & pv,const std::vector<con
if(c->pt()!=0) {
scale=(c->pt()-c->bestTrack()->ptError())/c->pt();
}
if(isnan(scale)) {
if(edm::isNotFinite(scale)) {
edm::LogWarning("PrimaryVertexSorting") << "Scaling is NAN ignoring this candidate/track" << std::endl;
scale=0;
}
Expand Down

0 comments on commit 365c976

Please sign in to comment.