CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HGCalCell.h
Go to the documentation of this file.
1 #ifndef Geometry_HGCalCommonData_HGCalCell_h
2 #define Geometry_HGCalCommonData_HGCalCell_h
3 
4 #include <cmath>
5 #include <cstdint>
6 
7 class HGCalCell {
8 public:
9  HGCalCell(double waferSize, int32_t nFine, int32_t nCoarse);
10 
11  static constexpr int32_t waferOrient0 = 0;
12  static constexpr int32_t waferOrient1 = 1;
13  static constexpr int32_t waferOrient2 = 2;
14  static constexpr int32_t waferOrient3 = 3;
15  static constexpr int32_t waferOrient4 = 4;
16  static constexpr int32_t waferOrient5 = 5;
17 
18  static constexpr int32_t cellPlacementIndex0 = 0;
19  static constexpr int32_t cellPlacementIndex1 = 1;
20  static constexpr int32_t cellPlacementIndex2 = 2;
21  static constexpr int32_t cellPlacementIndex3 = 3;
22  static constexpr int32_t cellPlacementIndex4 = 4;
23  static constexpr int32_t cellPlacementIndex5 = 5;
24  static constexpr int32_t cellPlacementIndex6 = 6;
25  static constexpr int32_t cellPlacementIndex7 = 7;
26  static constexpr int32_t cellPlacementIndex8 = 8;
27  static constexpr int32_t cellPlacementIndex9 = 9;
28  static constexpr int32_t cellPlacementIndex10 = 10;
29  static constexpr int32_t cellPlacementIndex11 = 11;
30 
31  static constexpr int32_t cellPlacementExtra = 6;
32  static constexpr int32_t cellPlacementOld = 7;
33  static constexpr int32_t cellPlacementTotal = 12;
34 
35  static constexpr int32_t fullCell = 0;
36  static constexpr int32_t cornerCell = 1;
37  static constexpr int32_t truncatedCell = 2;
38  static constexpr int32_t extendedCell = 3;
39 
40  std::pair<double, double> HGCalCellUV2XY1(int32_t u, int32_t v, int32_t placementIndex, int32_t type);
41  std::pair<double, double> HGCalCellUV2XY2(int32_t u, int32_t v, int32_t placementIndex, int32_t type);
42  std::pair<int32_t, int32_t> HGCalCellUV2Cell(int32_t u, int32_t v, int32_t placementIndex, int32_t type);
43  static int32_t HGCalCellPlacementIndex(int32_t iz, int32_t fwdBack, int32_t orient);
44 
45 private:
46  const double sqrt3By2_ = (0.5 * std::sqrt(3.0));
47  int32_t ncell_[2];
48  double cellX_[2], cellY_[2];
49 };
50 
51 #endif
static constexpr int32_t fullCell
Definition: HGCalCell.h:35
static constexpr int32_t cellPlacementOld
Definition: HGCalCell.h:32
const double sqrt3By2_
Definition: HGCalCell.h:46
std::pair< int32_t, int32_t > HGCalCellUV2Cell(int32_t u, int32_t v, int32_t placementIndex, int32_t type)
Definition: HGCalCell.cc:94
static constexpr int32_t cellPlacementIndex8
Definition: HGCalCell.h:26
static constexpr int32_t cellPlacementTotal
Definition: HGCalCell.h:33
static constexpr int32_t cellPlacementIndex3
Definition: HGCalCell.h:21
int32_t ncell_[2]
Definition: HGCalCell.h:47
static constexpr int32_t waferOrient5
Definition: HGCalCell.h:16
static constexpr int32_t cellPlacementIndex10
Definition: HGCalCell.h:28
static constexpr int32_t cellPlacementIndex0
Definition: HGCalCell.h:18
std::pair< double, double > HGCalCellUV2XY2(int32_t u, int32_t v, int32_t placementIndex, int32_t type)
Definition: HGCalCell.cc:70
T sqrt(T t)
Definition: SSEVec.h:19
static constexpr int32_t cellPlacementIndex9
Definition: HGCalCell.h:27
static constexpr int32_t waferOrient1
Definition: HGCalCell.h:12
static constexpr int32_t cellPlacementIndex5
Definition: HGCalCell.h:23
static int32_t HGCalCellPlacementIndex(int32_t iz, int32_t fwdBack, int32_t orient)
Definition: HGCalCell.cc:230
HGCalCell(double waferSize, int32_t nFine, int32_t nCoarse)
Definition: HGCalCell.cc:4
std::pair< double, double > HGCalCellUV2XY1(int32_t u, int32_t v, int32_t placementIndex, int32_t type)
Definition: HGCalCell.cc:13
static constexpr int32_t cellPlacementIndex7
Definition: HGCalCell.h:25
static constexpr int32_t truncatedCell
Definition: HGCalCell.h:37
static constexpr int32_t waferOrient3
Definition: HGCalCell.h:14
static constexpr int32_t extendedCell
Definition: HGCalCell.h:38
static constexpr int32_t cellPlacementIndex11
Definition: HGCalCell.h:29
static constexpr int32_t waferOrient4
Definition: HGCalCell.h:15
static constexpr int32_t cornerCell
Definition: HGCalCell.h:36
static constexpr int32_t waferOrient0
Definition: HGCalCell.h:11
static constexpr int32_t cellPlacementIndex4
Definition: HGCalCell.h:22
static constexpr int32_t cellPlacementIndex1
Definition: HGCalCell.h:19
double cellX_[2]
Definition: HGCalCell.h:48
static constexpr int32_t cellPlacementIndex6
Definition: HGCalCell.h:24
double cellY_[2]
Definition: HGCalCell.h:48
static constexpr int32_t cellPlacementIndex2
Definition: HGCalCell.h:20
static constexpr int32_t waferOrient2
Definition: HGCalCell.h:13
static constexpr int32_t cellPlacementExtra
Definition: HGCalCell.h:31