CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
fftjetcms::JetToPeakDistance Class Reference

#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_
 

Detailed Description

Definition at line 9 of file JetToPeakDistance.h.

Constructor & Destructor Documentation

◆ JetToPeakDistance()

fftjetcms::JetToPeakDistance::JetToPeakDistance ( double  etaToPhiBandwidthRatio = 1.0)
explicit

Member Function Documentation

◆ operator()()

double fftjetcms::JetToPeakDistance::operator() ( const fftjet::RecombinedJet< VectorLike > &  jet,
const fftjet::Peak &  peak 
) const

Definition at line 12 of file JetToPeakDistance.cc.

12  {
13  if (peak.membershipFactor() <= 0.0)
14  // This peak essentially does not exist...
15  return 2.0e300;
16 
17  const double deta = (j1.vec().Eta() - peak.eta()) / etaBw_;
18  double dphi = j1.vec().Phi() - peak.phi();
19  if (dphi > M_PI)
20  dphi -= (2.0 * M_PI);
21  else if (dphi < -M_PI)
22  dphi += (2.0 * M_PI);
23  dphi /= phiBw_;
24  return sqrt(deta * deta + dphi * dphi);
25  }

References etaBw_, M_PI, phiBw_, and mathSSE::sqrt().

Member Data Documentation

◆ etaBw_

double fftjetcms::JetToPeakDistance::etaBw_
private

Definition at line 16 of file JetToPeakDistance.h.

Referenced by operator()().

◆ phiBw_

double fftjetcms::JetToPeakDistance::phiBw_
private

Definition at line 17 of file JetToPeakDistance.h.

Referenced by operator()().

cms::cuda::assert
assert(be >=bs)
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
fftjetcms::JetToPeakDistance::etaBw_
double etaBw_
Definition: JetToPeakDistance.h:16
fftjetcommon_cfi.etaToPhiBandwidthRatio
etaToPhiBandwidthRatio
Definition: fftjetcommon_cfi.py:177
fftjetcms::JetToPeakDistance::phiBw_
double phiBw_
Definition: JetToPeakDistance.h:17