CMS 3D CMS Logo

HcalFinegrainBit.h
Go to the documentation of this file.
1 #ifndef HcalSimAlgos_HcalFinegrainBit_h
2 #define HcalSimAlgos_HcalFinegrainBit_h
3 
4 #include <array>
5 #include <bitset>
7 
9 public:
10  // see the const definitions below for the meaning of the bit towers.
11  // Each bit is replicated for each depth level
12  typedef std::array<std::bitset<6>, 2> Tower;
13  // Each pair contains uHTR group 0 LUT bits 12-15, TDC, and ADC of the cell in that depth of the trigger tower
14  typedef std::array<std::pair<std::pair<int, bool>, std::pair<int, int>>, 7> TowerTDC;
15 
17 
18  std::bitset<2> compute(const Tower&) const;
19  std::bitset<6> compute(const TowerTDC&, const HcalTrigTowerDetId&) const;
20 
21 private:
22  // define the two bits in the tower
23  const int is_mip = 0;
24  const int is_above_mip = 1;
25 
26  int version_;
27 
28  // define prompt-delayed TDC range. Note this is offset from depth and ieta by 1
29  const int tdc_boundary[29][7] = {
30  {8, 14, 15, 17, 0, 0, 0}, {8, 14, 15, 17, 0, 0, 0}, {8, 14, 14, 17, 0, 0, 0}, {8, 14, 14, 17, 0, 0, 0},
31  {8, 13, 14, 16, 0, 0, 0}, {8, 13, 14, 16, 0, 0, 0}, {8, 12, 14, 15, 0, 0, 0}, {8, 12, 14, 15, 0, 0, 0},
32  {7, 12, 13, 15, 0, 0, 0}, {7, 12, 13, 15, 0, 0, 0}, {7, 12, 13, 15, 0, 0, 0}, {7, 12, 13, 15, 0, 0, 0},
33  {7, 11, 12, 14, 0, 0, 0}, {7, 11, 12, 14, 0, 0, 0}, {7, 11, 12, 14, 0, 0, 0}, {7, 11, 12, 7, 0, 0, 0},
34  {0, 12, 10, 0, 0, 0, 0}, {0, 9, 10, 9, 10, 0, 0}, {16, 9, 9, 9, 11, 10, 0}, {17, 8, 9, 8, 9, 10, 0},
35  {9, 7, 7, 7, 9, 6, 0}, {8, 7, 7, 6, 6, 6, 0}, {8, 6, 6, 6, 7, 7, 0}, {7, 6, 6, 6, 7, 6, 0},
36  {7, 6, 6, 6, 6, 6, 0}, {6, 6, 6, 6, 6, 6, 0}, {6, 5, 6, 6, 6, 7, 10}, {9, 9, 9, 5, 5, 6, 6},
37  {0, 0, 0, 0, 0, 0, 0}};
38 };
39 
40 #endif
std::array< std::bitset< 6 >, 2 > Tower
const int is_above_mip
std::array< std::pair< std::pair< int, bool >, std::pair< int, int > >, 7 > TowerTDC
std::bitset< 2 > compute(const Tower &) const
HcalFinegrainBit(int version)
const int tdc_boundary[29][7]