30 if (lutAddress != 0) {
32 static const int componentMask = maxComponent - 1;
39 int hyCompGct = static_cast<int>(lutAddress) & componentMask;
42 if (hxCompGct >= maxComponent / 2)
43 hxCompGct -= maxComponent;
44 if (hyCompGct >= maxComponent / 2)
45 hyCompGct -= maxComponent;
48 double hxCompGeV =
m_componentLsb * (static_cast<double>(hxCompGct) + 0.5);
49 double hyCompGeV =
m_componentLsb * (static_cast<double>(hyCompGct) + 0.5);
52 double htMissMag =
sqrt(hxCompGeV * hxCompGeV + hyCompGeV * hyCompGeV);
53 double htMissAng = atan2(hyCompGeV, hxCompGeV);
55 htMissAng += 2.0 *
M_PI;
58 int htMissMagBits = static_cast<int>(
m_etScale->
rank(htMissMag)) & magnitudeMask;
59 int htMissAngBits = static_cast<int>(htMissAng * 9.0 /
M_PI) & angleMask;
71 std::vector<unsigned>
result;
73 for (std::vector<double>::const_iterator thr = thresholdsGeV.begin(); thr != thresholdsGeV.end(); thr++) {
85 os <<
"===L1GctHtMissLut===" << std::endl;
87 std::vector<double>::const_iterator thr =
thresholds.begin();
88 os <<
"Thresholds are: " << *(thr++);
95 os <<
"LSB used for conversion is " << lut.
m_componentLsb <<
" GeV" << std::endl;
96 os <<
"\n===Lookup table contents===\n" << std::endl;