Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-03 00:59:07

0001 #ifndef Geometry_HGCalCommonData_HGCalTileIndex_h
0002 #define Geometry_HGCalCommonData_HGCalTileIndex_h
0003 
0004 #include <cmath>
0005 #include <cstdint>
0006 #include <tuple>
0007 
0008 namespace HGCalTileIndex {
0009   // Packs layer, ring, phi indices into a single word (useful for XML files)
0010   int32_t tileIndex(int32_t layer, int32_t ring, int32_t phi);
0011   // Unpacks Layer number from the packed index
0012   int32_t tileLayer(int32_t index);
0013   // Unpacks Ring number from the packed index
0014   int32_t tileRing(int32_t index);
0015   // Unpacks Phi number from the packed index
0016   int32_t tilePhi(int32_t index);
0017   // Packs tile type and SiPM size into a single word (useful for XML files)
0018   int32_t tileProperty(int32_t, int32_t);
0019   // Unpacks tile type from the packed word
0020   int32_t tileType(int32_t);
0021   // Unpacks SiPM size from the packed word
0022   int32_t tileSiPM(int32_t);
0023   // Gets cassette number from phi position
0024   int32_t tileCassette(int32_t, int32_t, int32_t, int32_t);
0025   // Packs 3 information for usage in xml file
0026   int32_t tilePack(int32_t ly, int32_t k1, int32_t k2);
0027   // Unpacks thos three information from the packed word
0028   std::tuple<int32_t, int32_t, int32_t> tileUnpack(int32_t index);
0029   // Sees if the tile exists or not depending the HEX information in flat file
0030   bool tileExist(const int32_t* hex, int32_t zside, int32_t phi);
0031 };  // namespace HGCalTileIndex
0032 
0033 #endif