#include <HGCalMouseBite.h>
Definition at line 13 of file HGCalMouseBite.h.
HGCalMouseBite::HGCalMouseBite |
( |
const HGCalDDDConstants & |
hgc, |
|
|
bool |
waferRotate = false |
|
) |
| |
Definition at line 7 of file HGCalMouseBite.cc.
References funct::abs(), angle(), angle_units::operators::convertRadToDeg(), funct::cos(), TkAlMuonSelectors_cfi::cut, HGCalDDDConstants::geomMode(), HGCalDDDConstants::getParameter(), HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, HGCSiliconDetId::HGCalCoarseN, HGCSiliconDetId::HGCalFineN, dqmdumpme::k, HGCalDDDConstants::mouseBite(), amptDefault_cfi::proj, funct::sin(), mathSSE::sqrt(), funct::tan(), findQualityFiles::v, HGCalDDDConstants::waferSize(), and HGCalParameters::waferSize_.
11 const std::vector<double>
angle = {90._deg, 30._deg};
12 std::vector<std::pair<double, double> > projXY;
13 for (
auto ang : angle)
14 projXY.emplace_back(std::make_pair(
cos(ang),
sin(ang)));
15 const double mousebite(hgc.
mouseBite(
true));
16 const double wafersize(hgc.
waferSize(
true));
17 double cut = wafersize *
tan(angle[1]) - mousebite;
19 edm::LogVerbatim(
"HGCalGeom") <<
"Creating HGCMosueBite with cut at " << cut <<
" along " << angle.size()
20 <<
" axes in wafers of size " << wafersize;
21 for (
unsigned int k = 0;
k < angle.size(); ++
k)
23 << projXY[
k].first <<
":" << projXY[
k].second;
25 static const double sqrt3 =
std::sqrt(3.0);
28 double Rf = wafersize / (3.0 * nf);
29 double rf = 0.5 * Rf * sqrt3;
30 for (
int u = 0; u < 2 * nf; ++u) {
31 for (
int v = 0;
v < 2 * nf; ++
v) {
32 if (((
v - u) < nf) && ((u -
v) <= nf)) {
33 double yp =
std::abs((u - 0.5 *
v - nf2) * 2 * rf);
34 double xp =
std::abs((1.5 * (
v - nf) + 1.0) * Rf);
35 for (
auto proj : projXY) {
36 double dist = (
rot ? (yp *
proj.first + xp *
proj.second) : (xp *
proj.first + yp *
proj.second));
47 <<
" masked u, v's among the fine grain wafers:";
55 double rc = 0.5 * Rc * sqrt3;
56 for (
int u = 0; u < 2 * nc; ++u) {
57 for (
int v = 0;
v < 2 * nc; ++
v) {
58 if (((
v - u) < nc) && ((u -
v) <= nc)) {
59 double yp = (u - 0.5 *
v - nc2) * 2 * rc;
60 double xp = (1.5 * (
v - nc) + 1.0) * Rc;
61 for (
auto proj : projXY) {
62 double dist = (
rot ? (yp *
proj.first + xp *
proj.second) : (xp *
proj.first + yp *
proj.second));
72 <<
" masked u, v's among the coarse grain wafers:";
const HGCalParameters * getParameter() const
constexpr NumType convertRadToDeg(NumType radians)
Sin< T >::type sin(const T &t)
static const int HGCalFineN
double mouseBite(bool reco) const
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
HGCalGeometryMode::GeometryMode geomMode() const
double waferSize(bool reco) const
std::vector< int > rejectCoarse_
static const int HGCalCoarseN
std::vector< int > rejectFine_
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
template<class T >
bool HGCalMouseBite::exclude |
( |
const T & |
id | ) |
|
|
inline |
std::vector<int> HGCalMouseBite::rejectCoarse_ |
|
private |
std::vector<int> HGCalMouseBite::rejectFine_ |
|
private |