File indexing completed on 2025-01-31 02:19:51
0001 #ifndef RecoBTag_Combined_CandidateChargeBTagComputer_h
0002 #define RecoBTag_Combined_CandidateChargeBTagComputer_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 "DataFormats/BTauReco/interface/CandIPTagInfo.h"
0008 #include "DataFormats/BTauReco/interface/CandSecondaryVertexTagInfo.h"
0009 #include "DataFormats/BTauReco/interface/CandSoftLeptonTagInfo.h"
0010 #include "RecoBTau/JetTagComputer/interface/JetTagComputer.h"
0011 #include "RecoBTau/JetTagComputer/interface/JetTagComputerRecord.h"
0012 #include "CondFormats/DataRecord/interface/GBRWrapperRcd.h"
0013 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0014 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0015
0016 class CandidateChargeBTagComputer : public JetTagComputer {
0017 public:
0018 struct Tokens {
0019 Tokens(const edm::ParameterSet ¶meters, edm::ESConsumesCollector &&cc);
0020 edm::ESGetToken<GBRForest, GBRWrapperRcd> gbrForest_;
0021 };
0022
0023 CandidateChargeBTagComputer(const edm::ParameterSet ¶meters, Tokens tokens);
0024 ~CandidateChargeBTagComputer() override;
0025 void initialize(const JetTagComputerRecord &record) override;
0026 float discriminator(const TagInfoHelper &tagInfo) const override;
0027 static void fillPSetDescription(edm::ParameterSetDescription &desc);
0028
0029 private:
0030 const edm::FileInPath weightFile_;
0031 const bool useAdaBoost_;
0032 std::unique_ptr<TMVAEvaluator> mvaID;
0033 const double jetChargeExp_;
0034 const double svChargeExp_;
0035 const Tokens tokens_;
0036 };
0037
0038 #endif