CMS 3D CMS Logo

HGCalWaferIndex.h
Go to the documentation of this file.
1 #ifndef Geometry_HGCalCommonData_HGCalWaferIndex_h
2 #define Geometry_HGCalCommonData_HGCalWaferIndex_h
3 
4 #include <cmath>
5 #include <cstdint>
6 
7 namespace HGCalWaferIndex {
8  // Packs layer, u, v indices into a single word (useful for xml definition)
9  int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old = false);
10  // Unpacks the layer number from the packed index
11  int32_t waferLayer(const int32_t index);
12  // Unpacks wafer U from the packed index
13  int32_t waferU(const int32_t index);
14  // Unpacks wafer V from the packed index
15  int32_t waferV(const int32_t index);
16  // Gets the used part of the index (Layer:u:v)
17  int32_t waferCopy(const int32_t index);
18  // Finds the index format (old:false or new:true)
19  bool waferFormat(const int32_t index);
20 }; // namespace HGCalWaferIndex
21 
22 #endif
int32_t waferU(const int32_t index)
int32_t waferLayer(const int32_t index)
int32_t waferCopy(const int32_t index)
int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
bool waferFormat(const int32_t index)
int32_t waferV(const int32_t index)