34 if (!bxBlocks.empty()) {
35 nBX = bxBlocks[0].header().getTotalBx();
40 LogDebug(
"L1T") <<
"No BXs included in the given Block. Set the BXRange to be (-2,2).";
44 LogDebug(
"L1T") <<
"nBX = " << nBX <<
" firstBX = " << firstBX <<
" lastBX = " <<
lastBX;
46 int processor = block.
amc().getBoardID() - 1;
47 if (processor < 0 || processor > 11) {
49 <<
"Processor found out of range so it will be calculated by the old way";
50 if (block.
amc().getAMCNumber() % 2 != 0)
51 processor = block.
amc().getAMCNumber() / 2;
53 processor = 6 + (block.
amc().getAMCNumber() / 2 - 1);
56 for (
auto bxBlock : bxBlocks) {
57 int ibx = bxBlock.header().getBx();
59 for (
auto iw = 0; iw < 6; iw += 2) {
60 uint32_t raw_first = bxBlock.payload()[iw];
61 uint32_t raw_secnd = bxBlock.payload()[iw + 1];
63 LogDebug(
"L1T") <<
"Raw data is zero";
75 muCand.
setHwPt2((raw_secnd >> 23) & 0xFF);
76 muCand.
setHwDXY((raw_secnd >> 2) & 0x3);
78 <<
" 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)