Definition at line 5 of file CaloCellCrossing.cc.
14 const double eps(fabs(small) > 1.
e-15 ? fabs(small) : 1.
e-10);
15 static unsigned int k_rlen(30);
17 m_ctr.reserve(k_rlen);
22 HepGeom::Point3D<double>(
gp.
x(),
gp.
y(),
gp.
z()), HepGeom::Vector3D<double>(
gv.
x(),
gv.
y(),
gv.
z()),
eps);
24 LogDebug(
"CaloCellCrossing") <<
"*** Line: pt=" <<
line.pt() <<
", unitvec=" <<
line.uv();
28 for (
auto dId : ids) {
29 unsigned int found(0);
32 const HepGeom::Point3D<double> fr(cg->getPosition().x(), cg->getPosition().y(), cg->getPosition().z());
33 const double bCut2((gc[0] - gc[6]).
mag2());
35 if ((!onewayonly ||
eps < HepGeom::Vector3D<double>(fr -
line.pt()).
dot(
line.uv())) &&
36 bCut2 >
line.dist2(fr))
38 LogDebug(
"CaloCellCrossing") <<
"*** fr=" << fr <<
", bCut =" <<
sqrt(bCut2) <<
", dis=" <<
line.dist(fr);
39 const HepGeom::Point3D<double>
cv[8] = {HepGeom::Point3D<double>(gc[0].
x(), gc[0].
y(), gc[0].
z()),
40 HepGeom::Point3D<double>(gc[1].
x(), gc[1].
y(), gc[1].
z()),
41 HepGeom::Point3D<double>(gc[2].
x(), gc[2].
y(), gc[2].
z()),
42 HepGeom::Point3D<double>(gc[3].
x(), gc[3].
y(), gc[3].
z()),
43 HepGeom::Point3D<double>(gc[4].
x(), gc[4].
y(), gc[4].
z()),
44 HepGeom::Point3D<double>(gc[5].
x(), gc[5].
y(), gc[5].
z()),
45 HepGeom::Point3D<double>(gc[6].
x(), gc[6].
y(), gc[6].
z()),
46 HepGeom::Point3D<double>(gc[7].
x(), gc[7].
y(), gc[7].
z())};
47 const HepGeom::Point3D<double>
ctr(0.125 * (
cv[0] +
cv[1] +
cv[2] +
cv[3] +
cv[4] +
cv[5] +
cv[6] +
cv[7]));
48 const double dCut2(bCut2 / 4.);
51 LogDebug(
"CaloCellCrossing") <<
"** 2nd cut: ctr=" <<
ctr <<
", dist=" <<
line.dist(
ctr);
52 static const unsigned int nc[6][4] = {
53 {0, 1, 2, 3}, {0, 4, 5, 1}, {0, 4, 7, 3}, {6, 7, 4, 5}, {6, 2, 3, 7}, {6, 2, 1, 5}};
54 for (
unsigned int face(0); face != 6; ++face) {
55 const unsigned int* ic(&nc[face][0]);
56 const HepGeom::Plane3D<double> pl(
cv[ic[0]],
cv[ic[1]],
cv[ic[2]]);
58 const HepGeom::Point3D<double>
pt(
line.point(pl, parallel));
59 LogDebug(
"CaloCellCrossing") <<
"***Face: " << face <<
", pt=" <<
pt;
61 LogDebug(
"CaloCellCrossing") <<
"Not parallel";
64 LogDebug(
"CaloCellCrossing") <<
"la.point=" << la.point(
pt);
88 if (
eps < dist1 &&
eps < dist2) {
90 <<
"********For DetId = " << dId <<
" distances too big: " << dist1 <<
", " << dist2;
108 for (
unsigned int i(0);
i !=
m_entr.size(); ++
i) {
References cms::cuda::assert(), dqmiodatasetharvest::ctr, cuy::cv, dot(), MillePedeFileConverter_cfg::e, gpuVertexFinder::eps, newFWLiteAna::found, CaloSubdetectorGeometry::getGeometry(), CaloSubdetectorGeometry::getValidDetIds(), gp(), gv(), mps_fire::i, mps_splice::line, LogDebug, m_ctr, m_detId, m_entr, m_exit, m_len, mag(), mag2(), HepLine3D::point(), DiDispStaMuonMonitor_cfi::pt, mathSSE::sqrt(), x, PV3DBase< T, PVType, FrameType >::x(), y, PV3DBase< T, PVType, FrameType >::y(), z, and PV3DBase< T, PVType, FrameType >::z().