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_ [phase1PixelTopology::numberOfModules]
 
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
inline

◆ decodePed()

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

◆ 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(), cuy::col, deadFlag_, decodeGain(), decodePed(), noisyFlag_, numberOfRowsAveragedOver_, HLT_IsoTrack_cff::offset, isotrackApplyRegressor::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  }
DecodingStructure * v_pedestals_
assert(be >=bs)
SiPixelGainForHLTonGPU_DecodingStructure DecodingStructure
constexpr float decodePed(unsigned int ped) const
std::pair< Range, int > rangeAndCols_[phase1PixelTopology::numberOfModules]
constexpr float decodeGain(unsigned int gain) const
col
Definition: cuy.py:1009

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_[phase1PixelTopology::numberOfModules]

◆ v_pedestals_

DecodingStructure* SiPixelGainForHLTonGPU::v_pedestals_