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 energy and TDC of the cell in that depth of the trigger tower
14  typedef std::array<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_HE[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
HcalFinegrainBit::version_
int version_
Definition: HcalFinegrainBit.h:26
HcalFinegrainBit::tdc_HE
const int tdc_HE[29][7]
Definition: HcalFinegrainBit.h:29
HcalFinegrainBit::compute
std::bitset< 2 > compute(const Tower &) const
Definition: HcalFinegrainBit.cc:5
HcalFinegrainBit
Definition: HcalFinegrainBit.h:8
HcalFinegrainBit::HcalFinegrainBit
HcalFinegrainBit(int version)
Definition: HcalFinegrainBit.h:16
HcalTrigTowerDetId.h
HcalFinegrainBit::is_mip
const int is_mip
Definition: HcalFinegrainBit.h:23
HcalFinegrainBit::TowerTDC
std::array< std::pair< int, int >, 7 > TowerTDC
Definition: HcalFinegrainBit.h:14
HcalFinegrainBit::Tower
std::array< std::bitset< 6 >, 2 > Tower
Definition: HcalFinegrainBit.h:12
HcalFinegrainBit::is_above_mip
const int is_above_mip
Definition: HcalFinegrainBit.h:24
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
HcalTrigTowerDetId
Definition: HcalTrigTowerDetId.h:14