File indexing completed on 2024-04-06 12:05:11
0001 #ifndef SiPixelDetId_PixelModuleName_H
0002 #define SiPixelDetId_PixelModuleName_H
0003
0004 #include <string>
0005 #include <iostream>
0006 #include <cstdint>
0007
0008
0009
0010
0011
0012 class PixelModuleName {
0013 public:
0014 enum ModuleType { v1x2, v1x5, v1x8, v2x3, v2x4, v2x5, v2x8 };
0015
0016 PixelModuleName(bool isBarrel) : barrel(isBarrel) {}
0017 virtual ~PixelModuleName() {}
0018
0019
0020 virtual bool isBarrel() const { return barrel; }
0021
0022 static bool isBarrel(uint32_t rawDetId) { return (1 == ((rawDetId >> 25) & 0x7)); }
0023
0024
0025 virtual std::string name() const = 0;
0026
0027
0028 virtual ModuleType moduleType() const = 0;
0029
0030
0031 virtual bool operator==(const PixelModuleName&) const = 0;
0032
0033 private:
0034 bool barrel;
0035 };
0036
0037 std::ostream& operator<<(std::ostream& out, const PixelModuleName::ModuleType& t);
0038 #endif