17 <<
" AMC = " << block.
amc().getAMCNumber();
21 const 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);
38 const int unsigned fet = 0;
39 const int unsigned fht = 2;
40 const int unsigned feg = 4;
41 const int unsigned ftau = 6;
42 const int unsigned fjet = 8;
43 const 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];
95 etNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
99 etNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
103 etNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
107 etNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
111 etNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
115 etNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
121 LogDebug(
"L1T") <<
"ET/METx/METy (no HF): pT " << etNoHF.
hwPt();
123 res2_->push_back(0, etNoHF);
127 raw_data = block.
payload()[fht];
134 hthf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
138 hthf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
142 hthf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
146 hthf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
150 hthf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
154 hthf.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
160 LogDebug(
"L1T") <<
"HTHF/MHTHFx/MHTHFy: pT " << hthf.
hwPt();
162 res2_->push_back(0, hthf);
166 raw_data = block.
payload()[fht + 1];
173 htNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
177 htNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
181 htNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
185 htNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFF)));
189 htNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
193 htNoHF.
setHwPt(static_cast<int32_t>(uint32_t(raw_data)));
199 LogDebug(
"L1T") <<
"HTNOHF/MHTNOHFx/MHTNOHFy: pT " << htNoHF.
hwPt();
201 res2_->push_back(0, htNoHF);
204 for (
unsigned nJet = 0; nJet < 2; nJet++) {
205 raw_data = block.
payload()[fjet + nJet];
219 int mpEta = etasign * (raw_data & 0x3F);
221 jet.
setHwPhi((raw_data >> 6) & 0x7F);
222 jet.
setHwPt((raw_data >> 13) & 0xFFFF);
228 LogDebug(
"L1T") <<
"Jet: eta " << jet.
hwEta() <<
" phi " << jet.
hwPhi() <<
" pT " << jet.
hwPt() <<
" qual " 232 res1_->push_back(0, jet);
239 for (
unsigned nEG = 0; nEG < 2; nEG++) {
240 raw_data = block.
payload()[feg + nEG];
254 eg.
setHwEta(etasign * ((raw_data >> 3) & 0x3F));
255 eg.
setHwPhi((raw_data >> 9) & 0x7F);
256 eg.
setHwPt((raw_data >> 20) & 0xFFF);
263 LogDebug(
"L1T") <<
"Egamma: eta " << eg.
hwEta() <<
" phi " << eg.
hwPhi() <<
" pT " << eg.
hwPt() <<
" qual " 267 res3_->push_back(0, eg);
274 for (
unsigned nTau = 0; nTau < 2; nTau++) {
275 raw_data = block.
payload()[ftau + nTau];
289 tau.
setHwEta(etasign * ((raw_data >> 3) & 0x3F));
290 tau.
setHwPhi((raw_data >> 9) & 0x7F);
291 tau.
setHwPt((raw_data >> 20) & 0xFFF);
292 tau.
setHwIso((raw_data >> 1) & 0x3);
298 LogDebug(
"L1T") <<
"Tau: eta " << tau.
hwEta() <<
" phi " << tau.
hwPhi() <<
" pT " << tau.
hwPt() <<
" qual " 302 res4_->push_back(0, tau);
310 raw_data = block.
payload()[faux];
322 mbp0.
setHwPt((raw_data >> 24) & 0xF);
326 mbm0.
setHwPt((raw_data >> 16) & 0xF);
330 mbp1.
setHwPt((raw_data >> 8) & 0xF);
342 res2_->push_back(0, mbp0);
343 res2_->push_back(0, mbm0);
344 res2_->push_back(0, mbp1);
345 res2_->push_back(0, mbm1);
const std::vector< uint32_t > & payload() const
BlockHeader header() const
void setType(EtSumType type)
const unsigned int offsetBoardId
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