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...

#include <TopProjector.h>

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 102 of file TopProjector.h.

Member Typedef Documentation

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

Definition at line 105 of file TopProjector.h.

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

Definition at line 104 of file TopProjector.h.

Constructor & Destructor Documentation

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

Definition at line 107 of file TopProjector.h.

References TopProjectorFwdPtrOverlap< Top, Bottom >::bottom_.

107 { bottom_ = 0; }
BottomFwdPtr const * bottom_
Definition: TopProjector.h:134
template<class Top , class Bottom >
TopProjectorDeltaROverlap< Top, Bottom >::TopProjectorDeltaROverlap ( edm::ParameterSet const &  config)
inlineexplicit

Definition at line 108 of file TopProjector.h.

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

Member Function Documentation

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

Definition at line 124 of file TopProjector.h.

References reco::deltaR2(), muonTagProbeFilters_cff::matched, and TtFullHadDaughter::Top.

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

Definition at line 117 of file TopProjector.h.

References TopProjectorFwdPtrOverlap< Top, Bottom >::bottom_.

117  {
118  bottom_ = &bottom;
119  bottomCPtr_ = &**bottom_;
120  botEta_ = bottomCPtr_->eta();
121  botPhi_ = bottomCPtr_->phi();
122  }
const Bottom * bottomCPtr_
Definition: TopProjector.h:135
BottomFwdPtr const * bottom_
Definition: TopProjector.h:134

Member Data Documentation

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

Definition at line 136 of file TopProjector.h.

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

Definition at line 136 of file TopProjector.h.

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

Definition at line 134 of file TopProjector.h.

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

Definition at line 135 of file TopProjector.h.

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

Definition at line 133 of file TopProjector.h.