diff --git a/RecoParticleFlow/PFClusterProducer/plugins/LocalMaximumSeedFinder.cc b/RecoParticleFlow/PFClusterProducer/plugins/LocalMaximumSeedFinder.cc index cc18f2b032ee0..894cf771bb4e0 100644 --- a/RecoParticleFlow/PFClusterProducer/plugins/LocalMaximumSeedFinder.cc +++ b/RecoParticleFlow/PFClusterProducer/plugins/LocalMaximumSeedFinder.cc @@ -3,6 +3,7 @@ #include #include #include +#include "DataFormats/Math/interface/deltaPhi.h" #include "CommonTools/Utils/interface/DynArray.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" @@ -155,8 +156,8 @@ void LocalMaximumSeedFinder::findSeeds(const edm::Handle dphicut) && - (abs(maybeseed.positionREP().eta() - nei.positionREP().eta()) > detacut)) + if (std::abs(deltaPhi(maybeseed.positionREP().phi(), nei.positionREP().phi())) > dphicut && + std::abs(maybeseed.positionREP().eta() - nei.positionREP().eta()) > detacut) continue; // masking is done only if the neighbor is on the swiss-cross w.r.t. the seed break; } diff --git a/RecoParticleFlow/PFClusterProducer/plugins/LocalMaximumSeedFinder.h b/RecoParticleFlow/PFClusterProducer/plugins/LocalMaximumSeedFinder.h index 8847d5f75dd87..e2fa5124b6543 100644 --- a/RecoParticleFlow/PFClusterProducer/plugins/LocalMaximumSeedFinder.h +++ b/RecoParticleFlow/PFClusterProducer/plugins/LocalMaximumSeedFinder.h @@ -1,7 +1,6 @@ #ifndef __LocalMaximumSeedFinder_H__ #define __LocalMaximumSeedFinder_H__ -#include "DataFormats/Math/interface/deltaPhi.h" #include "RecoParticleFlow/PFClusterProducer/interface/SeedFinderBase.h" #include