File indexing completed on 2024-04-06 12:24:23
0001 #ifndef RecoBTau_JetTagComputer_CombinedMVAV2JetTagComputer_h
0002 #define RecoBTau_JetTagComputer_CombinedMVAV2JetTagComputer_h
0003
0004 #include <string>
0005 #include <memory>
0006 #include <vector>
0007 #include <map>
0008
0009 #include "FWCore/Framework/interface/ESConsumesCollector.h"
0010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0011 #include "CommonTools/MVAUtils/interface/TMVAEvaluator.h"
0012 #include "CondFormats/DataRecord/interface/GBRWrapperRcd.h"
0013 #include "RecoBTau/JetTagComputer/interface/JetTagComputer.h"
0014
0015 class CombinedMVAV2JetTagComputer : public JetTagComputer {
0016 public:
0017 struct Tokens {
0018 Tokens(const edm::ParameterSet ¶meters, edm::ESConsumesCollector &&cc);
0019 edm::ESGetToken<GBRForest, GBRWrapperRcd> gbrForest_;
0020 std::vector<edm::ESGetToken<JetTagComputer, JetTagComputerRecord> > computers_;
0021 };
0022
0023 CombinedMVAV2JetTagComputer(const edm::ParameterSet ¶meters, Tokens tokens);
0024 ~CombinedMVAV2JetTagComputer() override;
0025
0026 void initialize(const JetTagComputerRecord &record) override;
0027
0028 float discriminator(const TagInfoHelper &info) const override;
0029
0030 private:
0031 std::vector<const JetTagComputer *> computers;
0032
0033 const std::string mvaName;
0034 const std::vector<std::string> variables;
0035 const std::vector<std::string> spectators;
0036 const edm::FileInPath weightFile;
0037 const bool useGBRForest;
0038 const bool useAdaBoost;
0039 const Tokens tokens;
0040
0041 std::unique_ptr<TMVAEvaluator> mvaID;
0042 };
0043
0044 #endif