|
|
Go to the documentation of this file.
14 typedef HepGeom::Vector3D<CCGFloat>
FVec3D;
15 typedef HepGeom::Plane3D<CCGFloat>
Plane3D;
17 typedef HepGeom::Vector3D<double>
DVec3D;
19 typedef HepGeom::Point3D<double>
DPt3D;
26 :
CaloCellGeometry(), m_axis(0., 0., 0.), m_corOne(0., 0., 0.), m_local(0., 0., 0.), m_global(0., 0., 0.) {}
31 CaloCellGeometry::operator=(tr);
41 <<
etaPos() <<
" phi " <<
phiPos() <<
" Translation " <<
m_tr.getTranslation()
42 <<
" and rotation " <<
m_tr.getRotation();
50 m_axis((bCtr - fCtr).
unit()),
51 m_corOne(cor1.
x(), cor1.
y(), cor1.
z()),
58 <<
" phi " <<
phiPos() <<
" Translation " <<
m_tr.getTranslation()
59 <<
" and rotation " <<
m_tr.getRotation();
64 :
CaloCellGeometry(corn, par), m_corOne(corn[0].
x(), corn[0].
y(), corn[0].
z()), m_local(0., 0., 0.) {
71 <<
" phi " <<
phiPos() <<
" Translation " <<
m_tr.getTranslation()
72 <<
" and rotation " <<
m_tr.getRotation();
82 <<
" phi " <<
phiPos() <<
" Translation " <<
m_tr.getTranslation()
83 <<
" and rotation " <<
m_tr.getRotation();
93 <<
" Global " <<
glb.x() <<
":" <<
glb.y() <<
":" <<
glb.z() <<
" TR " <<
m_tr.xx()
94 <<
":" <<
m_tr.xy() <<
":" <<
m_tr.xz() <<
":" <<
m_tr.yx() <<
":" <<
m_tr.yy()
95 <<
":" <<
m_tr.yz() <<
":" <<
m_tr.zx() <<
":" <<
m_tr.zy() <<
":" <<
m_tr.zz()
96 <<
":" <<
m_tr.dx() <<
":" <<
m_tr.dy() <<
":" <<
m_tr.dz();
120 edm::LogVerbatim(
"CaloGeometry") <<
"FlatHexagon::Global " << global.
x() <<
":" << global.
y() <<
":" << global.
z()
175 ref =
oneBySix_ * (lc[0] + lc[1] + lc[2] + lc[3] + lc[4] + lc[5]);
177 edm::LogVerbatim(
"CaloGeometry") <<
"Ref " << ref <<
" Local Corners " << lc[0] <<
"|" << lc[1] <<
"|" << lc[2] <<
"|"
178 << lc[3] <<
"|" << lc[4] <<
"|" << lc[5] <<
"|" << lc[6] <<
"|" << lc[7] <<
"|"
179 << lc[8] <<
"|" << lc[9] <<
"|" << lc[10] <<
"|" << lc[11];
185 const Pt3D gFront(
p.x(),
p.y(),
p.z());
186 const DPt3D dgFront(
p.x(),
p.y(),
p.z());
195 Pt3D lBack((lc[6] + lc[7] + lc[8] + lc[9] + lc[10] + lc[11]) / 6.0);
197 const DPt3D dlFront(lFront.x(), lFront.y(), lFront.z());
198 const DPt3D dlBack(lBack.x(), lBack.y(), lBack.z());
199 const DPt3D dlOne(lc[0].
x(), lc[0].
y(), lc[0].
z());
205 const DPt3D dgBack(dgFront + (dlBack - dlFront).
mag() * dgAxis);
206 DPt3D dgOne(dgFront + (dlOne - dlFront).
mag() * (dmOne - dgFront).
unit());
208 const double dlangle((dlBack - dlFront).
angle(dlOne - dlFront));
209 const double dgangle((dgBack - dgFront).
angle(dgOne - dgFront));
210 const double dangle(dlangle - dgangle);
212 if (1.
e-6 < fabs(dangle)) {
213 const DPlane3D dgPl(dgFront, dgOne, dgBack);
214 const DPt3D dp2(dgFront + dgPl.normal().unit());
218 dgOne = (dgFront + HepGeom::Rotate3D(-dangle, dgFront, dp2) *
DVec3D(dgOld - dgFront));
221 tr =
Tr3D(dlFront, dlBack, dlOne, dgFront, dgBack, dgOne);
228 if (
co.uninitialized()) {
235 const Pt3D corn(tr * lc[
i]);
248 GlobalPoint global(global_b.x(), global_b.y(), global_b.z());
259 for (
unsigned int i = 0;
i != corners.size(); ++
i) {
260 s <<
"Corner: " << corners[
i] << std::endl;
HepGeom::Transform3D Tr3D
std::vector< Pt3D > Pt3DVec
Pt3D getLocal(const GlobalPoint &global) const
CaloCellGeometry::Tr3D Tr3D
static const float tolmin
float phiPos() const override
Geom::Theta< T > theta() const
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
CornersVec const & getCorners() const
Returns the corner points of this cell's volume.
FlatHexagon::Pt3DVec Pt3DVec
Global3DVector GlobalVector
float etaPos() const override
static constexpr uint32_t k_r
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
void vocalCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
HepGeom::Point3D< double > DPt3D
Vector3DBase unit() const
GlobalVector makeAxis(void)
float etaSpan() const override
static constexpr unsigned int ncorner_
CCGFloat getPhiAxis() const
HepGeom::Vector3D< CCGFloat > FVec3D
A base class to handle the hexagonal shape of HGCal silicon volumes.
Global3DPoint GlobalPoint
static constexpr uint32_t k_R
HepGeom::Point3D< CCGFloat > Pt3D
static constexpr unsigned int ncornerBy2_
CaloCellGeometry::Pt3D Pt3D
void initCorners(CornersVec &) override
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
FlatHexagon & operator=(const FlatHexagon &tr)
HepGeom::Point3D< double > DPt3D
const GlobalVector & axis() const
CaloCellGeometry::CCGFloat CCGFloat
HepGeom::Plane3D< double > DPlane3D
const CCGFloat * param() const
Tan< T >::type tan(const T &t)
HepGeom::Vector3D< CCGFloat > FVec3D
GlobalPoint const & getPosition() const override
Returns the position of reference for this cell.
std::ostream & operator<<(std::ostream &s, const FlatHexagon &cell)
CaloCellGeometry::Pt3DVec Pt3DVec
Basic3DVector unit() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
HepGeom::Plane3D< double > DPlane3D
static constexpr uint32_t k_dZ
GlobalPoint backCtr(void) const
FlatHexagon::CCGFloat CCGFloat
static constexpr double oneBySix_
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
float phiSpan() const override
HepGeom::Plane3D< CCGFloat > Plane3D
Abs< T >::type abs(const T &t)
Geom::Phi< T > phi() const
HepGeom::Vector3D< double > DVec3D
CCGFloat getThetaAxis() const