TIMBER  beta
Tree Interface for Making Binned Events with RDataFrame
JME_common.h
1 #ifndef _TIMBER_JME_COMMON
2 #define _TIMBER_JME_COMMON
3 #include "CondFormats/JetMETObjects/interface/JetCorrectorParameters.h"
4 #include "CondFormats/JetMETObjects/interface/JetCorrectionUncertainty.h"
5 #include "JetMETCorrections/Modules/interface/JetResolution.h"
6 #include "common.h"
7 
8 using str = std::string;
9 
14 class JMEpaths {
15  protected:
19  const str _timberPath;
23  const str _jmeArchivePath;
29 
30  public:
34  JMEpaths();
43  str _GetPath(str tarfile, str jmefile);
51  str _GetTxtFileStr(str tarfile, str jmefile);
52 };
57 class JESpaths : JMEpaths {
58  private:
59  const str _jecTag, _jetType;
60  const str _jesArchivePath;
61  str GetLevelStr(str level);
62  str GetPath(str level);
63 
64  public:
68  JESpaths();
75  JESpaths(str jecTag, str jetType);
82  str GetTxtFileStr(str level);
90  JetCorrectorParameters GetParameters(str level, str uncertType = "");
91 };
96 class JERpaths : JMEpaths {
97  private:
98  const str _jerTag, _jetType;
99  const str _jerArchivePath;
100 
101  str GetPath(str resOrSF);
102  str GetTxtFileStr(str resOrSF);
103 
104  public:
108  JERpaths();
116  JERpaths(str jerTag, str jetType);
122  JME::JetResolution GetResolution();
128  JME::JetResolutionScaleFactor GetSF();
129 };
130 #endif
C++ class to handle the extraction of JES objects (aka JEC) starting from the JEC tags and jet types...
Definition: JME_common.h:57
const str _jmeArchivePath
Full path to the tarball archives being accessed.
Definition: JME_common.h:23
JMEpaths()
Construct a new JMEpaths object.
Definition: JME_common.cc:5
const str _timberPath
Full path to TIMBER's home.
Definition: JME_common.h:19
str _GetPath(str tarfile, str jmefile)
Extract jmefile from tarfile into a temporary directory and return the path to that directory...
Definition: JME_common.cc:10
str _GetTxtFileStr(str tarfile, str jmefile)
Extract jmefile from tarfile into a string which is returned.
Definition: JME_common.cc:15
C++ class to handle the extraction of JER objects starting from the JER tags and jet types...
Definition: JME_common.h:96
C++ class. Parent class to handle shared attributes and methods among JESpaths and JERpaths...
Definition: JME_common.h:14
C++ class. Creates a temporary directory that is destroyed on delete.
Definition: common.h:348
TempDir _tempdir
Temporary directory object which makes and deletes a staging area for the extracted JME text files...
Definition: JME_common.h:28