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

Private Attributes

double cut_
 
const HGCalDDDConstantshgcons_
 
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(), gather_cfg::cout, cut_, plotBeamSpotDB::first, gen::k, projXY_, edm::second(), and funct::sin().

11  : hgcons_(hgc), cut_(maxL), rot_(rot) {
12 
13  for (auto ang : angle) {
14  projXY_.push_back(std::pair<double,double>(cos(ang*CLHEP::deg),sin(ang*CLHEP::deg)));
15  }
16 #ifdef EDM_ML_DEBUG
17  std::cout << "Creating HGCMosueBite with cut at " << cut_ << " along "
18  << angle.size() << " axes" << std::endl;
19  for (unsigned int k=0; k<angle.size(); ++k)
20  std::cout << "Axis[" << k << "] " << angle[k] << " with projections "
21  << projXY_[k].first << ":" << projXY_[k].second << std::endl;
22 #endif
23 }
std::vector< std::pair< double, double > > projXY_
Definition: HGCMouseBite.h:22
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
U second(std::pair< T, U > const &p)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
const HGCalDDDConstants & hgcons_
Definition: HGCMouseBite.h:19
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  wafer 
)

Definition at line 25 of file HGCMouseBite.cc.

References funct::abs(), trackerTree::check(), gather_cfg::cout, cut_, hgcons_, projXY_, rot_, HGCalDDDConstants::waferPosition(), geometryCSVtoXML::xx, and geometryCSVtoXML::xy.

Referenced by HGCSD::setDetUnitId().

25  {
26  bool check(false);
27  std::pair<double,double> xy = hgcons_.waferPosition(wafer,false);
28  double xx = (zside > 0) ? xy.first : -xy.first;
29  double dx(0), dy(0);
30  if (rot_) {
31  dx = std::abs(point.y() - xy.second);
32  dy = std::abs(point.x() - xx);
33  } else {
34  dx = std::abs(point.x() - xx);
35  dy = std::abs(point.y() - xy.second);
36  }
37  for (auto proj : projXY_) {
38  double dist = dx*proj.first + dy*proj.second;
39  if (dist > cut_) {check = true; break;}
40  }
41 #ifdef EDM_ML_DEBUG
42  std::cout << "HGCMouseBite:: Point " << point << " zside " << zside
43  << " wafer " << wafer << " position " << xy.first << ":" << xx
44  << ":" << xy.second << " dxy " << dx << ":" << dy << " check "
45  << check << std::endl;
46 #endif
47  return check;
48 }
std::vector< std::pair< double, double > > projXY_
Definition: HGCMouseBite.h:22
std::pair< double, double > waferPosition(int wafer, bool reco=true) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const HGCalDDDConstants & hgcons_
Definition: HGCMouseBite.h:19
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 20 of file HGCMouseBite.h.

Referenced by exclude(), and HGCMouseBite().

const HGCalDDDConstants& HGCMouseBite::hgcons_
private

Definition at line 19 of file HGCMouseBite.h.

Referenced by exclude().

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

Definition at line 22 of file HGCMouseBite.h.

Referenced by exclude(), and HGCMouseBite().

bool HGCMouseBite::rot_
private

Definition at line 21 of file HGCMouseBite.h.

Referenced by exclude().