File indexing completed on 2025-01-31 02:19:51
0001 #ifndef RecoBTag_Combined_HeavyIonCSVTagger_h
0002 #define RecoBTag_Combined_HeavyIonCSVTagger_h
0003
0004 #include "FWCore/Framework/interface/ESConsumesCollector.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 #include "CommonTools/MVAUtils/interface/TMVAEvaluator.h"
0007 #include "RecoBTau/JetTagComputer/interface/JetTagComputer.h"
0008 #include "RecoBTag/SecondaryVertex/interface/CombinedSVComputer.h"
0009 #include "DataFormats/BTauReco/interface/TaggingVariable.h"
0010 #include "RecoBTau/JetTagComputer/interface/JetTagComputerRecord.h"
0011
0012 #include <memory>
0013 #include <type_traits>
0014
0015
0016
0017
0018
0019
0020 class HeavyIonCSVTagger : public JetTagComputer {
0021 public:
0022 struct Tokens {
0023 Tokens(const edm::ParameterSet& configuration, edm::ESConsumesCollector&& cc);
0024 edm::ESGetToken<GBRForest, GBRWrapperRcd> gbrForest_;
0025 };
0026
0027
0028 HeavyIonCSVTagger(const edm::ParameterSet&, Tokens);
0029 ~HeavyIonCSVTagger() override;
0030 float discriminator(const TagInfoHelper& tagInfo) const override;
0031 void initialize(const JetTagComputerRecord& record) override;
0032
0033 static void fillPSetDescription(edm::ParameterSetDescription& desc);
0034
0035 typedef std::vector<edm::ParameterSet> vpset;
0036
0037 struct MVAVar {
0038 std::string name;
0039 reco::btau::TaggingVariableName id;
0040 size_t index;
0041 bool has_index;
0042 float default_value;
0043 };
0044
0045 private:
0046 std::unique_ptr<TMVAEvaluator> mvaID_;
0047 CombinedSVComputer sv_computer_;
0048 std::vector<MVAVar> variables_;
0049
0050 std::string mva_name_;
0051 edm::FileInPath weight_file_;
0052 bool use_GBRForest_;
0053 bool use_adaBoost_;
0054 Tokens tokens_;
0055 };
0056
0057 #endif