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, edm::ConsumesCollector &&iC)
 
 ElectronIDSelectorLikelihood (const edm::ParameterSet &conf, edm::ConsumesCollector &iC)
 
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::EDGetTokenT
< EcalRecHitCollection
reducedBarrelRecHitCollectionToken_
 
edm::InputTag reducedEndcapRecHitCollection_
 
edm::EDGetTokenT
< EcalRecHitCollection
reducedEndcapRecHitCollectionToken_
 

Detailed Description

Definition at line 20 of file ElectronIDSelectorLikelihood.h.

Constructor & Destructor Documentation

ElectronIDSelectorLikelihood::ElectronIDSelectorLikelihood ( const edm::ParameterSet conf,
edm::ConsumesCollector &&  iC 
)
inlineexplicit

Definition at line 24 of file ElectronIDSelectorLikelihood.h.

24  :
25  ElectronIDSelectorLikelihood(conf, iC) {}
ElectronIDSelectorLikelihood(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
ElectronIDSelectorLikelihood::ElectronIDSelectorLikelihood ( const edm::ParameterSet conf,
edm::ConsumesCollector iC 
)
explicit

Definition at line 3 of file ElectronIDSelectorLikelihood.cc.

References conf_, edm::ConsumesCollector::consumes(), doLikelihood_, edm::ParameterSet::getParameter(), reducedBarrelRecHitCollection_, reducedBarrelRecHitCollectionToken_, reducedEndcapRecHitCollection_, and reducedEndcapRecHitCollectionToken_.

3  : conf_ (conf)
4 {
5  doLikelihood_ = conf_.getParameter<bool> ("doLikelihood");
6  reducedBarrelRecHitCollection_ = conf.getParameter<edm::InputTag>("reducedBarrelRecHitCollection");
7  reducedEndcapRecHitCollection_ = conf.getParameter<edm::InputTag>("reducedEndcapRecHitCollection");
10 
11 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< EcalRecHitCollection > reducedEndcapRecHitCollectionToken_
edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_
ElectronIDSelectorLikelihood::~ElectronIDSelectorLikelihood ( )
virtual

Definition at line 13 of file ElectronIDSelectorLikelihood.cc.

14 {
15 }

Member Function Documentation

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

Definition at line 17 of file ElectronIDSelectorLikelihood.cc.

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

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

Definition at line 24 of file ElectronIDSelectorLikelihood.cc.

References doLikelihood_, edm::Event::getByToken(), likelihoodAlgo_, reducedBarrelRecHitCollectionToken_, and reducedEndcapRecHitCollectionToken_.

25 {
26 
27  if (doLikelihood_) {
30 
33 
35  return static_cast<double>(likelihoodAlgo_->resultLog (ele,lazyTools)) ;
36  }
37  return 0;
38 
39 }
edm::ESHandle< ElectronLikelihood > likelihoodAlgo_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
edm::EDGetTokenT< EcalRecHitCollection > reducedEndcapRecHitCollectionToken_
edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_

Member Data Documentation

edm::ParameterSet ElectronIDSelectorLikelihood::conf_
private

Definition at line 36 of file ElectronIDSelectorLikelihood.h.

Referenced by ElectronIDSelectorLikelihood().

bool ElectronIDSelectorLikelihood::doLikelihood_
private

Definition at line 43 of file ElectronIDSelectorLikelihood.h.

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

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

Definition at line 34 of file ElectronIDSelectorLikelihood.h.

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

edm::InputTag ElectronIDSelectorLikelihood::reducedBarrelRecHitCollection_
private

Definition at line 38 of file ElectronIDSelectorLikelihood.h.

Referenced by ElectronIDSelectorLikelihood().

edm::EDGetTokenT<EcalRecHitCollection> ElectronIDSelectorLikelihood::reducedBarrelRecHitCollectionToken_
private

Definition at line 40 of file ElectronIDSelectorLikelihood.h.

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

edm::InputTag ElectronIDSelectorLikelihood::reducedEndcapRecHitCollection_
private

Definition at line 39 of file ElectronIDSelectorLikelihood.h.

Referenced by ElectronIDSelectorLikelihood().

edm::EDGetTokenT<EcalRecHitCollection> ElectronIDSelectorLikelihood::reducedEndcapRecHitCollectionToken_
private

Definition at line 41 of file ElectronIDSelectorLikelihood.h.

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