CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
l1t::L1GTSingleInOutLUT Class Reference

#include <L1GTSingleInOutLUT.h>

Public Member Functions

double hwMax_error () const
 
 L1GTSingleInOutLUT (const edm::ParameterSet &lutConfig)
 
int32_t operator[] (uint32_t i) const
 
double output_scale () const
 

Static Public Member Functions

static void fillLUTDescriptions (edm::ParameterSetDescription &desc)
 

Private Attributes

const std::vector< int32_t > data_
 
const double hwMax_error_
 
const double output_scale_
 
const uint32_t unused_lsbs_
 

Detailed Description

Definition at line 13 of file L1GTSingleInOutLUT.h.

Constructor & Destructor Documentation

◆ L1GTSingleInOutLUT()

l1t::L1GTSingleInOutLUT::L1GTSingleInOutLUT ( const edm::ParameterSet lutConfig)
inline

Definition at line 15 of file L1GTSingleInOutLUT.h.

16  : data_(lutConfig.getParameter<std::vector<int>>("lut")),
17  unused_lsbs_(lutConfig.getParameter<uint32_t>("unused_lsbs")),
18  output_scale_(lutConfig.getParameter<double>("output_scale_factor")),
19  // I guess ceil is required due to small differences in C++ and python's cos/cosh implementation.
20  hwMax_error_(std::ceil(lutConfig.getParameter<double>("max_error") * output_scale_)) {}
constexpr int32_t ceil(float num)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const std::vector< int32_t > data_

Member Function Documentation

◆ fillLUTDescriptions()

static void l1t::L1GTSingleInOutLUT::fillLUTDescriptions ( edm::ParameterSetDescription desc)
inlinestatic

Definition at line 26 of file L1GTSingleInOutLUT.h.

References submitPVResolutionJobs::desc.

Referenced by l1t::L1GTDeltaCut::fillLUTDescriptions().

26  {
27  desc.add<std::vector<int32_t>>("lut");
28  desc.add<double>("output_scale_factor");
29  desc.add<uint32_t>("unused_lsbs");
30  desc.add<double>("max_error");
31  }

◆ hwMax_error()

double l1t::L1GTSingleInOutLUT::hwMax_error ( ) const
inline

Definition at line 23 of file L1GTSingleInOutLUT.h.

References hwMax_error_.

Referenced by l1t::L1GTDeltaCut::checkObjects().

23 { return hwMax_error_; }

◆ operator[]()

int32_t l1t::L1GTSingleInOutLUT::operator[] ( uint32_t  i) const
inline

Definition at line 22 of file L1GTSingleInOutLUT.h.

References data_, mps_fire::i, and unused_lsbs_.

22 { return data_[(i >> unused_lsbs_) % data_.size()]; }
const std::vector< int32_t > data_

◆ output_scale()

double l1t::L1GTSingleInOutLUT::output_scale ( ) const
inline

Definition at line 24 of file L1GTSingleInOutLUT.h.

References output_scale_.

Referenced by l1t::L1GTDeltaCut::checkObjects().

24 { return output_scale_; }

Member Data Documentation

◆ data_

const std::vector<int32_t> l1t::L1GTSingleInOutLUT::data_
private

Definition at line 34 of file L1GTSingleInOutLUT.h.

Referenced by operator[]().

◆ hwMax_error_

const double l1t::L1GTSingleInOutLUT::hwMax_error_
private

Definition at line 37 of file L1GTSingleInOutLUT.h.

Referenced by hwMax_error().

◆ output_scale_

const double l1t::L1GTSingleInOutLUT::output_scale_
private

Definition at line 36 of file L1GTSingleInOutLUT.h.

Referenced by output_scale().

◆ unused_lsbs_

const uint32_t l1t::L1GTSingleInOutLUT::unused_lsbs_
private

Definition at line 35 of file L1GTSingleInOutLUT.h.

Referenced by operator[]().