3 #include "DSMAlgo_BE001_2014_b.hh"
6 void DSMAlgo_BE001_2014_b::operator()(
DSM& dsm)
8 unsigned int highTowerBits[10][6];
9 unsigned int trigPatchBits[10];
12 for(
int ichn = 0; ichn < 10; ichn++){
13 unsigned int ht = dsm.channels[ichn] & 0x3f;
14 for(
int ireg = 0; ireg < 6; ireg++){
15 highTowerBits[ichn][ireg] = ht > dsm.registers[ireg];
17 unsigned int tp = dsm.channels[ichn] >> 6 & 0x3f;
18 trigPatchBits[ichn] = tp > dsm.registers[6];
21 unsigned int htBits[6];
22 for(
int ireg = 0; ireg < 6; ireg++){
24 for(
int ichn = 0; ichn < 10; ichn++){
25 htBits[ireg] |= highTowerBits[ichn][ireg];
28 unsigned int tpBits = 0;
29 for(
int ichn = 0; ichn < 10; ichn++){
30 tpBits |= trigPatchBits[ichn];
32 unsigned int httpBits = 0;
33 for(
int ichn = 0; ichn < 10; ichn++){
34 httpBits |= (highTowerBits[ichn][5] & trigPatchBits[ichn]);
48 out |= htBits[0] << 10;
49 out |= htBits[1] << 11;
50 out |= htBits[2] << 12;
51 out |= htBits[3] << 13;
52 out |= htBits[4] << 14;
53 out |= htBits[5] << 15;