15 LogDebug(
"L1T") <<
"Block ID = " <<
block.header().getID() <<
" size = " <<
block.header().getSize()
16 <<
" AMC = " <<
block.amc().getAMCNumber();
19 unsigned int amc =
block.amc().getAMCNumber();
20 unsigned int bxid =
block.amc().getBX();
21 LogDebug(
"L1T") <<
"Unpacking AMC " <<
amc <<
" for BX " << bxid;
28 res1_->setBXRange(0, 0);
29 res2_->setBXRange(0, 0);
30 res3_->setBXRange(0, 0);
31 res4_->setBXRange(0, 0);
36 int unsigned fjet = 6;
38 int unsigned ftau = 4;
44 uint32_t raw_data =
block.payload()[fet];
48 et.setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFFFF) << 16) >> 16);
50 switch (
block.header().getID()) {
73 LogDebug(
"L1T") <<
"ET/METx/METy: pT " <<
et.hwPt();
75 res2_->push_back(0,
et);
79 raw_data =
block.payload()[fht];
84 ht.setHwPt(static_cast<int32_t>(uint32_t(raw_data & 0xFFFFFF) << 16) >> 16);
85 switch (
block.header().getID()) {
108 LogDebug(
"L1T") <<
"HT/MHTx/MHTy: pT " << ht.hwPt();
110 res2_->push_back(0, ht);
113 for (
unsigned nJet = 0; nJet < 2; nJet++) {
114 raw_data =
block.payload()[fjet + nJet];
122 if ((
block.header().getID() == 125) || (
block.header().getID() == 131) || (
block.header().getID() == 129)) {
126 LogDebug(
"L1") <<
"block ID=" <<
block.header().getID() <<
" etasign=" << etasign;
128 int mpEta = etasign * (raw_data & 0x3F);
130 jet.setHwPhi((raw_data >> 6) & 0x7F);
131 jet.setHwPt((raw_data >> 13) & 0xFFFF);
133 LogDebug(
"L1T") <<
"Jet: eta " <<
jet.hwEta() <<
" phi " <<
jet.hwPhi() <<
" pT " <<
jet.hwPt() <<
" qual " 137 res1_->push_back(0,
jet);
178 for (
unsigned nEG = 0; nEG < 2; nEG++) {
179 raw_data =
block.payload()[feg + nEG];
187 if ((
block.header().getID() == 125) || (
block.header().getID() == 131) || (
block.header().getID() == 129)) {
191 LogDebug(
"L1") <<
"block ID=" <<
block.header().getID() <<
" etasign=" << etasign;
193 eg.
setHwEta(etasign * ((raw_data >> 4) & 0x3F));
194 eg.
setHwPhi((raw_data >> 10) & 0x7F);
195 eg.
setHwPt((raw_data >> 21) & 0x3FF);
196 eg.
setHwQual(((raw_data >> 3) & 0x1) + (((raw_data >> 1) & 0x1) << 2));
199 LogDebug(
"L1T") <<
"Egamma: eta " << eg.
hwEta() <<
" phi " << eg.
hwPhi() <<
" pT " << eg.
hwPt() <<
" qual " 203 res3_->push_back(0, eg);
210 for (
unsigned nTau = 0; nTau < 2; nTau++) {
211 raw_data =
block.payload()[ftau + nTau];
219 if ((
block.header().getID() == 125) || (
block.header().getID() == 131) || (
block.header().getID() == 129)) {
223 LogDebug(
"L1") <<
"block ID=" <<
block.header().getID() <<
" etasign=" << etasign;
225 tau.setHwEta(etasign * ((raw_data >> 4) & 0x3F));
226 tau.setHwPhi((raw_data >> 10) & 0x7F);
227 tau.setHwPt((raw_data >> 21) & 0x3FF);
228 tau.setHwQual(((raw_data >> 3) & 0x1) + (((raw_data >> 1) & 0x1) << 2));
229 tau.setHwIso(raw_data & 0x1);
237 LogDebug(
"L1T") <<
"Tau: eta " <<
tau.hwEta() <<
" phi " <<
tau.hwPhi() <<
" pT " <<
tau.hwPt() <<
" qual " 241 res4_->push_back(0,
tau);
bool unpack(const Block &block, UnpackerCollections *coll) override
#define DEFINE_L1T_UNPACKER(type)
void setP4(const LorentzVector &p4) final
set 4-momentum