CMS 3D CMS Logo

ElectronIDSelectorCutBased.cc
Go to the documentation of this file.
2 
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 }
18 
20 
23 }
24 
26  const edm::Event& e,
27  const edm::EventSetup& es) {
28  return electronIDAlgo_->result(&(ele), e, es);
29 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
double operator()(const reco::GsfElectron &, const edm::Event &, const edm::EventSetup &)
ElectronIDSelectorCutBased(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
virtual void setup(const edm::ParameterSet &conf)
void newEvent(const edm::Event &, const edm::EventSetup &)
virtual double result(const reco::GsfElectron *, const edm::Event &, const edm::EventSetup &)