CMS 3D CMS Logo

HGCalCellUV.h
Go to the documentation of this file.
1 #ifndef Geometry_HGCalCommonData_HGCalCellUV_h
2 #define Geometry_HGCalCommonData_HGCalCellUV_h
3 
4 #include <cstdint>
5 #include <iterator>
6 #include <map>
8 
9 class HGCalCellUV {
10 public:
11  HGCalCellUV(double waferSize, double separation, int32_t nFine, int32_t nCoarse);
12 
13  std::pair<int32_t, int32_t> cellUVFromXY1(
14  double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug);
15 
16  std::pair<int32_t, int32_t> cellUVFromXY2(
17  double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug);
18 
19  std::pair<int32_t, int32_t> cellUVFromXY3(
20  double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug);
21 
22  std::pair<int32_t, int32_t> cellUVFromXY4(
23  double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug);
24 
25 private:
26  std::pair<int32_t, int32_t> cellUVFromXY4(double xloc,
27  double yloc,
28  int ncell,
29  double cellX,
30  double cellY,
31  double cellXTotal,
32  double cellYTotal,
33  std::map<std::pair<int, int>, std::pair<double, double> >& cellPos,
34  bool extend,
35  bool debug);
36 
37  static constexpr double sqrt3_ = 1.732050807568877; // std::sqrt(3.0) in double precision
38  static constexpr double sin60_ = 0.5 * sqrt3_;
39  static constexpr double cos60_ = 0.5;
40 
41  int32_t ncell_[2];
42  double cellX_[2], cellY_[2], cellXTotal_[2], cellYTotal_[2], waferSize;
43 
44  std::map<std::pair<int32_t, int32_t>, std::pair<double, double> > cellPosFine_[HGCalCell::cellPlacementTotal],
46 };
47 
48 #endif
double waferSize
Definition: HGCalCellUV.h:42
std::pair< int32_t, int32_t > cellUVFromXY2(double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug)
Definition: HGCalCellUV.cc:85
static constexpr double sqrt3_
Definition: HGCalCellUV.h:37
std::map< std::pair< int32_t, int32_t >, std::pair< double, double > > cellPosFine_[HGCalCell::cellPlacementTotal]
Definition: HGCalCellUV.h:44
static constexpr int32_t cellPlacementTotal
Definition: HGCalCell.h:26
double cellXTotal_[2]
Definition: HGCalCellUV.h:42
std::pair< int32_t, int32_t > cellUVFromXY3(double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug)
Definition: HGCalCellUV.cc:152
double cellYTotal_[2]
Definition: HGCalCellUV.h:42
double cellY_[2]
Definition: HGCalCellUV.h:42
double cellX_[2]
Definition: HGCalCellUV.h:42
std::pair< int32_t, int32_t > cellUVFromXY1(double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug)
Definition: HGCalCellUV.cc:45
static constexpr double cos60_
Definition: HGCalCellUV.h:39
#define debug
Definition: HDRShower.cc:19
int32_t ncell_[2]
Definition: HGCalCellUV.h:41
HGCalCellUV(double waferSize, double separation, int32_t nFine, int32_t nCoarse)
Definition: HGCalCellUV.cc:8
static constexpr double sin60_
Definition: HGCalCellUV.h:38
std::map< std::pair< int32_t, int32_t >, std::pair< double, double > > cellPosCoarse_[HGCalCell::cellPlacementTotal]
Definition: HGCalCellUV.h:44
std::pair< int32_t, int32_t > cellUVFromXY4(double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug)
Definition: HGCalCellUV.cc:220