21 bxBlocks = block.
getBxBlocks((
unsigned int)6,
true);
23 bxBlocks = block.
getBxBlocks((
unsigned int)6,
false);
32 int firstBX = 0, lastBX = 0;
34 if (!bxBlocks.empty()) {
35 nBX = bxBlocks[0].header().getTotalBx();
41 LogDebug(
"L1T") <<
"No BXs included in the given Block. Set the BXRange to be (-2,2).";
45 LogDebug(
"L1T") <<
"nBX = " << nBX <<
" firstBX = " << firstBX <<
" lastBX = " << lastBX;
47 int processor = block.
amc().getBoardID() - 1;
48 if ( processor < 0 || processor > 11 )
50 edm::LogInfo (
"l1t:stage2::BMTFUnpackerOutput::unpack") <<
"Processor found out of range so it will be calculated by the old way";
51 if ( block.
amc().getAMCNumber()%2 != 0 )
52 processor = block.
amc().getAMCNumber()/2 ;
54 processor = 6 + (block.
amc().getAMCNumber()/2 -1);
57 for (
auto bxBlock : bxBlocks) {
58 int ibx = bxBlock.header().getBx();
60 for (
auto iw = 0; iw < 6; iw+=2) {
61 uint32_t raw_first = bxBlock.payload()[iw];
62 uint32_t raw_secnd = bxBlock.payload()[iw+1];
65 LogDebug(
"L1T") <<
"Raw data is zero";
77 muCand.
setHwPt2((raw_secnd >> 23) & 0xFF);
78 muCand.
setHwDXY((raw_secnd >> 2) & 0x3);
79 LogDebug(
"L1T") <<
"Pt = " << muCand.
hwPt() <<
" eta: " << muCand.
hwEta() <<
" phi: " << muCand.
hwPhi() <<
" diplacedPt = " << muCand.
hwPt2();
void setHwPt2(int bits)
Set compressed second displaced pT as transmitted by hardware LSB = 1.0 (8 bits)
bool unpack(const Block &block, UnpackerCollections *coll) override
void getBXRange(int nbx, int &first, int &last)
BlockHeader header() const
const int hwQual() const
Get quality code.
const int hwEta() const
Get compressed eta (returned int * 0.010875 = eta)
const int hwPhi() const
Get compressed local phi (returned int * 2*pi/576 = local phi in rad)
void setHwDXY(int bits)
Set compressed impact parameter with respect to beamspot (4 bits)
std::vector< BxBlock > BxBlocks
static void fillRegionalMuonCand(RegionalMuonCand &, uint32_t, uint32_t, int, tftype)
void setBXRange(int bxFirst, int bxLast)
BxBlocks getBxBlocks(unsigned int payloadWordsPerBx, bool bxHeader) const
const int hwPt() const
Get compressed pT (returned int * 0.5 = pT (GeV))
#define DEFINE_L1T_UNPACKER(type)
void amc(const amc::Header &h)
const int hwPt2() const
Get second compressed pT (returned int * 1.0 = pT (GeV))
void push_back(int bx, T object)