CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ElectronIDSelectorCutBased Class Reference

#include <ElectronIDSelectorCutBased.h>

Public Member Functions

 ElectronIDSelectorCutBased (const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
 
 ElectronIDSelectorCutBased (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 ~ElectronIDSelectorCutBased ()
 

Private Attributes

std::string algorithm_
 
edm::ParameterSet conf_
 
ElectronIDAlgoelectronIDAlgo_
 

Detailed Description

Definition at line 17 of file ElectronIDSelectorCutBased.h.

Constructor & Destructor Documentation

◆ ElectronIDSelectorCutBased() [1/2]

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

Definition at line 19 of file ElectronIDSelectorCutBased.h.

20  : ElectronIDSelectorCutBased(conf, iC) {}

◆ ElectronIDSelectorCutBased() [2/2]

ElectronIDSelectorCutBased::ElectronIDSelectorCutBased ( const edm::ParameterSet conf,
edm::ConsumesCollector iC 
)
explicit

Definition at line 3 of file ElectronIDSelectorCutBased.cc.

4  : conf_(conf) {
5  std::string algorithm_ = conf.getParameter<std::string>("algorithm");
6 
7  if (algorithm_ == "eIDClassBased")
9  else if (algorithm_ == "eIDCBClasses")
11  else if (algorithm_ == "eIDCB")
12  electronIDAlgo_ = new CutBasedElectronID(conf, iC);
13  else {
14  throw cms::Exception("Configuration")
15  << "Invalid algorithm parameter in ElectronIDSelectorCutBased: must be eIDCBClasses or eIDCB.";
16  }
17 }

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

◆ ~ElectronIDSelectorCutBased()

ElectronIDSelectorCutBased::~ElectronIDSelectorCutBased ( )
virtual

Definition at line 19 of file ElectronIDSelectorCutBased.cc.

19 { delete electronIDAlgo_; }

References electronIDAlgo_.

Member Function Documentation

◆ newEvent()

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

Definition at line 21 of file ElectronIDSelectorCutBased.cc.

21  {
23 }

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

◆ operator()()

double ElectronIDSelectorCutBased::operator() ( const reco::GsfElectron ele,
const edm::Event e,
const edm::EventSetup es 
)

Definition at line 25 of file ElectronIDSelectorCutBased.cc.

27  {
28  return electronIDAlgo_->result(&(ele), e, es);
29 }

References MillePedeFileConverter_cfg::e, electronIDAlgo_, and ElectronIDAlgo::result().

Member Data Documentation

◆ algorithm_

std::string ElectronIDSelectorCutBased::algorithm_
private

Definition at line 30 of file ElectronIDSelectorCutBased.h.

Referenced by ElectronIDSelectorCutBased().

◆ conf_

edm::ParameterSet ElectronIDSelectorCutBased::conf_
private

Definition at line 29 of file ElectronIDSelectorCutBased.h.

Referenced by newEvent().

◆ electronIDAlgo_

ElectronIDAlgo* ElectronIDSelectorCutBased::electronIDAlgo_
private
ElectronIDSelectorCutBased::algorithm_
std::string algorithm_
Definition: ElectronIDSelectorCutBased.h:30
ClassBasedElectronID
Definition: ClassBasedElectronID.h:6
CutBasedElectronID
Definition: CutBasedElectronID.h:11
ElectronIDSelectorCutBased::electronIDAlgo_
ElectronIDAlgo * electronIDAlgo_
Definition: ElectronIDSelectorCutBased.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ElectronIDAlgo::setup
virtual void setup(const edm::ParameterSet &conf)
Definition: ElectronIDAlgo.h:22
ElectronIDAlgo::result
virtual double result(const reco::GsfElectron *, const edm::Event &, const edm::EventSetup &)
Definition: ElectronIDAlgo.h:23
Exception
Definition: hltDiff.cc:245
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ElectronIDSelectorCutBased::conf_
edm::ParameterSet conf_
Definition: ElectronIDSelectorCutBased.h:29
PTDRElectronID
Definition: PTDRElectronID.h:6
ElectronIDSelectorCutBased::ElectronIDSelectorCutBased
ElectronIDSelectorCutBased(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
Definition: ElectronIDSelectorCutBased.h:19
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37