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
ElectronIDSelectorLikelihood Class Reference

#include <ElectronIDSelectorLikelihood.h>

Public Member Functions

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

Private Attributes

edm::ParameterSet conf_
 
bool doLikelihood_
 
edm::ESHandle< ElectronLikelihoodlikelihoodAlgo_
 
edm::InputTag reducedBarrelRecHitCollection_
 
edm::InputTag reducedEndcapRecHitCollection_
 

Detailed Description

Definition at line 19 of file ElectronIDSelectorLikelihood.h.

Constructor & Destructor Documentation

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

Definition at line 3 of file ElectronIDSelectorLikelihood.cc.

References conf_, doLikelihood_, edm::ParameterSet::getParameter(), reducedBarrelRecHitCollection_, and reducedEndcapRecHitCollection_.

3  : conf_ (conf)
4 {
5  doLikelihood_ = conf_.getParameter<bool> ("doLikelihood");
6  reducedBarrelRecHitCollection_ = conf.getParameter<edm::InputTag>("reducedBarrelRecHitCollection");
7  reducedEndcapRecHitCollection_ = conf.getParameter<edm::InputTag>("reducedEndcapRecHitCollection");
8 
9 }
T getParameter(std::string const &) const
ElectronIDSelectorLikelihood::~ElectronIDSelectorLikelihood ( )
virtual

Definition at line 11 of file ElectronIDSelectorLikelihood.cc.

12 {
13 }

Member Function Documentation

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

Definition at line 15 of file ElectronIDSelectorLikelihood.cc.

References edm::EventSetup::getData(), and likelihoodAlgo_.

16 {
17 
19 
20 }
edm::ESHandle< ElectronLikelihood > likelihoodAlgo_
void getData(T &iHolder) const
Definition: EventSetup.h:67
double ElectronIDSelectorLikelihood::operator() ( const reco::GsfElectron ele,
const edm::Event e,
const edm::EventSetup es 
)

Definition at line 22 of file ElectronIDSelectorLikelihood.cc.

References doLikelihood_, edm::Event::getByLabel(), likelihoodAlgo_, reducedBarrelRecHitCollection_, and reducedEndcapRecHitCollection_.

23 {
24 
25  if (doLikelihood_) {
28 
31 
33  return static_cast<double>(likelihoodAlgo_->resultLog (ele,lazyTools)) ;
34  }
35  return 0;
36 
37 }
edm::ESHandle< ElectronLikelihood > likelihoodAlgo_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361

Member Data Documentation

edm::ParameterSet ElectronIDSelectorLikelihood::conf_
private

Definition at line 33 of file ElectronIDSelectorLikelihood.h.

Referenced by ElectronIDSelectorLikelihood().

bool ElectronIDSelectorLikelihood::doLikelihood_
private

Definition at line 38 of file ElectronIDSelectorLikelihood.h.

Referenced by ElectronIDSelectorLikelihood(), and operator()().

edm::ESHandle<ElectronLikelihood> ElectronIDSelectorLikelihood::likelihoodAlgo_
private

Definition at line 31 of file ElectronIDSelectorLikelihood.h.

Referenced by newEvent(), and operator()().

edm::InputTag ElectronIDSelectorLikelihood::reducedBarrelRecHitCollection_
private

Definition at line 35 of file ElectronIDSelectorLikelihood.h.

Referenced by ElectronIDSelectorLikelihood(), and operator()().

edm::InputTag ElectronIDSelectorLikelihood::reducedEndcapRecHitCollection_
private

Definition at line 36 of file ElectronIDSelectorLikelihood.h.

Referenced by ElectronIDSelectorLikelihood(), and operator()().