10 auto it = std::find_if(
11 trackRefCollection->begin(),
12 trackRefCollection->end(),
14 if (it != trackRefCollection->end())
25 std::array<std::vector<ap_uint<96>>, 18> trackWords;
36 std::array<std::vector<ap_uint<96>>, 18> trackWords;
37 for (
unsigned int itrack = 0; itrack < referenceTracks->size(); itrack++) {
55 for (
size_t i = 0;
i < linkData.size();
i++) {
57 trackWords.at(
i).resize(104, 0);
58 linkData.at(
i).resize(156, {0});
60 for (
size_t j = 0; (
j < trackWords.at(
i).size());
j += 2) {
61 linkData.at(
i).at(3 *
j / 2) = trackWords.at(
i).at(
j)(63, 0);
62 linkData.at(
i).at(3 *
j / 2 + 1) =
63 (ap_uint<32>(trackWords.at(
i).at(
j + 1)(31, 0)), ap_uint<32>(trackWords.at(
i).at(
j)(95, 64)));
64 linkData.at(
i).at(3 *
j / 2 + 2) = trackWords.at(
i).at(
j + 1)(95, 32);
65 counter += trackWords.at(
i).at(
j)(95, 95) + trackWords.at(
i).at(
j + 1)(95, 95);
75 edm::LogInfo(
"l1t::demo::codecs") <<
"encodeTrack::Encoding " <<
tracks.size() <<
" tracks";
79 std::array<std::vector<ap_uint<64>>, 18> linkData;
96 edm::LogInfo(
"l1t::demo::codecs") <<
"encodeTrack::Encoding " <<
tracks->size() <<
" tracks";
99 std::array<std::vector<ap_uint<96>>, 18> trackWords =
getTrackWords(referenceTracks,
tracks);
100 std::array<std::vector<ap_uint<64>>, 18> linkData;
111 std::vector<TTTrack_TrackWord>
tracks;
113 if ((frames.size() % 3) != 0) {
114 std::stringstream message;
115 message <<
"The number of track frames (" << frames.size() <<
") is not evenly divisible by 3";
116 throw std::runtime_error(message.str());
119 for (
size_t i = 0;
i < frames.size();
i += 3) {
162 std::array<std::vector<TTTrack_TrackWord>, 18>
tracks;
164 for (
size_t i = 0;
i <
tracks.size();
i++) {
ap_uint< TrackBitWidths::kTrackWordSize > tkword_t
ap_uint< 96 > encodeTrack(const TTTrack_TrackWord &t)
ap_uint< TrackBitWidths::kMVAQualitySize > qualityMVA_t
size_t encodeLinks(std::array< std::vector< ap_uint< 96 >>, 18 > &trackWords, std::array< std::vector< ap_uint< 64 >>, 18 > &linkData)
std::array< std::vector< ap_uint< 64 > >, 18 > encodeTracks(const edm::View< TTTrack< Ref_Phase2TrackerDigi_ >> &, int debug=0)
ap_uint< TrackBitWidths::kZ0Size > z0_t
void setTrackWord(unsigned int valid, const GlobalVector &momentum, const GlobalPoint &POCA, double rInv, double chi2RPhi, double chi2RZ, double bendChi2, unsigned int hitPattern, unsigned int mvaQuality, unsigned int mvaOther, unsigned int sector)
ap_uint< TrackBitWidths::kMVAOtherSize > otherMVA_t
ap_uint< TrackBitWidths::kValidSize > valid_t
ap_uint< TrackBitWidths::kRinvSize > rinv_t
ap_uint< TrackBitWidths::kHitPatternSize > hit_t
ap_uint< TrackBitWidths::kChi2RZSize > chi2rz_t
Log< level::Info, false > LogInfo
Class to store the L1 Track Trigger tracks.
std::array< std::vector< ap_uint< 96 > >, 18 > getTrackWords(const edm::View< TTTrack< Ref_Phase2TrackerDigi_ >> &)
bool trackInCollection(const edm::Ref< std::vector< TTTrack< Ref_Phase2TrackerDigi_ >>> &, const edm::Handle< edm::RefVector< std::vector< TTTrack< Ref_Phase2TrackerDigi_ >>>> &)
ap_uint< TrackBitWidths::kTanlSize > tanl_t
static std::atomic< unsigned int > counter
ap_uint< TrackBitWidths::kD0Size > d0_t
ap_uint< TrackBitWidths::kChi2RPhiSize > chi2rphi_t
std::vector< TTTrack_TrackWord > decodeTracks(const std::vector< ap_uint< 64 >> &)
ap_uint< TrackBitWidths::kBendChi2Size > bendChi2_t
ap_uint< TrackBitWidths::kPhiSize > phi_t