CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
p2eg::card Class Reference

#include <Phase2L1CaloEGammaUtils.h>

Public Member Functions

 card ()
 
float getIdx () const
 
region3x4getRegion3x4 (int idx)
 
towers3x4getTowers3x4 (int idx)
 
void setIdx (int idx)
 
void zeroOut ()
 

Private Attributes

std::array< region3x4, N_REGIONS_PER_CARDcard3x4Regions
 
std::array< towers3x4, N_REGIONS_PER_CARDcard3x4Towers
 
int idx_ = -1
 

Detailed Description

Definition at line 478 of file Phase2L1CaloEGammaUtils.h.

Constructor & Destructor Documentation

◆ card()

p2eg::card::card ( )
inline

Definition at line 486 of file Phase2L1CaloEGammaUtils.h.

References card3x4Regions, card3x4Towers, mps_fire::i, idx_, and p2eg::N_REGIONS_PER_CARD.

486  {
487  idx_ = -1;
488  for (int i = 0; i < N_REGIONS_PER_CARD; i++) {
489  card3x4Regions[i].setIdx(i);
490  card3x4Regions[i].zeroOut();
491  card3x4Towers[i].setIdx(i);
492  card3x4Towers[i].zeroOut();
493  }
494  };
static constexpr int N_REGIONS_PER_CARD
std::array< towers3x4, N_REGIONS_PER_CARD > card3x4Towers
std::array< region3x4, N_REGIONS_PER_CARD > card3x4Regions

Member Function Documentation

◆ getIdx()

float p2eg::card::getIdx ( ) const
inline

Definition at line 506 of file Phase2L1CaloEGammaUtils.h.

References idx_.

506 { return idx_; };

◆ getRegion3x4()

region3x4& p2eg::card::getRegion3x4 ( int  idx)
inline

Definition at line 507 of file Phase2L1CaloEGammaUtils.h.

References cms::cuda::assert(), card3x4Regions, heavyIonCSV_trainingSettings::idx, and p2eg::N_REGIONS_PER_CARD.

Referenced by Phase2L1CaloEGammaEmulator::produce().

507  {
509  return card3x4Regions[idx];
510  }
assert(be >=bs)
static constexpr int N_REGIONS_PER_CARD
std::array< region3x4, N_REGIONS_PER_CARD > card3x4Regions

◆ getTowers3x4()

towers3x4& p2eg::card::getTowers3x4 ( int  idx)
inline

Definition at line 511 of file Phase2L1CaloEGammaUtils.h.

References cms::cuda::assert(), card3x4Towers, heavyIonCSV_trainingSettings::idx, and p2eg::N_REGIONS_PER_CARD.

Referenced by Phase2L1CaloEGammaEmulator::produce().

511  {
513  return card3x4Towers[idx];
514  }
assert(be >=bs)
static constexpr int N_REGIONS_PER_CARD
std::array< towers3x4, N_REGIONS_PER_CARD > card3x4Towers

◆ setIdx()

void p2eg::card::setIdx ( int  idx)
inline

◆ zeroOut()

void p2eg::card::zeroOut ( )
inline

Definition at line 498 of file Phase2L1CaloEGammaUtils.h.

References card3x4Regions, card3x4Towers, mps_fire::i, and p2eg::N_REGIONS_PER_CARD.

498  {
499  for (int i = 0; i < N_REGIONS_PER_CARD; i++) {
500  card3x4Regions[i].zeroOut();
501  card3x4Towers[i].zeroOut();
502  };
503  };
static constexpr int N_REGIONS_PER_CARD
std::array< towers3x4, N_REGIONS_PER_CARD > card3x4Towers
std::array< region3x4, N_REGIONS_PER_CARD > card3x4Regions

Member Data Documentation

◆ card3x4Regions

std::array<region3x4, N_REGIONS_PER_CARD> p2eg::card::card3x4Regions
private

Definition at line 481 of file Phase2L1CaloEGammaUtils.h.

Referenced by card(), getRegion3x4(), and zeroOut().

◆ card3x4Towers

std::array<towers3x4, N_REGIONS_PER_CARD> p2eg::card::card3x4Towers
private

Definition at line 482 of file Phase2L1CaloEGammaUtils.h.

Referenced by card(), getTowers3x4(), and zeroOut().

◆ idx_

int p2eg::card::idx_ = -1
private

Definition at line 480 of file Phase2L1CaloEGammaUtils.h.

Referenced by card(), getIdx(), and setIdx().