CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
l1t::MicroGMTExtrapolationLUT Class Reference

#include <MicroGMTExtrapolationLUT.h>

Inheritance diagram for l1t::MicroGMTExtrapolationLUT:
l1t::MicroGMTLUT l1t::LUT

Public Member Functions

int hashInput (int angle, int pt) const
 
int lookup (int angle, int pt) const
 
 MicroGMTExtrapolationLUT ()
 
 MicroGMTExtrapolationLUT (const std::string &fname, const int type)
 
 MicroGMTExtrapolationLUT (l1t::LUT *lut, const int type)
 
void unHashInput (int input, int &angle, int &pt) const
 
virtual ~MicroGMTExtrapolationLUT ()
 
- Public Member Functions inherited from l1t::MicroGMTLUT
int checkedInput (unsigned in, unsigned maxWidth) const
 
void initialize ()
 
int load (const std::string &inFileName)
 
virtual int lookupPacked (int input) const
 
 MicroGMTLUT ()
 
 MicroGMTLUT (l1t::LUT *lut)
 
void save (std::ofstream &output)
 
virtual ~MicroGMTLUT ()
 
- Public Member Functions inherited from l1t::LUT
int data (unsigned int address) const
 
bool empty () const
 
 LUT ()
 
 LUT (std::istream &stream)
 
unsigned int maxSize () const
 
unsigned int nrBitsAddress () const
 
unsigned int nrBitsData () const
 
int read (std::istream &stream)
 
void write (std::ostream &stream) const
 
 ~LUT ()
 

Private Attributes

int m_etaRedInWidth
 
int m_etaRedMask
 
int m_ptRedInWidth
 
int m_ptRedMask
 

Additional Inherited Members

- Public Types inherited from l1t::LUT
enum  ReadCodes {
  SUCCESS =0, NO_ENTRIES =1, DUP_ENTRIES =2, MISS_ENTRIES =3,
  MAX_ADDRESS_OUTOFRANGE =4, NO_HEADER =5
}
 
- Protected Attributes inherited from l1t::MicroGMTLUT
bool m_initialized
 
std::vector
< MicroGMTConfiguration::input_t
m_inputs
 
unsigned m_outWidth
 
unsigned m_totalInWidth
 

Detailed Description

Definition at line 10 of file MicroGMTExtrapolationLUT.h.

Constructor & Destructor Documentation

l1t::MicroGMTExtrapolationLUT::MicroGMTExtrapolationLUT ( )
inline

Definition at line 12 of file MicroGMTExtrapolationLUT.h.

12 {};
l1t::MicroGMTExtrapolationLUT::MicroGMTExtrapolationLUT ( const std::string &  fname,
const int  type 
)
explicit

Definition at line 3 of file MicroGMTExtrapolationLUT.cc.

References l1t::MicroGMTConfiguration::ETA_COARSE, l1t::MicroGMTConfiguration::ETA_OUT, l1t::MicroGMTLUT::load(), m_etaRedInWidth, m_etaRedMask, l1t::MicroGMTLUT::m_inputs, l1t::MicroGMTLUT::m_outWidth, m_ptRedInWidth, m_ptRedMask, l1t::MicroGMTLUT::m_totalInWidth, l1t::MicroGMTConfiguration::PT, and AlCaHLTBitMon_QueryRunRegistry::string.

4 {
7  m_outWidth = 4;
8  } else {
9  m_outWidth = 3;
10  }
11 
12  m_ptRedMask = (1 << m_ptRedInWidth) - 1;
14 
17 
18  if (fname != std::string("")) {
19  load(fname);
20  }
21 }
type
Definition: HCALResponse.h:21
unsigned m_totalInWidth
Definition: MicroGMTLUT.h:34
int load(const std::string &inFileName)
Definition: MicroGMTLUT.cc:21
std::vector< MicroGMTConfiguration::input_t > m_inputs
Definition: MicroGMTLUT.h:36
string fname
main script
unsigned m_outWidth
Definition: MicroGMTLUT.h:35
l1t::MicroGMTExtrapolationLUT::MicroGMTExtrapolationLUT ( l1t::LUT lut,
const int  type 
)
explicit

Definition at line 23 of file MicroGMTExtrapolationLUT.cc.

References l1t::MicroGMTConfiguration::ETA_COARSE, l1t::MicroGMTConfiguration::ETA_OUT, m_etaRedInWidth, m_etaRedMask, l1t::MicroGMTLUT::m_initialized, l1t::MicroGMTLUT::m_inputs, l1t::MicroGMTLUT::m_outWidth, m_ptRedInWidth, m_ptRedMask, l1t::MicroGMTLUT::m_totalInWidth, and l1t::MicroGMTConfiguration::PT.

24 {
27  m_outWidth = 4;
28  } else {
29  m_outWidth = 3;
30  }
31 
32  m_ptRedMask = (1 << m_ptRedInWidth) - 1;
34 
37 
38  m_initialized = true;
39 }
type
Definition: HCALResponse.h:21
unsigned m_totalInWidth
Definition: MicroGMTLUT.h:34
std::vector< MicroGMTConfiguration::input_t > m_inputs
Definition: MicroGMTLUT.h:36
unsigned m_outWidth
Definition: MicroGMTLUT.h:35
virtual l1t::MicroGMTExtrapolationLUT::~MicroGMTExtrapolationLUT ( )
inlinevirtual

Definition at line 15 of file MicroGMTExtrapolationLUT.h.

15 {};

Member Function Documentation

int l1t::MicroGMTExtrapolationLUT::hashInput ( int  angle,
int  pt 
) const

Definition at line 55 of file MicroGMTExtrapolationLUT.cc.

References EnergyCorrector::pt, and mps_fire::result.

56 {
57  int result = 0;
58  result += eta << m_ptRedInWidth;
59  result += pt;
60  return result;
61 }
tuple result
Definition: mps_fire.py:84
int l1t::MicroGMTExtrapolationLUT::lookup ( int  angle,
int  pt 
) const

Definition at line 42 of file MicroGMTExtrapolationLUT.cc.

References mps_fire::result.

43 {
44  // normalize these two to the same scale and then calculate?
45  if (m_initialized) {
46  // unsigned eta_twocomp = MicroGMTConfiguration::getTwosComp(eta, m_etaRedInWidth);
48  }
49  int result = 0;
50  // normalize to out width
51  return result;
52 }
virtual int lookupPacked(int input) const
Definition: MicroGMTLUT.cc:37
int checkedInput(unsigned in, unsigned maxWidth) const
Definition: MicroGMTLUT.cc:62
tuple result
Definition: mps_fire.py:84
int hashInput(int angle, int pt) const
void l1t::MicroGMTExtrapolationLUT::unHashInput ( int  input,
int &  angle,
int &  pt 
) const

Member Data Documentation

int l1t::MicroGMTExtrapolationLUT::m_etaRedInWidth
private

Definition at line 23 of file MicroGMTExtrapolationLUT.h.

Referenced by MicroGMTExtrapolationLUT().

int l1t::MicroGMTExtrapolationLUT::m_etaRedMask
private

Definition at line 26 of file MicroGMTExtrapolationLUT.h.

Referenced by MicroGMTExtrapolationLUT().

int l1t::MicroGMTExtrapolationLUT::m_ptRedInWidth
private

Definition at line 24 of file MicroGMTExtrapolationLUT.h.

Referenced by MicroGMTExtrapolationLUT().

int l1t::MicroGMTExtrapolationLUT::m_ptRedMask
private

Definition at line 27 of file MicroGMTExtrapolationLUT.h.

Referenced by MicroGMTExtrapolationLUT().