CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
JetCorrector.h
Go to the documentation of this file.
1 #ifndef JetMETCorrections_JetCorrector_JetCorrector_h
2 #define JetMETCorrections_JetCorrector_JetCorrector_h
3 // -*- C++ -*-
4 //
5 // Package: JetMETCorrections/JetCorrector
6 // Class : reco::JetCorrector
7 //
16 //
17 // Original Author: Christopher Jones
18 // Created: Fri, 29 Aug 2014 15:42:37 GMT
19 //
20 
21 // system include files
22 #include <memory>
23 
24 // user include files
25 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
27 #endif
30 
31 // forward declarations
32 
33 namespace reco {
34 
36  {
37 
38  public:
39  JetCorrector();
40 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
41  JetCorrector(std::unique_ptr<JetCorrectorImpl const> fImpl):impl_(std::move(fImpl)) {}
42 
44 
45  // ---------- const member functions ---------------------
47  double correction (const LorentzVector& fJet) const {
48  return impl_->correction(fJet);
49  }
50 
52  double correction (const reco::Jet& fJet) const {
53  return impl_->correction(fJet);
54  }
55 
57  double correction (const reco::Jet& fJet,
58  const edm::RefToBase<reco::Jet>& fJetRef) const {
59  return impl_->correction(fJet,fJetRef);
60  }
61 
63  double correction ( const reco::Jet& fJet,
64  const edm::RefToBase<reco::Jet>& fJetRef,
65  LorentzVector& corrected ) const {
66  return impl_->correction(fJet,fJetRef,corrected);
67  }
68 
70  bool refRequired () const {
71  return impl_->refRequired();
72  }
73 
75  bool vectorialCorrection () const {
76  return impl_->vectorialCorrection();
77  }
78 
79  // ---------- static member functions --------------------
80 
81  // ---------- member functions ---------------------------
82  void swap(JetCorrector& iOther) {
83  std::swap(impl_,iOther.impl_);
84  }
85 
86  private:
87  JetCorrector(const JetCorrector&) = delete;
88 
89  JetCorrector& operator=(const JetCorrector&) = delete;
90  JetCorrector& operator=(JetCorrector&&) = default;
91 
92  // ---------- member data --------------------------------
93  std::unique_ptr<JetCorrectorImpl const> impl_;
94 #else
95  private:
96  JetCorrector(const JetCorrector&);
97  const JetCorrector& operator=(const JetCorrector&);
98 #endif
99  };
100 }
101 
102 #endif
double correction(const reco::Jet &fJet, const edm::RefToBase< reco::Jet > &fJetRef, LorentzVector &corrected) const
Apply vectorial correction.
Definition: JetCorrector.h:63
Base class for all types of Jets.
Definition: Jet.h:20
bool refRequired() const
if correction needs the jet reference
Definition: JetCorrector.h:70
double correction(const LorentzVector &fJet) const
get correction using Jet information only
Definition: JetCorrector.h:47
double correction(const reco::Jet &fJet, const edm::RefToBase< reco::Jet > &fJetRef) const
apply correction using Ref
Definition: JetCorrector.h:57
JetCorrector & operator=(const JetCorrector &)=delete
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
def move
Definition: eostools.py:510
double correction(const reco::Jet &fJet) const
apply correction using Jet information only
Definition: JetCorrector.h:52
void swap(JetCorrector &iOther)
Definition: JetCorrector.h:82
reco::Particle::LorentzVector LorentzVector
Definition: JetCorrector.h:43
bool vectorialCorrection() const
if vectorial correction is provided
Definition: JetCorrector.h:75
std::unique_ptr< JetCorrectorImpl const > impl_
Definition: JetCorrector.h:93
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
JetCorrector(std::unique_ptr< JetCorrectorImpl const > fImpl)
Definition: JetCorrector.h:41