File indexing completed on 2022-06-06 07:38:34
0001 #ifndef Geometry_HGCalCommonData_HGCalCellUV_h
0002 #define Geometry_HGCalCommonData_HGCalCellUV_h
0003
0004 #include <cstdint>
0005 #include <iterator>
0006 #include <map>
0007 #include "Geometry/HGCalCommonData/interface/HGCalCell.h"
0008
0009 class HGCalCellUV {
0010 public:
0011 HGCalCellUV(double waferSize, double separation, int32_t nFine, int32_t nCoarse);
0012
0013 std::pair<int32_t, int32_t> cellUVFromXY1(
0014 double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug) const;
0015
0016 std::pair<int32_t, int32_t> cellUVFromXY2(
0017 double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug) const;
0018
0019 std::pair<int32_t, int32_t> cellUVFromXY3(
0020 double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug) const;
0021
0022 std::pair<int32_t, int32_t> cellUVFromXY4(
0023 double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug);
0024
0025 std::pair<int32_t, int32_t> cellUVFromXY1(
0026 double xloc, double yloc, int32_t placement, int32_t type, int32_t partial, bool extend, bool debug) const;
0027
0028 private:
0029 std::pair<int32_t, int32_t> cellUVFromXY4(double xloc,
0030 double yloc,
0031 int ncell,
0032 double cellX,
0033 double cellY,
0034 double cellXTotal,
0035 double cellYTotal,
0036 std::map<std::pair<int, int>, std::pair<double, double> >& cellPos,
0037 bool extend,
0038 bool debug);
0039
0040 static constexpr double sqrt3_ = 1.732050807568877;
0041 static constexpr double sin60_ = 0.5 * sqrt3_;
0042 static constexpr double cos60_ = 0.5;
0043
0044 int32_t ncell_[2];
0045 double cellX_[2], cellY_[2], cellXTotal_[2], cellYTotal_[2], waferSize;
0046
0047 std::map<std::pair<int32_t, int32_t>, std::pair<double, double> > cellPosFine_[HGCalCell::cellPlacementTotal],
0048 cellPosCoarse_[HGCalCell::cellPlacementTotal];
0049 };
0050
0051 #endif