#include <ElectronIDSelectorCutBased.h>
Public Member Functions | |
ElectronIDSelectorCutBased (const edm::ParameterSet &conf) | |
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_ |
ElectronIDAlgo * | electronIDAlgo_ |
Definition at line 15 of file ElectronIDSelectorCutBased.h.
ElectronIDSelectorCutBased::ElectronIDSelectorCutBased | ( | const edm::ParameterSet & | conf | ) | [explicit] |
Definition at line 3 of file ElectronIDSelectorCutBased.cc.
References algorithm_, electronIDAlgo_, Exception, edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.
: conf_ (conf) { std::string algorithm_ = conf.getParameter<std::string> ("algorithm") ; if ( algorithm_ == "eIDClassBased" ) electronIDAlgo_ = new ClassBasedElectronID (); else if ( algorithm_ == "eIDCBClasses" ) electronIDAlgo_ = new PTDRElectronID (); else if ( algorithm_ == "eIDCB" ) electronIDAlgo_ = new CutBasedElectronID (); else { throw cms::Exception("Configuration") << "Invalid algorithm parameter in ElectronIDSelectorCutBased: must be eIDCBClasses or eIDCB." ; } }
ElectronIDSelectorCutBased::~ElectronIDSelectorCutBased | ( | ) | [virtual] |
Definition at line 19 of file ElectronIDSelectorCutBased.cc.
References electronIDAlgo_.
{ delete electronIDAlgo_ ; }
void ElectronIDSelectorCutBased::newEvent | ( | const edm::Event & | e, |
const edm::EventSetup & | es | ||
) |
Definition at line 24 of file ElectronIDSelectorCutBased.cc.
References conf_, electronIDAlgo_, and ElectronIDAlgo::setup().
{ electronIDAlgo_->setup (conf_); }
double ElectronIDSelectorCutBased::operator() | ( | const reco::GsfElectron & | ele, |
const edm::Event & | e, | ||
const edm::EventSetup & | es | ||
) |
Definition at line 29 of file ElectronIDSelectorCutBased.cc.
References electronIDAlgo_, and ElectronIDAlgo::result().
{ return electronIDAlgo_->result (& (ele), e, es) ; }
std::string ElectronIDSelectorCutBased::algorithm_ [private] |
Definition at line 29 of file ElectronIDSelectorCutBased.h.
Referenced by ElectronIDSelectorCutBased().
Definition at line 28 of file ElectronIDSelectorCutBased.h.
Referenced by newEvent().
Definition at line 27 of file ElectronIDSelectorCutBased.h.
Referenced by ElectronIDSelectorCutBased(), newEvent(), operator()(), and ~ElectronIDSelectorCutBased().