1 #include "DSMAlgo_BC101_2015.hh"
3 void DSMAlgo_BC101_2015::operator()(
DSM& dsm)
38 getBemcJetPatchSums2015A(dsm,jpx,jpy,jpz,jpPartial,highTowerBits);
49 for(
int ir = 0; ir < 6; ir++){
50 if(dsm.registers[ir] > 0) rcounts++;
54 for (
int reg = 0; reg < 2; ++reg) {
55 if (jpx > dsm.registers[reg]) ++jpxBits;
56 if (jpy > dsm.registers[reg]) ++jpyBits;
57 if (jpz > dsm.registers[reg]) ++jpzBits;
61 if (jpx > dsm.registers[2]) ++jpxBits;
62 if (jpy > dsm.registers[3]) ++jpyBits;
63 if (jpz > dsm.registers[4]) ++jpzBits;
66 if (jpx > dsm.registers[2]) ++jpxBits;
67 if (jpy > dsm.registers[2]) ++jpyBits;
68 if (jpz > dsm.registers[2]) ++jpzBits;
73 for (
int ch = 0; ch < 6; ++ch) {
74 int htBits = dsm.channels[ch] >> 12 & 0xf;
75 daq10kBits |= (htBits >> dsm.registers[5] & 0x1) << ch;
93 out |= jpPartial << 6;
94 out |= highTowerBits << 12;
96 out |= daq10kBits << 16;
105 dsm.info[3] = jpPartial;
107 void getBemcJetPatchSums2015A(
const DSM& bc101,
int& jpx,
int& jpy,
int& jpz,
int& jpPartial,
int& highTowerBits)
117 for (
int ch = 0; ch <= 4; ch += 2) {
118 int lowEtaSum = bc101.channels[ch] & 0x3f;
119 int highEtaSum = bc101.channels[ch] >> 6 & 0x3f;
120 jpx += lowEtaSum + highEtaSum;
122 highTowerBits |= bc101.channels[ch] >> 12 & 0xf;
127 for (
int ch = 1; ch <= 5; ch += 2) {
128 int lowEtaSum = bc101.channels[ch] & 0x3f;
129 int highEtaSum = bc101.channels[ch] >> 6 & 0x3f;
131 jpz += lowEtaSum + highEtaSum;
132 jpPartial += highEtaSum;
133 highTowerBits |= bc101.channels[ch] >> 12 & 0xf;
137 if (jpPartial > 63) jpPartial = 63;