Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-18 08:23:32

0001 #ifndef HLTrigger_btau_HLTSumJetTag_h
0002 #define HLTrigger_btau_HLTSumJetTag_h
0003 
0004 #include <vector>
0005 
0006 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0007 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0009 #include "FWCore/Framework/interface/Frameworkfwd.h"
0010 #include "FWCore/Framework/interface/MakerMacros.h"
0011 #include "DataFormats/BTauReco/interface/JetTag.h"
0012 #include "HLTrigger/HLTcore/interface/HLTFilter.h"
0013 
0014 template <typename T>
0015 class HLTSumJetTag : public HLTFilter {
0016 public:
0017   explicit HLTSumJetTag(const edm::ParameterSet& config);
0018   ~HLTSumJetTag() override = default;
0019 
0020   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0021 
0022   bool hltFilter(edm::Event& event,
0023                  const edm::EventSetup& setup,
0024                  trigger::TriggerFilterObjectWithRefs& filterproduct) const override;
0025 
0026 private:
0027   bool findTagValueByMinDeltaR2(float& jetTagValue,
0028                                 const T& jet,
0029                                 const reco::JetTagCollection& jetTags,
0030                                 float maxDeltaR2) const;
0031 
0032   const edm::InputTag m_Jets;     // input jet collection
0033   const edm::InputTag m_JetTags;  // input tag collection
0034   const edm::EDGetTokenT<std::vector<T>> m_JetsToken;
0035   const edm::EDGetTokenT<reco::JetTagCollection> m_JetTagsToken;
0036   const double m_MinTag;       // min tag value
0037   const double m_MaxTag;       // max tag value
0038   const int m_MinJetToSum;     // min number of jets to be considered in the sum
0039   const int m_MaxJetToSum;     // max number of jets to be considered in the sum
0040   const bool m_UseMeanValue;   // consider mean of jet tags instead of their sum
0041   const bool m_MatchByDeltaR;  // find jet-tag value by Delta-R matching
0042   const bool m_MaxDeltaR;      // max Delta-R to assign jet-tag to a jet via Delta-R matching
0043   const int m_TriggerType;     // type of TriggerObject in TriggerFilterObjectWithRefs
0044 };
0045 
0046 #endif