29 int firstBX = -(ceil((
double)nBX/2.)-1);
32 lastBX = ceil((
double)nBX/2.);
34 lastBX = ceil((
double)nBX/2.)-1;
38 res_->setBXRange(firstBX, lastBX);
40 LogDebug(
"L1T") <<
"nBX = " << nBX <<
" first BX = " << firstBX <<
" lastBX = " << lastBX;
43 for (
int bx=firstBX; bx<=lastBX; bx++){
49 uint32_t raw_data = block.
payload().at(iFrame);
57 LogDebug(
"L1T") <<
"ET: pT " << et.
hwPt() <<
" bx " << bx;
59 res_->push_back(bx,et);
66 etem.
setHwPt( (raw_data >> 12) & 0xFFF);
70 LogDebug(
"L1T") <<
"ETEM: pT " << etem.
hwPt() <<
" bx " << bx;
72 res_->push_back(bx,etem);
78 mbp0.
setHwPt( (raw_data>>28) & 0xf );
81 res_->push_back(bx, mbp0);
86 raw_data = block.
payload()[iFrame+1];
96 res_->push_back(bx,ht);
101 mbm0.
setHwPt( (raw_data>>28) & 0xf );
104 res_->push_back(bx, mbm0);
109 raw_data = block.
payload()[iFrame+2];
114 met.
setHwPhi((raw_data >> 12) & 0xFF);
118 LogDebug(
"L1T") <<
"MET: phi " << met.
hwPhi() <<
" pT " << met.
hwPt() <<
" bx " << bx;
120 res_->push_back(bx,met);
125 mbp1.
setHwPt( (raw_data>>28) & 0xf );
128 res_->push_back(bx, mbp1);
133 etAsym.
setHwPt( (raw_data>>20) & 0xFF );
136 res_->push_back(bx, etAsym);
140 raw_data = block.
payload()[iFrame+3];
145 mht.
setHwPhi((raw_data >> 12) & 0xFF);
149 LogDebug(
"L1T") <<
"MHT: phi " << mht.
hwPhi() <<
" pT " << mht.
hwPt() <<
" bx " << bx;
151 res_->push_back(bx,mht);
156 mbm1.
setHwPt( (raw_data>>28) & 0xf );
159 res_->push_back(bx, mbm1);
164 htAsym.
setHwPt( (raw_data>>20) & 0xFF );
167 res_->push_back(bx, htAsym);
172 raw_data = block.
payload()[iFrame+4];
176 methf.
setHwPt(raw_data & 0xFFF);
177 methf.
setHwPhi((raw_data >> 12) & 0xFF);
181 LogDebug(
"L1T") <<
"METHF: phi " << methf.
hwPhi() <<
" pT " << methf.
hwPt() <<
" bx " << bx;
183 res_->push_back(bx,methf);
188 etHFAsym.
setHwPt( (raw_data>>20) & 0xFF );
191 res_->push_back(bx, etHFAsym);
195 uint32_t centLN = ((raw_data >> 28) & 0xF);
199 raw_data = block.
payload()[iFrame+5];
203 mhthf.
setHwPt(raw_data & 0xFFF);
204 mhthf.
setHwPhi((raw_data >> 12) & 0xFF);
208 LogDebug(
"L1T") <<
"MHThf: phi " << mhthf.
hwPhi() <<
" pT " << mhthf.
hwPt() <<
" bx " << bx;
210 res_->push_back(bx,mhthf);
215 htHFAsym.
setHwPt( (raw_data>>20) & 0xFF );
218 res_->push_back(bx, htHFAsym);
223 uint32_t centUN = ((raw_data >> 28) & 0xF);
226 cent.
setHwPt( (centUN << 4) | centLN);
229 res_->push_back(bx, cent);
233 raw_data = block.
payload()[iFrame+1];
236 towCount.
setHwPt( (raw_data>>12) & 0x1FFF );
240 res_->push_back(bx, towCount);
const std::vector< uint32_t > & payload() const
const unsigned int nOutputFramePerBX
BlockHeader header() const
EtSumUnpacker_0x10010057()
void setType(EtSumType type)
bool unpack(const Block &block, UnpackerCollections *coll) override
et
define resolution functions of each parameter
#define DEFINE_L1T_UNPACKER(type)
void setP4(const LorentzVector &p4) final
set 4-momentum