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
 

Private Member Functions

 JetConvergenceDistance ()
 

Private Attributes

double etaBw_
 
double phiBw_
 
double ptBw_
 

Detailed Description

Definition at line 10 of file JetConvergenceDistance.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Definition at line 18 of file JetConvergenceDistance.cc.

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

21  {
22  const double deta = (j1.vec().Eta() - j2.vec().Eta())/etaBw_;
23  double dphi = j1.vec().Phi() - j2.vec().Phi();
24  if (dphi > M_PI)
25  dphi -= (2.0*M_PI);
26  else if (dphi < -M_PI)
27  dphi += (2.0*M_PI);
28  dphi /= phiBw_;
29  const double mag1 = j1.magnitude();
30  const double mag2 = j2.magnitude();
31  double dmag = 0.0;
32  if (mag1 > 0.0 || mag2 > 0.0)
33  dmag = 2.0*(mag1 - mag2)/(mag1 + mag2)/ptBw_;
34  return sqrt(deta*deta + dphi*dphi + dmag*dmag);
35  }
T sqrt(T t)
Definition: SSEVec.h:18
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
#define M_PI

Member Data Documentation

double fftjetcms::JetConvergenceDistance::etaBw_
private

Definition at line 24 of file JetConvergenceDistance.h.

Referenced by operator()().

double fftjetcms::JetConvergenceDistance::phiBw_
private

Definition at line 25 of file JetConvergenceDistance.h.

Referenced by operator()().

double fftjetcms::JetConvergenceDistance::ptBw_
private

Definition at line 26 of file JetConvergenceDistance.h.

Referenced by operator()().