CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ElectronDNNEstimator.h
Go to the documentation of this file.
1 #ifndef RecoEgamma_ElectronIdentification_ElectronDNNEstimator_h
2 #define RecoEgamma_ElectronIdentification_ElectronDNNEstimator_h
3 
7 
8 #include <vector>
9 #include <memory>
10 #include <string>
11 
13 public:
14  ElectronDNNEstimator(const egammaTools::DNNConfiguration&, const bool useEBModelInGap);
15 
16  std::vector<tensorflow::Session*> getSessions() const;
17  ;
18 
19  // Function returning a map with all the possible variables and their name
20  std::map<std::string, float> getInputsVars(const reco::GsfElectron& ele) const;
21 
22  // Evaluate the DNN on all the electrons with the correct model
23  std::vector<std::vector<float>> evaluate(const reco::GsfElectronCollection& ele,
24  const std::vector<tensorflow::Session*>& sessions) const;
25 
26  // List of input variables names used to check the variables request as
27  // inputs in a dynamic way from configuration file.
28  // If an input variables is not found at construction time an expection is thrown.
29  static const std::vector<std::string> dnnAvaibleInputs;
30 
31  static constexpr float ptThreshold = 10.;
32  static constexpr float ecalBarrelMaxEtaWithGap = 1.566;
33  static constexpr float ecalBarrelMaxEtaNoGap = 1.485;
34 
35 private:
37 
38  const bool useEBModelInGap_;
39 };
40 
41 #endif
ElectronDNNEstimator(const egammaTools::DNNConfiguration &, const bool useEBModelInGap)
std::map< std::string, float > getInputsVars(const reco::GsfElectron &ele) const
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
static const std::vector< std::string > dnnAvaibleInputs
static constexpr float ptThreshold
static constexpr float ecalBarrelMaxEtaWithGap
std::vector< tensorflow::Session * > getSessions() const
const egammaTools::EgammaDNNHelper dnnHelper_
std::vector< std::vector< float > > evaluate(const reco::GsfElectronCollection &ele, const std::vector< tensorflow::Session * > &sessions) const
static constexpr float ecalBarrelMaxEtaNoGap