Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-05-25 00:54:19

0001 #ifndef SimG4CMS_HGCGuardRing_h
0002 #define SimG4CMS_HGCGuardRing_h
0003 
0004 #include "Geometry/HGCalCommonData/interface/HGCalDDDConstants.h"
0005 #include "G4ThreeVector.hh"
0006 
0007 #include <vector>
0008 
0009 class HGCGuardRing {
0010 public:
0011   HGCGuardRing(const HGCalDDDConstants& hgc);
0012   bool exclude(G4ThreeVector& point, int zside, int frontBack, int layer, int waferU, int waferV);
0013   static bool insidePolygon(double x, double y, const std::vector<std::pair<double, double> >& xyv);
0014 
0015 private:
0016   static constexpr double sqrt3_ = 1.732050807568877;  // std::sqrt(3.0) in double precision
0017   const HGCalDDDConstants& hgcons_;
0018   const HGCalGeometryMode::GeometryMode modeUV_;
0019   const double waferSize_, sensorSizeOffset_, guardRingOffset_;
0020   double offset_, xmax_, ymax_;
0021 };
0022 
0023 #endif  // HGCGuardRing_h