101 convertedTracksToken_(
103 convertedTrackCollectionToken_(
105 selectedTracksToken_(
107 vertexAssociatedTracksToken_(
109 verticesToken_(consumes<
edm::
View<
l1t::VertexWord>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"vertices"))),
110 jetsToken_(consumes<
edm::
View<
l1t::TkJetWord>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"jets"))),
111 jetsDispToken_(consumes<
edm::
View<
l1t::TkJetWord>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"jetsdisp"))),
112 htMissToken_(consumes<
edm::
View<
l1t::EtSum>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"htmiss"))),
113 htMissDispToken_(consumes<
edm::
View<
l1t::EtSum>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"htmissdisp"))),
114 etMissToken_(consumes<
edm::
View<
l1t::EtSum>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"etmiss"))),
116 iConfig.getUntrackedParameter<
std::
string>(
"inputFilename"),
117 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
124 iConfig.getUntrackedParameter<
std::
string>(
"inputConvertedFilename"),
125 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
132 iConfig.getUntrackedParameter<
std::
string>(
"selectedTracksFilename"),
133 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
139 fileWriterVertexAssociatedTracks_(
141 iConfig.getUntrackedParameter<
std::
string>(
"vertexAssociatedTracksFilename"),
142 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
149 iConfig.getUntrackedParameter<
std::
string>(
"outputCorrelatorFilename"),
150 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
157 iConfig.getUntrackedParameter<
std::
string>(
"outputGlobalTriggerFilename"),
158 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
188 const auto convertedTrackData(
encodeTracks(convertedTracksCollection));
189 const auto selectedTrackData(
encodeTracks(convertedTracksHandle, selectedTracksHandle));
190 const auto vertexAssociatedTrackData(
encodeTracks(convertedTracksHandle, vertexAssociatedTracksHandle));
193 const auto jetsDispData(
encodeTkJets(jetsDispCollection));
195 const auto htMissDispData(
encodeHtSums(htMissDispCollection));
203 for (
size_t i = 0;
i < 18;
i++) {
204 eventDataTracks.
add({
"tracks",
i}, trackData.at(
i));
205 eventDataConvertedTracks.
add({
"tracks",
i}, convertedTrackData.at(
i));
206 eventDataSelectedTracks.
add({
"tracks",
i}, selectedTrackData.at(
i));
207 eventDataVertexAssociatedTracks.
add({
"tracks",
i}, vertexAssociatedTrackData.at(
i));
211 eventDataVertices.
add({
"vertices", 0}, vertexData.at(0));
214 std::vector<ap_uint<64>> sumsData;
215 sumsData.insert(sumsData.end(), jetsData.at(0).begin(), jetsData.at(0).end());
216 sumsData.insert(sumsData.end(), jetsDispData.at(0).begin(), jetsDispData.at(0).end());
217 sumsData.insert(sumsData.end(), htMissData.at(0).begin(), htMissData.at(0).end());
218 sumsData.insert(sumsData.end(), htMissDispData.at(0).begin(), htMissDispData.at(0).end());
219 sumsData.insert(sumsData.end(), etMissData.at(0).begin(), etMissData.at(0).end());
221 std::vector<ap_uint<64>> tracksVerticesData;
222 tracksVerticesData.insert(tracksVerticesData.end(), 36, 0);
223 tracksVerticesData.insert(tracksVerticesData.end(), vertexData.at(0).begin(), vertexData.at(0).end());
224 tracksVerticesData.insert(tracksVerticesData.end(), 2, 0);
227 eventDataGlobalTrigger.
add({
"sums", 0}, sumsData);
228 eventDataGlobalTrigger.
add({
"taus", 1}, std::vector<ap_uint<64>>(18, 0));
229 eventDataGlobalTrigger.
add({
"mesons", 2},
230 std::vector<ap_uint<64>>(39, 0));
231 eventDataGlobalTrigger.
add({
"vertices", 3}, tracksVerticesData);
259 edm::InputTag(
"l1tTrackSelectionProducer",
"Level1TTTracksSelectedEmulation"));
261 "vertexAssociatedTracks",
262 edm::InputTag(
"l1tTrackSelectionProducer",
"Level1TTTracksSelectedAssociatedEmulation"));
268 edm::InputTag(
"l1tTrackerEmuHTMissExtended",
"L1TrackerEmuHTMissExtended"));
271 desc.addUntracked<
std::string>(
"inputConvertedFilename",
"L1GTTInputConvertedFile");
272 desc.addUntracked<
std::string>(
"selectedTracksFilename",
"L1GTTSelectedTracksFile");
273 desc.addUntracked<
std::string>(
"vertexAssociatedTracksFilename",
"L1GTTVertexAssociatedTracksFile");
274 desc.addUntracked<
std::string>(
"outputCorrelatorFilename",
"L1GTTOutputToCorrelatorFile");
275 desc.addUntracked<
std::string>(
"outputGlobalTriggerFilename",
"L1GTTOutputToGlobalTriggerFile");
278 descriptions.
add(
"GTTFileWriter",
desc);
l1t::demo::BoardDataWriter fileWriterVertexAssociatedTracks_
static constexpr size_t kMaxLinesPerFile
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< l1t::EtSum > > htMissDispToken_
static const std::map< l1t::demo::LinkId, std::vector< size_t > > kChannelIdsInput
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 >> &)
static const std::map< std::string, l1t::demo::ChannelSpec > kChannelSpecsOutputToGlobalTrigger
static const std::map< std::string, l1t::demo::ChannelSpec > kChannelSpecsOutputToCorrelator
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 kFramesPerTMUXPeriod
static constexpr size_t kGTTBoardTMUX
GTTFileWriter(const edm::ParameterSet &)
static const std::map< l1t::demo::LinkId, std::vector< size_t > > kChannelIdsOutputToGlobalTrigger
#define DEFINE_FWK_MODULE(type)
TTTrack< Ref_Phase2TrackerDigi_ > Track_t
l1t::demo::BoardDataWriter fileWriterInputTracks_
static const std::map< std::string, l1t::demo::ChannelSpec > kChannelSpecsInput
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 > &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
l1t::demo::BoardDataWriter fileWriterSelectedTracks_
std::vector< Track_t > TrackCollection_t
const edm::EDGetTokenT< TrackCollection_t > convertedTrackCollectionToken_
static const std::map< l1t::demo::LinkId, std::vector< size_t > > kChannelIdsOutputToCorrelator
const edm::EDGetTokenT< TrackRefCollection_t > selectedTracksToken_
std::array< std::vector< ap_uint< 64 > >, 1 > encodeTkJets(const edm::View< l1t::TkJetWord > &)
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 edm::EDGetTokenT< edm::View< l1t::TkJetWord > > jetsDispToken_
void analyze(const edm::Event &, const edm::EventSetup &) override
const edm::EDGetTokenT< edm::View< Track_t > > tracksToken_