CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
egHLT::EgJetB2BCut< T > Struct Template Reference

#include <EgHLTDQMCut.h>

Inheritance diagram for egHLT::EgJetB2BCut< T >:
egHLT::EgHLTDQMCut< T >

Public Member Functions

EgHLTDQMCut< T > * clone () const
 
 EgJetB2BCut (float minDPhi=-M_PI, float maxDPhi=M_PI, float ptRelDiff=999)
 
bool pass (const T &obj, const OffEvt &evt) const
 
- Public Member Functions inherited from egHLT::EgHLTDQMCut< T >
 EgHLTDQMCut ()
 
virtual ~EgHLTDQMCut ()
 

Private Attributes

float maxDPhi_
 
float minDPhi_
 
float ptRelDiff_
 

Additional Inherited Members

- Protected Member Functions inherited from egHLT::EgHLTDQMCut< T >
 EgHLTDQMCut (const EgHLTDQMCut &rhs)
 

Detailed Description

template<class T>
struct egHLT::EgJetB2BCut< T >

Definition at line 332 of file EgHLTDQMCut.h.

Constructor & Destructor Documentation

template<class T >
egHLT::EgJetB2BCut< T >::EgJetB2BCut ( float  minDPhi = -M_PI,
float  maxDPhi = M_PI,
float  ptRelDiff = 999 
)
inline

Definition at line 340 of file EgHLTDQMCut.h.

Referenced by egHLT::EgJetB2BCut< T >::clone().

340  :
341  minDPhi_(minDPhi),maxDPhi_(maxDPhi),ptRelDiff_(ptRelDiff){}

Member Function Documentation

template<class T >
EgHLTDQMCut<T>* egHLT::EgJetB2BCut< T >::clone ( void  ) const
inlinevirtual

Implements egHLT::EgHLTDQMCut< T >.

Definition at line 343 of file EgHLTDQMCut.h.

References egHLT::EgJetB2BCut< T >::EgJetB2BCut().

343 {return new EgJetB2BCut(*this);}
EgJetB2BCut(float minDPhi=-M_PI, float maxDPhi=M_PI, float ptRelDiff=999)
Definition: EgHLTDQMCut.h:340
template<class T >
bool egHLT::EgJetB2BCut< T >::pass ( const T obj,
const OffEvt evt 
) const
virtual

Implements egHLT::EgHLTDQMCut< T >.

Definition at line 348 of file EgHLTDQMCut.h.

References reco::deltaPhi(), reco::deltaR2(), dPhi(), fwrapper::jets, egHLT::OffEvt::jets(), and EnergyCorrector::pt.

349  {
350 
351  bool b2bJet=false;
352  const std::vector<reco::CaloJet>& jets =evt.jets();
353  for(size_t jetNr=0;jetNr<jets.size();jetNr++){
354  if(reco::deltaR2(obj.eta(),obj.phi(),jets[jetNr].eta(),jets[jetNr].phi())>0.1*0.1){//not in a cone of 0.1 of probe object
355  float dPhi = reco::deltaPhi(obj.phi(),jets[jetNr].phi());
356  if(dPhi>minDPhi_ && dPhi<maxDPhi_ && fabs(1-jets[jetNr].pt()/obj.pt()) < ptRelDiff_) b2bJet=true;
357  }
358  }
359  return b2bJet;
360 
361  }
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
vector< PseudoJet > jets
double deltaR2(const T1 &t1, const T2 &t2)
Definition: deltaR.h:36
double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:12

Member Data Documentation

template<class T >
float egHLT::EgJetB2BCut< T >::maxDPhi_
private

Definition at line 336 of file EgHLTDQMCut.h.

template<class T >
float egHLT::EgJetB2BCut< T >::minDPhi_
private

Definition at line 335 of file EgHLTDQMCut.h.

template<class T >
float egHLT::EgJetB2BCut< T >::ptRelDiff_
private

Definition at line 337 of file EgHLTDQMCut.h.