StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DSMAlgo_EE002_2017.cc
1 #include "DSM.hh"
2 #include "sumTriggerPatchChannels.hh"
3 #include "DSMAlgo_EE002_2017.hh"
4 
5 void DSMAlgo_EE002_2017::operator()(DSM& dsm)
6 {
7  // INPUT:
8 
9  // 10 x 12-bit EEMC channels
10  // (0-5) high tower
11  // (6-11) trigger patch
12 
13  // REGISTERS:
14 
15  // R0: EEMC-High-Tower-Th0 (6)
16  // R1: EEMC-High-Tower-Th1 (6)
17 
18  // ACTION:
19 
20  // J0 (ch0/1/2/3/4) to first output cable (0-15)
21 
22  int sumJ0 = 0;
23  int highTowerBitsJ0 = 0;
24 
25  // Args: dsm, chMin, chMax, step, targetPedestal, sum, highTowerBits
26 
27  sumTriggerPatchChannels2015(dsm, 0, 4, 1, 1, sumJ0, highTowerBitsJ0);
28 
29  // J1 (ch5/6/7/8/9) to second output cable (16-31)
30 
31  int sumJ1 = 0;
32  int highTowerBitsJ1 = 0;
33 
34  // Args: dsm, chMin, chMax, step, targetPedestal, sum, highTowerBits
35 
36  sumTriggerPatchChannels2015(dsm, 5, 9, 1, 1, sumJ1, highTowerBitsJ1);
37 
38  // OUTPUT (32):
39 
40  // (0-5) TP sum JO (6)
41  // (6-11) Unused (2)
42  // (12-13) HT bits J0 (2)
43  // (14) Unused (1)
44  // (15) HT.TP bit (1)
45  int out = 0;
46 
47  out |= sumJ0;
48  out |= highTowerBitsJ0 << 12;
49 
50  // (16-21) TP sum J1 (6)
51  // (22-27) Unused (2)
52  // (28-29) HT bits J1 (2)
53  // (30) Unused (1)
54  // (31) HT.TP bit (1)
55 
56  out |= sumJ1 << 16;
57  out |= highTowerBitsJ1 << 28;
58 
59  dsm.output = out;
60 
61 }
Definition: DSM.hh:16