L1Trigger
L1TMuon
src
MicroGMTRelativeIsolationCheckLUT.cc
Go to the documentation of this file.
1
#include "
L1Trigger/L1TMuon/interface/MicroGMTRelativeIsolationCheckLUT.h
"
2
3
l1t::MicroGMTRelativeIsolationCheckLUT::MicroGMTRelativeIsolationCheckLUT
(
const
std::string
&
fname
)
4
:
MicroGMTLUT
(), m_energySumInWidth(5), m_ptInWidth(9) {
5
m_totalInWidth
=
m_ptInWidth
+
m_energySumInWidth
;
6
m_outWidth
= 1;
7
8
m_energySumMask
= (1 <<
m_energySumInWidth
) - 1;
9
m_ptMask
= ((1 <<
m_ptInWidth
) - 1) <<
m_energySumInWidth
;
10
if
(
fname
!=
std::string
(
""
)) {
11
load
(
fname
);
12
}
13
m_inputs
.push_back(
MicroGMTConfiguration::PT
);
14
m_inputs
.push_back(
MicroGMTConfiguration::ENERGYSUM
);
15
}
16
17
l1t::MicroGMTRelativeIsolationCheckLUT::MicroGMTRelativeIsolationCheckLUT
(
l1t::LUT
* lut)
18
:
MicroGMTLUT
(lut), m_energySumInWidth(5), m_ptInWidth(9) {
19
m_totalInWidth
=
m_ptInWidth
+
m_energySumInWidth
;
20
m_outWidth
= 1;
21
22
m_energySumMask
= (1 <<
m_energySumInWidth
) - 1;
23
m_ptMask
= ((1 <<
m_ptInWidth
) - 1) <<
m_energySumInWidth
;
24
25
m_inputs
.push_back(
MicroGMTConfiguration::PT
);
26
m_inputs
.push_back(
MicroGMTConfiguration::ENERGYSUM
);
27
28
m_initialized
=
true
;
29
}
30
31
int
l1t::MicroGMTRelativeIsolationCheckLUT::lookup
(
int
energySum
,
int
pt
)
const
{
32
// normalize these two to the same scale and then calculate?
33
return
lookupPacked(hashInput(checkedInput(
energySum
, m_energySumInWidth), checkedInput(
pt
, m_ptInWidth)));
34
}
35
36
int
l1t::MicroGMTRelativeIsolationCheckLUT::hashInput
(
int
energySum
,
int
pT
)
const
{
37
int
result
= 0;
38
result
+=
energySum
<< m_ptInWidth;
39
result
+=
pT
;
40
return
result
;
41
}
42
43
void
l1t::MicroGMTRelativeIsolationCheckLUT::unHashInput
(
int
input
,
int
&
energySum
,
int
&
pt
)
const
{
44
energySum
=
input
& m_energySumMask;
45
pt
= (
input
& m_ptMask) >> m_energySumInWidth;
46
}
input
static const std::string input
Definition:
EdmProvDump.cc:48
l1t::MicroGMTRelativeIsolationCheckLUT::unHashInput
void unHashInput(int input, int &energySum, int &pt) const
Definition:
MicroGMTRelativeIsolationCheckLUT.cc:43
DiDispStaMuonMonitor_cfi.pt
pt
Definition:
DiDispStaMuonMonitor_cfi.py:39
CastorDataFrameFilter_impl::energySum
double energySum(const DataFrame &df, int fs, int ls)
Definition:
CastorDataFrameFilter.cc:22
PVValHelper::pT
Definition:
PVValidationHelpers.h:70
l1t::MicroGMTConfiguration::PT
Definition:
MicroGMTConfiguration.h:20
l1t::MicroGMTConfiguration::ENERGYSUM
Definition:
MicroGMTConfiguration.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
l1t::MicroGMTRelativeIsolationCheckLUT::m_ptInWidth
int m_ptInWidth
Definition:
MicroGMTRelativeIsolationCheckLUT.h:25
l1t::MicroGMTLUT
Definition:
MicroGMTLUT.h:14
MicroGMTRelativeIsolationCheckLUT.h
l1t::MicroGMTLUT::m_initialized
bool m_initialized
Definition:
MicroGMTLUT.h:37
l1t::MicroGMTLUT::m_totalInWidth
unsigned m_totalInWidth
Definition:
MicroGMTLUT.h:34
l1t::MicroGMTLUT::load
int load(const std::string &inFileName)
Definition:
MicroGMTLUT.cc:15
l1t::MicroGMTLUT::m_outWidth
unsigned m_outWidth
Definition:
MicroGMTLUT.h:35
alignmentValidation.fname
string fname
main script
Definition:
alignmentValidation.py:959
l1t::MicroGMTRelativeIsolationCheckLUT::m_ptMask
int m_ptMask
Definition:
MicroGMTRelativeIsolationCheckLUT.h:22
l1t::LUT
Definition:
LUT.h:29
l1t::MicroGMTRelativeIsolationCheckLUT::hashInput
int hashInput(int energySum, int pt) const
Definition:
MicroGMTRelativeIsolationCheckLUT.cc:36
l1t::MicroGMTRelativeIsolationCheckLUT::m_energySumMask
int m_energySumMask
Definition:
MicroGMTRelativeIsolationCheckLUT.h:23
l1t::MicroGMTRelativeIsolationCheckLUT::m_energySumInWidth
int m_energySumInWidth
Definition:
MicroGMTRelativeIsolationCheckLUT.h:24
l1t::MicroGMTLUT::m_inputs
std::vector< MicroGMTConfiguration::input_t > m_inputs
Definition:
MicroGMTLUT.h:36
mps_fire.result
result
Definition:
mps_fire.py:303
l1t::MicroGMTRelativeIsolationCheckLUT::MicroGMTRelativeIsolationCheckLUT
MicroGMTRelativeIsolationCheckLUT()
Definition:
MicroGMTRelativeIsolationCheckLUT.h:10
l1t::MicroGMTRelativeIsolationCheckLUT::lookup
int lookup(int energySum, int pt) const
Definition:
MicroGMTRelativeIsolationCheckLUT.cc:31
Generated for CMSSW Reference Manual by
1.8.16