CMS 3D CMS Logo

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

#include <JetConvergenceDistance.h>

Inheritance diagram for fftjetcms::JetConvergenceDistance:

Public Member Functions

 JetConvergenceDistance (double etaToPhiBandwidthRatio, double relativePtBandwidth)
 
double operator() (const fftjet::RecombinedJet< VectorLike > &jet1, const fftjet::RecombinedJet< VectorLike > &jet2) const override
 

Private Member Functions

 JetConvergenceDistance ()=delete
 

Private Attributes

double etaBw_
 
double phiBw_
 
double ptBw_
 

Detailed Description

Definition at line 10 of file JetConvergenceDistance.h.

Constructor & Destructor Documentation

◆ JetConvergenceDistance() [1/2]

fftjetcms::JetConvergenceDistance::JetConvergenceDistance ( double  etaToPhiBandwidthRatio,
double  relativePtBandwidth 
)

◆ JetConvergenceDistance() [2/2]

fftjetcms::JetConvergenceDistance::JetConvergenceDistance ( )
privatedelete

Member Function Documentation

◆ operator()()

double fftjetcms::JetConvergenceDistance::operator() ( const fftjet::RecombinedJet< VectorLike > &  jet1,
const fftjet::RecombinedJet< VectorLike > &  jet2 
) const
override

Definition at line 13 of file JetConvergenceDistance.cc.

14  {
15  const double deta = (j1.vec().Eta() - j2.vec().Eta()) / etaBw_;
16  double dphi = j1.vec().Phi() - j2.vec().Phi();
17  if (dphi > M_PI)
18  dphi -= (2.0 * M_PI);
19  else if (dphi < -M_PI)
20  dphi += (2.0 * M_PI);
21  dphi /= phiBw_;
22  const double mag1 = j1.magnitude();
23  const double mag2 = j2.magnitude();
24  double dmag = 0.0;
25  if (mag1 > 0.0 || mag2 > 0.0)
26  dmag = 2.0 * (mag1 - mag2) / (mag1 + mag2) / ptBw_;
27  return sqrt(deta * deta + dphi * dphi + dmag * dmag);
28  }

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

Member Data Documentation

◆ etaBw_

double fftjetcms::JetConvergenceDistance::etaBw_
private

Definition at line 21 of file JetConvergenceDistance.h.

Referenced by operator()().

◆ phiBw_

double fftjetcms::JetConvergenceDistance::phiBw_
private

Definition at line 22 of file JetConvergenceDistance.h.

Referenced by operator()().

◆ ptBw_

double fftjetcms::JetConvergenceDistance::ptBw_
private

Definition at line 23 of file JetConvergenceDistance.h.

Referenced by operator()().

fftjetcommon_cfi.relativePtBandwidth
relativePtBandwidth
Definition: fftjetcommon_cfi.py:223
fftjetcms::JetConvergenceDistance::ptBw_
double ptBw_
Definition: JetConvergenceDistance.h:23
cms::cuda::assert
assert(be >=bs)
fftjetcms::JetConvergenceDistance::phiBw_
double phiBw_
Definition: JetConvergenceDistance.h:22
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
mag2
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
Definition: Basic3DVectorLD.h:124
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
fftjetcms::JetConvergenceDistance::etaBw_
double etaBw_
Definition: JetConvergenceDistance.h:21
fftjetcommon_cfi.etaToPhiBandwidthRatio
etaToPhiBandwidthRatio
Definition: fftjetcommon_cfi.py:177