3 #include "DSMAlgo_BW001_2014_b.hh"
6 void DSMAlgo_BW001_2014_b::operator()(
DSM& dsm)
30 unsigned int highTowerBits[10][6];
31 unsigned int trigPatchBits[10];
33 for(
int ichn = 0; ichn < 10; ichn++){
34 unsigned int ht = dsm.channels[ichn] & 0x3f;
35 for(
int ireg = 0; ireg < 6; ireg++){
36 highTowerBits[ichn][ireg] = ht > dsm.registers[ireg];
38 unsigned int tp = dsm.channels[ichn] >> 6 & 0x3f;
39 trigPatchBits[ichn] = tp > dsm.registers[6];
42 unsigned int htBits[6];
43 for(
int ireg = 0; ireg < 6; ireg++){
45 for(
int ichn = 0; ichn < 10; ichn++){
46 htBits[ireg] |= highTowerBits[ichn][ireg];
49 unsigned int tpBits = 0;
50 for(
int ichn = 0; ichn < 10; ichn++){
51 tpBits |= trigPatchBits[ichn];
53 unsigned int httpBits = 0;
54 for(
int ichn = 0; ichn < 10; ichn++){
55 httpBits |= (highTowerBits[ichn][5] & trigPatchBits[ichn]);
69 out |= htBits[0] << 10;
70 out |= htBits[1] << 11;
71 out |= htBits[2] << 12;
72 out |= htBits[3] << 13;
73 out |= htBits[4] << 14;
74 out |= htBits[5] << 15;