Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-01-31 02:19:53

0001 #ifndef RecoBTau_JetTagComputer_GenericMVAJetTagComputer_h
0002 #define RecoBTau_JetTagComputer_GenericMVAJetTagComputer_h
0003 
0004 #include <memory>
0005 
0006 #include "CondFormats/DataRecord/interface/BTauGenericMVAJetTagComputerRcd.h"
0007 #include "DataFormats/BTauReco/interface/BaseTagInfo.h"
0008 #include "DataFormats/BTauReco/interface/TaggingVariable.h"
0009 #include "FWCore/Framework/interface/ESConsumesCollector.h"
0010 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0013 #include "RecoBTau/JetTagComputer/interface/GenericMVAComputerCache.h"
0014 #include "RecoBTau/JetTagComputer/interface/JetTagComputer.h"
0015 #include "RecoBTau/JetTagComputer/interface/TagInfoMVACategorySelector.h"
0016 
0017 class JetTagComputerRecord;
0018 
0019 class GenericMVAJetTagComputer : public JetTagComputer {
0020 public:
0021   struct Tokens {
0022     Tokens(const edm::ParameterSet &parameters, edm::ESConsumesCollector &&cc);
0023     edm::ESGetToken<PhysicsTools::Calibration::MVAComputerContainer, BTauGenericMVAJetTagComputerRcd> calib_;
0024   };
0025 
0026   GenericMVAJetTagComputer(const edm::ParameterSet &parameters, Tokens tokens);
0027   ~GenericMVAJetTagComputer() override;
0028 
0029   void initialize(const JetTagComputerRecord &) override;
0030 
0031   float discriminator(const TagInfoHelper &info) const override;
0032 
0033   virtual reco::TaggingVariableList taggingVariables(const reco::BaseTagInfo &tagInfo) const;
0034   virtual reco::TaggingVariableList taggingVariables(const TagInfoHelper &info) const;
0035 
0036   static void fillPSetDescription(edm::ParameterSetDescription &desc);
0037 
0038 private:
0039   std::unique_ptr<TagInfoMVACategorySelector> categorySelector_;
0040   GenericMVAComputerCache computerCache_;
0041   Tokens tokens_;
0042 };
0043 
0044 #endif  // RecoBTau_JetTagComputer_GenericMVAJetTagComputer_h