CMS 3D CMS Logo

tracks.h
Go to the documentation of this file.
1 
2 #ifndef L1Trigger_DemonstratorTools_codecs_tracks_h
3 #define L1Trigger_DemonstratorTools_codecs_tracks_h
4 
5 #include <array>
6 #include <sstream>
7 #include <vector>
8 
9 #include "ap_int.h"
10 
16 
17 namespace l1t::demo::codecs {
18 
19  // Return true if a track is contained within a collection
22 
23  // Encodes a single track into a 96-bit track word
24  ap_uint<96> encodeTrack(const TTTrack_TrackWord& t);
25 
26  // Return the 96-bit track words from a given track collection and place them on the appropriate 18 'logical' links
27  std::array<std::vector<ap_uint<96>>, 18> getTrackWords(const edm::View<TTTrack<Ref_Phase2TrackerDigi_>>&);
28  std::array<std::vector<ap_uint<96>>, 18> getTrackWords(
31 
32  // Encodes track collection onto 18 'logical' output links (2x9 eta-phi sectors; -/+ eta pairs)
33  std::array<std::vector<ap_uint<64>>, 18> encodeTracks(const edm::View<TTTrack<Ref_Phase2TrackerDigi_>>&,
34  int debug = 0);
35 
36  // Encodes a track collection based off the ordering of another track collection
37  // Requirement: The second collection must be a subset of the first
38  std::array<std::vector<ap_uint<64>>, 18> encodeTracks(
41  int debug = 0);
42 
43  // Decodes the tracks for a single link
44  std::vector<TTTrack_TrackWord> decodeTracks(const std::vector<ap_uint<64>>&);
45 
46  // Decodes the tracks from 18 'logical' output links (2x9 eta-phi sectors; , -/+ eta pairs)
47  std::array<std::vector<TTTrack_TrackWord>, 18> decodeTracks(const std::array<std::vector<ap_uint<64>>, 18>&);
48 
49 } // namespace l1t::demo::codecs
50 
51 #endif
ap_uint< 96 > encodeTrack(const TTTrack_TrackWord &t)
std::array< std::vector< ap_uint< 64 > >, 18 > encodeTracks(const edm::View< TTTrack< Ref_Phase2TrackerDigi_ >> &, int debug=0)
#define debug
Definition: HDRShower.cc:19
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
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_ >>>> &)
Definition: codecs_tracks.cc:7
std::vector< TTTrack_TrackWord > decodeTracks(const std::vector< ap_uint< 64 >> &)