4const std::string TrigCondition::s_CONDITIONS[] = {
7 "02: Barrel Cluster back to back",
8 "03: Endcap Cluster back to back",
9 "04: Cluster Balance in Z direction",
10 "05: Barrel Cluster Balance in Phi direction",
11 "06: Endcap Cluster phi Balance",
12 "07: Barrel total Energy Higher threshold",
13 "08: Endcap total Energy Higher threshold",
14 "09: Total Energy Lower threshold",
15 "10: Total Energy Middle threshold",
16 "11: Energy Balance in \"Z\" direction",
17 "12: Barrel Energy difference Balance",
18 "13: Endcap Energy difference Balance",
19 "14: Energy Block Balance",
20 "15: Endcap Energy Balance",
21 "16: Endcap TOF back to back",
22 "17: Barrel TOF back to back",
27 "22: Not defined yet",
28 "23: Not defined yet",
29 "24: Not defined yet",
30 "25: Not defined yet",
31 "26: Not defined yet",
32 "27: Not defined yet",
33 "28: Not defined yet",
34 "29: Not defined yet",
35 "30: Not defined yet",
36 "31: Not defined yet",
37 "32: MUON Back to Back 3478",
38 "33: MUON Back to Back 37",
39 "34: Not defined yet",
40 "35: Not defined yet",
41 "36: Not defined yet",
42 "37: Not defined yet",
43 "38: Short Track back to back",
47 "42: Long Track back to back",
58 for (uint32_t group = 0; group < 2; group++) {
59 uint32_t iBegin = group * 24;
60 uint32_t iEnd = (group + 1) * 24;
61 uint32_t jBegin = group * window;
62 uint32_t jEnd = (group + 1) * window;
63 for (uint32_t i = iBegin, mask = 1; i < iEnd; i++, mask <<= 1) {
64 uint32_t num_One = 0, num_Zero = 0;
65 for (uint32_t j = jBegin; j < jEnd; j++) {
66 if ((data[j] & mask) != 0) {
70 if (num_One == 0) num_Zero++;
73 m_num_One[i] = num_One;
74 m_num_Zero[i] = num_Zero;
78 for (uint32_t i = 0; i < 48; i++) {
79 if (m_num_One[i] != 0) m_condList.push_back(i);
84 int size = m_condList.size();
85 std::cout <<
"TrigCondition-" << m_name <<
" contains the following conditions:" << std::endl;
86 for (
int i = 0; i < size; i++) {
87 std::cout <<
'\t' << s_CONDITIONS[m_condList[i]] << std::endl;
TrigCondition(char *name, uint32_t window, const uint32_t *data)