test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MicroGMTRelativeIsolationCheckLUT.cc
Go to the documentation of this file.
1 #include "../interface/MicroGMTRelativeIsolationCheckLUT.h"
2 
4 {
5  getParameters(iConfig, setName.c_str());
6 }
7 
9 {
10  getParameters(iConfig, setName);
11 }
12 
13 void
15 {
17  m_energySumInWidth = config.getParameter<int>("areaSum_in_width");
18  m_ptInWidth = config.getParameter<int>("pT_in_width");
19 
20  m_totalInWidth = m_ptInWidth + m_energySumInWidth;
21 
22  m_ptMask = (1 << m_ptInWidth) - 1;
23  m_energySumMask = (1 << (m_totalInWidth - 1)) - m_ptMask;
24  std::string m_fname = config.getParameter<std::string>("filename");
25  if (m_fname != std::string("")) {
26  load(m_fname);
27  }
28  m_inputs.push_back(MicroGMTConfiguration::PT);
29  m_inputs.push_back(MicroGMTConfiguration::ETA);
30 }
31 
32 
34 {
35 
36 }
37 
38 int
40 {
41  // normalize these two to the same scale and then calculate?
42  return lookupPacked(hashInput(checkedInput(energySum, m_energySumInWidth), checkedInput(pt, m_ptInWidth)));
43 }
44 
45 int
47 {
48  int result = 0;
49  result += energySum << m_ptInWidth;
50  result += pT;
51  return result;
52 }
53 
54 void
56 {
57  energySum = input & m_energySumMask;
58  pt = (input & m_ptMask) >> m_energySumInWidth;
59 }
T getParameter(std::string const &) const
void unHashInput(int input, int &energySum, int &pt) const
static std::string const input
Definition: EdmProvDump.cc:43
def getParameters
Definition: cfg-viewer.py:438
MicroGMTRelativeIsolationCheckLUT(const edm::ParameterSet &iConfig, const std::string &setName)
tuple result
Definition: query.py:137
def load
Definition: svgfig.py:546
void getParameters(const edm::ParameterSet &iConfig, const char *setName)
double energySum(const DataFrame &df, int fs, int ls)