CMS 3D CMS Logo

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:
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  static constexpr float endcapBoundary = 2.5;
35  static constexpr float extEtaBoundary = 2.65;
36 
37 private:
39 
40  const bool useEBModelInGap_;
41 };
42 
43 #endif
ElectronDNNEstimator(const egammaTools::DNNConfiguration &, const bool useEBModelInGap)
std::map< std::string, float > getInputsVars(const reco::GsfElectron &ele) const
std::vector< tensorflow::Session * > getSessions() const
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
static const std::vector< std::string > dnnAvaibleInputs
static constexpr float ptThreshold
static constexpr float ecalBarrelMaxEtaWithGap
static constexpr float extEtaBoundary
std::vector< std::vector< float > > evaluate(const reco::GsfElectronCollection &ele, const std::vector< tensorflow::Session *> &sessions) const
const egammaTools::EgammaDNNHelper dnnHelper_
static constexpr float endcapBoundary
static constexpr float ecalBarrelMaxEtaNoGap