Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:53

0001 #ifndef Geometry_HGCalCommonData_HGCalGeomTools_h
0002 #define Geometry_HGCalCommonData_HGCalGeomTools_h
0003 
0004 #include <cmath>
0005 #include <cstdint>
0006 #include <vector>
0007 
0008 class HGCalGeomTools {
0009 public:
0010   HGCalGeomTools();
0011   ~HGCalGeomTools() = default;
0012 
0013   static constexpr int k_allCorners = 6;
0014   static constexpr int k_fiveCorners = 5;
0015   static constexpr int k_fourCorners = 4;
0016   static constexpr int k_threeCorners = 3;
0017   static constexpr int k_twoCorners = 2;
0018 
0019   static void radius(double zf,
0020                      double zb,
0021                      std::vector<double> const& zFront1,
0022                      std::vector<double> const& rFront1,
0023                      std::vector<double> const& slope1,
0024                      std::vector<double> const& zFront2,
0025                      std::vector<double> const& rFront2,
0026                      std::vector<double> const& slope2,
0027                      int flag,
0028                      std::vector<double>& zz,
0029                      std::vector<double>& rin,
0030                      std::vector<double>& rout);
0031   static double radius(double z,
0032                        std::vector<double> const& zFront,
0033                        std::vector<double> const& rFront,
0034                        std::vector<double> const& slope);
0035   static double radius(
0036       double z, int layer0, int layerf, std::vector<double> const& zFront, std::vector<double> const& rFront);
0037   std::pair<double, double> shiftXY(int waferPosition, double waferSize) const;
0038   static double slope(double z, std::vector<double> const& zFront, std::vector<double> const& slope);
0039   static std::pair<double, double> zradius(double z1,
0040                                            double z2,
0041                                            std::vector<double> const& zFront,
0042                                            std::vector<double> const& rFront);
0043   static std::pair<int32_t, int32_t> waferCorner(
0044       double xpos, double ypos, double r, double R, double rMin, double rMax, bool oldBug = false);
0045 
0046 private:
0047   static constexpr double tol_ = 0.0001;
0048   double factor_;
0049 };
0050 
0051 #endif