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 {
6  m_outWidth = 1;
7 
9  m_ptMask = ((1 << m_ptInWidth) - 1) << m_energySumInWidth;
10  if (fname != std::string("")) {
11  load(fname);
12  }
15 }
16 
17 int
19 {
20  // normalize these two to the same scale and then calculate?
21  return lookupPacked(hashInput(checkedInput(energySum, m_energySumInWidth), checkedInput(pt, m_ptInWidth)));
22 }
23 
24 int
26 {
27  int result = 0;
28  result += energySum << m_ptInWidth;
29  result += pT;
30  return result;
31 }
32 
33 void
35 {
36  energySum = input & m_energySumMask;
37  pt = (input & m_ptMask) >> m_energySumInWidth;
38 }
unsigned m_totalInWidth
Definition: MicroGMTLUT.h:33
void unHashInput(int input, int &energySum, int &pt) const
int load(const std::string &inFileName)
Definition: MicroGMTLUT.cc:14
std::vector< MicroGMTConfiguration::input_t > m_inputs
Definition: MicroGMTLUT.h:35
static std::string const input
Definition: EdmProvDump.cc:44
tuple result
Definition: mps_fire.py:95
string fname
main script
unsigned m_outWidth
Definition: MicroGMTLUT.h:34
double energySum(const DataFrame &df, int fs, int ls)