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 ( const HGCalDDDConstants hgc,
const std::vector< double > &  angle,
double  maxLength,
bool  waferRotate 
)

Definition at line 9 of file HGCMouseBite.cc.

References funct::cos(), cut_, HGCalDDDConstants::geomMode(), HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, hgcons_, gen::k, modeUV_, projXY_, and funct::sin().

11  : hgcons_(hgc), cut_(maxL), rot_(rot) {
12 
15  for (auto ang : angle) {
16  projXY_.push_back(std::pair<double,double>(cos(ang*CLHEP::deg),sin(ang*CLHEP::deg)));
17  }
18 #ifdef EDM_ML_DEBUG
19  edm::LogVerbatim("HGCSim") << "Creating HGCMosueBite with cut at " << cut_
20  << " with mode " << modeUV_ << " along "
21  << angle.size() << " axes";
22  for (unsigned int k=0; k<angle.size(); ++k)
23  edm::LogVerbatim("HGCSim") << "Axis[" << k << "] " << angle[k]
24  << " with projections " << projXY_[k].first
25  << ":" << projXY_[k].second;
26 #endif
27 }
std::vector< std::pair< double, double > > projXY_
Definition: HGCMouseBite.h:24
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
HGCalGeometryMode::GeometryMode geomMode() const
const HGCalDDDConstants & hgcons_
Definition: HGCMouseBite.h:20
int k[5][pyjets_maxn]
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11

Member Function Documentation

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

Definition at line 29 of file HGCMouseBite.cc.

References funct::abs(), trackerTree::check(), cut_, PVValHelper::dx, PVValHelper::dy, hgcons_, modeUV_, projXY_, rot_, HGCalDDDConstants::waferPosition(), geometryCSVtoXML::xx, and geometryCSVtoXML::xy.

30  {
31  bool check(false);
32  std::pair<double,double> xy = (modeUV_ ?
33  hgcons_.waferPosition(waferU,waferV,false) :
34  hgcons_.waferPosition(waferU,false));
35  double xx = (zside > 0) ? xy.first : -xy.first;
36  double dx(0), dy(0);
37  if (rot_) {
38  dx = std::abs(point.y() - xy.second);
39  dy = std::abs(point.x() - xx);
40  } else {
41  dx = std::abs(point.x() - xx);
42  dy = std::abs(point.y() - xy.second);
43  }
44  for (auto proj : projXY_) {
45  double dist = dx*proj.first + dy*proj.second;
46  if (dist > cut_) {check = true; break;}
47  }
48 #ifdef EDM_ML_DEBUG
49  edm::LogVerbatim("HGCSim") << "HGCMouseBite:: Point " << point << " zside "
50  << zside << " wafer " << waferU << ":" << waferV
51  << " position " << xy.first << ":" << xx << ":"
52  << xy.second << " dxy " << dx << ":" << dy
53  << " check " << check;
54 #endif
55  return check;
56 }
std::vector< std::pair< double, double > > projXY_
Definition: HGCMouseBite.h:24
int zside(DetId const &)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const HGCalDDDConstants & hgcons_
Definition: HGCMouseBite.h:20
std::pair< double, double > waferPosition(int wafer, bool reco) const
def check(config)
Definition: trackerTree.py:14
*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

Member Data Documentation

double HGCMouseBite::cut_
private

Definition at line 21 of file HGCMouseBite.h.

Referenced by exclude(), and HGCMouseBite().

const HGCalDDDConstants& HGCMouseBite::hgcons_
private

Definition at line 20 of file HGCMouseBite.h.

Referenced by exclude(), and HGCMouseBite().

bool HGCMouseBite::modeUV_
private

Definition at line 23 of file HGCMouseBite.h.

Referenced by exclude(), and HGCMouseBite().

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

Definition at line 24 of file HGCMouseBite.h.

Referenced by exclude(), and HGCMouseBite().

bool HGCMouseBite::rot_
private

Definition at line 22 of file HGCMouseBite.h.

Referenced by exclude().