10#include <klm/rawdata/RawData.h>
13#include <klm/dataobjects/KLMDigitRaw.h>
18using 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;
40 *newDigitRaw = klmDigitRaws->
appendNew(copper, slot,
41 dataWords[0], dataWords[1],
42 dataWords[2], dataWords[3]);
54 int asic = (
m_Channel - 1) / c_NChannelsAsic;
55 int channelBase = c_NChannelsAsic * asic;
56 channelGroups.clear();
59 group.firstChannel = channelBase + 1;
60 group.lastChannel = channelBase + c_NChannelsAsic;
61 channelGroups.push_back(group);
65 group.lastChannel = 0;
66 channelGroups.push_back(group);
69 group.firstChannel = channelBase + 1;
70 group.lastChannel = channelBase + 4;
71 channelGroups.push_back(group);
74 group.firstChannel = channelBase + 5;
75 group.lastChannel = channelBase + 8;
76 channelGroups.push_back(group);
79 group.firstChannel = channelBase + 9;
80 group.lastChannel = channelBase + 12;
81 channelGroups.push_back(group);
84 group.firstChannel = channelBase + 13;
85 group.lastChannel = channelBase + c_NChannelsAsic;
86 channelGroups.push_back(group);
91 group.lastChannel = 0;
92 channelGroups.push_back(group);
Class to store the raw words from the unpacker, digit-by-digit.
uint16_t m_Charge
Charge (12 bits).
static uint16_t unpackFE(uint16_t raw)
Unpack feature-extraction bit.
uint16_t m_TDC
TDC (11 bits).
static uint16_t unpackTDC(uint16_t raw)
Unpack TDC.
static uint16_t unpackType(uint16_t raw)
Unpack packet type.
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.
uint16_t m_Type
Packet type (3 bits).
uint16_t m_FE
Feature extraction mode (1 bit).
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.