Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
L1Trigger
L1TMuon
src
MicroGMTExtrapolationLUT.cc
Go to the documentation of this file.
1
#include "../interface/MicroGMTExtrapolationLUT.h"
2
3
l1t::MicroGMTExtrapolationLUT::MicroGMTExtrapolationLUT
(
const
std::string
&
fname
,
const
int
type
) :
MicroGMTLUT
(), m_etaRedInWidth(6), m_ptRedInWidth(6)
4
{
5
m_totalInWidth
=
m_ptRedInWidth
+
m_etaRedInWidth
;
6
if
(type ==
MicroGMTConfiguration::ETA_OUT
) {
7
m_outWidth
= 4;
8
}
else
{
9
m_outWidth
= 3;
10
}
11
12
m_ptRedMask
= (1 <<
m_ptRedInWidth
) - 1;
13
m_etaRedMask
= ((1 <<
m_etaRedInWidth
) - 1) <<
m_ptRedInWidth
;
14
15
m_inputs
.push_back(
MicroGMTConfiguration::ETA_COARSE
);
16
m_inputs
.push_back(
MicroGMTConfiguration::PT
);
17
18
if
(fname !=
std::string
(
""
)) {
19
load
(fname);
20
}
21
}
22
23
int
24
l1t::MicroGMTExtrapolationLUT::lookup
(
int
eta
,
int
pt
)
const
25
{
26
// normalize these two to the same scale and then calculate?
27
if
(m_initialized) {
28
// unsigned eta_twocomp = MicroGMTConfiguration::getTwosComp(eta, m_etaRedInWidth);
29
return
lookupPacked(hashInput(checkedInput(eta, m_etaRedInWidth), checkedInput(pt, m_ptRedInWidth)));
30
}
31
int
result
= 0;
32
// normalize to out width
33
return
result
;
34
}
35
36
int
37
l1t::MicroGMTExtrapolationLUT::hashInput
(
int
eta
,
int
pt
)
const
38
{
39
int
result
= 0;
40
result += eta << m_ptRedInWidth;
41
result +=
pt
;
42
return
result
;
43
}
44
45
void
46
l1t::MicroGMTExtrapolationLUT::unHashInput
(
int
input
,
int
&
eta
,
int
&
pt
)
const
47
{
48
pt = input & m_ptRedMask;
49
eta = (input & m_etaRedMask) >> m_ptRedInWidth;
50
}
type
type
Definition:
HCALResponse.h:21
l1t::MicroGMTExtrapolationLUT::m_etaRedMask
int m_etaRedMask
Definition:
MicroGMTExtrapolationLUT.h:25
l1t::MicroGMTLUT::m_totalInWidth
unsigned m_totalInWidth
Definition:
MicroGMTLUT.h:33
l1t::MicroGMTExtrapolationLUT::MicroGMTExtrapolationLUT
MicroGMTExtrapolationLUT()
Definition:
MicroGMTExtrapolationLUT.h:12
l1t::MicroGMTConfiguration::ETA_OUT
Definition:
MicroGMTConfiguration.h:23
l1t::MicroGMTLUT::load
int load(const std::string &inFileName)
Definition:
MicroGMTLUT.cc:14
l1t::MicroGMTExtrapolationLUT::m_etaRedInWidth
int m_etaRedInWidth
Definition:
MicroGMTExtrapolationLUT.h:22
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
l1t::MicroGMTLUT::m_inputs
std::vector< MicroGMTConfiguration::input_t > m_inputs
Definition:
MicroGMTLUT.h:35
l1t::MicroGMTLUT
Definition:
MicroGMTLUT.h:14
input
static std::string const input
Definition:
EdmProvDump.cc:44
mps_fire.result
tuple result
Definition:
mps_fire.py:95
l1t::MicroGMTConfiguration::ETA_COARSE
Definition:
MicroGMTConfiguration.h:20
l1t::MicroGMTConfiguration::PT
Definition:
MicroGMTConfiguration.h:20
eta
Definition:
HIMultiTrackSelector.h:42
EnergyCorrector.pt
int pt
Definition:
EnergyCorrector.py:45
l1t::MicroGMTExtrapolationLUT::m_ptRedInWidth
int m_ptRedInWidth
Definition:
MicroGMTExtrapolationLUT.h:23
alignmentValidation.fname
string fname
main script
Definition:
alignmentValidation.py:957
l1t::MicroGMTLUT::m_outWidth
unsigned m_outWidth
Definition:
MicroGMTLUT.h:34
l1t::MicroGMTExtrapolationLUT::unHashInput
void unHashInput(int input, int &angle, int &pt) const
Definition:
MicroGMTExtrapolationLUT.cc:46
l1t::MicroGMTExtrapolationLUT::hashInput
int hashInput(int angle, int pt) const
Definition:
MicroGMTExtrapolationLUT.cc:37
l1t::MicroGMTExtrapolationLUT::lookup
int lookup(int angle, int pt) const
Definition:
MicroGMTExtrapolationLUT.cc:24
l1t::MicroGMTExtrapolationLUT::m_ptRedMask
int m_ptRedMask
Definition:
MicroGMTExtrapolationLUT.h:26
Generated for CMSSW Reference Manual by
1.8.5