File indexing completed on 2024-04-06 12:14:53
0001 #ifndef HGCalCommonData_HGCalWaferType_h
0002 #define HGCalCommonData_HGCalWaferType_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "Geometry/HGCalCommonData/interface/HGCalParameters.h"
0017 #include <cmath>
0018 #include <vector>
0019
0020 class HGCalWaferType {
0021 public:
0022 HGCalWaferType(const std::vector<double>& rad100,
0023 const std::vector<double>& rad200,
0024 double waferSize,
0025 double zMin,
0026 int choice,
0027 unsigned int cutValue,
0028 double cutFracArea);
0029 ~HGCalWaferType() = default;
0030
0031 static int getCassette(int index, const HGCalParameters::waferInfo_map& wafers);
0032 static int getOrient(int index, const HGCalParameters::waferInfo_map& wafers);
0033 static int getPartial(int index, const HGCalParameters::waferInfo_map& wafers);
0034 static int getType(int index, const HGCalParameters::waferInfo_map& wafers);
0035 static int getType(int index, const std::vector<int>& indices, const std::vector<int>& types);
0036 int getType(double xpos, double ypos, double zpos);
0037 std::pair<double, double> rLimits(double zpos);
0038
0039 private:
0040 double areaPolygon(std::vector<double> const&, std::vector<double> const&);
0041 std::pair<double, double> intersection(
0042 int, int, std::vector<double> const&, std::vector<double> const&, double xp, double yp, double rr);
0043
0044 const double sqrt3_ = 1.0 / std::sqrt(3.0);
0045 const std::vector<double> rad100_;
0046 const std::vector<double> rad200_;
0047 const double waferSize_;
0048 const double zMin_;
0049 const int choice_;
0050 const unsigned int cutValue_;
0051 const double cutFracArea_;
0052 double r_, R_;
0053 };
0054
0055 #endif