File indexing completed on 2023-03-24 02:59:09
0001 #ifndef HGCalCommonData_HGCalWaferMask_h
0002 #define HGCalCommonData_HGCalWaferMask_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include <cmath>
0014 #include <vector>
0015
0016 class HGCalWaferMask {
0017 public:
0018 HGCalWaferMask() = default;
0019
0020
0021 static bool maskCell(int u, int v, int N, int ncor, int fcor, int corners);
0022
0023 static bool goodCell(int u, int v, int N, int type, int rotn);
0024
0025 static bool goodCell(int u, int v, int waferType);
0026
0027
0028 static int getRotation(int zside, int type, int rotn);
0029
0030 static std::pair<int, int> getTypeMode(const double& xpos,
0031 const double& ypos,
0032 const double& delX,
0033 const double& delY,
0034 const double& rin,
0035 const double& rout,
0036 const int& waferType,
0037 const int& mode,
0038 bool debug = false);
0039
0040 static bool goodTypeMode(double xpos,
0041 double ypos,
0042 double delX,
0043 double delY,
0044 double rin,
0045 double rout,
0046 int part,
0047 int rotn,
0048 bool debug = false);
0049
0050
0051 static std::vector<std::pair<double, double> > waferXY(
0052 int part, int orient, int zside, double waferSize, double offset, double xpos, double ypos);
0053
0054
0055 static std::vector<std::pair<double, double> > waferXY(
0056 int part, int placement, double wafersize, double offset, double xpos, double ypos);
0057
0058 private:
0059 static constexpr double sqrt3_ = 1.732050807568877;
0060 static constexpr double sin_60_ = 0.5 * sqrt3_;
0061 static constexpr double cos_60_ = 0.5;
0062 static constexpr double tan_60_ = sqrt3_;
0063 };
0064
0065 #endif