28 unsigned int nWords = 6;
29 int nBX, firstBX, lastBX;
38 unsigned int linkId = blockId / 2;
42 if (linkId > 47 && linkId < 60) {
45 processor = linkId - 48;
46 }
else if (linkId > 41 && linkId < 66) {
50 processor = linkId - 42;
53 processor = linkId - 60;
55 }
else if (linkId > 35 && linkId < 72) {
59 processor = linkId - 36;
62 processor = linkId - 66;
65 edm::LogError(
"L1T") <<
"No TF muon expected for link " << linkId;
70 LogDebug(
"L1T") <<
"nBX = " << nBX <<
" first BX = " << firstBX <<
" lastBX = " << lastBX;
76 for (
int bx = firstBX; bx <= lastBX; ++bx) {
77 for (
unsigned nWord = 0; nWord < nWords && i < block.
header().
getSize(); nWord += 2) {
78 uint32_t raw_data_00_31 = payload[i++];
79 uint32_t raw_data_32_63 = payload[i++];
80 LogDebug(
"L1T") <<
"raw_data_00_31 = 0x" << hex << setw(8) << setfill(
'0') << raw_data_00_31 <<
" raw_data_32_63 = 0x" << setw(8) << setfill(
'0') << raw_data_32_63;
85 LogDebug(
"L1T") <<
"Muon hwPt zero. Skip.";
89 if (raw_data_00_31 == 0x505050bc || raw_data_32_63 == 0x505050bc) {
90 edm::LogWarning(
"L1T") <<
"Comma detected in raw data stream. Orbit number: " << block.
amc().getOrbitNumber() <<
", BX ID: " << block.
amc().getBX() <<
", BX: " << bx <<
", linkId: " << linkId <<
", Raw data: 0x" << hex << setw(8) << setfill(
'0') << raw_data_32_63 << setw(8) << setfill(
'0') << raw_data_00_31 <<
dec <<
". Skip.";
const int hwSignValid() const
Get charge sign valid bit (0 - not valid (high pT muon); 1 - valid)
void getBXRange(int nbx, int &first, int &last)
BlockHeader header() const
static const unsigned ptMask_
std::vector< uint32_t > payload() const
#define DEFINE_L1T_UNPACKER(type)
const int hwQual() const
Get quality code.
static const unsigned ptShift_
virtual bool unpack(const Block &block, UnpackerCollections *coll) override
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)
static void fillRegionalMuonCand(RegionalMuonCand &, uint32_t, uint32_t, int, tftype)
void setBXRange(int bxFirst, int bxLast)
const int hwPt() const
Get compressed pT (returned int * 0.5 = pT (GeV))
const int hwSign() const
Get charge sign bit (charge = (-1)^(sign))
void amc(const amc::Header &h)
void push_back(int bx, T object)