30 res1_->setBXRange(0,0);
31 res2_->setBXRange(0,0);
36 int unsigned fjet = 2;
40 uint32_t raw_data = block.
payload()[fet];
44 et.
setHwPt( static_cast<int32_t>( uint32_t(raw_data & 0xFFFFFF) << 16 ) >> 16 );
59 res2_->push_back(0,et);
64 raw_data = block.
payload()[fht];
69 ht.
setHwPt( static_cast<int32_t>( uint32_t(raw_data & 0xFFFFFF) << 16 ) >> 16 );
82 res2_->push_back(0,ht);
85 for (
unsigned nJet=0; nJet < 2; nJet++){
87 raw_data = block.
payload()[fjet+nJet];
103 jet.
setHwEta(etasign*(raw_data & 0x3F));
104 jet.
setHwPhi((raw_data >> 6) & 0x7F);
105 jet.
setHwPt((raw_data >> 13) & 0xFFFF);
115 for (
unsigned i=0;
i<res1_->size(0);
i++)
116 res1_->at(0,
i).hwEta()>0 ? nPos++ : nNeg++;
118 if (nJet==1) res1_->push_back(0,jet);
121 res1_->push_back(0,jet);
124 if (nPos==1) res1_->push_back(0,jet);
125 else if (nPos==2) res1_->insert(0,1,jet);
128 if (nPos==2) res1_->push_back(0,jet);
129 else if (nPos>2) res1_->insert(0,2,jet);
132 res1_->push_back(0,jet);
135 if (nNeg==1) res1_->push_back(0,jet);
136 else if (nNeg==2) res1_->insert(0,nPos+1,jet);
139 if (nNeg==2) res1_->push_back(0,jet);
140 else if (nNeg>2) res1_->insert(0,nPos+2,jet);
virtual bool unpack(const Block &block, UnpackerCollections *coll) override
BlockHeader header() const
std::vector< uint32_t > payload() const
void setType(EtSumType type)
#define DEFINE_L1T_UNPACKER(type)