Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:29:13

0001 #ifndef Forward_TotemT2ScintNumberingScheme_h
0002 #define Forward_TotemT2ScintNumberingScheme_h 1
0003 
0004 #include <cstdint>
0005 
0006 class TotemT2ScintNumberingScheme {
0007 public:
0008   static constexpr uint32_t kTotemT2PhiMask = 0xF;
0009   static constexpr uint32_t kTotemT2LayerOffset = 4;
0010   static constexpr uint32_t kTotemT2LayerMask = 0x7;
0011   static constexpr uint32_t kTotemT2ZsideMask = 0x80;
0012 
0013   TotemT2ScintNumberingScheme() {}
0014 
0015   static uint32_t packID(const int& zside, const int& layer, const int& iphi);
0016   static int zside(const uint32_t& id) { return (id & kTotemT2ZsideMask) ? (1) : (-1); }
0017   static int layer(const uint32_t& id) { return ((id >> kTotemT2LayerOffset) & kTotemT2LayerMask); }
0018   static int iphi(const uint32_t& id) { return (id & kTotemT2PhiMask); }
0019 };
0020 
0021 #endif