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  // Gets cassette number from phi position
24  int32_t tileCassette(int32_t, int32_t, int32_t, int32_t);
25  // Packs 3 information for usage in xml file
26  int32_t tilePack(int32_t ly, int32_t k1, int32_t k2);
27  // Unpacks thos three information from the packed word
28  std::tuple<int32_t, int32_t, int32_t> tileUnpack(int32_t index);
29  // Sees if the tile exists or not depending the HEX information in flat file
30  bool tileExist(const int32_t* hex, int32_t zside, int32_t phi);
31 }; // namespace HGCalTileIndex
32 
33 #endif
int32_t tileRing(int32_t index)
int32_t tileType(int32_t)
int zside(DetId const &)
int32_t tileIndex(int32_t layer, int32_t ring, int32_t phi)
int32_t tilePhi(int32_t index)
int32_t tileCassette(int32_t, int32_t, int32_t, int32_t)
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)