CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ElectronIDSelectorCutBased Class Reference

#include <ElectronIDSelectorCutBased.h>

Public Member Functions

 ElectronIDSelectorCutBased (const edm::ParameterSet &conf)
 
void newEvent (const edm::Event &, const edm::EventSetup &)
 
double operator() (const reco::GsfElectron &, const edm::Event &, const edm::EventSetup &)
 
virtual ~ElectronIDSelectorCutBased ()
 

Private Attributes

std::string algorithm_
 
edm::ParameterSet conf_
 
ElectronIDAlgoelectronIDAlgo_
 

Detailed Description

Definition at line 15 of file ElectronIDSelectorCutBased.h.

Constructor & Destructor Documentation

ElectronIDSelectorCutBased::ElectronIDSelectorCutBased ( const edm::ParameterSet conf)
explicit

Definition at line 3 of file ElectronIDSelectorCutBased.cc.

References algorithm_, electronIDAlgo_, edm::hlt::Exception, edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

3  : conf_ (conf)
4 {
5  std::string algorithm_ = conf.getParameter<std::string> ("algorithm") ;
6 
7  if ( algorithm_ == "eIDClassBased" )
9  else if ( algorithm_ == "eIDCBClasses" )
11  else if ( algorithm_ == "eIDCB" )
13  else {
14  throw cms::Exception("Configuration")
15  << "Invalid algorithm parameter in ElectronIDSelectorCutBased: must be eIDCBClasses or eIDCB." ;
16  }
17 }
T getParameter(std::string const &) const
ElectronIDSelectorCutBased::~ElectronIDSelectorCutBased ( )
virtual

Definition at line 19 of file ElectronIDSelectorCutBased.cc.

References electronIDAlgo_.

20 {
21  delete electronIDAlgo_ ;
22 }

Member Function Documentation

void ElectronIDSelectorCutBased::newEvent ( const edm::Event e,
const edm::EventSetup es 
)

Definition at line 24 of file ElectronIDSelectorCutBased.cc.

References conf_, electronIDAlgo_, and ElectronIDAlgo::setup().

25 {
27 }
virtual void setup(const edm::ParameterSet &conf)
double ElectronIDSelectorCutBased::operator() ( const reco::GsfElectron ele,
const edm::Event e,
const edm::EventSetup es 
)

Definition at line 29 of file ElectronIDSelectorCutBased.cc.

References electronIDAlgo_, and ElectronIDAlgo::result().

30 {
31  return electronIDAlgo_->result (& (ele), e, es) ;
32 }
virtual double result(const reco::GsfElectron *, const edm::Event &, const edm::EventSetup &)

Member Data Documentation

std::string ElectronIDSelectorCutBased::algorithm_
private

Definition at line 29 of file ElectronIDSelectorCutBased.h.

Referenced by ElectronIDSelectorCutBased().

edm::ParameterSet ElectronIDSelectorCutBased::conf_
private

Definition at line 28 of file ElectronIDSelectorCutBased.h.

Referenced by newEvent().

ElectronIDAlgo* ElectronIDSelectorCutBased::electronIDAlgo_
private