DESY Hbb Analysis Framework
JetResolution.h
Go to the documentation of this file.
1 #ifndef Analysis_Tools_JetResolution_h
2 #define Analysis_Tools_JetResolution_h
3 
4 // Original code: CMSSW_10_2_22 - JetMETCorrections/Modules/interface/JetResolution.h
5 
6 // If you want to use the JER code in standalone mode, you'll need to create a new define named 'STANDALONE'. If you use gcc for compiling, you'll need to add
7 // -DSTANDALONE to the command line
8 // In standalone mode, no reference to CMSSW exists, so the only way to retrieve resolutions and scale factors are from text files.
9 
11 
12 namespace JME {
13  class JetResolution {
14  public:
15  JetResolution(const std::string& filename);
16  JetResolution(const JetResolutionObject& object);
18  // Empty
19  }
20 
21  float getResolution(const JetParameters& parameters) const;
22 
23  void dump() const {
24  m_object->dump();
25  }
26 
27  // Advanced usage
29  return m_object.get();
30  }
31 
32  private:
33  std::shared_ptr<JetResolutionObject> m_object;
34  };
35 
37  public:
38  JetResolutionScaleFactor(const std::string& filename);
41  // Empty
42  }
43 
44  float getScaleFactor(const JetParameters& parameters,
45  Variation variation = Variation::NOMINAL,
46  std::string uncertaintySource = "") const;
47 
48  void dump() const {
49  m_object->dump();
50  }
51 
52  // Advanced usage
54  return m_object.get();
55  }
56 
57  private:
58  std::shared_ptr<JetResolutionObject> m_object;
59  };
60 
61 };
62 
63 #endif
64 
const JetResolutionObject * getResolutionObject() const
Definition: JetResolution.h:53
std::shared_ptr< JetResolutionObject > m_object
Definition: JetResolution.h:33
void dump() const
Definition: JetResolution.h:23
float getResolution(const JetParameters &parameters) const
std::shared_ptr< JetResolutionObject > m_object
Definition: JetResolution.h:58
const JetResolutionObject * getResolutionObject() const
Definition: JetResolution.h:28