File indexing completed on 2024-04-06 12:19:15
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef L6SLBCorrectorImpl_h
0010 #define L6SLBCorrectorImpl_h
0011
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013 #include "FWCore/Utilities/interface/EDGetToken.h"
0014 #include "JetMETCorrections/JetCorrector/interface/JetCorrectorImpl.h"
0015 #include "JetMETCorrections/Algorithms/interface/JetCorrectorImplMakerBase.h"
0016 #include "CondFormats/JetMETObjects/interface/FactorizedJetCorrectorCalculator.h"
0017 #include "DataFormats/BTauReco/interface/SoftLeptonTagInfo.h"
0018
0019 namespace edm {
0020 class ParameterSet;
0021 class Event;
0022 class EventSetup;
0023 class ConsumesCollector;
0024 class ConfigurationDescriptions;
0025 }
0026
0027 class L6SLBCorrectorImplMaker : public JetCorrectorImplMakerBase {
0028 public:
0029 L6SLBCorrectorImplMaker(edm::ParameterSet const&, edm::ConsumesCollector);
0030 std::unique_ptr<reco::JetCorrectorImpl> make(edm::Event const&, edm::EventSetup const&);
0031
0032 static void fillDescriptions(edm::ConfigurationDescriptions& iDescriptions);
0033
0034 private:
0035 edm::EDGetTokenT<std::vector<reco::SoftLeptonTagInfo>> elecToken_;
0036 edm::EDGetTokenT<std::vector<reco::SoftLeptonTagInfo>> muonToken_;
0037 bool addMuonToJet_;
0038 };
0039
0040 class L6SLBCorrectorImpl : public reco::JetCorrectorImpl {
0041
0042
0043
0044 public:
0045 typedef L6SLBCorrectorImplMaker Maker;
0046
0047 L6SLBCorrectorImpl(std::shared_ptr<FactorizedJetCorrectorCalculator const> corrector,
0048 edm::RefProd<std::vector<reco::SoftLeptonTagInfo>> const& bTagInfoMuon,
0049 edm::RefProd<std::vector<reco::SoftLeptonTagInfo>> const& bTagInfoElec,
0050 bool addMuonToJet);
0051
0052
0053
0054
0055 public:
0056
0057 double correction(const LorentzVector& fJet) const override;
0058
0059 double correction(const reco::Jet& fJet) const override;
0060
0061 double correction(const reco::Jet& fJet, const edm::RefToBase<reco::Jet>& refToRawJet) const override;
0062
0063
0064 bool refRequired() const override { return true; }
0065
0066
0067
0068
0069 private:
0070 int getBTagInfoIndex(const edm::RefToBase<reco::Jet>& refToRawJet,
0071 const std::vector<reco::SoftLeptonTagInfo>& tags) const;
0072
0073
0074
0075
0076 private:
0077
0078
0079 std::shared_ptr<FactorizedJetCorrectorCalculator const> corrector_;
0080 edm::RefProd<std::vector<reco::SoftLeptonTagInfo>> bTagInfoMuon_;
0081 edm::RefProd<std::vector<reco::SoftLeptonTagInfo>> bTagInfoElec_;
0082 bool addMuonToJet_;
0083 };
0084
0085 #endif