CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
GsfElectronAlgo::HeavyObjectCache Class Reference

#include <GsfElectronAlgo.h>

Public Member Functions

 HeavyObjectCache (const edm::ParameterSet &)
 

Public Attributes

std::unique_ptr< const
ElectronDNNEstimator
iElectronDNNEstimator
 
std::unique_ptr< const
ElectronMVAEstimator
iElectronMVAEstimator
 
std::unique_ptr< const
SoftElectronMVAEstimator
sElectronMVAEstimator
 

Detailed Description

Definition at line 56 of file GsfElectronAlgo.h.

Constructor & Destructor Documentation

GsfElectronAlgo::HeavyObjectCache::HeavyObjectCache ( const edm::ParameterSet conf)

Definition at line 39 of file GsfElectronAlgo.cc.

References edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, parallelization::uint(), ElectronMVAEstimator::Configuration::vweightsfiles, and SoftElectronMVAEstimator::Configuration::vweightsfiles.

39  {
40  // soft electron MVA
42  sconfig.vweightsfiles = conf.getParameter<std::vector<std::string>>("SoftElecMVAFilesString");
43  sElectronMVAEstimator = std::make_unique<SoftElectronMVAEstimator>(sconfig);
44  // isolated electron MVA
46  iconfig.vweightsfiles = conf.getParameter<std::vector<std::string>>("ElecMVAFilesString");
47  iElectronMVAEstimator = std::make_unique<ElectronMVAEstimator>(iconfig);
48 
49  // Here we will have to load the DNN PFID if present in the config
51  const auto& pset_dnn = conf.getParameter<edm::ParameterSet>("EleDNNPFid");
52  const bool dnnEnabled = pset_dnn.getParameter<bool>("enabled");
53  if (dnnEnabled) {
54  dconfig.inputTensorName = pset_dnn.getParameter<std::string>("inputTensorName");
55  dconfig.outputTensorName = pset_dnn.getParameter<std::string>("outputTensorName");
56  dconfig.modelsFiles = pset_dnn.getParameter<std::vector<std::string>>("modelsFiles");
57  dconfig.scalersFiles = pset_dnn.getParameter<std::vector<std::string>>("scalersFiles");
58  dconfig.outputDim = pset_dnn.getParameter<uint>("outputDim");
59  const auto useEBModelInGap = pset_dnn.getParameter<bool>("useEBModelInGap");
60  iElectronDNNEstimator = std::make_unique<ElectronDNNEstimator>(dconfig, useEBModelInGap);
61  }
62 }
std::unique_ptr< const ElectronMVAEstimator > iElectronMVAEstimator
std::unique_ptr< const ElectronDNNEstimator > iElectronDNNEstimator
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< std::string > vweightsfiles
std::unique_ptr< const SoftElectronMVAEstimator > sElectronMVAEstimator

Member Data Documentation

std::unique_ptr<const ElectronDNNEstimator> GsfElectronAlgo::HeavyObjectCache::iElectronDNNEstimator

Definition at line 61 of file GsfElectronAlgo.h.

std::unique_ptr<const ElectronMVAEstimator> GsfElectronAlgo::HeavyObjectCache::iElectronMVAEstimator

Definition at line 60 of file GsfElectronAlgo.h.

std::unique_ptr<const SoftElectronMVAEstimator> GsfElectronAlgo::HeavyObjectCache::sElectronMVAEstimator

Definition at line 59 of file GsfElectronAlgo.h.

Referenced by GsfElectronAlgo::createElectron().