From a2b43805114b4bd01cf11f139f2d254ade7960b1 Mon Sep 17 00:00:00 2001 From: UAEDF-tomc Date: Mon, 5 May 2014 16:05:07 +0200 Subject: [PATCH] Make use of reco::deltaPhi --- RecoJets/JetProducers/plugins/QGTagger.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RecoJets/JetProducers/plugins/QGTagger.cc b/RecoJets/JetProducers/plugins/QGTagger.cc index 0285e8d2adb07..49f55b464d046 100644 --- a/RecoJets/JetProducers/plugins/QGTagger.cc +++ b/RecoJets/JetProducers/plugins/QGTagger.cc @@ -14,6 +14,7 @@ #include "DataFormats/JetReco/interface/PFJetCollection.h" #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" #include "DataFormats/Common/interface/ValueMap.h" +#include "DataFormats/Math/interface/deltaPhi.h" #include "RecoJets/JetProducers/interface/QGTagger.h" #include "RecoJets/JetAlgorithms/interface/QGLikelihoodCalculator.h" @@ -160,7 +161,7 @@ template void QGTagger::calcVariables(const jetClass *jet, edm: if(usePart){ float deta = part->eta() - jet->eta(); - float dphi = 2*atan(tan(((part->phi()-jet->phi()))/2)); + float dphi = reco::deltaPhi(part->phi(), jet->phi()); float partPt = part->pt(); float weight = partPt*partPt;