CMS 3D CMS Logo

L1GctHfEtSumsLut.cc
Go to the documentation of this file.
2 
4 
5 //DEFINE STATICS
6 const int L1GctHfEtSumsLut::NAddress = 8;
7 const int L1GctHfEtSumsLut::NData = 3;
8 
10  : L1GctLut<NAddress, NData>(), m_lutFunction(scale), m_lutType(type) {
11  if (scale != nullptr)
12  m_setupOk = true;
13 }
14 
16  : L1GctLut<NAddress, NData>(), m_lutFunction(nullptr), m_lutType(type) {}
17 
18 L1GctHfEtSumsLut::L1GctHfEtSumsLut() : L1GctLut<NAddress, NData>(), m_lutFunction(nullptr), m_lutType() {}
19 
21  : L1GctLut<NAddress, NData>(), m_lutFunction(lut.lutFunction()), m_lutType(lut.lutType()) {}
22 
24 
25 uint16_t L1GctHfEtSumsLut::value(const uint16_t lutAddress) const { return m_lutFunction->rank(lutAddress); }
26 
27 std::vector<double> L1GctHfEtSumsLut::getThresholdsGeV() const { return m_lutFunction->getThresholds(); }
28 
29 std::vector<unsigned> L1GctHfEtSumsLut::getThresholdsGct() const {
30  std::vector<unsigned> result;
31  std::vector<double> thresholdsGeV = m_lutFunction->getThresholds();
32  for (std::vector<double>::const_iterator thr = thresholdsGeV.begin(); thr != thresholdsGeV.end(); thr++) {
33  result.push_back(static_cast<unsigned>((*thr) / (m_lutFunction->linearLsb())));
34  }
35  return result;
36 }
37 
39  const L1GctHfEtSumsLut& temp(lut);
40  return temp;
41 }
42 
43 std::ostream& operator<<(std::ostream& os, const L1GctHfEtSumsLut& lut) {
44  os << "===L1GctHfEtSumsLut===" << std::endl;
45  std::vector<double> thresholds = lut.m_lutFunction->getThresholds();
46  std::vector<double>::const_iterator thr = thresholds.begin();
47  os << "Thresholds are: " << *(thr++);
48  for (; thr != thresholds.end(); thr++) {
49  os << ", " << *thr;
50  }
51  os << std::endl;
52  os << "\n===Lookup table contents===\n" << std::endl;
54  os << *temp;
55  return os;
56 }
57 
L1GctHfEtSumsLut::getThresholdsGeV
std::vector< double > getThresholdsGeV() const
Get thresholds.
Definition: L1GctHfEtSumsLut.cc:27
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
particleFlowZeroSuppressionECAL_cff.thresholds
thresholds
Definition: particleFlowZeroSuppressionECAL_cff.py:31
L1GctHfEtSumsLut::NData
static const int NData
Definition: L1GctHfEtSumsLut.h:37
L1GctHfEtSumsLut::hfLutType
hfLutType
Definition: L1GctHfEtSumsLut.h:24
L1GctHfEtSumsLut::value
uint16_t value(const uint16_t lutAddress) const override
Definition: L1GctHfEtSumsLut.cc:25
L1GctHfEtSumsLut::~L1GctHfEtSumsLut
~L1GctHfEtSumsLut() override
Destructor.
Definition: L1GctHfEtSumsLut.cc:23
L1GctHfEtSumsLut::m_lutFunction
const L1CaloEtScale * m_lutFunction
Definition: L1GctHfEtSumsLut.h:78
L1GctHfEtSumsLut
LUT for compression of HF Et sum to output format.
Definition: L1GctHfEtSumsLut.h:20
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
L1GctLut< 8, 3 >::m_setupOk
bool m_setupOk
Definition: L1GctLut.h:77
L1GctHfEtSumsLut::NAddress
static const int NAddress
Definition: L1GctHfEtSumsLut.h:37
L1CaloEtScale::linearLsb
double linearLsb() const
get LSB of linear input scale
Definition: L1CaloEtScale.h:54
L1GctHfEtSumsLut.h
hgcalConcentratorProducer_cfi.NData
NData
Definition: hgcalConcentratorProducer_cfi.py:82
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
L1GctHfEtSumsLut::L1GctHfEtSumsLut
L1GctHfEtSumsLut()
Default constructor.
Definition: L1GctHfEtSumsLut.cc:18
L1GctHfEtSumsLut::operator=
L1GctHfEtSumsLut operator=(const L1GctHfEtSumsLut &lut)
Overload = operator.
Definition: L1GctHfEtSumsLut.cc:38
L1CaloEtScale
Definition: L1CaloEtScale.h:29
L1CaloEtScale::rank
uint16_t rank(const uint16_t linear) const
convert from linear Et scale to rank scale
Definition: L1CaloEtScale.cc:52
L1CaloEtScale.h
L1CaloEtScale::getThresholds
const std::vector< double > & getThresholds() const
get thresholds
Definition: L1CaloEtScale.h:66
L1GctLut
Base class for LookUp Tables.
Definition: L1GctLut.h:19
operator<<
std::ostream & operator<<(std::ostream &os, const L1GctHfEtSumsLut &lut)
Definition: L1GctHfEtSumsLut.cc:43
mps_fire.result
result
Definition: mps_fire.py:311
L1GctHfEtSumsLut::getThresholdsGct
std::vector< unsigned > getThresholdsGct() const
Definition: L1GctHfEtSumsLut.cc:29