CMS 3D CMS Logo

HGCalTileIndex.h
Go to the documentation of this file.
1 #ifndef Geometry_HGCalCommonData_HGCalTileIndex_h
2 #define Geometry_HGCalCommonData_HGCalTileIndex_h
3 
4 #include <cmath>
5 #include <cstdint>
6 #include <tuple>
7 
8 namespace HGCalTileIndex {
9  // Packs layer, ring, phi indices into a single word (useful for XML files)
10  int32_t tileIndex(int32_t layer, int32_t ring, int32_t phi);
11  // Unpacks Layer number from the packed index
12  int32_t tileLayer(int32_t index);
13  // Unpacks Ring number from the packed index
14  int32_t tileRing(int32_t index);
15  // Unpacks Phi number from the packed index
16  int32_t tilePhi(int32_t index);
17  // Packs tile type and SiPM size into a single word (useful for XML files)
18  int32_t tileProperty(int32_t, int32_t);
19  // Unpacks tile type from the packed word
20  int32_t tileType(int32_t);
21  // Unpacks SiPM size from the packed word
22  int32_t tileSiPM(int32_t);
23  // Packs 3 information for usage in xml file
24  int32_t tilePack(int32_t ly, int32_t k1, int32_t k2);
25  // Unpacks thos three information from the packed word
26  std::tuple<int32_t, int32_t, int32_t> tileUnpack(int32_t index);
27  // Sees if the tile exists or not depending the HEX information in flat file
28  bool tileExist(const int32_t* hex, int32_t zside, int32_t phi);
29 }; // namespace HGCalTileIndex
30 
31 #endif
int32_t tileRing(int32_t index)
int32_t tileType(int32_t)
int zside(DetId const &)
constexpr std::array< uint8_t, layerIndexSize > layer
int32_t tileIndex(int32_t layer, int32_t ring, int32_t phi)
int32_t tilePhi(int32_t index)
std::tuple< int32_t, int32_t, int32_t > tileUnpack(int32_t index)
int32_t tilePack(int32_t ly, int32_t k1, int32_t k2)
int32_t tileProperty(int32_t, int32_t)
bool tileExist(const int32_t *hex, int32_t zside, int32_t phi)
int32_t tileSiPM(int32_t)
int32_t tileLayer(int32_t index)