74 : processOutputToCorrelator_(iConfig.getParameter<
bool>(
"processOutputToCorrelator")),
75 processInputTracks_(iConfig.getParameter<
bool>(
"processInputTracks")),
76 processOutputToGlobalTrigger_(iConfig.getParameter<
bool>(
"processOutputToGlobalTrigger")),
77 kEmptyFramesOutputToCorrelator_(iConfig.getUntrackedParameter<unsigned
int>(
"kEmptyFramesOutputToCorrelator")),
78 kEmptyFramesInputTracks_(iConfig.getUntrackedParameter<unsigned
int>(
"kEmptyFramesInputTracks")),
79 kEmptyFramesOutputToGlobalTrigger_(
80 iConfig.getUntrackedParameter<unsigned
int>(
"kEmptyFramesOutputToGlobalTrigger")),
81 l1VertexCollectionName_(iConfig.getParameter<
std::
string>(
"l1VertexCollectionName")),
82 l1TrackCollectionName_(iConfig.getParameter<
std::
string>(
"l1TrackCollectionName")) {
86 iConfig.
getParameter<std::vector<std::string>>(
"filesOutputToCorrelator"),
96 iConfig.
getParameter<std::vector<std::string>>(
"filesInputTracks"),
111 throw std::invalid_argument(
"Processing OutputToGlobalTrigger files has not been fully implemented and validated.");
130 auto inputTracks = std::make_unique<TTTrackCollection>();
132 auto iTracks =
decodeTracks(inputEventData.at({
"tracks", i}));
133 for (
auto& trackword : iTracks) {
134 if (!trackword.getValidWord())
137 trackword.getRinvWord(),
138 trackword.getPhiWord(),
139 trackword.getTanlWord(),
140 trackword.getZ0Word(),
141 trackword.getD0Word(),
142 trackword.getChi2RPhiWord(),
143 trackword.getChi2RZWord(),
144 trackword.getBendChi2Word(),
145 trackword.getHitPatternWord(),
146 trackword.getMVAQualityWord(),
147 trackword.getMVAOtherWord());
152 track.trackWord_ = trackword.trackWord_;
164 desc.add<
bool>(
"processOutputToCorrelator")
165 ->setComment(
"boolean flag to load Correlator outputs via BoardDataReader and produce vertex collection");
166 desc.add<
bool>(
"processInputTracks")
167 ->setComment(
"boolean flag to load track inputs via BoardDataReader and produce a TTTrack collection");
168 desc.add<
bool>(
"processOutputToGlobalTrigger")
170 "boolean flag to load Global Trigger outputs via BoardDataReader and produce Track Object collections");
171 desc.addUntracked<
unsigned int>(
"kEmptyFramesOutputToCorrelator", 0)
172 ->setComment(
"empty frames to expect in OutputToCorrelator");
173 desc.addUntracked<
unsigned int>(
"kEmptyFramesInputTracks", 0)->setComment(
"empty frames to expect in Track Input");
174 desc.addUntracked<
unsigned int>(
"kEmptyFramesOutputToGlobalTrigger", 0)
175 ->setComment(
"empty frames to expect in OutputToGlobalTrigger");
176 desc.add<std::vector<std::string>>(
"filesOutputToCorrelator",
178 "L1GTTOutputToCorrelator_0.txt",
180 desc.add<std::vector<std::string>>(
"filesInputTracks",
182 "L1GTTInputFile_0.txt",
184 desc.add<std::vector<std::string>>(
"filesOutputToGlobalTrigger",
186 "L1GTTOutputToGlobalTriggerFile_0.txt",
191 descriptions.
add(
"GTTFileReader",
desc);
T getParameter(std::string const &) const
static const ChannelMap_t kChannelMapInput
const size_t kEmptyFramesOutputToCorrelator_
void produce(edm::Event &, const edm::EventSetup &) override
const bool processOutputToGlobalTrigger_
FileFormat parseFileFormat(const std::string &)
static constexpr size_t kTrackTMUX
std::string l1TrackCollectionName_
T getUntrackedParameter(std::string const &, T const &) const
const bool processInputTracks_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::string l1VertexCollectionName_
const bool processOutputToCorrelator_
static std::pair< unsigned int, unsigned int > sectorsEtaPhiFromGTTLinkID(unsigned int id)
static constexpr size_t kFramesPerTMUXPeriod
static constexpr size_t kGTTBoardTMUX
std::optional< l1t::demo::BoardDataReader > fileReaderOutputToGlobalTrigger_
TTTrack< Ref_Phase2TrackerDigi_ > L1Track
std::vector< l1t::VertexWord > decodeVertices(const std::vector< ap_uint< 64 >> &)
#define DEFINE_FWK_MODULE(type)
const size_t kEmptyFramesInputTracks_
std::vector< VertexWord > VertexWordCollection
std::optional< l1t::demo::BoardDataReader > fileReaderInputTracks_
Log< level::Info, false > LogInfo
Class to store the L1 Track Trigger tracks.
std::optional< l1t::demo::BoardDataReader > fileReaderOutputToCorrelator_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
GTTFileReader(const edm::ParameterSet &)
static const ChannelMap_t kChannelMapOutputToCorrelator
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).
std::vector< TTTrack_TrackWord > decodeTracks(const std::vector< ap_uint< 64 >> &)
const size_t kEmptyFramesOutputToGlobalTrigger_
std::vector< L1Track > TTTrackCollection