CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
HGCGuardRingPartial Class Reference

#include <HGCGuardRingPartial.h>

Public Member Functions

bool exclude (G4ThreeVector &point, int zside, int frontBack, int layer, int waferU, int waferV)
 
 HGCGuardRingPartial (const HGCalDDDConstants &hgc)
 

Static Public Member Functions

static bool insidePolygon (double x, double y, const std::vector< std::pair< double, double > > &xyv)
 

Private Attributes

double c22_
 
double c27_
 
const double guardRingOffset_
 
const HGCalDDDConstantshgcons_
 
const HGCalGeometryMode::GeometryMode modeUV_
 
double offset_
 
const bool v17OrLess_
 
const double waferSize_
 

Static Private Attributes

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}}
 
static constexpr std::array< double, 12 > cot_1
 
static constexpr double sqrt3_ = 1.732050807568877
 
static constexpr std::array< double, 12 > tan_1
 

Detailed Description

Definition at line 10 of file HGCGuardRingPartial.h.

Constructor & Destructor Documentation

◆ HGCGuardRingPartial()

HGCGuardRingPartial::HGCGuardRingPartial ( const HGCalDDDConstants hgc)

Definition at line 11 of file HGCGuardRingPartial.cc.

References HGCalTypes::c22, c22_, HGCalTypes::c22O, HGCalTypes::c27, c27_, HGCalTypes::c27O, guardRingOffset_, modeUV_, offset_, v17OrLess_, and waferSize_.

12  : hgcons_(hgc),
20 #ifdef EDM_ML_DEBUG
21  edm::LogVerbatim("HGCSim") << "Creating HGCGuardRingPartial with wafer size " << waferSize_ << ", Offsets "
22  << ":" << guardRingOffset_ << ":" << offset_ << ", and mode " << modeUV_
23  << " coefficients " << c22_ << ":" << c27_;
24 #endif
25 }
Log< level::Info, true > LogVerbatim
static constexpr double c27O
Definition: HGCalTypes.h:100
const double guardRingOffset_
const HGCalParameters * getParameter() const
static constexpr double c27
Definition: HGCalTypes.h:102
HGCalGeometryMode::GeometryMode geomMode() const
bool v17OrLess() const
const HGCalGeometryMode::GeometryMode modeUV_
static constexpr double c22O
Definition: HGCalTypes.h:96
static constexpr double c22
Definition: HGCalTypes.h:98
const HGCalDDDConstants & hgcons_
double waferSize(bool reco) const

Member Function Documentation

◆ exclude()

bool HGCGuardRingPartial::exclude ( G4ThreeVector &  point,
int  zside,
int  frontBack,
int  layer,
int  waferU,
int  waferV 
)

Definition at line 27 of file HGCGuardRingPartial.cc.

References funct::abs(), HGCalCell::cellPlacementIndex(), RPCNoise_example::check, PVValHelper::dx, PVValHelper::dy, HGCalWaferType::getOrient(), HGCalDDDConstants::getParameter(), HGCalWaferType::getPartial(), HGCalWaferType::getType(), HGCalGeometryMode::Hexagon8CalibCell, HGCalGeometryMode::Hexagon8Cassette, hgcons_, cuy::ii, nano_mu_digi_cff::layer, HGCalWaferMask::maskCut(), modeUV_, offset_, hgcalPerformanceValidation::orient, point, v17OrLess_, HGCalTypes::WaferFull, HGCalWaferIndex::waferIndex(), HGCalParameters::waferInfoMap_, HGCalTypes::WaferPartHDCount, HGCalTypes::WaferPartHDOffset, HGCalTypes::WaferPartLDCount, HGCalTypes::WaferPartLDOffset, waferSize_, HGCalWaferIndex::waferU(), HGCalWaferIndex::waferV(), and ecaldqm::zside().

Referenced by HGCalMouseBiteTester::analyze().

27  {
28  bool check(false);
33 #ifdef EDM_ML_DEBUG
34  edm::LogVerbatim("HGCSim") << "HGCGuardRingPatial:: Layer " << layer << " wafer " << waferU << ":" << waferV
35  << " index " << index << " partial " << partial << " type " << type;
36 #endif
37  if (partial == HGCalTypes::WaferFull) {
38  return (check);
39  } else if (partial < 0) {
40  return true;
41  } else {
43  int placement = HGCalCell::cellPlacementIndex(zside, frontBack, orient);
44  double dx = point.x();
45  double dy = point.y();
46 #ifdef EDM_ML_DEBUG
47  edm::LogVerbatim("HGCSim") << "HGCGuardRingPatial:: orient " << orient << " placement " << placement << " dx "
48  << dx << " dy " << dy;
49 #endif
50  if (type > 0) {
53  ii++) {
54  std::array<double, 4> criterion = HGCalWaferMask::maskCut(ii, placement, waferSize_, offset_, v17OrLess_);
55  check |= std::abs(criterion[0] * dy + criterion[1] * dx + criterion[2]) < criterion[3];
56  }
57  } else {
60  ii++) {
61  std::array<double, 4> criterion = HGCalWaferMask::maskCut(ii, placement, waferSize_, offset_, v17OrLess_);
62  check |= std::abs(criterion[0] * dy + criterion[1] * dx + criterion[2]) < criterion[3];
63  }
64  }
65  }
66 #ifdef EDM_ML_DEBUG
67  edm::LogVerbatim("HGCSim") << "HGCGuardRingPartial:: Point " << point << " zside " << zside << " layer " << layer
68  << " wafer " << waferU << ":" << waferV << " partial type " << partial << " type "
69  << type << " check " << check;
70 #endif
71  }
72  return check;
73 }
Log< level::Info, true > LogVerbatim
static int32_t cellPlacementIndex(int32_t iz, int32_t frontBack, int32_t orient)
Definition: HGCalCell.cc:237
static constexpr int32_t WaferPartLDOffset
Definition: HGCalTypes.h:57
static int getType(int index, const HGCalParameters::waferInfo_map &wafers)
const HGCalParameters * getParameter() const
int32_t waferU(const int32_t index)
static int getPartial(int index, const HGCalParameters::waferInfo_map &wafers)
int zside(DetId const &)
static int getOrient(int index, const HGCalParameters::waferInfo_map &wafers)
static constexpr int32_t WaferPartLDCount
Definition: HGCalTypes.h:59
const HGCalGeometryMode::GeometryMode modeUV_
static constexpr int32_t WaferFull
Definition: HGCalTypes.h:35
static std::array< double, 4 > maskCut(const int &part, const int &place, const double &waferSize, const double &offset, const bool &v17OrLess)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
ii
Definition: cuy.py:589
static constexpr int32_t WaferPartHDOffset
Definition: HGCalTypes.h:58
int32_t waferV(const int32_t index)
waferInfo_map waferInfoMap_
const HGCalDDDConstants & hgcons_
*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
static constexpr int32_t WaferPartHDCount
Definition: HGCalTypes.h:60

◆ insidePolygon()

static bool HGCGuardRingPartial::insidePolygon ( double  x,
double  y,
const std::vector< std::pair< double, double > > &  xyv 
)
static

Member Data Documentation

◆ c22_

double HGCGuardRingPartial::c22_
private

Definition at line 27 of file HGCGuardRingPartial.h.

Referenced by HGCGuardRingPartial().

◆ c27_

double HGCGuardRingPartial::c27_
private

Definition at line 27 of file HGCGuardRingPartial.h.

Referenced by HGCGuardRingPartial().

◆ cos_1

constexpr std::array<double, 12> HGCGuardRingPartial::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}}
staticprivate

Definition at line 24 of file HGCGuardRingPartial.h.

◆ cot_1

constexpr std::array<double, 12> HGCGuardRingPartial::cot_1
staticprivate
Initial value:
= {
{sqrt3_, -sqrt3_, 0.0, sqrt3_, -sqrt3_, 0.0, -sqrt3_, sqrt3_, 0.0, -sqrt3_, sqrt3_, 0.0}}

Definition at line 25 of file HGCGuardRingPartial.h.

◆ guardRingOffset_

const double HGCGuardRingPartial::guardRingOffset_
private

Definition at line 21 of file HGCGuardRingPartial.h.

Referenced by HGCGuardRingPartial().

◆ hgcons_

const HGCalDDDConstants& HGCGuardRingPartial::hgcons_
private

Definition at line 18 of file HGCGuardRingPartial.h.

Referenced by exclude().

◆ modeUV_

const HGCalGeometryMode::GeometryMode HGCGuardRingPartial::modeUV_
private

Definition at line 19 of file HGCGuardRingPartial.h.

Referenced by exclude(), and HGCGuardRingPartial().

◆ offset_

double HGCGuardRingPartial::offset_
private

Definition at line 27 of file HGCGuardRingPartial.h.

Referenced by exclude(), and HGCGuardRingPartial().

◆ sqrt3_

constexpr double HGCGuardRingPartial::sqrt3_ = 1.732050807568877
staticprivate

Definition at line 17 of file HGCGuardRingPartial.h.

◆ tan_1

constexpr std::array<double, 12> HGCGuardRingPartial::tan_1
staticprivate
Initial value:
= {
{-sqrt3_, sqrt3_, 0.0, -sqrt3_, sqrt3_, 0.0, sqrt3_, -sqrt3_, 0.0, sqrt3_, -sqrt3_, 0.0}}

Definition at line 22 of file HGCGuardRingPartial.h.

◆ v17OrLess_

const bool HGCGuardRingPartial::v17OrLess_
private

Definition at line 20 of file HGCGuardRingPartial.h.

Referenced by exclude(), and HGCGuardRingPartial().

◆ waferSize_

const double HGCGuardRingPartial::waferSize_
private

Definition at line 21 of file HGCGuardRingPartial.h.

Referenced by exclude(), and HGCGuardRingPartial().