#include <RecoEgamma/ElectronIdentification/plugins/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 14 of file ElectronIDSelectorCutBased.h.
ElectronIDSelectorCutBased::ElectronIDSelectorCutBased | ( | const edm::ParameterSet & | conf | ) | [explicit] |
Definition at line 3 of file ElectronIDSelectorCutBased.cc.
References algorithm_, electronIDAlgo_, cmsRelvalreport::exit, and edm::ParameterSet::getParameter().
00003 : conf_ (conf) 00004 { 00005 std::string algorithm_ = conf.getParameter<std::string> ("algorithm") ; 00006 00007 if ( algorithm_ == "eIDCBClasses" ) 00008 electronIDAlgo_ = new PTDRElectronID (); 00009 else if ( algorithm_ == "eIDCB" ) 00010 electronIDAlgo_ = new CutBasedElectronID (); 00011 else 00012 { 00013 edm::LogError("ElectronIDSelectorCutBased") << "Invalid algorithm parameter: must be eIDCBClasses or eIDCB." ; 00014 exit (1); 00015 } 00016 }
ElectronIDSelectorCutBased::~ElectronIDSelectorCutBased | ( | ) | [virtual] |
Definition at line 18 of file ElectronIDSelectorCutBased.cc.
References electronIDAlgo_.
00019 { 00020 delete electronIDAlgo_ ; 00021 }
void ElectronIDSelectorCutBased::newEvent | ( | const edm::Event & | e, | |
const edm::EventSetup & | es | |||
) |
Definition at line 23 of file ElectronIDSelectorCutBased.cc.
References conf_, electronIDAlgo_, and ElectronIDAlgo::setup().
00024 { 00025 electronIDAlgo_->setup (conf_); 00026 }
double ElectronIDSelectorCutBased::operator() | ( | const reco::GsfElectron & | ele, | |
const edm::Event & | e, | |||
const edm::EventSetup & | es | |||
) |
Definition at line 28 of file ElectronIDSelectorCutBased.cc.
References electronIDAlgo_, and ElectronIDAlgo::result().
00029 { 00030 return electronIDAlgo_->result (& (ele), e, es) ; 00031 }
std::string ElectronIDSelectorCutBased::algorithm_ [private] |
Definition at line 28 of file ElectronIDSelectorCutBased.h.
Referenced by ElectronIDSelectorCutBased().
Definition at line 26 of file ElectronIDSelectorCutBased.h.
Referenced by ElectronIDSelectorCutBased(), newEvent(), operator()(), and ~ElectronIDSelectorCutBased().