CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HGCalTestNumbering.h
Go to the documentation of this file.
1 #ifndef SimDataFormats_HGCalTestNumbering_h
2 #define SimDataFormats_HGCalTestNumbering_h
3 // File: HGCalTestNumbering.h
5 // Description: Numbering scheme for high granularity calorimeter (SIM step)
7 
8 #include <boost/cstdint.hpp>
9 
11 
12 public:
13  static const int kHGCalCellSOffset = 0;
14  static const int kHGCalCellSMask = 0xFFFF;
15  static const int kHGCalSectorSOffset = 16;
16  static const int kHGCalSectorSMask = 0x7F;
17  static const int kHGCalSubSectorSOffset = 23;
18  static const int kHGCalSubSectorSMask = 0x1;
19  static const int kHGCalLayerSOffset = 24;
20  static const int kHGCalLayerSMask = 0x7F;
21  static const int kHGCalZsideSOffset = 31;
22  static const int kHGCalZsideSMask = 0x1;
23 
24  static const int kHGCalCellHOffset = 0;
25  static const int kHGCalCellHMask = 0xFF;
26  static const int kHGCalCellTypHOffset = 8;
27  static const int kHGCalCellTypHMask = 0x1;
28  static const int kHGCalWaferHOffset = 9;
29  static const int kHGCalWaferHMask = 0x3FF;
30  static const int kHGCalLayerHOffset = 19;
31  static const int kHGCalLayerHMask = 0x7F;
32  static const int kHGCalZsideHOffset = 26;
33  static const int kHGCalZsideHMask = 0x1;
34  static const int kHGCalSubdetHOffset = 27;
35  static const int kHGCalSubdetHMask = 0x7;
37  virtual ~HGCalTestNumbering() {}
38  static uint32_t packSquareIndex(int z, int lay, int sec, int subsec,
39  int cell);
40  static uint32_t packHexagonIndex(int subdet, int z, int lay, int wafer,
41  int celltyp, int cell);
42  static void unpackSquareIndex(const uint32_t& idx, int& z, int& lay,
43  int& sec, int& subsec, int& cell);
44  static void unpackHexagonIndex(const uint32_t& idx, int& subdet, int& z,
45  int& lay, int& wafer, int& celltyp,
46  int& cell);
47  static bool isValidSquare(int z, int lay, int sec, int subsec, int cell);
48  static bool isValidHexagon(int subdet, int z, int lay, int wafer,
49  int celltyp, int cell);
50 };
51 
52 #endif
static const int kHGCalZsideHMask
static const int kHGCalSubSectorSMask
static const int kHGCalWaferHMask
static const int kHGCalCellSMask
static const int kHGCalZsideHOffset
static const int kHGCalCellHMask
static const int kHGCalSubdetHMask
static const int kHGCalZsideSMask
static const int kHGCalLayerSOffset
static uint32_t packHexagonIndex(int subdet, int z, int lay, int wafer, int celltyp, int cell)
static const int kHGCalSectorSMask
static const int kHGCalZsideSOffset
static bool isValidHexagon(int subdet, int z, int lay, int wafer, int celltyp, int cell)
static bool isValidSquare(int z, int lay, int sec, int subsec, int cell)
static const int kHGCalLayerHOffset
static const int kHGCalSubSectorSOffset
static const int kHGCalCellHOffset
static const int kHGCalCellSOffset
static const int kHGCalLayerHMask
static const int kHGCalWaferHOffset
static void unpackSquareIndex(const uint32_t &idx, int &z, int &lay, int &sec, int &subsec, int &cell)
static const int kHGCalCellTypHMask
static const int kHGCalCellTypHOffset
static const int kHGCalSubdetHOffset
static uint32_t packSquareIndex(int z, int lay, int sec, int subsec, int cell)
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
static const int kHGCalLayerSMask
static const int kHGCalSectorSOffset