#include <JetToPeakDistance.h>
Public Member Functions | |
JetToPeakDistance (double etaToPhiBandwidthRatio=1.0) | |
double | operator() (const fftjet::RecombinedJet< VectorLike > &jet, const fftjet::Peak &peak) const |
Private Attributes | |
double | etaBw_ |
double | phiBw_ |
Definition at line 9 of file JetToPeakDistance.h.
fftjetcms::JetToPeakDistance::JetToPeakDistance | ( | double | etaToPhiBandwidthRatio = 1.0 | ) | [explicit] |
double fftjetcms::JetToPeakDistance::operator() | ( | const fftjet::RecombinedJet< VectorLike > & | jet, |
const fftjet::Peak & | peak | ||
) | const |
Definition at line 14 of file JetToPeakDistance.cc.
References etaBw_, M_PI, phiBw_, and mathSSE::sqrt().
{ if (peak.membershipFactor() <= 0.0) // This peak essentially does not exist... return 2.0e300; const double deta = (j1.vec().Eta() - peak.eta())/etaBw_; double dphi = j1.vec().Phi() - peak.phi(); if (dphi > M_PI) dphi -= (2.0*M_PI); else if (dphi < -M_PI) dphi += (2.0*M_PI); dphi /= phiBw_; return sqrt(deta*deta + dphi*dphi); }
double fftjetcms::JetToPeakDistance::etaBw_ [private] |
Definition at line 17 of file JetToPeakDistance.h.
Referenced by operator()().
double fftjetcms::JetToPeakDistance::phiBw_ [private] |
Definition at line 18 of file JetToPeakDistance.h.
Referenced by operator()().