CMS 3D CMS Logo

PhotonDNNEstimator.h
Go to the documentation of this file.
1 #ifndef RecoEgamma_PhotonIdentification_PhotonDNNEstimator_h
2 #define RecoEgamma_PhotonIdentification_PhotonDNNEstimator_h
3 
8 
9 #include <vector>
10 #include <memory>
11 #include <string>
12 
14 public:
16 
17  std::vector<tensorflow::Session*> getSessions() const;
18  ;
19 
20  // Function returning a map with all the possible variables and their name
21  std::map<std::string, float> getInputsVars(const reco::Photon& ele) const;
22 
23  // Evaluate the DNN on all the electrons with the correct model
24  std::vector<std::pair<uint, std::vector<float>>> evaluate(const reco::PhotonCollection& ele,
25  const std::vector<tensorflow::Session*>& sessions) const;
26 
27  // List of input variables names used to check the variables request as
28  // inputs in a dynamic way from configuration file.
29  // If an input variables is not found at construction time an expection is thrown.
30  static const std::vector<std::string> dnnAvaibleInputs;
31 
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
std::map< std::string, float > getInputsVars(const reco::Photon &ele) const
std::vector< std::pair< uint, std::vector< float > > > evaluate(const reco::PhotonCollection &ele, const std::vector< tensorflow::Session *> &sessions) const
std::vector< tensorflow::Session * > getSessions() const
static constexpr float ecalBarrelMaxEtaWithGap
static constexpr float ecalBarrelMaxEtaNoGap
const egammaTools::EgammaDNNHelper dnnHelper_
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
static const std::vector< std::string > dnnAvaibleInputs
PhotonDNNEstimator(const egammaTools::DNNConfiguration &, const bool useEBModelInGap)