CMS 3D CMS Logo

HGCalWaferMask.h
Go to the documentation of this file.
1 #ifndef HGCalCommonData_HGCalWaferMask_h
2 #define HGCalCommonData_HGCalWaferMask_h
3 
13 #include <cmath>
14 #include <vector>
15 
17 public:
18  HGCalWaferMask() = default;
19 
20  // Decides if the cell is present or not from # oc corners (for V14)
21  static bool maskCell(int u, int v, int N, int ncor, int fcor, int corners);
22  // Decides if the cell is present or not from # oc corners (for V15, V16)
23  static bool goodCell(int u, int v, int N, int type, int rotn);
24  // Converts rotation index (as otained from flat file) depending on
25  // zside and type (for V15, V16)
26  static int getRotation(int zside, int type, int rotn);
27  // Get partial wafer type and orientation (for V15, V16)
28  static std::pair<int, int> getTypeMode(const double& xpos,
29  const double& ypos,
30  const double& delX,
31  const double& delY,
32  const double& rin,
33  const double& rout,
34  const int& waferType,
35  const int& mode,
36  bool debug = false);
37  // Checks partial wafer type and orientation (for V15, V16)
38  static bool goodTypeMode(double xpos,
39  double ypos,
40  double delX,
41  double delY,
42  double rin,
43  double rout,
44  int part,
45  int rotn,
46  bool debug = false);
47  // Gets the corners of the partial wafers from its type, orientation, zside
48  // (Good for V15, V16 geometries)
49  static std::vector<std::pair<double, double> > waferXY(
50  int part, int orient, int zside, double delX, double delY, double xpos, double ypos);
51  // Gets the corners of the partial wafers from its type, placement index
52  // (Good for V17 geometry)
53  static std::vector<std::pair<double, double> > waferXY(
54  int part, int placement, double delX, double delY, double xpos, double ypos);
55 
56  static constexpr int k_OffsetRotation = 10;
57 };
58 
59 #endif
static std::vector< std::pair< double, double > > waferXY(int part, int orient, int zside, double delX, double delY, double xpos, double ypos)
static bool goodCell(int u, int v, int N, int type, int rotn)
int zside(DetId const &)
static int getRotation(int zside, int type, int rotn)
static bool goodTypeMode(double xpos, double ypos, double delX, double delY, double rin, double rout, int part, int rotn, bool debug=false)
#define debug
Definition: HDRShower.cc:19
#define N
Definition: blowfish.cc:9
part
Definition: HCALResponse.h:20
static std::pair< int, int > getTypeMode(const double &xpos, const double &ypos, const double &delX, const double &delY, const double &rin, const double &rout, const int &waferType, const int &mode, bool debug=false)
static constexpr int k_OffsetRotation
HGCalWaferMask()=default
static bool maskCell(int u, int v, int N, int ncor, int fcor, int corners)