CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut Class Reference

#include <EgammaHLTFilteredObjProducer.h>

Classes

struct  CutValues
 

Public Member Functions

void getHandles (const edm::Event &event)
 
float getVar (const reco::RecoEcalCandidateRef &cand) const
 
bool operator() (const reco::RecoEcalCandidateRef &cand) const
 
 SelectionCut (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
 ~SelectionCut ()=default
 

Private Attributes

CutValues ebCut_
 
CutValues eeCut_
 
edm::Handle< reco::RecoEcalCandidateIsolationMapvarHandle_
 
edm::EDGetTokenT< reco::RecoEcalCandidateIsolationMapvarToken_
 

Detailed Description

template<typename OutCollType>
class EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut

Definition at line 32 of file EgammaHLTFilteredObjProducer.h.

Constructor & Destructor Documentation

template<typename OutCollType >
EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::SelectionCut ( const edm::ParameterSet pset,
edm::ConsumesCollector &&  iC 
)
inline
template<typename OutCollType >
EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::~SelectionCut ( )
default

Member Function Documentation

template<typename OutCollType >
void EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::getHandles ( const edm::Event event)
inline

Definition at line 56 of file EgammaHLTFilteredObjProducer.h.

References EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::varHandle_, and EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::varToken_.

56  {
57  event.getByToken(varToken_,varHandle_);
58  }
edm::EDGetTokenT< reco::RecoEcalCandidateIsolationMap > varToken_
edm::Handle< reco::RecoEcalCandidateIsolationMap > varHandle_
template<typename OutCollType >
float EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::getVar ( const reco::RecoEcalCandidateRef cand) const
inline

Definition at line 47 of file EgammaHLTFilteredObjProducer.h.

References edm::AssociationMap< Tag >::end(), edm::AssociationMap< Tag >::find(), and EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::varHandle_.

Referenced by EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::operator()().

47  {
48  auto res = varHandle_->find(cand);
49  if(res!=varHandle_->end()) return res->val;
50  else{
51  //FIX ME: add some provenance info to this
52  throw cms::Exception("LogicError") <<" candidate not found in collection ";
53  }
54  }
const_iterator end() const
last iterator over the map (read only)
const_iterator find(const key_type &k) const
find element with specified reference key
Definition: Electron.h:6
edm::Handle< reco::RecoEcalCandidateIsolationMap > varHandle_
template<typename OutCollType >
bool EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::operator() ( const reco::RecoEcalCandidateRef cand) const
inline

Member Data Documentation

template<typename OutCollType >
CutValues EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::ebCut_
private
template<typename OutCollType >
CutValues EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::eeCut_
private
template<typename OutCollType >
edm::Handle<reco::RecoEcalCandidateIsolationMap> EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::varHandle_
private
template<typename OutCollType >
edm::EDGetTokenT<reco::RecoEcalCandidateIsolationMap> EgammaHLTFilteredObjProducer< OutCollType >::SelectionCut::varToken_
private