Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-25 02:29:55

0001 #ifndef RecoEgamma_ElectronIdentification_ElectronDNNEstimator_h
0002 #define RecoEgamma_ElectronIdentification_ElectronDNNEstimator_h
0003 
0004 #include "RecoEgamma/EgammaTools/interface/EgammaDNNHelper.h"
0005 #include "PhysicsTools/TensorFlow/interface/TensorFlow.h"
0006 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
0007 
0008 #include <vector>
0009 #include <memory>
0010 #include <string>
0011 
0012 class ElectronDNNEstimator {
0013 public:
0014   ElectronDNNEstimator(const egammaTools::DNNConfiguration&, const bool useEBModelInGap);
0015 
0016   // Function returning a map with all the possible variables and their name
0017   std::map<std::string, float> getInputsVars(const reco::GsfElectron& ele) const;
0018 
0019   // Evaluate the DNN on all the electrons with the correct model
0020   std::vector<std::pair<uint, std::vector<float>>> evaluate(const reco::GsfElectronCollection& ele) const;
0021 
0022   // List of input variables names used to check the variables request as
0023   // inputs in a dynamic way from configuration file.
0024   // If an input variables is not found at construction time an expection is thrown.
0025   static const std::vector<std::string> dnnAvaibleInputs;
0026 
0027   static constexpr float ptThreshold = 10.;
0028   static constexpr float ecalBarrelMaxEtaWithGap = 1.566;
0029   static constexpr float ecalBarrelMaxEtaNoGap = 1.485;
0030   static constexpr float endcapBoundary = 2.5;
0031   static constexpr float extEtaBoundary = 2.65;
0032 
0033 private:
0034   const egammaTools::EgammaDNNHelper dnnHelper_;
0035 
0036   const bool useEBModelInGap_;
0037 };
0038 
0039 #endif