31 unsigned int amc = block.
amc().getAMCNumber();
32 unsigned int bxid = block.
amc().getBX();
34 if( (amc-1) != ((bxid-1+3)%9) )
return true;
35 LogDebug(
"L1T") <<
"Unpacking AMC " << amc <<
" for BX " << bxid;
42 res1_->setBXRange(0,0);
43 res2_->setBXRange(0,0);
44 res3_->setBXRange(0,0);
45 res4_->setBXRange(0,0);
51 int unsigned ftau = 6;
52 int unsigned fjet = 8;
59 uint32_t raw_data = block.
payload()[fet];
66 et.
setHwPt( static_cast<int32_t>( uint32_t(raw_data & 0xFFFFFF) << 16 ) >> 16 );
70 et.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
74 et.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
78 et.
setHwPt( static_cast<int32_t>( uint32_t(raw_data & 0xFFFFFF) << 16 ) >> 16 );
82 et.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
86 et.
setHwPt( static_cast<int32_t>( uint32_t(raw_data) ) );
94 res2_->push_back(0,et);
99 raw_data = block.
payload()[fht];
104 ht.
setHwPt( static_cast<int32_t>( uint32_t(raw_data & 0xFFFFFF) << 16 ) >> 16 );
117 res2_->push_back(0,ht);
120 for (
unsigned nJet=0; nJet < 2; nJet++){
122 raw_data = block.
payload()[fjet+nJet];
138 int mpEta = etasign*(raw_data & 0x3F);
140 jet.
setHwPhi((raw_data >> 6) & 0x7F);
141 jet.
setHwPt((raw_data >> 13) & 0xFFFF);
144 if (jet.
hwPt()==0)
continue;
149 res1_->push_back(0,jet);
158 for (
unsigned nEG=0; nEG < 2; nEG++){
160 raw_data = block.
payload()[feg+nEG];
176 eg.
setHwEta(etasign*((raw_data >> 3) & 0x3F));
177 eg.
setHwPhi((raw_data >> 9) & 0x7F);
178 eg.
setHwPt((raw_data >> 20) & 0xFFF);
182 if (eg.
hwPt()==0)
continue;
187 res3_->push_back(0,eg);
195 for (
unsigned nTau=0; nTau < 2; nTau++){
197 raw_data = block.
payload()[ftau+nTau];
213 tau.
setHwEta(etasign*((raw_data >> 3) & 0x3F));
214 tau.
setHwPhi((raw_data >> 9) & 0x7F);
215 tau.
setHwPt((raw_data >> 20) & 0xFFF);
219 if (tau.
hwPt()==0)
continue;
224 res4_->push_back(0,tau);
BlockHeader header() const
std::vector< uint32_t > payload() const
void setType(EtSumType type)
#define DEFINE_L1T_UNPACKER(type)
virtual bool unpack(const Block &block, UnpackerCollections *coll) override
virtual void setP4(const LorentzVector &p4) final
set 4-momentum
void amc(const amc::Header &h)