CMS 3D CMS Logo

EcalFenixEtTot.cc
Go to the documentation of this file.
2 
3 //----------------------------------------------------------------------------------------
5 //----------------------------------------------------------------------------------------
7 //----------------------------------------------------------------------------------------
8 std::vector<int> EcalFenixEtTot::process(const std::vector<EBDataFrame *> &calodatafr) {
9  std::vector<int> out;
10  return out;
11 }
12 //----------------------------------------------------------------------------------------
13 void EcalFenixEtTot::process(std::vector<std::vector<int>> &bypasslinout,
14  int nStr,
15  int bitMask,
16  int bitOddEven,
17  std::vector<int> &output_even,
18  std::vector<int> &output_odd) {
19  for (unsigned int i = 0; i < output_even.size(); i++) {
20  output_even[i] = 0;
21  output_odd[i] = 0;
22  }
23 
24  int mask = (1 << bitMask) - 1;
25  for (int istrip = 0; istrip < nStr; istrip++) {
26  for (unsigned int i = 0; i < bypasslinout[istrip].size(); i++) {
27  int output = (bypasslinout[istrip][i] & mask); // fix bug inn case of EE: MSB are set for FG, so
28  // need to apply mask in summation.
29  if (output > mask)
30  output = mask;
31  // Check the oddeven flag to assign the amplitude to the correct sum
32  // If the feature is off in the strip fenix the bit will be always 0 and only the even sum will be summed
33  if ((bypasslinout[istrip][i] >> bitOddEven) & 1) {
34  output_odd[i] += output;
35  } else {
36  output_even[i] += output;
37  }
38  }
39  }
40  return;
41 }
42 //----------------------------------------------------------------------------------------
virtual std::vector< int > process(const std::vector< EBDataFrame *> &)
virtual ~EcalFenixEtTot()
Definition: output.py:1