CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
CacheData Class Reference

Public Member Functions

 CacheData (const edm::ParameterSet &conf)
 

Public Attributes

std::unique_ptr< const GBRForesthaloTaggerGBR
 
std::unique_ptr< const PhotonDNNEstimatorphotonDNNEstimator
 

Detailed Description

Definition at line 57 of file GEDPhotonProducer.cc.

Constructor & Destructor Documentation

◆ CacheData()

CacheData::CacheData ( const edm::ParameterSet conf)
inline

for MVA based beam halo tagger in the EE

Definition at line 59 of file GEDPhotonProducer.cc.

References submitPVResolutionJobs::config, createGBRForest(), edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), haloTaggerGBR, gedPhotons_cfi::mvaBasedHaloVariableSet, photonDNNEstimator, gedPhotons_cfi::runMVABasedHaloTagger, AlCaHLTBitMon_QueryRunRegistry::string, and particleFlowTmpBarrel_cfi::useEBModelInGap.

59  {
60  // Here we will have to load the DNN PFID if present in the config
62  const auto& pset_dnn = conf.getParameter<edm::ParameterSet>("PhotonDNNPFid");
63  const auto dnnEnabled = pset_dnn.getParameter<bool>("enabled");
64  if (dnnEnabled) {
65  config.inputTensorName = pset_dnn.getParameter<std::string>("inputTensorName");
66  config.outputTensorName = pset_dnn.getParameter<std::string>("outputTensorName");
67  config.modelsFiles = pset_dnn.getParameter<std::vector<std::string>>("modelsFiles");
68  config.scalersFiles = pset_dnn.getParameter<std::vector<std::string>>("scalersFiles");
69  config.outputDim = pset_dnn.getParameter<std::vector<unsigned int>>("outputDim");
70  const auto useEBModelInGap = pset_dnn.getParameter<bool>("useEBModelInGap");
71  photonDNNEstimator = std::make_unique<PhotonDNNEstimator>(config, useEBModelInGap);
72  }
74  const auto runMVABasedHaloTagger = conf.getParameter<bool>("runMVABasedHaloTagger");
76  auto trainingFileName_ = mvaBasedHaloVariableSet.getParameter<edm::FileInPath>(("trainingFileName")).fullPath();
78  haloTaggerGBR = createGBRForest(trainingFileName_);
79  }
80  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::string fullPath() const
Definition: FileInPath.cc:161
Definition: config.py:1
std::unique_ptr< const PhotonDNNEstimator > photonDNNEstimator
config
parse the configuration file
std::unique_ptr< const GBRForest > createGBRForest(const std::string &weightsFile)
std::unique_ptr< const GBRForest > haloTaggerGBR

Member Data Documentation

◆ haloTaggerGBR

std::unique_ptr<const GBRForest> CacheData::haloTaggerGBR

Definition at line 82 of file GEDPhotonProducer.cc.

Referenced by CacheData().

◆ photonDNNEstimator

std::unique_ptr<const PhotonDNNEstimator> CacheData::photonDNNEstimator

Definition at line 81 of file GEDPhotonProducer.cc.

Referenced by CacheData().