Skip to content

Commit

Permalink
Make use of reco::deltaPhi
Browse files Browse the repository at this point in the history
  • Loading branch information
UAEDF-tomc committed May 5, 2014
1 parent 6ab50c1 commit a2b4380
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion RecoJets/JetProducers/plugins/QGTagger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -160,7 +161,7 @@ template <class jetClass> 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;

Expand Down

0 comments on commit a2b4380

Please sign in to comment.