CMS 3D CMS Logo

L1GTTInputProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: L1Trigger/L1TTrackMatch
4 // Class: L1GTTInputProducer
5 //
14 //
15 // Original Author: Alexx Perloff
16 // Created: Sat, 20 Feb 2021 17:02:00 GMT
17 //
18 //
19 
20 // user include files
34 
35 // Vivado HLS includes
36 #include <ap_fixed.h>
37 #include <ap_int.h>
38 
39 // system include files
40 #define _USE_MATH_DEFINES
41 #include <cmath>
42 #include <string>
43 #include <sstream>
44 #include <vector>
45 
46 //
47 // class declaration
48 //
49 
51 public:
52  explicit L1GTTInputProducer(const edm::ParameterSet&);
53  ~L1GTTInputProducer() override;
54 
55  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
56 
57 private:
58  // ----------constants, enums and typedefs ---------
59  static constexpr unsigned int Npars4 = 4;
60  static constexpr unsigned int Npars5 = 5;
62  kEtaMagSize = 3, // eta output magnitude size; MAG + FRAC should be <= kEtaInputSize
63  kEtaFracSize = 5, // eta output fraction size; MAG + FRAC should be <= kEtaInputSize
64  kEtaInputSize = 16, // size of tan(lambda)
65 
66  kPTMagSize = 7, // magnitude output size; MAG + FRAC should be <= kPTInputSize
67  kPTFracSize = 3, // fraction output size; MAG + FRAC should be <= kPTInputSize
68  kPTInputSize = 15, // size of 1/R
69 
70  kEtaOutputSize = kEtaMagSize + kEtaFracSize, // total bit width for eta
71  kPTOutputSize = kPTMagSize + kPTFracSize, // total bit width for pT
72  };
73 
74  static constexpr double kEtaErrThresh = 0.0485; // error corresponding to 0.25 of a degree error in lambda
75 
76  static constexpr double kPTErrThresh = 5; // error threshold in percent
77  static constexpr double kSynchrotron = (1.0 / (0.3 * 3.8)); // 1/(0.3*B) for 1/R to 1/pT conversion
78  static constexpr unsigned int kPtLutSize = (1 << ConversionBitWidths::kPTOutputSize);
79  static constexpr unsigned int kEtaLutSize = (1 << (ConversionBitWidths::kEtaOutputSize - 1));
80 
82  typedef std::vector<L1Track> TTTrackCollection;
84  typedef ap_fixed<kEtaOutputSize, kEtaMagSize, AP_RND_CONV, AP_SAT> out_eta_t;
86  typedef ap_ufixed<kPTOutputSize, kPTMagSize, AP_RND_CONV, AP_SAT> out_pt_t;
88  typedef ap_uint<1> out_charge_t;
89 
90  // ----------member functions ----------------------
91  void generate_eta_lut();
92  void generate_pt_lut();
93  bool getEtaBits(
94  const L1Track& track, out_eta_t& etaBits, double& expected, double& maxErrPerc, double& maxErrEpsilon) const;
95  bool getPtBits(const L1Track& track,
96  out_pt_t& ptBits,
97  out_charge_t& chargeBit,
98  double& expected,
99  double& maxErrPerc,
100  double& maxErrEpsilon,
101  double& minErrPerc,
102  double& minExpected) const;
103  double indexTanLambda2Eta(unsigned int indexTanLambda) const;
104  double inverseRT2InversePT(unsigned int indexRT) const;
105  void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
106  template <typename T>
107  int sgn(T val) const {
108  return (T(0) < val) - (val < T(0));
109  } // From https://stackoverflow.com/questions/1903954/is-there-a-standard-sign-function-signum-sgn-in-c-c
110  double unpackSignedValue(unsigned int bits, unsigned int nBits, double lsb) const;
111 
112  // ----------member data ---------------------------
116  int debug_;
117  std::vector<out_pt_t> pt_lut_;
118  std::vector<out_eta_t> eta_lut_;
119 };
120 
121 //
122 // constructors and destructor
123 //
125  : l1TracksToken_(consumes<TTTrackCollectionView>(iConfig.getParameter<edm::InputTag>("l1TracksInputTag"))),
126  outputCollectionName_(iConfig.getParameter<std::string>("outputCollectionName")),
127  setTrackWordBits_(iConfig.getParameter<bool>("setTrackWordBits")),
128  debug_(iConfig.getParameter<int>("debug")) {
129  // Generate the required luts
131  generate_pt_lut();
132 
133  // Define EDM output to be written to file (if required)
134  produces<TTTrackCollection>(outputCollectionName_);
135  produces<std::vector<double>>("L1GTTInputTrackPtExpected");
136  produces<std::vector<double>>("L1GTTInputTrackEtaExpected");
137 }
138 
140 
141 //
142 // member functions
143 //
144 
156  // initialize lut array
157  eta_lut_.reserve(kEtaLutSize);
158 
159  // iterate through all values in the lut
160  for (unsigned int i = 0; i < kEtaLutSize; i++) {
161  // -1 to ignore sign bit for input
162  unsigned int index = ((i + 0.5) * pow(2, (int)(kEtaInputSize - kEtaOutputSize)));
163  double newValue = indexTanLambda2Eta(index); // map out the index to the represented eta
164  out_eta_t out_eta = newValue; // cast it to fxp
165  eta_lut_[i] = out_eta; // add value for the lut
166  }
167 
168  if (debug_ >= 3) {
169  edm::LogInfo log("L1GTTInputProducer");
170  log << "generate_eta_lut::The eta_lut_[" << kEtaLutSize << "] values are ... \n";
171  for (unsigned int i = 0; i < kEtaLutSize; i++) {
172  log << "\t" << i << "\t" << eta_lut_[i] << "\n";
173  }
174  }
175 }
176 
178  // initialize lut array
179  pt_lut_.reserve(kPtLutSize); // generate lut
180 
181  // iterate through all values in the lut
182  for (unsigned int i = 0; i < kPtLutSize; i++) {
183  unsigned int index = (i + 0.5) * pow(2, (int)(kPTInputSize - 1 - kPTOutputSize));
184  double newValue = inverseRT2InversePT(index); //map out the index to the represented 1/pT
185  out_pt_t out_pt = 1.0 / newValue; // take the reciprocal and cast as an AP fixed-point (1/pt ==> pt)
186  pt_lut_[i] = out_pt; // setting the i-th value for the lut
187  }
188 
189  if (debug_ >= 3) {
190  edm::LogInfo log("L1GTTInputProducer");
191  log << "generate_pt_lut::The pt_lut_[" << kPtLutSize << "] values are ... \n";
192  for (unsigned int i = 0; i < kPtLutSize; i++) {
193  log << "\t" << i << "\t" << pt_lut_[i] << "\n";
194  }
195  }
196 }
197 
198 double L1GTTInputProducer::unpackSignedValue(unsigned int bits, unsigned int nBits, double lsb) const {
199  // Check that none of the bits above the nBits-1 bit, in a range of [0, nBits-1], are set.
200  // This makes sure that it isn't possible for the value represented by 'bits' to be
201  // any bigger than ((1 << nBits) - 1).
202  assert((bits >> nBits) == 0);
203 
204  // Convert from twos compliment to C++ signed integer (normal digitized value)
205  int digitizedValue = bits;
206  if (bits & (1 << (nBits - 1))) { // check if the 'bits' is negative
207  digitizedValue -= (1 << nBits);
208  }
209 
210  // Convert to floating point value
211  return (double(digitizedValue) + 0.5) * lsb;
212 }
213 
222 double L1GTTInputProducer::indexTanLambda2Eta(unsigned int indexTanLambda) const {
223  double tanl = unpackSignedValue(indexTanLambda, kEtaInputSize, TTTrack_TrackWord::stepTanL);
224  double theta = (M_PI / 2.0) - atan(tanl);
225  double eta = -1.0 * log(tan(theta / 2.0));
226  if (debug_ >= 3) {
227  edm::LogInfo("L1GTTInputProducer") << "indexTanLambda2Eta::tanl index = " << indexTanLambda << "\n"
228  << "indexTanLambda2Eta::tanl value = " << tanl << "\n"
229  << "indexTanLambda2Eta::theta = " << theta << "\n"
230  << "indexTanLambda2Eta::eta = " << eta;
231  }
232  return eta;
233 }
234 
243 double L1GTTInputProducer::inverseRT2InversePT(unsigned int indexRT) const {
244  double inverseRT = unpackSignedValue(indexRT, kPTInputSize, TTTrack_TrackWord::stepRinv);
245  return 100.0 * kSynchrotron * inverseRT; // multiply by 100 to convert from cm to m
246 }
247 
249  const L1Track& track, out_eta_t& etaBits, double& expected, double& maxErrPerc, double& maxErrEpsilon) const {
250  // Conver the input to an ap_uint
251  in_eta_t value = track.getTanlWord();
252 
253  // Get the expected outcome (floating point)
254  out_eta_t maxValuePossible = pow(2, 15); // saturate at max value possible for fxp
255  expected = indexTanLambda2Eta(value); // expected value for eta
256  if (expected > maxValuePossible) {
257  expected = maxValuePossible;
258  }
259 
260  // Converted value (emulation)
261  // Masking and shifting converts the efficient bit representation into an index
262  // Start by setting up the masks
263  in_eta_t indexTanLambda = value;
264  in_eta_t mask = ~0; // mask (all 1's)
265  bool sign = indexTanLambda.range(kEtaInputSize - 1, kEtaInputSize - 1); // sign bit of indexTanLambda
266  mask *= sign; // all 0's for positive numbers, all 1's for negative numbers
267 
268  // Take the absolute value of indexTanLambda (2's complement)
269  indexTanLambda ^= mask;
270  indexTanLambda += sign;
271 
272  // Find the value for eta, not |eta|
273  indexTanLambda =
274  indexTanLambda >>
275  (kEtaInputSize -
276  kEtaOutputSize); // Don't subtract 1 because we now want to take into account the sign bit of the output
277  indexTanLambda =
278  (indexTanLambda < (1 << (kEtaOutputSize - 1))) ? indexTanLambda : in_eta_t((1 << (kEtaOutputSize - 1)) - 1);
279  etaBits = eta_lut_[indexTanLambda];
280 
281  // Reinacting the sign
282  out_eta_t maskOut;
283  maskOut.V = ~0;
284  maskOut *= sign;
285  etaBits ^= maskOut;
286  etaBits.V += sign;
287 
288  // Compare the floating point calculation to the emulation
289  double delta = std::abs(expected - etaBits.to_double());
290  double perc_diff = (delta / std::abs(expected)) * 100.; // calc percentage error
291  if (delta > maxErrEpsilon) {
292  maxErrPerc = perc_diff;
293  maxErrEpsilon = delta;
294  }
295 
296  if (delta >= kEtaErrThresh) {
297  edm::LogError("L1GTTInputProducer") << "getEtaBits::MISMATCH!!!\n"
298  << "\tTTTrack tanL = " << track.tanL() << "\n"
299  << "\tTTTrack eta = " << track.momentum().eta() << "\n"
300  << "\tTTTrack_TrackWord = " << track.getTrackWord().to_string(2) << "\n"
301  << "\tTTTrack_TrackWord tanlWord = " << track.getTanlWord() << " ("
302  << track.getTanlWord().to_string(2) << ")\n"
303  << "\tin_eta_t value = " << value << " (" << value.to_string(2) << ")\n"
304  << "\tExpected value = " << expected << "\n"
305  << "\tCalculated eta = " << etaBits.to_double() << " (" << etaBits.to_string(2)
306  << ") @ index " << indexTanLambda << "\n"
307  << "\tDelta = " << delta << "\tpercentage error = " << perc_diff;
308  return true;
309  } else {
310  if (debug_ >= 2) {
311  edm::LogInfo("L1GTTInputProducer")
312  << "getEtaBits::SUCCESS (TTTrack, floating eta calculation, bitwise calculation, initial index, lut index) = "
313  << "(" << track.momentum().eta() << ", " << expected << ", " << etaBits << ", " << value << ", "
314  << indexTanLambda << ")";
315  }
316  }
317 
318  return false;
319 }
320 
322  out_pt_t& ptBits,
323  out_charge_t& chargeBit,
324  double& expected,
325  double& maxErrPerc,
326  double& maxErrEpsilon,
327  double& minErrPerc,
328  double& minExpected) const {
329  // Convert the input to an ap_uint
330  in_pt_t value = track.getRinvWord();
331  in_pt_t value_initial = value;
332 
333  // Get the expected outcome (floating point)
334  out_pt_t maxValuePossible = pow(2, 16); // saturate at max value possible for fxp
335  expected = 1.0 / inverseRT2InversePT(value); // expected value for inverse
336  bool saturation = true;
337  if (std::abs(expected) > maxValuePossible) {
338  expected = maxValuePossible;
339  } else {
340  saturation = false;
341  }
342 
343  // Converted value (emulation)
344  // Masking and shifting converts the efficient bit representation into an index
345  // Start by setting up the masks
346  in_pt_t mask = ~0; // mask (all 1's)
347  bool sign = value.range(kPTInputSize - 1, kPTInputSize - 1); // sign bit of value
348  mask *= sign; // all 0's for positive numbers, all 1's for negative numbers
349 
350  // Take the absolute value of value (2's complement)
351  value ^= mask;
352  value += sign;
353 
354  // Shift the value so that the index changes when the LSB of the output changes
355  value = value >> (kPTInputSize - 1 - (kPTOutputSize));
356 
357  // Get the pt from the LUT
358  ptBits = pt_lut_[value];
359 
360  // Set the charge bit
361  chargeBit = sign;
362  double charge = 1. - (2 * chargeBit.to_uint());
363 
364  // Compare the floating point calculation to the emulation
365  double delta = std::abs(expected - (charge * ptBits.to_double()));
366  double perc_diff = (delta / std::abs(expected)) * 100.;
367 
368  if (delta > maxErrEpsilon) {
369  maxErrPerc = perc_diff;
370  maxErrEpsilon = delta;
371  } else if (delta < minExpected && !saturation && minErrPerc > 100.0) {
372  minErrPerc = perc_diff;
373  minExpected = expected;
374  }
375 
376  if (std::abs(perc_diff) >= kPTErrThresh && !saturation) {
377  edm::LogError("L1GTTInputProducer") << "getPtBits::MISMATCH!!!\n"
378  << "\tTTTrack Rinv = " << track.rInv() << "\n"
379  << "\tTTTrack pt = " << track.momentum().transverse() << "\n"
380  << "\tTTTrack_TrackWord = " << track.getTrackWord().to_string(2) << "\n"
381  << "\tTTTrack_TrackWord RinvWord = " << track.getRinvWord() << " ("
382  << track.getRinvWord().to_string(2) << ")\n"
383  << "\tin_pt_t value = " << value_initial << " (" << value_initial.to_string(2)
384  << ")\n"
385  << "\tExpected value = " << expected << "\n"
386  << "\tCalculated pt = " << ptBits.to_double() << " (" << ptBits.to_string(2)
387  << ") @ index " << value << "\n"
388  << "\tcharge = " << charge << " (bit = " << chargeBit << ")\n"
389  << "\tDelta = " << delta << "\tpercentage error = " << perc_diff;
390  return true;
391  } else {
392  if (debug_ >= 2) {
393  edm::LogInfo("L1GTTInputProducer") << "getPtBits::SUCCESS (TTTrack, floating pt calculation, charge, bitwise "
394  "calculation, initial index, lut index) = "
395  << "(" << sgn(track.rInv()) * track.momentum().transverse() << ", " << expected
396  << ", " << charge << ", " << ptBits << ", " << value_initial << ", " << value
397  << ")";
398  }
399  }
400 
401  return false;
402 }
403 
404 // ------------ method called to produce the data ------------
406  auto vTTTrackOutput = std::make_unique<TTTrackCollection>();
407  auto vPtOutput = std::make_unique<std::vector<double>>();
408  auto vEtaOutput = std::make_unique<std::vector<double>>();
409 
410  edm::Handle<TTTrackCollectionView> l1TracksHandle;
411  iEvent.getByToken(l1TracksToken_, l1TracksHandle);
412 
413  out_charge_t chargeBit = 0;
414  out_pt_t ptBits = 0;
415  out_eta_t etaBits = 0;
416  in_pt_t ptBitsShifted = 0;
417  in_eta_t etaBitsShifted = 0;
418  unsigned int error_pt_c = 0; // error counter
419  unsigned int error_eta_c = 0; // error counter
420  double expectedPt = 0.0; // expected value of the pt
421  double expectedEta = 0.0; // expected value of the eta
422  double maxErrPercPt = 0.0; // stores the maximum error percentage
423  double maxErrPercEta = 0.0; // stores the maximum error percentage
424  double maxErrEpsilonPt = 0.0; // keeps track of epsilon for max error
425  double maxErrEpsilonEta = 0.0; // keeps track of epsilon for max error
426  double minErrPercPt = 10000000.0; // stores the maximum error percentage
427  double minExpectedPt = 10000000.0; // keeps track of epsilon for max error
428 
429  unsigned int nOutput = l1TracksHandle->size();
430  vTTTrackOutput->reserve(nOutput);
431  vPtOutput->reserve(nOutput);
432  vEtaOutput->reserve(nOutput);
433  for (const auto& track : *l1TracksHandle) {
434  if (setTrackWordBits_ && !(track.nFitPars() == Npars4 || track.nFitPars() == Npars5)) {
435  throw cms::Exception("nFitPars unknown")
436  << "L1GTTInputProducer::produce method is called with numFitPars_ = " << track.nFitPars()
437  << ". The only possible values are 4/5.";
438  }
439 
440  // Fill the vector of tracks
441  vTTTrackOutput->push_back(track);
442  auto& currentTrackRef = vTTTrackOutput->back();
443  if (debug_ >= 2) {
444  edm::LogInfo("L1GTTInputProducer") << "produce::word before anything with setTrackWordBits_ = "
445  << setTrackWordBits_ << ": " << currentTrackRef.getTrackWord().to_string(2);
446  }
447 
448  // Do an initial setting of the bits based on the floating point values
449  if (setTrackWordBits_)
450  currentTrackRef.setTrackWordBits();
451  if (debug_ >= 2) {
452  edm::LogInfo("L1GTTInputProducer") << "produce::word after initial setting of the track word "
453  << currentTrackRef.getTrackWord().to_string(2);
454  }
455 
456  // Do the conversions
457  error_pt_c += getPtBits(
458  currentTrackRef, ptBits, chargeBit, expectedPt, maxErrPercPt, maxErrEpsilonPt, minErrPercPt, minExpectedPt);
459  error_eta_c += getEtaBits(currentTrackRef, etaBits, expectedEta, maxErrPercEta, maxErrEpsilonEta);
460 
461  // Assign the exat same bits to an ap_uint
462  ptBitsShifted = ptBits.range();
463  etaBitsShifted = etaBits.range();
464 
465  // Shift the bits so that the decimal is in the right spot for the GTT software
466  ptBitsShifted = ptBitsShifted << 2;
467  etaBitsShifted = etaBitsShifted << 8;
468 
469  // Set the MSB for the pt to the sign of the incoming word
470  ptBitsShifted.set(kPTInputSize - 1, chargeBit);
471 
472  // Set the correct bits based on the converted quanteties and the existing track word components
473  currentTrackRef.setTrackWord(currentTrackRef.getValidWord(),
474  ptBitsShifted,
475  currentTrackRef.getPhiWord(),
476  etaBitsShifted,
477  currentTrackRef.getZ0Word(),
478  currentTrackRef.getD0Word(),
479  currentTrackRef.getChi2RPhiWord(),
480  currentTrackRef.getChi2RZWord(),
481  currentTrackRef.getBendChi2Word(),
482  currentTrackRef.getHitPatternWord(),
483  currentTrackRef.getMVAQualityWord(),
484  currentTrackRef.getMVAOtherWord());
485  if (debug_ >= 2) {
486  edm::LogInfo("L1GTTInputProducer") << "produce::charge after all conversions " << chargeBit << "\n"
487  << "produce::ptBits after all conversions " << ptBits.to_string(2) << " ("
488  << ptBitsShifted.to_string(2) << " = " << ptBitsShifted.to_uint() << ")\n"
489  << "produce::etaBits after all conversions " << etaBits.to_string(2) << " ("
490  << etaBitsShifted.to_string(2) << " = " << etaBitsShifted.to_uint() << ")\n"
491  << "produce::word after all conversions "
492  << vTTTrackOutput->back().getTrackWord().to_string(2);
493  }
494 
495  // Fill the remaining outputs
496  vPtOutput->push_back(expectedPt);
497  vEtaOutput->push_back(expectedEta);
498  }
499 
500  if (debug_ >= 1) {
501  edm::LogInfo("L1GTTInputProducer") << "\nNumber of converted tracks: " << nOutput << "\n\n"
502  << "q/r ==> pt conversion:\n"
503  << "\tError Threshold: " << kPTErrThresh << "%\n"
504  << "\tMax error: " << maxErrEpsilonPt
505  << " GeV difference with percentage: " << maxErrPercPt << "% @ "
506  << 100.0 * maxErrEpsilonPt / maxErrPercPt << " GeV"
507  << "\n"
508  << "\tError @ max range: " << minExpectedPt
509  << " GeV with precentage: " << minErrPercPt << "%"
510  << "\n"
511  << "\tTotal number of errors: " << error_pt_c << "\n\n"
512  << "tan(lambda) ==> eta conversion:\n"
513  << "\tError Threshold: " << kEtaErrThresh << "\n"
514  << "\tMax error: " << maxErrEpsilonEta << " with percentage: " << maxErrPercEta
515  << "% @ " << 100.0 * maxErrEpsilonEta / maxErrPercEta << "\n"
516  << "\tTotal number of errors: " << error_eta_c;
517  }
518 
519  if (error_pt_c + error_eta_c) {
520  edm::LogError("L1GTTInputProducer") << "produce::" << error_pt_c << "/" << error_eta_c
521  << " pt/eta mismatches detected!!!";
522  }
523 
524  // Put the outputs into the event
525  iEvent.put(std::move(vTTTrackOutput), outputCollectionName_);
526  iEvent.put(std::move(vPtOutput), "L1GTTInputTrackPtExpected");
527  iEvent.put(std::move(vEtaOutput), "L1GTTInputTrackEtaExpected");
528 }
529 
530 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
532  // L1GTTInputProducer
534  desc.add<int>("debug", 0)->setComment("Verbosity levels: 0, 1, 2, 3");
535  desc.add<edm::InputTag>("l1TracksInputTag", edm::InputTag("TTTracksFromTrackletEmulation", "Level1TTTracks"));
536  desc.add<std::string>("outputCollectionName", "Level1TTTracksConverted");
537  desc.add<bool>("setTrackWordBits", true)
538  ->setComment(
539  "flag indicated whether the TTTrack_TrackWord should be set from float parameters or skipped (if TrackWord "
540  "set by e.g. GTTFileReader decoding)");
541  descriptions.addWithDefaultLabel(desc);
542 }
543 
544 //define this as a plug-in
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< TTTrackCollectionView > l1TracksToken_
static constexpr unsigned int kEtaLutSize
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::string outputCollectionName_
ap_ufixed< kPTOutputSize, kPTMagSize, AP_RND_CONV, AP_SAT > out_pt_t
static constexpr unsigned int kPtLutSize
TTTrack< Ref_Phase2TrackerDigi_ > L1Track
int sgn(T val) const
L1GTTInputProducer(const edm::ParameterSet &)
TTTrack_TrackWord::tanl_t in_eta_t
Log< level::Error, false > LogError
assert(be >=bs)
TTTrack_TrackWord::rinv_t in_pt_t
std::vector< L1Track > TTTrackCollection
int iEvent
Definition: GenABIO.cc:224
static constexpr double stepRinv
std::vector< out_eta_t > eta_lut_
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
static constexpr double kSynchrotron
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
ap_uint< TrackBitWidths::kRinvSize > rinv_t
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static constexpr unsigned int Npars5
static constexpr double stepTanL
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
ap_fixed< kEtaOutputSize, kEtaMagSize, AP_RND_CONV, AP_SAT > out_eta_t
Definition: value.py:1
edm::View< L1Track > TTTrackCollectionView
#define M_PI
Log< level::Info, false > LogInfo
bool getEtaBits(const L1Track &track, out_eta_t &etaBits, double &expected, double &maxErrPerc, double &maxErrEpsilon) const
static constexpr double kEtaErrThresh
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
HLT enums.
std::vector< out_pt_t > pt_lut_
ap_uint< TrackBitWidths::kTanlSize > tanl_t
static constexpr unsigned int Npars4
double unpackSignedValue(unsigned int bits, unsigned int nBits, double lsb) const
long double T
static constexpr double kPTErrThresh
double inverseRT2InversePT(unsigned int indexRT) const
bool getPtBits(const L1Track &track, out_pt_t &ptBits, out_charge_t &chargeBit, double &expected, double &maxErrPerc, double &maxErrEpsilon, double &minErrPerc, double &minExpected) const
double indexTanLambda2Eta(unsigned int indexTanLambda) const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
def move(src, dest)
Definition: eostools.py:511