CMS 3D CMS Logo

GTTInterface.h
Go to the documentation of this file.
1 #ifndef L1Trigger_DemonstratorTools_GTTInterface_h
2 #define L1Trigger_DemonstratorTools_GTTInterface_h
3 
4 #include <cstddef>
5 
11 
12 namespace l1t::demo::gtt {
13  // map of logical channel ID -> [TMUX period, interpacket-gap & offset; channel indices]
14  typedef std::map<LinkId, std::pair<ChannelSpec, std::vector<size_t>>> ChannelMap_t;
15 
16  static constexpr size_t kFramesPerTMUXPeriod = 9;
17  static constexpr size_t kGapLengthInput = 6; //defined in terms of nTracks * (3/2) - 3 * 54?
18  static constexpr size_t kGapLengthOutputToCorrelator = 44; //can be defined in terms of 54 - nVertices?
23  static constexpr size_t kTrackTMUX = 18; //TMUX of the TrackFindingProcessors
24  static constexpr size_t kGTTBoardTMUX =
25  6; //TMUX of the GTT in the current configuration: 6 boards running 3 events in parallel, with a paired board running parallel algorithms
26  static constexpr size_t kMaxLinesPerFile = 1024;
27 
28  static constexpr size_t kVertexChanIndex = 0;
29 
30  // TRACKS from TFP
31  static const std::map<l1t::demo::LinkId, std::vector<size_t>> kChannelIdsInput = {
32  /* logical channel within time slice -> vector of channel indices (one entry per time slice) */
33  /* for first link in a time slice, the channel index is 1 for 1st time slice, channel 19 in the 2nd*/
34  {{"tracks", 0}, {0, 18, 36}},
35  {{"tracks", 1}, {1, 19, 37}},
36  {{"tracks", 2}, {2, 20, 38}},
37  {{"tracks", 3}, {3, 21, 39}},
38  {{"tracks", 4}, {4, 22, 40}},
39  {{"tracks", 5}, {5, 23, 41}},
40  {{"tracks", 6}, {6, 24, 42}},
41  {{"tracks", 7}, {7, 25, 43}},
42  {{"tracks", 8}, {8, 26, 44}},
43  {{"tracks", 9}, {9, 27, 45}},
44  {{"tracks", 10}, {10, 28, 46}},
45  {{"tracks", 11}, {11, 29, 47}},
46  {{"tracks", 12}, {12, 30, 48}},
47  {{"tracks", 13}, {13, 31, 49}},
48  {{"tracks", 14}, {14, 32, 50}},
49  {{"tracks", 15}, {15, 33, 51}},
50  {{"tracks", 16}, {16, 34, 52}},
51  {{"tracks", 17}, {17, 35, 53}}};
52 
53  static const ChannelMap_t kChannelMapInput = {
54  /* logical channel within time slice -> {{link TMUX, inter-packet gap}, vector of channel indices} */
55  {{"tracks", 0}, {{kTrackTMUX, kGapLengthInput}, {0, 18, 36}}},
56  {{"tracks", 1}, {{kTrackTMUX, kGapLengthInput}, {1, 19, 37}}},
57  {{"tracks", 2}, {{kTrackTMUX, kGapLengthInput}, {2, 20, 38}}},
58  {{"tracks", 3}, {{kTrackTMUX, kGapLengthInput}, {3, 21, 39}}},
59  {{"tracks", 4}, {{kTrackTMUX, kGapLengthInput}, {4, 22, 40}}},
60  {{"tracks", 5}, {{kTrackTMUX, kGapLengthInput}, {5, 23, 41}}},
61  {{"tracks", 6}, {{kTrackTMUX, kGapLengthInput}, {6, 24, 42}}},
62  {{"tracks", 7}, {{kTrackTMUX, kGapLengthInput}, {7, 25, 43}}},
63  {{"tracks", 8}, {{kTrackTMUX, kGapLengthInput}, {8, 26, 44}}},
64  {{"tracks", 9}, {{kTrackTMUX, kGapLengthInput}, {9, 27, 45}}},
65  {{"tracks", 10}, {{kTrackTMUX, kGapLengthInput}, {10, 28, 46}}},
66  {{"tracks", 11}, {{kTrackTMUX, kGapLengthInput}, {11, 29, 47}}},
67  {{"tracks", 12}, {{kTrackTMUX, kGapLengthInput}, {12, 30, 48}}},
68  {{"tracks", 13}, {{kTrackTMUX, kGapLengthInput}, {13, 31, 49}}},
69  {{"tracks", 14}, {{kTrackTMUX, kGapLengthInput}, {14, 32, 50}}},
70  {{"tracks", 15}, {{kTrackTMUX, kGapLengthInput}, {15, 33, 51}}},
71  {{"tracks", 16}, {{kTrackTMUX, kGapLengthInput}, {16, 34, 52}}},
72  {{"tracks", 17}, {{kTrackTMUX, kGapLengthInput}, {17, 35, 53}}}};
73 
74  static const std::map<std::string, l1t::demo::ChannelSpec> kChannelSpecsInput = {
75  /* interface name -> {link TMUX, inter-packet gap} */
76  {"tracks", {kTrackTMUX, kGapLengthInput}}};
77 
78  //OUTPUTS to Correlator
80  /* logical channel within time slice -> {{link TMUX, inter-packet gap}, vector of channel indices} */
81  {{"vertices", 0}, {{kGTTBoardTMUX, kGapLengthOutputToCorrelator}, {0}}}};
82 
83  static const std::map<l1t::demo::LinkId, std::vector<size_t>> kChannelIdsOutputToCorrelator = {
84  /* logical channel within time slice -> vector of channel indices */
85  {{"vertices", 0}, {0}}};
86 
87  static const std::map<std::string, l1t::demo::ChannelSpec> kChannelSpecsOutputToCorrelator = {
88  /* interface name -> {link TMUX, inter-packet gap} */
90 
91  //OUTPUTS to Global Trigger
92  static const std::map<l1t::demo::LinkId, std::vector<size_t>> kChannelIdsOutputToGlobalTrigger = {
93  /* logical channel within time slice -> vector of channel indices (one entry per time slice) */
94  {{"sums", 0}, {0}},
95  {{"taus", 1}, {1}},
96  {{"mesons", 2}, {2}},
97  {{"vertices", 3}, {3}}};
98 
99  static const std::map<std::string, l1t::demo::ChannelSpec> kChannelSpecsOutputToGlobalTrigger = {
100  /* interface name -> {link TMUX, inter-packet gap} */
105 
106 } // namespace l1t::demo::gtt
107 
108 #endif
static constexpr size_t kMaxLinesPerFile
Definition: GTTInterface.h:26
static const ChannelMap_t kChannelMapInput
Definition: GTTInterface.h:53
static const std::map< l1t::demo::LinkId, std::vector< size_t > > kChannelIdsInput
Definition: GTTInterface.h:31
static constexpr size_t kGapLengthOutputToGlobalTriggerTaus
Definition: GTTInterface.h:20
static constexpr size_t kGapLengthOutputToGlobalTriggerVertices
Definition: GTTInterface.h:22
static constexpr size_t kGapLengthInput
Definition: GTTInterface.h:17
static constexpr size_t kTrackTMUX
Definition: GTTInterface.h:23
static const std::map< std::string, l1t::demo::ChannelSpec > kChannelSpecsOutputToGlobalTrigger
Definition: GTTInterface.h:99
static const std::map< std::string, l1t::demo::ChannelSpec > kChannelSpecsOutputToCorrelator
Definition: GTTInterface.h:87
static constexpr size_t kFramesPerTMUXPeriod
Definition: GTTInterface.h:16
static constexpr size_t kGTTBoardTMUX
Definition: GTTInterface.h:24
static const std::map< l1t::demo::LinkId, std::vector< size_t > > kChannelIdsOutputToGlobalTrigger
Definition: GTTInterface.h:92
static constexpr size_t kGapLengthOutputToGlobalTriggerMesons
Definition: GTTInterface.h:21
static constexpr size_t kVertexChanIndex
Definition: GTTInterface.h:28
static constexpr size_t kGapLengthOutputToCorrelator
Definition: GTTInterface.h:18
static const std::map< std::string, l1t::demo::ChannelSpec > kChannelSpecsInput
Definition: GTTInterface.h:74
static constexpr size_t kGapLengthOutputToGlobalTriggerSums
Definition: GTTInterface.h:19
static const std::map< l1t::demo::LinkId, std::vector< size_t > > kChannelIdsOutputToCorrelator
Definition: GTTInterface.h:83
static const ChannelMap_t kChannelMapOutputToCorrelator
Definition: GTTInterface.h:79
std::map< LinkId, std::pair< ChannelSpec, std::vector< size_t > > > ChannelMap_t
Definition: GTTInterface.h:14