16 using namespace l1t::stage2::layer2;
23 int firstBX = -(
ceil((
double)nBX / 2.) - 1);
26 lastBX =
ceil((
double)nBX / 2.);
28 lastBX =
ceil((
double)nBX / 2.) - 1;
32 res_->setBXRange(firstBX, lastBX);
34 LogDebug(
"L1T") <<
"nBX = " << nBX <<
" first BX = " << firstBX <<
" lastBX = " << lastBX;
37 for (
int bx = firstBX;
bx <= lastBX;
bx++) {
41 uint32_t raw_data = block.
payload().at(iFrame);
53 int abs_eta = (raw_data >> 9) & 0x7F;
54 if ((raw_data >> 16) & 0x1) {
60 tau.
setHwPhi((raw_data >> 17) & 0xFF);
61 tau.
setHwIso((raw_data >> 25) & 0x3);
70 res_->push_back(
bx, tau);
constexpr int32_t ceil(float num)
const std::vector< uint32_t > & payload() const
bool unpack(const Block &block, UnpackerCollections *coll) override
const unsigned int nOutputFramePerBX
BlockHeader header() const
const unsigned int nTauPerLink
#define DEFINE_L1T_UNPACKER(type)
void setP4(const LorentzVector &p4) final
set 4-momentum