13 event.getByToken(static_cast<const CommonTokens*>(toks)->getTauToken(), taus);
15 std::vector<uint32_t> load1, load2;
18 for (
int i = taus->getFirstBX();
i <= taus->getLastBX(); ++
i) {
19 for (
auto j = taus->begin(
i);
j != taus->end(
i); ++
j) {
20 uint32_t packed_eta =
abs(
j->hwEta()) & 0x7F;
22 packed_eta = (128 - packed_eta) | 1 << 7;
25 uint32_t
word =
std::min(
j->hwPt(), 0x1FF) | packed_eta << 9 | (
j->hwPhi() & 0xFF) << 17 |
26 (
j->hwIso() & 0x3) << 25 |
27 (
j->hwQual() & 0x7) << 27;
31 load1.push_back(word);
33 load2.push_back(word);
Blocks pack(const edm::Event &, const PackerTokens *) override
std::vector< Block > Blocks
Abs< T >::type abs(const T &t)
const unsigned int nOutputFramePerBX
const unsigned int nTauPerLink
#define DEFINE_L1T_PACKER(type)