7 #include "DSMAlgo_BC101_2009.hh"
9 void DSMAlgo_BC101_2009::operator()(
DSM& dsm)
42 int highTowerBits = 0;
46 for (
int ch = 0; ch <= 4; ch += 2) {
47 int lowEtaSum = dsm.channels[ch] & 0x3f;
48 int highEtaSum = dsm.channels[ch] >> 6 & 0x3f;
49 jpx += lowEtaSum + highEtaSum;
51 highTowerBits |= dsm.channels[ch] >> 12 & 0xf;
56 for (
int ch = 1; ch <= 5; ch += 2) {
57 int lowEtaSum = dsm.channels[ch] & 0x3f;
58 int highEtaSum = dsm.channels[ch] >> 6 & 0x3f;
60 jpz += lowEtaSum + highEtaSum;
61 jpPartial += highEtaSum;
62 highTowerBits |= dsm.channels[ch] >> 12 & 0xf;
66 if (jpPartial > 63) jpPartial = 63;
76 for (
int reg = 0; reg < 3; ++reg) {
77 if (jpx > dsm.registers[reg]) ++jpxBits;
78 if (jpy > dsm.registers[reg]) ++jpyBits;
79 if (jpz > dsm.registers[reg]) ++jpzBits;
96 out |= jpPartial << 6;
97 out |= highTowerBits << 12;
107 dsm.info[3] = jpPartial;