CMS 3D CMS Logo

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

#include <HGCMouseBite.h>

Public Member Functions

bool exclude (G4ThreeVector &point, int zside, int waferU, int waferV)
 
 HGCMouseBite (const HGCalDDDConstants &hgc, const std::vector< double > &angle, double maxLength, bool waferRotate)
 

Private Attributes

double cut_
 
const HGCalDDDConstantshgcons_
 
bool modeUV_
 
std::vector< std::pair< double, double > > projXY_
 
bool rot_
 

Detailed Description

Definition at line 9 of file HGCMouseBite.h.

Constructor & Destructor Documentation

◆ HGCMouseBite()

HGCMouseBite::HGCMouseBite ( const HGCalDDDConstants hgc,
const std::vector< double > &  angle,
double  maxLength,
bool  waferRotate 
)

Definition at line 9 of file HGCMouseBite.cc.

10  : hgcons_(hgc), cut_(maxL), rot_(rot) {
12  for (auto ang : angle) {
13  projXY_.push_back(std::pair<double, double>(cos(ang * CLHEP::deg), sin(ang * CLHEP::deg)));
14  }
15 #ifdef EDM_ML_DEBUG
16  edm::LogVerbatim("HGCSim") << "Creating HGCMosueBite with cut at " << cut_ << " with mode " << modeUV_ << " along "
17  << angle.size() << " axes";
18  for (unsigned int k = 0; k < angle.size(); ++k)
19  edm::LogVerbatim("HGCSim") << "Axis[" << k << "] " << angle[k] << " with projections " << projXY_[k].first << ":"
20  << projXY_[k].second;
21 #endif
22 }

References angle(), funct::cos(), cut_, hgcons_, dqmdumpme::k, modeUV_, projXY_, funct::sin(), and HGCalDDDConstants::waferHexagon8().

Member Function Documentation

◆ exclude()

bool HGCMouseBite::exclude ( G4ThreeVector &  point,
int  zside,
int  waferU,
int  waferV 
)

Definition at line 24 of file HGCMouseBite.cc.

24  {
25  bool check(false);
26  int lay = hgcons_.getLayer(point.z(), false);
27  std::pair<double, double> xy =
29  double xx = (zside > 0) ? xy.first : -xy.first;
30  double dx(0), dy(0);
31  if (rot_) {
32  dx = std::abs(point.y() - xy.second);
33  dy = std::abs(point.x() - xx);
34  } else {
35  dx = std::abs(point.x() - xx);
36  dy = std::abs(point.y() - xy.second);
37  }
38  for (auto proj : projXY_) {
39  double dist = dx * proj.first + dy * proj.second;
40  if (dist > cut_) {
41  check = true;
42  break;
43  }
44  }
45 #ifdef EDM_ML_DEBUG
46  edm::LogVerbatim("HGCSim") << "HGCMouseBite:: Point " << point << " zside " << zside << " wafer " << waferU << ":"
47  << waferV << " position " << xy.first << ":" << xx << ":" << xy.second << " dxy " << dx
48  << ":" << dy << " check " << check;
49 #endif
50  return check;
51 }

References funct::abs(), RPCNoise_example::check, cut_, PVValHelper::dx, PVValHelper::dy, HGCalDDDConstants::getLayer(), hgcons_, modeUV_, point, amptDefault_cfi::proj, projXY_, rot_, HGCalDDDConstants::waferPosition(), HGCalWaferIndex::waferU(), HGCalWaferIndex::waferV(), geometryCSVtoXML::xx, geometryCSVtoXML::xy, and ecaldqm::zside().

Member Data Documentation

◆ cut_

double HGCMouseBite::cut_
private

Definition at line 16 of file HGCMouseBite.h.

Referenced by exclude(), and HGCMouseBite().

◆ hgcons_

const HGCalDDDConstants& HGCMouseBite::hgcons_
private

Definition at line 15 of file HGCMouseBite.h.

Referenced by exclude(), and HGCMouseBite().

◆ modeUV_

bool HGCMouseBite::modeUV_
private

Definition at line 18 of file HGCMouseBite.h.

Referenced by exclude(), and HGCMouseBite().

◆ projXY_

std::vector<std::pair<double, double> > HGCMouseBite::projXY_
private

Definition at line 19 of file HGCMouseBite.h.

Referenced by exclude(), and HGCMouseBite().

◆ rot_

bool HGCMouseBite::rot_
private

Definition at line 17 of file HGCMouseBite.h.

Referenced by exclude().

HGCMouseBite::hgcons_
const HGCalDDDConstants & hgcons_
Definition: HGCMouseBite.h:15
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
HGCMouseBite::rot_
bool rot_
Definition: HGCMouseBite.h:17
HGCalWaferIndex::waferU
int32_t waferU(const int32_t index)
Definition: HGCalWaferIndex.cc:27
HGCalDDDConstants::waferHexagon8
bool waferHexagon8() const
Definition: HGCalDDDConstants.h:142
HGCMouseBite::cut_
double cut_
Definition: HGCMouseBite.h:16
HGCMouseBite::modeUV_
bool modeUV_
Definition: HGCMouseBite.h:18
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
RPCNoise_example.check
check
Definition: RPCNoise_example.py:71
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
HGCMouseBite::projXY_
std::vector< std::pair< double, double > > projXY_
Definition: HGCMouseBite.h:19
HGCalWaferIndex::waferV
int32_t waferV(const int32_t index)
Definition: HGCalWaferIndex.cc:32
dqmdumpme.k
k
Definition: dqmdumpme.py:60
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
amptDefault_cfi.proj
proj
Definition: amptDefault_cfi.py:13
PVValHelper::dy
Definition: PVValidationHelpers.h:50
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
HGCalDDDConstants::waferPosition
std::pair< double, double > waferPosition(int wafer, bool reco) const
Definition: HGCalDDDConstants.cc:1207
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
angle
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
HGCalDDDConstants::getLayer
int getLayer(double z, bool reco) const
Definition: HGCalDDDConstants.cc:355
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
point
*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
edm::Log
Definition: MessageLogger.h:70
PVValHelper::dx
Definition: PVValidationHelpers.h:49
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19