CMS 3D CMS Logo

TotemT2ScintNumberingScheme.h
Go to the documentation of this file.
1 #ifndef Forward_TotemT2ScintNumberingScheme_h
2 #define Forward_TotemT2ScintNumberingScheme_h 1
3 
4 #include <cstdint>
5 
7 public:
8  static constexpr uint32_t kTotemT2PhiMask = 0xF;
9  static constexpr uint32_t kTotemT2LayerOffset = 4;
10  static constexpr uint32_t kTotemT2LayerMask = 0x7;
11  static constexpr uint32_t kTotemT2ZsideMask = 0x80;
12 
14 
15  static uint32_t packID(const int& zside, const int& layer, const int& iphi);
16  static int zside(const uint32_t& id) { return (id & kTotemT2ZsideMask) ? (1) : (-1); }
17  static int layer(const uint32_t& id) { return ((id >> kTotemT2LayerOffset) & kTotemT2LayerMask); }
18  static int iphi(const uint32_t& id) { return (id & kTotemT2PhiMask); }
19 };
20 
21 #endif
TotemT2ScintNumberingScheme::packID
static uint32_t packID(const int &zside, const int &layer, const int &iphi)
Definition: TotemT2ScintNumberingScheme.cc:3
TotemT2ScintNumberingScheme::kTotemT2PhiMask
static constexpr uint32_t kTotemT2PhiMask
Definition: TotemT2ScintNumberingScheme.h:8
TotemT2ScintNumberingScheme::kTotemT2ZsideMask
static constexpr uint32_t kTotemT2ZsideMask
Definition: TotemT2ScintNumberingScheme.h:11
TotemT2ScintNumberingScheme::iphi
static int iphi(const uint32_t &id)
Definition: TotemT2ScintNumberingScheme.h:18
TotemT2ScintNumberingScheme::zside
static int zside(const uint32_t &id)
Definition: TotemT2ScintNumberingScheme.h:16
TotemT2ScintNumberingScheme::kTotemT2LayerOffset
static constexpr uint32_t kTotemT2LayerOffset
Definition: TotemT2ScintNumberingScheme.h:9
TotemT2ScintNumberingScheme::layer
static int layer(const uint32_t &id)
Definition: TotemT2ScintNumberingScheme.h:17
TotemT2ScintNumberingScheme::kTotemT2LayerMask
static constexpr uint32_t kTotemT2LayerMask
Definition: TotemT2ScintNumberingScheme.h:10
TotemT2ScintNumberingScheme::TotemT2ScintNumberingScheme
TotemT2ScintNumberingScheme()
Definition: TotemT2ScintNumberingScheme.h:13
TotemT2ScintNumberingScheme
Definition: TotemT2ScintNumberingScheme.h:6