Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:23

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 /** \class HeavyIonCSVTagger
0016  *  \author M. Nguyen
0017  *  copied from CharmTagger.h (by M. Verzetti)
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   /// explicit ctor
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   typedef std::vector<edm::ParameterSet> vpset;
0034 
0035   struct MVAVar {
0036     std::string name;
0037     reco::btau::TaggingVariableName id;
0038     size_t index;
0039     bool has_index;
0040     float default_value;
0041   };
0042 
0043 private:
0044   std::unique_ptr<TMVAEvaluator> mvaID_;
0045   CombinedSVComputer sv_computer_;
0046   std::vector<MVAVar> variables_;
0047 
0048   std::string mva_name_;
0049   edm::FileInPath weight_file_;
0050   bool use_GBRForest_;
0051   bool use_adaBoost_;
0052   Tokens tokens_;
0053 };
0054 
0055 #endif