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

const double guardRingOffset_
 
const HGCalDDDConstantshgcons_
 
const HGCalGeometryMode::GeometryMode modeUV_
 
double offset_
 
const double waferSize_
 
double xmax_
 
double ymax_
 

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 10 of file HGCGuardRingPartial.cc.

References guardRingOffset_, modeUV_, offset_, and waferSize_.

11  : hgcons_(hgc),
16 #ifdef EDM_ML_DEBUG
17  edm::LogVerbatim("HGCSim") << "Creating HGCGuardRingPartial with wafer size " << waferSize_ << ", Offsets "
18  << ":" << guardRingOffset_ << ":" << offset_ << ", and mode " << modeUV_;
19 #endif
20 }
Log< level::Info, true > LogVerbatim
const double guardRingOffset_
const HGCalParameters * getParameter() const
HGCalGeometryMode::GeometryMode geomMode() const
const HGCalGeometryMode::GeometryMode modeUV_
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 22 of file HGCGuardRingPartial.cc.

References funct::abs(), HGCalTypes::c10, HGCalTypes::c22, HGCalTypes::c27, HGCalCell::cellPlacementIndex(), RPCNoise_example::check, cos_1, cot_1, PVValHelper::dx, PVValHelper::dy, HGCalWaferType::getOrient(), HGCalDDDConstants::getParameter(), HGCalWaferType::getPartial(), HGCalWaferType::getType(), HGCalGeometryMode::Hexagon8Cassette, hgcons_, nano_mu_digi_cff::layer, modeUV_, offset_, hgcalPerformanceValidation::orient, point, sqrt3_, tan_1, HGCalTypes::WaferFull, HGCalWaferIndex::waferIndex(), HGCalParameters::waferInfoMap_, waferSize_, HGCalWaferIndex::waferU(), HGCalWaferIndex::waferV(), and ecaldqm::zside().

22  {
23  bool check(false);
28  if (partial == HGCalTypes::WaferFull) {
29  return (check);
30  } else {
32  int placement = HGCalCell::cellPlacementIndex(zside, frontBack, orient);
33  double delX = 0.5 * waferSize_;
34  double delY = 2 * delX / sqrt3_;
35  double dx = (zside > 0) ? -point.x() : point.x();
36  double dy = point.y();
37  double tresh = std::abs(offset_ / cos_1[placement]);
38  if (type > 0) {
39  check |= std::abs(dy - (dx * tan_1[placement])) < tresh;
40  check |= std::abs(dy - (dx * tan_1[placement]) + ((HGCalTypes::c10 * delY * 0.5) / cos_1[placement])) < tresh;
41  check |= std::abs(dy * cot_1[placement] - (dx)) < tresh;
42  } else {
43  check |= std::abs((dy * cot_1[placement]) - dx + ((HGCalTypes::c22 * delX) / cos_1[placement])) < tresh;
44  check |= std::abs(dy - (dx * tan_1[placement]) - ((HGCalTypes::c27 * delY) / cos_1[placement])) < tresh;
45  check |= std::abs(dy - (dx * tan_1[placement]) + ((HGCalTypes::c27 * delY) / cos_1[placement])) < tresh;
46  }
47  }
48 #ifdef EDM_ML_DEBUG
49  edm::LogVerbatim("HGCSim") << "HGCGuardRingPartial:: Point " << point << " zside " << zside << " layer " << layer
50  << " wafer " << waferU << ":" << waferV << " partial type " << partial << " type "
51  << type << " check " << check;
52 #endif
53  }
54  return check;
55 }
Log< level::Info, true > LogVerbatim
static int32_t cellPlacementIndex(int32_t iz, int32_t frontBack, int32_t orient)
Definition: HGCalCell.cc:237
static int getType(int index, const HGCalParameters::waferInfo_map &wafers)
static constexpr double sqrt3_
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 constexpr double c27
Definition: HGCalTypes.h:96
static constexpr double c10
Definition: HGCalTypes.h:102
static int getOrient(int index, const HGCalParameters::waferInfo_map &wafers)
const HGCalGeometryMode::GeometryMode modeUV_
static constexpr int32_t WaferFull
Definition: HGCalTypes.h:35
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static constexpr std::array< double, 12 > cot_1
int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
static constexpr std::array< double, 12 > tan_1
int32_t waferV(const int32_t index)
static constexpr double c22
Definition: HGCalTypes.h:94
waferInfo_map waferInfoMap_
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

◆ insidePolygon()

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

Member Data Documentation

◆ 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 23 of file HGCGuardRingPartial.h.

Referenced by exclude().

◆ 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 24 of file HGCGuardRingPartial.h.

Referenced by exclude().

◆ guardRingOffset_

const double HGCGuardRingPartial::guardRingOffset_
private

Definition at line 20 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 26 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.

Referenced by exclude().

◆ 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 21 of file HGCGuardRingPartial.h.

Referenced by exclude().

◆ waferSize_

const double HGCGuardRingPartial::waferSize_
private

Definition at line 20 of file HGCGuardRingPartial.h.

Referenced by exclude(), and HGCGuardRingPartial().

◆ xmax_

double HGCGuardRingPartial::xmax_
private

Definition at line 26 of file HGCGuardRingPartial.h.

◆ ymax_

double HGCGuardRingPartial::ymax_
private

Definition at line 26 of file HGCGuardRingPartial.h.