CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Typedefs | Functions
HypDilepMaker.cc File Reference
#include "DataFormats/JetReco/interface/CaloJet.h"
#include "DQM/PhysicsHWW/interface/HypDilepMaker.h"

Go to the source code of this file.

Typedefs

typedef math::XYZTLorentzVectorF LorentzVector
 

Functions

bool testJetForLeptons (const LorentzVector &jetP4, const LorentzVector &lepp4)
 

Typedef Documentation

Definition at line 5 of file HypDilepMaker.cc.

Function Documentation

bool testJetForLeptons ( const LorentzVector jetP4,
const LorentzVector lepp4 
)

Definition at line 10 of file HypDilepMaker.cc.

References PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, Pi, and mathSSE::sqrt().

Referenced by HypDilepMaker::SetVars().

10  {
11 
12 
13  bool matched = false;
14  float lepphi = lepp4.Phi();
15  float jetphi = jetP4.Phi();
16 
17  float lepeta = lepp4.Eta();
18  float jeteta = jetP4.Eta();
19 
20  float dphi = lepphi - jetphi;
21  float deta = lepeta - jeteta;
22  if(fabs(dphi) > TMath::Pi() ) dphi = 2*TMath::Pi() - fabs(dphi);
23 
24  double dR = sqrt(dphi*dphi + deta*deta);
25  if (dR < 0.4)
26  matched = true;
27 
28  return !matched;
29 }
const double Pi
T sqrt(T t)
Definition: SSEVec.h:48