15 int firstBX = -(
ceil((
double)nBX / 2.) - 1);
18 lastBX =
ceil((
double)nBX / 2.) + 1;
20 lastBX =
ceil((
double)nBX / 2.);
23 auto resHFBitCounts_ =
static_cast<CaloCollections*
>(coll)->getCaloSpareHFBitCounts();
24 resHFBitCounts_->setBXRange(firstBX, lastBX);
26 auto resHFRingSums_ =
static_cast<CaloCollections*
>(coll)->getCaloSpareHFRingSums();
27 resHFRingSums_->setBXRange(firstBX, lastBX);
30 reset_->setBXRange(firstBX, lastBX);
32 LogDebug(
"L1T") <<
"nBX = " << nBX <<
" first BX = " << firstBX <<
" lastBX = " << lastBX;
38 for (
int bx = firstBX;
bx < lastBX;
bx++) {
39 uint32_t raw_data0 = block.
payload()[i++];
40 uint32_t raw_data1 = block.
payload()[i++];
45 candbit[0] = raw_data0 & 0xFFFF;
46 candbit[1] = (raw_data0 >> 16) & 0xFFFF;
47 candbit[2] = raw_data1 & 0xFFFF;
48 candbit[3] = (raw_data1 >> 16) & 0xFFFF;
50 int hfbitcount = candbit[0] & 0xFFF;
51 int hfringsum = ((candbit[0] >> 12) & 0x7) | ((candbit[2] & 0x1FF) << 3);
52 int htmissphi = candbit[1] & 0x1F;
53 int htmiss = (candbit[1] >> 5) & 0x7F;
54 int overflowhtmiss = (candbit[1] >> 12) & 0x1;
60 resHFBitCounts_->push_back(
bx, hfbc);
66 resHFRingSums_->push_back(
bx, hfrs);
72 int flaghtmiss = mht.
hwQual();
73 flaghtmiss |= overflowhtmiss;
75 LogDebug(
"L1T") <<
"MHT: pT " << mht.
hwPt() <<
"is overflow " << overflowhtmiss << std::endl;
76 reset_->push_back(
bx, mht);
constexpr int32_t ceil(float num)
const std::vector< uint32_t > & payload() const
BlockHeader header() const
void setType(EtSumType type)
void setType(CaloSpareType type)
bool unpack(const Block &block, UnpackerCollections *coll) override
#define DEFINE_L1T_UNPACKER(type)