26 int nBX, firstBX, lastBX;
30 auto resRCTEMCands_ =
static_cast<CaloCollections*
>(coll)->getCaloEmCands();
35 for (
int bx = firstBX;
bx <= lastBX;
bx++) {
39 std::vector<uint32_t>
uint;
47 uint.push_back(block.
payload()[i++]);
48 uint.push_back(block.
payload()[i++]);
49 uint.push_back(block.
payload()[i++]);
50 uint.push_back(block.
payload()[i++]);
51 uint.push_back(block.
payload()[i++]);
52 uint.push_back(block.
payload()[i++]);
54 LogDebug(
"L1T") <<
"--------------- mp7 link =" << mp7link <<
"RCT crate id=" << crate
55 <<
", RCT crate even=" << even << std::endl;
58 for (
int i = 0; i < 6; i++)
62 for (
int j = 0;
j < 4;
j++) {
63 unsigned int rank = (
unsigned int)converter.
GetNEEt(
j);
64 unsigned int reg = (
unsigned int)converter.
GetNEReg(
j);
65 unsigned int card = (
unsigned int)converter.
GetNECard(
j);
67 LogDebug(
"L1T") <<
"UNPACKER, CRATE" << crate <<
"NON ISO em rank=" << rank <<
", region=" << reg
68 <<
", card=" << card << std::endl;
71 resRCTEMCands_->push_back(em);
74 for (
int j = 0;
j < 4;
j++) {
75 unsigned int rank = converter.
GetIEEt(
j);
79 LogDebug(
"L1T") <<
"UNPACKER, CRATE" << crate <<
"ISO em rank=" << rank <<
", region=" << reg
80 <<
", card=" << card << std::endl;
82 resRCTEMCands_->push_back(em);
89 int nBX, firstBX, lastBX;
93 auto resRCTRegions_ =
static_cast<CaloCollections*
>(coll)->getCaloRegions();
97 std::vector<uint32_t>
uint;
100 for (
int bx = firstBX;
bx <= lastBX;
bx++) {
109 uint.push_back(block.
payload()[i++]);
110 uint.push_back(block.
payload()[i++]);
111 uint.push_back(block.
payload()[i++]);
112 uint.push_back(block.
payload()[i++]);
113 uint.push_back(block.
payload()[i++]);
114 uint.push_back(block.
payload()[i++]);
116 LogDebug(
"L1T") <<
"--------------- mp7 link =" << mp7link <<
"RCT crate id=" << crate
117 <<
", RCT crate even=" << even << std::endl;
120 for (
int i = 0; i < 6; i++)
124 for (
int j = 0;
j < 8;
j++) {
125 unsigned int hfet = (
unsigned int)converter.
GetHFEt(
j);
126 bool hfgrain = (bool)converter.
GetHFFg(
j);
128 LogDebug(
"L1T") <<
"UNPACKER, CRATE" << crate <<
"region=" <<
j <<
", rgnEt=" << hfet << std::endl;
131 resRCTRegions_->push_back(rgn);
136 for (
int i = 0; i < 6; i++)
140 for (
int j = 0;
j < 7;
j++) {
141 for (
int k = 0;
k < 2;
k++) {
142 unsigned int RCet = (
unsigned int)converter.
GetRCEt(
j,
k);
143 bool overflow = (bool)converter.
GetRCOf(
j,
k);
144 bool tauveto = (bool)converter.
GetRCTau(
j,
k);
145 bool hadveto = (bool)converter.
GetRCHad(
j,
k);
148 LogDebug(
"L1T") <<
"UNPACKER, CRATE=" << crate <<
",region=" <<
k <<
", card=" <<
j <<
", rgnEt=" << RCet
149 <<
", overflow=" << overflow <<
", tauveto=" << tauveto <<
", hadveto=" << hadveto
153 resRCTRegions_->push_back(rgn);
constexpr int32_t ceil(float num)
int GetRCTau(int card, int region)
void unpack_em(const Block &block, UnpackerCollections *coll)
void unpack_region(const Block &block, UnpackerCollections *coll)
const std::vector< uint32_t > & payload() const
void getBXRange(int nbx, int &first, int &last)
BlockHeader header() const
void setBx(int16_t bx)
set bx
Level-1 Region Calorimeter Trigger EM candidate.
bool unpack(const Block &block, UnpackerCollections *coll) override
void Set32bitWordLinkEven(int index, uint32_t value)
int GetRCHad(int card, int region)
void GetLinkRCT(int linkMP7, unsigned int &RCTcrate, bool &RCTeven)
int GetRCEt(int card, int region)
void Set32bitWordLinkOdd(int index, uint32_t value)
#define DEFINE_L1T_UNPACKER(type)
A calorimeter trigger region (sum of 4x4 trigger towers)
int GetRCOf(int card, int region)