CMS 3D CMS Logo

SCProducerCache.h
Go to the documentation of this file.
1 #ifndef RecoEcal_EgammaCoreTools_SCProducerCache_h
2 #define RecoEcal_EgammaCoreTools_SCProducerCache_h
3 
6 
7 namespace reco {
8 
10  public:
11  // Cache for SuperCluster Producer containing Tensorflow objects
13  // Here we will have to load the DNN PFID if present in the config
14  auto clustering_type = conf.getParameter<std::string>("ClusteringType");
15 
16  if (clustering_type == "DeepSC") {
17  const auto& pset_dnn = conf.getParameter<edm::ParameterSet>("deepSuperClusterConfig");
18  config.modelFile = pset_dnn.getParameter<std::string>("modelFile");
19  config.configFileClusterFeatures = pset_dnn.getParameter<std::string>("configFileClusterFeatures");
20  config.configFileWindowFeatures = pset_dnn.getParameter<std::string>("configFileWindowFeatures");
21  config.configFileHitsFeatures = pset_dnn.getParameter<std::string>("configFileHitsFeatures");
22  config.nClusterFeatures = pset_dnn.getParameter<uint>("nClusterFeatures");
23  config.nWindowFeatures = pset_dnn.getParameter<uint>("nWindowFeatures");
24  config.nHitsFeatures = pset_dnn.getParameter<uint>("nHitsFeatures");
25  config.maxNClusters = pset_dnn.getParameter<uint>("maxNClusters");
26  config.maxNRechits = pset_dnn.getParameter<uint>("maxNRechits");
27  config.batchSize = pset_dnn.getParameter<uint>("batchSize");
28  config.collectionStrategy = pset_dnn.getParameter<std::string>("collectionStrategy");
29  deepSCEvaluator = std::make_unique<DeepSCGraphEvaluation>(config);
30  }
31  };
32 
33  std::unique_ptr<const DeepSCGraphEvaluation> deepSCEvaluator;
35  };
36 } // namespace reco
37 
38 #endif
reco::DeepSCConfiguration config
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Definition: config.py:1
SCProducerCache(const edm::ParameterSet &conf)
fixed size matrix
std::unique_ptr< const DeepSCGraphEvaluation > deepSCEvaluator