File indexing completed on 2023-03-17 11:10:43
0001 #ifndef JetMETCorrections_JetCorrector_JetCorrector_h
0002 #define JetMETCorrections_JetCorrector_JetCorrector_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <memory>
0023
0024
0025 #include "JetMETCorrections/JetCorrector/interface/JetCorrectorImpl.h"
0026 #include "DataFormats/Common/interface/RefToBase.h"
0027 #include "DataFormats/JetReco/interface/Jet.h"
0028
0029
0030
0031 namespace reco {
0032
0033 class JetCorrector {
0034 public:
0035 JetCorrector();
0036 JetCorrector(std::unique_ptr<JetCorrectorImpl const> fImpl) : impl_(std::move(fImpl)) {}
0037 JetCorrector(JetCorrector&&) = default;
0038 JetCorrector& operator=(JetCorrector&&) = default;
0039 JetCorrector(const JetCorrector&) = delete;
0040 JetCorrector& operator=(const JetCorrector&) = delete;
0041
0042 typedef reco::Particle::LorentzVector LorentzVector;
0043
0044
0045
0046 double correction(const LorentzVector& fJet) const { return impl_->correction(fJet); }
0047
0048
0049 double correction(const reco::Jet& fJet) const { return impl_->correction(fJet); }
0050
0051
0052 double correction(const reco::Jet& fJet, const edm::RefToBase<reco::Jet>& fJetRef) const {
0053 return impl_->correction(fJet, fJetRef);
0054 }
0055
0056
0057 double correction(const reco::Jet& fJet, const edm::RefToBase<reco::Jet>& fJetRef, LorentzVector& corrected) const {
0058 return impl_->correction(fJet, fJetRef, corrected);
0059 }
0060
0061
0062 bool refRequired() const { return impl_->refRequired(); }
0063
0064
0065 bool vectorialCorrection() const { return impl_->vectorialCorrection(); }
0066
0067
0068
0069
0070
0071 private:
0072
0073 std::unique_ptr<JetCorrectorImpl const> impl_;
0074 };
0075 }
0076
0077 #endif