28 unsigned int amc = block.
amc().getAMCNumber();
29 unsigned int bxid = block.
amc().getBX();
31 if( (amc-1) != ((bxid-1+3)%9) )
return true;
32 LogDebug(
"L1T") <<
"Unpacking AMC " << amc <<
" for BX " << bxid;
39 res1_->setBXRange(0,0);
40 res2_->setBXRange(0,0);
41 res3_->setBXRange(0,0);
42 res4_->setBXRange(0,0);
48 int unsigned ftau = 5;
49 int unsigned fjet = 7;
57 uint32_t raw_data = block.
payload()[fet];
64 et.
setHwPt( ( uint32_t(raw_data & 0xFFFFFF) << 16 ) >> 16 );
68 et.
setHwPt( ( uint32_t(raw_data) ) );
72 et.
setHwPt( ( uint32_t(raw_data) ) );
76 et.
setHwPt( ( uint32_t(raw_data & 0xFFFFFF) << 16 ) >> 16 );
80 et.
setHwPt( ( uint32_t(raw_data) ) );
84 et.
setHwPt( ( uint32_t(raw_data) ) );
92 res2_->push_back(0,et);
97 raw_data = block.
payload()[fht];
102 ht.
setHwPt( ( uint32_t(raw_data & 0xFFFFFF) << 16 ) >> 16 );
115 res2_->push_back(0,ht);
118 for (
unsigned nJet=0; nJet < 2; nJet++){
120 raw_data = block.
payload()[fjet+nJet];
131 int mpEta = etasign*(raw_data & 0x3F);
133 jet.
setHwPhi((raw_data >> 6) & 0x7F);
134 jet.
setHwPt((raw_data >> 13) & 0xFFFF);
140 res1_->push_back(0,jet);
149 for (
unsigned nEG=0; nEG < 2; nEG++){
151 raw_data = block.
payload()[feg+nEG];
162 eg.
setHwEta(etasign*((raw_data >> 3) & 0x3F));
163 eg.
setHwPhi((raw_data >> 9) & 0x7F);
164 eg.
setHwPt((raw_data >> 20) & 0xFFF);
172 res3_->push_back(0,eg);
180 for (
unsigned nTau=0; nTau < 2; nTau++){
182 raw_data = block.
payload()[ftau+nTau];
193 tau.
setHwEta(etasign*((raw_data >> 3) & 0x3F));
194 tau.
setHwPhi((raw_data >> 9) & 0x7F);
195 tau.
setHwPt((raw_data >> 20) & 0xFFF);
202 res4_->push_back(0,tau);
BlockHeader header() const
std::vector< uint32_t > payload() const
void setType(EtSumType type)
virtual void setP4(const LorentzVector &p4) final
set 4-momentum
#define DEFINE_L1T_UNPACKER(type)
void amc(const amc::Header &h)
virtual bool unpack(const Block &block, UnpackerCollections *coll) override