CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes
SiPixelGainForHLTonGPU Class Reference

#include <SiPixelGainForHLTonGPU.h>

Public Types

using DecodingStructure = SiPixelGainForHLTonGPU_DecodingStructure
 
using Range = std::pair< uint32_t, uint32_t >
 

Public Member Functions

constexpr float decodeGain (unsigned int gain) const
 
constexpr float decodePed (unsigned int ped) const
 
std::pair< float, float > getPedAndGain (uint32_t moduleInd, int col, int row, bool &isDeadColumn, bool &isNoisyColumn) const
 

Public Attributes

unsigned int deadFlag_
 
float gainPrecision_
 
float maxGain_
 
float maxPed_
 
float minGain_
 
float minPed_
 
unsigned int nBinsToUseForEncoding_
 
unsigned int noisyFlag_
 
unsigned int numberOfRowsAveragedOver_
 
float pedPrecision_
 
std::pair< Range, int > rangeAndCols_ [gpuClustering::maxNumModules]
 
DecodingStructurev_pedestals_
 

Detailed Description

Definition at line 28 of file SiPixelGainForHLTonGPU.h.

Member Typedef Documentation

◆ DecodingStructure

Definition at line 30 of file SiPixelGainForHLTonGPU.h.

◆ Range

using SiPixelGainForHLTonGPU::Range = std::pair<uint32_t, uint32_t>

Definition at line 32 of file SiPixelGainForHLTonGPU.h.

Member Function Documentation

◆ decodeGain()

constexpr float SiPixelGainForHLTonGPU::decodeGain ( unsigned int  gain) const
inlineconstexpr

Definition at line 59 of file SiPixelGainForHLTonGPU.h.

59 { return gain * gainPrecision_ + minGain_; }

References PedestalClient_cfi::gain, gainPrecision_, and minGain_.

Referenced by getPedAndGain().

◆ decodePed()

constexpr float SiPixelGainForHLTonGPU::decodePed ( unsigned int  ped) const
inlineconstexpr

Definition at line 60 of file SiPixelGainForHLTonGPU.h.

60 { return ped * pedPrecision_ + minPed_; }

References minPed_, and pedPrecision_.

Referenced by getPedAndGain().

◆ getPedAndGain()

std::pair<float, float> SiPixelGainForHLTonGPU::getPedAndGain ( uint32_t  moduleInd,
int  col,
int  row,
bool &  isDeadColumn,
bool &  isNoisyColumn 
) const
inline

Definition at line 34 of file SiPixelGainForHLTonGPU.h.

35  {
36  auto range = rangeAndCols_[moduleInd].first;
37  auto nCols = rangeAndCols_[moduleInd].second;
38 
39  // determine what averaged data block we are in (there should be 1 or 2 of these depending on if plaquette is 1 by X or 2 by X
40  unsigned int lengthOfColumnData = (range.second - range.first) / nCols;
41  unsigned int lengthOfAveragedDataInEachColumn = 2; // we always only have two values per column averaged block
42  unsigned int numberOfDataBlocksToSkip = row / numberOfRowsAveragedOver_;
43 
44  auto offset = range.first + col * lengthOfColumnData + lengthOfAveragedDataInEachColumn * numberOfDataBlocksToSkip;
45 
46  assert(offset < range.second);
47  assert(offset < 3088384);
48  assert(0 == offset % 2);
49 
50  DecodingStructure const* __restrict__ lp = v_pedestals_;
51  auto s = lp[offset / 2];
52 
53  isDeadColumn = (s.ped & 0xFF) == deadFlag_;
54  isNoisyColumn = (s.ped & 0xFF) == noisyFlag_;
55 
56  return std::make_pair(decodePed(s.ped & 0xFF), decodeGain(s.gain & 0xFF));
57  }

References cms::cuda::assert(), cuy::col, deadFlag_, decodeGain(), decodePed(), noisyFlag_, numberOfRowsAveragedOver_, hltrates_dqm_sourceclient-live_cfg::offset, FastTimerService_cff::range, rangeAndCols_, alignCSCRings::s, and v_pedestals_.

Member Data Documentation

◆ deadFlag_

unsigned int SiPixelGainForHLTonGPU::deadFlag_

◆ gainPrecision_

float SiPixelGainForHLTonGPU::gainPrecision_

◆ maxGain_

float SiPixelGainForHLTonGPU::maxGain_

◆ maxPed_

float SiPixelGainForHLTonGPU::maxPed_

◆ minGain_

float SiPixelGainForHLTonGPU::minGain_

◆ minPed_

float SiPixelGainForHLTonGPU::minPed_

◆ nBinsToUseForEncoding_

unsigned int SiPixelGainForHLTonGPU::nBinsToUseForEncoding_

◆ noisyFlag_

unsigned int SiPixelGainForHLTonGPU::noisyFlag_

◆ numberOfRowsAveragedOver_

unsigned int SiPixelGainForHLTonGPU::numberOfRowsAveragedOver_

◆ pedPrecision_

float SiPixelGainForHLTonGPU::pedPrecision_

◆ rangeAndCols_

std::pair<Range, int> SiPixelGainForHLTonGPU::rangeAndCols_[gpuClustering::maxNumModules]

◆ v_pedestals_

DecodingStructure* SiPixelGainForHLTonGPU::v_pedestals_
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
SiPixelGainForHLTonGPU::numberOfRowsAveragedOver_
unsigned int numberOfRowsAveragedOver_
Definition: SiPixelGainForHLTonGPU.h:68
cuy.col
col
Definition: cuy.py:1010
cms::cuda::assert
assert(be >=bs)
SiPixelGainForHLTonGPU::rangeAndCols_
std::pair< Range, int > rangeAndCols_[gpuClustering::maxNumModules]
Definition: SiPixelGainForHLTonGPU.h:63
SiPixelGainForHLTonGPU::minPed_
float minPed_
Definition: SiPixelGainForHLTonGPU.h:65
alignCSCRings.s
s
Definition: alignCSCRings.py:92
SiPixelGainForHLTonGPU::decodeGain
constexpr float decodeGain(unsigned int gain) const
Definition: SiPixelGainForHLTonGPU.h:59
SiPixelGainForHLTonGPU::noisyFlag_
unsigned int noisyFlag_
Definition: SiPixelGainForHLTonGPU.h:71
SiPixelGainForHLTonGPU::v_pedestals_
DecodingStructure * v_pedestals_
Definition: SiPixelGainForHLTonGPU.h:62
SiPixelGainForHLTonGPU::gainPrecision_
float gainPrecision_
Definition: SiPixelGainForHLTonGPU.h:66
SiPixelGainForHLTonGPU::pedPrecision_
float pedPrecision_
Definition: SiPixelGainForHLTonGPU.h:66
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
SiPixelGainForHLTonGPU::DecodingStructure
SiPixelGainForHLTonGPU_DecodingStructure DecodingStructure
Definition: SiPixelGainForHLTonGPU.h:30
SiPixelGainForHLTonGPU::decodePed
constexpr float decodePed(unsigned int ped) const
Definition: SiPixelGainForHLTonGPU.h:60
SiPixelGainForHLTonGPU::minGain_
float minGain_
Definition: SiPixelGainForHLTonGPU.h:65
SiPixelGainForHLTonGPU::deadFlag_
unsigned int deadFlag_
Definition: SiPixelGainForHLTonGPU.h:70
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82