CMS 3D CMS Logo

ElectronIDSelectorCutBased Class Reference

#include <RecoEgamma/ElectronIdentification/plugins/ElectronIDSelectorCutBased.h>

List of all members.

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_
ElectronIDAlgoelectronIDAlgo_


Detailed Description

Definition at line 14 of file ElectronIDSelectorCutBased.h.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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 }


Member Data Documentation

std::string ElectronIDSelectorCutBased::algorithm_ [private]

Definition at line 28 of file ElectronIDSelectorCutBased.h.

Referenced by ElectronIDSelectorCutBased().

edm::ParameterSet ElectronIDSelectorCutBased::conf_ [private]

Definition at line 27 of file ElectronIDSelectorCutBased.h.

Referenced by newEvent().

ElectronIDAlgo* ElectronIDSelectorCutBased::electronIDAlgo_ [private]

Definition at line 26 of file ElectronIDSelectorCutBased.h.

Referenced by ElectronIDSelectorCutBased(), newEvent(), operator()(), and ~ElectronIDSelectorCutBased().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:18 2009 for CMSSW by  doxygen 1.5.4