10 #include <klm/rawdata/RawData.h>
13 #include <klm/dataobjects/KLMDigitRaw.h>
18 using namespace Belle2::KLM;
21 int copper,
int slot,
const int* buffer,
25 uint16_t dataWords[4];
26 dataWords[0] = (buffer[0] >> 16) & 0xFFFF;
27 dataWords[1] = buffer[0] & 0xFFFF;
28 dataWords[2] = (buffer[1] >> 16) & 0xFFFF;
29 dataWords[3] = buffer[1] & 0xFFFF;
38 *newDigitRaw = klmDigitRaws->
appendNew(copper, slot,
39 dataWords[0], dataWords[1],
40 dataWords[2], dataWords[3]);
53 int channelBase = 15 * asic;
54 channelGroups.clear();
56 group.firstChannel = channelBase + 1;
57 group.lastChannel = channelBase + 4;
58 channelGroups.push_back(group);
61 group.firstChannel = channelBase + 5;
62 group.lastChannel = channelBase + 8;
63 channelGroups.push_back(group);
66 group.firstChannel = channelBase + 9;
67 group.lastChannel = channelBase + 12;
68 channelGroups.push_back(group);
71 group.firstChannel = channelBase + 13;
72 group.lastChannel = channelBase + 15;
73 channelGroups.push_back(group);
77 group.lastChannel = 0;
78 channelGroups.push_back(group);
Class to store the raw words from the unpacker, digit-by-digit.
uint16_t m_Charge
Charge (12 bits).
uint16_t m_TDC
TDC (11 bits).
static uint16_t unpackTDC(uint16_t raw)
Unpack TDC.
static uint16_t unpackChannel(uint16_t raw)
Unpack channel.
static uint16_t unpackCharge(uint16_t raw)
Unpack charge.
uint16_t m_Axis
Axis (1 bit).
uint16_t m_Channel
Channel (7 bits).
uint16_t m_TriggerBits
Trigger bits (5 bits).
static uint16_t unpackCTime(uint16_t raw)
Unpack CTIME.
static uint16_t unpackLane(uint16_t raw)
Unpack lane.
static uint16_t unpackTriggerBits(uint16_t raw)
Unpack trigger bits.
uint16_t m_Lane
Lane (5 bits).
bool multipleStripHit() const
Check whether this hit corresponds to multiple strips.
RawData(int copper, int slot, const int *buffer, StoreArray< KLMDigitRaw > *klmDigitRaws, KLMDigitRaw **newDigitRaw, bool fillDigitRaws)
Constructor (unpack KLM raw data).
static uint16_t unpackAxis(uint16_t raw)
Unpack axis.
void getChannelGroups(std::vector< ChannelGroup > &channelGroups) const
Get channel groups corresponding to this hit.
uint16_t m_CTime
CTIME (16 bits).
Accessor to arrays stored in the data store.
T * appendNew()
Construct a new T object at the end of the array.