CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
JetResolution.h
Go to the documentation of this file.
1 #ifndef JetResolution_h
2 #define JetResolution_h
3 
4 // 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
5 // -DSTANDALONE to the command line
6 // In standalone mode, no reference to CMSSW exists, so the only way to retrieve resolutions and scale factors are from text files.
7 
9 
10 #ifndef STANDALONE
11 namespace edm {
12  class EventSetup;
13 }
14 #endif
15 
16 
17 namespace JME {
18  class JetResolution {
19  public:
21  JetResolution(const JetResolutionObject& object);
23  // Empty
24  }
25 
26 #ifndef STANDALONE
27  static const JetResolution get(const edm::EventSetup&, const std::string&);
28 #endif
29 
30  float getResolution(const JetParameters& parameters) const;
31 
32  void dump() const {
33  m_object->dump();
34  }
35 
36  // Advanced usage
38  return m_object.get();
39  }
40 
41  private:
42  std::shared_ptr<JetResolutionObject> m_object;
43  };
44 
46  public:
50  // Empty
51  }
52 
53 #ifndef STANDALONE
54  static const JetResolutionScaleFactor get(const edm::EventSetup&, const std::string&);
55 #endif
56 
57  float getScaleFactor(const JetParameters& parameters, Variation variation = Variation::NOMINAL) const;
58 
59  void dump() const {
60  m_object->dump();
61  }
62 
63  // Advanced usage
65  return m_object.get();
66  }
67 
68  private:
69  std::shared_ptr<JetResolutionObject> m_object;
70  };
71 
72 };
73 
74 #endif
75 
dictionary parameters
Definition: Parameters.py:2
float getResolution(const JetParameters &parameters) const
const JetResolutionObject * getResolutionObject() const
Definition: JetResolution.h:64
std::shared_ptr< JetResolutionObject > m_object
Definition: JetResolution.h:42
void dump() const
Definition: JetResolution.h:32
std::shared_ptr< JetResolutionObject > m_object
Definition: JetResolution.h:69
const JetResolutionObject * getResolutionObject() const
Definition: JetResolution.h:37
float getScaleFactor(const JetParameters &parameters, Variation variation=Variation::NOMINAL) const
tuple filename
Definition: lut2db_cfg.py:20