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++) {
54 for (
size_t i = 0;
i < linkData.size();
i++) {
56 trackWords.at(
i).resize(104, 0);
57 linkData.at(
i).resize(156, {0});
59 for (
size_t j = 0; (
j < trackWords.at(
i).size());
j += 2) {
60 linkData.at(
i).at(3 *
j / 2) = trackWords.at(
i).at(
j)(63, 0);
61 linkData.at(
i).at(3 *
j / 2 + 1) =
62 (ap_uint<32>(trackWords.at(
i).at(
j + 1)(31, 0)), ap_uint<32>(trackWords.at(
i).at(
j)(95, 64)));
63 linkData.at(
i).at(3 *
j / 2 + 2) = trackWords.at(
i).at(
j + 1)(95, 32);
64 counter += trackWords.at(
i).at(
j)(95, 95) + trackWords.at(
i).at(
j + 1)(95, 95);
74 edm::LogInfo(
"l1t::demo::codecs") <<
"encodeTrack::Encoding " <<
tracks.size() <<
" tracks";
78 std::array<std::vector<ap_uint<64>>, 18> linkData;
95 edm::LogInfo(
"l1t::demo::codecs") <<
"encodeTrack::Encoding " <<
tracks->size() <<
" tracks";
98 std::array<std::vector<ap_uint<96>>, 18> trackWords =
getTrackWords(referenceTracks,
tracks);
99 std::array<std::vector<ap_uint<64>>, 18> linkData;
110 std::vector<TTTrack_TrackWord>
tracks;
112 if ((frames.size() % 3) != 0) {
113 std::stringstream message;
114 message <<
"The number of track frames (" << frames.size() <<
") is not evenly divisible by 3";
115 throw std::runtime_error(message.str());
118 for (
size_t i = 0;
i < frames.size();
i += 3) {
161 std::array<std::vector<TTTrack_TrackWord>, 18>
tracks;
163 for (
size_t i = 0;
i <
tracks.size();
i++) {
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)
ap_uint< kTrackWordSize > tkword_t
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, double mvaQuality, double mvaOther, unsigned int sector)
ap_uint< TrackBitWidths::kMVAOtherSize > otherMVA_t
unsigned int gttLinkID(T track)
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