CMS 3D CMS Logo

HGCalTestNumbering.h
Go to the documentation of this file.
1 #include <cstdint>
2 #ifndef SimDataFormats_HGCalTestNumbering_h
3 #define SimDataFormats_HGCalTestNumbering_h
4 // File: HGCalTestNumbering.h
6 // Description: Numbering scheme for high granularity calorimeter (SIM step)
8 
10 public:
11  static const int kHGCalCellSOffset = 0;
12  static const int kHGCalCellSMask = 0xFFFF;
13  static const int kHGCalSectorSOffset = 16;
14  static const int kHGCalSectorSMask = 0x7F;
15  static const int kHGCalSubSectorSOffset = 23;
16  static const int kHGCalSubSectorSMask = 0x1;
17  static const int kHGCalLayerSOffset = 24;
18  static const int kHGCalLayerSMask = 0x7F;
19  static const int kHGCalZsideSOffset = 31;
20  static const int kHGCalZsideSMask = 0x1;
21 
22  static const int kHGCalCellHOffset = 0;
23  static const int kHGCalCellHMask = 0xFF;
24  static const int kHGCalCellTypHOffset = 8;
25  static const int kHGCalCellTypHMask = 0x1;
26  static const int kHGCalWaferHOffset = 9;
27  static const int kHGCalWaferHMask = 0x3FF;
28  static const int kHGCalLayerHOffset = 19;
29  static const int kHGCalLayerHMask = 0x7F;
30  static const int kHGCalZsideHOffset = 26;
31  static const int kHGCalZsideHMask = 0x1;
32  static const int kHGCalSubdetHOffset = 27;
33  static const int kHGCalSubdetHMask = 0x7;
35  virtual ~HGCalTestNumbering() {}
36  static uint32_t packSquareIndex(int z, int lay, int sec, int subsec, int cell);
37  static uint32_t packHexagonIndex(int subdet, int z, int lay, int wafer, int celltyp, int cell);
38  static void unpackSquareIndex(const uint32_t& idx, int& z, int& lay, int& sec, int& subsec, int& cell);
39  static void unpackHexagonIndex(
40  const uint32_t& idx, int& subdet, int& z, int& lay, int& wafer, int& celltyp, int& cell);
41  static bool isValidSquare(int z, int lay, int sec, int subsec, int cell);
42  static bool isValidHexagon(int subdet, int z, int lay, int wafer, int celltyp, int cell);
43 };
44 
45 #endif
HGCalTestNumbering::kHGCalCellHOffset
static const int kHGCalCellHOffset
Definition: HGCalTestNumbering.h:22
HGCalTestNumbering::kHGCalSectorSMask
static const int kHGCalSectorSMask
Definition: HGCalTestNumbering.h:14
HGCalTestNumbering::kHGCalLayerHMask
static const int kHGCalLayerHMask
Definition: HGCalTestNumbering.h:29
HGCalTestNumbering::kHGCalZsideSOffset
static const int kHGCalZsideSOffset
Definition: HGCalTestNumbering.h:19
HGCalTestNumbering::unpackHexagonIndex
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
Definition: HGCalTestNumbering.cc:46
HGCalTestNumbering::~HGCalTestNumbering
virtual ~HGCalTestNumbering()
Definition: HGCalTestNumbering.h:35
HGCalTestNumbering::kHGCalWaferHOffset
static const int kHGCalWaferHOffset
Definition: HGCalTestNumbering.h:26
HGCalTestNumbering::kHGCalLayerHOffset
static const int kHGCalLayerHOffset
Definition: HGCalTestNumbering.h:28
HGCalTestNumbering::kHGCalCellSMask
static const int kHGCalCellSMask
Definition: HGCalTestNumbering.h:12
HGCalTestNumbering::unpackSquareIndex
static void unpackSquareIndex(const uint32_t &idx, int &z, int &lay, int &sec, int &subsec, int &cell)
Definition: HGCalTestNumbering.cc:38
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
HGCalTestNumbering::kHGCalSubdetHOffset
static const int kHGCalSubdetHOffset
Definition: HGCalTestNumbering.h:32
HGCalTestNumbering::kHGCalZsideSMask
static const int kHGCalZsideSMask
Definition: HGCalTestNumbering.h:20
HGCalTestNumbering::packSquareIndex
static uint32_t packSquareIndex(int z, int lay, int sec, int subsec, int cell)
Definition: HGCalTestNumbering.cc:5
DDAxes::z
HGCalTestNumbering::kHGCalLayerSMask
static const int kHGCalLayerSMask
Definition: HGCalTestNumbering.h:18
HGCalTestNumbering::kHGCalZsideHMask
static const int kHGCalZsideHMask
Definition: HGCalTestNumbering.h:31
HGCalTestNumbering::kHGCalSubSectorSMask
static const int kHGCalSubSectorSMask
Definition: HGCalTestNumbering.h:16
HGCalTestNumbering::kHGCalCellHMask
static const int kHGCalCellHMask
Definition: HGCalTestNumbering.h:23
HGCalTestNumbering::kHGCalCellTypHMask
static const int kHGCalCellTypHMask
Definition: HGCalTestNumbering.h:25
HGCalTestNumbering::kHGCalSubdetHMask
static const int kHGCalSubdetHMask
Definition: HGCalTestNumbering.h:33
HGCalTestNumbering::kHGCalLayerSOffset
static const int kHGCalLayerSOffset
Definition: HGCalTestNumbering.h:17
HGCalTestNumbering::kHGCalSubSectorSOffset
static const int kHGCalSubSectorSOffset
Definition: HGCalTestNumbering.h:15
HGCalTestNumbering
Definition: HGCalTestNumbering.h:9
HGCalTestNumbering::kHGCalZsideHOffset
static const int kHGCalZsideHOffset
Definition: HGCalTestNumbering.h:30
HGCalTestNumbering::packHexagonIndex
static uint32_t packHexagonIndex(int subdet, int z, int lay, int wafer, int celltyp, int cell)
Definition: HGCalTestNumbering.cc:22
fileinputsource_cfi.sec
sec
Definition: fileinputsource_cfi.py:87
HGCalTestNumbering::kHGCalCellSOffset
static const int kHGCalCellSOffset
Definition: HGCalTestNumbering.h:11
HGCalTestNumbering::HGCalTestNumbering
HGCalTestNumbering()
Definition: HGCalTestNumbering.h:34
HGCalTestNumbering::kHGCalSectorSOffset
static const int kHGCalSectorSOffset
Definition: HGCalTestNumbering.h:13
HGCalTestNumbering::kHGCalWaferHMask
static const int kHGCalWaferHMask
Definition: HGCalTestNumbering.h:27
HGCalTestNumbering::isValidHexagon
static bool isValidHexagon(int subdet, int z, int lay, int wafer, int celltyp, int cell)
Definition: HGCalTestNumbering.cc:68
HGCalTestNumbering::isValidSquare
static bool isValidSquare(int z, int lay, int sec, int subsec, int cell)
Definition: HGCalTestNumbering.cc:56
HGCalTestNumbering::kHGCalCellTypHOffset
static const int kHGCalCellTypHOffset
Definition: HGCalTestNumbering.h:24