CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Static Public Member Functions
JetUtil Class Reference

#include <JetUtil.h>

Static Public Member Functions

static double dPhi (double phi1, double phi2)
 
static double Phi_0_2pi (double x)
 
static double Phi_mpi_pi (double x)
 
static double radius (double eta1, double phi1, double eta2, double phi2)
 
template<typename T1 , typename T2 >
static double radius (const T1 &t1, const T2 &t2)
 

Detailed Description

Definition at line 20 of file JetUtil.h.

Member Function Documentation

static double JetUtil::dPhi ( double  phi1,
double  phi2 
)
inlinestatic

Definition at line 35 of file JetUtil.h.

References Phi_0_2pi(), and Phi_mpi_pi().

35  {
36  phi1=Phi_0_2pi(phi1);
37  phi2=Phi_0_2pi(phi2);
38  return Phi_mpi_pi(phi1-phi2);
39 }
static double Phi_mpi_pi(double x)
Definition: JetUtil.h:29
static double Phi_0_2pi(double x)
Definition: JetUtil.h:23
static double JetUtil::Phi_0_2pi ( double  x)
inlinestatic

Definition at line 23 of file JetUtil.h.

References M_PI, and vdt::x.

Referenced by dPhi(), and radius().

23  {
24  while (x >= 2*M_PI) x -= 2*M_PI;
25  while (x < 0.) x += 2*M_PI;
26  return x;
27 }
#define M_PI
Definition: BFit3D.cc:3
x
Definition: VDTMath.h:216
static double JetUtil::Phi_mpi_pi ( double  x)
inlinestatic

Definition at line 29 of file JetUtil.h.

References M_PI, and vdt::x.

Referenced by dPhi().

29  {
30  while (x >= M_PI) x -= 2*M_PI;
31  while (x < -M_PI) x += 2*M_PI;
32  return x;
33 }
#define M_PI
Definition: BFit3D.cc:3
x
Definition: VDTMath.h:216
static double JetUtil::radius ( double  eta1,
double  phi1,
double  eta2,
double  phi2 
)
inlinestatic

Definition at line 41 of file JetUtil.h.

References M_PI, siStripFEDMonitor_P5_cff::Min, Phi_0_2pi(), mathSSE::sqrt(), and TWOPI.

Referenced by radius().

41  {
42 
43  const double TWOPI= 2.0*M_PI;
44 
45  phi1=Phi_0_2pi(phi1);
46  phi2=Phi_0_2pi(phi2);
47 
48  double dphi=Phi_0_2pi(phi1-phi2);
49  dphi = TMath::Min(dphi,TWOPI-dphi);
50  double deta = eta1-eta2;
51 
52  return sqrt(deta*deta+dphi*dphi);
53 }
#define TWOPI
EgammaCoreTools.
T sqrt(T t)
Definition: SSEVec.h:46
#define M_PI
Definition: BFit3D.cc:3
static double Phi_0_2pi(double x)
Definition: JetUtil.h:23
template<typename T1 , typename T2 >
static double JetUtil::radius ( const T1 &  t1,
const T2 &  t2 
)
inlinestatic

Definition at line 55 of file JetUtil.h.

References radius().

55  {
56  return radius(t1->eta(),t1->phi(),t2->eta(),t2->phi());
57 }
static double radius(double eta1, double phi1, double eta2, double phi2)
Definition: JetUtil.h:41