Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:24

0001 // Generic LX jet corrector class. Inherits from JetCorrector.h
0002 #ifndef LXXXCorrectorImpl_h
0003 #define LXXXCorrectorImpl_h
0004 
0005 #include "JetMETCorrections/JetCorrector/interface/JetCorrectorImpl.h"
0006 #include "JetMETCorrections/Algorithms/interface/JetCorrectorImplMakerBase.h"
0007 #include "CondFormats/JetMETObjects/interface/FactorizedJetCorrectorCalculator.h"
0008 #include "CondFormats/JetMETObjects/interface/JetCorrectorParameters.h"
0009 
0010 //----- classes declaration -----------------------------------
0011 namespace edm {
0012   class ParameterSet;
0013   class Event;
0014   class EventSetup;
0015   class ConsumesCollector;
0016   class ConfigurationDescriptions;
0017 }  // namespace edm
0018 class FactorizedJetCorrector;
0019 
0020 class LXXXCorrectorImplMaker : public JetCorrectorImplMakerBase {
0021 public:
0022   LXXXCorrectorImplMaker(edm::ParameterSet const&, edm::ConsumesCollector);
0023   std::unique_ptr<reco::JetCorrectorImpl> make(edm::Event const&, edm::EventSetup const&);
0024 
0025   static void fillDescriptions(edm::ConfigurationDescriptions& iDescriptions);
0026 };
0027 
0028 //----- LXXXCorrectorImpl interface -------------------------------
0029 class LXXXCorrectorImpl : public reco::JetCorrectorImpl {
0030 public:
0031   typedef LXXXCorrectorImplMaker Maker;
0032 
0033   //----- constructors---------------------------------------
0034   LXXXCorrectorImpl(std::shared_ptr<FactorizedJetCorrectorCalculator const> calculator, unsigned int level);
0035 
0036   //----- apply correction using Jet information only -------
0037   double correction(const LorentzVector& fJet) const override;
0038 
0039   //----- apply correction using Jet information only -------
0040   double correction(const reco::Jet& fJet) const override;
0041 
0042   //----- if correction needs a jet reference -------------
0043   bool refRequired() const override { return false; }
0044 
0045 private:
0046   //----- member data ---------------------------------------
0047   unsigned int mLevel;
0048   std::shared_ptr<FactorizedJetCorrectorCalculator const> mCorrector;
0049 };
0050 
0051 #endif