#include <EgammaDNNHelper.h>
Public Member Functions | |
EgammaDNNHelper (const DNNConfiguration &, const ModelSelector &sel, const std::vector< std::string > &availableVars) | |
std::vector< std::pair< uint, std::vector< float > > > | evaluate (const std::vector< std::map< std::string, float >> &candidates, const std::vector< tensorflow::Session *> &sessions) const |
std::pair< uint, std::vector< float > > | getScaledInputs (const std::map< std::string, float > &variables) const |
std::vector< tensorflow::Session * > | getSessions () const |
Private Member Functions | |
void | initScalerFiles (const std::vector< std::string > &availableVars) |
void | initTensorFlowGraphs () |
Private Attributes | |
const DNNConfiguration | cfg_ |
std::vector< std::vector< ScalerConfiguration > > | featuresMap_ |
std::vector< std::unique_ptr< const tensorflow::GraphDef > > | graphDefs_ |
const ModelSelector | modelSelector_ |
std::vector< uint > | nInputs_ |
uint | nModels_ |
Definition at line 41 of file EgammaDNNHelper.h.
EgammaDNNHelper::EgammaDNNHelper | ( | const DNNConfiguration & | cfg, |
const ModelSelector & | sel, | ||
const std::vector< std::string > & | availableVars | ||
) |
Definition at line 9 of file EgammaDNNHelper.cc.
References initScalerFiles(), and initTensorFlowGraphs().
std::vector< std::pair< uint, std::vector< float > > > EgammaDNNHelper::evaluate | ( | const std::vector< std::map< std::string, float >> & | candidates, |
const std::vector< tensorflow::Session *> & | sessions | ||
) | const |
Definition at line 101 of file EgammaDNNHelper.cc.
References a, b, HLT_2024v14_cff::candidates, cfg_, dqmiodumpmetadata::counts, data, ALCARECOEcalPhiSym_cff::float, getScaledInputs(), mps_fire::i, PixelMapPlotter::inputs, egammaTools::DNNConfiguration::inputTensorName, isotrackApplyRegressor::k, LogDebug, visualization-live-secondInstance_cfg::m, nInputs_, nModels_, convertSQLitetoXML_cfg::output, egammaTools::DNNConfiguration::outputDim, PatBasicFWLiteJetAnalyzer_Selector_cfg::outputs, egammaTools::DNNConfiguration::outputTensorName, mps_fire::result, tensorflow::run(), jetUpdater_cfi::sort, HcalDetIdTransform::transform(), and parallelization::uint.
Referenced by ElectronDNNEstimator::evaluate(), and PhotonDNNEstimator::evaluate().
std::pair< uint, std::vector< float > > EgammaDNNHelper::getScaledInputs | ( | const std::map< std::string, float > & | variables | ) | const |
Definition at line 77 of file EgammaDNNHelper.cc.
References featuresMap_, PixelMapPlotter::inputs, modelSelector_, pfMETCorrectionType0_cfi::par1, pfMETCorrectionType0_cfi::par2, and EcalPhiSymFlatTableProducers_cfi::variables.
Referenced by evaluate().
std::vector< tensorflow::Session * > EgammaDNNHelper::getSessions | ( | ) | const |
Definition at line 28 of file EgammaDNNHelper.cc.
References tensorflow::createSession(), graphDefs_, LogDebug, and nModels_.
Referenced by ElectronDNNEstimator::getSessions(), and PhotonDNNEstimator::getSessions().
|
private |
Definition at line 39 of file EgammaDNNHelper.cc.
References cfg_, Exception, lowptgsfeleseed::features(), featuresMap_, spr::find(), edm::FileInPath::fullPath(), nInputs_, pfMETCorrectionType0_cfi::par1, pfMETCorrectionType0_cfi::par2, egammaTools::DNNConfiguration::scalersFiles, AlCaHLTBitMon_QueryRunRegistry::string, parallelization::uint, and egammaTools::ScalerConfiguration::varName.
Referenced by EgammaDNNHelper().
|
private |
Definition at line 17 of file EgammaDNNHelper.cc.
References cfg_, contentValuesFiles::fullPath, graphDefs_, mps_fire::i, tensorflow::loadGraphDef(), LogDebug, egammaTools::DNNConfiguration::modelsFiles, and nModels_.
Referenced by EgammaDNNHelper().
|
private |
Definition at line 60 of file EgammaDNNHelper.h.
Referenced by evaluate(), initScalerFiles(), and initTensorFlowGraphs().
|
private |
Definition at line 70 of file EgammaDNNHelper.h.
Referenced by getScaledInputs(), and initScalerFiles().
|
private |
Definition at line 67 of file EgammaDNNHelper.h.
Referenced by getSessions(), and initTensorFlowGraphs().
|
private |
Definition at line 61 of file EgammaDNNHelper.h.
Referenced by getScaledInputs().
|
private |
Definition at line 65 of file EgammaDNNHelper.h.
Referenced by evaluate(), and initScalerFiles().
|
private |
Definition at line 63 of file EgammaDNNHelper.h.
Referenced by evaluate(), getSessions(), and initTensorFlowGraphs().