Skip to content

Commit 3d72abe

Browse files
committed
Fix mistaken bits convention
1 parent 9243345 commit 3d72abe

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

EventFilter/L1TRawToDigi/plugins/implementations_stage2/CICADAUnpacker.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ namespace l1t {
2727
return false;
2828
} else {
2929
const uint32_t* base = block.payload().data();
30-
//This differs slightly from uGT, in that we grab the first 4 bits
31-
//of the last 4 words (still in first to last order) and arrange those
32-
uint32_t word = (caloCrateCicadaBitsPattern & base[2]) >> 16 | (caloCrateCicadaBitsPattern & base[3]) >> 20 |
33-
(caloCrateCicadaBitsPattern & base[4]) >> 24 | (caloCrateCicadaBitsPattern & base[5]) >> 28;
30+
//First 4 bits of the first 4 words are CICADA bits
31+
uint32_t word = (caloCrateCicadaBitsPattern & base[0]) >> 16 | (caloCrateCicadaBitsPattern & base[1]) >> 20 |
32+
(caloCrateCicadaBitsPattern & base[2]) >> 24 | (caloCrateCicadaBitsPattern & base[3]) >> 28;
3433
float score = static_cast<float>(word) / 256.f;
3534
res->push_back(0, score);
3635
return true;

0 commit comments

Comments
 (0)