1 #ifndef CondFormats_SiPixelObjects_interface_alpaka_SiPixelGainCalibrationForHLTUtilities_h 2 #define CondFormats_SiPixelObjects_interface_alpaka_SiPixelGainCalibrationForHLTUtilities_h 6 #include <alpaka/alpaka.hpp> 11 ALPAKA_FN_HOST_ACC ALPAKA_FN_ACC ALPAKA_FN_INLINE
static std::pair<float, float>
getPedAndGain(
17 bool& isNoisyColumn) {
19 auto end =
view.modEnds()[moduleInd];
20 auto nCols =
view.modCols()[moduleInd];
22 unsigned int lengthOfColumnData = (
end -
start) / nCols;
23 unsigned int lengthOfAveragedDataInEachColumn = 2;
24 unsigned int numberOfDataBlocksToSkip = row /
view.numberOfRowsAveragedOver();
26 auto offset =
start +
col * lengthOfColumnData + lengthOfAveragedDataInEachColumn * numberOfDataBlocksToSkip;
31 auto lp =
view.v_pedestals();
34 isDeadColumn = (
s.ped & 0xFF) ==
view.deadFlag();
35 isNoisyColumn = (
s.ped & 0xFF) ==
view.noisyFlag();
36 float decodeGain =
float(
s.gain & 0xFF) *
view.gainPrecision() +
view.minGain();
37 float decodePed =
float(
s.ped & 0xFF) *
view.pedPrecision() +
view.minPed();
39 return std::make_pair(decodePed, decodeGain);
43 #endif // CondFormats_SiPixelObjects_interface_alpaka_SiPixelGainCalibrationForHLTUtilities_h
ALPAKA_FN_HOST_ACC ALPAKA_FN_ACC static ALPAKA_FN_INLINE std::pair< float, float > getPedAndGain(const SiPixelGainCalibrationForHLTSoAConstView &view, uint32_t moduleInd, int col, int row, bool &isDeadColumn, bool &isNoisyColumn)
ALPAKA_ASSERT_ACC(offsets)