CMS 3D CMS Logo

HGCGuardRingPartial.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_HGCGuardRingPartial_h
2 #define SimG4CMS_HGCGuardRingPartial_h
3 
5 #include "G4ThreeVector.hh"
6 
7 #include <vector>
8 #include <array>
9 
11 public:
13  bool exclude(G4ThreeVector& point, int zside, int frontBack, int layer, int waferU, int waferV);
14  static bool insidePolygon(double x, double y, const std::vector<std::pair<double, double> >& xyv);
15 
16 private:
17  static constexpr double sqrt3_ = 1.732050807568877; // std::sqrt(3.0) in double precision
21  static constexpr std::array<double, 12> tan_1 = {
22  {-sqrt3_, sqrt3_, 0.0, -sqrt3_, sqrt3_, 0.0, sqrt3_, -sqrt3_, 0.0, sqrt3_, -sqrt3_, 0.0}};
23  static constexpr std::array<double, 12> cos_1 = {{0.5, -0.5, -1.0, -0.5, 0.5, 1.0, -0.5, 0.5, 1.0, 0.5, -0.5, -1.0}};
24  static constexpr std::array<double, 12> cot_1 = {
25  {sqrt3_, -sqrt3_, 0.0, sqrt3_, -sqrt3_, 0.0, -sqrt3_, sqrt3_, 0.0, -sqrt3_, sqrt3_, 0.0}};
26  double offset_, xmax_, ymax_;
27 };
28 
29 #endif // HGCGuardRing_h
const double guardRingOffset_
static constexpr double sqrt3_
int32_t waferU(const int32_t index)
int zside(DetId const &)
const HGCalGeometryMode::GeometryMode modeUV_
HGCGuardRingPartial(const HGCalDDDConstants &hgc)
static constexpr std::array< double, 12 > cot_1
static bool insidePolygon(double x, double y, const std::vector< std::pair< double, double > > &xyv)
static constexpr std::array< double, 12 > tan_1
int32_t waferV(const int32_t index)
bool exclude(G4ThreeVector &point, int zside, int frontBack, int layer, int waferU, int waferV)
const HGCalDDDConstants & hgcons_
static constexpr std::array< double, 12 > cos_1
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5