28 unsigned int amc = block.
amc().getAMCNumber();
29 unsigned int bxid = block.
amc().getBX();
30 LogDebug(
"L1T") <<
"Unpacking AMC " << amc <<
" for BX " << bxid;
37 res1_->setBXRange(0,0);
38 res2_->setBXRange(0,0);
39 res3_->setBXRange(0,0);
40 res4_->setBXRange(0,0);
46 int unsigned ftau = 5;
47 int unsigned fjet = 7;
55 uint32_t raw_data = block.
payload()[fet];
62 et.
setHwPt( ( uint32_t(raw_data & 0xFFFFFF) << 16 ) >> 16 );
66 et.
setHwPt( ( uint32_t(raw_data) ) );
70 et.
setHwPt( ( uint32_t(raw_data) ) );
74 et.
setHwPt( ( uint32_t(raw_data & 0xFFFFFF) << 16 ) >> 16 );
78 et.
setHwPt( ( uint32_t(raw_data) ) );
82 et.
setHwPt( ( uint32_t(raw_data) ) );
90 res2_->push_back(0,et);
95 raw_data = block.
payload()[fht];
100 ht.
setHwPt( ( uint32_t(raw_data & 0xFFFFFF) << 16 ) >> 16 );
113 res2_->push_back(0,ht);
116 for (
unsigned nJet=0; nJet < 2; nJet++){
118 raw_data = block.
payload()[fjet+nJet];
129 int mpEta = etasign*(raw_data & 0x3F);
131 jet.
setHwPhi((raw_data >> 6) & 0x7F);
132 jet.
setHwPt((raw_data >> 13) & 0xFFFF);
138 res1_->push_back(0,jet);
147 for (
unsigned nEG=0; nEG < 2; nEG++){
149 raw_data = block.
payload()[feg+nEG];
160 eg.
setHwEta(etasign*((raw_data >> 3) & 0x3F));
161 eg.
setHwPhi((raw_data >> 9) & 0x7F);
162 eg.
setHwPt((raw_data >> 20) & 0xFFF);
170 res3_->push_back(0,eg);
178 for (
unsigned nTau=0; nTau < 2; nTau++){
180 raw_data = block.
payload()[ftau+nTau];
191 tau.
setHwEta(etasign*((raw_data >> 3) & 0x3F));
192 tau.
setHwPhi((raw_data >> 9) & 0x7F);
193 tau.
setHwPt((raw_data >> 20) & 0xFFF);
200 res4_->push_back(0,tau);
const std::vector< uint32_t > & payload() const
BlockHeader header() const
void setType(EtSumType type)
et
define resolution functions of each parameter
#define DEFINE_L1T_UNPACKER(type)
void amc(const amc::Header &h)
void setP4(const LorentzVector &p4) final
set 4-momentum
bool unpack(const Block &block, UnpackerCollections *coll) override