File indexing completed on 2024-09-07 04:37:29
0001 #ifndef RecoEgamma_EgammaTools_AnyMVAEstimatorRun2Base_H
0002 #define RecoEgamma_EgammaTools_AnyMVAEstimatorRun2Base_H
0003
0004
0005
0006
0007
0008
0009 #include <string>
0010 #include <vector>
0011
0012 namespace edm {
0013 class ParameterSet;
0014 }
0015
0016 namespace reco {
0017 class Candidate;
0018 }
0019
0020 class AnyMVAEstimatorRun2Base {
0021 public:
0022
0023 AnyMVAEstimatorRun2Base(const edm::ParameterSet& conf);
0024
0025 AnyMVAEstimatorRun2Base(const ::std::string& mvaName, const ::std::string& mvaTag, int nCategories, bool debug)
0026 : name_(mvaName), tag_(mvaTag), nCategories_(nCategories), debug_(debug) {}
0027 virtual ~AnyMVAEstimatorRun2Base() {}
0028
0029
0030
0031
0032
0033 virtual float mvaValue(const reco::Candidate* candidate,
0034 std::vector<float> const& auxVariables,
0035 int& iCategory) const = 0;
0036 float mvaValue(const reco::Candidate* candidate, std::vector<float> const& auxVariables) const {
0037 int iCategory;
0038 return mvaValue(candidate, auxVariables, iCategory);
0039 };
0040
0041
0042
0043
0044 virtual int findCategory(const reco::Candidate* candidate) const = 0;
0045 int getNCategories() const { return nCategories_; }
0046 const std::string& getName() const { return name_; }
0047
0048
0049
0050 const std::string& getTag() const { return tag_; }
0051
0052 bool isDebug() const { return debug_; }
0053
0054
0055
0056
0057
0058
0059
0060 private:
0061
0062
0063
0064 const std::string name_;
0065
0066
0067
0068
0069 const std::string tag_;
0070
0071
0072 const int nCategories_;
0073
0074 const bool debug_;
0075 };
0076
0077 #endif