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 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
168 kFramesPerTMUXPeriod,
174 iConfig.getUntrackedParameter<
std::
string>(
"inputConvertedFilename"),
175 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
176 kFramesPerTMUXPeriod,
182 iConfig.getUntrackedParameter<
std::
string>(
"selectedTracksFilename"),
183 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
184 kFramesPerTMUXPeriod,
189 fileWriterVertexAssociatedTracks_(
191 iConfig.getUntrackedParameter<
std::
string>(
"vertexAssociatedTracksFilename"),
192 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
193 kFramesPerTMUXPeriod,
199 iConfig.getUntrackedParameter<
std::
string>(
"outputCorrelatorFilename"),
200 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
201 kFramesPerTMUXPeriod,
204 kChannelSpecsOutputToCorrelator),
206 iConfig.getUntrackedParameter<
std::
string>(
"outputGlobalTriggerFilename"),
207 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
208 kFramesPerTMUXPeriod,
211 kChannelIdsOutputToGlobalTrigger,
212 kChannelSpecsOutputToGlobalTrigger) {}
235 const auto convertedTrackData(
encodeTracks(convertedTracksCollection));
236 const auto selectedTrackData(
encodeTracks(convertedTracksHandle, selectedTracksHandle));
237 const auto vertexAssociatedTrackData(
encodeTracks(convertedTracksHandle, vertexAssociatedTracksHandle));
248 for (
size_t i = 0;
i < 18;
i++) {
249 eventDataTracks.
add({
"tracks",
i}, trackData.at(
i));
250 eventDataConvertedTracks.
add({
"tracks",
i}, convertedTrackData.at(
i));
251 eventDataSelectedTracks.
add({
"tracks",
i}, selectedTrackData.at(
i));
252 eventDataVertexAssociatedTracks.
add({
"tracks",
i}, vertexAssociatedTrackData.at(
i));
256 eventDataVertices.
add({
"vertices", 0}, vertexData.at(0));
259 std::vector<ap_uint<64>> sumsData;
260 sumsData.insert(sumsData.end(), jetsData.at(0).begin(), jetsData.at(0).end());
261 sumsData.insert(sumsData.end(), 24, 0);
262 sumsData.insert(sumsData.end(), htMissData.at(0).begin(), htMissData.at(0).end());
263 sumsData.insert(sumsData.end(), 1, 0);
264 sumsData.insert(sumsData.end(), etMissData.at(0).begin(), etMissData.at(0).end());
266 std::vector<ap_uint<64>> tracksVerticesData;
267 tracksVerticesData.insert(tracksVerticesData.end(), 36, 0);
268 tracksVerticesData.insert(tracksVerticesData.end(), vertexData.at(0).begin(), vertexData.at(0).end());
269 tracksVerticesData.insert(tracksVerticesData.end(), 2, 0);
272 eventDataGlobalTrigger.
add({
"sums", 0}, sumsData);
273 eventDataGlobalTrigger.
add({
"taus", 1}, std::vector<ap_uint<64>>(18, 0));
274 eventDataGlobalTrigger.
add({
"mesons", 2},
275 std::vector<ap_uint<64>>(39, 0));
276 eventDataGlobalTrigger.
add({
"vertices", 3}, tracksVerticesData);
304 edm::InputTag(
"l1tTrackSelectionProducer",
"Level1TTTracksSelectedEmulation"));
306 "vertexAssociatedTracks",
307 edm::InputTag(
"l1tTrackSelectionProducer",
"Level1TTTracksSelectedAssociatedEmulation"));
313 desc.addUntracked<
std::string>(
"inputConvertedFilename",
"L1GTTInputConvertedFile");
314 desc.addUntracked<
std::string>(
"selectedTracksFilename",
"L1GTTSelectedTracksFile");
315 desc.addUntracked<
std::string>(
"vertexAssociatedTracksFilename",
"L1GTTVertexAssociatedTracksFile");
316 desc.addUntracked<
std::string>(
"outputCorrelatorFilename",
"L1GTTOutputToCorrelatorFile");
317 desc.addUntracked<
std::string>(
"outputGlobalTriggerFilename",
"L1GTTOutputToGlobalTriggerFile");
320 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_