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++) {
40 uint32_t raw_data = block.
payload().at(iFrame);
52 int abs_eta = (raw_data >> 11) & 0x7F;
53 if ((raw_data >> 18) & 0x1) {
59 jet.
setHwPhi((raw_data >> 19) & 0xFF);
62 LogDebug(
"L1T") <<
"Jet: eta " << jet.
hwEta() <<
" phi " << jet.
hwPhi() <<
" pT " << jet.
hwPt() <<
" qual "
67 res_->push_back(
bx, jet);
constexpr int32_t ceil(float num)
const unsigned int nJetPerLink
const std::vector< uint32_t > & payload() const
const unsigned int nOutputFramePerBX
BlockHeader header() const
bool unpack(const Block &block, UnpackerCollections *coll) override
#define DEFINE_L1T_UNPACKER(type)
void setP4(const LorentzVector &p4) final
set 4-momentum