CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ElectronIDSelectorNeuralNet Class Reference

#include <ElectronIDSelectorNeuralNet.h>

Public Member Functions

 ElectronIDSelectorNeuralNet (const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
 
 ElectronIDSelectorNeuralNet (const edm::ParameterSet &conf, edm::ConsumesCollector &iC)
 
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 13 of file ElectronIDSelectorNeuralNet.h.

Constructor & Destructor Documentation

ElectronIDSelectorNeuralNet::ElectronIDSelectorNeuralNet ( const edm::ParameterSet conf,
edm::ConsumesCollector &&  iC 
)
inlineexplicit

Definition at line 17 of file ElectronIDSelectorNeuralNet.h.

17  :
18  ElectronIDSelectorNeuralNet(conf, iC) {}
ElectronIDSelectorNeuralNet(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
ElectronIDSelectorNeuralNet::ElectronIDSelectorNeuralNet ( const edm::ParameterSet conf,
edm::ConsumesCollector iC 
)
explicit

Definition at line 3 of file ElectronIDSelectorNeuralNet.cc.

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

3  : conf_ (conf)
4 {
5  doNeuralNet_ = conf_.getParameter<bool> ("doNeuralNet");
6 
7  if (doNeuralNet_)
9 }
T getParameter(std::string const &) const
ElectronIDSelectorNeuralNet::~ElectronIDSelectorNeuralNet ( )
virtual

Definition at line 11 of file ElectronIDSelectorNeuralNet.cc.

References doNeuralNet_, and neuralNetAlgo_.

12 {
13  if (doNeuralNet_)
14  delete neuralNetAlgo_ ;
15 }

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().

18 {
19  if (doNeuralNet_)
21 }
void setup(const edm::ParameterSet &conf) override
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().

24 {
25  if (doNeuralNet_)
26  return static_cast<double>(neuralNetAlgo_->result (& (ele), e) );
27  return 0. ;
28 }
double result(const reco::GsfElectron *electron, const edm::Event &)

Member Data Documentation

edm::ParameterSet ElectronIDSelectorNeuralNet::conf_
private

Definition at line 29 of file ElectronIDSelectorNeuralNet.h.

Referenced by ElectronIDSelectorNeuralNet(), and newEvent().

bool ElectronIDSelectorNeuralNet::doNeuralNet_
private
ElectronNeuralNet* ElectronIDSelectorNeuralNet::neuralNetAlgo_
private