CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::GsfElectronRef
container
 

Public Member Functions

const_iterator begin () const
 
 ElectronIDSelector (const edm::ParameterSet &iConfig)
 
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 14 of file ElectronIDSelector.h.

Member Typedef Documentation

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

Definition at line 22 of file ElectronIDSelector.h.

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

Definition at line 28 of file ElectronIDSelector.h.

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

Definition at line 26 of file ElectronIDSelector.h.

Constructor & Destructor Documentation

template<class algo >
ElectronIDSelector< algo >::ElectronIDSelector ( const edm::ParameterSet iConfig)
inlineexplicit

Definition at line 16 of file ElectronIDSelector.h.

16  :
17  select_(iConfig),
18  threshold_(iConfig.getParameter<double>("threshold"))
19  {
20  }
T getParameter(std::string const &) const
template<class algo >
virtual ElectronIDSelector< algo >::~ElectronIDSelector ( )
inlinevirtual

Definition at line 22 of file ElectronIDSelector.h.

22 {};

Member Function Documentation

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

Definition at line 31 of file ElectronIDSelector.h.

References ElectronIDSelector< algo >::selected_.

31 { return selected_.begin () ; }
template<class algo >
const_iterator ElectronIDSelector< algo >::end ( void  ) const
inline

Definition at line 32 of file ElectronIDSelector.h.

References ElectronIDSelector< algo >::selected_.

32 { return selected_.end () ; }
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 34 of file ElectronIDSelector.h.

References HI_PhotonSkim_cff::electrons, i, ElectronIDSelector< algo >::select_, ElectronIDSelector< algo >::selected_, and ElectronIDSelector< algo >::threshold_.

37  {
39  selected_.clear();
40  select_.newEvent(iEvent, iEs);
41  // Loop over electrons
42  unsigned int i = 0 ;
43  for ( reco::GsfElectronCollection::const_iterator eleIt = electrons->begin () ;
44  eleIt != electrons->end () ;
45  ++eleIt )
46  {
47  edm::Ref<reco::GsfElectronCollection> electronRef(electrons,i);
48  if (select_((*eleIt),iEvent,iEs) > threshold_)
49  selected_.push_back (electronRef) ;
50  //selected_.push_back ( & * eleIt) ;
51  ++i;
52  }
53  }
int i
Definition: DBlmapReader.cc:9

Member Data Documentation

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

Definition at line 57 of file ElectronIDSelector.h.

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

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

Definition at line 58 of file ElectronIDSelector.h.

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