CMS 3D CMS Logo

HGCalGeomTools.h
Go to the documentation of this file.
1 #ifndef Geometry_HGCalCommonData_HGCalGeomTools_h
2 #define Geometry_HGCalCommonData_HGCalGeomTools_h
3 
4 #include <cmath>
5 #include <cstdint>
6 #include <vector>
7 
9 public:
12 
13  enum WaferType {
14  WaferFull = 0,
15  WaferFive = 1,
18  WaferHalf = 4,
19  WaferSemi = 5,
22  };
23 
31  };
32 
33  static void radius(double zf,
34  double zb,
35  std::vector<double> const& zFront1,
36  std::vector<double> const& rFront1,
37  std::vector<double> const& slope1,
38  std::vector<double> const& zFront2,
39  std::vector<double> const& rFront2,
40  std::vector<double> const& slope2,
41  int flag,
42  std::vector<double>& zz,
43  std::vector<double>& rin,
44  std::vector<double>& rout);
45  static double radius(double z,
46  std::vector<double> const& zFront,
47  std::vector<double> const& rFront,
48  std::vector<double> const& slope);
49  static double radius(
50  double z, int layer0, int layerf, std::vector<double> const& zFront, std::vector<double> const& rFront);
51  std::pair<double, double> shiftXY(int waferPosition, double waferSize);
52  static double slope(double z, std::vector<double> const& zFront, std::vector<double> const& slope);
53  static std::pair<double, double> zradius(double z1,
54  double z2,
55  std::vector<double> const& zFront,
56  std::vector<double> const& rFront);
57  static std::pair<int32_t, int32_t> waferCorner(
58  double xpos, double ypos, double r, double R, double rMin, double rMax, bool oldBug = false);
59 
60 private:
61  static constexpr double tol_ = 0.0001;
62  double factor_;
63 };
64 
65 #endif
static void radius(double zf, double zb, std::vector< double > const &zFront1, std::vector< double > const &rFront1, std::vector< double > const &slope1, std::vector< double > const &zFront2, std::vector< double > const &rFront2, std::vector< double > const &slope2, int flag, std::vector< double > &zz, std::vector< double > &rin, std::vector< double > &rout)
static constexpr double tol_
static double slope(double z, std::vector< double > const &zFront, std::vector< double > const &slope)
static std::pair< int32_t, int32_t > waferCorner(double xpos, double ypos, double r, double R, double rMin, double rMax, bool oldBug=false)
static std::pair< double, double > zradius(double z1, double z2, std::vector< double > const &zFront, std::vector< double > const &rFront)
#define constexpr
std::pair< double, double > shiftXY(int waferPosition, double waferSize)