CMS 3D CMS Logo

L1TrackVertexAssociationProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: L1Trigger/L1TTrackMatch
4 // Class: L1TrackVertexAssociationProducer
5 //
18 //
19 // Original Author: Alexx Perloff
20 // Created: Thu, 16 Dec 2021 19:02:50 GMT
21 // Derivative Author: Nick Manganelli
22 // Created: Thu, 14 Oct 2023 16:32:32 GMT
23 //
24 //
25 
26 // system include files
27 #include <algorithm>
28 #include <memory>
29 #include <string>
30 #include <vector>
31 
32 // Xilinx HLS includes
33 #include <ap_fixed.h>
34 #include <ap_int.h>
35 
36 // user include files
66 
67 //
68 // class declaration
69 //
70 
72 public:
75 
76  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
77 
78 private:
79  // ----------constants, enums and typedefs ---------
80  // Relevant constants for the converted track word
82  kPtSize = TTTrack_TrackWord::TrackBitWidths::kRinvSize - 1, // Width of pt
83  kPtMagSize = 9, // Width of pt magnitude (unsigned)
84  kEtaSize = TTTrack_TrackWord::TrackBitWidths::kTanlSize, // Width of eta
85  kEtaMagSize = 3, // Width of eta magnitude (signed)
86  };
87 
89  typedef std::vector<TTTrackType> TTTrackCollectionType;
92  typedef std::unique_ptr<TTTrackRefCollectionType> TTTrackRefCollectionUPtr;
93 
94  // ----------member functions ----------------------
95  void printDebugInfo(const edm::Handle<TTTrackRefCollectionType>& l1SelectedTracksHandle,
96  const edm::Handle<TTTrackRefCollectionType>& l1SelectedTracksEmulationHandle,
97  const TTTrackRefCollectionUPtr& vTTTrackAssociatedOutput,
98  const TTTrackRefCollectionUPtr& vTTTrackAssociatedEmulationOutput) const;
99  void printTrackInfo(edm::LogInfo& log, const TTTrackType& track, bool printEmulation = false) const;
100  void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
101 
102  // ----------selectors -----------------------------
103  // Based on recommendations from https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideGenericSelectors
105  TTTrackDeltaZMaxSelector(const std::vector<double>& deltaZMaxEtaBounds, const std::vector<double>& deltaZMax)
108  : deltaZMaxEtaBounds_(cfg.template getParameter<double>("deltaZMaxEtaBounds")),
109  deltaZMax_(cfg.template getParameter<double>("deltaZMax")) {}
110  bool operator()(const TTTrackType& t, const l1t::Vertex& v) const {
111  size_t etaIndex =
112  std::upper_bound(deltaZMaxEtaBounds_.begin(), deltaZMaxEtaBounds_.end(), std::abs(t.momentum().eta())) -
113  deltaZMaxEtaBounds_.begin() - 1;
114  if (etaIndex > deltaZMax_.size() - 1)
115  etaIndex = deltaZMax_.size() - 1;
116  return std::abs(v.z0() - t.z0()) <= deltaZMax_[etaIndex];
117  }
118 
119  private:
120  std::vector<double> deltaZMaxEtaBounds_;
121  std::vector<double> deltaZMax_;
122  };
124  TTTrackWordDeltaZMaxSelector(const std::vector<double>& deltaZMaxEtaBounds, const std::vector<double>& deltaZMax)
127  : deltaZMaxEtaBounds_(cfg.template getParameter<double>("deltaZMaxEtaBounds")),
128  deltaZMax_(cfg.template getParameter<double>("deltaZMax")) {}
129  bool operator()(const TTTrackType& t, const l1t::VertexWord& v) const {
130  TTTrack_TrackWord::tanl_t etaEmulationBits = t.getTanlWord();
131  ap_fixed<TrackBitWidths::kEtaSize, TrackBitWidths::kEtaMagSize> etaEmulation;
132  etaEmulation.V = etaEmulationBits.range();
133  size_t etaIndex =
134  std::upper_bound(deltaZMaxEtaBounds_.begin(), deltaZMaxEtaBounds_.end(), std::abs(etaEmulation.to_double())) -
135  deltaZMaxEtaBounds_.begin() - 1;
136  if (etaIndex > deltaZMax_.size() - 1)
137  etaIndex = deltaZMax_.size() - 1;
138  l1t::VertexWord::vtxz0_t fixedTkZ0 = t.undigitizeSignedValue(
139  t.getZ0Bits(), TTTrack_TrackWord::TrackBitWidths::kZ0Size, TTTrack_TrackWord::stepZ0, 0.0);
140 
141  ap_uint<TrackBitWidths::kPtSize> ptEmulationBits = t.getTrackWord()(
142  TTTrack_TrackWord::TrackBitLocations::kRinvMSB - 1, TTTrack_TrackWord::TrackBitLocations::kRinvLSB);
143  ap_ufixed<TrackBitWidths::kPtSize, TrackBitWidths::kPtMagSize> ptEmulation;
144  ptEmulation.V = ptEmulationBits.range();
145  return std::abs(v.z0() - fixedTkZ0.to_double()) <= deltaZMax_[etaIndex];
146  }
147 
148  private:
149  std::vector<double> deltaZMaxEtaBounds_;
150  std::vector<double> deltaZMax_;
151  };
154  //create a counter for all 18 GTT input links, 2 per phiSector of the TrackFindingProcessors
155  for (int idx = 0; idx < 18; idx++) {
156  processedTracksPerLink_.push_back(0);
157  truncatedTracksPerLink_.push_back(0);
158  }
159  }
161  : fwNTrackSetsTVA_(cfg.template getParameter<unsigned int>("fwNTrackSetsTVA")) {
162  for (int idx = 0; idx < 18; idx++) {
163  processedTracksPerLink_.push_back(0);
164  }
165  }
166  bool operator()(const TTTrackType& t) {
167  unsigned int gttLinkID = l1t::demo::codecs::gttLinkID(t);
168  //increment the counter of processed tracks
170  //fwNTrackSetsTVA_ tracks may be processed in firmware, no more (<= used intentionally to match the off-by-one indexing versus LibHLS)
171  if ((processedTracksPerLink_[gttLinkID] > fwNTrackSetsTVA_) && (t.getValidWord()))
174  }
175  void log() {
176  edm::LogInfo log("L1TrackVertexAssociationProducer");
177  log << "Processed track link counters:\t[";
178  for (int idx = 0; idx < 18; idx++) {
179  if (idx > 0)
180  log << ", ";
182  }
183  log << "]\n";
184  log << "Truncated track link counters:\t[";
185  for (int idx = 0; idx < 18; idx++) {
186  if (idx > 0)
187  log << ", ";
189  }
190  log << "]\n";
191  }
192 
193  private:
194  unsigned int fwNTrackSetsTVA_;
195  std::vector<unsigned int> processedTracksPerLink_;
196  std::vector<unsigned int> truncatedTracksPerLink_;
197  };
198 
199  // ----------member data ---------------------------
208  std::vector<double> deltaZMaxEtaBounds_, deltaZMax_;
210  // corresponds to N_TRACK_SETS_TVA in LibHLS https://gitlab.cern.ch/GTT/LibHLS/-/blob/master/DataFormats/Track/interface/TrackConstants.h
211  const unsigned int fwNTrackSetsTVA_;
212  int debug_;
213 };
214 
215 //
216 // constructors and destructor
217 //
219  : processSimulatedTracks_(iConfig.getParameter<bool>("processSimulatedTracks")),
220  processEmulatedTracks_(iConfig.getParameter<bool>("processEmulatedTracks")),
221  l1TracksToken_(consumes<TTTrackCollectionType>(iConfig.getParameter<edm::InputTag>("l1TracksInputTag"))),
222  l1VerticesToken_(processSimulatedTracks_
223  ? consumes<l1t::VertexCollection>(iConfig.getParameter<edm::InputTag>("l1VerticesInputTag"))
224  : edm::EDGetTokenT<l1t::VertexCollection>()),
225  l1SelectedTracksToken_(
226  processSimulatedTracks_
227  ? consumes<TTTrackRefCollectionType>(iConfig.getParameter<edm::InputTag>("l1SelectedTracksInputTag"))
228  : edm::EDGetTokenT<TTTrackRefCollectionType>()),
229  l1VerticesEmulationToken_(
230  processEmulatedTracks_
231  ? consumes<l1t::VertexWordCollection>(iConfig.getParameter<edm::InputTag>("l1VerticesEmulationInputTag"))
232  : edm::EDGetTokenT<l1t::VertexWordCollection>()),
233  l1SelectedTracksEmulationToken_(processEmulatedTracks_
234  ? consumes<TTTrackRefCollectionType>(iConfig.getParameter<edm::InputTag>(
235  "l1SelectedTracksEmulationInputTag"))
236  : edm::EDGetTokenT<TTTrackRefCollectionType>()),
237  outputCollectionName_(iConfig.getParameter<std::string>("outputCollectionName")),
238  cutSet_(iConfig.getParameter<edm::ParameterSet>("cutSet")),
239 
240  deltaZMaxEtaBounds_(cutSet_.getParameter<std::vector<double>>("deltaZMaxEtaBounds")),
241  deltaZMax_(cutSet_.getParameter<std::vector<double>>("deltaZMax")),
242  useDisplacedTracksDeltaZOverride_(iConfig.getParameter<double>("useDisplacedTracksDeltaZOverride")),
243  fwNTrackSetsTVA_(iConfig.getParameter<unsigned int>("fwNTrackSetsTVA")),
244  debug_(iConfig.getParameter<int>("debug")) {
245  // Confirm the the configuration makes sense
247  throw cms::Exception("You must process at least one of the track collections (simulated or emulated).");
248  }
249 
250  if (deltaZMax_.size() != deltaZMaxEtaBounds_.size() - 1) {
251  throw cms::Exception("The number of deltaZ cuts does not match the number of eta bins!");
252  }
253 
255  deltaZMax_ = std::vector<double>(deltaZMax_.size(), useDisplacedTracksDeltaZOverride_);
256  }
257 
258  // Get additional input tags and define the EDM output based on the previous configuration parameters
260  produces<TTTrackRefCollectionType>(outputCollectionName_);
262  produces<TTTrackRefCollectionType>(outputCollectionName_ + "Emulation");
263 }
264 
266 
267 //
268 // member functions
269 //
270 
272  const edm::Handle<TTTrackRefCollectionType>& l1SelectedTracksHandle,
273  const edm::Handle<TTTrackRefCollectionType>& l1SelectedTracksEmulationHandle,
274  const TTTrackRefCollectionUPtr& vTTTrackAssociatedOutput,
275  const TTTrackRefCollectionUPtr& vTTTrackAssociatedEmulationOutput) const {
276  edm::LogInfo log("L1TrackVertexAssociationProducer");
278  log << "The original selected track collection (pt, eta, phi, nstub, bendchi2, chi2rz, chi2rphi, z0) values are "
279  "... \n";
280  for (const auto& track : *l1SelectedTracksHandle) {
281  printTrackInfo(log, *track, debug_ >= 4);
282  }
283  log << "\t---\n\tNumber of tracks in this selection = " << l1SelectedTracksHandle->size() << "\n\n";
284  }
286  log << "The original selected emulated track collection (pt, eta, phi, nstub, bendchi2, chi2rz, chi2rphi, z0) "
287  "values are ... \n";
288  for (const auto& track : *l1SelectedTracksEmulationHandle) {
289  printTrackInfo(log, *track, debug_ >= 4);
290  }
291  log << "\t---\n\tNumber of tracks in this selection = " << l1SelectedTracksEmulationHandle->size() << "\n\n";
292  }
294  TTTrackRefCollectionType inSimButNotEmu;
295  TTTrackRefCollectionType inEmuButNotSim;
296  std::set_difference(l1SelectedTracksHandle->begin(),
297  l1SelectedTracksHandle->end(),
298  l1SelectedTracksEmulationHandle->begin(),
299  l1SelectedTracksEmulationHandle->end(),
300  std::back_inserter(inSimButNotEmu));
301  std::set_difference(l1SelectedTracksEmulationHandle->begin(),
302  l1SelectedTracksEmulationHandle->end(),
303  l1SelectedTracksHandle->begin(),
304  l1SelectedTracksHandle->end(),
305  std::back_inserter(inEmuButNotSim));
306  log << "The set of tracks selected via cuts on the simulated values which are not in the set of tracks selected "
307  "by cutting on the emulated values ... \n";
308  for (const auto& track : inSimButNotEmu) {
309  printTrackInfo(log, *track, debug_ >= 3);
310  }
311  log << "\t---\n\tNumber of tracks in this selection = " << inSimButNotEmu.size() << "\n\n"
312  << "The set of tracks selected via cuts on the emulated values which are not in the set of tracks selected "
313  "by cutting on the simulated values ... \n";
314  for (const auto& track : inEmuButNotSim) {
315  printTrackInfo(log, *track, debug_ >= 3);
316  }
317  log << "\t---\n\tNumber of tracks in this selection = " << inEmuButNotSim.size() << "\n\n";
318  }
320  log << "The selected and leading vertex associated track collection (pt, eta, phi, nstub, bendchi2, chi2rz, "
321  "chi2rphi, z0) values are ... \n";
322  for (const auto& track : *vTTTrackAssociatedOutput) {
323  printTrackInfo(log, *track, debug_ >= 4);
324  }
325  log << "\t---\n\tNumber of tracks in this selection = " << vTTTrackAssociatedOutput->size() << "\n\n";
326  }
328  log << "The emulation selected and leading vertex associated track collection (pt, eta, phi, nstub, bendchi2, "
329  "chi2rz, chi2rphi, z0) values are "
330  "... \n";
331  for (const auto& track : *vTTTrackAssociatedEmulationOutput) {
332  printTrackInfo(log, *track, debug_ >= 4);
333  }
334  log << "\t---\n\tNumber of tracks in this selection = " << vTTTrackAssociatedEmulationOutput->size() << "\n\n";
335  }
337  TTTrackRefCollectionType inSimButNotEmu;
338  TTTrackRefCollectionType inEmuButNotSim;
339  std::set_difference(vTTTrackAssociatedOutput->begin(),
340  vTTTrackAssociatedOutput->end(),
341  vTTTrackAssociatedEmulationOutput->begin(),
342  vTTTrackAssociatedEmulationOutput->end(),
343  std::back_inserter(inSimButNotEmu));
344  std::set_difference(vTTTrackAssociatedEmulationOutput->begin(),
345  vTTTrackAssociatedEmulationOutput->end(),
346  vTTTrackAssociatedOutput->begin(),
347  vTTTrackAssociatedOutput->end(),
348  std::back_inserter(inEmuButNotSim));
349  log << "The set of vertex associated tracks selected via cuts on the simulated values which are not in the set of "
350  "tracks selected "
351  "by cutting on the emulated values ... \n";
352  for (const auto& track : inSimButNotEmu) {
353  printTrackInfo(log, *track, debug_ >= 3);
354  }
355  log << "\t---\n\tNumber of tracks in this selection = " << inSimButNotEmu.size() << "\n\n"
356  << "The set of vertex associated tracks selected via cuts on the emulated values which are not in the set of "
357  "tracks selected "
358  "by cutting on the simulated values ... \n";
359  for (const auto& track : inEmuButNotSim) {
360  printTrackInfo(log, *track, debug_ >= 3);
361  }
362  log << "\t---\n\tNumber of tracks in this selection = " << inEmuButNotSim.size() << "\n\n";
363  }
364 }
365 
367  const TTTrackType& track,
368  bool printEmulation) const {
369  log << "\t(" << track.momentum().perp() << ", " << track.momentum().eta() << ", " << track.momentum().phi() << ", "
370  << track.getStubRefs().size() << ", " << track.stubPtConsistency() << ", " << track.chi2ZRed() << ", "
371  << track.chi2XYRed() << ", " << track.z0() << ")\n";
372 
373  if (printEmulation) {
374  ap_uint<TrackBitWidths::kPtSize> ptEmulationBits = track.getTrackWord()(
375  TTTrack_TrackWord::TrackBitLocations::kRinvMSB - 1, TTTrack_TrackWord::TrackBitLocations::kRinvLSB);
376  ap_ufixed<TrackBitWidths::kPtSize, TrackBitWidths::kPtMagSize> ptEmulation;
377  ptEmulation.V = ptEmulationBits.range();
378  TTTrack_TrackWord::tanl_t etaEmulationBits = track.getTanlWord();
379  ap_fixed<TrackBitWidths::kEtaSize, TrackBitWidths::kEtaMagSize> etaEmulation;
380  etaEmulation.V = etaEmulationBits.range();
381  double floatTkZ0 = track.undigitizeSignedValue(
382  track.getZ0Bits(), TTTrack_TrackWord::TrackBitWidths::kZ0Size, TTTrack_TrackWord::stepZ0, 0.0);
383  double floatTkPhi = track.undigitizeSignedValue(
384  track.getPhiBits(), TTTrack_TrackWord::TrackBitWidths::kPhiSize, TTTrack_TrackWord::stepPhi0, 0.0);
385  log << "\t\t(" << ptEmulation.to_double() << ", " << etaEmulation.to_double() << ", " << floatTkPhi << ", "
386  << track.getNStubs() << ", " << track.getBendChi2() << ", " << track.getChi2RZ() << ", " << track.getChi2RPhi()
387  << ", " << floatTkZ0 << ")\n";
388  }
389 }
390 
391 // ------------ method called to produce the data ------------
393  auto vTTTrackAssociatedOutput = std::make_unique<TTTrackRefCollectionType>();
394  auto vTTTrackAssociatedEmulationOutput = std::make_unique<TTTrackRefCollectionType>();
395 
396  TTTrackCollectionHandle l1TracksHandle;
397  edm::Handle<TTTrackRefCollectionType> l1SelectedTracksHandle;
398  edm::Handle<TTTrackRefCollectionType> l1SelectedTracksEmulationHandle;
399  edm::Handle<l1t::VertexCollection> l1VerticesHandle;
400  edm::Handle<l1t::VertexWordCollection> l1VerticesEmulationHandle;
401 
402  l1t::Vertex leadingVertex;
403  l1t::VertexWord leadingEmulationVertex;
404 
405  TTTrackWordLinkLimitSelector linkLimitSel(fwNTrackSetsTVA_); //stateful functor for simulated tracks
406  TTTrackWordLinkLimitSelector linkLimitSelEmu(fwNTrackSetsTVA_); //stateful functor for emulated tracks
407 
410 
411  iEvent.getByToken(l1TracksToken_, l1TracksHandle);
412  size_t nOutputApproximate = l1TracksHandle->size();
413 
415  iEvent.getByToken(l1SelectedTracksToken_, l1SelectedTracksHandle);
416  iEvent.getByToken(l1VerticesToken_, l1VerticesHandle);
417  leadingVertex = l1VerticesHandle->at(0);
418  if (debug_ >= 2) {
419  edm::LogInfo("L1TrackVertexAssociationProducer") << "leading vertex z0 = " << leadingVertex.z0();
420  }
421  vTTTrackAssociatedOutput->reserve(nOutputApproximate);
422  }
424  iEvent.getByToken(l1SelectedTracksEmulationToken_, l1SelectedTracksEmulationHandle);
425  iEvent.getByToken(l1VerticesEmulationToken_, l1VerticesEmulationHandle);
426  leadingEmulationVertex = l1VerticesEmulationHandle->at(0);
427  if (debug_ >= 2) {
428  edm::LogInfo("L1TrackVertexAssociationProducer")
429  << "leading emulation vertex z0 = " << leadingEmulationVertex.z0();
430  }
431  vTTTrackAssociatedEmulationOutput->reserve(nOutputApproximate);
432  }
433  for (size_t i = 0; i < nOutputApproximate; i++) {
434  const auto& track = l1TracksHandle->at(i);
436  // Limit the number of processed tracks according to the firmware capability: must be run on non-selected tracks (i.e. GTTConverted tracks)
437  bool passLinkLimit = linkLimitSel(track);
438  // Only match Selected tracks, by testing that the track is in the SelectedTracks collection
439  auto itr = std::find_if(l1SelectedTracksHandle->begin(), l1SelectedTracksHandle->end(), [track](const auto& ref) {
440  return (*ref).getTrackWord() == track.getTrackWord();
441  });
442  bool passSelection = (itr != l1SelectedTracksHandle->end());
443  // Associate tracks based on the simulation delta Z
444  if (passLinkLimit && passSelection && deltaZSel(track, leadingVertex)) {
445  vTTTrackAssociatedOutput->push_back(TTTrackRef(l1TracksHandle, i));
446  }
447  } //end if (processSimulatedTracks_)
449  // Limit the number of processed tracks according to the firmware capability: must be run on non-selected tracks (i.e. GTTConverted tracks)
450  bool passLinkLimitEmu = linkLimitSelEmu(track);
451  // Only match Selected tracks, by testing that the track is in the SelectedTracks collection
452  auto itrEmu = std::find_if(l1SelectedTracksEmulationHandle->begin(),
453  l1SelectedTracksEmulationHandle->end(),
454  [track](const auto& ref) { return (*ref).getTrackWord() == track.getTrackWord(); });
455  bool passSelectionEmu = (itrEmu != l1SelectedTracksEmulationHandle->end());
456  // Associated tracks based on the bitwise accurate TTTrack_TrackWord
457  if (passLinkLimitEmu && passSelectionEmu && deltaZSelEmu(track, l1VerticesEmulationHandle->at(0))) {
458  vTTTrackAssociatedEmulationOutput->push_back(TTTrackRef(l1TracksHandle, i));
459  } //end block for satisfying LinkLimitEmu and SelectionEmu criteria
460  } //end if (processEmulatedTracks_)
461  } //end loop over input converted tracks
462 
464  iEvent.put(std::move(vTTTrackAssociatedOutput), outputCollectionName_);
465  }
466 
468  iEvent.put(std::move(vTTTrackAssociatedEmulationOutput), outputCollectionName_ + "Emulation");
469  if (debug_ >= 2)
470  linkLimitSelEmu.log();
471  }
472 
474  printDebugInfo(l1SelectedTracksHandle,
475  l1SelectedTracksEmulationHandle,
476  vTTTrackAssociatedOutput,
477  vTTTrackAssociatedEmulationOutput);
478  }
479 }
480 
481 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
484  desc.add<edm::InputTag>("l1TracksInputTag", edm::InputTag("l1tGTTInputProducer", "Level1TTTracksConverted"));
485  desc.add<edm::InputTag>("l1SelectedTracksInputTag",
486  edm::InputTag("l1tTrackSelectionProducer", "Level1TTTracksSelected"));
487  desc.add<edm::InputTag>("l1SelectedTracksEmulationInputTag",
488  edm::InputTag("l1tTrackSelectionProducer", "Level1TTTracksSelectedEmulation"));
489  desc.add<edm::InputTag>("l1VerticesInputTag", edm::InputTag("l1tVertexFinder", "L1Vertices"));
490  desc.add<edm::InputTag>("l1VerticesEmulationInputTag",
491  edm::InputTag("l1tVertexFinderEmulator", "L1VerticesEmulation"));
492  desc.add<std::string>("outputCollectionName", "Level1TTTracksSelectedAssociated");
493  {
494  edm::ParameterSetDescription descCutSet;
495  descCutSet.add<std::vector<double>>("deltaZMaxEtaBounds", {0.0, 0.7, 1.0, 1.2, 1.6, 2.0, 2.4})
496  ->setComment("these values define the bin boundaries in |eta|");
497  descCutSet.add<std::vector<double>>("deltaZMax", {0.37, 0.50, 0.60, 0.75, 1.00, 1.60})
498  ->setComment(
499  "delta z must be less than these values, there will be one less value here than in deltaZMaxEtaBounds, "
500  "[cm]");
501  desc.add<edm::ParameterSetDescription>("cutSet", descCutSet);
502  }
503  desc.add<double>("useDisplacedTracksDeltaZOverride", -1.0)
504  ->setComment("override the deltaZ cut value for displaced tracks");
505  desc.add<bool>("processSimulatedTracks", true)
506  ->setComment("return selected tracks after cutting on the floating point values");
507  desc.add<bool>("processEmulatedTracks", true)
508  ->setComment("return selected tracks after cutting on the bitwise emulated values");
509  desc.add<unsigned int>("fwNTrackSetsTVA", 94)->setComment("firmware limit on processed tracks per GTT input link");
510  desc.add<int>("debug", 0)->setComment("Verbosity levels: 0, 1, 2, 3");
511  descriptions.addWithDefaultLabel(desc);
512 }
513 
514 //define this as a plug-in
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< TTTrackCollectionType > l1TracksToken_
void printTrackInfo(edm::LogInfo &log, const TTTrackType &track, bool printEmulation=false) const
bool operator()(const TTTrackType &t, const l1t::VertexWord &v) const
L1TrackVertexAssociationProducer(const edm::ParameterSet &)
TTTrackDeltaZMaxSelector(const std::vector< double > &deltaZMaxEtaBounds, const std::vector< double > &deltaZMax)
bool operator()(const TTTrackType &t, const l1t::Vertex &v) const
delete x;
Definition: CaloConfig.h:22
std::vector< Vertex > VertexCollection
Definition: Vertex.h:31
const edm::EDGetTokenT< l1t::VertexCollection > l1VerticesToken_
const edm::EDGetTokenT< TTTrackRefCollectionType > l1SelectedTracksToken_
TTTrackWordDeltaZMaxSelector(const std::vector< double > &deltaZMaxEtaBounds, const std::vector< double > &deltaZMax)
int iEvent
Definition: GenABIO.cc:224
ap_fixed< VertexBitWidths::kZ0Size, VertexBitWidths::kZ0MagSize, AP_RND_CONV, AP_SAT > vtxz0_t
Definition: VertexWord.h:65
edm::Handle< TTTrackCollectionType > TTTrackCollectionHandle
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
unsigned int gttLinkID(T track)
Definition: tracks.h:20
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:521
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::vector< VertexWord > VertexWordCollection
Definition: VertexWord.h:197
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Log< level::Info, false > LogInfo
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:228
void printDebugInfo(const edm::Handle< TTTrackRefCollectionType > &l1SelectedTracksHandle, const edm::Handle< TTTrackRefCollectionType > &l1SelectedTracksEmulationHandle, const TTTrackRefCollectionUPtr &vTTTrackAssociatedOutput, const TTTrackRefCollectionUPtr &vTTTrackAssociatedEmulationOutput) const
static constexpr double stepPhi0
double z0() const
Definition: VertexWord.h:158
std::unique_ptr< TTTrackRefCollectionType > TTTrackRefCollectionUPtr
HLT enums.
ap_uint< TrackBitWidths::kTanlSize > tanl_t
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::EDGetTokenT< l1t::VertexWordCollection > l1VerticesEmulationToken_
float z0() const
Definition: Vertex.h:21
edm::Ref< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > >, TTTrack< Ref_Phase2TrackerDigi_ > > TTTrackRef
Definition: TTTypes.h:51
edm::RefVector< TTTrackCollectionType > TTTrackRefCollectionType
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:223
TTTrack< Ref_Phase2TrackerDigi_ > TTTrackType
static constexpr double stepZ0
const edm::EDGetTokenT< TTTrackRefCollectionType > l1SelectedTracksEmulationToken_
std::vector< std::string > set_difference(std::vector< std::string > const &v1, std::vector< std::string > const &v2)
def move(src, dest)
Definition: eostools.py:511