Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:53

0001 #ifndef Geometry_HGCalCommonData_HGCalWaferIndex_h
0002 #define Geometry_HGCalCommonData_HGCalWaferIndex_h
0003 
0004 #include <cmath>
0005 #include <cstdint>
0006 
0007 namespace HGCalWaferIndex {
0008   // Packs layer, u, v indices into a single word (useful for xml definition)
0009   int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old = false);
0010   // Unpacks the layer number from the packed index
0011   int32_t waferLayer(const int32_t index);
0012   // Unpacks wafer U from the packed index
0013   int32_t waferU(const int32_t index);
0014   // Unpacks wafer V from the packed index
0015   int32_t waferV(const int32_t index);
0016   // Gets the used part of the index (Layer:u:v)
0017   int32_t waferCopy(const int32_t index);
0018   // Finds the index format (old:false or new:true)
0019   bool waferFormat(const int32_t index);
0020 };  // namespace HGCalWaferIndex
0021 
0022 #endif