StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DSMAlgo_BE001_2015.cc
1 //
2 // Pibero Djawotho <pibero@comp.tamu.edu>
3 // Texas A&M University Cyclotron Institute
4 // 7 Jan 2015
5 //
6 
7 #include "DSM.hh"
8 #include "sumTriggerPatchChannels.hh"
9 #include "DSMAlgo_BE001_2015.hh"
10 
11 void DSMAlgo_BE001_2015::operator()(DSM& dsm)
12 {
13  // INPUT:
14 
15  // 10 x 12-bit BEMC channels
16  // (5-0) high-tower
17  // (11-6) trigger-patch
18 
19  // REGISTERS:
20 
21  // R0: BEMC-High-Tower-Th0 (6)
22  // R1: BEMC-High-Tower-Th1 (6)
23  // R2: BEMC-High-Tower-Th2 (6)
24  // R3: BEMC-High-Tower-Th3 (6)
25 
26  int highTowerBits = 0;
27  int lowEtaSum = 0;
28  int highEtaSum = 0;
29 
30  // Args: dsm, chMin, chMax, step, targetPedestal, sum, highTowerBits
31 
32  sumTriggerPatchChannels2015(dsm, 0, 5, 1, 1, lowEtaSum, highTowerBits);
33  sumTriggerPatchChannels2015(dsm, 6, 9, 1, 1, highEtaSum, highTowerBits);
34 
35  // OUTPUT (16):
36 
37  // (0-5) TP sum for low-eta group (6)
38  // (6-11) TP sum for high-eta group (6)
39  // (12-15) HT bits (4)
40 
41  int out = 0;
42 
43  out |= lowEtaSum;
44  out |= highEtaSum << 6;
45  out |= highTowerBits << 12;
46 
47  dsm.output = out;
48 }
Definition: DSM.hh:16