RecoEgamma
ElectronIdentification
plugins
ElectronIDSelectorCutBased.cc
Go to the documentation of this file.
1
#include "
RecoEgamma/ElectronIdentification/plugins/ElectronIDSelectorCutBased.h
"
2
3
ElectronIDSelectorCutBased::ElectronIDSelectorCutBased
(
const
edm::ParameterSet
& conf,
edm::ConsumesCollector
& iC)
4
: conf_(conf) {
5
std::string
algorithm_
= conf.
getParameter
<
std::string
>(
"algorithm"
);
6
7
if
(
algorithm_
==
"eIDClassBased"
)
8
electronIDAlgo_
=
new
ClassBasedElectronID
();
9
else
if
(
algorithm_
==
"eIDCBClasses"
)
10
electronIDAlgo_
=
new
PTDRElectronID
();
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
}
18
19
ElectronIDSelectorCutBased::~ElectronIDSelectorCutBased
() {
delete
electronIDAlgo_
; }
20
21
void
ElectronIDSelectorCutBased::newEvent
(
const
edm::Event
&
e
,
const
edm::EventSetup
& es) {
22
electronIDAlgo_
->
setup
(
conf_
);
23
}
24
25
double
ElectronIDSelectorCutBased::operator()
(
const
reco::GsfElectron
& ele,
26
const
edm::Event
&
e
,
27
const
edm::EventSetup
& es) {
28
return
electronIDAlgo_
->
result
(&(ele),
e
, es);
29
}
ElectronIDSelectorCutBased.h
ElectronIDSelectorCutBased::algorithm_
std::string algorithm_
Definition:
ElectronIDSelectorCutBased.h:30
ClassBasedElectronID
Definition:
ClassBasedElectronID.h:6
ElectronIDSelectorCutBased::~ElectronIDSelectorCutBased
virtual ~ElectronIDSelectorCutBased()
Definition:
ElectronIDSelectorCutBased.cc:19
CutBasedElectronID
Definition:
CutBasedElectronID.h:11
ElectronIDSelectorCutBased::electronIDAlgo_
ElectronIDAlgo * electronIDAlgo_
Definition:
ElectronIDSelectorCutBased.h:28
reco::GsfElectron
Definition:
GsfElectron.h:35
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:36
ElectronIDAlgo::setup
virtual void setup(const edm::ParameterSet &conf)
Definition:
ElectronIDAlgo.h:22
edm::EventSetup
Definition:
EventSetup.h:57
ElectronIDSelectorCutBased::operator()
double operator()(const reco::GsfElectron &, const edm::Event &, const edm::EventSetup &)
Definition:
ElectronIDSelectorCutBased.cc:25
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ElectronIDAlgo::result
virtual double result(const reco::GsfElectron *, const edm::Event &, const edm::EventSetup &)
Definition:
ElectronIDAlgo.h:23
Exception
Definition:
hltDiff.cc:246
ElectronIDSelectorCutBased::conf_
edm::ParameterSet conf_
Definition:
ElectronIDSelectorCutBased.h:29
PTDRElectronID
Definition:
PTDRElectronID.h:6
ElectronIDSelectorCutBased::newEvent
void newEvent(const edm::Event &, const edm::EventSetup &)
Definition:
ElectronIDSelectorCutBased.cc:21
ElectronIDSelectorCutBased::ElectronIDSelectorCutBased
ElectronIDSelectorCutBased(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
Definition:
ElectronIDSelectorCutBased.h:19
edm::Event
Definition:
Event.h:73
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
Generated for CMSSW Reference Manual by
1.8.16