20 LogDebug(
"L1T") <<
"Block ID = " <<
block.header().getID() <<
" size = " <<
block.header().getSize()
21 <<
" AMC = " <<
block.amc().getAMCNumber();
24 unsigned int amc =
block.amc().getAMCNumber();
25 unsigned int bxid =
block.amc().getBX();
26 LogDebug(
"L1T") <<
"Unpacking AMC " <<
amc <<
" for BX " << bxid;
28 auto res1_ = static_cast<CaloCollections*>(coll)->getMPJets();
29 auto res2_ = static_cast<CaloCollections*>(coll)->getMPEtSums();
30 auto res3_ = static_cast<CaloCollections*>(coll)->getMPEGammas();
31 auto res4_ = static_cast<CaloCollections*>(coll)->getMPTaus();
33 res1_->setBXRange(0, 0);
34 res2_->setBXRange(0, 0);
35 res3_->setBXRange(0, 0);
36 res4_->setBXRange(0, 0);
42 int unsigned ftau = 5;
43 int unsigned fjet = 7;
49 uint32_t raw_data =
block.payload()[fet];
53 switch (
block.header().getID()) {
56 et.setHwPt((uint32_t(raw_data & 0xFFFFFF) << 16) >> 16);
60 et.setHwPt((uint32_t(raw_data)));
64 et.setHwPt((uint32_t(raw_data)));
68 et.setHwPt((uint32_t(raw_data & 0xFFFFFF) << 16) >> 16);
72 et.setHwPt((uint32_t(raw_data)));
76 et.setHwPt((uint32_t(raw_data)));
82 LogDebug(
"L1T") <<
"ET/METx/METy: pT " <<
et.hwPt();
84 res2_->push_back(0,
et);
88 raw_data =
block.payload()[fht];
93 ht.
setHwPt((uint32_t(raw_data & 0xFFFFFF) << 16) >> 16);
94 switch (
block.header().getID()) {
119 res2_->push_back(0, ht);
122 for (
unsigned nJet = 0; nJet < 2; nJet++) {
123 raw_data =
block.payload()[fjet + nJet];
132 LogDebug(
"L1") <<
"block ID=" <<
block.header().getID() <<
" etasign=" << etasign;
134 int mpEta = etasign * (raw_data & 0x3F);
136 jet.setHwPhi((raw_data >> 6) & 0x7F);
137 jet.setHwPt((raw_data >> 13) & 0xFFFF);
138 jet.setHwQual((raw_data >> 29) & 0
x1);
140 LogDebug(
"L1T") <<
"Jet: eta " <<
jet.hwEta() <<
" phi " <<
jet.hwPhi() <<
" pT " <<
jet.hwPt() <<
" qual "
144 res1_->push_back(0,
jet);
151 for (
unsigned nEG = 0; nEG < 2; nEG++) {
152 raw_data =
block.payload()[feg + nEG];
161 LogDebug(
"L1") <<
"block ID=" <<
block.header().getID() <<
" etasign=" << etasign;
163 eg.
setHwEta(etasign * ((raw_data >> 3) & 0x3F));
164 eg.
setHwPhi((raw_data >> 9) & 0x7F);
165 eg.
setHwPt((raw_data >> 20) & 0xFFF);
169 LogDebug(
"L1T") <<
"Egamma: eta " << eg.
hwEta() <<
" phi " << eg.
hwPhi() <<
" pT " << eg.
hwPt() <<
" qual "
173 res3_->push_back(0, eg);
180 for (
unsigned nTau = 0; nTau < 2; nTau++) {
181 raw_data =
block.payload()[ftau + nTau];
190 LogDebug(
"L1") <<
"block ID=" <<
block.header().getID() <<
" etasign=" << etasign;
192 tau.setHwEta(etasign * ((raw_data >> 3) & 0x3F));
193 tau.setHwPhi((raw_data >> 9) & 0x7F);
194 tau.setHwPt((raw_data >> 20) & 0xFFF);
195 tau.setHwIso((raw_data >> 1) & 0x3);
196 tau.setHwQual((raw_data >> 16) & 0xf);
198 LogDebug(
"L1T") <<
"Tau: eta " <<
tau.hwEta() <<
" phi " <<
tau.hwPhi() <<
" pT " <<
tau.hwPt() <<
" qual "
202 res4_->push_back(0,
tau);