CMS 3D CMS Logo

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 ElectronDNNEstimatoriElectronDNNEstimator
 
std::unique_ptr< const ElectronMVAEstimatoriElectronMVAEstimator
 
std::unique_ptr< const SoftElectronMVAEstimatorsElectronMVAEstimator
 

Detailed Description

Definition at line 56 of file GsfElectronAlgo.h.

Constructor & Destructor Documentation

◆ HeavyObjectCache()

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

Definition at line 42 of file GsfElectronAlgo.cc.

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

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

Member Data Documentation

◆ iElectronDNNEstimator

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

Definition at line 61 of file GsfElectronAlgo.h.

◆ iElectronMVAEstimator

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

Definition at line 60 of file GsfElectronAlgo.h.

◆ sElectronMVAEstimator

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

Definition at line 59 of file GsfElectronAlgo.h.

Referenced by GsfElectronAlgo::createElectron().