CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes
TopProjectorDeltaROverlap< Top, Bottom > Class Template Reference

This checks matching based on delta R. More...

Public Types

typedef edm::FwdPtr< Bottom > BottomFwdPtr
 
typedef edm::FwdPtr< Top > TopFwdPtr
 

Public Member Functions

bool operator() (TopFwdPtr const &top) const
 
void setBottom (BottomFwdPtr const &bottom)
 
 TopProjectorDeltaROverlap ()
 
 TopProjectorDeltaROverlap (edm::ParameterSet const &config)
 

Protected Attributes

float botEta_
 
float botPhi_
 
BottomFwdPtr const * bottom_
 
const Bottom * bottomCPtr_
 
double deltaR2_
 

Detailed Description

template<class Top, class Bottom>
class TopProjectorDeltaROverlap< Top, Bottom >

This checks matching based on delta R.

Definition at line 103 of file TopProjector.cc.

Member Typedef Documentation

◆ BottomFwdPtr

template<class Top , class Bottom >
typedef edm::FwdPtr<Bottom> TopProjectorDeltaROverlap< Top, Bottom >::BottomFwdPtr

Definition at line 106 of file TopProjector.cc.

◆ TopFwdPtr

template<class Top , class Bottom >
typedef edm::FwdPtr<Top> TopProjectorDeltaROverlap< Top, Bottom >::TopFwdPtr

Definition at line 105 of file TopProjector.cc.

Constructor & Destructor Documentation

◆ TopProjectorDeltaROverlap() [1/2]

template<class Top , class Bottom >
TopProjectorDeltaROverlap< Top, Bottom >::TopProjectorDeltaROverlap ( )
inlineexplicit

Definition at line 108 of file TopProjector.cc.

References TopProjectorDeltaROverlap< Top, Bottom >::bottom_.

108 { bottom_ = 0; }
BottomFwdPtr const * bottom_

◆ TopProjectorDeltaROverlap() [2/2]

template<class Top , class Bottom >
TopProjectorDeltaROverlap< Top, Bottom >::TopProjectorDeltaROverlap ( edm::ParameterSet const &  config)
inlineexplicit

Definition at line 109 of file TopProjector.cc.

References TopProjectorDeltaROverlap< Top, Bottom >::deltaR2_.

110  : deltaR2_(config.getParameter<double>("deltaR")),
111  bottom_(nullptr),
112  bottomCPtr_(nullptr),
113  botEta_(-999.f),
114  botPhi_(0.f) {
115  deltaR2_ *= deltaR2_;
116  }
const Bottom * bottomCPtr_
Definition: config.py:1
double f[11][100]
BottomFwdPtr const * bottom_

Member Function Documentation

◆ operator()()

template<class Top , class Bottom >
bool TopProjectorDeltaROverlap< Top, Bottom >::operator() ( TopFwdPtr const &  top) const
inline

Definition at line 125 of file TopProjector.cc.

References TopProjectorDeltaROverlap< Top, Bottom >::botEta_, TopProjectorDeltaROverlap< Top, Bottom >::botPhi_, reco::deltaR2(), TopProjectorDeltaROverlap< Top, Bottom >::deltaR2_, muonTagProbeFilters_cff::matched, and TtFullHadDaughter::Top.

125  {
126  const Top& oTop = *top;
127  float topEta = oTop.eta();
128  float topPhi = oTop.phi();
129  bool matched = reco::deltaR2(topEta, topPhi, botEta_, botPhi_) < deltaR2_;
130  return matched;
131  }
static const std::string Top
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16

◆ setBottom()

template<class Top , class Bottom >
void TopProjectorDeltaROverlap< Top, Bottom >::setBottom ( BottomFwdPtr const &  bottom)
inline

Member Data Documentation

◆ botEta_

template<class Top , class Bottom >
float TopProjectorDeltaROverlap< Top, Bottom >::botEta_
protected

◆ botPhi_

template<class Top , class Bottom >
float TopProjectorDeltaROverlap< Top, Bottom >::botPhi_
protected

◆ bottom_

template<class Top , class Bottom >
BottomFwdPtr const* TopProjectorDeltaROverlap< Top, Bottom >::bottom_
protected

◆ bottomCPtr_

template<class Top , class Bottom >
const Bottom* TopProjectorDeltaROverlap< Top, Bottom >::bottomCPtr_
protected

◆ deltaR2_

template<class Top , class Bottom >
double TopProjectorDeltaROverlap< Top, Bottom >::deltaR2_
protected