213 std::vector<ap_uint<64>> packed;
214 std::optional<ap_uint<64>> next_packed;
218 if constexpr (std::is_same_v<T, TkJetWord>) {
219 ap_uint<128>
word =
obj.tkJetWord();
220 packed.emplace_back(
word(63, 0));
221 packed.emplace_back(
word(127, 64));
222 }
else if constexpr (std::is_same_v<T, EtSum>) {
229 packed.emplace_back(sum.pack_ap());
236 packed.emplace_back(sum.pack_ap());
239 }
else if constexpr (std::is_same_v<T, VertexWord>) {
240 packed.emplace_back(
obj.vertexWord());
241 }
else if constexpr (std::is_same_v<T, SAMuon>) {
242 packed.emplace_back(
obj.word());
243 }
else if constexpr (std::is_same_v<T, TrackerMuon>) {
244 std::array<uint64_t, 2>
word =
obj.word();
245 if (next_packed.has_value()) {
246 packed.emplace_back(
word[1] << 32 | next_packed.value());
249 next_packed =
word[1];
252 packed.emplace_back(
word[0]);
253 }
else if constexpr (std::is_same_v<T, PFJet>) {
254 packed.emplace_back(
obj.encodedJet()[0]);
255 packed.emplace_back(
obj.encodedJet()[1]);
256 }
else if constexpr (std::is_same_v<T, TkEm> || std::is_same_v<T, TkElectron>) {
257 ap_uint<96>
word =
obj.template egBinaryWord<96>();
258 if (next_packed.has_value()) {
259 packed.emplace_back(
word(95, 64) << 32 | next_packed.value());
262 next_packed =
word(95, 64);
265 packed.emplace_back(
word(63, 0));
266 }
else if constexpr (std::is_same_v<T, PFTau>) {
267 std::array<uint64_t, 2>
word =
obj.encodedTau();
268 if (next_packed.has_value()) {
269 packed.emplace_back(
word[1] << 32 | next_packed.value());
272 next_packed =
word[1];
275 packed.emplace_back(
word[0]);
280 if constexpr (std::is_same_v<T, TkJetWord> || std::is_same_v<T, PFJet>) {
281 while (packed.size() < 24) {
282 packed.emplace_back(0);
284 }
else if constexpr (std::is_same_v<T, TrackerMuon> || std::is_same_v<T, TkEm> || std::is_same_v<T, TkElectron> ||
285 std::is_same_v<T, PFTau>) {
286 while (packed.size() < 18) {
288 packed.emplace_back(next_packed.value());
291 packed.emplace_back(0);
294 }
else if constexpr (std::is_same_v<T, SAMuon> || std::is_same_v<T, VertexWord>) {
295 while (packed.size() < 12) {
296 packed.emplace_back(0);
298 }
else if constexpr (std::is_same_v<T, EtSum>) {
299 if (packed.size() < 1) {
300 packed.emplace_back(0);
ap_uint< 64 > encodeEtSum(const l1t::EtSum &v)
ap_uint< 64 > encodeHtSum(const l1t::EtSum &v)
constexpr float ETAPHI_LSB