CMS 3D CMS Logo

ElectronIDSelectorNeuralNet Class Reference

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

List of all members.

Public Member Functions

 ElectronIDSelectorNeuralNet (const edm::ParameterSet &conf)
void newEvent (const edm::Event &, const edm::EventSetup &)
double operator() (const reco::GsfElectron &, const edm::Event &, const edm::EventSetup &)
virtual ~ElectronIDSelectorNeuralNet ()

Private Attributes

edm::ParameterSet conf_
bool doNeuralNet_
ElectronNeuralNetneuralNetAlgo_


Detailed Description

Definition at line 12 of file ElectronIDSelectorNeuralNet.h.


Constructor & Destructor Documentation

ElectronIDSelectorNeuralNet::ElectronIDSelectorNeuralNet ( const edm::ParameterSet conf  )  [explicit]

Definition at line 3 of file ElectronIDSelectorNeuralNet.cc.

References conf_, doNeuralNet_, edm::ParameterSet::getParameter(), and neuralNetAlgo_.

00003                                                                                      : conf_ (conf) 
00004 {
00005   doNeuralNet_ = conf_.getParameter<bool> ("doNeuralNet");
00006   
00007   if (doNeuralNet_) 
00008     neuralNetAlgo_ = new ElectronNeuralNet();
00009 }

ElectronIDSelectorNeuralNet::~ElectronIDSelectorNeuralNet (  )  [virtual]

Definition at line 11 of file ElectronIDSelectorNeuralNet.cc.

References doNeuralNet_, and neuralNetAlgo_.

00012 {
00013   if (doNeuralNet_) 
00014     delete neuralNetAlgo_ ;
00015 }


Member Function Documentation

void ElectronIDSelectorNeuralNet::newEvent ( const edm::Event e,
const edm::EventSetup es 
)

Definition at line 17 of file ElectronIDSelectorNeuralNet.cc.

References conf_, doNeuralNet_, neuralNetAlgo_, and ElectronNeuralNet::setup().

00018 {
00019   if (doNeuralNet_) 
00020     neuralNetAlgo_->setup (conf_);
00021 }

double ElectronIDSelectorNeuralNet::operator() ( const reco::GsfElectron ele,
const edm::Event e,
const edm::EventSetup es 
)

Definition at line 23 of file ElectronIDSelectorNeuralNet.cc.

References doNeuralNet_, neuralNetAlgo_, and ElectronNeuralNet::result().

00024 {
00025   if (doNeuralNet_) 
00026         return static_cast<double>(neuralNetAlgo_->result (& (ele), e) );
00027   return 0. ;
00028 }


Member Data Documentation

edm::ParameterSet ElectronIDSelectorNeuralNet::conf_ [private]

Definition at line 26 of file ElectronIDSelectorNeuralNet.h.

Referenced by ElectronIDSelectorNeuralNet(), and newEvent().

bool ElectronIDSelectorNeuralNet::doNeuralNet_ [private]

Definition at line 28 of file ElectronIDSelectorNeuralNet.h.

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

ElectronNeuralNet* ElectronIDSelectorNeuralNet::neuralNetAlgo_ [private]

Definition at line 24 of file ElectronIDSelectorNeuralNet.h.

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


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