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 60 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 62 of file GEDPhotonProducer.cc.

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

62  {
63  // Here we will have to load the DNN PFID if present in the config
65  const auto& pset_dnn = conf.getParameter<edm::ParameterSet>("PhotonDNNPFid");
66  const auto dnnEnabled = pset_dnn.getParameter<bool>("enabled");
67  if (dnnEnabled) {
68  config.inputTensorName = pset_dnn.getParameter<std::string>("inputTensorName");
69  config.outputTensorName = pset_dnn.getParameter<std::string>("outputTensorName");
70  config.modelsFiles = pset_dnn.getParameter<std::vector<std::string>>("modelsFiles");
71  config.scalersFiles = pset_dnn.getParameter<std::vector<std::string>>("scalersFiles");
72  config.outputDim = pset_dnn.getParameter<std::vector<unsigned int>>("outputDim");
73  const auto useEBModelInGap = pset_dnn.getParameter<bool>("useEBModelInGap");
74  photonDNNEstimator = std::make_unique<PhotonDNNEstimator>(config, useEBModelInGap);
75  }
77  const auto runMVABasedHaloTagger = conf.getParameter<bool>("runMVABasedHaloTagger");
79  auto trainingFileName_ = mvaBasedHaloVariableSet.getParameter<edm::FileInPath>(("trainingFileName")).fullPath();
81  haloTaggerGBR = createGBRForest(trainingFileName_);
82  }
83  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::string fullPath() const
Definition: FileInPath.cc:161
Definition: config.py:1
std::unique_ptr< const PhotonDNNEstimator > photonDNNEstimator
dictionary config
Read in AllInOne config in JSON format.
Definition: DiMuonV_cfg.py:30
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 85 of file GEDPhotonProducer.cc.

Referenced by CacheData().

◆ photonDNNEstimator

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

Definition at line 84 of file GEDPhotonProducer.cc.

Referenced by CacheData().