File indexing completed on 2023-10-25 09:49:38
0001 #ifndef Geometry_HGCalCommonData_HGCalGeomRotation_h
0002 #define Geometry_HGCalCommonData_HGCalGeomRotation_h
0003
0004 class HGCalGeomRotation {
0005 public:
0006 enum class SectorType { Sector120Degrees, Sector60Degrees };
0007 enum class WaferCentring { WaferCentred, CornerCentredY, CornerCentredMercedes };
0008
0009 HGCalGeomRotation(SectorType sectorType) { sectorType_ = sectorType; };
0010 ~HGCalGeomRotation() = default;
0011
0012 void uvMappingFromSector0(WaferCentring waferCentring, int& moduleU, int& moduleV, unsigned sector) const;
0013 unsigned uvMappingToSector0(WaferCentring waferCentring, int& moduleU, int& moduleV) const;
0014
0015 private:
0016 void uvMappingFrom120DegreeSector0(WaferCentring waferCentring, int& moduleU, int& moduleV, unsigned sector) const;
0017 void uvMappingFrom60DegreeSector0(WaferCentring waferCentring, int& moduleU, int& moduleV, unsigned sector) const;
0018
0019 unsigned uvMappingTo120DegreeSector0(WaferCentring waferCentring, int& moduleU, int& moduleV) const;
0020 unsigned uvMappingTo60DegreeSector0(WaferCentring waferCentring, int& moduleU, int& moduleV) const;
0021
0022 void RotateModule60DegreesAnticlockwise(int& moduleU, int& moduleV) const;
0023 void RotateModule60DegreesClockwise(int& moduleU, int& moduleV) const;
0024 void RotateModule120DegreesAnticlockwise(int& moduleU, int& moduleV, int offset) const;
0025 void RotateModule120DegreesClockwise(int& moduleU, int& moduleV, int offset) const;
0026
0027 SectorType sectorType_;
0028 };
0029
0030 #endif