23 const unsigned int bxid = block.
amc().getBX();
27 LogDebug(
"L1T") <<
"Unpacking TMT # " << tmt <<
" for BX " << bxid;
34 res1_->setBXRange(0,0);
35 res2_->setBXRange(0,0);
36 res3_->setBXRange(0,0);
37 res4_->setBXRange(0,0);
40 const int unsigned fet = 0;
41 const int unsigned fht = 2;
42 const int unsigned feg = 4;
43 const int unsigned ftau = 6;
44 const int unsigned fjet = 8;
45 const int unsigned faux = 10;
51 uint32_t raw_data = block.
payload()[fet];
58 ethf.
setHwPt( static_cast<int32_t>( uint32_t(raw_data & 0xFFFF)) );
62 ethf.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
66 ethf.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
70 ethf.
setHwPt( static_cast<int32_t>( uint32_t(raw_data & 0xFFFF)) );
74 ethf.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
78 ethf.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
86 res2_->push_back(0,ethf);
91 raw_data = block.
payload()[fet + 1];
98 etNoHF.
setHwPt( static_cast<int32_t>( uint32_t(raw_data & 0xFFFF)) );
102 etNoHF.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
106 etNoHF.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
110 etNoHF.
setHwPt( static_cast<int32_t>( uint32_t(raw_data & 0xFFFF)) );
114 etNoHF.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
118 etNoHF.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
124 LogDebug(
"L1T") <<
"ET/METx/METy (no HF): pT " << etNoHF.
hwPt();
126 res2_->push_back(0,etNoHF);
131 raw_data = block.
payload()[fht];
138 hthf.
setHwPt( static_cast<int32_t>( uint32_t(raw_data & 0xFFFF)) );
142 hthf.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
146 hthf.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
150 hthf.
setHwPt( static_cast<int32_t>( uint32_t(raw_data & 0xFFFF)) );
154 hthf.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
158 hthf.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
164 LogDebug(
"L1T") <<
"HTHF/MHTHFx/MHTHFy: pT " << hthf.
hwPt();
166 res2_->push_back(0,hthf);
171 raw_data = block.
payload()[fht+1];
178 htNoHF.
setHwPt( static_cast<int32_t>( uint32_t(raw_data & 0xFFFF)) );
182 htNoHF.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
186 htNoHF.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
190 htNoHF.
setHwPt( static_cast<int32_t>( uint32_t(raw_data & 0xFFFF)) );
194 htNoHF.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
198 htNoHF.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
205 LogDebug(
"L1T") <<
"HTNOHF/MHTNOHFx/MHTNOHFy: pT " << htNoHF.
hwPt();
207 res2_->push_back(0,htNoHF);
211 for (
unsigned nJet=0; nJet < 2; nJet++){
213 raw_data = block.
payload()[fjet+nJet];
229 int mpEta = etasign*(raw_data & 0x3F);
231 jet.
setHwPhi((raw_data >> 6) & 0x7F);
232 jet.
setHwPt((raw_data >> 13) & 0xFFFF);
235 if (jet.
hwPt()==0)
continue;
240 res1_->push_back(0,jet);
249 for (
unsigned nEG=0; nEG < 2; nEG++){
251 raw_data = block.
payload()[feg+nEG];
267 eg.
setHwEta(etasign*((raw_data >> 3) & 0x3F));
268 eg.
setHwPhi((raw_data >> 9) & 0x7F);
269 eg.
setHwPt((raw_data >> 20) & 0xFFF);
273 if (eg.
hwPt()==0)
continue;
278 res3_->push_back(0,eg);
286 for (
unsigned nTau=0; nTau < 2; nTau++){
288 raw_data = block.
payload()[ftau+nTau];
304 tau.
setHwEta(etasign*((raw_data >> 3) & 0x3F));
305 tau.
setHwPhi((raw_data >> 9) & 0x7F);
306 tau.
setHwPt((raw_data >> 20) & 0xFFF);
310 if (tau.
hwPt()==0)
continue;
315 res4_->push_back(0,tau);
319 raw_data = block.
payload()[faux];
331 mbp0.
setHwPt( ( raw_data >> 24 ) & 0xF );
335 mbm0.
setHwPt( ( raw_data >> 16 ) & 0xF );
339 mbp1.
setHwPt( ( raw_data >> 8 ) & 0xF );
343 mbm1.
setHwPt( raw_data & 0xF );
351 res2_->push_back(0,mbp0);
352 res2_->push_back(0,mbm0);
353 res2_->push_back(0,mbp1);
354 res2_->push_back(0,mbm1);
const std::vector< uint32_t > & payload() const
BlockHeader header() const
unsigned int offsetBoardId
void setType(EtSumType type)
bool unpack(const Block &block, UnpackerCollections *coll) override
#define DEFINE_L1T_UNPACKER(type)
void amc(const amc::Header &h)
void setP4(const LorentzVector &p4) final
set 4-momentum