21#ifndef ALICEO2_DATAFORMATSTPC_CMV_H
22#define ALICEO2_DATAFORMATSTPC_CMV_H
30static constexpr uint32_t NTimeBinsPerPacket = 3564;
31static constexpr uint32_t NPacketsPerTFPerCRU = 4;
32static constexpr uint32_t NTimeBinsPerTF = NTimeBinsPerPacket * NPacketsPerTFPerCRU;
35static constexpr uint32_t DataSizeBytes = NTimeBinsPerPacket *
sizeof(
uint16_t);
36static constexpr uint32_t DataPaddingBytes = (32 - (DataSizeBytes % 32)) % 32;
83 const bool positive = (
cmv >> 15) & 1;
84 const float magnitude = (
cmv & 0x7FFF) / 128.f;
85 return positive ? magnitude : -magnitude;
91 const bool positive = (
value >= 0.f);
93 std::lround(std::abs(
value) * 128.f)) &
95 cmv = (positive ? 0x8000 : 0x0000) | magnitude;
unsigned short int uint16_t
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
GLsizei const GLfloat * value
uint8_t padding[DataPaddingBytes]
trailing padding to align data to 32-byte boundary
void setCMV(uint32_t timeBin, uint16_t value)
float getCMVFloat(uint32_t timeBin) const
Data data[NTimeBinsPerPacket]
data values
const Header & getHeader() const
uint16_t getCMV(uint32_t timeBin) const
const Data * getData() const
void setCMVFloat(uint32_t timeBin, float value)
Header header
CMV data header.
CMV single data container.
uint16_t getCMV() const
raw 16-bit integer representation
float getCMVFloat() const
void setCMVFloat(float value)
void setCMV(uint16_t value)
set raw 16-bit integer representation
uint16_t cmv
16-bit signed fixed point value: bit 15 = sign (1=positive, 0=negative), bits 14-0 = I8F7 magnitude