Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RecoBTag_SoftLepton_ElectronTagger_h
0002 #define RecoBTag_SoftLepton_ElectronTagger_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/SoftLepton/interface/LeptonSelector.h"
0009 #include "CondFormats/DataRecord/interface/GBRWrapperRcd.h"
0010 
0011 /** \class ElectronTagger
0012  *
0013  *
0014  *  \author P. Demin - UCL, Louvain-la-Neuve - Belgium
0015  *
0016  */
0017 
0018 class ElectronTagger : public JetTagComputer {
0019 public:
0020   struct Tokens {
0021     Tokens(const edm::ParameterSet &cfg, edm::ESConsumesCollector &&cc);
0022     edm::ESGetToken<GBRForest, GBRWrapperRcd> gbrForest_;
0023   };
0024 
0025   /// explicit ctor
0026   ElectronTagger(const edm::ParameterSet &, Tokens);
0027   void initialize(const JetTagComputerRecord &) override;
0028   float discriminator(const TagInfoHelper &tagInfo) const override;
0029 
0030 private:
0031   const btag::LeptonSelector m_selector;
0032   const edm::FileInPath m_weightFile;
0033   const bool m_useGBRForest;
0034   const bool m_useAdaBoost;
0035   const Tokens m_tokens;
0036 
0037   std::unique_ptr<TMVAEvaluator> mvaID;
0038 };
0039 
0040 #endif