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
l1t::MicroGMTExtrapolationLUT::MicroGMTExtrapolationLUT
(
l1t::LUT
*
lut
,
const
int
type
) :
MicroGMTLUT
(lut), m_etaRedInWidth(6), m_ptRedInWidth(6)
24
{
25
m_totalInWidth
=
m_ptRedInWidth
+
m_etaRedInWidth
;
26
if
(type ==
MicroGMTConfiguration::ETA_OUT
) {
27
m_outWidth
= 4;
28
}
else
{
29
m_outWidth
= 3;
30
}
31
32
m_ptRedMask
= (1 <<
m_ptRedInWidth
) - 1;
33
m_etaRedMask
= ((1 <<
m_etaRedInWidth
) - 1) <<
m_ptRedInWidth
;
34
35
m_inputs
.push_back(
MicroGMTConfiguration::ETA_COARSE
);
36
m_inputs
.push_back(
MicroGMTConfiguration::PT
);
37
38
m_initialized
=
true
;
39
}
40
41
int
42
l1t::MicroGMTExtrapolationLUT::lookup
(
int
eta
,
int
pt
)
const
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);
47
return
lookupPacked(hashInput(checkedInput(eta, m_etaRedInWidth), checkedInput(pt, m_ptRedInWidth)));
48
}
49
int
result
= 0;
50
// normalize to out width
51
return
result
;
52
}
53
54
int
55
l1t::MicroGMTExtrapolationLUT::hashInput
(
int
eta
,
int
pt
)
const
56
{
57
int
result
= 0;
58
result += eta << m_ptRedInWidth;
59
result +=
pt
;
60
return
result
;
61
}
62
63
void
64
l1t::MicroGMTExtrapolationLUT::unHashInput
(
int
input
,
int
&
eta
,
int
&
pt
)
const
65
{
66
pt = input & m_ptRedMask;
67
eta = (input & m_etaRedMask) >> m_ptRedInWidth;
68
}
type
type
Definition:
HCALResponse.h:21
l1t::MicroGMTExtrapolationLUT::m_etaRedMask
int m_etaRedMask
Definition:
MicroGMTExtrapolationLUT.h:26
l1t::MicroGMTLUT::m_totalInWidth
unsigned m_totalInWidth
Definition:
MicroGMTLUT.h:34
l1t::MicroGMTLUT::m_initialized
bool m_initialized
Definition:
MicroGMTLUT.h:37
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:21
l1t::MicroGMTExtrapolationLUT::m_etaRedInWidth
int m_etaRedInWidth
Definition:
MicroGMTExtrapolationLUT.h:23
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
l1t::MicroGMTLUT::m_inputs
std::vector< MicroGMTConfiguration::input_t > m_inputs
Definition:
MicroGMTLUT.h:36
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:84
l1t::MicroGMTConfiguration::ETA_COARSE
Definition:
MicroGMTConfiguration.h:20
l1t::MicroGMTConfiguration::PT
Definition:
MicroGMTConfiguration.h:20
lumiPlot.lut
tuple lut
Definition:
lumiPlot.py:244
eta
Definition:
HIMultiTrackSelector.h:42
EnergyCorrector.pt
int pt
Definition:
EnergyCorrector.py:45
l1t::LUT
Definition:
LUT.h:29
l1t::MicroGMTExtrapolationLUT::m_ptRedInWidth
int m_ptRedInWidth
Definition:
MicroGMTExtrapolationLUT.h:24
alignmentValidation.fname
string fname
main script
Definition:
alignmentValidation.py:957
l1t::MicroGMTLUT::m_outWidth
unsigned m_outWidth
Definition:
MicroGMTLUT.h:35
l1t::MicroGMTExtrapolationLUT::unHashInput
void unHashInput(int input, int &angle, int &pt) const
Definition:
MicroGMTExtrapolationLUT.cc:64
l1t::MicroGMTExtrapolationLUT::hashInput
int hashInput(int angle, int pt) const
Definition:
MicroGMTExtrapolationLUT.cc:55
l1t::MicroGMTExtrapolationLUT::lookup
int lookup(int angle, int pt) const
Definition:
MicroGMTExtrapolationLUT.cc:42
l1t::MicroGMTExtrapolationLUT::m_ptRedMask
int m_ptRedMask
Definition:
MicroGMTExtrapolationLUT.h:27
Generated for CMSSW Reference Manual by
1.8.5