99 convertedTracksToken_(
101 convertedTrackCollectionToken_(
103 selectedTracksToken_(
105 vertexAssociatedTracksToken_(
107 verticesToken_(consumes<
edm::
View<
l1t::VertexWord>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"vertices"))),
108 jetsToken_(consumes<
edm::
View<
l1t::TkJetWord>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"jets"))),
109 htMissToken_(consumes<
edm::
View<
l1t::EtSum>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"htmiss"))),
110 etMissToken_(consumes<
edm::
View<
l1t::EtSum>>(iConfig.getUntrackedParameter<
edm::
InputTag>(
"etmiss"))),
112 iConfig.getUntrackedParameter<
std::
string>(
"inputFilename"),
113 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
120 iConfig.getUntrackedParameter<
std::
string>(
"inputConvertedFilename"),
121 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
128 iConfig.getUntrackedParameter<
std::
string>(
"selectedTracksFilename"),
129 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
135 fileWriterVertexAssociatedTracks_(
137 iConfig.getUntrackedParameter<
std::
string>(
"vertexAssociatedTracksFilename"),
138 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
145 iConfig.getUntrackedParameter<
std::
string>(
"outputCorrelatorFilename"),
146 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
153 iConfig.getUntrackedParameter<
std::
string>(
"outputGlobalTriggerFilename"),
154 iConfig.getUntrackedParameter<
std::
string>(
"fileExtension"),
182 const auto convertedTrackData(
encodeTracks(convertedTracksCollection));
183 const auto selectedTrackData(
encodeTracks(convertedTracksHandle, selectedTracksHandle));
184 const auto vertexAssociatedTrackData(
encodeTracks(convertedTracksHandle, vertexAssociatedTracksHandle));
195 for (
size_t i = 0;
i < 18;
i++) {
196 eventDataTracks.
add({
"tracks",
i}, trackData.at(
i));
197 eventDataConvertedTracks.
add({
"tracks",
i}, convertedTrackData.at(
i));
198 eventDataSelectedTracks.
add({
"tracks",
i}, selectedTrackData.at(
i));
199 eventDataVertexAssociatedTracks.
add({
"tracks",
i}, vertexAssociatedTrackData.at(
i));
203 eventDataVertices.
add({
"vertices", 0}, vertexData.at(0));
206 std::vector<ap_uint<64>> sumsData;
207 sumsData.insert(sumsData.end(), jetsData.at(0).begin(), jetsData.at(0).end());
208 sumsData.insert(sumsData.end(), 24, 0);
209 sumsData.insert(sumsData.end(), htMissData.at(0).begin(), htMissData.at(0).end());
210 sumsData.insert(sumsData.end(), 1, 0);
211 sumsData.insert(sumsData.end(), etMissData.at(0).begin(), etMissData.at(0).end());
213 std::vector<ap_uint<64>> tracksVerticesData;
214 tracksVerticesData.insert(tracksVerticesData.end(), 36, 0);
215 tracksVerticesData.insert(tracksVerticesData.end(), vertexData.at(0).begin(), vertexData.at(0).end());
216 tracksVerticesData.insert(tracksVerticesData.end(), 2, 0);
219 eventDataGlobalTrigger.
add({
"sums", 0}, sumsData);
220 eventDataGlobalTrigger.
add({
"taus", 1}, std::vector<ap_uint<64>>(18, 0));
221 eventDataGlobalTrigger.
add({
"mesons", 2},
222 std::vector<ap_uint<64>>(39, 0));
223 eventDataGlobalTrigger.
add({
"vertices", 3}, tracksVerticesData);
251 edm::InputTag(
"l1tTrackSelectionProducer",
"Level1TTTracksSelectedEmulation"));
253 "vertexAssociatedTracks",
254 edm::InputTag(
"l1tTrackSelectionProducer",
"Level1TTTracksSelectedAssociatedEmulation"));
260 desc.addUntracked<
std::string>(
"inputConvertedFilename",
"L1GTTInputConvertedFile");
261 desc.addUntracked<
std::string>(
"selectedTracksFilename",
"L1GTTSelectedTracksFile");
262 desc.addUntracked<
std::string>(
"vertexAssociatedTracksFilename",
"L1GTTVertexAssociatedTracksFile");
263 desc.addUntracked<
std::string>(
"outputCorrelatorFilename",
"L1GTTOutputToCorrelatorFile");
264 desc.addUntracked<
std::string>(
"outputGlobalTriggerFilename",
"L1GTTOutputToGlobalTriggerFile");
267 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_
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_
void analyze(const edm::Event &, const edm::EventSetup &) override
const edm::EDGetTokenT< edm::View< Track_t > > tracksToken_