Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RecoBTag_CTagging_CharmTagger_h
0002 #define RecoBTag_CTagging_CharmTagger_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/CombinedSVSoftLeptonComputer.h"
0009 #include "DataFormats/BTauReco/interface/TaggingVariable.h"
0010 #include "RecoBTau/JetTagComputer/interface/JetTagComputerRecord.h"
0011 
0012 #include <memory>
0013 
0014 /** \class CharmTagger
0015  *  \author M. Verzetti, U. Rochester, N.Y.
0016  *  copied from ElectronTagger.h
0017  */
0018 
0019 class CharmTagger : public JetTagComputer {
0020 public:
0021   struct Tokens {
0022     Tokens(const edm::ParameterSet& configuration, edm::ESConsumesCollector&& cc);
0023     edm::ESGetToken<GBRForest, GBRWrapperRcd> gbrForest_;
0024   };
0025 
0026   /// explicit ctor
0027   CharmTagger(const edm::ParameterSet&, Tokens);
0028   ~CharmTagger() override;  //{}
0029   float discriminator(const TagInfoHelper& tagInfo) const override;
0030   void initialize(const JetTagComputerRecord& record) override;
0031 
0032   typedef std::vector<edm::ParameterSet> vpset;
0033 
0034   struct MVAVar {
0035     std::string name;
0036     reco::btau::TaggingVariableName id;
0037     size_t index;
0038     bool has_index;
0039     float default_value;
0040   };
0041 
0042 private:
0043   std::unique_ptr<TMVAEvaluator> mvaID_;
0044   CombinedSVSoftLeptonComputer sl_computer_;
0045   std::vector<MVAVar> variables_;
0046 
0047   std::string mva_name_;
0048   edm::FileInPath weight_file_;
0049   bool use_GBRForest_;
0050   bool use_adaBoost_;
0051   bool defaultValueNoTracks_;
0052   Tokens tokens_;
0053 };
0054 
0055 #endif