78 {{
"tracks", 0}, {0, 18, 36}},
79 {{
"tracks", 1}, {1, 19, 37}},
80 {{
"tracks", 2}, {2, 20, 38}},
81 {{
"tracks", 3}, {3, 21, 39}},
82 {{
"tracks", 4}, {4, 22, 40}},
83 {{
"tracks", 5}, {5, 23, 41}},
84 {{
"tracks", 6}, {6, 24, 42}},
85 {{
"tracks", 7}, {7, 25, 43}},
86 {{
"tracks", 8}, {8, 26, 44}},
87 {{
"tracks", 9}, {9, 27, 45}},
88 {{
"tracks", 10}, {10, 28, 46}},
89 {{
"tracks", 11}, {11, 29, 47}},
90 {{
"tracks", 12}, {12, 30, 48}},
91 {{
"tracks", 13}, {13, 31, 49}},
92 {{
"tracks", 14}, {14, 32, 50}},
93 {{
"tracks", 15}, {15, 33, 51}},
94 {{
"tracks", 16}, {16, 34, 52}},
95 {{
"tracks", 17}, {17, 35, 53}}};
101 const std::map<l1t::demo::LinkId, std::pair<l1t::demo::ChannelSpec, std::vector<size_t>>>
110 {{
"mesons", 2}, {2}},
111 {{
"vertices", 3}, {3}}};
153 convertedTracksToken_(
155 convertedTrackCollectionToken_(
157 selectedTracksToken_(
159 vertexAssociatedTracksToken_(
161 verticesToken_(consumes<
edm::
View<
l1t::VertexWord>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"vertices"))),
162 jetsToken_(consumes<
edm::
View<
l1t::TkJetWord>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"jets"))),
163 htMissToken_(consumes<
edm::
View<
l1t::EtSum>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"htmiss"))),
164 etMissToken_(consumes<
edm::
View<
l1t::EtSum>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"etmiss"))),
166 iConfig.getUntrackedParameter<
std::
string>(
"inputFilename"),
167 kFramesPerTMUXPeriod,
173 iConfig.getUntrackedParameter<
std::
string>(
"inputConvertedFilename"),
174 kFramesPerTMUXPeriod,
180 iConfig.getUntrackedParameter<
std::
string>(
"selectedTracksFilename"),
181 kFramesPerTMUXPeriod,
186 fileWriterVertexAssociatedTracks_(
188 iConfig.getUntrackedParameter<
std::
string>(
"vertexAssociatedTracksFilename"),
189 kFramesPerTMUXPeriod,
195 iConfig.getUntrackedParameter<
std::
string>(
"outputCorrelatorFilename"),
196 kFramesPerTMUXPeriod,
199 kChannelSpecsOutputToCorrelator),
201 iConfig.getUntrackedParameter<
std::
string>(
"outputGlobalTriggerFilename"),
202 kFramesPerTMUXPeriod,
205 kChannelIdsOutputToGlobalTrigger,
206 kChannelSpecsOutputToGlobalTrigger) {}
229 const auto convertedTrackData(
encodeTracks(convertedTracksCollection));
230 const auto selectedTrackData(
encodeTracks(convertedTracksHandle, selectedTracksHandle));
231 const auto vertexAssociatedTrackData(
encodeTracks(convertedTracksHandle, vertexAssociatedTracksHandle));
242 for (
size_t i = 0;
i < 18;
i++) {
243 eventDataTracks.
add({
"tracks",
i}, trackData.at(
i));
244 eventDataConvertedTracks.
add({
"tracks",
i}, convertedTrackData.at(
i));
245 eventDataSelectedTracks.
add({
"tracks",
i}, selectedTrackData.at(
i));
246 eventDataVertexAssociatedTracks.
add({
"tracks",
i}, vertexAssociatedTrackData.at(
i));
250 eventDataVertices.
add({
"vertices", 0}, vertexData.at(0));
253 std::vector<ap_uint<64>> sumsData;
254 sumsData.insert(sumsData.end(), jetsData.at(0).begin(), jetsData.at(0).end());
255 sumsData.insert(sumsData.end(), 24, 0);
256 sumsData.insert(sumsData.end(), htMissData.at(0).begin(), htMissData.at(0).end());
257 sumsData.insert(sumsData.end(), 1, 0);
258 sumsData.insert(sumsData.end(), etMissData.at(0).begin(), etMissData.at(0).end());
260 std::vector<ap_uint<64>> tracksVerticesData;
261 tracksVerticesData.insert(tracksVerticesData.end(), 36, 0);
262 tracksVerticesData.insert(tracksVerticesData.end(), vertexData.at(0).begin(), vertexData.at(0).end());
263 tracksVerticesData.insert(tracksVerticesData.end(), 2, 0);
266 eventDataGlobalTrigger.
add({
"sums", 0}, sumsData);
267 eventDataGlobalTrigger.
add({
"taus", 1}, std::vector<ap_uint<64>>(18, 0));
268 eventDataGlobalTrigger.
add({
"mesons", 2},
269 std::vector<ap_uint<64>>(39, 0));
270 eventDataGlobalTrigger.
add({
"vertices", 3}, tracksVerticesData);
298 edm::InputTag(
"l1tTrackSelectionProducer",
"Level1TTTracksSelectedEmulation"));
300 "vertexAssociatedTracks",
301 edm::InputTag(
"l1tTrackSelectionProducer",
"Level1TTTracksSelectedAssociatedEmulation"));
307 desc.addUntracked<
std::string>(
"inputConvertedFilename",
"L1GTTInputConvertedFile");
308 desc.addUntracked<
std::string>(
"selectedTracksFilename",
"L1GTTSelectedTracksFile");
309 desc.addUntracked<
std::string>(
"vertexAssociatedTracksFilename",
"L1GTTVertexAssociatedTracksFile");
310 desc.addUntracked<
std::string>(
"outputCorrelatorFilename",
"L1GTTOutputToCorrelatorFile");
311 desc.addUntracked<
std::string>(
"outputGlobalTriggerFilename",
"L1GTTOutputToGlobalTriggerFile");
313 descriptions.
add(
"GTTFileWriter",
desc);
l1t::demo::BoardDataWriter fileWriterVertexAssociatedTracks_
static constexpr size_t kTrackTMUX
l1t::demo::BoardDataWriter fileWriterOutputToCorrelator_
std::array< std::vector< ap_uint< 64 > >, 1 > encodeHtSums(const edm::View< l1t::EtSum > &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::EDGetTokenT< edm::View< l1t::EtSum > > etMissToken_
const edm::EDGetTokenT< edm::View< Track_t > > convertedTracksToken_
void addEvent(const EventData &data)
FileFormat parseFileFormat(const std::string &)
void add(const LinkId &, const std::vector< ap_uint< 64 >> &)
std::array< std::vector< ap_uint< 64 > >, 18 > encodeTracks(const edm::View< TTTrack< Ref_Phase2TrackerDigi_ >> &, int debug=0)
const edm::EDGetTokenT< edm::View< l1t::EtSum > > htMissToken_
const edm::EDGetTokenT< edm::View< l1t::VertexWord > > verticesToken_
const edm::EDGetTokenT< edm::View< l1t::TkJetWord > > jetsToken_
static constexpr size_t kMaxLinesPerFile
GTTFileWriter(const edm::ParameterSet &)
static constexpr size_t kGapLengthOutputToGlobalTriggerMesons
#define DEFINE_FWK_MODULE(type)
static constexpr size_t kFramesPerTMUXPeriod
TTTrack< Ref_Phase2TrackerDigi_ > Track_t
l1t::demo::BoardDataWriter fileWriterInputTracks_
const std::map< l1t::demo::LinkId, std::pair< l1t::demo::ChannelSpec, std::vector< size_t > > > kChannelSpecsOutputToCorrelator
static constexpr size_t kGapLengthOutputToGlobalTriggerTaus
std::array< std::vector< ap_uint< 64 > >, 1 > encodeEtSums(const edm::View< l1t::EtSum > &)
Class to store the L1 Track Trigger tracks.
std::array< std::vector< ap_uint< 64 > >, 1 > encodeVertices(const edm::View< l1t::VertexWord > &)
static constexpr size_t kGapLengthOutputToCorrelator
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const std::map< l1t::demo::LinkId, std::vector< size_t > > kChannelIdsInput
l1t::demo::BoardDataWriter fileWriterSelectedTracks_
const std::map< std::string, l1t::demo::ChannelSpec > kChannelSpecsInput
static constexpr size_t kGapLengthOutputToGlobalTriggerVertices
std::vector< Track_t > TrackCollection_t
const std::map< std::string, l1t::demo::ChannelSpec > kChannelSpecsOutputToGlobalTrigger
static constexpr size_t kGTTBoardTMUX
const edm::EDGetTokenT< TrackCollection_t > convertedTrackCollectionToken_
const edm::EDGetTokenT< TrackRefCollection_t > selectedTracksToken_
std::array< std::vector< ap_uint< 64 > >, 1 > encodeTkJets(const edm::View< l1t::TkJetWord > &)
static constexpr size_t kGapLengthInput
static constexpr size_t kGapLengthOutputToGlobalTriggerSums
l1t::demo::BoardDataWriter fileWriterOutputToGlobalTrigger_
edm::RefVector< TrackCollection_t > TrackRefCollection_t
Class representing information phase-2 ATCA I/O data corresponding to a single event, with logical channel IDs (essentially string-uint pairs, e.g. tracks-0 to tracks-17).
const edm::EDGetTokenT< TrackRefCollection_t > vertexAssociatedTracksToken_
l1t::demo::BoardDataWriter fileWriterConvertedTracks_
const std::map< l1t::demo::LinkId, std::vector< size_t > > kChannelIdsOutputToGlobalTrigger
void analyze(const edm::Event &, const edm::EventSetup &) override
const edm::EDGetTokenT< edm::View< Track_t > > tracksToken_