CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

fftjetcms::JetConvergenceDistance Class Reference

#include <JetConvergenceDistance.h>

List of all members.

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 
)

Definition at line 7 of file JetConvergenceDistance.cc.

        : etaBw_(sqrt(etaToPhiBandwidthRatio)),
          phiBw_(1.0/etaBw_),
          ptBw_(relativePtBandwidth)
    {
        assert(etaToPhiBandwidthRatio > 0.0);
        assert(relativePtBandwidth > 0.0);
    }
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().

    {
        const double deta = (j1.vec().Eta() - j2.vec().Eta())/etaBw_;
        double dphi = j1.vec().Phi() - j2.vec().Phi();
        if (dphi > M_PI)
            dphi -= (2.0*M_PI);
        else if (dphi < -M_PI)
            dphi += (2.0*M_PI);
        dphi /= phiBw_;
        const double mag1 = j1.magnitude();
        const double mag2 = j2.magnitude();
        double dmag = 0.0;
        if (mag1 > 0.0 || mag2 > 0.0)
            dmag = 2.0*(mag1 - mag2)/(mag1 + mag2)/ptBw_;
        return sqrt(deta*deta + dphi*dphi + dmag*dmag);
    }

Member Data Documentation

Definition at line 24 of file JetConvergenceDistance.h.

Referenced by operator()().

Definition at line 25 of file JetConvergenceDistance.h.

Referenced by operator()().

Definition at line 26 of file JetConvergenceDistance.h.

Referenced by operator()().