17 <<
" AMC = " << block.
amc().getAMCNumber();
21 unsigned int bxid = block.
amc().getBX();
25 LogDebug(
"L1T") <<
"Unpacking TMT # " << tmt <<
" for BX " << bxid;
32 res1_->setBXRange(0, 0);
33 res2_->setBXRange(0, 0);
34 res3_->setBXRange(0, 0);
35 res4_->setBXRange(0, 0);
41 int unsigned ftau = 6;
42 int unsigned fjet = 8;
43 int unsigned faux = 10;
49 uint32_t raw_data = block.
payload()[fet];
56 ethf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
60 ethf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
64 ethf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
68 ethf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
72 ethf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
76 ethf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
84 res2_->push_back(0, ethf);
88 raw_data = block.
payload()[fet + 1];
96 etNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
100 etNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
104 etNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
108 etNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
112 etNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
116 etNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
122 LogDebug(
"L1T") <<
"ET/METx/METy (no HF): pT " << etNoHF.
hwPt();
124 res2_->push_back(0, etNoHF);
129 etEm.
setHwPt(static_cast<int32_t>(uint32_t((raw_data >> 16) & 0xFFFF)));
130 res2_->push_back(0, etEm);
135 raw_data = block.
payload()[fht];
142 hthf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
146 hthf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
150 hthf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
154 hthf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
158 hthf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
162 hthf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
168 LogDebug(
"L1T") <<
"HTHF/MHTHFx/MHTHFy: pT " << hthf.
hwPt();
170 res2_->push_back(0, hthf);
174 raw_data = block.
payload()[fht + 1];
181 htNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
185 htNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
189 htNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
193 htNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
197 htNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
201 htNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
207 LogDebug(
"L1T") <<
"HTNOHF/MHTNOHFx/MHTNOHFy: pT " << htNoHF.
hwPt();
209 res2_->push_back(0, htNoHF);
212 for (
unsigned nJet = 0; nJet < 2; nJet++) {
213 raw_data = block.
payload()[fjet + nJet];
227 int mpEta = etasign * (raw_data & 0x3F);
229 jet.
setHwPhi((raw_data >> 6) & 0x7F);
230 jet.
setHwPt((raw_data >> 13) & 0xFFFF);
236 LogDebug(
"L1T") <<
"Jet: eta " << jet.
hwEta() <<
" phi " << jet.
hwPhi() <<
" pT " << jet.
hwPt() <<
" qual " 240 res1_->push_back(0, jet);
247 for (
unsigned nEG = 0; nEG < 2; nEG++) {
248 raw_data = block.
payload()[feg + nEG];
262 eg.
setHwEta(etasign * ((raw_data >> 3) & 0x3F));
263 eg.
setHwPhi((raw_data >> 9) & 0x7F);
264 eg.
setHwPt((raw_data >> 20) & 0xFFF);
271 LogDebug(
"L1T") <<
"Egamma: eta " << eg.
hwEta() <<
" phi " << eg.
hwPhi() <<
" pT " << eg.
hwPt() <<
" qual " 275 res3_->push_back(0, eg);
282 for (
unsigned nTau = 0; nTau < 2; nTau++) {
283 raw_data = block.
payload()[ftau + nTau];
297 tau.
setHwEta(etasign * ((raw_data >> 3) & 0x3F));
298 tau.
setHwPhi((raw_data >> 9) & 0x7F);
299 tau.
setHwPt((raw_data >> 20) & 0xFFF);
300 tau.
setHwIso((raw_data >> 1) & 0x3);
306 LogDebug(
"L1T") <<
"Tau: eta " << tau.
hwEta() <<
" phi " << tau.
hwPhi() <<
" pT " << tau.
hwPt() <<
" qual " 310 res4_->push_back(0, tau);
314 raw_data = block.
payload()[faux];
327 mbp0.
setHwPt((raw_data >> 24) & 0xF);
331 mbm0.
setHwPt((raw_data >> 16) & 0xF);
335 mbp1.
setHwPt((raw_data >> 8) & 0xF);
347 res2_->push_back(0, mbp0);
348 res2_->push_back(0, mbm0);
349 res2_->push_back(0, mbp1);
350 res2_->push_back(0, mbm1);
353 towCount.
setHwPt(raw_data & 0x1FFF);
355 res2_->push_back(0, towCount);
const std::vector< uint32_t > & payload() const
bool unpack(const Block &block, UnpackerCollections *coll) override
BlockHeader header() const
void setType(EtSumType type)
const unsigned int offsetBoardId
#define DEFINE_L1T_UNPACKER(type)
void amc(const amc::Header &h)
void setP4(const LorentzVector &p4) final
set 4-momentum