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  static constexpr int k_allCorners = 6;
14  static constexpr int k_fiveCorners = 5;
15  static constexpr int k_fourCorners = 4;
16  static constexpr int k_threeCorners = 3;
17  static constexpr int k_twoCorners = 2;
18 
19  static void radius(double zf,
20  double zb,
21  std::vector<double> const& zFront1,
22  std::vector<double> const& rFront1,
23  std::vector<double> const& slope1,
24  std::vector<double> const& zFront2,
25  std::vector<double> const& rFront2,
26  std::vector<double> const& slope2,
27  int flag,
28  std::vector<double>& zz,
29  std::vector<double>& rin,
30  std::vector<double>& rout);
31  static double radius(double z,
32  std::vector<double> const& zFront,
33  std::vector<double> const& rFront,
34  std::vector<double> const& slope);
35  static double radius(
36  double z, int layer0, int layerf, std::vector<double> const& zFront, std::vector<double> const& rFront);
37  std::pair<double, double> shiftXY(int waferPosition, double waferSize) const;
38  static double slope(double z, std::vector<double> const& zFront, std::vector<double> const& slope);
39  static std::pair<double, double> zradius(double z1,
40  double z2,
41  std::vector<double> const& zFront,
42  std::vector<double> const& rFront);
43  static std::pair<int32_t, int32_t> waferCorner(
44  double xpos, double ypos, double r, double R, double rMin, double rMax, bool oldBug = false);
45 
46 private:
47  static constexpr double tol_ = 0.0001;
48  double factor_;
49 };
50 
51 #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 int k_fourCorners
static constexpr double tol_
static constexpr int k_twoCorners
static double slope(double z, std::vector< double > const &zFront, std::vector< double > const &slope)
std::pair< double, double > shiftXY(int waferPosition, double waferSize) const
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)
static constexpr int k_fiveCorners
static constexpr int k_threeCorners
static constexpr int k_allCorners