00001 #ifndef JetResolution_h
00002 #define JetResolution_h
00003
00004
00005
00006
00007 #define STANDALONE
00008
00009 #include "JetResolutionObject.h"
00010
00011 #ifndef STANDALONE
00012 namespace edm {
00013 class EventSetup;
00014 }
00015 #endif
00016
00017
00018 namespace JME {
00019 class JetResolution {
00020 public:
00021 JetResolution(const std::string& filename);
00022 JetResolution(const JetResolutionObject& object);
00023 JetResolution() {
00024
00025 }
00026
00027 #ifndef STANDALONE
00028 static const JetResolution get(const edm::EventSetup&, const std::string&);
00029 #endif
00030
00031 float getResolution(const JetParameters& parameters) const;
00032
00033 void dump() const {
00034 m_object->dump();
00035 }
00036
00037
00038 const JetResolutionObject* getResolutionObject() const {
00039 return m_object.get();
00040 }
00041
00042 private:
00043 std::shared_ptr<JetResolutionObject> m_object;
00044 };
00045
00046 class JetResolutionScaleFactor {
00047 public:
00048 JetResolutionScaleFactor(const std::string& filename);
00049 JetResolutionScaleFactor(const JetResolutionObject& object);
00050 JetResolutionScaleFactor() {
00051
00052 }
00053
00054 #ifndef STANDALONE
00055 static const JetResolutionScaleFactor get(const edm::EventSetup&, const std::string&);
00056 #endif
00057
00058 float getScaleFactor(const JetParameters& parameters,
00059 Variation variation = Variation::NOMINAL,
00060 std::string uncertaintySource = "") const;
00061
00062 void dump() const {
00063 m_object->dump();
00064 }
00065
00066
00067 const JetResolutionObject* getResolutionObject() const {
00068 return m_object.get();
00069 }
00070
00071 private:
00072 std::shared_ptr<JetResolutionObject> m_object;
00073 };
00074
00075 }
00076
00077 #endif
00078