CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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_ [phase1PixelTopology::numberOfModules]
 
DecodingStructurev_pedestals_
 

Detailed Description

Definition at line 28 of file SiPixelGainForHLTonGPU.h.

Member Typedef Documentation

Definition at line 30 of file SiPixelGainForHLTonGPU.h.

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

Definition at line 32 of file SiPixelGainForHLTonGPU.h.

Member Function Documentation

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

Definition at line 58 of file SiPixelGainForHLTonGPU.h.

References gainPrecision_, and minGain_.

Referenced by getPedAndGain().

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

Definition at line 59 of file SiPixelGainForHLTonGPU.h.

References minPed_, and pedPrecision_.

Referenced by 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.

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

35  {
36  auto range = rangeAndCols_[moduleInd].first;
37  auto nCols = rangeAndCols_[moduleInd].second;
38  // 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
39  unsigned int lengthOfColumnData = (range.second - range.first) / nCols;
40  unsigned int lengthOfAveragedDataInEachColumn = 2; // we always only have two values per column averaged block
41  unsigned int numberOfDataBlocksToSkip = row / numberOfRowsAveragedOver_;
42 
43  auto offset = range.first + col * lengthOfColumnData + lengthOfAveragedDataInEachColumn * numberOfDataBlocksToSkip;
44 
45  assert(offset < range.second);
46  assert(offset < 3088384);
47  assert(0 == offset % 2);
48 
49  DecodingStructure const* __restrict__ lp = v_pedestals_;
50  auto s = lp[offset / 2];
51 
52  isDeadColumn = (s.ped & 0xFF) == deadFlag_;
53  isNoisyColumn = (s.ped & 0xFF) == noisyFlag_;
54 
55  return std::make_pair(decodePed(s.ped & 0xFF), decodeGain(s.gain & 0xFF));
56  }
constexpr float decodeGain(unsigned int gain) const
DecodingStructure * v_pedestals_
assert(be >=bs)
const uint16_t range(const Frame &aFrame)
SiPixelGainForHLTonGPU_DecodingStructure DecodingStructure
std::pair< Range, int > rangeAndCols_[phase1PixelTopology::numberOfModules]
constexpr float decodePed(unsigned int ped) const
int col
Definition: cuy.py:1009

Member Data Documentation

unsigned int SiPixelGainForHLTonGPU::deadFlag_
float SiPixelGainForHLTonGPU::gainPrecision_
float SiPixelGainForHLTonGPU::maxGain_
float SiPixelGainForHLTonGPU::maxPed_
float SiPixelGainForHLTonGPU::minGain_
float SiPixelGainForHLTonGPU::minPed_
unsigned int SiPixelGainForHLTonGPU::nBinsToUseForEncoding_
unsigned int SiPixelGainForHLTonGPU::noisyFlag_
unsigned int SiPixelGainForHLTonGPU::numberOfRowsAveragedOver_
float SiPixelGainForHLTonGPU::pedPrecision_
std::pair<Range, int> SiPixelGainForHLTonGPU::rangeAndCols_[phase1PixelTopology::numberOfModules]
DecodingStructure* SiPixelGainForHLTonGPU::v_pedestals_