CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell Class Reference

Public Member Functions

void add (const l1t::HGCalTriggerCell &c, uint32_t stcId)
 
void addToFractionSum (float frac)
 
float getFractionSum () const
 
uint32_t getMaxId () const
 
uint32_t getSTCId () const
 
int getSumHwPt () const
 
float getSumMipPt () const
 
float getSumPt () const
 
float getTCpt (uint32_t tcid) const
 
int size () const
 
 SuperTriggerCell ()
 

Private Attributes

float fracsum_
 
uint32_t maxId_
 
float maxMipPt_
 
uint32_t stcId_
 
int sumHwPt_
 
float sumMipPt_
 
float sumPt_
 
std::map< uint32_t, float > tc_pts_
 

Detailed Description

Definition at line 60 of file HGCalConcentratorSuperTriggerCellImpl.h.

Constructor & Destructor Documentation

◆ SuperTriggerCell()

HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::SuperTriggerCell ( )
inline

Definition at line 68 of file HGCalConcentratorSuperTriggerCellImpl.h.

68 : sumPt_(0), sumMipPt_(0), maxMipPt_(0), fracsum_(0), sumHwPt_(0), maxId_(0), stcId_(0){};

Member Function Documentation

◆ add()

void HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::add ( const l1t::HGCalTriggerCell c,
uint32_t  stcId 
)
inline

Definition at line 70 of file HGCalConcentratorSuperTriggerCellImpl.h.

70  {
71  sumPt_ += c.pt();
72  sumMipPt_ += c.mipPt();
73  sumHwPt_ += c.hwPt();
74  if (maxId_ == 0 || c.mipPt() > maxMipPt_) {
75  maxMipPt_ = c.mipPt();
76  maxId_ = c.detId();
77  }
78 
79  if (stcId_ == 0) {
80  stcId_ = stcId;
81  }
82  tc_pts_[c.detId()] = c.mipPt();
83  }

References HltBtagPostValidation_cff::c, maxId_, maxMipPt_, stcId_, sumHwPt_, sumMipPt_, sumPt_, and tc_pts_.

Referenced by counter.Counter::register().

◆ addToFractionSum()

void HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::addToFractionSum ( float  frac)
inline

Definition at line 84 of file HGCalConcentratorSuperTriggerCellImpl.h.

84  {
85  fracsum_ += frac;
86  if (fracsum_ > 1) {
87  throw cms::Exception("HGCalConcentratorSuperTriggerCellError")
88  << "Sum of Trigger Cell fractions should not be greater than 1";
89  }
90  }

References Exception, DivergingColor::frac, and fracsum_.

◆ getFractionSum()

float HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::getFractionSum ( ) const
inline

◆ getMaxId()

uint32_t HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::getMaxId ( ) const
inline

◆ getSTCId()

uint32_t HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::getSTCId ( ) const
inline

◆ getSumHwPt()

int HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::getSumHwPt ( ) const
inline

◆ getSumMipPt()

float HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::getSumMipPt ( ) const
inline

Definition at line 93 of file HGCalConcentratorSuperTriggerCellImpl.h.

93 { return sumMipPt_; }

References sumMipPt_.

◆ getSumPt()

float HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::getSumPt ( ) const
inline

◆ getTCpt()

float HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::getTCpt ( uint32_t  tcid) const
inline

Definition at line 97 of file HGCalConcentratorSuperTriggerCellImpl.h.

97  {
98  const auto pt = tc_pts_.find(tcid);
99  return (pt == tc_pts_.end() ? 0 : pt->second);
100  }

References DiDispStaMuonMonitor_cfi::pt, and tc_pts_.

Referenced by HGCalConcentratorSuperTriggerCellImpl::assignSuperTriggerCellEnergyAndPosition().

◆ size()

int HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::size ( void  ) const
inline

Definition at line 101 of file HGCalConcentratorSuperTriggerCellImpl.h.

101 { return tc_pts_.size(); }

References tc_pts_.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

Member Data Documentation

◆ fracsum_

float HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::fracsum_
private

Definition at line 62 of file HGCalConcentratorSuperTriggerCellImpl.h.

Referenced by addToFractionSum(), and getFractionSum().

◆ maxId_

uint32_t HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::maxId_
private

Definition at line 64 of file HGCalConcentratorSuperTriggerCellImpl.h.

Referenced by add(), and getMaxId().

◆ maxMipPt_

float HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::maxMipPt_
private

Definition at line 62 of file HGCalConcentratorSuperTriggerCellImpl.h.

Referenced by add().

◆ stcId_

uint32_t HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::stcId_
private

Definition at line 64 of file HGCalConcentratorSuperTriggerCellImpl.h.

Referenced by add(), and getSTCId().

◆ sumHwPt_

int HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::sumHwPt_
private

Definition at line 63 of file HGCalConcentratorSuperTriggerCellImpl.h.

Referenced by add(), and getSumHwPt().

◆ sumMipPt_

float HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::sumMipPt_
private

Definition at line 62 of file HGCalConcentratorSuperTriggerCellImpl.h.

Referenced by add(), and getSumMipPt().

◆ sumPt_

float HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::sumPt_
private

Definition at line 62 of file HGCalConcentratorSuperTriggerCellImpl.h.

Referenced by add(), and getSumPt().

◆ tc_pts_

std::map<uint32_t, float> HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::tc_pts_
private

Definition at line 65 of file HGCalConcentratorSuperTriggerCellImpl.h.

Referenced by add(), getTCpt(), and size().

DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::fracsum_
float fracsum_
Definition: HGCalConcentratorSuperTriggerCellImpl.h:62
HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::stcId_
uint32_t stcId_
Definition: HGCalConcentratorSuperTriggerCellImpl.h:64
DivergingColor.frac
float frac
Definition: DivergingColor.py:175
HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::sumHwPt_
int sumHwPt_
Definition: HGCalConcentratorSuperTriggerCellImpl.h:63
HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::maxMipPt_
float maxMipPt_
Definition: HGCalConcentratorSuperTriggerCellImpl.h:62
HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::tc_pts_
std::map< uint32_t, float > tc_pts_
Definition: HGCalConcentratorSuperTriggerCellImpl.h:65
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::maxId_
uint32_t maxId_
Definition: HGCalConcentratorSuperTriggerCellImpl.h:64
Exception
Definition: hltDiff.cc:246
HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::sumMipPt_
float sumMipPt_
Definition: HGCalConcentratorSuperTriggerCellImpl.h:62
HGCalConcentratorSuperTriggerCellImpl::SuperTriggerCell::sumPt_
float sumPt_
Definition: HGCalConcentratorSuperTriggerCellImpl.h:62