3 #include "DSMAlgo_BW003_2014_b.hh"
6 void DSMAlgo_BW003_2014_b::operator()(
DSM& dsm)
25 unsigned int highTowerBits[10][6];
26 unsigned int trigPatchBits[10];
28 for(
int ichn = 0; ichn < 10; ichn++){
29 unsigned int ht = dsm.channels[ichn] & 0x3f;
30 for(
int ireg = 0; ireg < 6; ireg++){
31 highTowerBits[ichn][ireg] = ht > dsm.registers[ireg];
33 unsigned int tp = dsm.channels[ichn] >> 6 & 0x3f;
34 trigPatchBits[ichn] = tp > dsm.registers[5];
37 unsigned int evenhtBits[6];
38 unsigned int oddhtBits[6];
40 for(
int ireg = 0; ireg < 6; ireg++){
44 for(
int iichn = 0; iichn < 5; iichn++){
45 evenhtBits[ireg] |= highTowerBits[2*iichn][ireg];
46 oddhtBits[ireg] |= highTowerBits[2*iichn+1][ireg];
50 unsigned int eventpBits = 0;
51 unsigned int oddtpBits = 0;
53 for(
int iichn = 0; iichn < 5; iichn++){
54 eventpBits |= trigPatchBits[2*iichn];
55 oddtpBits |= trigPatchBits[2*iichn+1];
58 unsigned int evenhttpBits = 0;
59 unsigned int oddhttpBits = 0;
60 for(
int iichn = 0; iichn < 5; iichn++){
61 evenhttpBits |= (highTowerBits[2*iichn][5] & trigPatchBits[2*iichn]);
62 oddhttpBits |= (highTowerBits[2*iichn+1][5] & trigPatchBits[2*iichn+1]);
77 out |= oddtpBits << 8;
78 out |= oddhttpBits << 9;
79 out |= oddhtBits[0] << 10;
80 out |= oddhtBits[1] << 11;
81 out |= oddhtBits[2] << 12;
82 out |= oddhtBits[3] << 13;
83 out |= oddhtBits[4] << 14;
84 out |= oddhtBits[5] << 15;
86 out |= eventpBits << 24;
87 out |= evenhttpBits << 25;
88 out |= evenhtBits[0] << 26;
89 out |= evenhtBits[1] << 27;
90 out |= evenhtBits[2] << 28;
91 out |= evenhtBits[3] << 29;
92 out |= evenhtBits[4] << 30;
93 out |= evenhtBits[5] << 31;