File indexing completed on 2023-03-17 11:17:56
0001 #ifndef __ElectronIdentification_SoftElectronMVAEstimator_H__
0002 #define __ElectronIdentification_SoftElectronMVAEstimator_H__
0003
0004 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
0005 #include "DataFormats/VertexReco/interface/Vertex.h"
0006 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0007 #include "CondFormats/GBRForest/interface/GBRForest.h"
0008
0009 #include <memory>
0010 #include <string>
0011
0012 class SoftElectronMVAEstimator {
0013 public:
0014 constexpr static unsigned int ExpectedNBins = 1;
0015
0016 struct Configuration {
0017 std::vector<std::string> vweightsfiles;
0018 };
0019 SoftElectronMVAEstimator(const Configuration&);
0020 ~SoftElectronMVAEstimator();
0021 double mva(const reco::GsfElectron& myElectron, const reco::VertexCollection&) const;
0022
0023 private:
0024 void bindVariables(float vars[25]) const;
0025 void init();
0026
0027 private:
0028 const Configuration cfg_;
0029 std::vector<std::unique_ptr<const GBRForest> > gbr_;
0030 };
0031
0032 #endif