CMS 3D CMS Logo

MicroGMTRelativeIsolationCheckLUT.cc
Go to the documentation of this file.
2 
4  : MicroGMTLUT(), m_energySumInWidth(5), m_ptInWidth(9) {
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 
20  m_outWidth = 1;
21 
23  m_ptMask = ((1 << m_ptInWidth) - 1) << m_energySumInWidth;
24 
27 
28  m_initialized = true;
29 }
30 
32  // normalize these two to the same scale and then calculate?
34 }
35 
37  int result = 0;
38  result += energySum << m_ptInWidth;
39  result += pT;
40  return result;
41 }
42 
44  energySum = input & m_energySumMask;
45  pt = (input & m_ptMask) >> m_energySumInWidth;
46 }
unsigned m_totalInWidth
Definition: MicroGMTLUT.h:34
void unHashInput(int input, int &energySum, int &pt) const
int load(const std::string &inFileName)
Definition: MicroGMTLUT.cc:15
virtual int lookupPacked(int input) const
Definition: MicroGMTLUT.cc:30
int checkedInput(unsigned in, unsigned maxWidth) const
Definition: MicroGMTLUT.cc:51
std::vector< MicroGMTConfiguration::input_t > m_inputs
Definition: MicroGMTLUT.h:36
static std::string const input
Definition: EdmProvDump.cc:48
Definition: LUT.h:29
string fname
main script
unsigned m_outWidth
Definition: MicroGMTLUT.h:35
double energySum(const DataFrame &df, int fs, int ls)