CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
ElectronIDSelector< algo > Struct Template Reference

#include <ElectronIDSelector.h>

Public Types

typedef reco::GsfElectronCollection collection
 
typedef container::const_iterator const_iterator
 
typedef std::vector< reco::GsfElectronRefcontainer
 

Public Member Functions

const_iterator begin () const
 
 ElectronIDSelector (const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
 
const_iterator end () const
 
void select (const edm::Handle< reco::GsfElectronCollection > &_electrons, const edm::Event &iEvent, const edm::EventSetup &iEs)
 
virtual ~ElectronIDSelector ()
 

Private Attributes

algo select_
 
container selected_
 
double threshold_
 

Detailed Description

template<class algo>
struct ElectronIDSelector< algo >

Definition at line 15 of file ElectronIDSelector.h.

Member Typedef Documentation

◆ collection

template<class algo >
typedef reco::GsfElectronCollection ElectronIDSelector< algo >::collection

Definition at line 20 of file ElectronIDSelector.h.

◆ const_iterator

template<class algo >
typedef container::const_iterator ElectronIDSelector< algo >::const_iterator

Definition at line 26 of file ElectronIDSelector.h.

◆ container

template<class algo >
typedef std::vector<reco::GsfElectronRef> ElectronIDSelector< algo >::container

Definition at line 24 of file ElectronIDSelector.h.

Constructor & Destructor Documentation

◆ ElectronIDSelector()

template<class algo >
ElectronIDSelector< algo >::ElectronIDSelector ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  iC 
)
inlineexplicit

Definition at line 17 of file ElectronIDSelector.h.

18  : select_(iConfig, iC), threshold_(iConfig.getParameter<double>("threshold")) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:307

◆ ~ElectronIDSelector()

template<class algo >
virtual ElectronIDSelector< algo >::~ElectronIDSelector ( )
inlinevirtual

Definition at line 20 of file ElectronIDSelector.h.

20 {};

Member Function Documentation

◆ begin()

template<class algo >
const_iterator ElectronIDSelector< algo >::begin ( void  ) const
inline

Definition at line 29 of file ElectronIDSelector.h.

References ElectronIDSelector< algo >::selected_.

29 { return selected_.begin(); }

◆ end()

template<class algo >
const_iterator ElectronIDSelector< algo >::end ( void  ) const
inline

Definition at line 30 of file ElectronIDSelector.h.

References ElectronIDSelector< algo >::selected_.

30 { return selected_.end(); }

◆ select()

template<class algo >
void ElectronIDSelector< algo >::select ( const edm::Handle< reco::GsfElectronCollection > &  _electrons,
const edm::Event iEvent,
const edm::EventSetup iEs 
)
inline

Definition at line 32 of file ElectronIDSelector.h.

References pwdgSkimBPark_cfi::electrons, mps_fire::i, iEvent, ElectronIDSelector< algo >::select_, ElectronIDSelector< algo >::selected_, and ElectronIDSelector< algo >::threshold_.

34  {
36  selected_.clear();
37  select_.newEvent(iEvent, iEs);
38  // Loop over electrons
39  unsigned int i = 0;
40  for (reco::GsfElectronCollection::const_iterator eleIt = electrons->begin(); eleIt != electrons->end(); ++eleIt) {
42  if (select_((*eleIt), iEvent, iEs) > threshold_)
43  selected_.push_back(electronRef);
44  //selected_.push_back ( & * eleIt) ;
45  ++i;
46  }
47  }
int iEvent
Definition: GenABIO.cc:224

Member Data Documentation

◆ select_

template<class algo >
algo ElectronIDSelector< algo >::select_
private

Definition at line 51 of file ElectronIDSelector.h.

Referenced by ElectronIDSelector< algo >::select().

◆ selected_

template<class algo >
container ElectronIDSelector< algo >::selected_
private

◆ threshold_

template<class algo >
double ElectronIDSelector< algo >::threshold_
private

Definition at line 52 of file ElectronIDSelector.h.

Referenced by ElectronIDSelector< algo >::select().