CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | 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)
 

Static Public Attributes

static constexpr uint32_t DETA_LUT_SPLIT = 1 << 13
 

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 17 of file L1GTSingleInOutLUT.h.

18  : data_(lutConfig.getParameter<std::vector<int>>("lut")),
19  unused_lsbs_(lutConfig.getParameter<uint32_t>("unused_lsbs")),
20  output_scale_(lutConfig.getParameter<double>("output_scale_factor")),
21  // I guess ceil is required due to small differences in C++ and python's cos/cosh implementation.
22  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 28 of file L1GTSingleInOutLUT.h.

References submitPVResolutionJobs::desc.

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

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

◆ hwMax_error()

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

Definition at line 25 of file L1GTSingleInOutLUT.h.

References hwMax_error_.

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

25 { return hwMax_error_; }

◆ operator[]()

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

Definition at line 24 of file L1GTSingleInOutLUT.h.

References data_, mps_fire::i, and unused_lsbs_.

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

◆ output_scale()

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

Member Data Documentation

◆ data_

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

Definition at line 36 of file L1GTSingleInOutLUT.h.

Referenced by operator[]().

◆ DETA_LUT_SPLIT

constexpr uint32_t l1t::L1GTSingleInOutLUT::DETA_LUT_SPLIT = 1 << 13
static

◆ hwMax_error_

const double l1t::L1GTSingleInOutLUT::hwMax_error_
private

Definition at line 39 of file L1GTSingleInOutLUT.h.

Referenced by hwMax_error().

◆ output_scale_

const double l1t::L1GTSingleInOutLUT::output_scale_
private

Definition at line 38 of file L1GTSingleInOutLUT.h.

Referenced by output_scale().

◆ unused_lsbs_

const uint32_t l1t::L1GTSingleInOutLUT::unused_lsbs_
private

Definition at line 37 of file L1GTSingleInOutLUT.h.

Referenced by operator[]().