File indexing completed on 2024-04-06 12:25:06
0001 #ifndef __RecoEgamma_ElectronIdentification_ElectronMVAEstimator_H__
0002 #define __RecoEgamma_ElectronIdentification_ElectronMVAEstimator_H__
0003
0004 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
0005 #include "CondFormats/GBRForest/interface/GBRForest.h"
0006
0007 #include <memory>
0008 #include <string>
0009
0010 class ElectronMVAEstimator {
0011 public:
0012 struct Configuration {
0013 std::vector<std::string> vweightsfiles;
0014 };
0015 ElectronMVAEstimator();
0016 ElectronMVAEstimator(const std::string& fileName);
0017 ElectronMVAEstimator(const Configuration&);
0018 ~ElectronMVAEstimator() { ; }
0019 double mva(const reco::GsfElectron& myElectron, int nvertices = 0) const;
0020
0021 private:
0022 const Configuration cfg_;
0023 void bindVariables(float vars[18]) const;
0024
0025 std::vector<std::unique_ptr<const GBRForest> > gbr_;
0026 };
0027
0028 #endif